tcce-design-system 0.3.32 → 0.3.33
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.
|
@@ -9909,7 +9909,6 @@ const U1 = ({
|
|
|
9909
9909
|
height: 100%;
|
|
9910
9910
|
background: var(--color-main-white);
|
|
9911
9911
|
border-bottom-right-radius: var(--border-radius-article);
|
|
9912
|
-
border-right: 1px solid var(--color-main-light-borders);
|
|
9913
9912
|
z-index: ${nt.SIDEBAR_ASIDE};
|
|
9914
9913
|
width: ${({ $collapsed: e }) => e ? ut.SIDEBAR_COLLAPSED_WIDTH : ut.SIDEBAR_EXPANDED_WIDTH};
|
|
9915
9914
|
transform: translateX(${({ $open: e }) => e ? "0" : "-100%"});
|
|
@@ -13489,12 +13488,6 @@ const n1 = S(Ue.div)`
|
|
|
13489
13488
|
p.key === "Escape" && i(!1);
|
|
13490
13489
|
};
|
|
13491
13490
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
13492
|
-
}, [r]), ie(() => {
|
|
13493
|
-
if (!r) {
|
|
13494
|
-
a.current?.focus();
|
|
13495
|
-
return;
|
|
13496
|
-
}
|
|
13497
|
-
l.current?.querySelector("button")?.focus();
|
|
13498
13491
|
}, [r]);
|
|
13499
13492
|
const u = (m) => {
|
|
13500
13493
|
if (!r || m.key !== "Tab" || !s.current)
|
|
@@ -13750,6 +13743,7 @@ const u1 = S.main`
|
|
|
13750
13743
|
transition: margin-left 0.3s ease-out;
|
|
13751
13744
|
background-color: var(--color-main-light-background);
|
|
13752
13745
|
padding: 1.25rem 1.5rem;
|
|
13746
|
+
border-top-left-radius: 1rem;
|
|
13753
13747
|
|
|
13754
13748
|
margin-left: ${ut.SIDEBAR_COLLAPSED_WIDTH};
|
|
13755
13749
|
`, fc = ({
|
|
@@ -1441,7 +1441,6 @@
|
|
|
1441
1441
|
height: 100%;
|
|
1442
1442
|
background: var(--color-main-white);
|
|
1443
1443
|
border-bottom-right-radius: var(--border-radius-article);
|
|
1444
|
-
border-right: 1px solid var(--color-main-light-borders);
|
|
1445
1444
|
z-index: ${je.SIDEBAR_ASIDE};
|
|
1446
1445
|
width: ${({$collapsed:e})=>e?ot.SIDEBAR_COLLAPSED_WIDTH:ot.SIDEBAR_EXPANDED_WIDTH};
|
|
1447
1446
|
transform: translateX(${({$open:e})=>e?"0":"-100%"});
|
|
@@ -2194,7 +2193,7 @@
|
|
|
2194
2193
|
&.danger {
|
|
2195
2194
|
color: var(--color-main-warning-state);
|
|
2196
2195
|
}
|
|
2197
|
-
`,Zr=({user:e,onProfileClick:t,onLogout:n,menuItems:o=[]})=>{const[r,i]=m.useState(!1),s=m.useRef(null),a=m.useRef(null),l=m.useRef(null),c=m.useId();m.useEffect(()=>{if(!r)return;const p=y=>{s.current&&!s.current.contains(y.target)&&i(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[r]),m.useEffect(()=>{if(!r)return;const p=y=>{y.key==="Escape"&&i(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r])
|
|
2196
|
+
`,Zr=({user:e,onProfileClick:t,onLogout:n,menuItems:o=[]})=>{const[r,i]=m.useState(!1),s=m.useRef(null),a=m.useRef(null),l=m.useRef(null),c=m.useId();m.useEffect(()=>{if(!r)return;const p=y=>{s.current&&!s.current.contains(y.target)&&i(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[r]),m.useEffect(()=>{if(!r)return;const p=y=>{y.key==="Escape"&&i(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[r]);const u=p=>{if(!r||p.key!=="Tab"||!s.current)return;const y=s.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(y.length===0)return;const b=y[0],w=y[y.length-1],x=document.activeElement;p.shiftKey&&x===b?(p.preventDefault(),w.focus()):!p.shiftKey&&x===w&&(p.preventDefault(),b.focus())},d=p=>p.split(" ").map(y=>y[0]).join("").toUpperCase().slice(0,2),h=[...[{id:"profile",label:"Profile",icon:yg,onClick:()=>{i(!1),t?.()},variant:"default"},{id:"logout",label:"Logout",icon:pg,onClick:()=>{i(!1),n?.()},variant:"danger"}],...o];return g.jsxs("div",{ref:s,style:{position:"relative"},onKeyDown:u,children:[g.jsxs(_y,{ref:a,type:"button",onClick:()=>i(!r),"aria-haspopup":"menu","aria-expanded":r,"aria-controls":c,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),i(!r))},children:[g.jsxs(By,{children:[g.jsx(Ve,{size:14,className:"font-semibold!",children:e?.name||""}),g.jsx(Ve,{size:12,children:e?.roles?.[0]?.name||""})]}),g.jsx(Ny,{className:"font-semibold!",children:d(e?.name||"")})]}),g.jsx(Ot,{children:r&&g.jsx(Oy,{id:c,ref:l,role:"menu",initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.15},children:h.map(p=>g.jsx(m.Fragment,{children:g.jsxs(zy,{type:"button",role:"menuitem",onClick:p.onClick,className:p.variant==="danger"?"danger":"",children:[g.jsx(U,{component:p.icon,size:"sm",color:p.variant==="danger"?"var(--color-main-warning-state)":"var(--color-main-blue-primary)"}),g.jsx(Ve,{size:14,color:`${p.variant==="danger"&&"var(--color-main-warning-state)"}`,children:p.label})]})},p.id))})})]})};Zr.displayName="UserProfile";const Ac=({hasNotifications:e=!1,notificationCount:t})=>{const n=(t??0)>0||e,o=t&&t>0?t:void 0,r=o?`${o} notification${o===1?"":"s"}`:n?"New notifications":"No notifications",i=`Notifications: ${r}`;return{effectiveHasNotifications:n,displayCount:o,badgeLabel:r,bellAriaLabel:i}},Hy=v.button`
|
|
2198
2197
|
position: relative;
|
|
2199
2198
|
background: transparent;
|
|
2200
2199
|
border: none;
|
|
@@ -2277,6 +2276,7 @@
|
|
|
2277
2276
|
transition: margin-left 0.3s ease-out;
|
|
2278
2277
|
background-color: var(--color-main-light-background);
|
|
2279
2278
|
padding: 1.25rem 1.5rem;
|
|
2279
|
+
border-top-left-radius: 1rem;
|
|
2280
2280
|
|
|
2281
2281
|
margin-left: ${ot.SIDEBAR_COLLAPSED_WIDTH};
|
|
2282
2282
|
`,ei=({children:e,className:t,id:n,inert:o,"aria-hidden":r})=>g.jsx(Ky,{id:n,className:t,inert:o,"aria-hidden":r,children:e});ei.displayName="LayoutMainContent";const Yy=v.div`
|
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.33",
|
|
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",
|