aravint-ui-navigation 1.0.43 → 1.0.45

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react");function E(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(a,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return a.default=s,Object.freeze(a)}const k=E(f),D=({tabs:s,defaultValue:a,value:t,onValueChange:i,className:r="",tabListClassName:n="",tabButtonClassName:b="",contentClassName:p="",showTabNumbers:l=!0,showContent:c=!0,animated:h=!0})=>{var F;const d=t!==void 0,[_,y]=f.useState(a||((F=s[0])==null?void 0:F.id)||""),g=d?t:_,j=o=>{d||y(o),i==null||i(o)},v=s.find(o=>o.id===g),w={display:"flex",alignItems:"flex-end",borderBottom:"1px solid #059669",position:"sticky",top:0,zIndex:100,flexShrink:0},N={display:"flex",alignItems:"center",fontFamily:"inherit",background:"transparent",cursor:"pointer",outline:"none",transition:"all .2s ease",position:"relative"},x={background:"#E8F7F1",color:"#059669",fontWeight:700,borderTop:"3px solid #059669",borderLeft:"1px solid #059669",borderRight:"1px solid #059669",borderBottom:"1px solid #E8F7F1",borderTopLeftRadius:8,borderTopRightRadius:8,marginBottom:-1,zIndex:2},u={background:"transparent",color:"#2D3748",borderTop:"3px solid transparent",borderLeft:"1px solid transparent",borderRight:"1px solid transparent",borderBottom:"1px solid transparent",borderTopLeftRadius:8,borderTopRightRadius:8},m={background:"#ECFDF5",color:"#059669",fontWeight:700,border:"1px solid #059669"},z={background:"#FFFFFF",color:"#1F2937",fontWeight:"500",border:"1px solid #1F2937"},R={background:"#FFFFFF",border:"1px solid #D9E1E7",borderTop:"none",borderBottomLeftRadius:12,borderBottomRightRadius:12,boxShadow:"0 2px 6px rgba(0,0,0,.05)",transition:h?"opacity .2s ease":void 0,opacity:1,flex:1,overflowY:"auto",minHeight:0};return e.jsxs("div",{className:r,style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",minHeight:0,overflow:"hidden"},children:[e.jsx("style",{children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react");function E(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(a,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return a.default=s,Object.freeze(a)}const k=E(f),D=({tabs:s,defaultValue:a,value:t,onValueChange:i,className:r="",tabListClassName:n="",tabButtonClassName:b="",contentClassName:p="thin-scrollbar",showTabNumbers:o=!0,showContent:c=!0,animated:h=!0})=>{var F;const d=t!==void 0,[_,y]=f.useState(a||((F=s[0])==null?void 0:F.id)||""),g=d?t:_,j=l=>{d||y(l),i==null||i(l)},v=s.find(l=>l.id===g),w={display:"flex",alignItems:"flex-end",borderBottom:"1px solid #059669",position:"sticky",top:0,zIndex:100,flexShrink:0},N={display:"flex",alignItems:"center",fontFamily:"inherit",background:"transparent",cursor:"pointer",outline:"none",transition:"all .2s ease",position:"relative"},x={background:"#E8F7F1",color:"#059669",fontWeight:700,borderTop:"3px solid #059669",borderLeft:"1px solid #059669",borderRight:"1px solid #059669",borderBottom:"1px solid #E8F7F1",borderTopLeftRadius:8,borderTopRightRadius:8,marginBottom:-1,zIndex:2},u={background:"transparent",color:"#2D3748",borderTop:"3px solid transparent",borderLeft:"1px solid transparent",borderRight:"1px solid transparent",borderBottom:"1px solid transparent",borderTopLeftRadius:8,borderTopRightRadius:8},m={background:"#ECFDF5",color:"#059669",fontWeight:700,border:"1px solid #059669"},z={background:"#FFFFFF",color:"#1F2937",fontWeight:"500",border:"1px solid #1F2937"},R={background:"#FFFFFF",border:"1px solid #D9E1E7",borderTop:"none",borderBottomLeftRadius:12,borderBottomRightRadius:12,boxShadow:"0 2px 6px rgba(0,0,0,.05)",transition:h?"opacity .2s ease":void 0,opacity:1,flex:1,overflowY:"auto",minHeight:0};return e.jsxs("div",{className:r,style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",minHeight:0,overflow:"hidden"},children:[e.jsx("style",{children:`
2
2
  .ctabs-list {
3
3
  padding: 0 10px;
4
4
  gap: 0px;
@@ -72,4 +72,4 @@
72
72
  font-size: 10px;
73
73
  }
