@ikas/popup-renderer 1.0.193 → 1.0.195

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{observer as t}from"mobx-react";var r=t((function(t){var r=t.checkboxItem,o=t.formInputSettings;e.useEffect((function(){r.showInCheckedStatus?r.isChecked=!0:r.isChecked=!1}),[r.showInCheckedStatus]);var i=r.requiredToBeChecked,c=e.useCallback((function(){var e=/<pre[^>]*>([\s\S]*?)<\/pre>/.exec(r.text);return e?e[1]:r.text}),[r.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:{width:"16px",height:"16px",cursor:"pointer",position:"relative",top:3},type:"checkbox",checked:r.isChecked,onChange:function(){r.isChecked=!r.isChecked,i&&i.hasError&&r.isChecked&&(i.hasError=!1)}}),e.createElement("div",{style:{color:o.checkboxTextColor},dangerouslySetInnerHTML:{__html:c()}})),!!i&&i.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i.validationErrorMessage))}));export{r as CheckboxItemView};
1
+ import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as r}from"../../../helpers/index.js";var o=t((function(t){var o=t.checkboxItem,c=t.formInputSettings,n="checkbox-".concat(r());e.useEffect((function(){o.showInCheckedStatus?o.isChecked=!0:o.isChecked=!1}),[o.showInCheckedStatus]);var i=o.requiredToBeChecked,a=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:{width:"16px",height:"16px",cursor:"pointer",position:"relative",top:3},type:"checkbox",checked:o.isChecked,onChange:function(){o.isChecked=!o.isChecked,i&&i.hasError&&o.isChecked&&(i.hasError=!1)},id:n}),e.createElement("style",null,"\n #".concat(n,' input[type="checkbox"] {\n border-color: ').concat(c.borderColor,";\n }\n ")),e.createElement("div",{style:{color:c.checkboxTextColor},dangerouslySetInnerHTML:{__html:a()}})),!!i&&i.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i.validationErrorMessage))}));export{o as CheckboxItemView};
@@ -1 +1 @@
1
- import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as r}from"../../../helpers/index.js";var o=t((function(t){var o=e.useState(!1),n=o[0],l=o[1];e.useRef(null);var a=e.useMemo((function(){return r()}),[]),i=t.placeholder,c=t.isRequired,u=t.inputLabel;t.updateCurrentInfo;var d=t.validationErrorMessage,s=t.formInputSettings,p=t.value,m=t.onValueChange,f={width:"100%",backgroundColor:s.bgColor?"".concat(s.bgColor):"transparent",border:"".concat(s.borderWidth,"px solid ").concat(n?s.focusBorderColor:s.borderColor),borderRadius:"".concat(s.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(s.height,"px"),outline:"none"},x=c?((null==i?void 0:i.text)||"")+" *":(null==i?void 0:i.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(u||c)&&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:s.titleColor,fontSize:"14px"}},u.text)),c&&c.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c.validationErrorMessage),!!d&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},d)),e.createElement("input",{type:"text",placeholder:x,value:p||"",onChange:function(e){return function(e){m(e),c&&c.hasError&&e.length>0&&(c.hasError=!1)}(e.target.value)},style:f,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},className:"ikas-form-input-item-view-".concat(a)}),e.createElement("style",null,"\n .ikas-form-input-item-view-".concat(a," {\n ::placeholder {\n color: ").concat(s.placeholderColor,";\n }\n } \n ")))}));export{o as default};
1
+ import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as r}from"../../../helpers/index.js";var o=t((function(t){var o=e.useState(!1),n=o[0],l=o[1];e.useRef(null);var a=e.useMemo((function(){return r()}),[]),i=t.placeholder,c=t.isRequired,u=t.inputLabel;t.updateCurrentInfo;var d=t.validationErrorMessage,s=t.formInputSettings,p=t.value,m=t.onValueChange,f={width:"100%",backgroundColor:s.bgColor?"".concat(s.bgColor):"transparent",border:"".concat(s.borderWidth,"px solid ").concat(n?s.focusBorderColor:s.borderColor),borderRadius:"".concat(s.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(s.height,"px"),outline:"none"},x=c?((null==i?void 0:i.text)||"")+" *":(null==i?void 0:i.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(u||c)&&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:s.titleColor,fontSize:"14px"}},u.text)),c&&c.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c.validationErrorMessage),!!d&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},d)),e.createElement("input",{type:"text",placeholder:x,value:p||"",onChange:function(e){return function(e){m(e),c&&c.hasError&&e.length>0&&(c.hasError=!1)}(e.target.value)},style:f,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},className:"ikas-form-input-item-view-".concat(a)}),e.createElement("style",null,"\n .ikas-form-input-item-view-".concat(a,"::placeholder {\n color: ").concat(s.placeholderColor,";\n }\n ")))}));export{o as default};
@@ -13,8 +13,8 @@ export declare class FormInputSettings {
13
13
  borderColor: string | null;
14
14
  focusBorderColor: string | null;
15
15
  height: number;
16
- placeholderColor: string;
17
- titleColor: string;
18
- checkboxTextColor: string;
16
+ placeholderColor?: string;
17
+ titleColor?: string;
18
+ checkboxTextColor?: string;
19
19
  constructor(data?: Partial<FormInputSettings>);
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.193",
3
+ "version": "1.0.195",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",