@cnc-ti/layout-basic 8.1.11 → 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.css +226 -13
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +34 -6
- package/dist/index.d.ts +34 -6
- package/dist/index.js +142 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47,6 +47,21 @@ __export(src_exports, {
|
|
|
47
47
|
DialogPortal: () => DialogPortal2,
|
|
48
48
|
DialogTitle: () => DialogTitle2,
|
|
49
49
|
DialogTrigger: () => DialogTrigger2,
|
|
50
|
+
DropdownMenu: () => DropdownMenu2,
|
|
51
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem2,
|
|
52
|
+
DropdownMenuContent: () => DropdownMenuContent2,
|
|
53
|
+
DropdownMenuGroup: () => DropdownMenuGroup2,
|
|
54
|
+
DropdownMenuItem: () => DropdownMenuItem2,
|
|
55
|
+
DropdownMenuLabel: () => DropdownMenuLabel2,
|
|
56
|
+
DropdownMenuPortal: () => DropdownMenuPortal2,
|
|
57
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup2,
|
|
58
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem2,
|
|
59
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator2,
|
|
60
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
61
|
+
DropdownMenuSub: () => DropdownMenuSub2,
|
|
62
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent2,
|
|
63
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger2,
|
|
64
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger2,
|
|
50
65
|
Header: () => Header,
|
|
51
66
|
HeaderContainer: () => HeaderContainer,
|
|
52
67
|
HeaderProfileHeader: () => HeaderProfileHeader,
|
|
@@ -7868,6 +7883,7 @@ var RadioItem = MenuRadioItem;
|
|
|
7868
7883
|
var ItemIndicator = MenuItemIndicator;
|
|
7869
7884
|
var Separator = MenuSeparator;
|
|
7870
7885
|
var Arrow22 = MenuArrow;
|
|
7886
|
+
var Sub = MenuSub;
|
|
7871
7887
|
var SubTrigger = MenuSubTrigger;
|
|
7872
7888
|
var SubContent = MenuSubContent;
|
|
7873
7889
|
|
|
@@ -8069,6 +8085,16 @@ var DropdownMenuArrow = React34.forwardRef(
|
|
|
8069
8085
|
}
|
|
8070
8086
|
);
|
|
8071
8087
|
DropdownMenuArrow.displayName = ARROW_NAME3;
|
|
8088
|
+
var DropdownMenuSub = (props) => {
|
|
8089
|
+
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
8090
|
+
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8091
|
+
const [open = false, setOpen] = useControllableState({
|
|
8092
|
+
prop: openProp,
|
|
8093
|
+
defaultProp: defaultOpen,
|
|
8094
|
+
onChange: onOpenChange
|
|
8095
|
+
});
|
|
8096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
8097
|
+
};
|
|
8072
8098
|
var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
|
|
8073
8099
|
var DropdownMenuSubTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
8074
8100
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
@@ -8105,12 +8131,15 @@ var Root22 = DropdownMenu;
|
|
|
8105
8131
|
var Trigger = DropdownMenuTrigger;
|
|
8106
8132
|
var Portal22 = DropdownMenuPortal;
|
|
8107
8133
|
var Content22 = DropdownMenuContent;
|
|
8134
|
+
var Group2 = DropdownMenuGroup;
|
|
8108
8135
|
var Label2 = DropdownMenuLabel;
|
|
8109
8136
|
var Item22 = DropdownMenuItem;
|
|
8110
8137
|
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
8138
|
+
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
8111
8139
|
var RadioItem2 = DropdownMenuRadioItem;
|
|
8112
8140
|
var ItemIndicator2 = DropdownMenuItemIndicator;
|
|
8113
8141
|
var Separator2 = DropdownMenuSeparator;
|
|
8142
|
+
var Sub2 = DropdownMenuSub;
|
|
8114
8143
|
var SubTrigger2 = DropdownMenuSubTrigger;
|
|
8115
8144
|
var SubContent2 = DropdownMenuSubContent;
|
|
8116
8145
|
|
|
@@ -8119,6 +8148,10 @@ var React35 = __toESM(require("react"));
|
|
|
8119
8148
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8120
8149
|
var DropdownMenu2 = Root22;
|
|
8121
8150
|
var DropdownMenuTrigger2 = Trigger;
|
|
8151
|
+
var DropdownMenuGroup2 = Group2;
|
|
8152
|
+
var DropdownMenuPortal2 = Portal22;
|
|
8153
|
+
var DropdownMenuSub2 = Sub2;
|
|
8154
|
+
var DropdownMenuRadioGroup2 = RadioGroup2;
|
|
8122
8155
|
var DropdownMenuSubTrigger2 = React35.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8123
8156
|
SubTrigger2,
|
|
8124
8157
|
{
|
|
@@ -8277,13 +8310,20 @@ var Header = ({
|
|
|
8277
8310
|
};
|
|
8278
8311
|
var HeaderContainer = ({
|
|
8279
8312
|
className,
|
|
8313
|
+
isOpen,
|
|
8314
|
+
onOpenMenu,
|
|
8315
|
+
children,
|
|
8280
8316
|
...props
|
|
8281
8317
|
}) => {
|
|
8282
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.
|
|
8318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8283
8319
|
"div",
|
|
8284
8320
|
{
|
|
8285
|
-
className: cn("cnc-flex
|
|
8286
|
-
...props
|
|
8321
|
+
className: cn("cnc-flex cnc-flex-1 cnc-justify-between cnc-items-center"),
|
|
8322
|
+
...props,
|
|
8323
|
+
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" }) }) }) }),
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "cnc-flex", children })
|
|
8326
|
+
]
|
|
8287
8327
|
}
|
|
8288
8328
|
);
|
|
8289
8329
|
};
|
|
@@ -8784,9 +8824,9 @@ var ModalMudancaEntidade = ({
|
|
|
8784
8824
|
};
|
|
8785
8825
|
|
|
8786
8826
|
// src/components/Sidebar/index.tsx
|
|
8787
|
-
var import_react7 = require("react");
|
|
8788
|
-
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
8789
8827
|
var Accordion = __toESM(require("@radix-ui/react-accordion"));
|
|
8828
|
+
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
8829
|
+
var import_react7 = require("react");
|
|
8790
8830
|
|
|
8791
8831
|
// src/components/assets/logotipo-default.tsx
|
|
8792
8832
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -8956,22 +8996,64 @@ function LogotipoDefault() {
|
|
|
8956
8996
|
|
|
8957
8997
|
// src/components/Sidebar/index.tsx
|
|
8958
8998
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
8959
|
-
function SidebarContainer({
|
|
8960
|
-
|
|
8999
|
+
function SidebarContainer({
|
|
9000
|
+
isOpen = true,
|
|
9001
|
+
...rest
|
|
9002
|
+
}) {
|
|
8961
9003
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
8962
9004
|
"div",
|
|
8963
9005
|
{
|
|
8964
9006
|
"data-is-open": isOpen,
|
|
8965
|
-
|
|
8966
|
-
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`,
|
|
9007
|
+
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`,
|
|
8967
9008
|
...rest
|
|
8968
9009
|
}
|
|
8969
9010
|
);
|
|
8970
9011
|
}
|
|
8971
|
-
function SidebarImageBrand({
|
|
9012
|
+
function SidebarImageBrand({
|
|
9013
|
+
asChild = false,
|
|
9014
|
+
onChangeToggle,
|
|
9015
|
+
img,
|
|
9016
|
+
children
|
|
9017
|
+
}) {
|
|
8972
9018
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("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: [
|
|
8973
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
8974
|
-
|
|
9019
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
9020
|
+
"img",
|
|
9021
|
+
{
|
|
9022
|
+
src: img.src,
|
|
9023
|
+
alt: img?.alt,
|
|
9024
|
+
className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain"
|
|
9025
|
+
}
|
|
9026
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(LogotipoDefault, {}) }),
|
|
9027
|
+
onChangeToggle && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
9028
|
+
"button",
|
|
9029
|
+
{
|
|
9030
|
+
onClick: onChangeToggle,
|
|
9031
|
+
className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden",
|
|
9032
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
9033
|
+
"svg",
|
|
9034
|
+
{
|
|
9035
|
+
stroke: "currentColor",
|
|
9036
|
+
fill: "currentColor",
|
|
9037
|
+
strokeWidth: "0",
|
|
9038
|
+
viewBox: "0 0 512 512",
|
|
9039
|
+
className: "cnc-size-6 cnc-text-white",
|
|
9040
|
+
height: "1em",
|
|
9041
|
+
width: "1em",
|
|
9042
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
9044
|
+
"path",
|
|
9045
|
+
{
|
|
9046
|
+
fill: "none",
|
|
9047
|
+
strokeLinecap: "round",
|
|
9048
|
+
strokeMiterlimit: "10",
|
|
9049
|
+
strokeWidth: "48",
|
|
9050
|
+
d: "M88 152h336M88 256h336M88 360h336"
|
|
9051
|
+
}
|
|
9052
|
+
)
|
|
9053
|
+
}
|
|
9054
|
+
)
|
|
9055
|
+
}
|
|
9056
|
+
)
|
|
8975
9057
|
] });
|
|
8976
9058
|
}
|
|
8977
9059
|
function Sidebar({ children, ...rest }) {
|
|
@@ -8983,7 +9065,11 @@ function Sidebar({ children, ...rest }) {
|
|
|
8983
9065
|
}
|
|
8984
9066
|
) });
|
|
8985
9067
|
}
|
|
8986
|
-
function SidebarNavLink({
|
|
9068
|
+
function SidebarNavLink({
|
|
9069
|
+
asChild = false,
|
|
9070
|
+
type = "primary",
|
|
9071
|
+
...rest
|
|
9072
|
+
}) {
|
|
8987
9073
|
const Component = asChild ? import_react_slot6.Slot : "a";
|
|
8988
9074
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
8989
9075
|
Component,
|
|
@@ -8994,21 +9080,35 @@ function SidebarNavLink({ asChild = false, type = "primary", ...rest }) {
|
|
|
8994
9080
|
}
|
|
8995
9081
|
);
|
|
8996
9082
|
}
|
|
8997
|
-
function SidebarNavCollapse({
|
|
9083
|
+
function SidebarNavCollapse({
|
|
9084
|
+
children,
|
|
9085
|
+
title,
|
|
9086
|
+
icon,
|
|
9087
|
+
...rest
|
|
9088
|
+
}) {
|
|
8998
9089
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Accordion.Item, { ...rest, children: [
|
|
8999
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9090
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(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: [
|
|
9091
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
|
|
9092
|
+
icon && renderIconItem(icon),
|
|
9093
|
+
title
|
|
9094
|
+
] }),
|
|
9095
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
9096
|
+
"svg",
|
|
9097
|
+
{
|
|
9098
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9099
|
+
width: "24",
|
|
9100
|
+
height: "24",
|
|
9101
|
+
viewBox: "0 0 24 24",
|
|
9102
|
+
fill: "none",
|
|
9103
|
+
stroke: "currentColor",
|
|
9104
|
+
strokeWidth: "2",
|
|
9105
|
+
strokeLinecap: "round",
|
|
9106
|
+
strokeLinejoin: "round",
|
|
9107
|
+
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",
|
|
9108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "m9 18 6-6-6-6" })
|
|
9109
|
+
}
|
|
9110
|
+
) })
|
|
9111
|
+
] }),
|
|
9012
9112
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Accordion.Content, { className: "cnc-overflow-hidden data-[state=closed]:cnc-animate-slideUp data-[state=open]:cnc-animate-slideDown cnc-py-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "cnc-bg-white/10 cnc-rounded-md cnc-font-normal cnc-px-5 cnc-py-3", children }) })
|
|
9013
9113
|
] });
|
|
9014
9114
|
}
|
|
@@ -9341,6 +9441,21 @@ PopoverContent2.displayName = Content23.displayName;
|
|
|
9341
9441
|
DialogPortal,
|
|
9342
9442
|
DialogTitle,
|
|
9343
9443
|
DialogTrigger,
|
|
9444
|
+
DropdownMenu,
|
|
9445
|
+
DropdownMenuCheckboxItem,
|
|
9446
|
+
DropdownMenuContent,
|
|
9447
|
+
DropdownMenuGroup,
|
|
9448
|
+
DropdownMenuItem,
|
|
9449
|
+
DropdownMenuLabel,
|
|
9450
|
+
DropdownMenuPortal,
|
|
9451
|
+
DropdownMenuRadioGroup,
|
|
9452
|
+
DropdownMenuRadioItem,
|
|
9453
|
+
DropdownMenuSeparator,
|
|
9454
|
+
DropdownMenuShortcut,
|
|
9455
|
+
DropdownMenuSub,
|
|
9456
|
+
DropdownMenuSubContent,
|
|
9457
|
+
DropdownMenuSubTrigger,
|
|
9458
|
+
DropdownMenuTrigger,
|
|
9344
9459
|
Header,
|
|
9345
9460
|
HeaderContainer,
|
|
9346
9461
|
HeaderProfileHeader,
|