@ionic/core 8.8.3-dev.11774956231.12ab3ff2 → 8.8.3-dev.11775161784.19ac94a7
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/components/ion-checkbox.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-picker-column.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/p-C7AoMl7c.js +4 -0
- package/components/{p-e-EDj2CO.js → p-DvPfNQLN.js} +1 -1
- package/components/p-R9D4zAw1.js +4 -0
- package/components/{p-D6pdfDIA.js → p-UmZEK_c7.js} +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +10 -7
- package/dist/cjs/ion-datetime_3.cjs.entry.js +2 -6
- package/dist/cjs/ion-picker-column.cjs.entry.js +4 -4
- package/dist/collection/components/checkbox/checkbox.js +10 -7
- package/dist/collection/components/datetime/datetime.js +2 -6
- package/dist/collection/components/picker-column/picker-column.js +5 -5
- package/dist/docs.json +1 -1
- package/dist/esm/ion-checkbox.entry.js +10 -7
- package/dist/esm/ion-datetime_3.entry.js +2 -6
- package/dist/esm/ion-picker-column.entry.js +5 -5
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-5b52aa7d.entry.js +4 -0
- package/dist/ionic/p-9fae83d8.entry.js +4 -0
- package/dist/ionic/p-e51e75b8.entry.js +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +0 -1
- package/hydrate/index.js +10 -16
- package/hydrate/index.mjs +10 -16
- package/package.json +1 -1
- package/components/p-FBcnjE5W.js +0 -4
- package/components/p-cvHphHJA.js +0 -4
- package/dist/ionic/p-078037da.entry.js +0 -4
- package/dist/ionic/p-b4af3d66.entry.js +0 -4
- package/dist/ionic/p-c744307d.entry.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{p as e,H as t,e as r,h as o,d as c,t as i}from"./p-BJoMtgfR.js";import{i as a,e as n}from"./p-DgbT0exM.js";import{c as s}from"./p-DJztqcrH.js";import{c as l,h}from"./p-DiVJyqlX.js";import{b}from"./p-CDfQnFrd.js";const p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ionChange=r(this,"ionChange",7),this.ionFocus=r(this,"ionFocus",7),this.ionBlur=r(this,"ionBlur",7),this.inputId="ion-cb-"+d++,this.inputLabelId=`${this.inputId}-lbl`,this.helperTextId=`${this.inputId}-helper-text`,this.errorTextId=`${this.inputId}-error-text`,this.inheritedAttributes={},this.name=this.inputId,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.value="on",this.labelPlacement="start",this.required=!1,this.isInvalid=!1,this.hasLabelContent=!1,this.setChecked=e=>{const t=this.checked=e;this.ionChange.emit({checked:t,value:this.value})},this.toggleChecked=e=>{e.preventDefault(),this.setChecked(!this.checked),this.indeterminate=!1},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.onKeyDown=e=>{" "===e.key&&(e.preventDefault(),this.disabled||this.toggleChecked(e))},this.onClick=e=>{this.disabled||this.toggleChecked(e)},this.onDivLabelClick=e=>{e.stopPropagation()}}connectedCallback(){const{el:e}=this;"undefined"!=typeof MutationObserver&&(this.validationObserver=new MutationObserver((t=>{t.some((e=>"characterData"===e.type))&&(this.hasLabelContent=""!==this.el.textContent);const r=s(e);this.isInvalid!==r&&(this.isInvalid=r,Promise.resolve().then((()=>{this.hintTextId=this.getHintTextId()})))})),this.validationObserver.observe(e,{attributes:!0,attributeFilter:["class"],characterData:!0,subtree:!0})),this.isInvalid=s(e),this.hasLabelContent=""!==this.el.textContent}componentWillLoad(){this.inheritedAttributes=Object.assign({},a(this.el)),this.hintTextId=this.getHintTextId()}disconnectedCallback(){this.validationObserver&&(this.validationObserver.disconnect(),this.validationObserver=void 0)}async setFocus(){this.el.focus()}getHintTextId(){const{helperText:e,errorText:t,helperTextId:r,errorTextId:o,isInvalid:c}=this;return c&&t?o:e?r:void 0}renderHintText(){const{helperText:e,errorText:t,helperTextId:r,errorTextId:c,isInvalid:i}=this;if(e||t)return o("div",{class:"checkbox-bottom"},o("div",{id:r,class:"helper-text",part:"supporting-text helper-text","aria-live":"polite"},i?null:e),o("div",{id:c,class:"error-text",part:"supporting-text error-text",role:"alert"},i?t:null))}render(){const{color:e,checked:t,disabled:r,el:i,getSVGPath:a,indeterminate:s,inheritedAttributes:p,inputId:d,justify:x,labelPlacement:k,name:m,value:f,alignment:g,required:w}=this,u=b(this),v=a(u,s);return n(!0,i,m,t?f:"",r),o(c,{key:"ce3a0ada37691ae9d4de7054e9d5f1e45e2762c4",role:"checkbox","aria-checked":s?"mixed":`${t}`,"aria-describedby":this.hintTextId,"aria-invalid":this.isInvalid?"true":void 0,"aria-labelledby":this.hasLabelContent?this.inputLabelId:null,"aria-label":p["aria-label"]||null,"aria-disabled":r?"true":null,"aria-required":w?"true":void 0,tabindex:r?void 0:0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,class:l(e,{[u]:!0,"in-item":h("ion-item",i),"checkbox-checked":t,"checkbox-disabled":r,"checkbox-indeterminate":s,interactive:!0,[`checkbox-justify-${x}`]:void 0!==x,[`checkbox-alignment-${g}`]:void 0!==g,[`checkbox-label-placement-${k}`]:!0})},o("label",{key:"04c0626f5cf49abdeb32773b723f7ff8f1d3c3d6",class:"checkbox-wrapper",htmlFor:d},o("input",Object.assign({key:"cfb3ba7834cdeee7c5d10230cd3781a5ba12e1d6",type:"checkbox",checked:!!t||void 0,disabled:r,id:d,onChange:this.toggleChecked,required:w},p)),o("div",{key:"da9b4d782d4b6ed8a67c7b5a411addd41ecf169d",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!this.hasLabelContent},part:"label",id:this.inputLabelId,onClick:this.onDivLabelClick},o("slot",{key:"fbd5a839fb15a178177e45c18b94ea7aaa7e3a2c"}),this.renderHintText()),o("div",{key:"8c4bdc0f4ffe7ee3301ce45f58dc0d6087371160",class:"native-wrapper"},o("svg",{key:"1546685af07d37960dae8978d9026caf3151fbea",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container","aria-hidden":"true"},v))))}getSVGPath(e,t){let r=o("path",t?{d:"M6 12L18 12",part:"mark"}:{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});return"md"===e&&(r=o("path",t?{d:"M2 12H22",part:"mark"}:{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})),r}get el(){return this}static get style(){return{ios:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.125rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.375rem, 55.836px);--checkmark-width:1.5px}:host(.checkbox-disabled){opacity:0.3}",md:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}"}}},[289,"ion-checkbox",{color:[513],name:[1],checked:[1028],indeterminate:[1028],disabled:[4],errorText:[1,"error-text"],helperText:[1,"helper-text"],value:[8],labelPlacement:[1,"label-placement"],justify:[1],alignment:[1],required:[4],isInvalid:[32],hasLabelContent:[32],hintTextId:[32],setFocus:[64]}]);let d=0;function x(){"undefined"!=typeof customElements&&["ion-checkbox"].forEach((e=>{"ion-checkbox"===e&&(customElements.get(i(e))||customElements.define(i(e),p))}))}export{p as C,x as d}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{p as o,H as e,h as i,i as t,d as n,t as
|
|
4
|
+
import{p as o,H as e,h as i,i as t,d as n,t as a}from"./p-BJoMtgfR.js";import{b as c}from"./p-CDfQnFrd.js";import{s}from"./p-Cq8cQ0NL.js";import{g as r}from"./p-DiVJyqlX.js";import{d as l}from"./p-BTeL5HCK.js";import{d}from"./p-B8b1Ukl9.js";import{d as m}from"./p-R9D4zAw1.js";import{d as b}from"./p-ApmKVjaE.js";import{d as p}from"./p-BYDc3hSE.js";import{d as h}from"./p-YLXPWgVj.js";import{d as u}from"./p-kvaDs24J.js";import{d as f}from"./p-DYdpXONG.js";import{d as k}from"./p-BSB38Tek.js";import{d as g}from"./p-Bk2zuNWT.js";import{d as v}from"./p-fpbh6w3f.js";import{d as y}from"./p-CgfaEEem.js";import{d as j}from"./p-DJMZehmW.js";const x=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:i}=this;if(e)return i.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),i=this.getValues(o);(null==e?void 0:e.handler)&&s(e.handler,i)}setChecked(o){const{multiple:e}=this,i=this.findOptionFromEvent(o);e&&i&&(i.checked=o.detail.checked)}renderRadioOptions(){const o=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return i("ion-radio-group",{value:o,onIonChange:o=>this.callOptionHandler(o)},this.options.map((e=>i("ion-item",{lines:"none",class:Object.assign({"item-radio-checked":e.value===o},r(e.cssClass))},i("ion-radio",{value:e.value,disabled:e.disabled,justify:"start",labelPlacement:"end",onClick:()=>this.closeModal(),onKeyUp:o=>{" "===o.key&&this.closeModal()}},e.text)))))}renderCheckboxOptions(){return this.options.map((o=>i("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},r(o.cssClass))},i("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),t(this)}},o.text))))}render(){return i(n,{key:"f8a4cd6ff23ff01eaa1bdaf3c046814e7b30b23b",class:c(this)},i("ion-header",{key:"9e29a7e57ad5cf332641111882f16852187ec8ba"},i("ion-toolbar",{key:"e6af5d6eabbf4b10799fc8a0b8f91d29b12d41f5"},void 0!==this.header&&i("ion-title",{key:"6056e52d15dbf307571d25e0305d67228a79237d"},this.header),i("ion-buttons",{key:"c9aa4fb2e21a93f3a95c5a8f0ba8b7d5553c5a72",slot:"end"},i("ion-button",{key:"5ffbf512719bcb053b652fc96b1b6154d0593095",onClick:()=>this.closeModal()},this.cancelText)))),i("ion-content",{key:"0ec9098798a4e6de7a83a0a7e9d10bdcd7c98a78"},i("ion-list",{key:"d60b1700d3c2f8655951632de810900707a101f0"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return this}static get style(){return{ionic:'.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'}}},[34,"ion-select-modal",{header:[1],cancelText:[1,"cancel-text"],multiple:[4],options:[16]}]);function E(){"undefined"!=typeof customElements&&["ion-select-modal","ion-button","ion-buttons","ion-checkbox","ion-content","ion-header","ion-icon","ion-item","ion-list","ion-radio","ion-radio-group","ion-ripple-effect","ion-title","ion-toolbar"].forEach((o=>{switch(o){case"ion-select-modal":customElements.get(a(o))||customElements.define(a(o),x);break;case"ion-button":customElements.get(a(o))||l();break;case"ion-buttons":customElements.get(a(o))||d();break;case"ion-checkbox":customElements.get(a(o))||m();break;case"ion-content":customElements.get(a(o))||b();break;case"ion-header":customElements.get(a(o))||p();break;case"ion-icon":customElements.get(a(o))||h();break;case"ion-item":customElements.get(a(o))||u();break;case"ion-list":customElements.get(a(o))||f();break;case"ion-radio":customElements.get(a(o))||k();break;case"ion-radio-group":customElements.get(a(o))||g();break;case"ion-ripple-effect":customElements.get(a(o))||v();break;case"ion-title":customElements.get(a(o))||y();break;case"ion-toolbar":customElements.get(a(o))||j()}}))}export{x as S,E as d}
|
|
@@ -112,15 +112,15 @@ const Checkbox = class {
|
|
|
112
112
|
this.onDivLabelClick = (ev) => {
|
|
113
113
|
ev.stopPropagation();
|
|
114
114
|
};
|
|
115
|
-
this.onSlotChange = () => {
|
|
116
|
-
this.hasLabelContent = this.el.textContent !== '';
|
|
117
|
-
};
|
|
118
115
|
}
|
|
119
116
|
connectedCallback() {
|
|
120
117
|
const { el } = this;
|
|
121
118
|
// Watch for class changes to update validation state.
|
|
122
119
|
if (typeof MutationObserver !== 'undefined') {
|
|
123
|
-
this.validationObserver = new MutationObserver(() => {
|
|
120
|
+
this.validationObserver = new MutationObserver((mutations) => {
|
|
121
|
+
if (mutations.some((mutation) => mutation.type === 'characterData')) {
|
|
122
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
123
|
+
}
|
|
124
124
|
const newIsInvalid = validity.checkInvalidState(el);
|
|
125
125
|
if (this.isInvalid !== newIsInvalid) {
|
|
126
126
|
this.isInvalid = newIsInvalid;
|
|
@@ -150,10 +150,13 @@ const Checkbox = class {
|
|
|
150
150
|
this.validationObserver.observe(el, {
|
|
151
151
|
attributes: true,
|
|
152
152
|
attributeFilter: ['class'],
|
|
153
|
+
characterData: true,
|
|
154
|
+
subtree: true,
|
|
153
155
|
});
|
|
154
156
|
}
|
|
155
157
|
// Always set initial state
|
|
156
158
|
this.isInvalid = validity.checkInvalidState(el);
|
|
159
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
157
160
|
}
|
|
158
161
|
componentWillLoad() {
|
|
159
162
|
this.inheritedAttributes = Object.assign({}, helpers.inheritAriaAttributes(this.el));
|
|
@@ -203,7 +206,7 @@ const Checkbox = class {
|
|
|
203
206
|
helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
204
207
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
205
208
|
// support in Safari for accessibility.
|
|
206
|
-
return (index.h(index.Host, { key: '
|
|
209
|
+
return (index.h(index.Host, { key: 'ce3a0ada37691ae9d4de7054e9d5f1e45e2762c4', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: theme.createColorClasses(color, {
|
|
207
210
|
[mode]: true,
|
|
208
211
|
'in-item': theme.hostContext('ion-item', el),
|
|
209
212
|
'checkbox-checked': checked,
|
|
@@ -213,10 +216,10 @@ const Checkbox = class {
|
|
|
213
216
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
214
217
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
215
218
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
216
|
-
}) }, index.h("label", { key: '
|
|
219
|
+
}) }, index.h("label", { key: '04c0626f5cf49abdeb32773b723f7ff8f1d3c3d6', class: "checkbox-wrapper", htmlFor: inputId }, index.h("input", Object.assign({ key: 'cfb3ba7834cdeee7c5d10230cd3781a5ba12e1d6', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), index.h("div", { key: 'da9b4d782d4b6ed8a67c7b5a411addd41ecf169d', class: {
|
|
217
220
|
'label-text-wrapper': true,
|
|
218
221
|
'label-text-wrapper-hidden': !this.hasLabelContent,
|
|
219
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: '
|
|
222
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, index.h("slot", { key: 'fbd5a839fb15a178177e45c18b94ea7aaa7e3a2c' }), this.renderHintText()), index.h("div", { key: '8c4bdc0f4ffe7ee3301ce45f58dc0d6087371160', class: "native-wrapper" }, index.h("svg", { key: '1546685af07d37960dae8978d9026caf3151fbea', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
220
223
|
}
|
|
221
224
|
getSVGPath(mode, indeterminate) {
|
|
222
225
|
let path = indeterminate ? (index.h("path", { d: "M6 12L18 12", part: "mark" })) : (index.h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -1085,9 +1085,6 @@ const Datetime = class {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
connectedCallback() {
|
|
1087
1087
|
this.clearFocusVisible = focusVisible.startFocusVisible(this.el).destroy;
|
|
1088
|
-
this.loadTimeout = setTimeout(() => {
|
|
1089
|
-
this.ensureReadyIfVisible();
|
|
1090
|
-
}, 100);
|
|
1091
1088
|
}
|
|
1092
1089
|
disconnectedCallback() {
|
|
1093
1090
|
if (this.clearFocusVisible) {
|
|
@@ -1096,7 +1093,6 @@ const Datetime = class {
|
|
|
1096
1093
|
}
|
|
1097
1094
|
if (this.loadTimeout) {
|
|
1098
1095
|
clearTimeout(this.loadTimeout);
|
|
1099
|
-
this.loadTimeout = undefined;
|
|
1100
1096
|
}
|
|
1101
1097
|
}
|
|
1102
1098
|
initializeListeners() {
|
|
@@ -1904,7 +1900,7 @@ const Datetime = class {
|
|
|
1904
1900
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1905
1901
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1906
1902
|
helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
|
|
1907
|
-
return (index.h(index.Host, { key: '
|
|
1903
|
+
return (index.h(index.Host, { key: 'da5a32b82f28e43ccdd78e371b1491347d2c9dc3', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
|
|
1908
1904
|
[mode]: true,
|
|
1909
1905
|
['datetime-readonly']: readonly,
|
|
1910
1906
|
['datetime-disabled']: disabled,
|
|
@@ -1914,7 +1910,7 @@ const Datetime = class {
|
|
|
1914
1910
|
[`datetime-size-${size}`]: true,
|
|
1915
1911
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1916
1912
|
[`datetime-grid`]: isGridStyle,
|
|
1917
|
-
})) }, index.h("div", { key: '
|
|
1913
|
+
})) }, index.h("div", { key: '3edc567b8d6cefb3af3be0b6008322daeed52e94', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1918
1914
|
}
|
|
1919
1915
|
get el() { return index.getElement(this); }
|
|
1920
1916
|
static get watchers() { return {
|
|
@@ -450,7 +450,7 @@ const PickerColumn = class {
|
|
|
450
450
|
* Because this initial call to scrollActiveItemIntoView has to fire before
|
|
451
451
|
* the scroll listener is set up, we need to manage the active class manually.
|
|
452
452
|
*/
|
|
453
|
-
const oldActive = el.querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
453
|
+
const oldActive = helpers.getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
454
454
|
if (oldActive) {
|
|
455
455
|
this.setPickerItemActiveState(oldActive, false);
|
|
456
456
|
}
|
|
@@ -550,14 +550,14 @@ const PickerColumn = class {
|
|
|
550
550
|
render() {
|
|
551
551
|
const { color, disabled, isActive, numericInput } = this;
|
|
552
552
|
const mode = ionicGlobal.getIonMode(this);
|
|
553
|
-
return (index.h(index.Host, { key: '
|
|
553
|
+
return (index.h(index.Host, { key: 'db903fd415f8a2d91994dececca481c1af8ba6a9', class: theme.createColorClasses(color, {
|
|
554
554
|
[mode]: true,
|
|
555
555
|
['picker-column-active']: isActive,
|
|
556
556
|
['picker-column-numeric-input']: numericInput,
|
|
557
557
|
['picker-column-disabled']: disabled,
|
|
558
|
-
}) }, index.h("slot", { key: '
|
|
558
|
+
}) }, index.h("slot", { key: '02ce9e1dd7df91afcd50b06416552bcffb5dec98', name: "prefix" }), index.h("div", { key: '6dfd7d2429bec19244a6b1afb4448121963a031b', class: "picker-opts", ref: (el) => {
|
|
559
559
|
this.scrollEl = el;
|
|
560
|
-
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, index.h("div", { key: '
|
|
560
|
+
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, index.h("div", { key: 'e30ce0b9cefbfe4d4441fa33acf595da31855c3f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { key: '8be2bd293c12c6ba720d9b31d0d561a96f42e97d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { key: '8afdcddddabbf646fbb55cb0ba4448309a2c1dd9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("slot", { key: '6aa0dacc34d6848575ad5b122b9046982308ca43' }), index.h("div", { key: '92ec8a357414c1b779b11d1dd18fb87a7ee63982', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { key: 'b89457cb74b5907c25594ff6720ac54ca537e933', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), index.h("div", { key: '5bbc92e6bc24de08e39873bf08c5b668373ac0f8', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), index.h("slot", { key: 'd7bf2b519214f0f3576a4ca79844ad97827dd97f', name: "suffix" })));
|
|
561
561
|
}
|
|
562
562
|
get el() { return index.getElement(this); }
|
|
563
563
|
static get watchers() { return {
|
|
@@ -113,15 +113,15 @@ export class Checkbox {
|
|
|
113
113
|
this.onDivLabelClick = (ev) => {
|
|
114
114
|
ev.stopPropagation();
|
|
115
115
|
};
|
|
116
|
-
this.onSlotChange = () => {
|
|
117
|
-
this.hasLabelContent = this.el.textContent !== '';
|
|
118
|
-
};
|
|
119
116
|
}
|
|
120
117
|
connectedCallback() {
|
|
121
118
|
const { el } = this;
|
|
122
119
|
// Watch for class changes to update validation state.
|
|
123
120
|
if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
|
|
124
|
-
this.validationObserver = new MutationObserver(() => {
|
|
121
|
+
this.validationObserver = new MutationObserver((mutations) => {
|
|
122
|
+
if (mutations.some((mutation) => mutation.type === 'characterData')) {
|
|
123
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
124
|
+
}
|
|
125
125
|
const newIsInvalid = checkInvalidState(el);
|
|
126
126
|
if (this.isInvalid !== newIsInvalid) {
|
|
127
127
|
this.isInvalid = newIsInvalid;
|
|
@@ -151,10 +151,13 @@ export class Checkbox {
|
|
|
151
151
|
this.validationObserver.observe(el, {
|
|
152
152
|
attributes: true,
|
|
153
153
|
attributeFilter: ['class'],
|
|
154
|
+
characterData: true,
|
|
155
|
+
subtree: true,
|
|
154
156
|
});
|
|
155
157
|
}
|
|
156
158
|
// Always set initial state
|
|
157
159
|
this.isInvalid = checkInvalidState(el);
|
|
160
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
158
161
|
}
|
|
159
162
|
componentWillLoad() {
|
|
160
163
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -204,7 +207,7 @@ export class Checkbox {
|
|
|
204
207
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
205
208
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
206
209
|
// support in Safari for accessibility.
|
|
207
|
-
return (h(Host, { key: '
|
|
210
|
+
return (h(Host, { key: 'ce3a0ada37691ae9d4de7054e9d5f1e45e2762c4', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
208
211
|
[mode]: true,
|
|
209
212
|
'in-item': hostContext('ion-item', el),
|
|
210
213
|
'checkbox-checked': checked,
|
|
@@ -214,10 +217,10 @@ export class Checkbox {
|
|
|
214
217
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
215
218
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
216
219
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
217
|
-
}) }, h("label", { key: '
|
|
220
|
+
}) }, h("label", { key: '04c0626f5cf49abdeb32773b723f7ff8f1d3c3d6', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'cfb3ba7834cdeee7c5d10230cd3781a5ba12e1d6', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: 'da9b4d782d4b6ed8a67c7b5a411addd41ecf169d', class: {
|
|
218
221
|
'label-text-wrapper': true,
|
|
219
222
|
'label-text-wrapper-hidden': !this.hasLabelContent,
|
|
220
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
223
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'fbd5a839fb15a178177e45c18b94ea7aaa7e3a2c' }), this.renderHintText()), h("div", { key: '8c4bdc0f4ffe7ee3301ce45f58dc0d6087371160', class: "native-wrapper" }, h("svg", { key: '1546685af07d37960dae8978d9026caf3151fbea', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
221
224
|
}
|
|
222
225
|
getSVGPath(mode, indeterminate) {
|
|
223
226
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -894,9 +894,6 @@ export class Datetime {
|
|
|
894
894
|
}
|
|
895
895
|
connectedCallback() {
|
|
896
896
|
this.clearFocusVisible = startFocusVisible(this.el).destroy;
|
|
897
|
-
this.loadTimeout = setTimeout(() => {
|
|
898
|
-
this.ensureReadyIfVisible();
|
|
899
|
-
}, 100);
|
|
900
897
|
}
|
|
901
898
|
disconnectedCallback() {
|
|
902
899
|
if (this.clearFocusVisible) {
|
|
@@ -905,7 +902,6 @@ export class Datetime {
|
|
|
905
902
|
}
|
|
906
903
|
if (this.loadTimeout) {
|
|
907
904
|
clearTimeout(this.loadTimeout);
|
|
908
|
-
this.loadTimeout = undefined;
|
|
909
905
|
}
|
|
910
906
|
}
|
|
911
907
|
initializeListeners() {
|
|
@@ -1713,7 +1709,7 @@ export class Datetime {
|
|
|
1713
1709
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1714
1710
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1715
1711
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1716
|
-
return (h(Host, { key: '
|
|
1712
|
+
return (h(Host, { key: 'da5a32b82f28e43ccdd78e371b1491347d2c9dc3', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1717
1713
|
[mode]: true,
|
|
1718
1714
|
['datetime-readonly']: readonly,
|
|
1719
1715
|
['datetime-disabled']: disabled,
|
|
@@ -1723,7 +1719,7 @@ export class Datetime {
|
|
|
1723
1719
|
[`datetime-size-${size}`]: true,
|
|
1724
1720
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1725
1721
|
[`datetime-grid`]: isGridStyle,
|
|
1726
|
-
})) }, h("div", { key: '
|
|
1722
|
+
})) }, h("div", { key: '3edc567b8d6cefb3af3be0b6008322daeed52e94', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1727
1723
|
}
|
|
1728
1724
|
static get is() { return "ion-datetime"; }
|
|
1729
1725
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
5
|
import { doc } from "../../utils/browser/index";
|
|
6
|
-
import { raf } from "../../utils/helpers";
|
|
6
|
+
import { getElementRoot, raf } from "../../utils/helpers";
|
|
7
7
|
import { hapticSelectionChanged, hapticSelectionEnd, hapticSelectionStart } from "../../utils/native/haptic";
|
|
8
8
|
import { isPlatform } from "../../utils/platform";
|
|
9
9
|
import { createColorClasses } from "../../utils/theme";
|
|
@@ -451,7 +451,7 @@ export class PickerColumn {
|
|
|
451
451
|
* Because this initial call to scrollActiveItemIntoView has to fire before
|
|
452
452
|
* the scroll listener is set up, we need to manage the active class manually.
|
|
453
453
|
*/
|
|
454
|
-
const oldActive = el.querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
454
|
+
const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
455
455
|
if (oldActive) {
|
|
456
456
|
this.setPickerItemActiveState(oldActive, false);
|
|
457
457
|
}
|
|
@@ -551,14 +551,14 @@ export class PickerColumn {
|
|
|
551
551
|
render() {
|
|
552
552
|
const { color, disabled, isActive, numericInput } = this;
|
|
553
553
|
const mode = getIonMode(this);
|
|
554
|
-
return (h(Host, { key: '
|
|
554
|
+
return (h(Host, { key: 'db903fd415f8a2d91994dececca481c1af8ba6a9', class: createColorClasses(color, {
|
|
555
555
|
[mode]: true,
|
|
556
556
|
['picker-column-active']: isActive,
|
|
557
557
|
['picker-column-numeric-input']: numericInput,
|
|
558
558
|
['picker-column-disabled']: disabled,
|
|
559
|
-
}) }, h("slot", { key: '
|
|
559
|
+
}) }, h("slot", { key: '02ce9e1dd7df91afcd50b06416552bcffb5dec98', name: "prefix" }), h("div", { key: '6dfd7d2429bec19244a6b1afb4448121963a031b', class: "picker-opts", ref: (el) => {
|
|
560
560
|
this.scrollEl = el;
|
|
561
|
-
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, h("div", { key: '
|
|
561
|
+
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, h("div", { key: 'e30ce0b9cefbfe4d4441fa33acf595da31855c3f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8be2bd293c12c6ba720d9b31d0d561a96f42e97d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8afdcddddabbf646fbb55cb0ba4448309a2c1dd9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: '6aa0dacc34d6848575ad5b122b9046982308ca43' }), h("div", { key: '92ec8a357414c1b779b11d1dd18fb87a7ee63982', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'b89457cb74b5907c25594ff6720ac54ca537e933', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '5bbc92e6bc24de08e39873bf08c5b668373ac0f8', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: 'd7bf2b519214f0f3576a4ca79844ad97827dd97f', name: "suffix" })));
|
|
562
562
|
}
|
|
563
563
|
static get is() { return "ion-picker-column"; }
|
|
564
564
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -110,15 +110,15 @@ const Checkbox = class {
|
|
|
110
110
|
this.onDivLabelClick = (ev) => {
|
|
111
111
|
ev.stopPropagation();
|
|
112
112
|
};
|
|
113
|
-
this.onSlotChange = () => {
|
|
114
|
-
this.hasLabelContent = this.el.textContent !== '';
|
|
115
|
-
};
|
|
116
113
|
}
|
|
117
114
|
connectedCallback() {
|
|
118
115
|
const { el } = this;
|
|
119
116
|
// Watch for class changes to update validation state.
|
|
120
117
|
if (typeof MutationObserver !== 'undefined') {
|
|
121
|
-
this.validationObserver = new MutationObserver(() => {
|
|
118
|
+
this.validationObserver = new MutationObserver((mutations) => {
|
|
119
|
+
if (mutations.some((mutation) => mutation.type === 'characterData')) {
|
|
120
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
121
|
+
}
|
|
122
122
|
const newIsInvalid = checkInvalidState(el);
|
|
123
123
|
if (this.isInvalid !== newIsInvalid) {
|
|
124
124
|
this.isInvalid = newIsInvalid;
|
|
@@ -148,10 +148,13 @@ const Checkbox = class {
|
|
|
148
148
|
this.validationObserver.observe(el, {
|
|
149
149
|
attributes: true,
|
|
150
150
|
attributeFilter: ['class'],
|
|
151
|
+
characterData: true,
|
|
152
|
+
subtree: true,
|
|
151
153
|
});
|
|
152
154
|
}
|
|
153
155
|
// Always set initial state
|
|
154
156
|
this.isInvalid = checkInvalidState(el);
|
|
157
|
+
this.hasLabelContent = this.el.textContent !== '';
|
|
155
158
|
}
|
|
156
159
|
componentWillLoad() {
|
|
157
160
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -201,7 +204,7 @@ const Checkbox = class {
|
|
|
201
204
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
202
205
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
203
206
|
// support in Safari for accessibility.
|
|
204
|
-
return (h(Host, { key: '
|
|
207
|
+
return (h(Host, { key: 'ce3a0ada37691ae9d4de7054e9d5f1e45e2762c4', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
205
208
|
[mode]: true,
|
|
206
209
|
'in-item': hostContext('ion-item', el),
|
|
207
210
|
'checkbox-checked': checked,
|
|
@@ -211,10 +214,10 @@ const Checkbox = class {
|
|
|
211
214
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
212
215
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
213
216
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
214
|
-
}) }, h("label", { key: '
|
|
217
|
+
}) }, h("label", { key: '04c0626f5cf49abdeb32773b723f7ff8f1d3c3d6', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'cfb3ba7834cdeee7c5d10230cd3781a5ba12e1d6', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), h("div", { key: 'da9b4d782d4b6ed8a67c7b5a411addd41ecf169d', class: {
|
|
215
218
|
'label-text-wrapper': true,
|
|
216
219
|
'label-text-wrapper-hidden': !this.hasLabelContent,
|
|
217
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
220
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'fbd5a839fb15a178177e45c18b94ea7aaa7e3a2c' }), this.renderHintText()), h("div", { key: '8c4bdc0f4ffe7ee3301ce45f58dc0d6087371160', class: "native-wrapper" }, h("svg", { key: '1546685af07d37960dae8978d9026caf3151fbea', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
218
221
|
}
|
|
219
222
|
getSVGPath(mode, indeterminate) {
|
|
220
223
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -1083,9 +1083,6 @@ const Datetime = class {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
connectedCallback() {
|
|
1085
1085
|
this.clearFocusVisible = startFocusVisible(this.el).destroy;
|
|
1086
|
-
this.loadTimeout = setTimeout(() => {
|
|
1087
|
-
this.ensureReadyIfVisible();
|
|
1088
|
-
}, 100);
|
|
1089
1086
|
}
|
|
1090
1087
|
disconnectedCallback() {
|
|
1091
1088
|
if (this.clearFocusVisible) {
|
|
@@ -1094,7 +1091,6 @@ const Datetime = class {
|
|
|
1094
1091
|
}
|
|
1095
1092
|
if (this.loadTimeout) {
|
|
1096
1093
|
clearTimeout(this.loadTimeout);
|
|
1097
|
-
this.loadTimeout = undefined;
|
|
1098
1094
|
}
|
|
1099
1095
|
}
|
|
1100
1096
|
initializeListeners() {
|
|
@@ -1902,7 +1898,7 @@ const Datetime = class {
|
|
|
1902
1898
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1903
1899
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1904
1900
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1905
|
-
return (h(Host, { key: '
|
|
1901
|
+
return (h(Host, { key: 'da5a32b82f28e43ccdd78e371b1491347d2c9dc3', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1906
1902
|
[mode]: true,
|
|
1907
1903
|
['datetime-readonly']: readonly,
|
|
1908
1904
|
['datetime-disabled']: disabled,
|
|
@@ -1912,7 +1908,7 @@ const Datetime = class {
|
|
|
1912
1908
|
[`datetime-size-${size}`]: true,
|
|
1913
1909
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1914
1910
|
[`datetime-grid`]: isGridStyle,
|
|
1915
|
-
})) }, h("div", { key: '
|
|
1911
|
+
})) }, h("div", { key: '3edc567b8d6cefb3af3be0b6008322daeed52e94', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1916
1912
|
}
|
|
1917
1913
|
get el() { return getElement(this); }
|
|
1918
1914
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, d as Host, g as getElement } from './index-IGIE5vDm.js';
|
|
5
5
|
import { d as doc } from './index-ZjP4CjeZ.js';
|
|
6
|
-
import { r as raf } from './helpers-Tl8jw6S2.js';
|
|
6
|
+
import { r as raf, g as getElementRoot } from './helpers-Tl8jw6S2.js';
|
|
7
7
|
import { b as hapticSelectionStart, a as hapticSelectionChanged, h as hapticSelectionEnd } from './haptic-DzAMWJuk.js';
|
|
8
8
|
import { a as isPlatform, b as getIonMode } from './ionic-global-DfbeLwcV.js';
|
|
9
9
|
import { c as createColorClasses } from './theme-DiVJyqlX.js';
|
|
@@ -448,7 +448,7 @@ const PickerColumn = class {
|
|
|
448
448
|
* Because this initial call to scrollActiveItemIntoView has to fire before
|
|
449
449
|
* the scroll listener is set up, we need to manage the active class manually.
|
|
450
450
|
*/
|
|
451
|
-
const oldActive = el.querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
451
|
+
const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
452
452
|
if (oldActive) {
|
|
453
453
|
this.setPickerItemActiveState(oldActive, false);
|
|
454
454
|
}
|
|
@@ -548,14 +548,14 @@ const PickerColumn = class {
|
|
|
548
548
|
render() {
|
|
549
549
|
const { color, disabled, isActive, numericInput } = this;
|
|
550
550
|
const mode = getIonMode(this);
|
|
551
|
-
return (h(Host, { key: '
|
|
551
|
+
return (h(Host, { key: 'db903fd415f8a2d91994dececca481c1af8ba6a9', class: createColorClasses(color, {
|
|
552
552
|
[mode]: true,
|
|
553
553
|
['picker-column-active']: isActive,
|
|
554
554
|
['picker-column-numeric-input']: numericInput,
|
|
555
555
|
['picker-column-disabled']: disabled,
|
|
556
|
-
}) }, h("slot", { key: '
|
|
556
|
+
}) }, h("slot", { key: '02ce9e1dd7df91afcd50b06416552bcffb5dec98', name: "prefix" }), h("div", { key: '6dfd7d2429bec19244a6b1afb4448121963a031b', class: "picker-opts", ref: (el) => {
|
|
557
557
|
this.scrollEl = el;
|
|
558
|
-
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, h("div", { key: '
|
|
558
|
+
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, h("div", { key: 'e30ce0b9cefbfe4d4441fa33acf595da31855c3f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8be2bd293c12c6ba720d9b31d0d561a96f42e97d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '8afdcddddabbf646fbb55cb0ba4448309a2c1dd9', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: '6aa0dacc34d6848575ad5b122b9046982308ca43' }), h("div", { key: '92ec8a357414c1b779b11d1dd18fb87a7ee63982', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'b89457cb74b5907c25594ff6720ac54ca537e933', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '5bbc92e6bc24de08e39873bf08c5b668373ac0f8', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: 'd7bf2b519214f0f3576a4ca79844ad97827dd97f', name: "suffix" })));
|
|
559
559
|
}
|
|
560
560
|
get el() { return getElement(this); }
|
|
561
561
|
static get watchers() { return {
|