74
74
  }
75
- `}),e.jsx("div",{style:w,className:`ctabs-list ${n}`,children:s.map((o,B)=>{const S=g===o.id;return e.jsxs("button",{role:"tab","aria-selected":S,disabled:o.disabled,onClick:()=>!o.disabled&&j(o.id),style:{...N,...S?x:u,opacity:o.disabled?.5:1,cursor:o.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[l&&e.jsx("span",{className:"ctabs-badge",style:S?m:z,children:B+1}),o.icon,e.jsx("span",{className:"ctabs-label",children:o.label})]},o.id)})}),c&&v&&e.jsx("div",{style:R,className:p,children:v.content})]})},L=s=>k.createElement("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},k.createElement("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),T=f.memo(({computed:s,showTime:a})=>{const{step:t,index:i,status:r}=s,n=["rs-stepper__circle",r==="completed"?"rs-stepper__circle--completed":"",r==="active"?"rs-stepper__circle--active":""].filter(Boolean).join(" "),b=["rs-stepper__title",r==="pending"?"rs-stepper__title--pending":"",r==="active"?"rs-stepper__title--active":""].filter(Boolean).join(" "),p=i!==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:p?i:null}),r==="completed"&&e.jsx("span",{className:"rs-stepper__check","aria-hidden":"true",children:e.jsx(L,{})})]}),e.jsx("div",{className:b,children:t.title}),t.date&&e.jsx("div",{className:"rs-stepper__date",children:t.date}),a&&t.time&&e.jsx("div",{className:"rs-stepper__time",children:t.time})]})});T.displayName="StepCircle";const C=({steps:s,currentStep:a,completedColor:t="#059669",pendingColor:i="#9ca3af",activeColor:r="#059669",lineColor:n="#e5e7eb",showTime:b=!0,orientation:p="responsive"})=>{const l=s.length,c=a>l,h=Math.max(1,Math.min(a,l)),d=c?Math.max(0,l-1):Math.max(0,Math.min(l-1,h-1)),_=f.useMemo(()=>s.map((x,u)=>{let m="pending";return c||u<d?m="completed":u===d&&(m="active"),{step:x,index:u,status:m}}),[s,d,c]),y=l>0?100/l/2:0,g=l>1?c?100:d/(l-1)*100:0,j=c||h>1?t:n,v=c||h>l?t:n,w={"--rs-completed-color":t,"--rs-pending-color":i,"--rs-active-color":r,"--rs-line-color":n,"--rs-half-step":`${y}%`,"--rs-progress":`${g}%`,"--rs-left-side-color":j,"--rs-right-side-color":v};if(l===0)return null;const N=p==="vertical"?"rs-stepper--vertical":p==="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 Progress"}),e.jsx("div",{className:`rs-stepper ${N}`,style:w,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(T,{computed:x,showTime:b},x.step.id))]})})})]})},M=f.memo(C),I=({rows:s,className:a="mt-2 mx-2"})=>e.jsx("div",{className:`summary-detail-card ${a}`.trim(),children:s.map((t,i)=>e.jsx("div",{className:"summary-detail-card__row",children:t.map((r,n)=>e.jsxs("div",{className:"summary-detail-card__field",style:{"--dc-span":r.span??1},children:[e.jsx("p",{className:"summary-detail-card__label",children:r.label}),e.jsx("p",{className:`summary-detail-card__value${r.size==="lg"?" summary-detail-card__value--lg":""}`,children:r.value})]},n))},i))}),$=({title:s,description:a,icon:t,className:i="",children:r})=>e.jsxs("div",{className:`flex flex-col items-center justify-center py-4 px-4 text-center ${i}`,children:[t&&e.jsx("div",{className:"mb-2",children:t}),e.jsx("div",{className:"text-[14px] font-semibold text-[#34343F]",children:s}),(a||r)&&e.jsx("div",{className:"mt-2 max-w-[650px]",style:{fontSize:"12px",lineHeight:1.6,color:"#A19D9D"},children:r??a})]});exports.CustomTabs=D;exports.EmptyState=$;exports.Stepper=M;exports.SummaryDetailsCard=I;
75
+ `}),e.jsx("div",{style:w,className:`ctabs-list ${n}`,children:s.map((l,B)=>{const S=g===l.id;return e.jsxs("button",{role:"tab","aria-selected":S,disabled:l.disabled,onClick:()=>!l.disabled&&j(l.id),style:{...N,...S?x:u,opacity:l.disabled?.5:1,cursor:l.disabled?"not-allowed":"pointer"},className:`ctabs-btn ${b}`,children:[o&&e.jsx("span",{className:"ctabs-badge",style:S?m:z,children:B+1}),l.icon,e.jsx("span",{className:"ctabs-label",children:l.label})]},l.id)})}),c&&v&&e.jsx("div",{style:R,className:p,children:v.content})]})},L=s=>k.createElement("svg",{viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},k.createElement("path",{d:"M2 6.2L4.6 8.8L10 3",stroke:"#ffffff",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),T=f.memo(({computed:s,showTime:a})=>{const{step:t,index:i,status:r}=s,n=["rs-stepper__circle",r==="completed"?"rs-stepper__circle--completed":"",r==="active"?"rs-stepper__circle--active":""].filter(Boolean).join(" "),b=["rs-stepper__title",r==="pending"?"rs-stepper__title--pending":"",r==="active"?"rs-stepper__title--active":""].filter(Boolean).join(" "),p=i!==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:p?i:null}),r==="completed"&&e.jsx("span",{className:"rs-stepper__check","aria-hidden":"true",children:e.jsx(L,{})})]}),e.jsx("div",{className:b,children:t.title}),t.date&&e.jsx("div",{className:"rs-stepper__date",children:t.date}),a&&t.time&&e.jsx("div",{className:"rs-stepper__time",children:t.time})]})});T.displayName="StepCircle";const C=({steps:s,currentStep:a,completedColor:t="#059669",pendingColor:i="#9ca3af",activeColor:r="#059669",lineColor:n="#e5e7eb",showTime:b=!0,orientation:p="responsive"})=>{const o=s.length,c=a>o,h=Math.max(1,Math.min(a,o)),d=c?Math.max(0,o-1):Math.max(0,Math.min(o-1,h-1)),_=f.useMemo(()=>s.map((x,u)=>{let m="pending";return c||u<d?m="completed":u===d&&(m="active"),{step:x,index:u,status:m}}),[s,d,c]),y=o>0?100/o/2:0,g=o>1?c?100:d/(o-1)*100:0,j=c||h>1?t:n,v=c||h>o?t:n,w={"--rs-completed-color":t,"--rs-pending-color":i,"--rs-active-color":r,"--rs-line-color":n,"--rs-half-step":`${y}%`,"--rs-progress":`${g}%`,"--rs-left-side-color":j,"--rs-right-side-color":v};if(o===0)return null;const N=p==="vertical"?"rs-stepper--vertical":p==="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 Progress"}),e.jsx("div",{className:`rs-stepper ${N}`,style:w,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(T,{computed:x,showTime:b},x.step.id))]})})})]})},M=f.memo(C),I=({rows:s,className:a="mt-2 mx-2"})=>e.jsx("div",{className:`summary-detail-card ${a}`.trim(),children:s.map((t,i)=>e.jsx("div",{className:"summary-detail-card__row",children:t.map((r,n)=>e.jsxs("div",{className:"summary-detail-card__field",style:{"--dc-span":r.span??1},children:[e.jsx("p",{className:"summary-detail-card__label",children:r.label}),e.jsx("p",{className:`summary-detail-card__value${r.size==="lg"?" summary-detail-card__value--lg":""}`,children:r.value})]},n))},i))}),$=({title:s,description:a,icon:t,className:i="",children:r})=>e.jsxs("div",{className:`flex flex-col items-center justify-center py-4 px-4 text-center ${i}`,children:[t&&e.jsx("div",{className:"mb-2",children:t}),e.jsx("div",{className:"text-[14px] font-semibold text-[#34343F]",children:s}),(a||r)&&e.jsx("div",{className:"mt-2 max-w-[650px]",style:{fontSize:"12px",lineHeight:1.6,color:"#A19D9D"},children:r??a})]});exports.CustomTabs=D;exports.EmptyState=$;exports.Stepper=M;exports.SummaryDetailsCard=I;
@@ -9,7 +9,7 @@ const W = ({
9
9
  className: s = "",
10
10
  tabListClassName: n = "",
11
11
  tabButtonClassName: h = "",
12
- contentClassName: b = "",
12
+ contentClassName: b = "thin-scrollbar",
13
13
  showTabNumbers: o = !0,
14
14
  showContent: c = !0,
15
15
  animated: f = !0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aravint-ui-navigation",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "main": "dist/navigation.cjs.js",
5
5
  "module": "dist/navigation.es.js",
6
6
  "types": "dist/types/index.d.ts",