tcce-design-system-test 0.3.15 → 0.3.17
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.
|
@@ -9448,11 +9448,11 @@ const Ws = T.div`
|
|
|
9448
9448
|
const l = u.length > 0, h = e.href || e.path || "", f = !!(h && r && r.startsWith(h)), m = () => {
|
|
9449
9449
|
o((w) => !w);
|
|
9450
9450
|
}, y = () => {
|
|
9451
|
-
e.href && i?.(e.href)
|
|
9451
|
+
e.href && i?.(e.href);
|
|
9452
9452
|
}, b = async () => {
|
|
9453
9453
|
if (e.path)
|
|
9454
9454
|
try {
|
|
9455
|
-
typeof window < "u" && window.open(e.path, "_blank", "noopener,noreferrer"), c && c(!1);
|
|
9455
|
+
e.href && i?.(e.href), typeof window < "u" && window.open(e.path, "_blank", "noopener,noreferrer"), c && c(!1);
|
|
9456
9456
|
} catch (w) {
|
|
9457
9457
|
console.error("Error al navegar a microservicio:", w);
|
|
9458
9458
|
}
|
|
@@ -9620,7 +9620,9 @@ const Ws = T.div`
|
|
|
9620
9620
|
onNavigate: s = () => {
|
|
9621
9621
|
}
|
|
9622
9622
|
}) => {
|
|
9623
|
-
const { isCollapsed: o, setIsCollapsed: a, isMobileOpen: c, setIsMobileOpen: u } = pc()
|
|
9623
|
+
const { isCollapsed: o, setIsCollapsed: a, isMobileOpen: c, setIsMobileOpen: u } = pc(), d = (l) => {
|
|
9624
|
+
s(l), typeof window < "u" && window.innerWidth < 768 && u(!1);
|
|
9625
|
+
};
|
|
9624
9626
|
return /* @__PURE__ */ M(ni, { children: [
|
|
9625
9627
|
/* @__PURE__ */ p(fn, { children: c && /* @__PURE__ */ p(cy, { ...fc, onClick: () => u(!1) }) }),
|
|
9626
9628
|
/* @__PURE__ */ M(uy, { $collapsed: c ? !1 : o, $open: c, children: [
|
|
@@ -9642,15 +9644,15 @@ const Ws = T.div`
|
|
|
9642
9644
|
}
|
|
9643
9645
|
)
|
|
9644
9646
|
] }),
|
|
9645
|
-
/* @__PURE__ */ p(fy, { children: e.map((
|
|
9647
|
+
/* @__PURE__ */ p(fy, { children: e.map((l) => /* @__PURE__ */ p(
|
|
9646
9648
|
yc,
|
|
9647
9649
|
{
|
|
9648
|
-
item:
|
|
9650
|
+
item: l,
|
|
9649
9651
|
userRoles: t,
|
|
9650
|
-
onNavigate:
|
|
9652
|
+
onNavigate: d,
|
|
9651
9653
|
activePath: n
|
|
9652
9654
|
},
|
|
9653
|
-
|
|
9655
|
+
l.id
|
|
9654
9656
|
)) })
|
|
9655
9657
|
] }),
|
|
9656
9658
|
/* @__PURE__ */ p(
|
|
@@ -1160,7 +1160,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Pn]+=1);const yr={80:E`
|
|
|
1160
1160
|
transform: rotate(${({$open:e})=>e?"90deg":"0deg"});
|
|
1161
1161
|
pointer-events: none;
|
|
1162
1162
|
transition: transform 0.3s ease-out;
|
|
1163
|
-
`,yc=({item:e,userRoles:t,level:n=0,activePath:r,onNavigate:o})=>{const[s,i]=f.useState(!1),{isCollapsed:a,setIsMobileOpen:c}=qo(),d=f.useMemo(()=>(e.children||[]).filter(x=>Zo(t,x.permissions)),[e.children,t]);if(!f.useMemo(()=>Zo(t,e.permissions),[t,e.permissions]))return null;const l=d.length>0,h=e.href||e.path||"",m=!!(h&&r&&r.startsWith(h)),g=()=>{i(x=>!x)},v=()=>{e.href&&o?.(e.href)
|
|
1163
|
+
`,yc=({item:e,userRoles:t,level:n=0,activePath:r,onNavigate:o})=>{const[s,i]=f.useState(!1),{isCollapsed:a,setIsMobileOpen:c}=qo(),d=f.useMemo(()=>(e.children||[]).filter(x=>Zo(t,x.permissions)),[e.children,t]);if(!f.useMemo(()=>Zo(t,e.permissions),[t,e.permissions]))return null;const l=d.length>0,h=e.href||e.path||"",m=!!(h&&r&&r.startsWith(h)),g=()=>{i(x=>!x)},v=()=>{e.href&&o?.(e.href)},b=async()=>{if(e.path)try{e.href&&o?.(e.href),typeof window<"u"&&window.open(e.path,"_blank","noopener,noreferrer"),c&&c(!1)}catch(x){console.error("Error al navegar a microservicio:",x)}},y=()=>p.jsxs(p.Fragment,{children:[p.jsxs(ey,{children:[n>0&&!a&&p.jsx(oy,{}),e.icon&&p.jsx(Y,{component:e.icon,size:n===0?"md":"sm",color:"var(--color-main-blue-primary)"}),!a&&p.jsx(ty,{$level:n,size:n===0?16:n===1?14:12,color:"var(--color-dark-700, #374151)",children:e.label})]}),!a&&l&&p.jsx(iy,{$disabled:a,$open:s,children:p.jsx(Y,{component:Yg,size:"sm",color:"var(--color-main-blue-primary)"})})]});return p.jsxs(ry,{$level:n,children:[e.href&&!e.path&&!l?p.jsx(J0,{type:"button",onClick:v,$level:n,$collapsed:a,$active:m,title:a?e.label:"",children:y()}):p.jsx(Q0,{type:"button",onClick:l?g:e.path?b:v,$level:n,$collapsed:a,$active:m,$expanded:s&&l,title:a?e.label:"",children:y()}),p.jsx(qt,{initial:!1,children:!a&&s&&l&&p.jsx(ny,{$level:n+1,...dc,children:d.map(x=>p.jsx(yc,{item:x,userRoles:t,level:n+1,onNavigate:o,activePath:r},x.id))})})]})},vc=T(ze.div)`
|
|
1164
1164
|
position: fixed;
|
|
1165
1165
|
inset: 0;
|
|
1166
1166
|
background: rgba(0, 0, 0, 0.5);
|
|
@@ -1245,7 +1245,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Pn]+=1);const yr={80:E`
|
|
|
1245
1245
|
@media (min-width: 768px) {
|
|
1246
1246
|
display: none;
|
|
1247
1247
|
}
|
|
1248
|
-
`,Jo=({navigationConfig:e,userRoles:t=[],activePath:n,logoImgExpanded:r,logoImgCollapsed:o,onNavigate:s=()=>{}})=>{const{isCollapsed:i,setIsCollapsed:a,isMobileOpen:c,setIsMobileOpen:d}=qo();return p.jsxs(p.Fragment,{children:[p.jsx(qt,{children:c&&p.jsx(vc,{...Go,onClick:()=>d(!1)})}),p.jsxs(bc,{$collapsed:c?!1:i,$open:c,children:[p.jsxs(wc,{$collapsed:i,children:[p.jsx(xc,{children:i?o:r}),p.jsx(Cc,{onClick:()=>a(!i),"aria-label":"Toggle collapse",children:p.jsx(Y,{component:Jl,size:"md",color:"var(--color-main-blue-primary)"})})]}),p.jsx(Sc,{children:e.map(
|
|
1248
|
+
`,Jo=({navigationConfig:e,userRoles:t=[],activePath:n,logoImgExpanded:r,logoImgCollapsed:o,onNavigate:s=()=>{}})=>{const{isCollapsed:i,setIsCollapsed:a,isMobileOpen:c,setIsMobileOpen:d}=qo(),u=l=>{s(l),typeof window<"u"&&window.innerWidth<768&&d(!1)};return p.jsxs(p.Fragment,{children:[p.jsx(qt,{children:c&&p.jsx(vc,{...Go,onClick:()=>d(!1)})}),p.jsxs(bc,{$collapsed:c?!1:i,$open:c,children:[p.jsxs(wc,{$collapsed:i,children:[p.jsx(xc,{children:i?o:r}),p.jsx(Cc,{onClick:()=>a(!i),"aria-label":"Toggle collapse",children:p.jsx(Y,{component:Jl,size:"md",color:"var(--color-main-blue-primary)"})})]}),p.jsx(Sc,{children:e.map(l=>p.jsx(yc,{item:l,userRoles:t,onNavigate:u,activePath:n},l.id))})]}),p.jsx(Tc,{onClick:()=>{d(!0),a(!1)},$hidden:c,children:p.jsx(Y,{component:Jl,size:30})})]})};Jo.displayName="Sidebar";const kc={underlined:E`
|
|
1249
1249
|
color: var(--color-main-orange-primary);
|
|
1250
1250
|
text-decoration-thickness: 1px;
|
|
1251
1251
|
text-underline-offset: 2px;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.17",
|
|
7
7
|
"description": "This package provides reusable UI components to ensure consistency across all CRM frontend applications",
|
|
8
8
|
"author": "BizAppsTotal <bizapps@tcce.biz>",
|
|
9
9
|
"type": "module",
|