@inf-monkeys-tech/monkeys-design 1.0.23 → 1.0.24
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/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/layout/index.js +27 -4
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +27 -4
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16243,6 +16243,13 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
|
|
|
16243
16243
|
fontWeight: "var(--monkeys-component-navigation-headbar-item-font-weight, 500)"
|
|
16244
16244
|
};
|
|
16245
16245
|
}
|
|
16246
|
+
function getHeadbarCompoundStyle(active, useTokenRadius = true) {
|
|
16247
|
+
return {
|
|
16248
|
+
...getHeadbarItemStyle(active, useTokenRadius),
|
|
16249
|
+
paddingInline: void 0,
|
|
16250
|
+
columnGap: void 0
|
|
16251
|
+
};
|
|
16252
|
+
}
|
|
16246
16253
|
function findNavigationRootId(items, activeItemId) {
|
|
16247
16254
|
for (const item of items) {
|
|
16248
16255
|
if (item.id === activeItemId) return item.id;
|
|
@@ -16588,6 +16595,7 @@ function HeadbarChevronIcon({ open }) {
|
|
|
16588
16595
|
}
|
|
16589
16596
|
function HeadbarNavMenuItem({
|
|
16590
16597
|
activeItemId,
|
|
16598
|
+
compound,
|
|
16591
16599
|
isActive,
|
|
16592
16600
|
item,
|
|
16593
16601
|
label,
|
|
@@ -16653,13 +16661,17 @@ function HeadbarNavMenuItem({
|
|
|
16653
16661
|
},
|
|
16654
16662
|
onMouseEnter: openMenu,
|
|
16655
16663
|
onMouseLeave: scheduleCloseMenu,
|
|
16656
|
-
style: getHeadbarItemStyle(
|
|
16664
|
+
style: getHeadbarItemStyle(
|
|
16665
|
+
isActive || open,
|
|
16666
|
+
compound ? false : useTokenRadius
|
|
16667
|
+
),
|
|
16657
16668
|
classNames: {
|
|
16658
16669
|
icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
|
|
16659
16670
|
label: "text-[inherit] [&_*]:!text-[inherit]"
|
|
16660
16671
|
},
|
|
16661
16672
|
className: cn2(
|
|
16662
16673
|
"max-w-[12rem] shrink-0 border shadow-none",
|
|
16674
|
+
compound && "!rounded-none !border-0 !bg-transparent",
|
|
16663
16675
|
menuButtonRadiusClass,
|
|
16664
16676
|
isActive || open ? "" : "hover:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--muted)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--foreground)))]"
|
|
16665
16677
|
)
|
|
@@ -16726,11 +16738,13 @@ function NavigationHeadbarMenu({
|
|
|
16726
16738
|
const useTokenRadius = menuRadius === "default";
|
|
16727
16739
|
return /* @__PURE__ */ jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
|
|
16728
16740
|
const isActive = activeRootId === item.id || activeItemId === item.id;
|
|
16741
|
+
const hasSecondaryAction = Boolean(item.headbarSecondaryAction);
|
|
16729
16742
|
const label = item.headbarLabel ?? item.label;
|
|
16730
16743
|
const primaryAction = item.children?.length ? /* @__PURE__ */ jsx(
|
|
16731
16744
|
HeadbarNavMenuItem,
|
|
16732
16745
|
{
|
|
16733
16746
|
activeItemId,
|
|
16747
|
+
compound: hasSecondaryAction,
|
|
16734
16748
|
isActive,
|
|
16735
16749
|
item,
|
|
16736
16750
|
label,
|
|
@@ -16753,26 +16767,35 @@ function NavigationHeadbarMenu({
|
|
|
16753
16767
|
item.trailing
|
|
16754
16768
|
] }),
|
|
16755
16769
|
onClick: () => onNavigate?.(item.id),
|
|
16756
|
-
style: getHeadbarItemStyle(
|
|
16770
|
+
style: getHeadbarItemStyle(
|
|
16771
|
+
isActive,
|
|
16772
|
+
hasSecondaryAction ? false : useTokenRadius
|
|
16773
|
+
),
|
|
16757
16774
|
classNames: {
|
|
16758
16775
|
icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
|
|
16759
16776
|
label: "text-[inherit] [&_*]:!text-[inherit]"
|
|
16760
16777
|
},
|
|
16761
16778
|
className: cn2(
|
|
16762
16779
|
"max-w-[12rem] shrink-0 border shadow-none",
|
|
16780
|
+
hasSecondaryAction && "!rounded-none !border-0 !bg-transparent",
|
|
16763
16781
|
menuButtonRadiusClass,
|
|
16764
16782
|
isActive ? "" : "hover:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--muted)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--foreground)))]"
|
|
16765
16783
|
)
|
|
16766
16784
|
}
|
|
16767
16785
|
);
|
|
16768
|
-
if (!
|
|
16786
|
+
if (!hasSecondaryAction) {
|
|
16769
16787
|
return /* @__PURE__ */ jsx(Fragment$1, { children: primaryAction }, item.id);
|
|
16770
16788
|
}
|
|
16771
16789
|
return /* @__PURE__ */ jsxs(
|
|
16772
16790
|
"div",
|
|
16773
16791
|
{
|
|
16774
16792
|
"data-navigation-headbar-compound-item": item.id,
|
|
16775
|
-
className:
|
|
16793
|
+
className: cn2(
|
|
16794
|
+
"inline-flex min-w-0 shrink-0 items-center gap-0 overflow-hidden border shadow-none",
|
|
16795
|
+
menuButtonRadiusClass,
|
|
16796
|
+
isActive ? "" : "hover:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--muted)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--foreground)))]"
|
|
16797
|
+
),
|
|
16798
|
+
style: getHeadbarCompoundStyle(isActive, useTokenRadius),
|
|
16776
16799
|
children: [
|
|
16777
16800
|
/* @__PURE__ */ jsx(
|
|
16778
16801
|
"span",
|