@cnc-ti/layout-basic 8.1.10 → 8.1.12
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 +223 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +63 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
if (typeof window !== 'undefined') {
|
|
3
|
+
"use client";
|
|
4
|
+
}
|
|
5
|
+
|
|
2
6
|
"use strict";
|
|
3
7
|
var __create = Object.create;
|
|
4
8
|
var __defProp = Object.defineProperty;
|
|
@@ -43,6 +47,21 @@ __export(src_exports, {
|
|
|
43
47
|
DialogPortal: () => DialogPortal2,
|
|
44
48
|
DialogTitle: () => DialogTitle2,
|
|
45
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,
|
|
46
65
|
Header: () => Header,
|
|
47
66
|
HeaderContainer: () => HeaderContainer,
|
|
48
67
|
HeaderProfileHeader: () => HeaderProfileHeader,
|
|
@@ -7864,6 +7883,7 @@ var RadioItem = MenuRadioItem;
|
|
|
7864
7883
|
var ItemIndicator = MenuItemIndicator;
|
|
7865
7884
|
var Separator = MenuSeparator;
|
|
7866
7885
|
var Arrow22 = MenuArrow;
|
|
7886
|
+
var Sub = MenuSub;
|
|
7867
7887
|
var SubTrigger = MenuSubTrigger;
|
|
7868
7888
|
var SubContent = MenuSubContent;
|
|
7869
7889
|
|
|
@@ -8065,6 +8085,16 @@ var DropdownMenuArrow = React34.forwardRef(
|
|
|
8065
8085
|
}
|
|
8066
8086
|
);
|
|
8067
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
|
+
};
|
|
8068
8098
|
var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
|
|
8069
8099
|
var DropdownMenuSubTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
8070
8100
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
@@ -8101,12 +8131,15 @@ var Root22 = DropdownMenu;
|
|
|
8101
8131
|
var Trigger = DropdownMenuTrigger;
|
|
8102
8132
|
var Portal22 = DropdownMenuPortal;
|
|
8103
8133
|
var Content22 = DropdownMenuContent;
|
|
8134
|
+
var Group2 = DropdownMenuGroup;
|
|
8104
8135
|
var Label2 = DropdownMenuLabel;
|
|
8105
8136
|
var Item22 = DropdownMenuItem;
|
|
8106
8137
|
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
8138
|
+
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
8107
8139
|
var RadioItem2 = DropdownMenuRadioItem;
|
|
8108
8140
|
var ItemIndicator2 = DropdownMenuItemIndicator;
|
|
8109
8141
|
var Separator2 = DropdownMenuSeparator;
|
|
8142
|
+
var Sub2 = DropdownMenuSub;
|
|
8110
8143
|
var SubTrigger2 = DropdownMenuSubTrigger;
|
|
8111
8144
|
var SubContent2 = DropdownMenuSubContent;
|
|
8112
8145
|
|
|
@@ -8115,6 +8148,10 @@ var React35 = __toESM(require("react"));
|
|
|
8115
8148
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8116
8149
|
var DropdownMenu2 = Root22;
|
|
8117
8150
|
var DropdownMenuTrigger2 = Trigger;
|
|
8151
|
+
var DropdownMenuGroup2 = Group2;
|
|
8152
|
+
var DropdownMenuPortal2 = Portal22;
|
|
8153
|
+
var DropdownMenuSub2 = Sub2;
|
|
8154
|
+
var DropdownMenuRadioGroup2 = RadioGroup2;
|
|
8118
8155
|
var DropdownMenuSubTrigger2 = React35.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8119
8156
|
SubTrigger2,
|
|
8120
8157
|
{
|
|
@@ -8273,13 +8310,20 @@ var Header = ({
|
|
|
8273
8310
|
};
|
|
8274
8311
|
var HeaderContainer = ({
|
|
8275
8312
|
className,
|
|
8313
|
+
isOpen,
|
|
8314
|
+
onOpenMenu,
|
|
8315
|
+
children,
|
|
8276
8316
|
...props
|
|
8277
8317
|
}) => {
|
|
8278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.
|
|
8318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8279
8319
|
"div",
|
|
8280
8320
|
{
|
|
8281
|
-
className: cn("cnc-flex
|
|
8282
|
-
...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
|
+
]
|
|
8283
8327
|
}
|
|
8284
8328
|
);
|
|
8285
8329
|
};
|
|
@@ -9337,6 +9381,21 @@ PopoverContent2.displayName = Content23.displayName;
|
|
|
9337
9381
|
DialogPortal,
|
|
9338
9382
|
DialogTitle,
|
|
9339
9383
|
DialogTrigger,
|
|
9384
|
+
DropdownMenu,
|
|
9385
|
+
DropdownMenuCheckboxItem,
|
|
9386
|
+
DropdownMenuContent,
|
|
9387
|
+
DropdownMenuGroup,
|
|
9388
|
+
DropdownMenuItem,
|
|
9389
|
+
DropdownMenuLabel,
|
|
9390
|
+
DropdownMenuPortal,
|
|
9391
|
+
DropdownMenuRadioGroup,
|
|
9392
|
+
DropdownMenuRadioItem,
|
|
9393
|
+
DropdownMenuSeparator,
|
|
9394
|
+
DropdownMenuShortcut,
|
|
9395
|
+
DropdownMenuSub,
|
|
9396
|
+
DropdownMenuSubContent,
|
|
9397
|
+
DropdownMenuSubTrigger,
|
|
9398
|
+
DropdownMenuTrigger,
|
|
9340
9399
|
Header,
|
|
9341
9400
|
HeaderContainer,
|
|
9342
9401
|
HeaderProfileHeader,
|