@cnc-ti/layout-basic 8.1.12 → 8.1.13

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
@@ -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,22 +8923,64 @@ 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
+ 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`,
8931
8935
  ...rest
8932
8936
  }
8933
8937
  );
8934
8938
  }
8935
- function SidebarImageBrand({ asChild = false, onChangeToggle, img, children }) {
8939
+ function SidebarImageBrand({
8940
+ asChild = false,
8941
+ onChangeToggle,
8942
+ img,
8943
+ children
8944
+ }) {
8936
8945
  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" }) }) })
8946
+ /* @__PURE__ */ jsx24("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ jsx24(
8947
+ "img",
8948
+ {
8949
+ src: img.src,
8950
+ alt: img?.alt,
8951
+ className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain"
8952
+ }
8953
+ ) : /* @__PURE__ */ jsx24(LogotipoDefault, {}) }),
8954
+ onChangeToggle && /* @__PURE__ */ jsx24(
8955
+ "button",
8956
+ {
8957
+ onClick: onChangeToggle,
8958
+ className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden",
8959
+ children: /* @__PURE__ */ jsx24(
8960
+ "svg",
8961
+ {
8962
+ stroke: "currentColor",
8963
+ fill: "currentColor",
8964
+ strokeWidth: "0",
8965
+ viewBox: "0 0 512 512",
8966
+ className: "cnc-size-6 cnc-text-white",
8967
+ height: "1em",
8968
+ width: "1em",
8969
+ xmlns: "http://www.w3.org/2000/svg",
8970
+ children: /* @__PURE__ */ jsx24(
8971
+ "path",
8972
+ {
8973
+ fill: "none",
8974
+ strokeLinecap: "round",
8975
+ strokeMiterlimit: "10",
8976
+ strokeWidth: "48",
8977
+ d: "M88 152h336M88 256h336M88 360h336"
8978
+ }
8979
+ )
8980
+ }
8981
+ )
8982
+ }
8983
+ )
8939
8984
  ] });
8940
8985
  }
8941
8986
  function Sidebar({ children, ...rest }) {
@@ -8947,7 +8992,11 @@ function Sidebar({ children, ...rest }) {
8947
8992
  }
8948
8993
  ) });
8949
8994
  }
8950
- function SidebarNavLink({ asChild = false, type = "primary", ...rest }) {
8995
+ function SidebarNavLink({
8996
+ asChild = false,
8997
+ type = "primary",
8998
+ ...rest
8999
+ }) {
8951
9000
  const Component = asChild ? Slot6 : "a";
8952
9001
  return /* @__PURE__ */ jsx24(
8953
9002
  Component,
@@ -8958,21 +9007,35 @@ function SidebarNavLink({ asChild = false, type = "primary", ...rest }) {
8958
9007
  }
8959
9008
  );
8960
9009
  }
8961
- function SidebarNavCollapse({ children, title, icon, ...rest }) {
9010
+ function SidebarNavCollapse({
9011
+ children,
9012
+ title,
9013
+ icon,
9014
+ ...rest
9015
+ }) {
8962
9016
  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
- ),
9017
+ /* @__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: [
9018
+ /* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
9019
+ icon && renderIconItem(icon),
9020
+ title
9021
+ ] }),
9022
+ /* @__PURE__ */ jsx24("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ jsx24(
9023
+ "svg",
9024
+ {
9025
+ xmlns: "http://www.w3.org/2000/svg",
9026
+ width: "24",
9027
+ height: "24",
9028
+ viewBox: "0 0 24 24",
9029
+ fill: "none",
9030
+ stroke: "currentColor",
9031
+ strokeWidth: "2",
9032
+ strokeLinecap: "round",
9033
+ strokeLinejoin: "round",
9034
+ 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",
9035
+ children: /* @__PURE__ */ jsx24("path", { d: "m9 18 6-6-6-6" })
9036
+ }
9037
+ ) })
9038
+ ] }),
8976
9039
  /* @__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
9040
  ] });
8978
9041
  }