@ikas/popup-renderer 1.0.21 → 1.0.22

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.
@@ -1 +1 @@
1
- import e from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import{observer as r}from'./../../../../ext/mobx-react-lite/es/observer.js';var t=r((function(r){var t,o=e.useState(!1),n=o[0],i=o[1],l=r.genderFormItem,a=r.formInputSettings;r.onValueChange;var d={width:"100%",backgroundColor:a.bgColor,border:"".concat(a.borderWidth,"px solid ").concat(n?a.focusBorderColor:a.borderColor),borderRadius:"".concat(a.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(a.height,"px"),appearance:"none",backgroundImage:"url(\"data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round' className=%7B'icon ' + (className %7C%7C '')%7D %3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right",backgroundSize:"32px"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(l.inputLabel||l.required)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},l.inputLabel&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},l.inputLabel.text),l.required&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),l.required&&l.required.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},l.required.validationErrorMessage)),e.createElement("select",{value:(null===(t=l.genders.find((function(e){return e.isSelected})))||void 0===t?void 0:t.type)||"",onChange:function(e){return r=e.target.value,l.genders.forEach((function(e){e.isSelected=e.type===r})),void(l.required&&l.required.hasError&&(l.required.hasError=!1));var r},style:d,onFocus:function(){return i(!0)},onBlur:function(){return i(!1)},"aria-placeholder":l.placeholder},l.genders.filter((function(e){return!!e.label})).map((function(r){return e.createElement("option",{key:r.type,value:r.type},r.label)}))))}));export{t as default};
1
+ import e from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import{observer as r}from'./../../../../ext/mobx-react-lite/es/observer.js';var t=r((function(r){var t,o=e.useState(!1),n=o[0],i=o[1],l=r.genderFormItem,a=r.formInputSettings;r.onValueChange;var d={width:"100%",backgroundColor:a.bgColor,border:"".concat(a.borderWidth,"px solid ").concat(n?a.focusBorderColor:a.borderColor),borderRadius:"".concat(a.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(a.height,"px"),appearance:"none",backgroundImage:"url(\"data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round' %3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right",backgroundSize:"32px"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(l.inputLabel||l.required)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},l.inputLabel&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},l.inputLabel.text),l.required&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),l.required&&l.required.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},l.required.validationErrorMessage)),e.createElement("select",{value:(null===(t=l.genders.find((function(e){return e.isSelected})))||void 0===t?void 0:t.type)||void 0,onChange:function(e){return r=e.target.value,l.genders.forEach((function(e){e.isSelected=e.type===r})),void(l.required&&l.required.hasError&&(l.required.hasError=!1));var r},style:d,onFocus:function(){return i(!0)},onBlur:function(){return i(!1)},"aria-placeholder":l.placeholder},l.genders.filter((function(e){return!!e.label})).map((function(r){return e.createElement("option",{key:r.type,value:r.type},r.label)}))))}));export{t as default};
@@ -1 +1 @@
1
- import{makeObservable as e,observable as t}from"mobx";import{FormItemTypeEnum as r,InputLabel as i,RequiredInput as n}from"../index.js";var l,u=function(l){void 0===l&&(l={}),this.type=r.CUSTOMER_GENDER,this.placeholder=l.placeholder||"Enter your gender",this.inputLabel=l.inputLabel?new i(l.inputLabel):null,this.required=l.required?new n(l.required):null,this.updateCurrentInfo=l.updateCurrentInfo||!1,this.genders=l.genders?l.genders.map((function(e){return new d(e)})):[],e(this,{type:t,placeholder:t,inputLabel:t,required:t,updateCurrentInfo:t,genders:t})},d=function(r){void 0===r&&(r={}),this.type=r.type||l.FEMALE,this.label=r.label||"Other",this.isSelected=r.isSelected||!1,e(this,{type:t,label:t,isSelected:t})};!function(e){e.FEMALE="FEMALE",e.MALE="MALE",e.OTHER="OTHER"}(l||(l={}));export{u as CustomerGenderFormItem,l as CustomerGenderTypeEnum,d as GenderType};
1
+ import{makeObservable as e,observable as t}from"mobx";import{FormItemTypeEnum as n,InputLabel as r,RequiredInput as i}from"../index.js";var l,u=function(l){void 0===l&&(l={}),this.type=n.CUSTOMER_GENDER,this.placeholder=l.placeholder||"Enter your gender",this.inputLabel=l.inputLabel?new r(l.inputLabel):null,this.required=l.required?new i(l.required):null,this.updateCurrentInfo=l.updateCurrentInfo||!1,this.genders=l.genders?l.genders.map((function(e){return new d(e)})):[],e(this,{type:t,placeholder:t,inputLabel:t,required:t,updateCurrentInfo:t,genders:t})},d=function(n){void 0===n&&(n={}),this.type=n.type||l.FEMALE,this.label=n.label||null,this.isSelected=n.isSelected||!1,e(this,{type:t,label:t,isSelected:t})};!function(e){e.FEMALE="FEMALE",e.MALE="MALE",e.OTHER="OTHER"}(l||(l={}));export{u as CustomerGenderFormItem,l as CustomerGenderTypeEnum,d as GenderType};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",