@cnc-ti/layout-basic 8.1.12 → 8.2.0

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.mjs CHANGED
@@ -8687,7 +8687,7 @@ var DialogTitle2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PU
8687
8687
  {
8688
8688
  ref,
8689
8689
  className: cn(
8690
- "cnc-text-lg cnc-font-semibold cnc-leading-none cnc-tracking-tight",
8690
+ "cnc-text-lg cnc-leading-none cnc-tracking-tight cnc-text-red-500",
8691
8691
  className
8692
8692
  ),
8693
8693
  ...props
@@ -8748,9 +8748,12 @@ var ModalMudancaEntidade = ({
8748
8748
  };
8749
8749
 
8750
8750
  // src/components/Sidebar/index.tsx
8751
- import { cloneElement as cloneElement3, isValidElement } from "react";
8752
- import { Slot as Slot6 } from "@radix-ui/react-slot";
8753
8751
  import * as Accordion from "@radix-ui/react-accordion";
8752
+ import { Slot as Slot6 } from "@radix-ui/react-slot";
8753
+ import {
8754
+ cloneElement as cloneElement3,
8755
+ isValidElement
8756
+ } from "react";
8754
8757
 
8755
8758
  // src/components/assets/logotipo-default.tsx
8756
8759
  import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
@@ -8920,59 +8923,120 @@ function LogotipoDefault() {
8920
8923
 
8921
8924
  // src/components/Sidebar/index.tsx
8922
8925
  import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
8923
- function SidebarContainer({ isOpen = true, ...rest }) {
8924
- const sidebarWidth = "295px";
8926
+ function SidebarContainer({
8927
+ isOpen = true,
8928
+ ...rest
8929
+ }) {
8925
8930
  return /* @__PURE__ */ jsx24(
8926
8931
  "div",
8927
8932
  {
8928
8933
  "data-is-open": isOpen,
8929
- style: { width: isOpen ? sidebarWidth : "0" },
8930
- className: `cnc-w-full cnc-max-w-[295px] cnc-transition-all cnc-duration-300 cnc-ease-in-out cnc-sidebar-container cnc-bg-brand-blue-400`,
8934
+ style: { width: isOpen ? "100%" : "0" },
8935
+ className: `cnc-w-full cnc-max-w-full cnc-transition-all cnc-duration-300 cnc-ease-in-out cnc-sidebar-container cnc-bg-brand-blue-400 data-[is-open=true]:w-0`,
8931
8936
  ...rest
8932
8937
  }
8933
8938
  );
8934
8939
  }
8935
- function SidebarImageBrand({ asChild = false, onChangeToggle, img, children }) {
8936
- return /* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-justify-between cnc-bg-brand-blue-500 cnc-w-full cnc-h-full cnc-max-h-[70px] cnc-py-5 cnc-px-6 cnc-transition-all cnc-duration-300 cnc-ease-in-out cnc-sidebar-child-w-0", children: [
8937
- /* @__PURE__ */ jsx24("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ jsx24("img", { src: img.src, alt: img?.alt, className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain" }) : /* @__PURE__ */ jsx24(LogotipoDefault, {}) }),
8938
- onChangeToggle && /* @__PURE__ */ jsx24("button", { onClick: onChangeToggle, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden", children: /* @__PURE__ */ jsx24("svg", { stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 512 512", className: "cnc-size-6 cnc-text-white", height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx24("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) })
8940
+ function SidebarImageBrand({
8941
+ asChild = false,
8942
+ onChangeToggle,
8943
+ img,
8944
+ children
8945
+ }) {
8946
+ return /* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-justify-between cnc-bg-primary-900 cnc-w-full cnc-h-full cnc-max-h-[70px] cnc-py-5 cnc-px-6 cnc-transition-all cnc-duration-300 cnc-ease-in-out cnc-sidebar-child-w-0", children: [
8947
+ /* @__PURE__ */ jsx24("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ jsx24(
8948
+ "img",
8949
+ {
8950
+ src: img.src,
8951
+ alt: img?.alt,
8952
+ className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain"
8953
+ }
8954
+ ) : /* @__PURE__ */ jsx24(LogotipoDefault, {}) }),
8955
+ onChangeToggle && /* @__PURE__ */ jsx24(
8956
+ "button",
8957
+ {
8958
+ onClick: onChangeToggle,
8959
+ className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden",
8960
+ children: /* @__PURE__ */ jsx24(
8961
+ "svg",
8962
+ {
8963
+ stroke: "currentColor",
8964
+ fill: "currentColor",
8965
+ strokeWidth: "0",
8966
+ viewBox: "0 0 512 512",
8967
+ className: "cnc-size-6 cnc-text-white",
8968
+ height: "1em",
8969
+ width: "1em",
8970
+ xmlns: "http://www.w3.org/2000/svg",
8971
+ children: /* @__PURE__ */ jsx24(
8972
+ "path",
8973
+ {
8974
+ fill: "none",
8975
+ strokeLinecap: "round",
8976
+ strokeMiterlimit: "10",
8977
+ strokeWidth: "48",
8978
+ d: "M88 152h336M88 256h336M88 360h336"
8979
+ }
8980
+ )
8981
+ }
8982
+ )
8983
+ }
8984
+ )
8939
8985
  ] });
8940
8986
  }
