groundfloor-react-ui 1.3.58 → 1.3.59
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 +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -787,10 +787,11 @@ ${({customTriggerStyle:e})=>e}
|
|
|
787
787
|
&::placeholder {
|
|
788
788
|
color: ${({theme:e})=>e.variant["neutral-3"]};
|
|
789
789
|
}
|
|
790
|
+
${({inputStyle:e})=>e};
|
|
790
791
|
`,nt=m.span`
|
|
791
792
|
color: ${({theme:e})=>e.variant.error};
|
|
792
793
|
${({errorTextStyle:e})=>e};
|
|
793
|
-
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:r,placeholder:n,errorMsg:s,handleBlurProps:d,label:p,labelCusTomStyles:m,containerStyle:u,inputContainerStyle:f,errorTextStyle:g,disabled:h,isValid:C,handleInputKeyDownProps:y,handleInputChangeProps:x,...
|
|
794
|
+
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:r,placeholder:n,errorMsg:s,handleBlurProps:d,label:p,labelCusTomStyles:m,containerStyle:u,inputContainerStyle:f,errorTextStyle:g,disabled:h,isValid:C,handleInputKeyDownProps:y,handleInputChangeProps:x,inputStyle:v,...w})=>{const[A,S]=i(r?r.split(","):e||[]),[k,E]=i(o),[V,M]=i(""),L=b()||R;c((()=>{S(r?r.split(","):e||[])}),[r,e]),c((()=>{E(o)}),[o]);return t.createElement(ot,{theme:L,containerStyle:u},t.createElement(it,{inputContainerStyle:f},t.createElement(lt,{text:p,customStyles:m}),A.map(((e,l)=>t.createElement(ct,{theme:L,key:e+`${l}`,onClick:()=>(e=>{const t=[...A];t.splice(e,1),S(t),M(""),d(t.join(","))})(l)},t.createElement(at,null,e)))),t.createElement(rt,{type:"text",placeholder:n,value:k,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),C?k.trim()&&(y([...A,k.trim()].join(",")),S([...A,k.trim()]),E(""),M("")):M(s)):"Backspace"!==e.key||k||(y(A.slice(0,-1).join(",")),S(A.slice(0,-1)))},onChange:e=>{E(e.target.value),M(""),x(e.target.value)},theme:L,onBlur:()=>{if(C){let e;e=k.trim()?[...A,k.trim()]:[...A],d(e.join(",")),S(e),E("")}else C||M(s)},disabled:h,inputStyle:v})),V&&t.createElement(nt,{errorTextStyle:g,theme:L},V))};st.propTypes={listChips:e.arrayOf(e.string),setListChips:e.func,chipListString:e.string,currentChip:e.string,setCurrentChip:e.func,placeholder:e.string,isValid:e.bool,errorMsg:e.string,label:e.string,labelCusTomStyles:e.object,containerStyle:e.object,inputContainerStyle:e.object,errorTextStyle:e.object,disabled:e.bool,handleInputKeyDownProps:e.func,handleInputChangeProps:e.func,inputStyle:e.object},st.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1,isValid:!0,inputStyle:{}};const dt=m.div`
|
|
794
795
|
box-sizing: initial;
|
|
795
796
|
|
|
796
797
|
//Set the styles from the default styles object
|
package/dist/index.js
CHANGED
|
@@ -787,10 +787,11 @@ ${({customTriggerStyle:e})=>e}
|
|
|
787
787
|
&::placeholder {
|
|
788
788
|
color: ${({theme:e})=>e.variant["neutral-3"]};
|
|
789
789
|
}
|
|
790
|
+
${({inputStyle:e})=>e};
|
|
790
791
|
`,ot=h.default.span`
|
|
791
792
|
color: ${({theme:e})=>e.variant.error};
|
|
792
793
|
${({errorTextStyle:e})=>e};
|
|
793
|
-
`,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:c,placeholder:i,errorMsg:n,handleBlurProps:d,label:s,labelCusTomStyles:p,containerStyle:u,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:C,handleInputChangeProps:y,...
|
|
794
|
+
`,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:c,placeholder:i,errorMsg:n,handleBlurProps:d,label:s,labelCusTomStyles:p,containerStyle:u,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:C,handleInputChangeProps:y,inputStyle:x,...v})=>{const[w,A]=t.useState(c?c.split(","):e||[]),[S,k]=t.useState(o),[E,V]=t.useState(""),M=l.useTheme()||I;t.useEffect((()=>{A(c?c.split(","):e||[])}),[c,e]),t.useEffect((()=>{k(o)}),[o]);return g.default.createElement(_e,{theme:M,containerStyle:u},g.default.createElement(et,{inputContainerStyle:f},g.default.createElement($e,{text:s,customStyles:p}),w.map(((e,t)=>g.default.createElement(tt,{theme:M,key:e+`${t}`,onClick:()=>(e=>{const t=[...w];t.splice(e,1),A(t),V(""),d(t.join(","))})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:i,value:S,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),h?S.trim()&&(C([...w,S.trim()].join(",")),A([...w,S.trim()]),k(""),V("")):V(n)):"Backspace"!==e.key||S||(C(w.slice(0,-1).join(",")),A(w.slice(0,-1)))},onChange:e=>{k(e.target.value),V(""),y(e.target.value)},theme:M,onBlur:()=>{if(h){let e;e=S.trim()?[...w,S.trim()]:[...w],d(e.join(",")),A(e),k("")}else h||V(n)},disabled:b,inputStyle:x})),E&&g.default.createElement(ot,{errorTextStyle:m,theme:M},E))};rt.propTypes={listChips:b.default.arrayOf(b.default.string),setListChips:b.default.func,chipListString:b.default.string,currentChip:b.default.string,setCurrentChip:b.default.func,placeholder:b.default.string,isValid:b.default.bool,errorMsg:b.default.string,label:b.default.string,labelCusTomStyles:b.default.object,containerStyle:b.default.object,inputContainerStyle:b.default.object,errorTextStyle:b.default.object,disabled:b.default.bool,handleInputKeyDownProps:b.default.func,handleInputChangeProps:b.default.func,inputStyle:b.default.object},rt.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1,isValid:!0,inputStyle:{}};const ct=h.default.div`
|
|
794
795
|
box-sizing: initial;
|
|
795
796
|
|
|
796
797
|
//Set the styles from the default styles object
|