@ikas/popup-renderer 1.0.204 → 1.0.205

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";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: 3px;\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 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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "1.0.204",
3
+ "version": "1.0.205",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",