@tarojs/components 3.6.5-canary.0 → 3.6.5
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/dist/cjs/taro-checkbox-core_2.cjs.entry.js +24 -5
- package/dist/cjs/taro-form-core.cjs.entry.js +23 -5
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +24 -5
- package/dist/collection/components/checkbox/checkbox-group.js +24 -5
- package/dist/collection/components/form/form.js +23 -5
- package/dist/collection/components/radio/radio-group.js +24 -5
- package/dist/components/taro-checkbox-group-core.js +24 -5
- package/dist/components/taro-form-core.js +23 -5
- package/dist/components/taro-radio-group-core.js +24 -5
- package/dist/esm/taro-checkbox-core_2.entry.js +24 -5
- package/dist/esm/taro-form-core.entry.js +23 -5
- package/dist/esm/taro-radio-core_2.entry.js +24 -5
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-form-core.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
- package/dist/taro-components/p-0d7a705b.system.entry.js +1 -0
- package/dist/taro-components/p-2a071adf.system.entry.js +1 -0
- package/dist/taro-components/p-43720011.entry.js +1 -0
- package/dist/taro-components/p-962f28cb.entry.js +1 -0
- package/dist/taro-components/p-b641e598.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/p-fd7ff0f3.system.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/form/form.d.ts +1 -1
- package/lib/react/node_modules/.pnpm/{registry.npmjs.org_tslib@1.14.1 → registry.npmjs.org_tslib@2.5.0}/node_modules/tslib/tslib.es6.js +98 -23
- package/lib/react/node_modules/.pnpm/{registry.npmjs.org_tslib@1.14.1 → registry.npmjs.org_tslib@2.5.0}/node_modules/tslib/tslib.es6.js.map +1 -1
- package/lib/react/react-component-lib/createComponent.js +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js +1 -1
- package/package.json +4 -4
- package/dist/taro-components/p-2ce33c64.system.entry.js +0 -1
- package/dist/taro-components/p-5125596b.entry.js +0 -1
- package/dist/taro-components/p-5ab755ed.entry.js +0 -1
- package/dist/taro-components/p-6c5f7bc3.system.entry.js +0 -1
- package/dist/taro-components/p-7e59fb3b.system.entry.js +0 -1
- package/dist/taro-components/p-a350c6cb.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js"],(function(e){"use strict";var t,n,i,o,r;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H;r=e.g}],execute:function(){var a='.taro-checkbox{display:inline-block;position:relative}.taro-checkbox_checked{display:inline-block;position:relative;top:5px;border:1px solid #d1d1d1;border-radius:3px;width:23px;height:23px;min-height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#fff;vertical-align:0;font-size:23px;color:#1aad19}.taro-checkbox_checked:checked::before{display:inline-block;position:absolute;left:50%;top:50%;vertical-align:middle;text-decoration:inherit;text-align:center;text-transform:none;font-family:weui;font-style:normal;font-weight:normal;font-variant:normal;font-size:inherit;color:inherit;content:"\\ea08";-webkit-transform:translate(-50%, -48%) scale(0.73);transform:translate(-50%, -48%) scale(0.73);speak:none}';var c=e("taro_checkbox_core",function(){function e(e){var i=this;t(this,e);this.onChange=n(this,"checkboxchange",7);this.handleChange=function(e){e.stopPropagation();i.onChange.emit({value:i.value})};this.name=undefined;this.value="";this.color=undefined;this.id=undefined;this.checked=false;this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false}e.prototype.watchId=function(e){if(!this.isWillLoadCalled)return;if(e)this.inputEl.setAttribute("id",e)};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true};e.prototype.componentDidRender=function(){this.id&&this.el.removeAttribute("id")};e.prototype.render=function(){var e=this;var t=this,n=t.checked,r=t.name,a=t.color,c=t.value,l=t.disabled,u=t.nativeProps;return i(o,{className:"weui-cells_checkbox"},i("input",Object.assign({ref:function(t){if(!t)return;e.inputEl=t;if(e.id)t.setAttribute("id",e.id)},type:"checkbox",value:c,name:r,class:"taro-checkbox_checked",style:{color:a},checked:n,disabled:l,onChange:this.handleChange},u)),i("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{id:["watchId"]}},enumerable:false,configurable:true});return e}());c.style=a;var l=e("taro_checkbox_group_core",function(){function e(e){t(this,e);this.onChange=n(this,"change",7);this.uniqueName=Date.now().toString(36);this.name=undefined}e.prototype.function=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-CHECKBOX-CORE")return;var t=this.el.querySelectorAll("taro-checkbox-core");this.value=this.getValues(t);this.onChange.emit({value:this.value})};e.prototype.componentDidLoad=function(){var e=this;var t=this.el.querySelectorAll("taro-checkbox-core");t.forEach((function(t){t.setAttribute("name",e.name||e.uniqueName)}));Object.defineProperty(this.el,"value",{get:function(){if(!e.value){var t=e.el.querySelectorAll("taro-checkbox-core");e.value=e.getValues(t)}return e.value},configurable:true})};e.prototype.getValues=function(e){return Array.from(e).filter((function(e){var t=e.querySelector("input");return t===null||t===void 0?void 0:t.checked})).map((function(e){return e.value}))};e.prototype.render=function(){return i(o,null)};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as o,g as s}from"./p-9137dcab.js";const n=class{constructor(i){t(this,i),this.onChange=e(this,"checkboxchange",7),this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:this.value})},this.name=void 0,this.value="",this.color=void 0,this.id=void 0,this.checked=!1,this.disabled=!1,this.nativeProps={},this.isWillLoadCalled=!1}watchId(t){this.isWillLoadCalled&&t&&this.inputEl.setAttribute("id",t)}componentWillLoad(){this.isWillLoadCalled=!0}componentDidRender(){this.id&&this.el.removeAttribute("id")}render(){const{checked:t,name:e,color:s,value:n,disabled:c,nativeProps:r}=this;return i(o,{className:"weui-cells_checkbox"},i("input",Object.assign({ref:t=>{t&&(this.inputEl=t,this.id&&t.setAttribute("id",this.id))},type:"checkbox",value:n,name:e,class:"taro-checkbox_checked",style:{color:s},checked:t,disabled:c,onChange:this.handleChange},r)),i("slot",null))}get el(){return s(this)}static get watchers(){return{id:["watchId"]}}};n.style='.taro-checkbox{display:inline-block;position:relative}.taro-checkbox_checked{display:inline-block;position:relative;top:5px;border:1px solid #d1d1d1;border-radius:3px;width:23px;height:23px;min-height:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#fff;vertical-align:0;font-size:23px;color:#1aad19}.taro-checkbox_checked:checked::before{display:inline-block;position:absolute;left:50%;top:50%;vertical-align:middle;text-decoration:inherit;text-align:center;text-transform:none;font-family:weui;font-style:normal;font-weight:normal;font-variant:normal;font-size:inherit;color:inherit;content:"\\ea08";-webkit-transform:translate(-50%, -48%) scale(0.73);transform:translate(-50%, -48%) scale(0.73);speak:none}';const c=class{constructor(i){t(this,i),this.onChange=e(this,"change",7),this.uniqueName=Date.now().toString(36),this.name=void 0}function(t){if(t.stopPropagation(),"TARO-CHECKBOX-CORE"!==t.target.tagName)return;const e=this.el.querySelectorAll("taro-checkbox-core");this.value=this.getValues(e),this.onChange.emit({value:this.value})}componentDidLoad(){this.el.querySelectorAll("taro-checkbox-core").forEach((t=>{t.setAttribute("name",this.name||this.uniqueName)})),Object.defineProperty(this.el,"value",{get:()=>{if(!this.value){const t=this.el.querySelectorAll("taro-checkbox-core");this.value=this.getValues(t)}return this.value},configurable:!0})}getValues(t){return Array.from(t).filter((t=>{const e=t.querySelector("input");return null==e?void 0:e.checked})).map((t=>t.value))}render(){return i(o,null)}get el(){return s(this)}};export{n as taro_checkbox_core,c as taro_checkbox_group_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as h}from"./p-9137dcab.js";const c=class{constructor(s){t(this,s),this.onChange=i(this,"radiochange",7),this.handleClick=t=>{t.stopPropagation(),this.disabled||this.checked||(this.checked=!0)},this.name=void 0,this.value="",this.id=void 0,this.checked=!1,this.disabled=!1,this.nativeProps={},this.isWillLoadCalled=!1}watchChecked(t){this.isWillLoadCalled&&t&&this.onChange.emit({value:this.value})}watchId(t){this.isWillLoadCalled&&t&&this.inputEl.setAttribute("id",t)}componentDidRender(){this.id&&this.el.removeAttribute("id")}componentWillLoad(){this.isWillLoadCalled=!0}render(){const{checked:t,name:i,value:h,disabled:c,nativeProps:r}=this;return s(e,{className:"weui-cells_checkbox",onClick:this.handleClick},s("input",Object.assign({ref:t=>{t&&(this.inputEl=t,this.id&&t.setAttribute("id",this.id))},type:"radio",name:i,value:h,class:"weui-check",checked:t,disabled:c,onChange:t=>t.stopPropagation()},r)),s("i",{class:"weui-icon-checked"}),s("slot",null))}get el(){return h(this)}static get watchers(){return{checked:["watchChecked"],id:["watchId"]}}},r=class{constructor(s){t(this,s),this.onChange=i(this,"change",7),this.uniqueName=Date.now().toString(36),this.name=void 0}function(t){if(t.stopPropagation(),"TARO-RADIO-CORE"!==t.target.tagName)return;const i=t.target;i.checked&&(this.el.querySelectorAll("taro-radio-core").forEach((t=>{t!==i&&(t.checked=!1)})),this.value=t.detail.value,this.onChange.emit({value:this.value}))}componentDidLoad(){this.el.querySelectorAll("taro-radio-core").forEach((t=>{t.setAttribute("name",this.name||this.uniqueName)})),Object.defineProperty(this.el,"value",{get:()=>{if(!this.value){const t=this.el.querySelectorAll("taro-radio-core");this.value=this.getValues(t)}return this.value},configurable:!0})}getValues(t){let i="";return Array.from(t).forEach((t=>{const s=t.querySelector("input");(null==s?void 0:s.checked)&&(i=s.value||"")})),i}render(){return s(e,{class:"weui-cells_radiogroup"})}get el(){return h(this)}};export{c as taro_radio_core,r as taro_radio_group_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js"],(function(e){"use strict";var t,i,r,n;return{setters:[function(e){t=e.r;i=e.c;r=e.h;n=e.g}],execute:function(){var o=e("taro_form_core",function(){function e(e){t(this,e);this.onSubmit=i(this,"submit",7);this.value={}}e.prototype.onButtonSubmit=function(e){e.stopPropagation();this.value=this.getFormValue();this.onSubmit.emit({value:this.value})};e.prototype.onButtonReset=function(e){e.stopPropagation();this.form.reset()};e.prototype.componentDidLoad=function(){var e=this;this.value=this.getFormValue();Object.defineProperty(this.el,"value",{get:function(){return e.value},configurable:true})};e.prototype.componentDidRender=function(){var e=this;if(!this.originalAppendChild){this.originalAppendChild=this.el.appendChild;this.originalInsertBefore=this.el.insertBefore;this.originalReplaceChild=this.el.replaceChild;this.originalRemoveChild=this.el.removeChild}if(!this.form){this.el.appendChild=this.originalAppendChild;this.el.insertBefore=this.originalInsertBefore;this.el.replaceChild=this.originalReplaceChild;this.el.removeChild=this.originalRemoveChild;return}this.el.appendChild=function(t){return e.form.appendChild(t)};this.el.insertBefore=function(t,i){return e.form.insertBefore(t,i)};this.el.replaceChild=function(t,i){return e.form.replaceChild(t,i)};this.el.removeChild=function(t){return e.form.removeChild(t)}};e.prototype.getFormValue=function(){var e=this.el;var t=[];var i=e.getElementsByTagName("input");for(var r=0;r<i.length;r++){t.push(i[r])}var n={};var o={};t.forEach((function(e){if(typeof e.name!=="string")return;if(e.className.indexOf("weui-switch")!==-1){n[e.name]=e.checked;return}if(e.type==="radio"){if(e.checked){o[e.name]=true;n[e.name]=e.value}else{if(!o[e.name]){n[e.name]=""}}return}if(e.type==="checkbox"){if(e.checked){if(o[e.name]){n[e.name].push(e.value)}else{o[e.name]=true;n[e.name]=[e.value]}}else{if(!o[e.name]){n[e.name]=[]}}return}n[e.name]=e.value}));var a=e.getElementsByTagName("textarea");var l=[];for(var s=0;s<a.length;s++){l.push(a[s])}l.forEach((function(e){if(typeof e.name!=="string")return;n[e.name]=e.value}));return n};e.prototype.render=function(){var e=this;return r("form",{ref:function(t){e.form=t}},r("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js"],(function(e){"use strict";var t,i,r,n,o;return{setters:[function(e){t=e.r;i=e.c;r=e.h;n=e.H;o=e.g}],execute:function(){var a=e("taro_radio_core",function(){function e(e){var r=this;t(this,e);this.onChange=i(this,"radiochange",7);this.handleClick=function(e){e.stopPropagation();if(r.disabled)return;if(!r.checked)r.checked=true};this.name=undefined;this.value="";this.id=undefined;this.checked=false;this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false}e.prototype.watchChecked=function(e){if(!this.isWillLoadCalled)return;e&&this.onChange.emit({value:this.value})};e.prototype.watchId=function(e){if(!this.isWillLoadCalled)return;if(e)this.inputEl.setAttribute("id",e)};e.prototype.componentDidRender=function(){this.id&&this.el.removeAttribute("id")};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true};e.prototype.render=function(){var e=this;var t=this,i=t.checked,o=t.name,a=t.value,u=t.disabled,c=t.nativeProps;return r(n,{className:"weui-cells_checkbox",onClick:this.handleClick},r("input",Object.assign({ref:function(t){if(!t)return;e.inputEl=t;if(e.id)t.setAttribute("id",e.id)},type:"radio",name:o,value:a,class:"weui-check",checked:i,disabled:u,onChange:function(e){return e.stopPropagation()}},c)),r("i",{class:"weui-icon-checked"}),r("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["watchChecked"],id:["watchId"]}},enumerable:false,configurable:true});return e}());var u=e("taro_radio_group_core",function(){function e(e){t(this,e);this.onChange=i(this,"change",7);this.uniqueName=Date.now().toString(36);this.name=undefined}e.prototype.function=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-RADIO-CORE")return;var t=e.target;if(t.checked){var i=this.el.querySelectorAll("taro-radio-core");i.forEach((function(e){if(e!==t){e.checked=false}}));this.value=e.detail.value;this.onChange.emit({value:this.value})}};e.prototype.componentDidLoad=function(){var e=this;var t=this.el.querySelectorAll("taro-radio-core");t.forEach((function(t){t.setAttribute("name",e.name||e.uniqueName)}));Object.defineProperty(this.el,"value",{get:function(){if(!e.value){var t=e.el.querySelectorAll("taro-radio-core");e.value=e.getValues(t)}return e.value},configurable:true})};e.prototype.getValues=function(e){var t="";Array.from(e).forEach((function(e){var i=e.querySelector("input");if(i===null||i===void 0?void 0:i.checked){t=i.value||""}}));return t};e.prototype.render=function(){return r(n,{class:"weui-cells_radiogroup"})};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,g as h}from"./p-9137dcab.js";const e=class{constructor(i){t(this,i),this.onSubmit=s(this,"submit",7),this.value={}}onButtonSubmit(t){t.stopPropagation(),this.value=this.getFormValue(),this.onSubmit.emit({value:this.value})}onButtonReset(t){t.stopPropagation(),this.form.reset()}componentDidLoad(){this.value=this.getFormValue(),Object.defineProperty(this.el,"value",{get:()=>this.value,configurable:!0})}componentDidRender(){if(this.originalAppendChild||(this.originalAppendChild=this.el.appendChild,this.originalInsertBefore=this.el.insertBefore,this.originalReplaceChild=this.el.replaceChild,this.originalRemoveChild=this.el.removeChild),!this.form)return this.el.appendChild=this.originalAppendChild,this.el.insertBefore=this.originalInsertBefore,this.el.replaceChild=this.originalReplaceChild,void(this.el.removeChild=this.originalRemoveChild);this.el.appendChild=t=>this.form.appendChild(t),this.el.insertBefore=(t,s)=>this.form.insertBefore(t,s),this.el.replaceChild=(t,s)=>this.form.replaceChild(t,s),this.el.removeChild=t=>this.form.removeChild(t)}getFormValue(){const t=this.el,s=[],i=t.getElementsByTagName("input");for(let t=0;t<i.length;t++)s.push(i[t]);const h={},e={};s.forEach((t=>{"string"==typeof t.name&&(-1===t.className.indexOf("weui-switch")?"radio"!==t.type?"checkbox"!==t.type?h[t.name]=t.value:t.checked?e[t.name]?h[t.name].push(t.value):(e[t.name]=!0,h[t.name]=[t.value]):e[t.name]||(h[t.name]=[]):t.checked?(e[t.name]=!0,h[t.name]=t.value):e[t.name]||(h[t.name]=""):h[t.name]=t.checked)}));const o=t.getElementsByTagName("textarea"),r=[];for(let t=0;t<o.length;t++)r.push(o[t]);return r.forEach((t=>{"string"==typeof t.name&&(h[t.name]=t.value)})),h}render(){return i("form",{ref:t=>{this.form=t}},i("slot",null))}get el(){return h(this)}};export{e as taro_form_core}
|