@cnc-ti/layout-basic 8.1.8 → 8.1.10

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
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // src/components/Button/index.tsx
2
4
  import { Slot } from "@radix-ui/react-slot";
3
5
 
@@ -8180,7 +8182,7 @@ var DropdownMenuShortcut = ({
8180
8182
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
8181
8183
 
8182
8184
  // src/components/Header/index.tsx
8183
- import { jsx as jsx18, jsxs as jsxs3 } from "react/jsx-runtime";
8185
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs3 } from "react/jsx-runtime";
8184
8186
  function getInitials(fullName) {
8185
8187
  if (!fullName) {
8186
8188
  return "";
@@ -8194,12 +8196,16 @@ function getInitials(fullName) {
8194
8196
  return `${firstNameInitial}${lastNameInitial}`;
8195
8197
  }
8196
8198
  var Header = ({
8199
+ className,
8197
8200
  ...props
8198
8201
  }) => {
8199
8202
  return /* @__PURE__ */ jsx18(
8200
8203
  "header",
8201
8204
  {
8202
- className: "cnc-h-[60px] cnc-flex cnc-items-center cnc-justify-end cnc-gap-4 cnc-px-4 cnc-w-full cnc-shadow-custom",
8205
+ className: cn(
8206
+ "cnc-h-[60px] cnc-flex cnc-items-center cnc-justify-end cnc-gap-4 cnc-px-4 cnc-w-full cnc-shadow-md cnc-bg-white",
8207
+ className
8208
+ ),
8203
8209
  ...props
8204
8210
  }
8205
8211
  );
@@ -8250,30 +8256,33 @@ var HeaderProfileItem = ({
8250
8256
  children
8251
8257
  ] });
8252
8258
  };
8253
- var AplicationsHeader = ({ optionsAplications }) => {
8254
- return /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-flex-row cnc-items-center cnc-justify-center hover:cnc-bg-gray-100 cnc-transition duration-300 cnc-ease-in-out cnc-cursor-pointer cnc-p-2 cnc-rounded-lg", children: /* @__PURE__ */ jsx18("div", { className: "cnc-flex cnc-flex-row cnc-items-center cnc-justify-center cnc-rounded-full cnc-w-10 cnc-h-10 text-sm cnc-font-normal", children: /* @__PURE__ */ jsx18(
8255
- "svg",
8256
- {
8257
- width: "18",
8258
- height: "18",
8259
- viewBox: "0 0 16 16",
8260
- fill: "none",
8261
- xmlns: "http://www.w3.org/2000/svg",
8262
- children: /* @__PURE__ */ jsx18(
8263
- "path",
8264
- {
8265
- 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",
8266
- fill: "black"
8267
- }
8268
- )
8269
- }
8270
- ) }) });
8259
+ var AplicationsHeader = ({ children }) => {
8260
+ return /* @__PURE__ */ jsx18(Fragment5, { children: /* @__PURE__ */ jsxs3(DropdownMenu2, { children: [
8261
+ /* @__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(
8262
+ "svg",
8263
+ {
8264
+ width: "18",
8265
+ height: "18",
8266
+ viewBox: "0 0 16 16",
8267
+ fill: "none",
8268
+ xmlns: "http://www.w3.org/2000/svg",
8269
+ children: /* @__PURE__ */ jsx18(
8270
+ "path",
8271
+ {
8272
+ 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",
8273
+ fill: "black"
8274
+ }
8275
+ )
8276
+ }
8277
+ ) }) }),
8278
+ /* @__PURE__ */ jsx18(DropdownMenuContent2, { className: "flex", children })
8279
+ ] }) });
8271
8280
  };
8272
8281
 
8273
8282
  // ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
8274
8283
  import * as React36 from "react";
8275
8284
  import { Slot as Slot5 } from "@radix-ui/react-slot";
8276
- import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
8285
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
8277
8286
  var DIALOG_NAME = "Dialog";
8278
8287
  var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
8279
8288
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
@@ -8463,7 +8472,7 @@ var DialogContentImpl = React36.forwardRef(
8463
8472
  const contentRef = React36.useRef(null);
8464
8473
  const composedRefs = useComposedRefs(forwardedRef, contentRef);
8465
8474
  useFocusGuards();
8466
- return /* @__PURE__ */ jsxs4(Fragment5, { children: [
8475
+ return /* @__PURE__ */ jsxs4(Fragment6, { children: [
8467
8476
  /* @__PURE__ */ jsx19(
8468
8477
  FocusScope,
8469
8478
  {
@@ -8487,7 +8496,7 @@ var DialogContentImpl = React36.forwardRef(
8487
8496
  )
8488
8497
  }
8489
8498
  ),
8490
- /* @__PURE__ */ jsxs4(Fragment5, { children: [
8499
+ /* @__PURE__ */ jsxs4(Fragment6, { children: [
8491
8500
  /* @__PURE__ */ jsx19(TitleWarning, { titleId: context.titleId }),
8492
8501
  /* @__PURE__ */ jsx19(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
8493
8502
  ] })
@@ -8684,7 +8693,7 @@ var Modal = ({
8684
8693
  };
8685
8694
 
8686
8695
  // src/components/Modal/ModalMudancaEntidade/index.tsx
8687
- import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
8696
+ import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
8688
8697
  var ModalMudancaEntidade = ({
8689
8698
  title,
8690
8699
  onClose,
@@ -8698,7 +8707,7 @@ var ModalMudancaEntidade = ({
8698
8707
  title,
8699
8708
  onClose,
8700
8709
  visibleModal,
8701
- content: /* @__PURE__ */ jsxs7(Fragment6, { children: [
8710
+ content: /* @__PURE__ */ jsxs7(Fragment7, { children: [
8702
8711
  /* @__PURE__ */ jsx22(DialogTitle2, { className: "cnc-DialogTitle cnc-mt-10 cnc-mb-4 ", children: "Selecionar a entidade" }),
8703
8712
  /* @__PURE__ */ jsxs7("div", { className: "cnc-flex cnc-mb-5 ", children: [
8704
8713
  /* @__PURE__ */ jsx22(SelectComponent, {}),
@@ -8897,7 +8906,7 @@ function SidebarContainer({ isOpen = true, ...rest }) {
8897
8906
  function SidebarImageBrand({ asChild = false, onChangeToggle, img, children }) {
8898
8907
  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: [
8899
8908
  /* @__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, {}) }),
8900
- onChangeToggle && /* @__PURE__ */ jsx24("button", { onClick: onChangeToggle, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden", children: /* @__PURE__ */ jsx24("svg", { stroke: "currentColor", fill: "currentColor", "stroke-width": "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", "stroke-linecap": "round", "stroke-miterlimit": "10", "stroke-width": "48", d: "M88 152h336M88 256h336M88 360h336" }) }) })
8909
+ 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" }) }) })
8901
8910
  ] });
8902
8911
  }
8903
8912
  function Sidebar({ children, ...rest }) {
@@ -8931,7 +8940,7 @@ function SidebarNavCollapse({ children, title, icon, ...rest }) {
8931
8940
  icon && renderIconItem(icon),
8932
8941
  title
8933
8942
  ] }),
8934
- /* @__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", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "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" }) }) })
8943
+ /* @__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" }) }) })
8935
8944
  ]
8936
8945
  }
8937
8946
  ),