anima-ds-nucleus 1.0.4 → 1.0.5
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/anima-ds.cjs.js +13 -12
- package/dist/anima-ds.esm.js +13 -12
- package/package.json +1 -1
- package/src/components/DataDisplay/Card/CardTituloCorto.jsx +1 -0
- package/src/components/DataDisplay/Card/CardTituloCortoMasEstado.jsx +1 -0
- package/src/components/DataDisplay/Card/CardTituloLargo.jsx +1 -0
- package/src/components/Layout/Header/HeaderConBuscador.stories.jsx +1 -0
- package/src/components/Layout/Header/HeaderCore.jsx +14 -13
- package/src/components/Layout/Sidebar/SidebarCore.jsx +1 -1
package/dist/anima-ds.cjs.js
CHANGED
|
@@ -76,16 +76,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
76
76
|
box-shadow: 0 0 0 1px #3b82f6;
|
|
77
77
|
}
|
|
78
78
|
@media (max-width: 768px) {
|
|
79
|
-
.header-
|
|
80
|
-
|
|
81
|
-
padding-left: 8px !important;
|
|
82
|
-
padding-right: 8px !important;
|
|
83
|
-
}
|
|
84
|
-
.header-search-icon-container {
|
|
85
|
-
width: 36px !important;
|
|
79
|
+
.header-mobile-layout {
|
|
80
|
+
display: block;
|
|
86
81
|
}
|
|
87
|
-
}
|
|
88
|
-
@media (max-width: 480px) {
|
|
89
82
|
.header-mobile-top-row {
|
|
90
83
|
display: flex;
|
|
91
84
|
align-items: center;
|
|
@@ -98,10 +91,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
98
91
|
padding: 12px 4px 8px 4px;
|
|
99
92
|
}
|
|
100
93
|
.header-desktop-layout {
|
|
101
|
-
display: none;
|
|
94
|
+
display: none !important;
|
|
95
|
+
}
|
|
96
|
+
.header-mobile-layout .header-search-input {
|
|
97
|
+
font-size: 12px !important;
|
|
98
|
+
padding-left: 8px !important;
|
|
99
|
+
padding-right: 8px !important;
|
|
100
|
+
}
|
|
101
|
+
.header-mobile-layout .header-search-icon-container {
|
|
102
|
+
width: 36px !important;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
@media (min-width:
|
|
105
|
+
@media (min-width: 769px) {
|
|
105
106
|
.header-mobile-layout {
|
|
106
107
|
display: none;
|
|
107
108
|
}
|
|
@@ -130,7 +131,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
130
131
|
text-white rounded-full flex items-center justify-center\r
|
|
131
132
|
text-body-sm font-medium`,style:{backgroundColor:"#6D3856",borderRadius:"12px"},children:i.inicio>9?"9+":i.inicio})]})}),a.map((R,M)=>t.jsxs("div",{className:"mb-6",children:[t.jsx("div",{className:"px-4 mb-2",children:t.jsx(Z,{variant:"body-sm",className:"color-gray-500 uppercase font-medium tracking-wider",children:R.title})}),t.jsx("div",{className:"space-y-1",children:R.items.map(C=>t.jsx("div",{className:"px-4",children:t.jsxs("button",{onClick:()=>{l&&l(C.id),v()},className:`w-full flex items-center cursor-pointer px-4 justify-between py-2.5 rounded-lg transition-all duration-200 ${r===C.id?"":"color-gray-700 hover:bg-gray-100"}`,style:r===C.id?{backgroundColor:"#2D5C63"}:{},children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx(b,{name:C.icon,variant:"24-outline",size:20,className:`mr-3 ${r===C.id?"color-white":"color-gray-700"}`}),t.jsx(Z,{variant:"body-md",className:`font-medium ${r===C.id?"color-white":"color-gray-700"}`,children:C.label})]}),(i[C.id]!==void 0&&i[C.id]>0||C.id==="empleados"&&2)&&t.jsx("span",{className:`px-2 py-0.5 min-w-[20px] h-5 \r
|
|
132
133
|
text-white rounded-full flex items-center justify-center\r
|
|
133
|
-
text-body-sm font-medium`,style:{backgroundColor:"#6D3856",borderRadius:"12px"},children:C.id==="empleados"?2:i[C.id]>9?"9+":i[C.id]})]})},C.id))})]},M))]}),u&&t.jsx("div",{className:"px-4 pb-4 flex-shrink-0",children:t.jsx("div",{className:"bg-white border rounded-lg px-3 py-2 flex items-center justify-center",style:{borderColor:"#2D5C63",borderRadius:"8px"},children:typeof u=="string"?t.jsx(Z,{variant:"body-sm",style:{color:"#2D5C63"},className:"text-center",children:(()=>{const R=u.split("|");if(R.length===2){const M=R[0].trim(),C=R[1].trim();if(C.includes("Powered by")){const E=C.match(/Powered by (.+)/);if(E)return t.jsxs(t.Fragment,{children:[M," | Powered by ",t.jsx("span",{className:"font-bold",children:E[1]})]})}return`${M} | ${C}`}return u})()}):t.jsxs(Z,{variant:"body-sm",style:{color:"#2D5C63"},className:"text-center",children:[u.version&&`${u.version}`,u.version&&(u.poweredBy||u.brand)&&" | ",u.poweredBy&&`${u.poweredBy} `,u.brand&&t.jsx("span",{className:"font-bold",children:u.brand})]})})})]})})]})},dN=({sections:a=c5,activeItem:r,onItemClick:l,defaultCollapsed:n=!1,companyName:c="HEXA Core",companyLogo:s,onCompanyClick:i,nucleusName:u="Nucleus AR",nucleusLogo:d,onNucleusClick:f,itemBadges:w={},footerText:h,footerCollapsedContent:g,className:v="",...A})=>{const[R,M]=y.useState(n),[C,E]=y.useState(!1);y.useEffect(()=>{const H=()=>{E(window.innerWidth<=
|
|
134
|
+
text-body-sm font-medium`,style:{backgroundColor:"#6D3856",borderRadius:"12px"},children:C.id==="empleados"?2:i[C.id]>9?"9+":i[C.id]})]})},C.id))})]},M))]}),u&&t.jsx("div",{className:"px-4 pb-4 flex-shrink-0",children:t.jsx("div",{className:"bg-white border rounded-lg px-3 py-2 flex items-center justify-center",style:{borderColor:"#2D5C63",borderRadius:"8px"},children:typeof u=="string"?t.jsx(Z,{variant:"body-sm",style:{color:"#2D5C63"},className:"text-center",children:(()=>{const R=u.split("|");if(R.length===2){const M=R[0].trim(),C=R[1].trim();if(C.includes("Powered by")){const E=C.match(/Powered by (.+)/);if(E)return t.jsxs(t.Fragment,{children:[M," | Powered by ",t.jsx("span",{className:"font-bold",children:E[1]})]})}return`${M} | ${C}`}return u})()}):t.jsxs(Z,{variant:"body-sm",style:{color:"#2D5C63"},className:"text-center",children:[u.version&&`${u.version}`,u.version&&(u.poweredBy||u.brand)&&" | ",u.poweredBy&&`${u.poweredBy} `,u.brand&&t.jsx("span",{className:"font-bold",children:u.brand})]})})})]})})]})},dN=({sections:a=c5,activeItem:r,onItemClick:l,defaultCollapsed:n=!1,companyName:c="HEXA Core",companyLogo:s,onCompanyClick:i,nucleusName:u="Nucleus AR",nucleusLogo:d,onNucleusClick:f,itemBadges:w={},footerText:h,footerCollapsedContent:g,className:v="",...A})=>{const[R,M]=y.useState(n),[C,E]=y.useState(!1);y.useEffect(()=>{const H=()=>{E(window.innerWidth<=768)};return H(),window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}},[]);const N=()=>{M(!R)},V=(()=>{if(g)return g;if(h&&!g){if(typeof h=="string")return h.split("|")[0].trim()||h.trim();if(typeof h=="object"&&h.version)return h.version}return null})();return C?t.jsx(i5,{sections:a,activeItem:r,onItemClick:l,companyName:c,companyLogo:s,onCompanyClick:i,itemBadges:w,footerText:h,footerCollapsedContent:g,className:v,...A}):t.jsx("aside",{className:`bg-white border-r border-gray-200 transition-all duration-300 ease-in-out h-full ${R?"w-20":"w-64"} ${v}`,...A,children:t.jsxs("nav",{className:"h-full flex flex-col",style:{overflow:"hidden"},children:[!R&&t.jsx("div",{className:"p-4 border-b border-gray-200 flex-shrink-0",children:t.jsx("button",{onClick:i,className:`w-full bg-white rounded-lg px-3 py-2.5 \r
|
|
134
135
|
flex items-center justify-between hover:bg-gray-50 transition-colors`,children:t.jsxs("div",{className:"flex items-center space-x-3",children:[s?t.jsx("img",{src:s,alt:c,className:"w-8 h-8 rounded"}):t.jsx(a0,{width:36,height:40}),t.jsx(Z,{variant:"body-md",className:"color-gray-900 font-medium",children:c})]})})}),!R&&t.jsx("div",{className:"px-4 pt-2 pb-2 flex justify-end flex-shrink-0",children:t.jsx("button",{onClick:N,className:"p-1.5 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Colapsar sidebar",style:{marginRight:"10px"},children:t.jsx(b,{name:"ChevronDoubleLeftIcon",variant:"24-outline",size:20,className:"color-teal"})})}),R&&t.jsx("div",{className:"p-4 border-b border-gray-200 flex justify-center flex-shrink-0",children:s?t.jsx("img",{src:s,alt:c,className:"w-8 h-8 rounded"}):t.jsx(a0,{width:36,height:40})}),R&&t.jsx("div",{className:"px-4 pt-2 pb-2 flex justify-center flex-shrink-0",children:t.jsx("button",{onClick:N,className:"p-1.5 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Expandir sidebar",children:t.jsx(b,{name:"ChevronDoubleRightIcon",variant:"24-outline",size:20,className:"color-teal"})})}),t.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:t.jsxs("div",{className:`flex-1 overflow-y-auto ${R?"py-2":"py-4"}`,style:{overflowX:"hidden"},children:[t.jsx("div",{className:"px-4 mb-4",children:t.jsxs("button",{onClick:()=>l&&l("inicio"),className:`w-full flex items-center ${R?"justify-center px-2":"px-4 justify-between"} py-2.5 rounded-lg transition-all duration-200 ${r==="inicio"?"":"color-gray-700 hover:bg-gray-100"}`,style:r==="inicio"?{backgroundColor:"#2D5C63"}:{},children:[t.jsxs("div",{className:`flex items-center ${R?"relative":""}`,style:R&&w.inicio!==void 0&&w.inicio>0?{paddingRight:"16px"}:{},children:[t.jsx(b,{name:"HomeIcon",variant:"24-outline",size:20,className:`${R?"":"mr-3"} ${r==="inicio"?"color-white":"color-gray-700"}`}),!R&&t.jsx(Z,{variant:"body-md",className:`font-medium ${r==="inicio"?"color-white":"color-gray-700"}`,children:"Inicio"}),R&&w.inicio!==void 0&&w.inicio>0&&t.jsx("span",{className:`px-2 py-0.5 min-w-[20px] h-5 \r
|
|
135
136
|
text-white rounded-full flex items-center justify-center\r
|
|
136
137
|
text-body-sm font-medium absolute`,style:{backgroundColor:"#6D3856",borderRadius:"12px",top:"-4px",right:"-4px",zIndex:10},children:w.inicio>9?"9+":w.inicio})]}),!R&&w.inicio!==void 0&&w.inicio>0&&t.jsx("span",{className:`px-2 py-0.5 min-w-[20px] h-5 \r
|
package/dist/anima-ds.esm.js
CHANGED
|
@@ -32331,16 +32331,9 @@ const e5 = FD, b = ({
|
|
|
32331
32331
|
box-shadow: 0 0 0 1px #3b82f6;
|
|
32332
32332
|
}
|
|
32333
32333
|
@media (max-width: 768px) {
|
|
32334
|
-
.header-
|
|
32335
|
-
|
|
32336
|
-
padding-left: 8px !important;
|
|
32337
|
-
padding-right: 8px !important;
|
|
32338
|
-
}
|
|
32339
|
-
.header-search-icon-container {
|
|
32340
|
-
width: 36px !important;
|
|
32334
|
+
.header-mobile-layout {
|
|
32335
|
+
display: block;
|
|
32341
32336
|
}
|
|
32342
|
-
}
|
|
32343
|
-
@media (max-width: 480px) {
|
|
32344
32337
|
.header-mobile-top-row {
|
|
32345
32338
|
display: flex;
|
|
32346
32339
|
align-items: center;
|
|
@@ -32353,10 +32346,18 @@ const e5 = FD, b = ({
|
|
|
32353
32346
|
padding: 12px 4px 8px 4px;
|
|
32354
32347
|
}
|
|
32355
32348
|
.header-desktop-layout {
|
|
32356
|
-
display: none;
|
|
32349
|
+
display: none !important;
|
|
32350
|
+
}
|
|
32351
|
+
.header-mobile-layout .header-search-input {
|
|
32352
|
+
font-size: 12px !important;
|
|
32353
|
+
padding-left: 8px !important;
|
|
32354
|
+
padding-right: 8px !important;
|
|
32355
|
+
}
|
|
32356
|
+
.header-mobile-layout .header-search-icon-container {
|
|
32357
|
+
width: 36px !important;
|
|
32357
32358
|
}
|
|
32358
32359
|
}
|
|
32359
|
-
@media (min-width:
|
|
32360
|
+
@media (min-width: 769px) {
|
|
32360
32361
|
.header-mobile-layout {
|
|
32361
32362
|
display: none;
|
|
32362
32363
|
}
|
|
@@ -33088,7 +33089,7 @@ const e5 = FD, b = ({
|
|
|
33088
33089
|
const [R, M] = I(n), [C, E] = I(!1);
|
|
33089
33090
|
l0(() => {
|
|
33090
33091
|
const F = () => {
|
|
33091
|
-
E(window.innerWidth <=
|
|
33092
|
+
E(window.innerWidth <= 768);
|
|
33092
33093
|
};
|
|
33093
33094
|
return F(), window.addEventListener("resize", F), () => {
|
|
33094
33095
|
window.removeEventListener("resize", F);
|
package/package.json
CHANGED
|
@@ -56,16 +56,9 @@ export const HeaderCore = ({
|
|
|
56
56
|
box-shadow: 0 0 0 1px #3b82f6;
|
|
57
57
|
}
|
|
58
58
|
@media (max-width: 768px) {
|
|
59
|
-
.header-
|
|
60
|
-
|
|
61
|
-
padding-left: 8px !important;
|
|
62
|
-
padding-right: 8px !important;
|
|
63
|
-
}
|
|
64
|
-
.header-search-icon-container {
|
|
65
|
-
width: 36px !important;
|
|
59
|
+
.header-mobile-layout {
|
|
60
|
+
display: block;
|
|
66
61
|
}
|
|
67
|
-
}
|
|
68
|
-
@media (max-width: 480px) {
|
|
69
62
|
.header-mobile-top-row {
|
|
70
63
|
display: flex;
|
|
71
64
|
align-items: center;
|
|
@@ -78,10 +71,18 @@ export const HeaderCore = ({
|
|
|
78
71
|
padding: 12px 4px 8px 4px;
|
|
79
72
|
}
|
|
80
73
|
.header-desktop-layout {
|
|
81
|
-
display: none;
|
|
74
|
+
display: none !important;
|
|
75
|
+
}
|
|
76
|
+
.header-mobile-layout .header-search-input {
|
|
77
|
+
font-size: 12px !important;
|
|
78
|
+
padding-left: 8px !important;
|
|
79
|
+
padding-right: 8px !important;
|
|
80
|
+
}
|
|
81
|
+
.header-mobile-layout .header-search-icon-container {
|
|
82
|
+
width: 36px !important;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
@media (min-width:
|
|
85
|
+
@media (min-width: 769px) {
|
|
85
86
|
.header-mobile-layout {
|
|
86
87
|
display: none;
|
|
87
88
|
}
|
|
@@ -89,7 +90,7 @@ export const HeaderCore = ({
|
|
|
89
90
|
`}</style>
|
|
90
91
|
|
|
91
92
|
<div className="w-full" style={{ paddingLeft: '4px', paddingRight: '4px' }}>
|
|
92
|
-
{/* Layout Desktop (más de
|
|
93
|
+
{/* Layout Desktop (más de 768px) */}
|
|
93
94
|
<div className="header-desktop-layout flex items-center justify-between h-16">
|
|
94
95
|
{/* Barra de búsqueda con icono a la derecha */}
|
|
95
96
|
<div className="flex-1 mr-2 md:mr-4" style={{ maxWidth: 'none', minWidth: '0' }}>
|
|
@@ -208,7 +209,7 @@ export const HeaderCore = ({
|
|
|
208
209
|
</div>
|
|
209
210
|
</div>
|
|
210
211
|
|
|
211
|
-
{/* Layout Mobile (
|
|
212
|
+
{/* Layout Mobile (768px o menos) */}
|
|
212
213
|
<div className="header-mobile-layout">
|
|
213
214
|
{/* Primera fila: Menú, Core, Notificaciones y Avatar */}
|
|
214
215
|
<div className="header-mobile-top-row">
|