1mpacto-react-ui 0.0.141 → 0.0.143
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/assets/_colors.scss +241 -0
- package/dist/assets/_typography.scss +203 -0
- package/dist/assets/colors.css +243 -0
- package/dist/assets/core.css +1 -1
- package/dist/assets/fontfamily.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/assets/typography.css +104 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/package.json.d.ts +20 -8
- package/package.json +20 -8
@@ -0,0 +1,104 @@
|
|
1
|
+
@theme {
|
2
|
+
--text-payhere-h1: 60px;
|
3
|
+
--text-payhere-h1--line-height: 72px;
|
4
|
+
--text-payhere-h1--font-weight: 700;
|
5
|
+
--text-payhere-h2: 48px;
|
6
|
+
--text-payhere-h2--line-height: 58px;
|
7
|
+
--text-payhere-h2--font-weight: 700;
|
8
|
+
--text-payhere-h3: 40px;
|
9
|
+
--text-payhere-h3--line-height: 48px;
|
10
|
+
--text-payhere-h3--font-weight: 700;
|
11
|
+
--text-payhere-h4: 30px;
|
12
|
+
--text-payhere-h4--line-height: 38px;
|
13
|
+
--text-payhere-h4--font-weight: 700;
|
14
|
+
--text-payhere-h5: 28px;
|
15
|
+
--text-payhere-h5--line-height: 40px;
|
16
|
+
--text-payhere-h5--font-weight: 600;
|
17
|
+
--text-payhere-h6: 24px;
|
18
|
+
--text-payhere-h6--line-height: 30px;
|
19
|
+
--text-payhere-h6--font-weight: 600;
|
20
|
+
--text-payhere-body-lr: 18px;
|
21
|
+
--text-payhere-body-lr--line-height: 26px;
|
22
|
+
--text-payhere-body-lr--font-weight: 400;
|
23
|
+
--text-payhere-body-lm: 18px;
|
24
|
+
--text-payhere-body-lm--line-height: 26px;
|
25
|
+
--text-payhere-body-lm--font-weight: 500;
|
26
|
+
--text-payhere-body-ls: 18px;
|
27
|
+
--text-payhere-body-ls--line-height: 26px;
|
28
|
+
--text-payhere-body-ls--font-weight: 600;
|
29
|
+
--text-payhere-body-lb: 18px;
|
30
|
+
--text-payhere-body-lb--line-height: 26px;
|
31
|
+
--text-payhere-body-lb--font-weight: 700;
|
32
|
+
--text-payhere-body-mr: 16px;
|
33
|
+
--text-payhere-body-mr--line-height: 24px;
|
34
|
+
--text-payhere-body-mr--font-weight: 400;
|
35
|
+
--text-payhere-body-mm: 16px;
|
36
|
+
--text-payhere-body-mm--line-height: 24px;
|
37
|
+
--text-payhere-body-mm--font-weight: 500;
|
38
|
+
--text-payhere-body-ms: 16px;
|
39
|
+
--text-payhere-body-ms--line-height: 24px;
|
40
|
+
--text-payhere-body-ms--font-weight: 600;
|
41
|
+
--text-payhere-body-mb: 16px;
|
42
|
+
--text-payhere-body-mb--line-height: 24px;
|
43
|
+
--text-payhere-body-mb--font-weight: 700;
|
44
|
+
--text-payhere-label-r: 15px;
|
45
|
+
--text-payhere-label-r--line-height: 26px;
|
46
|
+
--text-payhere-label-r--font-weight: 400;
|
47
|
+
--text-payhere-label-m: 15px;
|
48
|
+
--text-payhere-label-m--line-height: 26px;
|
49
|
+
--text-payhere-label-m--font-weight: 500;
|
50
|
+
--text-payhere-body-sr: 14px;
|
51
|
+
--text-payhere-body-sr--line-height: 22px;
|
52
|
+
--text-payhere-body-sr--font-weight: 400;
|
53
|
+
--text-payhere-body-sm: 14px;
|
54
|
+
--text-payhere-body-sm--line-height: 22px;
|
55
|
+
--text-payhere-body-sm--font-weight: 500;
|
56
|
+
--text-payhere-body-esr: 12px;
|
57
|
+
--text-payhere-body-esr--line-height: 20px;
|
58
|
+
--text-payhere-body-esr--font-weight: 400;
|
59
|
+
--text-payhere-body-esm: 12px;
|
60
|
+
--text-payhere-body-esm--line-height: 20px;
|
61
|
+
--text-payhere-body-esm--font-weight: 500;
|
62
|
+
--text-laba-h1: 24px;
|
63
|
+
--text-laba-h1--line-height: 30px;
|
64
|
+
--text-laba-h1--font-weight: 700;
|
65
|
+
--text-laba-h2: 18px;
|
66
|
+
--text-laba-h2--line-height: 26px;
|
67
|
+
--text-laba-h2--font-weight: 700;
|
68
|
+
--text-laba-base-rb: 16px;
|
69
|
+
--text-laba-base-rb--line-height: 24px;
|
70
|
+
--text-laba-base-rb--font-weight: 700;
|
71
|
+
--text-laba-base-rs: 16px;
|
72
|
+
--text-laba-base-rs--line-height: 24px;
|
73
|
+
--text-laba-base-rs--font-weight: 600;
|
74
|
+
--text-laba-base-rr: 16px;
|
75
|
+
--text-laba-base-rr--line-height: 24px;
|
76
|
+
--text-laba-base-rr--font-weight: 400;
|
77
|
+
--text-laba-base-sb: 14px;
|
78
|
+
--text-laba-base-sb--line-height: 20px;
|
79
|
+
--text-laba-base-sb--font-weight: 700;
|
80
|
+
--text-laba-base-ss: 14px;
|
81
|
+
--text-laba-base-ss--line-height: 20px;
|
82
|
+
--text-laba-base-ss--font-weight: 600;
|
83
|
+
--text-laba-base-sr: 14px;
|
84
|
+
--text-laba-base-sr--line-height: 20px;
|
85
|
+
--text-laba-base-sr--font-weight: 400;
|
86
|
+
--text-laba-subtitle-rb: 12px;
|
87
|
+
--text-laba-subtitle-rb--line-height: 16px;
|
88
|
+
--text-laba-subtitle-rb--font-weight: 700;
|
89
|
+
--text-laba-subtitle-rs: 12px;
|
90
|
+
--text-laba-subtitle-rs--line-height: 16px;
|
91
|
+
--text-laba-subtitle-rs--font-weight: 600;
|
92
|
+
--text-laba-subtitle-rr: 12px;
|
93
|
+
--text-laba-subtitle-rr--line-height: 16px;
|
94
|
+
--text-laba-subtitle-rr--font-weight: 400;
|
95
|
+
--text-laba-subtitle-sb: 10px;
|
96
|
+
--text-laba-subtitle-sb--line-height: 12px;
|
97
|
+
--text-laba-subtitle-sb--font-weight: 700;
|
98
|
+
--text-laba-subtitle-ss: 10px;
|
99
|
+
--text-laba-subtitle-ss--line-height: 12px;
|
100
|
+
--text-laba-subtitle-ss--font-weight: 600;
|
101
|
+
--text-laba-subtitle-sr: 10px;
|
102
|
+
--text-laba-subtitle-sr--line-height: 12px;
|
103
|
+
--text-laba-subtitle-sr--font-weight: 400;
|
104
|
+
}
|
package/dist/index.cjs
CHANGED
@@ -192,7 +192,7 @@ You should wrap it with \`css\` like this:
|
|
192
192
|
${(d.step??f)<=e?Zn.active:""}`,style:{maxWidth:h+1===(t==null?void 0:t.length)||h===0?(n-30)*2:n-30,marginRight:h+1===(t==null?void 0:t.length)?-(n/2):0,marginLeft:h===0?-(n/2):0},children:d.desc})]},h)})});Ui.register(Oo,No,Ti,Kn,yw,ds,bw);const TN=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),o=n||new Date().getFullYear();return new Date(`${i}/${r}/${o}`)},kN=({data:e,className:t,height:n=65})=>{const r=w.useRef(null),i=e.map(h=>_a(TN(1,h.label,h.year),"MMM yy",{locale:Nl}))||[],[o,a]=w.useState(""),[s,l]=w.useState(""),u=h=>{const f=[],g=[];let m=!h.find(b=>b.isCurrent);return h.forEach(b=>{m?(g.push(b.value),f.push(null)):(f.push(b.value),b.isCurrent?(m=!0,g.push(b.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:o,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:o,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function m(y){return y.lines}if(g.body){const y=g.title||[];let v=g.body.map(m),x="<thead>";y.forEach(D=>{let _="";_+="display: flex",_+="; justify-content: center",_+="; font-weight: 600",_+="; font-size: 12px",_+="; padding: 0px 14px",x+=`<tr><span style="${_}">${D}</span></tr>`}),x+="</thead><tbody>",v.length>1&&v[0][0]===v[1][0]&&(v=[v[0]]),v.forEach(D=>{let _="";_+="display: flex",_+="; justify-content: center",_+="; color: #0163C8",_+="; padding: 0px 14px",_+="; font-size: 12px";const T=`<span style="${_}">${D}</span>`;x+=`<tr><td>${T}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const b=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=b.left+window.pageXOffset+g.caretX-30+"px",f.style.top=b.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return _a(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Nl})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return Au(h)??0}}}}};return w.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),a(f)}},[]),E.jsxs("div",{className:t??"",children:[E.jsx(Sw,{options:d,data:c,height:n}),E.jsx("div",{className:"1ru-h-5",children:E.jsx("canvas",{ref:r})})]})},MN="_container_1oiqk_1",zb={container:MN,"container-popover":"_container-popover_1oiqk_5"},BN=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:o,placement:a="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=w.useRef(null),m={backgroundColor:w1[s]||s},[b,y]=w.useState(!1),[v,x]=w.useState(!1),C=_=>{var T;(T=g.current)==null||T.handlerShow(_),x(!0),typeof i=="function"&&i()},D=()=>{var _;x(!1),b||(clearInterval(f),(_=g.current)==null||_.setShow(!1),typeof o=="function"&&o())};return E.jsxs(E.Fragment,{children:[E.jsx("div",{id:e,onMouseEnter:_=>{if(d&&!b){const T=_.currentTarget;f=setTimeout(()=>{C({..._,currentTarget:T})},h)}},onMouseLeave:()=>{d&&!b&&D()},onClick:_=>{y(!0),clearInterval(f),v||C(_)},className:zb.container,children:t}),E.jsx(Fr,{floatingOptions:{placement:a},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{b&&(y(!1),D())},styleInnerPopover:{backgroundColor:m.backgroundColor},propsArrow:{fill:m.backgroundColor,...u},className:`${zb["container-popover"]} ${c??""}`,...l,children:n})]})},ON="_icon_i1q12_5",NN="_show_i1q12_8",vd={"container-popover":"_container-popover_i1q12_1",icon:ON,show:NN},_w=w.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:o,endIcon:a,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:m=5,idPopover:b="1ru-popover-button-popover",onClick:y,onClose:v,...x}=e,C=w.useRef(null),D=w.useRef(null),[_,T]=w.useState(!1),p=(A,k,R)=>{let M=E.jsx(E.Fragment,{});return A&&w.isValidElement(k)?M=k:w.isValidElement(R)&&(M=E.jsx("div",{className:`${vd.icon} ${A?vd.show:""}`,children:R})),M},S=A=>{var k;(k=C.current)==null||k.setShow(A),T(A)},$=A=>{var k;(k=C.current)==null||k.handlerShow(A),T(!0)},I=()=>{var A;T(!1),(A=C.current)==null||A.setShow(!1),typeof v=="function"&&v()};return w.useImperativeHandle(t,()=>({show:_,setShow:S,handlerClose:I,handlerShow:$}),[_]),E.jsxs(E.Fragment,{children:[E.jsx(Bn,{ref:D,id:r,className:`${u} ${_?c:""}`,onClick:A=>{_?I():typeof y=="function"?y(A):$(A)},startIcon:p(_,s,o),endIcon:p(_,l,a),...x,children:i}),E.jsx(Fr,{ref:C,id:b,offset:m,floatingOptions:{placement:h},zIndex:g,onClose:I,className:`${vd["container-popover"]} ${d}`,...f,children:n})]})});_w.displayName="ButtonPopover";Ui.register(Oo,No,Ti,Kn,mw,ds);const VN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const o=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",a=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:o,value:a,style:r,dataPoints:n.dataPoints})},LN={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:o,right:a}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(o,s),n.lineTo(a,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},jN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},HN=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:o})=>{const a=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:b,scales:y,chartHeight:v,gradientFor:x,item:C}){let T=(y.y.getPixelForValue(0)-b.top)/v;T=T<0?0:T>1?1:T,a.current=m.createLinearGradient(0,b.top,0,v+b.top),x==="background"?(a.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),a.current.addColorStop(T,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),a.current.addColorStop(T,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),a.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(a.current.addColorStop(T,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),a.current.addColorStop(T,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:b,scales:y,gradientFor:v,item:x}){const C=b.right-b.left,D=b.bottom-b.top;return(!a.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:b,scales:y,chartHeight:D,gradientFor:v,item:x})),d({ctx:m,chartArea:b,scales:y,chartHeight:D,gradientFor:v,item:x}),a.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(b=>({fill:!0,backgroundColor:function(y){const v=y.chart,{ctx:x,chartArea:C,scales:D}=v;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:b})},borderColor:function(y){const v=y.chart,{ctx:x,chartArea:C,scales:D}=v;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:b})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...b,data:b.data}))}),[e]),g=w.useMemo(()=>Ia(jN,{plugins:{tooltip:{enabled:!o,external:({chart:b,tooltip:y})=>o?VN(c)({chart:b,tooltip:y}):void 0}}},i??{}),[i,o]);return E.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[o&&E.jsx(gg,{selector:"body",children:E.jsx(o,{...u})}),E.jsx(Sw,{data:f,options:g,plugins:[LN]})]})};Ui.register(Oo,No,Bl,ds,Ti,mw,ds);const WN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const o=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",a=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:o,value:a,style:r,dataPoints:n.dataPoints})},zN={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,o)=>{const a=e.getDatasetMeta(o);a.visible&&a.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?Au(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},GN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return Au(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},ZN=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:o})=>{const a=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:b,scales:y,chartHeight:v,gradientFor:x,item:C}){let T=(y.y.getPixelForValue(0)-b.top)/v;T=T<0?0:T>1?1:T,a.current=m.createLinearGradient(0,b.top,0,v+b.top),x==="background"?(a.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),a.current.addColorStop(T,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),a.current.addColorStop(T,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),a.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(a.current.addColorStop(T,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),a.current.addColorStop(T,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:b,scales:y,gradientFor:v,item:x}){const C=b.right-b.left,D=b.bottom-b.top;return(!a.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:b,scales:y,chartHeight:D,gradientFor:v,item:x})),d({ctx:m,chartArea:b,scales:y,chartHeight:D,gradientFor:v,item:x}),a.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(b=>({fill:!0,backgroundColor:function(y){const v=y.chart,{ctx:x,chartArea:C,scales:D}=v;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:b})},borderColor:function(y){const v=y.chart,{ctx:x,chartArea:C,scales:D}=v;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:b})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...b,data:b.data}))}),[e]),g=w.useMemo(()=>Ia(GN,{plugins:{tooltip:{enabled:!o,external:({chart:b,tooltip:y})=>o?WN(c)({chart:b,tooltip:y}):void 0}}},i??{}),[i,o]);return E.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[o&&E.jsx(gg,{selector:"body",children:E.jsx(o,{...u})}),E.jsx(gN,{data:f,options:g,plugins:[zN]})]})},XN="_left_1s2i5_4",YN="_right_1s2i5_7",UN="_indicator_1s2i5_16",JN="_active_1s2i5_19",Or={"container-step-indicator":"_container-step-indicator_1s2i5_1",left:XN,right:YN,"text-step-indicator":"_text-step-indicator_1s2i5_10","step-indicator":"_step-indicator_1s2i5_13",indicator:UN,active:JN};function qN(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const KN=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:o="",id:a="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>E.jsxs("div",{id:a,className:`${Or["container-step-indicator"]}
|
193
193
|
${s==="left"?Or.left:Or.right} ${r||""}`,children:[s==="left"&&E.jsxs("p",{className:`${Or["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]}),E.jsx("div",{className:`${Or["step-indicator"]} ${d||""}
|
194
194
|
${u?"1ru-w-full":""} ${c}`,style:{gap:c},children:Array.from({length:t}).map((h,f)=>E.jsx("div",{className:`${Or.indicator} ${o||""}
|
195
|
-
${f<=e?`${Or.active} ${n}`:""}`,style:{width:u?qN(t,c):l}},f))}),s==="right"&&E.jsxs("p",{className:`${Or["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]}),QN="0.0.
|
195
|
+
${f<=e?`${Or.active} ${n}`:""}`,style:{width:u?qN(t,c):l}},f))}),s==="right"&&E.jsxs("p",{className:`${Or["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]}),QN="0.0.143",Gb={version:QN},eV=({label:e})=>({tinymceScriptSrc:`https://unpkg.com/1mpacto-react-ui@${Gb.version}/dist/tinymce/js/tinymce/tinymce.min.js`,init:{plugins:"lists",menubar:!1,statusbar:!1,content_css:`https://unpkg.com/1mpacto-react-ui@${Gb.version}/dist/assets/fontfamily.css`,toolbar:"fontfamily fontsize italic bold underline bullist numlist",font_size_formats:"8px 10px 12px 14px 16px 18px 24px 36px 48px",image_advtab:!0,importcss_append:!0,min_height:220,image_caption:!0,noneditable_class:"mceNonEditable",toolbar_mode:"sliding",table_tab_navigation:!1,line_height_formats:"100px",font_family_formats:`
|
196
196
|
Lato=Lato;
|
197
197
|
Inter=Inter;
|
198
198
|
Andale Mono=Andale Mono,times;
|
@@ -219,7 +219,7 @@ You should wrap it with \`css\` like this:
|
|
219
219
|
!1ru-pl-2
|
220
220
|
!1ru-pt-2
|
221
221
|
!1ru-pointer-events-none
|
222
|
-
`,n!=null&&n.className&&(n.className="!1ru-mt-6 !1ru-w-full"),i.appendChild(document.createTextNode(e||"")),r==null||r.appendChild(i)}},setup:t=>{t.on("PostProcess",function(n){/<p style="font-family: Lato; margin: 0px;"> <\/p>/i.test(n.content)&&(n.content=n.content.replace(/ /gi,"<br />"))}),t.on("PastePostProcess",n=>{n.node.querySelectorAll("*").forEach(o=>{t.dom.setStyle(o,"font-family","Lato"),t.dom.setStyle(o,"margin","0px")})})}}}),tV="
|
222
|
+
`,n!=null&&n.className&&(n.className="!1ru-mt-6 !1ru-w-full"),i.appendChild(document.createTextNode(e||"")),r==null||r.appendChild(i)}},setup:t=>{t.on("PostProcess",function(n){/<p style="font-family: Lato; margin: 0px;"> <\/p>/i.test(n.content)&&(n.content=n.content.replace(/ /gi,"<br />"))}),t.on("PastePostProcess",n=>{n.node.querySelectorAll("*").forEach(o=>{t.dom.setStyle(o,"font-family","Lato"),t.dom.setStyle(o,"margin","0px")})})}}}),tV="_container_4wlxe_1",nV={container:tV};var Of={exports:{}};/*
|
223
223
|
object-assign
|
224
224
|
(c) Sindre Sorhus
|
225
225
|
@license MIT
|