@ikas/popup-renderer 1.0.206 → 1.0.208

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{__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as n}from"mobx-react";import{ButtonActionTypeEnum as o}from"../../models/modal/step/elements/button/index.js";import{getHorizontalAlignment as r,injectFontScript as i}from"../../helpers/index.js";var l=n((function(n){var l=n.element,c=n.isStandaloneButtonComponent,a=n.onClose,d=n.disableButtonAction,s=t.useRef(null),u=l,m={display:"flex",alignItems:"center",justifyContent:r(u.horizontalAlignment),padding:"".concat(u.outerVerticalPadding,"px ").concat(u.outerHorizontalPadding,"px"),backgroundColor:u.bgColor},f={color:u.color,backgroundColor:u.buttonBgColor,fontSize:u.fontSize,fontWeight:u.fontWeight,fontFamily:i(u.fontFamily),textAlign:"center",border:"".concat(u.borderWidth,"px ").concat(u.borderStyle," ").concat(u.borderColor),borderRadius:u.borderRadius,padding:"".concat(u.verticalPadding,"px ").concat(u.horizontalPadding,"px")},p={width:"".concat(u.width,"%"),minWidth:"fit-content",cursor:"pointer"},b=t.useCallback((function(){if(s.current&&!d){var e=u.link||void 0;if(!c&&e)s.current.href=e||"",s.current.click();else switch(u.actionType){case o.NAVIGATE_TO_LINK_AND_CLOSE:s.current.href=e||"",null==a||a(!0),s.current.click();break;case o.NAVIGATE_TO_LINK:s.current.href=e||"",s.current.click();break;case o.CLOSE:null==a||a(!0)}}}),[s,s.current]);return t.createElement("div",{style:m},t.createElement("a",{onClick:b,style:p,target:u.openLinkInNewWindow?"_blank":"_self",ref:s},t.createElement("div",{dangerouslySetInnerHTML:{__html:u.text},style:e({},f)})))}));export{l as default};
1
+ import{__assign as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as n}from"mobx-react";import{ButtonActionTypeEnum as o}from"../../models/modal/step/elements/button/index.js";import{getHorizontalAlignment as r,injectFontScript as i,predefinedHtmlTagStyles as l}from"../../helpers/index.js";var c=n((function(n){var c=n.element,a=n.isStandaloneButtonComponent,d=n.onClose,s=n.disableButtonAction,u=t.useRef(null),m=c,f={display:"flex",alignItems:"center",justifyContent:r(m.horizontalAlignment),padding:"".concat(m.outerVerticalPadding,"px ").concat(m.outerHorizontalPadding,"px"),backgroundColor:m.bgColor},p=e({color:m.color,backgroundColor:m.buttonBgColor,fontSize:m.fontSize,fontWeight:m.fontWeight,fontFamily:i(m.fontFamily),textAlign:"center",border:"".concat(m.borderWidth,"px ").concat(m.borderStyle," ").concat(m.borderColor),borderRadius:m.borderRadius,padding:"".concat(m.verticalPadding,"px ").concat(m.horizontalPadding,"px")},l),b={width:"".concat(m.width,"%"),minWidth:"fit-content",cursor:"pointer"},g=t.useCallback((function(){if(u.current&&!s){var e=m.link||void 0;if(!a&&e)u.current.href=e||"",u.current.click();else switch(m.actionType){case o.NAVIGATE_TO_LINK_AND_CLOSE:u.current.href=e||"",null==d||d(!0),u.current.click();break;case o.NAVIGATE_TO_LINK:u.current.href=e||"",u.current.click();break;case o.CLOSE:null==d||d(!0)}}}),[u,u.current]);return t.createElement("div",{style:f},t.createElement("a",{onClick:g,style:b,target:m.openLinkInNewWindow?"_blank":"_self",ref:u},t.createElement("div",{dangerouslySetInnerHTML:{__html:m.text},style:e({},p)})))}));export{c as default};
@@ -1 +1 @@
1
- import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as n}from"../../../helpers/index.js";var o=t((function(t){var o=t.checkboxItem,r=t.formInputSettings,c=e.useMemo((function(){return"checkbox-".concat(n())}),[o]);e.useEffect((function(){o.showInCheckedStatus?o.isChecked=!0:o.isChecked=!1}),[o.showInCheckedStatus]);var i=o.requiredToBeChecked,a={width:"16px",height:"16px",cursor:"pointer",position:"relative",top:3,appearance:"none",border:"1px solid ".concat(r.borderColor),borderRadius:"4px",flex:"0 0 16px"},s=e.useCallback((function(){var e=/<pre[^>]*>([\s\S]*?)<\/pre>/.exec(o.text);return e?e[1]:o.text}),[o.text]);return e.createElement("div",{style:{width:"100%",display:"flex",gap:6,flexDirection:"column"}},e.createElement("div",{style:{width:"100%",display:"flex",gap:8,flexDirection:"row",alignItems:"baseline",wordBreak:"break-word"}},e.createElement("input",{style:a,type:"checkbox",checked:o.isChecked,onChange:function(){o.isChecked=!o.isChecked,i&&i.hasError&&o.isChecked&&(i.hasError=!1)},id:c}),e.createElement("div",{style:{color:r.checkboxTextColor},dangerouslySetInnerHTML:{__html:s()}})),!!i&&i.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i.validationErrorMessage),e.createElement("style",null,"\n #".concat(c," {\n position: relative; /* so pseudo-element is positioned correctly */\n display: inline-block; /* ensures ::after layering works as expected */\n }\n\n #").concat(c,":checked {\n background-color: ").concat(r.borderColor," !important;\n }\n\n /* Draw a checkmark using ::after */\n #").concat(c,'::after {\n content: "";\n position: absolute;\n top: 2px; /* tweak to position your checkmark within the box */\n left: 5px; /* tweak as needed */\n width: 4px;\n height: 8px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n }\n\n #').concat(c,":checked::after {\n opacity: 1;\n }\n ")))}));export{o as CheckboxItemView};
1
+ import{__assign as e}from'./../../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as o}from"mobx-react";import{generateRandomId as n,predefinedHtmlTagStyles as r}from"../../../helpers/index.js";var i=o((function(o){var i=o.checkboxItem,c=o.formInputSettings,a=t.useMemo((function(){return"checkbox-".concat(n())}),[i]);t.useEffect((function(){i.showInCheckedStatus?i.isChecked=!0:i.isChecked=!1}),[i.showInCheckedStatus]);var s=i.requiredToBeChecked,l={width:"16px",height:"16px",cursor:"pointer",position:"relative",top:3,appearance:"none",border:"1px solid ".concat(c.borderColor),borderRadius:"4px",flex:"0 0 16px"},d=t.useCallback((function(){var e=/<pre[^>]*>([\s\S]*?)<\/pre>/.exec(i.text);return e?e[1]:i.text}),[i.text]);return t.createElement("div",{style:{width:"100%",display:"flex",gap:6,flexDirection:"column"}},t.createElement("div",{style:{width:"100%",display:"flex",gap:8,flexDirection:"row",alignItems:"baseline",wordBreak:"break-word"}},t.createElement("input",{style:l,type:"checkbox",checked:i.isChecked,onChange:function(){i.isChecked=!i.isChecked,s&&s.hasError&&i.isChecked&&(s.hasError=!1)},id:a}),t.createElement("div",{style:e({color:c.checkboxTextColor},r),dangerouslySetInnerHTML:{__html:d()}})),!!s&&s.hasError&&t.createElement("div",{style:{color:"red",fontSize:"12px"}},s.validationErrorMessage),t.createElement("style",null,"\n #".concat(a," {\n position: relative; /* so pseudo-element is positioned correctly */\n display: inline-block; /* ensures ::after layering works as expected */\n }\n\n #").concat(a,":checked {\n background-color: ").concat(c.borderColor," !important;\n }\n\n /* Draw a checkmark using ::after */\n #").concat(a,'::after {\n content: "";\n position: absolute;\n top: 2px; /* tweak to position your checkmark within the box */\n left: 5px; /* tweak as needed */\n width: 4px;\n height: 8px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n }\n\n #').concat(a,":checked::after {\n opacity: 1;\n }\n ")))}));export{i as CheckboxItemView};
@@ -1 +1 @@
1
- import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as o}from"../../../helpers/index.js";import{PhoneNumberInput as r}from"../phone-input-item-view/index.js";var n=t((function(t){var n=e.useState(!1),l=n[0],a=n[1];e.useRef(null);var i=e.useMemo((function(){return o()}),[]),c=t.placeholder,s=t.isRequired,u=t.inputLabel;t.updateCurrentInfo;var p=t.validationErrorMessage,d=t.formInputSettings,m=t.value,f=t.onValueChange,x=t.isPhoneInput,h=t.sfProps,v={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(l?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"},g=function(e){f(e),s&&s.hasError&&e.length>0&&(s.hasError=!1)},E=s?((null==c?void 0:c.text)||"")+" *":(null==c?void 0:c.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(u||s)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},u&&e.createElement("label",{style:{color:d.titleColor,fontSize:"14px"}},u.text)),s&&s.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},s.validationErrorMessage),!!p&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},p)),x?e.createElement(r,{onChange:function(e){return g(e)},placeholder:E,value:m||"",inputStyle:v,sfProps:h,className:"ikas-form-input-item-view-".concat(i),setIsFocused:a}):e.createElement("input",{type:"text",placeholder:E,value:m||"",onChange:function(e){return g(e.target.value)},style:v,onFocus:function(){return a(!0)},onBlur:function(){return a(!1)},className:"ikas-form-input-item-view-".concat(i)}),e.createElement("style",null,"\n .ikas-form-input-item-view-".concat(i,"::placeholder {\n color: ").concat(d.placeholderColor," !important;\n }\n ")))}));export{n as default};
1
+ import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as o}from"../../../helpers/index.js";import{PhoneNumberInput as r}from"../phone-input-item-view/index.js";var n=t((function(t){var n=e.useState(!1),l=n[0],a=n[1];e.useRef(null);var i=e.useMemo((function(){return o()}),[]),c=t.placeholder,s=t.isRequired,u=t.inputLabel;t.updateCurrentInfo;var p=t.validationErrorMessage,d=t.formInputSettings,m=t.value,f=t.onValueChange,x=t.isPhoneInput,h=t.sfProps,v={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(l?d.focusBorderColor:d.borderColor),color:"".concat(d.textColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"},g=function(e){f(e),s&&s.hasError&&e.length>0&&(s.hasError=!1)},E=s?((null==c?void 0:c.text)||"")+" *":(null==c?void 0:c.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(u||s)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},u&&e.createElement("label",{style:{color:d.titleColor,fontSize:"14px"}},u.text)),s&&s.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},s.validationErrorMessage),!!p&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},p)),x?e.createElement(r,{onChange:function(e){return g(e)},placeholder:E,value:m||"",inputStyle:v,sfProps:h,className:"ikas-form-input-item-view-".concat(i),setIsFocused:a}):e.createElement("input",{type:"text",placeholder:E,value:m||"",onChange:function(e){return g(e.target.value)},style:v,onFocus:function(){return a(!0)},onBlur:function(){return a(!1)},className:"ikas-form-input-item-view-".concat(i)}),e.createElement("style",null,"\n // change written input text color\n .ikas-form-input-item-view-".concat(i," {\n color: ").concat(d.textColor," !important;\n }\n\n .ikas-form-input-item-view-").concat(i,"::placeholder {\n color: ").concat(d.placeholderColor," !important;\n }\n ")))}));export{n as default};
@@ -1 +1 @@
1
- import{__assign as o}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as e}from"mobx-react";import{injectFontScript as r}from"../../helpers/index.js";var n=e((function(e){var n=e.element,a=n,i={border:"".concat(a.borderWidth,"px ").concat(a.borderStyle," ").concat(a.borderColor),borderRadius:a.borderRadius,padding:"".concat(a.outerVerticalPadding,"px ").concat(a.outerHorizontalPadding,"px")},d={color:a.color,fontSize:a.fontSize,fontWeight:a.fontWeight,fontFamily:r(a.fontFamily),textAlign:a.horizontalAlignment,padding:"".concat(a.verticalPadding,"px ").concat(a.horizontalPadding,"px"),backgroundColor:a.bgColor};return t.createElement("div",{style:i},t.createElement("div",{dangerouslySetInnerHTML:{__html:n.text},style:o({},d)}))}));export{n as default};
1
+ import{__assign as o}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as e}from"mobx-react";import{injectFontScript as r,predefinedHtmlTagStyles as n}from"../../helpers/index.js";var a=e((function(e){var a=e.element,i=a,d={border:"".concat(i.borderWidth,"px ").concat(i.borderStyle," ").concat(i.borderColor),borderRadius:i.borderRadius,padding:"".concat(i.outerVerticalPadding,"px ").concat(i.outerHorizontalPadding,"px")},l=o({color:i.color,fontSize:i.fontSize,fontWeight:i.fontWeight,fontFamily:r(i.fontFamily),textAlign:i.horizontalAlignment,padding:"".concat(i.verticalPadding,"px ").concat(i.horizontalPadding,"px"),backgroundColor:i.bgColor},n);return t.createElement("div",{style:d},t.createElement("div",{dangerouslySetInnerHTML:{__html:a.text},style:o({},l)}))}));export{a as default};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Popup } from "../models";
2
3
  import { ComponentHorizontalAlignmentEnum, IkasPopupRendererFontFamily } from "../models/modal/step/elements/base";
3
4
  import { PopupVariantPair } from "../models/modal/step/elements/product";
@@ -10,3 +11,4 @@ export declare const injectFontScript: (fontFamily: IkasPopupRendererFontFamily)
10
11
  export declare const validateEmail: (str: string) => boolean;
11
12
  export declare const validatePhoneNumber: (phone: string, countryCode?: string) => boolean;
12
13
  export declare const generateRandomId: (text?: string) => string;
14
+ export declare const predefinedHtmlTagStyles: import("react").CSSProperties;
@@ -1 +1 @@
1
- import{__spreadArray as e}from'./../../ext/tslib/tslib.es6.mjs.js';import'./../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{isValidPhoneNumber as t}from'./../../ext/libphonenumber-js/min/exports/isValidPhoneNumber.js';import'./../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../ext/libphonenumber-js/min/exports/AsYouType.js';import'./../../ext/libphonenumber-js/min/exports/Metadata.js';import'./../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';import{PopupElementTypeEnum as n,ComponentHorizontalAlignmentEnum as r}from"../models/modal/step/elements/base/index.js";var o=function(t){var r=[];return t.modal.steps.forEach((function(t){t.elements.forEach((function(t){if(t.type===n.PRODUCT_LIST){var o=t.variantPairs;o&&(r=e(e([],r,!0),o,!0))}}))})),{variantPairs:r}},a=function(e){var t="";switch(e){case r.LEFT:t="flex-start";break;case r.CENTER:t="center";break;case r.RIGHT:t="flex-end"}return t},s=function(e){if(e.name){var t=e.name.replace(/ /g,"+"),n="";if(e.variants){n+=":";var r=e.variants.some((function(e){return"italic"===e}));if(r&&(n+="ital,"),n+="wght@",r){var o=new RegExp("italic","i");n+=e.variants.reduce((function(e,t){return o.test(t)?e:e+"0,".concat(t.replace("regular","400"),";")}),""),n+=e.variants.reduce((function(e,t){return o.test(t)?e+"1,".concat("italic"===t?"400":t.replace("italic",""),";"):e}),"")}else n+=e.variants.reduce((function(e,t){return e+"".concat(t.replace("regular","400"),";")}),"");n=n.substring(0,n.length-1),n+="&display=swap"}return"https://fonts.googleapis.com/css2?family=".concat(t).concat(n)}},i=function(e){var t="'".concat(e.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif');if(document.getElementById("ikas-popup-font-".concat(e.name)))return t;var n=s(e);if(n){var r=document.createElement("link");return r.setAttribute("id","ikas-popup-font-".concat(e.name)),r.setAttribute("rel","stylesheet"),r.setAttribute("href",n),document.getElementsByTagName("head")[0].appendChild(r),t}},u=function(e){return!(e.length>320)&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},m=function(e,n){return t(e,n?n.toUpperCase():"TR")},l=function(e){var t;return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)+(null!==(t=null==e?void 0:e.length)&&void 0!==t?t:0)};export{l as generateRandomId,s as getGoogleFontHref,a as getHorizontalAlignment,o as getPopupDynamicData,i as injectFontScript,u as validateEmail,m as validatePhoneNumber};
1
+ import{__spreadArray as e}from'./../../ext/tslib/tslib.es6.mjs.js';import'./../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{isValidPhoneNumber as t}from'./../../ext/libphonenumber-js/min/exports/isValidPhoneNumber.js';import'./../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../ext/libphonenumber-js/min/exports/AsYouType.js';import'./../../ext/libphonenumber-js/min/exports/Metadata.js';import'./../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';import{PopupElementTypeEnum as n,ComponentHorizontalAlignmentEnum as i}from"../models/modal/step/elements/base/index.js";var r=function(t){var i=[];return t.modal.steps.forEach((function(t){t.elements.forEach((function(t){if(t.type===n.PRODUCT_LIST){var r=t.variantPairs;r&&(i=e(e([],i,!0),r,!0))}}))})),{variantPairs:i}},o=function(e){var t="";switch(e){case i.LEFT:t="flex-start";break;case i.CENTER:t="center";break;case i.RIGHT:t="flex-end"}return t},a=function(e){if(e.name){var t=e.name.replace(/ /g,"+"),n="";if(e.variants){n+=":";var i=e.variants.some((function(e){return"italic"===e}));if(i&&(n+="ital,"),n+="wght@",i){var r=new RegExp("italic","i");n+=e.variants.reduce((function(e,t){return r.test(t)?e:e+"0,".concat(t.replace("regular","400"),";")}),""),n+=e.variants.reduce((function(e,t){return r.test(t)?e+"1,".concat("italic"===t?"400":t.replace("italic",""),";"):e}),"")}else n+=e.variants.reduce((function(e,t){return e+"".concat(t.replace("regular","400"),";")}),"");n=n.substring(0,n.length-1),n+="&display=swap"}return"https://fonts.googleapis.com/css2?family=".concat(t).concat(n)}},s=function(e){var t="'".concat(e.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif');if(document.getElementById("ikas-popup-font-".concat(e.name)))return t;var n=a(e);if(n){var i=document.createElement("link");return i.setAttribute("id","ikas-popup-font-".concat(e.name)),i.setAttribute("rel","stylesheet"),i.setAttribute("href",n),document.getElementsByTagName("head")[0].appendChild(i),t}},u=function(e){return!(e.length>320)&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},m=function(e,n){return t(e,n?n.toUpperCase():"TR")},h=function(e){var t;return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)+(null!==(t=null==e?void 0:e.length)&&void 0!==t?t:0)},l={h1:{fontSize:"inherit",fontWeight:"inherit"},h2:{fontSize:"inherit",fontWeight:"inherit"},h3:{fontSize:"inherit",fontWeight:"inherit"},h4:{fontSize:"inherit",fontWeight:"inherit"},h5:{fontSize:"inherit",fontWeight:"inherit"},h6:{fontSize:"inherit",fontWeight:"inherit"},p:{fontSize:"inherit",fontWeight:"inherit"},blockquote:{fontSize:"inherit",fontWeight:"inherit"},code:{fontSize:"inherit",fontWeight:"inherit"},pre:{fontSize:"inherit",fontWeight:"inherit"}};export{h as generateRandomId,a as getGoogleFontHref,o as getHorizontalAlignment,r as getPopupDynamicData,s as injectFontScript,l as predefinedHtmlTagStyles,u as validateEmail,m as validatePhoneNumber};
@@ -8,6 +8,7 @@ export declare class FormSettings {
8
8
  }
9
9
  export declare class FormInputSettings {
10
10
  bgColor: string;
11
+ textColor: string;
11
12
  borderWidth: number;
12
13
  borderRadius: number;
13
14
  borderColor: string | null;
@@ -1 +1 @@
1
- import{makeObservable as o,observable as r}from"mobx";import{IkasPopupRendererFontFamily as e}from"../../base/index.js";var t=function(t){var l,d;void 0===t&&(t={}),this.formInputSettings=t.formInputSettings?new i(t.formInputSettings):new i({borderColor:"#E3E8EF",focusBorderColor:"#000000"}),this.gapBetweenItems=null!==(l=t.gapBetweenItems)&&void 0!==l?l:12,this.fontFamily=new e(t.fontFamily),this.fontSize=null!==(d=t.fontSize)&&void 0!==d?d:14,o(this,{formInputSettings:r,gapBetweenItems:r,fontFamily:r,fontSize:r})},i=function(e){var t,i,l;void 0===e&&(e={}),this.bgColor=e.bgColor||"",this.borderWidth=null!==(t=e.borderWidth)&&void 0!==t?t:1,this.borderRadius=null!==(i=e.borderRadius)&&void 0!==i?i:4,this.borderColor=e.borderColor||"",this.focusBorderColor=e.focusBorderColor||"",this.height=null!==(l=e.height)&&void 0!==l?l:40,this.placeholderColor=e.placeholderColor?e.placeholderColor:"#697586",this.titleColor=e.titleColor?e.titleColor:"#121926",this.checkboxTextColor=e.checkboxTextColor?e.checkboxTextColor:"#121926",o(this,{bgColor:r,borderWidth:r,borderRadius:r,borderColor:r,focusBorderColor:r,height:r,placeholderColor:r,titleColor:r,checkboxTextColor:r})};export{i as FormInputSettings,t as FormSettings};
1
+ import{makeObservable as o,observable as r}from"mobx";import{IkasPopupRendererFontFamily as t}from"../../base/index.js";var e=function(e){var l,h;void 0===e&&(e={}),this.formInputSettings=e.formInputSettings?new i(e.formInputSettings):new i({borderColor:"#E3E8EF",focusBorderColor:"#000000"}),this.gapBetweenItems=null!==(l=e.gapBetweenItems)&&void 0!==l?l:12,this.fontFamily=new t(e.fontFamily),this.fontSize=null!==(h=e.fontSize)&&void 0!==h?h:14,o(this,{formInputSettings:r,gapBetweenItems:r,fontFamily:r,fontSize:r})},i=function(t){var e,i,l;void 0===t&&(t={}),this.bgColor=t.bgColor||"",this.borderWidth=null!==(e=t.borderWidth)&&void 0!==e?e:1,this.borderRadius=null!==(i=t.borderRadius)&&void 0!==i?i:4,this.borderColor=t.borderColor||"",this.focusBorderColor=t.focusBorderColor||"",this.height=null!==(l=t.height)&&void 0!==l?l:40,this.textColor=t.textColor||"#121926",this.placeholderColor=t.placeholderColor?t.placeholderColor:"#697586",this.titleColor=t.titleColor?t.titleColor:"#121926",this.checkboxTextColor=t.checkboxTextColor?t.checkboxTextColor:"#121926",o(this,{bgColor:r,borderWidth:r,borderRadius:r,borderColor:r,focusBorderColor:r,height:r,placeholderColor:r,titleColor:r,checkboxTextColor:r,textColor:r})};export{i as FormInputSettings,e as FormSettings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.206",
3
+ "version": "1.0.208",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",