@cnc-ti/layout-basic 8.1.11 → 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.mjs CHANGED
@@ -7807,6 +7807,7 @@ var RadioItem = MenuRadioItem;
7807
7807
  var ItemIndicator = MenuItemIndicator;
7808
7808
  var Separator = MenuSeparator;
7809
7809
  var Arrow22 = MenuArrow;
7810
+ var Sub = MenuSub;
7810
7811
  var SubTrigger = MenuSubTrigger;
7811
7812
  var SubContent = MenuSubContent;
7812
7813
 
@@ -8008,6 +8009,16 @@ var DropdownMenuArrow = React34.forwardRef(
8008
8009
  }
8009
8010
  );
8010
8011
  DropdownMenuArrow.displayName = ARROW_NAME3;
8012
+ var DropdownMenuSub = (props) => {
8013
+ const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
8014
+ const menuScope = useMenuScope(__scopeDropdownMenu);
8015
+ const [open = false, setOpen] = useControllableState({
8016
+ prop: openProp,
8017
+ defaultProp: defaultOpen,
8018
+ onChange: onOpenChange
8019
+ });
8020
+ return /* @__PURE__ */ jsx16(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
8021
+ };
8011
8022
  var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
8012
8023
  var DropdownMenuSubTrigger = React34.forwardRef((props, forwardedRef) => {
8013
8024
  const { __scopeDropdownMenu, ...subTriggerProps } = props;
@@ -8044,12 +8055,15 @@ var Root22 = DropdownMenu;
8044
8055
  var Trigger = DropdownMenuTrigger;
8045
8056
  var Portal22 = DropdownMenuPortal;
8046
8057
  var Content22 = DropdownMenuContent;
8058
+ var Group2 = DropdownMenuGroup;
8047
8059
  var Label2 = DropdownMenuLabel;
8048
8060
  var Item22 = DropdownMenuItem;
8049
8061
  var CheckboxItem2 = DropdownMenuCheckboxItem;
8062
+ var RadioGroup2 = DropdownMenuRadioGroup;
8050
8063
  var RadioItem2 = DropdownMenuRadioItem;
8051
8064
  var ItemIndicator2 = DropdownMenuItemIndicator;
8052
8065
  var Separator2 = DropdownMenuSeparator;
8066
+ var Sub2 = DropdownMenuSub;
8053
8067
  var SubTrigger2 = DropdownMenuSubTrigger;
8054
8068
  var SubContent2 = DropdownMenuSubContent;
8055
8069
 
@@ -8058,6 +8072,10 @@ import * as React35 from "react";
8058
8072
  import { jsx as jsx17, jsxs as jsxs2 } from "react/jsx-runtime";
8059
8073
  var DropdownMenu2 = Root22;
8060
8074
  var DropdownMenuTrigger2 = Trigger;
8075
+ var DropdownMenuGroup2 = Group2;
8076
+ var DropdownMenuPortal2 = Portal22;
8077
+ var DropdownMenuSub2 = Sub2;
8078
+ var DropdownMenuRadioGroup2 = RadioGroup2;
8061
8079
  var DropdownMenuSubTrigger2 = React35.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs2(
8062
8080
  SubTrigger2,
8063
8081
  {
@@ -8216,13 +8234,20 @@ var Header = ({
8216
8234
  };
8217
8235
  var HeaderContainer = ({
8218
8236
  className,
8237
+ isOpen,
8238
+ onOpenMenu,
8239
+ children,
8219
8240
  ...props
8220
8241
  }) => {
8221
- return /* @__PURE__ */ jsx18(
8242
+ return /* @__PURE__ */ jsxs3(
8222
8243
  "div",
8223
8244
  {
8224
- className: cn("cnc-flex lg:cnc-flex-1 lg:cnc-justify-end"),
8225
- ...props
8245
+ className: cn("cnc-flex cnc-flex-1 cnc-justify-between cnc-items-center"),
8246
+ ...props,
8247
+ children: [
8248
+ /* @__PURE__ */ jsx18("div", { children: onOpenMenu && !isOpen && /* @__PURE__ */ jsx18("button", { onClick: onOpenMenu, className: "hover:cnc-brightness-75 cnc-sidebar-child-hidden cnc-cursor-pointer", children: /* @__PURE__ */ jsx18("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__ */ jsx18("path", { fill: "none", strokeLinecap: "round", strokeMiterlimit: "10", strokeWidth: "48", d: "M88 152h336M88 256h336M88 360h336" }) }) }) }),
8249
+ /* @__PURE__ */ jsx18("div", { className: "cnc-flex", children })
8250
+ ]
8226
8251
  }
8227
8252
  );
8228
8253
  };
@@ -9279,6 +9304,21 @@ export {
9279
9304
  DialogPortal2 as DialogPortal,
9280
9305
  DialogTitle2 as DialogTitle,
9281
9306
  DialogTrigger2 as DialogTrigger,
9307
+ DropdownMenu2 as DropdownMenu,
9308
+ DropdownMenuCheckboxItem2 as DropdownMenuCheckboxItem,
9309
+ DropdownMenuContent2 as DropdownMenuContent,
9310
+ DropdownMenuGroup2 as DropdownMenuGroup,
9311
+ DropdownMenuItem2 as DropdownMenuItem,
9312
+ DropdownMenuLabel2 as DropdownMenuLabel,
9313
+ DropdownMenuPortal2 as DropdownMenuPortal,
9314
+ DropdownMenuRadioGroup2 as DropdownMenuRadioGroup,
9315
+ DropdownMenuRadioItem2 as DropdownMenuRadioItem,
9316
+ DropdownMenuSeparator2 as DropdownMenuSeparator,
9317
+ DropdownMenuShortcut,
9318
+ DropdownMenuSub2 as DropdownMenuSub,
9319
+ DropdownMenuSubContent2 as DropdownMenuSubContent,
9320
+ DropdownMenuSubTrigger2 as DropdownMenuSubTrigger,
9321
+ DropdownMenuTrigger2 as DropdownMenuTrigger,
9282
9322
  Header,
9283
9323
  HeaderContainer,
9284
9324
  HeaderProfileHeader,