monica-alexandria 3.9.7 → 3.9.8

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/index.es.js CHANGED
@@ -835,7 +835,7 @@ import e,{useState as t,createContext as n,useContext as r,useEffect as a}from"r
835
835
  h5{
836
836
  padding: var(--smallPads);
837
837
  }
838
- `,Ct=n=>{let r={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:n.fileKeys},i=n.file;const[o,c]=t({query:"",file:i,notfoundmessage:!1,defaultValue:n.defaultValue}),[l,u]=t(!1),[s,h]=t(0),[f,m]=t(n.list),g=e=>{n.onSuggestions(e),c({...o,query:"",defaultValue:"string"==typeof e?e:e[n.fileKeys]})},p=e=>{"ArrowUp"==e.key&&(e.preventDefault(),h(0===s?l.length-1:s-1)),"ArrowDown"==e.key&&(e.preventDefault(),s===l.length-1?h(0):h(s+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),g("string"==typeof l[s]?l[s]:l[s][n.fileKeys]))};return a((()=>{r.minMatchCharLength=n.minMatchCharacters?n.minMatchCharacters:1;const e=new Et(i,r);let t=o.query?e.search(o.query):i;t=t.slice(0,n.size),u(t)}),[o]),a((()=>{n.getInput&&l?.length>0?n.getInput(l[0]?.item):n.getSuggestions&&l?.length>0&&o.query.length?n.getSuggestions(l):n.getSuggestions&&!o.query.length&&n.getSuggestions([])}),[l]),e.createElement(xt,null,e.createElement(bt,{id:"elasticSearch",autoComplete:"off",type:"text",value:n.value,placeholder:n.placeholder,onChange:e=>{const{target:t={}}=e,{value:r=""}=t;let a=wt.toGreek(r);c({...o,query:n.sanitize?a:r})},defaultValue:o.defaultValue,onKeyPress:e=>p(e),onKeyDown:e=>p(e),list:n.list}),e.createElement(kt,null,n.placeholder),n.required?e.createElement(J,{className:"ValidatorRequired"},e.createElement(d,{Icon:"Asterisk"})):null,n.list?e.createElement(b,{size:"small",text:n.addText,iconLeft:"Add",className:"FormAddButton",onClick:()=>(e=>{let t=JSON.parse(JSON.stringify(n.list));t.push(e),n.updateItemList(t),m(t)})(n.value)}):null,o.query&&l?e.createElement(Mt,null,l.slice(0,6).map(((t,r)=>e.createElement("li",{className:r===s%l.length?"ElasticSelected":"",key:r,onClick:()=>g(t?.item?t.item[n.fileKeys]:t[n.fileKeys])},e.createElement("p",null,t?.item?t.item[n.fileKeys]:t[n.fileKeys]))))):null,n.list?e.createElement(Lt,null,e.createElement("h5",null,n.listItemTitle),f.map(((t,r)=>e.createElement("li",{key:r},e.createElement(d,{Icon:n.icon_ListItem}),e.createElement("h6",null,t),e.createElement(A,{variant_Size:"small",icon_Left:"Delete",onClick:()=>(e=>{let t=JSON.parse(JSON.stringify(n.list));t.splice(e,1),n.updateItemList(t),m(t)})(r)}))))):null)};
838
+ `,Ct=n=>{let r={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:n.fileKeys},i=n.file;const[o,c]=t({query:"",file:i,notfoundmessage:!1,defaultValue:n.defaultValue}),[l,u]=t(!1),[s,h]=t(0),[f,m]=t(n.list),g=e=>{n.onSuggestions(e),c({...o,query:"",defaultValue:"string"==typeof e?e:e[n.returnKey]})},p=e=>{"ArrowUp"==e.key&&(e.preventDefault(),h(0===s?l.length-1:s-1)),"ArrowDown"==e.key&&(e.preventDefault(),s===l.length-1?h(0):h(s+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),g("string"==typeof l[s]?l[s]:l[s][n.returnKey]))};return a((()=>{r.minMatchCharLength=n.minMatchCharacters?n.minMatchCharacters:1;const e=new Et(i,r);let t=o.query?e.search(o.query):i;t=t.slice(0,n.size),u(t)}),[o]),a((()=>{n.getInput&&l?.length>0?n.getInput(l[0]?.item):n.getSuggestions&&l?.length>0&&o.query.length?n.getSuggestions(l):n.getSuggestions&&!o.query.length&&n.getSuggestions([])}),[l]),e.createElement(xt,null,e.createElement(bt,{id:"elasticSearch",autoComplete:"off",type:"text",value:n.value,placeholder:n.placeholder,onChange:e=>{const{target:t={}}=e,{value:r=""}=t;let a=wt.toGreek(r);c({...o,query:n.sanitize?a:r})},defaultValue:o.defaultValue,onKeyPress:e=>p(e),onKeyDown:e=>p(e),list:n.list}),e.createElement(kt,null,n.placeholder),n.required?e.createElement(J,{className:"ValidatorRequired"},e.createElement(d,{Icon:"Asterisk"})):null,n.list?e.createElement(b,{size:"small",text:n.addText,iconLeft:"Add",className:"FormAddButton",onClick:()=>(e=>{let t=JSON.parse(JSON.stringify(n.list));t.push(e),n.updateItemList(t),m(t)})(n.value)}):null,o.query&&l?e.createElement(Mt,null,l.slice(0,6).map(((t,r)=>e.createElement("li",{className:r===s%l.length?"ElasticSelected":"",key:r,onClick:()=>g(t?.item?t.item[n.returnKey]:t[n.returnKey])},e.createElement("p",null,t?.item?t.item[n.returnKey]:t[n.returnKey]))))):null,n.list?e.createElement(Lt,null,e.createElement("h5",null,n.listItemTitle),f.map(((t,r)=>e.createElement("li",{key:r},e.createElement(d,{Icon:n.icon_ListItem}),e.createElement("h6",null,t),e.createElement(A,{variant_Size:"small",icon_Left:"Delete",onClick:()=>(e=>{let t=JSON.parse(JSON.stringify(n.list));t.splice(e,1),n.updateItemList(t),m(t)})(r)}))))):null)};
839
839
  /**
840
840
  * @license
841
841
  * Lodash <https://lodash.com/>
package/dist/index.js CHANGED
@@ -1717,4 +1717,4 @@
1717
1717
  display: grid;
1718
1718
  grid-template-columns: 1fr 1fr;
1719
1719
  grid-gap: 2rem;
1720
- `;exports.Builder_=e=>a.default.createElement(G,{noPads:e.noPads},a.default.createElement(ce,{last:e.last,key:e.key},e.title?a.default.createElement("h4",null,e.title):null,e.children)),exports.Card=k,exports.CardsForty=cn,exports.CardsFull=ln,exports.CardsSixty=un,exports.CardsTools=on,exports.Checkbox_=e=>a.default.createElement(ue,{className:e.className,key:e.key,onClick:e.onClick},e.withInput?a.default.createElement(de,{disabled:e.disable},a.default.createElement(U,{placeholder:e.placeholder,disabled:e.disable})):a.default.createElement("label",{for:e.id},a.default.createElement("p",null,e.text)),a.default.createElement(se,{className:"Check"},a.default.createElement("input",{type:"checkbox",id:e.id,onChange:e.onChange}),a.default.createElement("span",{className:"CheckCustom"}),a.default.createElement(u,{Icon:"Check",class_Icon:"CheckIcon"}))),exports.Confirmation_=e=>a.default.createElement($,{storybook:e.storybook},a.default.createElement(N,{storybook:e.storybook},a.default.createElement("h4",null,e.message),a.default.createElement(R,null,a.default.createElement(_,{onClick:e.onYes,iconLeft:"Check",text:e.yes}),a.default.createElement(v,{onClick:e.onNo,iconLeft:"Xicon",text:e.no})))),exports.Cta_=c,exports.Delete_Plain=w,exports.Dropdown_=X,exports.Edit_=e=>a.default.createElement(s,{size:"normal",onClick:e.onClick},a.default.createElement(u,{Icon:e.icon})),exports.Elastic_Search=t=>{let n={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:t.fileKeys},r=t.file;const[o,i]=e.useState({query:"",file:r,notfoundmessage:!1,defaultValue:t.defaultValue}),[l,c]=e.useState(!1),[s,d]=e.useState(0),[f,h]=e.useState(t.list),m=e=>{t.onSuggestions(e),i({...o,query:"",defaultValue:"string"==typeof e?e:e[t.fileKeys]})},p=e=>{"ArrowUp"==e.key&&(e.preventDefault(),d(0===s?l.length-1:s-1)),"ArrowDown"==e.key&&(e.preventDefault(),s===l.length-1?d(0):d(s+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),m("string"==typeof l[s]?l[s]:l[s][t.fileKeys]))};return e.useEffect((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new at(r,n);let a=o.query?e.search(o.query):r;a=a.slice(0,t.size),c(a)}),[o]),e.useEffect((()=>{t.getInput&&l?.length>0?t.getInput(l[0]?.item):t.getSuggestions&&l?.length>0&&o.query.length?t.getSuggestions(l):t.getSuggestions&&!o.query.length&&t.getSuggestions([])}),[l]),a.default.createElement(it,null,a.default.createElement(lt,{id:"elasticSearch",autoComplete:"off",type:"text",value:t.value,placeholder:t.placeholder,onChange:e=>{const{target:n={}}=e,{value:r=""}=n;let a=ot.toGreek(r);i({...o,query:t.sanitize?a:r})},defaultValue:o.defaultValue,onKeyPress:e=>p(e),onKeyDown:e=>p(e),list:t.list}),a.default.createElement(ct,null,t.placeholder),t.required?a.default.createElement(F,{className:"ValidatorRequired"},a.default.createElement(u,{Icon:"Asterisk"})):null,t.list?a.default.createElement(v,{size:"small",text:t.addText,iconLeft:"Add",className:"FormAddButton",onClick:()=>(e=>{let n=JSON.parse(JSON.stringify(t.list));n.push(e),t.updateItemList(n),h(n)})(t.value)}):null,o.query&&l?a.default.createElement(ut,null,l.slice(0,6).map(((e,n)=>a.default.createElement("li",{className:n===s%l.length?"ElasticSelected":"",key:n,onClick:()=>m(e?.item?e.item[t.fileKeys]:e[t.fileKeys])},a.default.createElement("p",null,e?.item?e.item[t.fileKeys]:e[t.fileKeys]))))):null,t.list?a.default.createElement(st,null,a.default.createElement("h5",null,t.listItemTitle),f.map(((e,n)=>a.default.createElement("li",{key:n},a.default.createElement(u,{Icon:t.icon_ListItem}),a.default.createElement("h6",null,e),a.default.createElement(w,{variant_Size:"small",icon_Left:"Delete",onClick:()=>(e=>{let n=JSON.parse(JSON.stringify(t.list));n.splice(e,1),t.updateItemList(n),h(n)})(n)}))))):null)},exports.Focus_=e=>a.default.createElement(d,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.Focus_Plain=e=>a.default.createElement(f,{size:e.size,onClick:e.onClick,onFocus:e.onFocus},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.Form=G,exports.FormGroup=q,exports.FormInput=D,exports.FormLabel=W,exports.FormList=K,exports.Forty_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.xl?r(4):e<=S.xl&&e>S.md&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(xn,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Full_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.lg?r(10):e<=S.lg&&e>S.md?r(6):e<=S.md&&e>S.sm?r(4):e<=S.sm&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(yn,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Google_Search=t=>{let n={includeScore:!0,keys:t.fileKeys};const[r,o]=e.useState([]),[i,l]=e.useState([]);e.useEffect((()=>{o(t.file)}),[t.file]);const[c,s]=e.useState({query:"",file:r,notfoundmessage:!1,defaultValue:t.defaultValue});return e.useEffect((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new at(r,n);let a=c.query?e.search(c.query):r;t.getResults(c.query?.length?a:[]),l(a),0==c.query?.length?t.getSize(0):t.getSize(a?.length),c.query?.length>0?t.getInput(!0):t.getInput(!1)}),[c]),a.default.createElement(ft,null,a.default.createElement(ht,null,a.default.createElement(mt,{placeholder:t.placeholder,onChange:e=>{const{target:n={}}=e,{value:r=""}=n;let a=dt.toGreek(r);s({...c,query:t.sanitize?a:r})},defaultValue:c.defaultValue,disabled:t.disabled}),a.default.createElement(pt,null,t.placeholder),a.default.createElement(gt,null,a.default.createElement(u,{Icon:"Search"}))))},exports.Grey_=m,exports.Grey_Link=e=>a.default.createElement(p,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.HamContext=te,exports.IconSvg=u,exports.Input_=U,exports.Input_Phone=t=>{const{region:n}=e.useContext(Q);return a.default.createElement(oe,null,a.default.createElement(ie,null,a.default.createElement(X,null,a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},"Greece"===n?a.default.createElement("option",{selected:!0},"🇬🇷 +30"):"Deutschland"===n?a.default.createElement("option",{selected:!0},"🇩🇪 +49"):a.default.createElement("option",{selected:!0},"🇬🇷 +30"))),a.default.createElement(X,{items:t.array_PhoneDropdown})),a.default.createElement(U,{placeholder:t.text_PhonePlaceholder,required:t.required,list:t.array_PhoneList,icon_ListItem:t.icon_PhoneList}))},exports.Input_Phone_Register=t=>{const{region:n}=e.useContext(Q);return a.default.createElement(le,null,a.default.createElement(X,null,"Greece"===n?a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇬🇷 +30"),a.default.createElement("option",null,"🇩🇪 +49")):"Deutschland"===n?a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇩🇪 +49"),a.default.createElement("option",null,"🇬🇷 +30")):a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇬🇷 +30"),a.default.createElement("option",null,"🇩🇪 +49"))),a.default.createElement(U,{class_Input:t.class_Input,placeholder:t.placeholder,id:t.id,onChange:t.onChange,defaultValue:t.defaultValue,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown}))},exports.LangContext=Y,exports.Main_=v,exports.Main_Plain=_,exports.MenuContext=ee,exports.Nav_=e=>a.default.createElement(Ht,null,a.default.createElement(_t,{onClick_Logo:e.onClick_Logo}),a.default.createElement(Et,{onClick_Cta:e.onClick_Cta,text_Cta:e.text_Cta}),"Protected"===e.role?a.default.createElement(Pt,{role:e.role,img_Account:e.img_Account,img_Account_Main:e.img_Account,imgAlt_Account:e.imgAlt_Account,imgAlt_Account_Main:e.imgAlt_Account,firstname_Account:e.firstname_Account,text_Account_Main:e.firstname_Account,onClick_Account:e.onClick_Account,onCLick_Account_Main:e.onClick_Account,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,onClick_Settings_Main:e.onClick_Settings_Main,text_Settings_Main:e.text_Settings_Main,onCLick_Logout:e.onCLick_Logout,text_Logout:e.text_Logout,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language}):a.default.createElement(Ot,{role:e.role,onClick_Login:e.onClick_Login,text_Login:e.text_Login,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language})),exports.On_Click_Card=e=>a.default.createElement(M,{className:e.className,imgBevahe:e.imgBevahe,onClick:e.onClick},e.icon||e.header||e.imgSmall?a.default.createElement("header",null,e.icon?a.default.createElement("figure",null,a.default.createElement(u,{Icon:e.icon})):e.imgSmall?a.default.createElement(L,null,a.default.createElement("img",{src:e.imgSmall})):a.default.createElement(C,{headerColor:e.headerColor},e.header)):e.img?a.default.createElement("picture",null,a.default.createElement("img",{src:e.img,onLoad:e.onLoadImg})):null,e.title||e.subtitle?a.default.createElement("footer",null,e.title&&a.default.createElement("h2",null,e.title),e.subtitle&&a.default.createElement("h5",null,e.subtitle),e.children):null),exports.Page=En,exports.PageAlwaysVisible=Sn,exports.PageCards=Pn,exports.PageDesktopOnly=An,exports.PageDesktopPadding=In,exports.PageForty=bn,exports.PageFull=wn,exports.PageIllu=Vn,exports.PageSingle=Nn,exports.PageSingleHeader=Rn,exports.PageSingleRight=Tn,exports.PageSingleleft=zn,exports.PageSixty=kn,exports.PageSub=Zn,exports.PageSubActions=jn,exports.PageSubTitle=Bn,exports.PageTitle=$n,exports.PageTools=Mn,exports.PageToolsCards=Fn,exports.PageToolsForty=Ln,exports.PageToolsSixty=Cn,exports.Radio_=e=>a.default.createElement(fe,{key:e.key},e.withInput?a.default.createElement(U,{placeholder:e.placeholder}):a.default.createElement("label",{for:e.id},a.default.createElement("p",null,e.text)),a.default.createElement(he,{className:"RadioCircle"},a.default.createElement("input",{name:e.name,type:"radio",id:e.id,checked:e.checked}),a.default.createElement("span",{className:"RadioCustom"}),a.default.createElement(u,{Icon:"Sun",class_Icon:"RadioIcon"}))),exports.Red_=e=>a.default.createElement(b,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.RegionContext=Q,exports.SearchContext=ae,exports.Sidebar_=e=>a.default.createElement(Gt,null,e.children),exports.Sidebar_Box=e=>a.default.createElement(Dt,{onClick:e.onClick},a.default.createElement("h5",{className:e.className+" SidebarButtonTitle"},e.text),a.default.createElement("picture",null,e.icon?a.default.createElement(u,{Icon:e.icon}):e.img?a.default.createElement("img",{src:e.img,alt:e.alt}):null)),exports.Sixty_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.xl?r(6):e<=S.xl&&e>S.md?r(4):e<=S.md&&e>S.sm?r(6):e<=S.sm&&e>S.xs?r(4):e<S.xs&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(_n,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Slider=Un,exports.SliderContainer=Qn,exports.SliderContext=re,exports.SliderGrid=er,exports.SliderOverlay=Jn,exports.SliderTitle=Yn,exports.SliderWrapper=Xn,exports.Slider_=e=>a.default.createElement(Qt,{storybook:e.storybook,className:e.className},a.default.createElement(en,{storybook:e.storybook,className:"StoryBook_Fix2",onClick:e.onClose}),a.default.createElement(tn,{storybook:e.storybook},a.default.createElement(nn,null,a.default.createElement("h3",null,e.title),a.default.createElement(v,{text:e.text,iconRight:"Check",size:"normal",onClick:e.onClick})),a.default.createElement(rn,null,e.children))),exports.Steps=Hn,exports.StepsActions=Kn,exports.StepsComplete=Dn,exports.StepsContainer=Wn,exports.StepsCurrent=Gn,exports.StepsWrapper=qn,exports.Steps_=e=>a.default.createElement(Jt,null,a.default.createElement(Ut,{steps:e.steps,currentStep:e.currentStep}),a.default.createElement(Xt,null,e.steps.map(((t,r)=>a.default.createElement(n.CSSTransition,{in:e.currentStep===r,timeout:500,unmountOnExit:!0,classNames:"Steps"},a.default.createElement(Yt,{className:"Steps"},t)))))),exports.Steps_Actions=e=>a.default.createElement(Wt,null,a.default.createElement(m,{iconLeft:e.icon_Grey,text:e.text_Grey,onClick:e.onClick_Grey}),a.default.createElement(v,{iconRight:e.icon_Main,text:e.text_Main,onClick:e.onClick_Main})),exports.Textarea_=e=>{const[t,n]=a.default.useState(0);return a.default.createElement(me,null,a.default.createElement(O,{placeholder:e.placeholder,rows:e.rows?e.rows:"5",onChange:e.onChange_Textarea?e.onChange_Textarea:e=>(e=>{n(e.target.value.length)})(e)},e.defaultValue),e.limit?a.default.createElement(pe,{capped:t>e.limit}," ",a.default.createElement("span",null,t)," / ",e.limit):null,e.required?a.default.createElement(F,{className:"ValidatorRequired"},a.default.createElement(u,{Icon:"Asterisk"})):null,e.errors?a.default.createElement(z,{className:"ValidatorErrors"},e.errors.map((e=>a.default.createElement(P,null,a.default.createElement(u,{Icon:"Error"}),a.default.createElement("h6",null,e))))):null,e.tips&&e.helpers?a.default.createElement(z,{className:"ValidatorHelpers"},e.helpers.map((e=>a.default.createElement(j,null,a.default.createElement(u,{Icon:"Warning"}),a.default.createElement("h6",null,e)))),e.tips.map((e=>a.default.createElement(Z,null,a.default.createElement(u,{Icon:"Tip"}),a.default.createElement("h6",null,e))))):e.tips?a.default.createElement(z,{className:"ValidatorHelpers"},e.tips.map((e=>a.default.createElement(Z,null,a.default.createElement(u,{Icon:"Tip"}),a.default.createElement("h6",null,e))))):e.helpers?a.default.createElement(z,{className:"ValidatorHelpers"},e.helpers.map((e=>a.default.createElement(j,null,a.default.createElement(u,{Icon:"Warning"}),a.default.createElement("h6",null,e))))):null)},exports.Theme=On,exports.ThemeContext=ne,exports.ThemeDark={id:"dark",background:"var(--dark)",color:"var(--blanc)",low:"var(--gloomDark)",mid:"var(--gloom)",high:"var(--gloomLight)",overlay:"var(--blancOverlay)",in:"var(--insetShine)",inFocus:"var(--insetShineFocus)",out:"var(--outShine)",outFocus:"var(--outShineFocus)"},exports.ThemeLight={id:"light",background:"var(--white)",color:"var(--black)",low:"var(--greyLight)",mid:"var(--grey)",high:"var(--greyDark)",overlay:"var(--blackOverlay)",in:"var(--insetShadow)",inFocus:"var(--insetShadowFocus)",out:"var(--outShadow)",outFocus:"var(--outShadowFocus)"},exports.White_Plain=e=>a.default.createElement(x,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.breakPoints=S,exports.device=A;
1720
+ `;exports.Builder_=e=>a.default.createElement(G,{noPads:e.noPads},a.default.createElement(ce,{last:e.last,key:e.key},e.title?a.default.createElement("h4",null,e.title):null,e.children)),exports.Card=k,exports.CardsForty=cn,exports.CardsFull=ln,exports.CardsSixty=un,exports.CardsTools=on,exports.Checkbox_=e=>a.default.createElement(ue,{className:e.className,key:e.key,onClick:e.onClick},e.withInput?a.default.createElement(de,{disabled:e.disable},a.default.createElement(U,{placeholder:e.placeholder,disabled:e.disable})):a.default.createElement("label",{for:e.id},a.default.createElement("p",null,e.text)),a.default.createElement(se,{className:"Check"},a.default.createElement("input",{type:"checkbox",id:e.id,onChange:e.onChange}),a.default.createElement("span",{className:"CheckCustom"}),a.default.createElement(u,{Icon:"Check",class_Icon:"CheckIcon"}))),exports.Confirmation_=e=>a.default.createElement($,{storybook:e.storybook},a.default.createElement(N,{storybook:e.storybook},a.default.createElement("h4",null,e.message),a.default.createElement(R,null,a.default.createElement(_,{onClick:e.onYes,iconLeft:"Check",text:e.yes}),a.default.createElement(v,{onClick:e.onNo,iconLeft:"Xicon",text:e.no})))),exports.Cta_=c,exports.Delete_Plain=w,exports.Dropdown_=X,exports.Edit_=e=>a.default.createElement(s,{size:"normal",onClick:e.onClick},a.default.createElement(u,{Icon:e.icon})),exports.Elastic_Search=t=>{let n={isCaseSensitive:!1,includeScore:!1,shouldSort:!0,threshold:.5,findAllMatches:!0,address:0,minMatchCharLength:1,ignoreLocation:!1,keys:t.fileKeys},r=t.file;const[o,i]=e.useState({query:"",file:r,notfoundmessage:!1,defaultValue:t.defaultValue}),[l,c]=e.useState(!1),[s,d]=e.useState(0),[f,h]=e.useState(t.list),m=e=>{t.onSuggestions(e),i({...o,query:"",defaultValue:"string"==typeof e?e:e[t.returnKey]})},p=e=>{"ArrowUp"==e.key&&(e.preventDefault(),d(0===s?l.length-1:s-1)),"ArrowDown"==e.key&&(e.preventDefault(),s===l.length-1?d(0):d(s+1)),e.key&&"Enter"===e.key&&(e.preventDefault(),m("string"==typeof l[s]?l[s]:l[s][t.returnKey]))};return e.useEffect((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new at(r,n);let a=o.query?e.search(o.query):r;a=a.slice(0,t.size),c(a)}),[o]),e.useEffect((()=>{t.getInput&&l?.length>0?t.getInput(l[0]?.item):t.getSuggestions&&l?.length>0&&o.query.length?t.getSuggestions(l):t.getSuggestions&&!o.query.length&&t.getSuggestions([])}),[l]),a.default.createElement(it,null,a.default.createElement(lt,{id:"elasticSearch",autoComplete:"off",type:"text",value:t.value,placeholder:t.placeholder,onChange:e=>{const{target:n={}}=e,{value:r=""}=n;let a=ot.toGreek(r);i({...o,query:t.sanitize?a:r})},defaultValue:o.defaultValue,onKeyPress:e=>p(e),onKeyDown:e=>p(e),list:t.list}),a.default.createElement(ct,null,t.placeholder),t.required?a.default.createElement(F,{className:"ValidatorRequired"},a.default.createElement(u,{Icon:"Asterisk"})):null,t.list?a.default.createElement(v,{size:"small",text:t.addText,iconLeft:"Add",className:"FormAddButton",onClick:()=>(e=>{let n=JSON.parse(JSON.stringify(t.list));n.push(e),t.updateItemList(n),h(n)})(t.value)}):null,o.query&&l?a.default.createElement(ut,null,l.slice(0,6).map(((e,n)=>a.default.createElement("li",{className:n===s%l.length?"ElasticSelected":"",key:n,onClick:()=>m(e?.item?e.item[t.returnKey]:e[t.returnKey])},a.default.createElement("p",null,e?.item?e.item[t.returnKey]:e[t.returnKey]))))):null,t.list?a.default.createElement(st,null,a.default.createElement("h5",null,t.listItemTitle),f.map(((e,n)=>a.default.createElement("li",{key:n},a.default.createElement(u,{Icon:t.icon_ListItem}),a.default.createElement("h6",null,e),a.default.createElement(w,{variant_Size:"small",icon_Left:"Delete",onClick:()=>(e=>{let n=JSON.parse(JSON.stringify(t.list));n.splice(e,1),t.updateItemList(n),h(n)})(n)}))))):null)},exports.Focus_=e=>a.default.createElement(d,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.Focus_Plain=e=>a.default.createElement(f,{size:e.size,onClick:e.onClick,onFocus:e.onFocus},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.Form=G,exports.FormGroup=q,exports.FormInput=D,exports.FormLabel=W,exports.FormList=K,exports.Forty_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.xl?r(4):e<=S.xl&&e>S.md&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(xn,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Full_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.lg?r(10):e<=S.lg&&e>S.md?r(6):e<=S.md&&e>S.sm?r(4):e<=S.sm&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(yn,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Google_Search=t=>{let n={includeScore:!0,keys:t.fileKeys};const[r,o]=e.useState([]),[i,l]=e.useState([]);e.useEffect((()=>{o(t.file)}),[t.file]);const[c,s]=e.useState({query:"",file:r,notfoundmessage:!1,defaultValue:t.defaultValue});return e.useEffect((()=>{n.minMatchCharLength=t.minMatchCharacters?t.minMatchCharacters:1;const e=new at(r,n);let a=c.query?e.search(c.query):r;t.getResults(c.query?.length?a:[]),l(a),0==c.query?.length?t.getSize(0):t.getSize(a?.length),c.query?.length>0?t.getInput(!0):t.getInput(!1)}),[c]),a.default.createElement(ft,null,a.default.createElement(ht,null,a.default.createElement(mt,{placeholder:t.placeholder,onChange:e=>{const{target:n={}}=e,{value:r=""}=n;let a=dt.toGreek(r);s({...c,query:t.sanitize?a:r})},defaultValue:c.defaultValue,disabled:t.disabled}),a.default.createElement(pt,null,t.placeholder),a.default.createElement(gt,null,a.default.createElement(u,{Icon:"Search"}))))},exports.Grey_=m,exports.Grey_Link=e=>a.default.createElement(p,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.HamContext=te,exports.IconSvg=u,exports.Input_=U,exports.Input_Phone=t=>{const{region:n}=e.useContext(Q);return a.default.createElement(oe,null,a.default.createElement(ie,null,a.default.createElement(X,null,a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},"Greece"===n?a.default.createElement("option",{selected:!0},"🇬🇷 +30"):"Deutschland"===n?a.default.createElement("option",{selected:!0},"🇩🇪 +49"):a.default.createElement("option",{selected:!0},"🇬🇷 +30"))),a.default.createElement(X,{items:t.array_PhoneDropdown})),a.default.createElement(U,{placeholder:t.text_PhonePlaceholder,required:t.required,list:t.array_PhoneList,icon_ListItem:t.icon_PhoneList}))},exports.Input_Phone_Register=t=>{const{region:n}=e.useContext(Q);return a.default.createElement(le,null,a.default.createElement(X,null,"Greece"===n?a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇬🇷 +30"),a.default.createElement("option",null,"🇩🇪 +49")):"Deutschland"===n?a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇩🇪 +49"),a.default.createElement("option",null,"🇬🇷 +30")):a.default.createElement("select",{className:"Dropdown_EmojiAdapt"},a.default.createElement("option",{selected:!0},"🇬🇷 +30"),a.default.createElement("option",null,"🇩🇪 +49"))),a.default.createElement(U,{class_Input:t.class_Input,placeholder:t.placeholder,id:t.id,onChange:t.onChange,defaultValue:t.defaultValue,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown}))},exports.LangContext=Y,exports.Main_=v,exports.Main_Plain=_,exports.MenuContext=ee,exports.Nav_=e=>a.default.createElement(Ht,null,a.default.createElement(_t,{onClick_Logo:e.onClick_Logo}),a.default.createElement(Et,{onClick_Cta:e.onClick_Cta,text_Cta:e.text_Cta}),"Protected"===e.role?a.default.createElement(Pt,{role:e.role,img_Account:e.img_Account,img_Account_Main:e.img_Account,imgAlt_Account:e.imgAlt_Account,imgAlt_Account_Main:e.imgAlt_Account,firstname_Account:e.firstname_Account,text_Account_Main:e.firstname_Account,onClick_Account:e.onClick_Account,onCLick_Account_Main:e.onClick_Account,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,onClick_Settings_Main:e.onClick_Settings_Main,text_Settings_Main:e.text_Settings_Main,onCLick_Logout:e.onCLick_Logout,text_Logout:e.text_Logout,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language}):a.default.createElement(Ot,{role:e.role,onClick_Login:e.onClick_Login,text_Login:e.text_Login,text_Title_Main:e.text_Title_Main,text_Theme_Main:e.text_Theme_Main,text_Title_Region:e.text_Title_Region,text_Title_Language:e.text_Title_Language,onClick_Greek_Language:e.onClick_Greek_Language,onClick_English_Language:e.onClick_English_Language,onClick_German_Language:e.onClick_German_Language})),exports.On_Click_Card=e=>a.default.createElement(M,{className:e.className,imgBevahe:e.imgBevahe,onClick:e.onClick},e.icon||e.header||e.imgSmall?a.default.createElement("header",null,e.icon?a.default.createElement("figure",null,a.default.createElement(u,{Icon:e.icon})):e.imgSmall?a.default.createElement(L,null,a.default.createElement("img",{src:e.imgSmall})):a.default.createElement(C,{headerColor:e.headerColor},e.header)):e.img?a.default.createElement("picture",null,a.default.createElement("img",{src:e.img,onLoad:e.onLoadImg})):null,e.title||e.subtitle?a.default.createElement("footer",null,e.title&&a.default.createElement("h2",null,e.title),e.subtitle&&a.default.createElement("h5",null,e.subtitle),e.children):null),exports.Page=En,exports.PageAlwaysVisible=Sn,exports.PageCards=Pn,exports.PageDesktopOnly=An,exports.PageDesktopPadding=In,exports.PageForty=bn,exports.PageFull=wn,exports.PageIllu=Vn,exports.PageSingle=Nn,exports.PageSingleHeader=Rn,exports.PageSingleRight=Tn,exports.PageSingleleft=zn,exports.PageSixty=kn,exports.PageSub=Zn,exports.PageSubActions=jn,exports.PageSubTitle=Bn,exports.PageTitle=$n,exports.PageTools=Mn,exports.PageToolsCards=Fn,exports.PageToolsForty=Ln,exports.PageToolsSixty=Cn,exports.Radio_=e=>a.default.createElement(fe,{key:e.key},e.withInput?a.default.createElement(U,{placeholder:e.placeholder}):a.default.createElement("label",{for:e.id},a.default.createElement("p",null,e.text)),a.default.createElement(he,{className:"RadioCircle"},a.default.createElement("input",{name:e.name,type:"radio",id:e.id,checked:e.checked}),a.default.createElement("span",{className:"RadioCustom"}),a.default.createElement(u,{Icon:"Sun",class_Icon:"RadioIcon"}))),exports.Red_=e=>a.default.createElement(b,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.RegionContext=Q,exports.SearchContext=ae,exports.Sidebar_=e=>a.default.createElement(Gt,null,e.children),exports.Sidebar_Box=e=>a.default.createElement(Dt,{onClick:e.onClick},a.default.createElement("h5",{className:e.className+" SidebarButtonTitle"},e.text),a.default.createElement("picture",null,e.icon?a.default.createElement(u,{Icon:e.icon}):e.img?a.default.createElement("img",{src:e.img,alt:e.alt}):null)),exports.Sixty_Card_Loader=t=>{const[n,r]=e.useState(),o=e=>{e>S.xl?r(6):e<=S.xl&&e>S.md?r(4):e<=S.md&&e>S.sm?r(6):e<=S.sm&&e>S.xs?r(4):e<S.xs&&r(2)};return window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),window.addEventListener("resize",(()=>{let e=window.innerWidth;o(e)})),a.default.createElement(_n,null,[...Array(n)].map((e=>a.default.createElement(vn,{key:e,children:t.children,circle:t.circle}))))},exports.Slider=Un,exports.SliderContainer=Qn,exports.SliderContext=re,exports.SliderGrid=er,exports.SliderOverlay=Jn,exports.SliderTitle=Yn,exports.SliderWrapper=Xn,exports.Slider_=e=>a.default.createElement(Qt,{storybook:e.storybook,className:e.className},a.default.createElement(en,{storybook:e.storybook,className:"StoryBook_Fix2",onClick:e.onClose}),a.default.createElement(tn,{storybook:e.storybook},a.default.createElement(nn,null,a.default.createElement("h3",null,e.title),a.default.createElement(v,{text:e.text,iconRight:"Check",size:"normal",onClick:e.onClick})),a.default.createElement(rn,null,e.children))),exports.Steps=Hn,exports.StepsActions=Kn,exports.StepsComplete=Dn,exports.StepsContainer=Wn,exports.StepsCurrent=Gn,exports.StepsWrapper=qn,exports.Steps_=e=>a.default.createElement(Jt,null,a.default.createElement(Ut,{steps:e.steps,currentStep:e.currentStep}),a.default.createElement(Xt,null,e.steps.map(((t,r)=>a.default.createElement(n.CSSTransition,{in:e.currentStep===r,timeout:500,unmountOnExit:!0,classNames:"Steps"},a.default.createElement(Yt,{className:"Steps"},t)))))),exports.Steps_Actions=e=>a.default.createElement(Wt,null,a.default.createElement(m,{iconLeft:e.icon_Grey,text:e.text_Grey,onClick:e.onClick_Grey}),a.default.createElement(v,{iconRight:e.icon_Main,text:e.text_Main,onClick:e.onClick_Main})),exports.Textarea_=e=>{const[t,n]=a.default.useState(0);return a.default.createElement(me,null,a.default.createElement(O,{placeholder:e.placeholder,rows:e.rows?e.rows:"5",onChange:e.onChange_Textarea?e.onChange_Textarea:e=>(e=>{n(e.target.value.length)})(e)},e.defaultValue),e.limit?a.default.createElement(pe,{capped:t>e.limit}," ",a.default.createElement("span",null,t)," / ",e.limit):null,e.required?a.default.createElement(F,{className:"ValidatorRequired"},a.default.createElement(u,{Icon:"Asterisk"})):null,e.errors?a.default.createElement(z,{className:"ValidatorErrors"},e.errors.map((e=>a.default.createElement(P,null,a.default.createElement(u,{Icon:"Error"}),a.default.createElement("h6",null,e))))):null,e.tips&&e.helpers?a.default.createElement(z,{className:"ValidatorHelpers"},e.helpers.map((e=>a.default.createElement(j,null,a.default.createElement(u,{Icon:"Warning"}),a.default.createElement("h6",null,e)))),e.tips.map((e=>a.default.createElement(Z,null,a.default.createElement(u,{Icon:"Tip"}),a.default.createElement("h6",null,e))))):e.tips?a.default.createElement(z,{className:"ValidatorHelpers"},e.tips.map((e=>a.default.createElement(Z,null,a.default.createElement(u,{Icon:"Tip"}),a.default.createElement("h6",null,e))))):e.helpers?a.default.createElement(z,{className:"ValidatorHelpers"},e.helpers.map((e=>a.default.createElement(j,null,a.default.createElement(u,{Icon:"Warning"}),a.default.createElement("h6",null,e))))):null)},exports.Theme=On,exports.ThemeContext=ne,exports.ThemeDark={id:"dark",background:"var(--dark)",color:"var(--blanc)",low:"var(--gloomDark)",mid:"var(--gloom)",high:"var(--gloomLight)",overlay:"var(--blancOverlay)",in:"var(--insetShine)",inFocus:"var(--insetShineFocus)",out:"var(--outShine)",outFocus:"var(--outShineFocus)"},exports.ThemeLight={id:"light",background:"var(--white)",color:"var(--black)",low:"var(--greyLight)",mid:"var(--grey)",high:"var(--greyDark)",overlay:"var(--blackOverlay)",in:"var(--insetShadow)",inFocus:"var(--insetShadowFocus)",out:"var(--outShadow)",outFocus:"var(--outShadowFocus)"},exports.White_Plain=e=>a.default.createElement(x,{size:e.size,onClick:e.onClick},e.iconLeft?a.default.createElement(u,{Icon:e.iconLeft}):null,e.text?a.default.createElement("span",null,e.text):null,e.iconRight?a.default.createElement(u,{Icon:e.iconRight}):null),exports.breakPoints=S,exports.device=A;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monica-alexandria",
3
- "version": "3.9.7",
3
+ "version": "3.9.8",
4
4
  "description": "A styled-components styles library for Doitforme platorm and universal tweeks to create your own new styled library for your project",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -95,7 +95,7 @@ export const Elastic_Search = (props) => {
95
95
 
96
96
  const send_clicked_suggestion = (suggestion) => {
97
97
  props.onSuggestions(suggestion);
98
- setCurrentSearch({...currentSearch, query:'', defaultValue:typeof(suggestion) == 'string' ? suggestion : suggestion[props.fileKeys]})
98
+ setCurrentSearch({...currentSearch, query:'', defaultValue:typeof(suggestion) == 'string' ? suggestion : suggestion[props.returnKey]})
99
99
  }
100
100
 
101
101
  const send_input_suggestion = () =>{
@@ -121,7 +121,7 @@ export const Elastic_Search = (props) => {
121
121
  }
122
122
  if((e.key) && e.key==='Enter'){
123
123
  e.preventDefault();
124
- send_clicked_suggestion(typeof(suggestions[highlighted]) == 'string' ? suggestions[highlighted] : suggestions[highlighted][props.fileKeys])
124
+ send_clicked_suggestion(typeof(suggestions[highlighted]) == 'string' ? suggestions[highlighted] : suggestions[highlighted][props.returnKey])
125
125
  }
126
126
  }
127
127
 
@@ -183,8 +183,8 @@ export const Elastic_Search = (props) => {
183
183
  {currentSearch.query && suggestions ?
184
184
  <ElasticSuggestions>
185
185
  {suggestions.slice(0,6).map((suggestion,i)=>(
186
- <li className={i=== highlighted % suggestions.length ? "ElasticSelected": ""} key={i} onClick={() => send_clicked_suggestion(suggestion?.item ? suggestion.item[props.fileKeys]: suggestion[props.fileKeys])}>
187
- <p>{suggestion?.item? suggestion.item[props.fileKeys]: suggestion[props.fileKeys]}</p>
186
+ <li className={i=== highlighted % suggestions.length ? "ElasticSelected": ""} key={i} onClick={() => send_clicked_suggestion(suggestion?.item ? suggestion.item[props.returnKey]: suggestion[props.returnKey])}>
187
+ <p>{suggestion?.item? suggestion.item[props.returnKey]: suggestion[props.returnKey]}</p>
188
188
  </li>
189
189
  ))}
190
190
  </ElasticSuggestions>
@@ -14,6 +14,7 @@ export const Elastic = (args) =>
14
14
  Elastic.args = {
15
15
  file : 'add a json file or array',
16
16
  fileKeys : 'add a key or keys to search in the json',
17
+ retunKey : 'The json key that you want to display. Mandatory even if you provided fileKeys props',
17
18
  defaultValue: 'default value of the input',
18
19
  list: 'enter an array of items that are added in a list by the search',
19
20
  updateItemList: 'update list array on Delete or Add button',