@cnc-ti/layout-basic 8.2.1 → 8.2.2
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/index.css +62 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +40 -2
- package/dist/index.d.ts +40 -2
- package/dist/index.js +29 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8217,35 +8217,48 @@ function getInitials(fullName) {
|
|
|
8217
8217
|
const lastNameInitial = nameParts[nameParts.length - 1][0].toUpperCase();
|
|
8218
8218
|
return `${firstNameInitial}${lastNameInitial}`;
|
|
8219
8219
|
}
|
|
8220
|
-
|
|
8221
|
-
className,
|
|
8222
|
-
...props
|
|
8223
|
-
}) => {
|
|
8220
|
+
function Header({ variant = "default", className, ...props }) {
|
|
8224
8221
|
return /* @__PURE__ */ jsx18(
|
|
8225
8222
|
"header",
|
|
8226
8223
|
{
|
|
8224
|
+
"data-header-type": variant,
|
|
8227
8225
|
className: cn(
|
|
8228
|
-
"cnc-h-[60px] cnc-flex cnc-items-center cnc-justify-end cnc-gap-4 cnc-px-4 cnc-w-full cnc-shadow-md
|
|
8226
|
+
"cnc-header cnc-h-[60px] cnc-flex cnc-items-center cnc-justify-end cnc-gap-4 cnc-px-4 lg:cnc-px-0 cnc-w-full cnc-shadow-md",
|
|
8227
|
+
variant === "primary" ? "cnc-bg-primary-800" : "cnc-bg-white",
|
|
8229
8228
|
className
|
|
8230
8229
|
),
|
|
8231
8230
|
...props
|
|
8232
8231
|
}
|
|
8233
8232
|
);
|
|
8234
|
-
}
|
|
8233
|
+
}
|
|
8235
8234
|
var HeaderContainer = ({
|
|
8236
8235
|
className,
|
|
8237
8236
|
isOpen,
|
|
8238
8237
|
onOpenMenu,
|
|
8238
|
+
hasSidebar = true,
|
|
8239
|
+
container = false,
|
|
8240
|
+
logo,
|
|
8241
|
+
logoLink,
|
|
8239
8242
|
children,
|
|
8240
8243
|
...props
|
|
8241
8244
|
}) => {
|
|
8245
|
+
const renderLogo = () => {
|
|
8246
|
+
if (!hasSidebar && logo) {
|
|
8247
|
+
return logoLink ? /* @__PURE__ */ jsx18("a", { href: logoLink, children: /* @__PURE__ */ jsx18("img", { src: logo, alt: "Logotipo", className: "cnc-h-8" }) }) : /* @__PURE__ */ jsx18("img", { src: logo, alt: "Logotipo", className: "cnc-h-8" });
|
|
8248
|
+
}
|
|
8249
|
+
return null;
|
|
8250
|
+
};
|
|
8242
8251
|
return /* @__PURE__ */ jsxs3(
|
|
8243
8252
|
"div",
|
|
8244
8253
|
{
|
|
8245
|
-
className: cn(
|
|
8254
|
+
className: cn(
|
|
8255
|
+
"cnc-flex cnc-flex-1 cnc-justify-between cnc-items-center",
|
|
8256
|
+
container && "cnc-container cnc-mx-auto",
|
|
8257
|
+
className
|
|
8258
|
+
),
|
|
8246
8259
|
...props,
|
|
8247
8260
|
children: [
|
|
8248
|
-
/* @__PURE__ */ jsx18("div", { children: onOpenMenu && !isOpen && /* @__PURE__ */ jsx18("button", { onClick: onOpenMenu, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer", children: /* @__PURE__ */ jsx18("svg", { stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 512 512", className: "cnc-size-6 cnc-text-brand-blue-900", height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx18("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) }) }),
|
|
8261
|
+
/* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-items-center", children: onOpenMenu && !isOpen && hasSidebar ? /* @__PURE__ */ jsx18("button", { onClick: onOpenMenu, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer", children: /* @__PURE__ */ jsx18("svg", { stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 512 512", className: "cnc-size-6 cnc-text-brand-blue-900 cnc-header-item", height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx18("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) }) : !hasSidebar && renderLogo() }),
|
|
8249
8262
|
/* @__PURE__ */ jsx18("div", { className: "cnc-flex", children })
|
|
8250
8263
|
]
|
|
8251
8264
|
}
|
|
@@ -8262,13 +8275,13 @@ var HeaderProfileHeader = ({
|
|
|
8262
8275
|
"div",
|
|
8263
8276
|
{
|
|
8264
8277
|
id: "cnc-border-lateral",
|
|
8265
|
-
className: "cnc-border-solid cnc-border-l-2 cnc-border-brand-blue-60",
|
|
8266
|
-
children: /* @__PURE__ */ jsxs3("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-ml-8", children: [
|
|
8278
|
+
className: "cnc-border-solid cnc-border-l-2 cnc-border-brand-blue-60 cnc-header-item",
|
|
8279
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-ml-8 cnc-header-item", children: [
|
|
8267
8280
|
/* @__PURE__ */ jsxs3("div", { className: "cnc-flex cnc-flex-col cnc-justify-end cnc-text-end", children: [
|
|
8268
|
-
/* @__PURE__ */ jsx18("p", { className: "cnc-text-xs cnc-font-extrabold cnc-text-brand-blue-900", children: entityName }),
|
|
8269
|
-
/* @__PURE__ */ jsx18("p", { className: "cnc-text-xs cnc-font-normal cnc-text-brand-gray-700", children: userName })
|
|
8281
|
+
/* @__PURE__ */ jsx18("p", { className: "cnc-text-xs cnc-font-extrabold cnc-text-brand-blue-900 cnc-header-item", children: entityName }),
|
|
8282
|
+
/* @__PURE__ */ jsx18("p", { className: "cnc-text-xs cnc-font-normal cnc-text-brand-gray-700 cnc-header-item/50", children: userName })
|
|
8270
8283
|
] }),
|
|
8271
|
-
/* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-items-center cnc-justify-center cnc-w-10 cnc-h-10 cnc-rounded-full cnc-bg-brand-white cnc-text-brand-blue-900 cnc-text-sm cnc-font-normal cnc-border-solid cnc-border-2", children: initials }) })
|
|
8284
|
+
/* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-items-center cnc-justify-center cnc-w-10 cnc-h-10 cnc-rounded-full cnc-bg-brand-white cnc-text-brand-blue-900 cnc-text-sm cnc-font-normal cnc-border-solid cnc-border-2 cnc-header-item", children: initials }) })
|
|
8272
8285
|
] })
|
|
8273
8286
|
}
|
|
8274
8287
|
) }),
|
|
@@ -8287,19 +8300,18 @@ var HeaderProfileItem = ({
|
|
|
8287
8300
|
};
|
|
8288
8301
|
var AplicationsHeader = ({ children }) => {
|
|
8289
8302
|
return /* @__PURE__ */ jsx18(Fragment5, { children: /* @__PURE__ */ jsxs3(DropdownMenu2, { children: [
|
|
8290
|
-
/* @__PURE__ */ jsx18(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg", children: /* @__PURE__ */ jsx18(
|
|
8303
|
+
/* @__PURE__ */ jsx18(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-flex-row cnc-gap-2 cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition cnc-duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-px-4 cnc-py-2 cnc-rounded-lg cnc-header-item", children: /* @__PURE__ */ jsx18(
|
|
8291
8304
|
"svg",
|
|
8292
8305
|
{
|
|
8293
8306
|
width: "18",
|
|
8294
8307
|
height: "18",
|
|
8295
8308
|
viewBox: "0 0 16 16",
|
|
8296
|
-
fill: "none",
|
|
8297
8309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8310
|
+
className: "cnc-header-item",
|
|
8298
8311
|
children: /* @__PURE__ */ jsx18(
|
|
8299
8312
|
"path",
|
|
8300
8313
|
{
|
|
8301
|
-
d: "M2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4ZM8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16ZM2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16ZM2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10ZM8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10ZM12 2C12 3.1 12.9 4 14 4C15.1 4 16 3.1 16 2C16 0.9 15.1 0 14 0C12.9 0 12 0.9 12 2ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM14 10C15.1 10 16 9.1 16 8C16 6.9 15.1 6 14 6C12.9 6 12 6.9 12 8C12 9.1 12.9 10 14 10ZM14 16C15.1 16 16 15.1 16 14C16 12.9 15.1 12 14 12C12.9 12 12 12.9 12 14C12 15.1 12.9 16 14 16Z"
|
|
8302
|
-
fill: "black"
|
|
8314
|
+
d: "M2 4C3.1 4 4 3.1 4 2C4 0.9 3.1 0 2 0C0.9 0 0 0.9 0 2C0 3.1 0.9 4 2 4ZM8 16C9.1 16 10 15.1 10 14C10 12.9 9.1 12 8 12C6.9 12 6 12.9 6 14C6 15.1 6.9 16 8 16ZM2 16C3.1 16 4 15.1 4 14C4 12.9 3.1 12 2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16ZM2 10C3.1 10 4 9.1 4 8C4 6.9 3.1 6 2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10ZM8 10C9.1 10 10 9.1 10 8C10 6.9 9.1 6 8 6C6.9 6 6 6.9 6 8C6 9.1 6.9 10 8 10ZM12 2C12 3.1 12.9 4 14 4C15.1 4 16 3.1 16 2C16 0.9 15.1 0 14 0C12.9 0 12 0.9 12 2ZM8 4C9.1 4 10 3.1 10 2C10 0.9 9.1 0 8 0C6.9 0 6 0.9 6 2C6 3.1 6.9 4 8 4ZM14 10C15.1 10 16 9.1 16 8C16 6.9 15.1 6 14 6C12.9 6 12 6.9 12 8C12 9.1 12.9 10 14 10ZM14 16C15.1 16 16 15.1 16 14C16 12.9 15.1 12 14 12C12.9 12 12 12.9 12 14C12 15.1 12.9 16 14 16Z"
|
|
8303
8315
|
}
|
|
8304
8316
|
)
|
|
8305
8317
|
}
|