8941
8987
  function Sidebar({ children, ...rest }) {
8942
8988
  return /* @__PURE__ */ jsx24(Accordion.Root, { ...rest, children: /* @__PURE__ */ jsx24(
8943
8989
  "div",
8944
8990
  {
8945
- className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-brand-blue-400 cnc-px-5 \r\n cnc-scroll-smooth cnc-overflow-y-auto\r\n [&::-webkit-scrollbar]:cnc-w-1\r\n [&::-webkit-scrollbar-track]:cnc-bg-brand-blue-500\r\n [&::-webkit-scrollbar-thumb]:cnc-rounded\r\n [&::-webkit-scrollbar-thumb]:cnc-border\r\n [&::-webkit-scrollbar-thumb]:cnc-border-solid\r\n [&::-webkit-scrollbar-thumb]:cnc-border-brand-gray-400\r\n [&::-webkit-scrollbar-thumb]:cnc-bg-brand-gray-200\r\n cnc-sidebar-child-w-0",
8991
+ className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800 cnc-px-5 \r\n cnc-scroll-smooth cnc-overflow-y-auto\r\n [&::-webkit-scrollbar]:cnc-w-1\r\n [&::-webkit-scrollbar-track]:cnc-bg-brand-blue-500\r\n [&::-webkit-scrollbar-thumb]:cnc-rounded\r\n [&::-webkit-scrollbar-thumb]:cnc-border\r\n [&::-webkit-scrollbar-thumb]:cnc-border-solid\r\n [&::-webkit-scrollbar-thumb]:cnc-border-brand-gray-400\r\n [&::-webkit-scrollbar-thumb]:cnc-bg-brand-gray-200\r\n cnc-sidebar-child-w-0",
8946
8992
  children
8947
8993
  }
8948
8994
  ) });
8949
8995
  }
8950
- function SidebarNavLink({ asChild = false, type = "primary", ...rest }) {
8996
+ function SidebarNavLink({
8997
+ asChild = false,
8998
+ type = "primary",
8999
+ ...rest
9000
+ }) {
8951
9001
  const Component = asChild ? Slot6 : "a";
8952
9002
  return /* @__PURE__ */ jsx24(
8953
9003
  Component,
8954
9004
  {
8955
9005
  "data-type": type,
8956
- className: "cnc-w-full cnc-py-4 cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-text-base hover:cnc-text-blue-600 data-[type=secondary]:cnc-pl-0 data-[type=secondary]:cnc-text-sm data-[type=secondary]:cnc-py-0 data-[type=secondary]:cnc-my-2 cnc-sidebar-child-hidden",
9006
+ className: "cnc-sidebar-item cnc-w-full cnc-py-4 cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-text-base hover:cnc-text-blue-600 data-[type=secondary]:cnc-pl-0 data-[type=secondary]:cnc-text-sm data-[type=secondary]:cnc-py-0 data-[type=secondary]:cnc-my-2 cnc-sidebar-child-hidden",
8957
9007
  ...rest
8958
9008
  }
8959
9009
  );
8960
9010
  }
8961
- function SidebarNavCollapse({ children, title, icon, ...rest }) {
8962
- return /* @__PURE__ */ jsxs9(Accordion.Item, { ...rest, children: [
8963
- /* @__PURE__ */ jsxs9(
8964
- Accordion.Trigger,
8965
- {
8966
- className: "group cnc-w-full cnc-py-4 cnc-text-base cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-justify-between hover:cnc-text-blue-600 cnc-sidebar-child-hidden",
8967
- children: [
8968
- /* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
8969
- icon && renderIconItem(icon),
8970
- title
8971
- ] }),
8972
- /* @__PURE__ */ jsx24("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ jsx24("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "cnc-w-full cnc-h-full cnc-text-violet10 cnc-transition-transform cnc-duration-300 cnc-ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:cnc-rotate-90", children: /* @__PURE__ */ jsx24("path", { d: "m9 18 6-6-6-6" }) }) })
8973
- ]
8974
- }
8975
- ),
9011
+ function SidebarNavCollapse({
9012
+ children,
9013
+ title,
9014
+ icon,
9015
+ ...rest
9016
+ }) {
9017
+ return /* @__PURE__ */ jsxs9(Accordion.Item, { ...rest, className: "cnc-sidebar-item", children: [
9018
+ /* @__PURE__ */ jsxs9(Accordion.Trigger, { className: "group cnc-w-full cnc-py-4 cnc-text-base cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-justify-between hover:cnc-text-blue-600 cnc-sidebar-child-hidden", children: [
9019
+ /* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
9020
+ icon && renderIconItem(icon),
9021
+ title
9022
+ ] }),
9023
+ /* @__PURE__ */ jsx24("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ jsx24(
9024
+ "svg",
9025
+ {
9026
+ xmlns: "http://www.w3.org/2000/svg",
9027
+ width: "24",
9028
+ height: "24",
9029
+ viewBox: "0 0 24 24",
9030
+ fill: "none",
9031
+ stroke: "currentColor",
9032
+ strokeWidth: "2",
9033
+ strokeLinecap: "round",
9034
+ strokeLinejoin: "round",
9035
+ className: "cnc-w-full cnc-h-full cnc-text-violet10 cnc-transition-transform cnc-duration-300 cnc-ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:cnc-rotate-90",
9036
+ children: /* @__PURE__ */ jsx24("path", { d: "m9 18 6-6-6-6" })
9037
+ }
9038
+ ) })
9039
+ ] }),
8976
9040
  /* @__PURE__ */ jsx24(Accordion.Content, { className: "cnc-overflow-hidden data-[state=closed]:cnc-animate-slideUp data-[state=open]:cnc-animate-slideDown cnc-py-2", children: /* @__PURE__ */ jsx24("div", { className: "cnc-bg-white/10 cnc-rounded-md cnc-font-normal cnc-px-5 cnc-py-3", children }) })
8977
9041
  ] });
8978
9042
  }