@cnc-ti/layout-basic 8.8.1 → 8.8.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.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -116,8 +116,14 @@ interface AppInput {
|
|
|
116
116
|
}
|
|
117
117
|
interface AppsMenuProps {
|
|
118
118
|
apps?: AppInput[];
|
|
119
|
+
/**
|
|
120
|
+
* Controla a exibição do AppsMenu no header.
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue false
|
|
123
|
+
*/
|
|
124
|
+
show?: boolean;
|
|
119
125
|
}
|
|
120
|
-
declare function AppsMenu({ apps, }: AppsMenuProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
declare function AppsMenu({ apps, show, }: AppsMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
121
127
|
|
|
122
128
|
type ModalProps = {
|
|
123
129
|
title?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -116,8 +116,14 @@ interface AppInput {
|
|
|
116
116
|
}
|
|
117
117
|
interface AppsMenuProps {
|
|
118
118
|
apps?: AppInput[];
|
|
119
|
+
/**
|
|
120
|
+
* Controla a exibição do AppsMenu no header.
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue false
|
|
123
|
+
*/
|
|
124
|
+
show?: boolean;
|
|
119
125
|
}
|
|
120
|
-
declare function AppsMenu({ apps, }: AppsMenuProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
declare function AppsMenu({ apps, show, }: AppsMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
121
127
|
|
|
122
128
|
type ModalProps = {
|
|
123
129
|
title?: string;
|
package/dist/index.js
CHANGED
|
@@ -3349,7 +3349,8 @@ var availableApps = {
|
|
|
3349
3349
|
CDD: { name: "Or\xE1culoS", url: process.env.NEXT_PUBLIC_CDD_APP_URL ?? "https://oraculos.cnc.org.br/", icon: "fa-solid fa-database", color: "#00B8D9" }
|
|
3350
3350
|
};
|
|
3351
3351
|
function AppsMenu({
|
|
3352
|
-
apps = Object.keys(availableApps).map((key) => ({ code: key, url: availableApps[key].url }))
|
|
3352
|
+
apps = Object.keys(availableApps).map((key) => ({ code: key, url: availableApps[key].url })),
|
|
3353
|
+
show = false
|
|
3353
3354
|
}) {
|
|
3354
3355
|
const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
|
|
3355
3356
|
const menuRef = (0, import_react4.useRef)(null);
|
|
@@ -3371,6 +3372,9 @@ function AppsMenu({
|
|
|
3371
3372
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3372
3373
|
};
|
|
3373
3374
|
}, [isOpen]);
|
|
3375
|
+
if (!show) {
|
|
3376
|
+
return null;
|
|
3377
|
+
}
|
|
3374
3378
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "cnc-relative cnc-flex cnc-items-center cnc-h-full", ref: menuRef, children: [
|
|
3375
3379
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3376
3380
|
"button",
|