@cnc-ti/layout-basic 8.2.0 → 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 +83 -27
- 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 +35 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8293,35 +8293,48 @@ function getInitials(fullName) {
|
|
|
8293
8293
|
const lastNameInitial = nameParts[nameParts.length - 1][0].toUpperCase();
|
|
8294
8294
|
return `${firstNameInitial}${lastNameInitial}`;
|
|
8295
8295
|
}
|
|
8296
|
-
|
|
8297
|
-
className,
|
|
8298
|
-
...props
|
|
8299
|
-
}) => {
|
|
8296
|
+
function Header({ variant = "default", className, ...props }) {
|
|
8300
8297
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8301
8298
|
"header",
|
|
8302
8299
|
{
|
|
8300
|
+
"data-header-type": variant,
|
|
8303
8301
|
className: cn(
|
|
8304
|
-
"cnc-h-[60px] cnc-flex cnc-items-center cnc-justify-end cnc-gap-4 cnc-px-4 cnc-w-full cnc-shadow-md
|
|
8302
|
+
"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",
|
|
8303
|
+
variant === "primary" ? "cnc-bg-primary-800" : "cnc-bg-white",
|
|
8305
8304
|
className
|
|
8306
8305
|
),
|
|
8307
8306
|
...props
|
|
8308
8307
|
}
|
|
8309
8308
|
);
|
|
8310
|
-
}
|
|
8309
|
+
}
|
|
8311
8310
|
var HeaderContainer = ({
|
|
8312
8311
|
className,
|
|
8313
8312
|
isOpen,
|
|
8314
8313
|
onOpenMenu,
|
|
8314
|
+
hasSidebar = true,
|
|
8315
|
+
container = false,
|
|
8316
|
+
logo,
|
|
8317
|
+
logoLink,
|
|
8315
8318
|
children,
|
|
8316
8319
|
...props
|
|
8317
8320
|
}) => {
|
|
8321
|
+
const renderLogo = () => {
|
|
8322
|
+
if (!hasSidebar && logo) {
|
|
8323
|
+
return logoLink ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: logoLink, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: logo, alt: "Logotipo", className: "cnc-h-8" }) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: logo, alt: "Logotipo", className: "cnc-h-8" });
|
|
8324
|
+
}
|
|
8325
|
+
return null;
|
|
8326
|
+
};
|
|
8318
8327
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8319
8328
|
"div",
|
|
8320
8329
|
{
|
|
8321
|
-
className: cn(
|
|
8330
|
+
className: cn(
|
|
8331
|
+
"cnc-flex cnc-flex-1 cnc-justify-between cnc-items-center",
|
|
8332
|
+
container && "cnc-container cnc-mx-auto",
|
|
8333
|
+
className
|
|
8334
|
+
),
|
|
8322
8335
|
...props,
|
|
8323
8336
|
children: [
|
|
8324
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: onOpenMenu && !isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { onClick: onOpenMenu, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) }) }),
|
|
8337
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "cnc-flex cnc-items-center", children: onOpenMenu && !isOpen && hasSidebar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { onClick: onOpenMenu, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) }) : !hasSidebar && renderLogo() }),
|
|
8325
8338
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "cnc-flex", children })
|
|
8326
8339
|
]
|
|
8327
8340
|
}
|
|
@@ -8338,13 +8351,13 @@ var HeaderProfileHeader = ({
|
|
|
8338
8351
|
"div",
|
|
8339
8352
|
{
|
|
8340
8353
|
id: "cnc-border-lateral",
|
|
8341
|
-
className: "cnc-border-solid cnc-border-l-2 cnc-border-brand-blue-60",
|
|
8342
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("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: [
|
|
8354
|
+
className: "cnc-border-solid cnc-border-l-2 cnc-border-brand-blue-60 cnc-header-item",
|
|
8355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("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: [
|
|
8343
8356
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "cnc-flex cnc-flex-col cnc-justify-end cnc-text-end", children: [
|
|
8344
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cnc-text-xs cnc-font-extrabold cnc-text-brand-blue-900", children: entityName }),
|
|
8345
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cnc-text-xs cnc-font-normal cnc-text-brand-gray-700", children: userName })
|
|
8357
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cnc-text-xs cnc-font-extrabold cnc-text-brand-blue-900 cnc-header-item", children: entityName }),
|
|
8358
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cnc-text-xs cnc-font-normal cnc-text-brand-gray-700 cnc-header-item/50", children: userName })
|
|
8346
8359
|
] }),
|
|
8347
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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 }) })
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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 }) })
|
|
8348
8361
|
] })
|
|
8349
8362
|
}
|
|
8350
8363
|
) }),
|
|
@@ -8363,19 +8376,18 @@ var HeaderProfileItem = ({
|
|
|
8363
8376
|
};
|
|
8364
8377
|
var AplicationsHeader = ({ children }) => {
|
|
8365
8378
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DropdownMenu2, { children: [
|
|
8366
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsx)(
|
|
8379
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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__ */ (0, import_jsx_runtime18.jsx)(
|
|
8367
8380
|
"svg",
|
|
8368
8381
|
{
|
|
8369
8382
|
width: "18",
|
|
8370
8383
|
height: "18",
|
|
8371
8384
|
viewBox: "0 0 16 16",
|
|
8372
|
-
fill: "none",
|
|
8373
8385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8386
|
+
className: "cnc-header-item",
|
|
8374
8387
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8375
8388
|
"path",
|
|
8376
8389
|
{
|
|
8377
|
-
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"
|
|
8378
|
-
fill: "black"
|
|
8390
|
+
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"
|
|
8379
8391
|
}
|
|
8380
8392
|
)
|
|
8381
8393
|
}
|
|
@@ -8715,14 +8727,14 @@ var DialogContent2 = React37.forwardRef(({ className, children, ...props }, ref)
|
|
|
8715
8727
|
{
|
|
8716
8728
|
ref,
|
|
8717
8729
|
className: cn(
|
|
8718
|
-
"cnc-fixed cnc-left-[50%] cnc-top-[50%] cnc-z-50 cnc-grid cnc-w-full cnc-max-w-
|
|
8730
|
+
"cnc-fixed cnc-left-[50%] cnc-top-[50%] cnc-z-50 cnc-grid cnc-w-full cnc-max-w-[42rem] cnc-translate-x-[-50%] cnc-translate-y-[-50%] cnc-gap-4 cnc-border cnc-bg-background cnc-p-6 cnc-pt-4 cnc-shadow-lg cnc-duration-200 data-[state=open]:cnc-animate-in data-[state=closed]:cnc-animate-out data-[state=closed]:cnc-fade-out-0 data-[state=open]:cnc-fade-in-0 data-[state=closed]:cnc-zoom-out-95 data-[state=open]:cnc-zoom-in-95 data-[state=closed]:cnc-slide-out-to-left-1/2 data-[state=closed]:cnc-slide-out-to-top-[48%] data-[state=open]:cnc-slide-in-from-left-1/2 data-[state=open]:cnc-slide-in-from-top-[48%] cnc-sm:rounded-lg",
|
|
8719
8731
|
className
|
|
8720
8732
|
),
|
|
8721
8733
|
...props,
|
|
8722
8734
|
children: [
|
|
8723
8735
|
children,
|
|
8724
8736
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Close, { className: "cnc-absolute cnc-right-4 cnc-top-4 cnc-rounded-sm cnc-opacity-70 cnc-ring-offset-background cnc-transition-opacity hover:cnc-opacity-100 focus:cnc-outline-none focus:cnc-ring-2 focus:cnc-ring-ring focus:cnc-ring-offset-2 disabled:cnc-pointer-events-none data-[state=open]:cnc-bg-accent data-[state=open]:cnc-text-muted-foreground", children: [
|
|
8725
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(X, { className: "cnc-h-4 cnc-w-4" }),
|
|
8737
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(X, { className: "cnc-h-4 cnc-w-4 cnc-mt-2" }),
|
|
8726
8738
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "cnc-sr-only", children: "Close" })
|
|
8727
8739
|
] })
|
|
8728
8740
|
]
|
|
@@ -8763,7 +8775,7 @@ var DialogTitle2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
8763
8775
|
{
|
|
8764
8776
|
ref,
|
|
8765
8777
|
className: cn(
|
|
8766
|
-
"cnc-text-lg cnc-leading-none cnc-tracking-tight
|
|
8778
|
+
"cnc-text-lg cnc-font-semibold cnc-leading-none cnc-tracking-tight",
|
|
8767
8779
|
className
|
|
8768
8780
|
),
|
|
8769
8781
|
...props
|
|
@@ -8790,9 +8802,9 @@ var Modal = ({
|
|
|
8790
8802
|
}) => {
|
|
8791
8803
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Dialog2, { open: visibleModal, onOpenChange: onClose, children: [
|
|
8792
8804
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogOverlay2, { className: "cnc-inset-0 cnc-bg-blackA6= data-[state=open]:cnc-animate-overlayShow" }),
|
|
8793
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogContent2, { className: "
|
|
8794
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogHeader, { className: "cnc-text-sm cnc-h-14 cnc-text-
|
|
8795
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "cnc-flex cnc-flex-col cnc-mb-
|
|
8805
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogContent2, { className: "cnc-max-h-[100vh] cnc-p-0 cnc-rounded-sm cnc-bg-white cnc-focus:outline-none data-[state=open]:cnc-animate-contentShow", children: [
|
|
8806
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogHeader, { className: "cnc-text-sm cnc-h-14 cnc-text-black cnc-font- cnc-border-b cnc-w-full cnc-leading-10", children: title }),
|
|
8807
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "cnc-flex cnc-flex-col cnc-mb-16 cnc-mx-20 cnc-align-middle cnc-items-left cnc-justify-center", children: content })
|
|
8796
8808
|
] })
|
|
8797
8809
|
] });
|
|
8798
8810
|
};
|