1mpacto-react-ui 0.0.19 → 0.0.20
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -98,5 +98,5 @@ You should wrap it with \`css\` like this:
|
|
98
98
|
${h||l.subs.length>0&&p?(C=c.activeColor)==null?void 0:C[o]:""} ${typeof n=="boolean"&&n?Ue["item-sidebar-open"]:""} ${typeof n=="boolean"&&!n?Ue["item-sidebar-close"]:""}
|
99
99
|
`,onClick:b,onMouseOver:()=>m(!0),onMouseOut:()=>m(!1),...u?u(l.slug):{},children:[w.jsxs("div",{className:"1ru-flex 1ru-items-center 1ru-gap-3 1ru-relative",children:[v.isValidElement(l.svgIcon)&&w.jsx("div",{className:Ue["item-icon"],children:h||l.subs.length>0&&p||d?l.svgIconActive:l.svgIcon}),w.jsx("div",{className:Ue["item-label"],children:l.label})]}),l.subs.length>0&&n&&w.jsxs("div",{className:Ue["item-icon-subs"],children:[v.isValidElement(a)&&a,typeof a=="function"&&a()]})]})),l.parent===2&&(f=w.jsxs(g,{id:l.name,className:`${Ue["item-sidebar-2"]}
|
100
100
|
${h||l.subs.length>0&&p?(I=c.activeColor)==null?void 0:I[o]:""} ${typeof n=="boolean"&&n?Ue["item-sidebar-open"]:""} ${typeof n=="boolean"&&!n?Ue["item-sidebar-close"]:""}
|
101
|
-
`,onClick:b,onMouseOver:()=>m(!0),onMouseOut:()=>m(!1),...u?u(l.slug):{},children:[v.isValidElement(l.svgIcon)&&w.jsx("div",{className:Ue["item-icon"],children:h||l.subs.length>0&&p||d?l.svgIconActive:l.svgIcon}),w.jsx("div",{className:Ue["item-label"],children:l.label}),l.subs.length>0&&n&&w.jsxs("div",{className:Ue["item-icon-subs"],children:[v.isValidElement(a)&&a,typeof a=="function"&&a()]})]})),l.subs.length>0?w.jsxs(w.Fragment,{children:[f,w.jsx("div",{className:`${Ue["item-subs-sidebar"]} ${!n||!p?Ue.hidden:""}`,children:l.subs.map(x=>v.createElement(_h,{...x,as:x.subs.length>0?e:l.linkComponent,key:x.name,patch:r,iconSubs:a,show:t,open:n,kind:o,setShow:i}))}),o==="payhere"&&w.jsx("div",{className:Ue["divider-item-sidebar"]})]}):f},J5=({as:e,children:t,patch:n="/",iconCompany:r,iconSubs:a,iconCollapse:o,iconCollapseClose:i,kind:s="payhere",modules:u,toleranceWidthIconCompany:l=25,onClickItems:c,...f})=>{const g={color:{payhere:St["sidebar-payhere"],laba:St["sidebar-laba"]}},[d,m]=v.useState(null),[h,y]=v.useState(null),[p,b]=v.useState(""),[C,I]=v.useState(),[x,E]=v.useState(0),B=()=>{var M;let V=0;const $=document.getElementById("icon-company-sidebar");(M=$==null?void 0:$.childNodes)==null||M.forEach(T=>{V+=T.getBoundingClientRect().width??0}),I(V+l+"px")},D=()=>{E(window.innerWidth)},P=()=>{m(!h),h?I("auto"):setTimeout(()=>{B()},100)};return v.useEffect(()=>{x>=768?(m(!0),setTimeout(()=>{B()},100)):(m(!1),I("auto"))},[x]),v.useEffect(()=>{typeof d=="boolean"&&y(d)},[d]),v.useEffect(()=>(n&&n.split("/").length>1&&b(n+"/"),B(),D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)),[]),w.jsxs("div",{className:St.container,...f,children:[w.jsxs("div",{id:"1ru-sidebar",className:`${g.color[s]} ${St.sidebar} ${typeof h=="boolean"&&h?St["sidebar-open"]:""} ${typeof h=="boolean"&&!h?St["sidebar-close"]:""}`,children:[v.isValidElement(o)&&w.jsxs("div",{className:St["button-collaps-sidebar"],onClick:P,children:[d&&o,d?"":v.isValidElement(i)?i:o]}),w.jsx("div",{className:St["container-icon-company-sidebar"],children:w.jsxs("div",{id:"icon-company-sidebar",className:St["icon-company-sidebar"],style:{width:C??"100%"},children:[v.isValidElement(r)&&r,typeof r=="function"&&r()]})}),w.jsx("div",{className:St["menu-sidebar"],onMouseOver:()=>{d||y(!0)},onMouseOut:()=>{d||y(!1)},children:u.map(V=>v.createElement(_h,{...V,as:V.subs.length>0?"div":e,linkComponent:e,key:V.name,show:p,open:h,patch:n,iconSubs:a,kind:s,setShow:b,onClickItems:c}))})]}),w.jsx("div",{className:St["content-sidebar"],children:t})]})},K5="_collapse_188ap_1",Q5="_hidden_188ap_5",Od={collapse:K5,hidden:Q5},q5=({children:e,open:t,className:n})=>w.jsx("div",{className:`${Od.collapse} ${t?"":Od.hidden} ${n||""}`,children:e}),ew="_modal_1j8ss_1",Tn={"center-layout":"_center-layout_1j8ss_1",modal:ew,"modal-content":"_modal-content_1j8ss_1","with-overlay":"_with-overlay_1j8ss_14","modal-small":"_modal-small_1j8ss_24","modal-regular":"_modal-regular_1j8ss_28","modal-large":"_modal-large_1j8ss_32","modal-show":"_modal-show_1j8ss_36"},tw=({children:e,id:t="modal",idModal:n="1ru-modal",withOverlay:r=!0,show:a,size:o="regular",className:i,classNameContainer:s,onClose:u})=>{const l={size:{small:Tn["modal-small"],regular:Tn["modal-regular"],large:Tn["modal-large"]}},c=()=>{typeof u=="function"&&u()};return w.jsx(w.Fragment,{children:document.getElementById(n)&&ni.createPortal(w.jsx("div",{id:t,onClick:c,className:`${Tn.modal} ${r?Tn["with-overlay"]:""} ${a?Tn["modal-show"]:""} ${s??""}`,children:w.jsx("div",{onClick:f=>f.stopPropagation(),className:`${Tn["modal-content"]} ${l.size[o]} ${i??""}`,children:e})}),document.getElementById(n))})},nw="_dot_2qqgj_23",_n={"timeline-container":"_timeline-container_2qqgj_1","timeline-content":"_timeline-content_2qqgj_10","left-content":"_left-content_2qqgj_13","time-content":"_time-content_2qqgj_16","text-time":"_text-time_2qqgj_19",dot:nw,"right-content":"_right-content_2qqgj_26"},rw=({children:e})=>w.jsx("div",{className:_n["timeline-container"],children:e}),aw=({children:e,time:t,clasName:n})=>w.jsxs("div",{className:_n["timeline-content"],children:[w.jsx("div",{className:_n["left-content"],children:w.jsxs("div",{className:_n["time-content"],children:[w.jsx("time",{className:_n["text-time"],children:t??""}),w.jsx("div",{className:_n.dot})]})}),w.jsx("div",{className:`${_n["right-content"]} ${n??""}`,children:e})]}),ow=Object.assign(rw,{TimelineContent:aw}),iw=({children:e,onChange:t})=>{const[n,r]=v.useState({}),[a,o]=v.useState({}),i=(l,c)=>l.map(f=>f[c]).join(","),s=(l,c)=>l.map(f=>f[c]);v.useEffect(()=>{typeof t=="function"&&t(n,a)},[n,a
|
101
|
+
`,onClick:b,onMouseOver:()=>m(!0),onMouseOut:()=>m(!1),...u?u(l.slug):{},children:[v.isValidElement(l.svgIcon)&&w.jsx("div",{className:Ue["item-icon"],children:h||l.subs.length>0&&p||d?l.svgIconActive:l.svgIcon}),w.jsx("div",{className:Ue["item-label"],children:l.label}),l.subs.length>0&&n&&w.jsxs("div",{className:Ue["item-icon-subs"],children:[v.isValidElement(a)&&a,typeof a=="function"&&a()]})]})),l.subs.length>0?w.jsxs(w.Fragment,{children:[f,w.jsx("div",{className:`${Ue["item-subs-sidebar"]} ${!n||!p?Ue.hidden:""}`,children:l.subs.map(x=>v.createElement(_h,{...x,as:x.subs.length>0?e:l.linkComponent,key:x.name,patch:r,iconSubs:a,show:t,open:n,kind:o,setShow:i}))}),o==="payhere"&&w.jsx("div",{className:Ue["divider-item-sidebar"]})]}):f},J5=({as:e,children:t,patch:n="/",iconCompany:r,iconSubs:a,iconCollapse:o,iconCollapseClose:i,kind:s="payhere",modules:u,toleranceWidthIconCompany:l=25,onClickItems:c,...f})=>{const g={color:{payhere:St["sidebar-payhere"],laba:St["sidebar-laba"]}},[d,m]=v.useState(null),[h,y]=v.useState(null),[p,b]=v.useState(""),[C,I]=v.useState(),[x,E]=v.useState(0),B=()=>{var M;let V=0;const $=document.getElementById("icon-company-sidebar");(M=$==null?void 0:$.childNodes)==null||M.forEach(T=>{V+=T.getBoundingClientRect().width??0}),I(V+l+"px")},D=()=>{E(window.innerWidth)},P=()=>{m(!h),h?I("auto"):setTimeout(()=>{B()},100)};return v.useEffect(()=>{x>=768?(m(!0),setTimeout(()=>{B()},100)):(m(!1),I("auto"))},[x]),v.useEffect(()=>{typeof d=="boolean"&&y(d)},[d]),v.useEffect(()=>(n&&n.split("/").length>1&&b(n+"/"),B(),D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)),[]),w.jsxs("div",{className:St.container,...f,children:[w.jsxs("div",{id:"1ru-sidebar",className:`${g.color[s]} ${St.sidebar} ${typeof h=="boolean"&&h?St["sidebar-open"]:""} ${typeof h=="boolean"&&!h?St["sidebar-close"]:""}`,children:[v.isValidElement(o)&&w.jsxs("div",{className:St["button-collaps-sidebar"],onClick:P,children:[d&&o,d?"":v.isValidElement(i)?i:o]}),w.jsx("div",{className:St["container-icon-company-sidebar"],children:w.jsxs("div",{id:"icon-company-sidebar",className:St["icon-company-sidebar"],style:{width:C??"100%"},children:[v.isValidElement(r)&&r,typeof r=="function"&&r()]})}),w.jsx("div",{className:St["menu-sidebar"],onMouseOver:()=>{d||y(!0)},onMouseOut:()=>{d||y(!1)},children:u.map(V=>v.createElement(_h,{...V,as:V.subs.length>0?"div":e,linkComponent:e,key:V.name,show:p,open:h,patch:n,iconSubs:a,kind:s,setShow:b,onClickItems:c}))})]}),w.jsx("div",{className:St["content-sidebar"],children:t})]})},K5="_collapse_188ap_1",Q5="_hidden_188ap_5",Od={collapse:K5,hidden:Q5},q5=({children:e,open:t,className:n})=>w.jsx("div",{className:`${Od.collapse} ${t?"":Od.hidden} ${n||""}`,children:e}),ew="_modal_1j8ss_1",Tn={"center-layout":"_center-layout_1j8ss_1",modal:ew,"modal-content":"_modal-content_1j8ss_1","with-overlay":"_with-overlay_1j8ss_14","modal-small":"_modal-small_1j8ss_24","modal-regular":"_modal-regular_1j8ss_28","modal-large":"_modal-large_1j8ss_32","modal-show":"_modal-show_1j8ss_36"},tw=({children:e,id:t="modal",idModal:n="1ru-modal",withOverlay:r=!0,show:a,size:o="regular",className:i,classNameContainer:s,onClose:u})=>{const l={size:{small:Tn["modal-small"],regular:Tn["modal-regular"],large:Tn["modal-large"]}},c=()=>{typeof u=="function"&&u()};return w.jsx(w.Fragment,{children:document.getElementById(n)&&ni.createPortal(w.jsx("div",{id:t,onClick:c,className:`${Tn.modal} ${r?Tn["with-overlay"]:""} ${a?Tn["modal-show"]:""} ${s??""}`,children:w.jsx("div",{onClick:f=>f.stopPropagation(),className:`${Tn["modal-content"]} ${l.size[o]} ${i??""}`,children:e})}),document.getElementById(n))})},nw="_dot_2qqgj_23",_n={"timeline-container":"_timeline-container_2qqgj_1","timeline-content":"_timeline-content_2qqgj_10","left-content":"_left-content_2qqgj_13","time-content":"_time-content_2qqgj_16","text-time":"_text-time_2qqgj_19",dot:nw,"right-content":"_right-content_2qqgj_26"},rw=({children:e})=>w.jsx("div",{className:_n["timeline-container"],children:e}),aw=({children:e,time:t,clasName:n})=>w.jsxs("div",{className:_n["timeline-content"],children:[w.jsx("div",{className:_n["left-content"],children:w.jsxs("div",{className:_n["time-content"],children:[w.jsx("time",{className:_n["text-time"],children:t??""}),w.jsx("div",{className:_n.dot})]})}),w.jsx("div",{className:`${_n["right-content"]} ${n??""}`,children:e})]}),ow=Object.assign(rw,{TimelineContent:aw}),iw=({children:e,onChange:t})=>{const[n,r]=v.useState({}),[a,o]=v.useState({}),i=(l,c)=>l.map(f=>f[c]).join(","),s=(l,c)=>l.map(f=>f[c]);v.useEffect(()=>{typeof t=="function"&&t(n,a)},[n,a]);const u=(l,c,f,g)=>{let d=l;Array.isArray(l)&&(f==="array-of-object-to-array"?d=s(l,g):f==="array-of-object-to-string"?d=i(l,g):f==="array-to-string"&&(d=d.toString())),r(m=>({...m,[c]:d})),o(m=>({...m,[c]:l}))};return w.jsx(w.Fragment,{children:e({handlerOnChange:u,value:n,nativeValue:a})})};function uw(e,t=null){const[n,r]=v.useState(!1);return v.useEffect(()=>{let a=null,o=null;const i=()=>{const s=a instanceof HTMLElement?a.getBoundingClientRect().width:window.innerWidth,u=window.matchMedia(e.replace("WIDTH",s.toString()));r(u.matches)};if(t){if(a=document.getElementById(t),!a)return;o=new ResizeObserver(i),o.observe(a)}else a=window,window.addEventListener("resize",i);return i(),()=>{o?o.disconnect():window.removeEventListener("resize",i)}},[e,t]),n}const sw=e=>{const[t,n]=v.useState(e.hours*3600),[r,a]=v.useState(e.running??!1);return v.useEffect(()=>{let u;return r&&(u=setInterval(()=>{n(l=>l-1)},e.intervalMs)),()=>{u&&clearInterval(u)}},[r,e.intervalMs]),{count:t,startCountdown:()=>{a(!0)},stopCountdown:()=>{a(!1)},resetCountdown:()=>{n(e.hours*3600),a(!1)}}};exports.Badges=Ph;exports.Breadcrumbs=Z5;exports.Button=Er;exports.ButtonIcon=Th;exports.Calendar=hl;exports.CalendarRange=Ah;exports.Chips=Vh;exports.Collapse=q5;exports.ConfigColors=qh;exports.DatePicker=S5;exports.DateRangePicker=Bh;exports.FilterContainer=iw;exports.FilterDate=R5;exports.InputFloatingInner=vf;exports.InputReguler=yf;exports.ListVirtualization=wg;exports.ModalDialog=tw;exports.Pagination=Gy;exports.Popover=Sa;exports.RadioCheckbox=bl;exports.RadioCheckboxLabel=L5;exports.SelectDropdownContainer=mm;exports.SelectDropdownContainerComponents=nm;exports.Sidebar=J5;exports.Switch=A5;exports.TPublish=ab;exports.TabPanel=Ly;exports.Table=Py;exports.TableVirtualization=Vs;exports.Tabs=Oy;exports.Timeline=ow;exports.configScreens=tb;exports.configTypography=eb;exports.configTypographyLabaBisnis=Wd;exports.configTypographyPayhere=Hd;exports.formatNumber=fr;exports.useCountdown=sw;exports.useElementOrWindowMediaQuery=uw;exports.utilTable=Wv;
|
102
102
|
//# sourceMappingURL=index.cjs.map
|