@eliseubatista99/react-scaffold-core 1.1.2 → 1.1.4

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.
@@ -3,7 +3,7 @@ export type RadioButtonProps = {
3
3
  checked: boolean;
4
4
  customUncheckedRender?: React.ReactNode;
5
5
  customCheckedRender?: React.ReactNode;
6
- onClick: (e?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
6
+ onClick?: (e?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
7
7
  styles?: CSSProperties;
8
8
  checkedStyles?: CSSProperties;
9
9
  };
package/dist/index.cjs.js CHANGED
@@ -138,7 +138,7 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
138
138
  > * {
139
139
  pointer-events: none;
140
140
  }
141
- `,Jo=e=>{const{children:t,styles:r,childrenStyles:i,submitButton:a}=e,{ref:s,handleFormSubmission:d,submitForm:u}=Go(e);return X.jsxs("form",{ref:s,onSubmit:d,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[X.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...i},children:t}),X.jsx(Ko,{onClick:u,styles:{...a.styles},children:a.content})]})},Zo=({src:e,alt:t="",onClick:r,styles:i})=>X.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...i},onClick:()=>{r?.()}}),Qo=e=>({handleOnBlur:a=>{e.onBlur?.()},handleOnFocus:a=>{a.stopPropagation(),e.onFocus?.()},onValueChanged:a=>{e.onChange?.(a.currentTarget.value)}}),es=Pe.div`
141
+ `,Jo=e=>{const{children:t,styles:r,childrenStyles:i,submitButton:a}=e,{ref:s,handleFormSubmission:d,submitForm:u}=Go(e);return X.jsxs("form",{ref:s,onSubmit:d,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[X.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...i},children:t}),X.jsx(Ko,{onClick:u,styles:{...a.styles},children:a.content})]})},Zo=({src:e,alt:t="",onClick:r,styles:i})=>X.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...i},onClick:()=>{r?.()}}),Qo=e=>({handleOnBlur:a=>{e.onBlur?.()},handleOnFocus:a=>{e.onFocus?.()},onValueChanged:a=>{e.onChange?.(a.currentTarget.value)}}),es=Pe.div`
142
142
  display: flex;
143
143
  flex-direction: column;
144
144
  font-family: inherit;
@@ -198,4 +198,4 @@ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}
198
198
  textarea::-webkit-scrollbar-thumb:hover {
199
199
  background: #555; /* hover */
200
200
  }
201
- `,Os=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,value:d,initialValue:u,onChange:l,onFocus:f,onBlur:v,inputStyles:y,containerStyles:S,styles:L})=>{const k=C=>{l?.(C.currentTarget.value)},p=C=>{C.stopPropagation(),f?.()},I=C=>{v?.()};return X.jsxs(xs,{style:{width:"100%",maxWidth:"357px",gap:"8px",...L},children:[t,X.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,outline:"none",alignItems:"flex-start",gap:"10px",...S},children:[r,X.jsx("textarea",{name:e,style:{resize:"none",flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none",minHeight:"47px",...y},placeholder:s,value:d,defaultValue:u,onChange:k,onFocus:p,onBlur:I}),i]}),a]})},ks=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=U.useRef(!1),{isItemVisible:s,hideItem:d}=et();return U.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>d(e),i*1e3))},[a,s,d]),X.jsx(X.Fragment,{children:s(e)&&X.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},Cs=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>X.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...i},children:r});exports.Button=_n;exports.Carousel=sa;exports.Checkbox=la;exports.Drawer=Xo;exports.FeedbackProvider=Vo;exports.Form=Jo;exports.FormsHelper=Qt;exports.Image=Zo;exports.InputField=xn;exports.Loader=ts;exports.Modal=rs;exports.NavigationProvider=Bo;exports.NumberHelper=On;exports.NumericInputField=is;exports.ObjectsHelper=ls;exports.PageLayout=ss;exports.ProgressBar=bs;exports.RadioButton=ws;exports.ScrollHelper=us;exports.SvgImage=Ss;exports.TextAreaField=Os;exports.TextHelper=cs;exports.TimeHelper=ys;exports.Toast=ks;exports.Typography=Cs;exports.defaultBreakpoints=en;exports.useDidMount=ua;exports.useDrag=Qr;exports.useFeedback=et;exports.useFetch=ca;exports.useNavigation=Yo;exports.useOnScreen=fa;exports.usePointer=Zr;exports.useResponsive=da;exports.useTranslations=ma;
201
+ `,Os=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,value:d,initialValue:u,onChange:l,onFocus:f,onBlur:v,inputStyles:y,containerStyles:S,styles:L})=>{const k=C=>{l?.(C.currentTarget.value)},p=C=>{f?.()},I=C=>{v?.()};return X.jsxs(xs,{style:{width:"100%",maxWidth:"357px",gap:"8px",...L},children:[t,X.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,outline:"none",alignItems:"flex-start",gap:"10px",...S},children:[r,X.jsx("textarea",{name:e,style:{resize:"none",flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none",minHeight:"47px",...y},placeholder:s,value:d,defaultValue:u,onChange:k,onFocus:p,onBlur:I}),i]}),a]})},ks=({id:e,children:t,styles:r,durationInSeconds:i=3})=>{const a=U.useRef(!1),{isItemVisible:s,hideItem:d}=et();return U.useEffect(()=>{const u=s(e);a.current!==u&&(a.current=u,u&&setTimeout(()=>d(e),i*1e3))},[a,s,d]),X.jsx(X.Fragment,{children:s(e)&&X.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},children:t})})},Cs=({overflowEllipsis:e,maxNumberOfLines:t,children:r,styles:i})=>X.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t||void 0,WebkitBoxOrient:"vertical",whiteSpace:"unset",textOverflow:e?"ellipsis":void 0,fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",pointerEvents:"none",...i},children:r});exports.Button=_n;exports.Carousel=sa;exports.Checkbox=la;exports.Drawer=Xo;exports.FeedbackProvider=Vo;exports.Form=Jo;exports.FormsHelper=Qt;exports.Image=Zo;exports.InputField=xn;exports.Loader=ts;exports.Modal=rs;exports.NavigationProvider=Bo;exports.NumberHelper=On;exports.NumericInputField=is;exports.ObjectsHelper=ls;exports.PageLayout=ss;exports.ProgressBar=bs;exports.RadioButton=ws;exports.ScrollHelper=us;exports.SvgImage=Ss;exports.TextAreaField=Os;exports.TextHelper=cs;exports.TimeHelper=ys;exports.Toast=ks;exports.Typography=Cs;exports.defaultBreakpoints=en;exports.useDidMount=ua;exports.useDrag=Qr;exports.useFeedback=et;exports.useFetch=ca;exports.useNavigation=Yo;exports.useOnScreen=fa;exports.usePointer=Zr;exports.useResponsive=da;exports.useTranslations=ma;
package/dist/index.es.js CHANGED
@@ -6291,7 +6291,7 @@ const Sn = V.createContext({
6291
6291
  e.onBlur?.();
6292
6292
  },
6293
6293
  handleOnFocus: (a) => {
6294
- a.stopPropagation(), e.onFocus?.();
6294
+ e.onFocus?.();
6295
6295
  },
6296
6296
  onValueChanged: (a) => {
6297
6297
  e.onChange?.(a.currentTarget.value);
@@ -7295,7 +7295,7 @@ const Es = ({
7295
7295
  const k = (C) => {
7296
7296
  l?.(C.currentTarget.value);
7297
7297
  }, p = (C) => {
7298
- C.stopPropagation(), f?.();
7298
+ f?.();
7299
7299
  }, I = (C) => {
7300
7300
  v?.();
7301
7301
  };
@@ -7397,9 +7397,6 @@ const Es = ({
7397
7397
  border: "solid 3px #000000ff",
7398
7398
  ...r
7399
7399
  },
7400
- onClick: (u) => {
7401
- u.stopPropagation();
7402
- },
7403
7400
  children: t
7404
7401
  }
7405
7402
  ) });
@@ -7415,18 +7412,16 @@ const Es = ({
7415
7412
  fontFamily: "inherit",
7416
7413
  maxWidth: "100%",
7417
7414
  overflow: "hidden",
7418
- // whiteSpace: overflowEllipsis ? "nowrap" : "normal", //Old way
7419
- // new way
7420
7415
  display: "-webkit-box",
7421
7416
  WebkitLineClamp: t || void 0,
7422
7417
  WebkitBoxOrient: "vertical",
7423
7418
  whiteSpace: "unset",
7424
- // end new way
7425
7419
  textOverflow: e ? "ellipsis" : void 0,
7426
7420
  fontSize: "16px",
7427
7421
  fontStyle: "normal",
7428
7422
  lineHeight: "normal",
7429
7423
  color: "inherit",
7424
+ pointerEvents: "none",
7430
7425
  ...i
7431
7426
  },
7432
7427
  children: r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eliseubatista99/react-scaffold-core",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "description": "A library which provides basic components, hooks, helpers and providers to easily build a React application and avoid repeating the usual code.",
6
6
  "main": "dist/index.cjs.js",