aravint-ui-navigation 1.0.33 → 1.0.36
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/navigation.cjs.js
CHANGED
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
font-size: 10px;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`}),e.jsx("div",{style:j,className:`ctabs-list ${n}`,children:i.map((t,R)=>{const N=f===t.id;return e.jsxs("button",{role:"tab","aria-selected":N,disabled:t.disabled,onClick:()=>!t.disabled&&y(t.id),style:{...F,...N?x:g,opacity:t.disabled?.5:1,cursor:t.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[r&&e.jsx("span",{className:"ctabs-badge",style:N?h:T,children:R+1}),t.icon,e.jsx("span",{className:"ctabs-label",children:t.label})]},t.id)})}),l&&u&&e.jsx("div",{style:B,className:c,children:u.content})]})},L=()=>e.jsx("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),k=v.memo(({computed:i,showTime:d})=>{const{step:s,index:a,status:o}=i,n=["rs-stepper__circle",o==="completed"?"rs-stepper__circle--completed":"",o==="active"?"rs-stepper__circle--active":""].filter(Boolean).join(" "),b=["rs-stepper__title",o==="pending"?"rs-stepper__title--pending":"",o==="active"?"rs-stepper__title--active":""].filter(Boolean).join(" "),c=a!==0;return e.jsxs("div",{className:"rs-stepper__step",children:[e.jsxs("div",{className:"rs-stepper__circle-wrap",children:[e.jsx("div",{className:n,children:c?a:null}),o==="completed"&&e.jsx("span",{className:"rs-stepper__check","aria-hidden":"true",children:e.jsx(L,{})})]}),e.jsx("div",{className:b,children:s.title}),s.date&&e.jsx("div",{className:"rs-stepper__date",children:s.date}),d&&s.time&&e.jsx("div",{className:"rs-stepper__time",children:s.time})]})});k.displayName="StepCircle";const E=({steps:i,currentStep:d,completedColor:s="#059669",pendingColor:a="#9ca3af",activeColor:o="#059669",lineColor:n="#e5e7eb",showTime:b=!0,orientation:c="responsive"})=>{const r=i.length,l=d>r,m=Math.max(1,Math.min(d,r)),p=l?Math.max(0,r-1):Math.max(0,Math.min(r-1,m-1)),_=v.useMemo(()=>i.map((x,g)=>{let h="pending";return l||g<p?h="completed":g===p&&(h="active"),{step:x,index:g,status:h}}),[i,p,l]),w=r>0?100/r/2:0,f=r>1?l?100:p/(r-1)*100:0,y=l||m>1?s:n,u=l||m>r?s:n,j={"--rs-completed-color":s,"--rs-pending-color":a,"--rs-active-color":o,"--rs-line-color":n,"--rs-half-step":`${w}%`,"--rs-progress":`${f}%`,"--rs-left-side-color":y,"--rs-right-side-color":u};if(r===0)return null;const F=c==="vertical"?"rs-stepper--vertical":c==="horizontal"?"rs-stepper--horizontal":"rs-stepper--responsive";return e.jsxs("div",{className:"border border-[#E5E7EB] py-2 mx-2 rounded-lg bg-[#F9FAFB] shadow-[0px_2px_4px_-1px_#00000008,0px_4px_6px_-1px_#0000000D]",children:[e.jsx("div",{className:"pl-2 pt-2 pb-3 text-[14px] font-bold",children:"Workflow
|
|
75
|
+
`}),e.jsx("div",{style:j,className:`ctabs-list ${n}`,children:i.map((t,R)=>{const N=f===t.id;return e.jsxs("button",{role:"tab","aria-selected":N,disabled:t.disabled,onClick:()=>!t.disabled&&y(t.id),style:{...F,...N?x:g,opacity:t.disabled?.5:1,cursor:t.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[r&&e.jsx("span",{className:"ctabs-badge",style:N?h:T,children:R+1}),t.icon,e.jsx("span",{className:"ctabs-label",children:t.label})]},t.id)})}),l&&u&&e.jsx("div",{style:B,className:c,children:u.content})]})},L=()=>e.jsx("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),k=v.memo(({computed:i,showTime:d})=>{const{step:s,index:a,status:o}=i,n=["rs-stepper__circle",o==="completed"?"rs-stepper__circle--completed":"",o==="active"?"rs-stepper__circle--active":""].filter(Boolean).join(" "),b=["rs-stepper__title",o==="pending"?"rs-stepper__title--pending":"",o==="active"?"rs-stepper__title--active":""].filter(Boolean).join(" "),c=a!==0;return e.jsxs("div",{className:"rs-stepper__step",children:[e.jsxs("div",{className:"rs-stepper__circle-wrap",children:[e.jsx("div",{className:n,children:c?a:null}),o==="completed"&&e.jsx("span",{className:"rs-stepper__check","aria-hidden":"true",children:e.jsx(L,{})})]}),e.jsx("div",{className:b,children:s.title}),s.date&&e.jsx("div",{className:"rs-stepper__date",children:s.date}),d&&s.time&&e.jsx("div",{className:"rs-stepper__time",children:s.time})]})});k.displayName="StepCircle";const E=({steps:i,currentStep:d,completedColor:s="#059669",pendingColor:a="#9ca3af",activeColor:o="#059669",lineColor:n="#e5e7eb",showTime:b=!0,orientation:c="responsive"})=>{const r=i.length,l=d>r,m=Math.max(1,Math.min(d,r)),p=l?Math.max(0,r-1):Math.max(0,Math.min(r-1,m-1)),_=v.useMemo(()=>i.map((x,g)=>{let h="pending";return l||g<p?h="completed":g===p&&(h="active"),{step:x,index:g,status:h}}),[i,p,l]),w=r>0?100/r/2:0,f=r>1?l?100:p/(r-1)*100:0,y=l||m>1?s:n,u=l||m>r?s:n,j={"--rs-completed-color":s,"--rs-pending-color":a,"--rs-active-color":o,"--rs-line-color":n,"--rs-half-step":`${w}%`,"--rs-progress":`${f}%`,"--rs-left-side-color":y,"--rs-right-side-color":u};if(r===0)return null;const F=c==="vertical"?"rs-stepper--vertical":c==="horizontal"?"rs-stepper--horizontal":"rs-stepper--responsive";return e.jsxs("div",{className:"border border-[#E5E7EB] py-2 mx-2 rounded-lg bg-[#F9FAFB] shadow-[0px_2px_4px_-1px_#00000008,0px_4px_6px_-1px_#0000000D]",children:[e.jsx("div",{className:"pl-2 pt-2 pb-3 text-[14px] font-bold",children:"Workflow Progresss"}),e.jsx("div",{className:`rs-stepper ${F}`,style:j,children:e.jsx("div",{className:"rs-stepper__scroll",children:e.jsxs("div",{className:"rs-stepper__row",children:[e.jsx("div",{className:"rs-stepper__track",children:e.jsx("div",{className:"rs-stepper__progress"})}),_.map(x=>e.jsx(k,{computed:x,showTime:b},x.step.id))]})})})]})},I=v.memo(E);exports.CustomTabs=z;exports.Stepper=I;
|
package/dist/navigation.es.js
CHANGED
|
@@ -268,7 +268,7 @@ const M = ({
|
|
|
268
268
|
"--rs-right-side-color": u
|
|
269
269
|
};
|
|
270
270
|
return r === 0 ? null : /* @__PURE__ */ h("div", { className: "border border-[#E5E7EB] py-2 mx-2 rounded-lg bg-[#F9FAFB] shadow-[0px_2px_4px_-1px_#00000008,0px_4px_6px_-1px_#0000000D]", children: [
|
|
271
|
-
/* @__PURE__ */ e("div", { className: "pl-2 pt-2 pb-3 text-[14px] font-bold", children: "Workflow
|
|
271
|
+
/* @__PURE__ */ e("div", { className: "pl-2 pt-2 pb-3 text-[14px] font-bold", children: "Workflow Progresss" }),
|
|
272
272
|
/* @__PURE__ */ e("div", { className: `rs-stepper ${m === "vertical" ? "rs-stepper--vertical" : m === "horizontal" ? "rs-stepper--horizontal" : "rs-stepper--responsive"}`, style: F, children: /* @__PURE__ */ e("div", { className: "rs-stepper__scroll", children: /* @__PURE__ */ h("div", { className: "rs-stepper__row", children: [
|
|
273
273
|
/* @__PURE__ */ e("div", { className: "rs-stepper__track", children: /* @__PURE__ */ e("div", { className: "rs-stepper__progress" }) }),
|
|
274
274
|
_.map((c) => /* @__PURE__ */ e(
|