@geomak/ui 6.1.0 → 6.2.0
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.cjs +101 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +93 -1
- package/dist/index.d.ts +93 -1
- package/dist/index.js +100 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +66 -0
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var Accordion = require('@radix-ui/react-accordion');
|
|
|
13
13
|
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
14
14
|
var Popover = require('@radix-ui/react-popover');
|
|
15
15
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
16
|
+
var NavigationMenu = require('@radix-ui/react-navigation-menu');
|
|
16
17
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
17
18
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
18
19
|
var ToggleGroup = require('@radix-ui/react-toggle-group');
|
|
@@ -47,6 +48,7 @@ var Accordion__namespace = /*#__PURE__*/_interopNamespace(Accordion);
|
|
|
47
48
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
48
49
|
var Popover__namespace = /*#__PURE__*/_interopNamespace(Popover);
|
|
49
50
|
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
51
|
+
var NavigationMenu__namespace = /*#__PURE__*/_interopNamespace(NavigationMenu);
|
|
50
52
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
51
53
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
52
54
|
var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
|
|
@@ -3421,6 +3423,104 @@ function Sidebar({
|
|
|
3421
3423
|
}
|
|
3422
3424
|
) });
|
|
3423
3425
|
}
|
|
3426
|
+
function MegaMenu({ children, align = "start", delayDuration = 200, className = "", style, "aria-label": ariaLabel }) {
|
|
3427
|
+
const justify = align === "center" ? "justify-center" : align === "end" ? "justify-end" : "justify-start";
|
|
3428
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3429
|
+
NavigationMenu__namespace.Root,
|
|
3430
|
+
{
|
|
3431
|
+
delayDuration,
|
|
3432
|
+
"aria-label": ariaLabel,
|
|
3433
|
+
className: ["relative z-10 flex", className].filter(Boolean).join(" "),
|
|
3434
|
+
style,
|
|
3435
|
+
children: [
|
|
3436
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.List, { className: "flex items-center gap-1", children }),
|
|
3437
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute left-0 top-full flex w-full ${justify} pt-2`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3438
|
+
NavigationMenu__namespace.Viewport,
|
|
3439
|
+
{
|
|
3440
|
+
className: "relative origin-top overflow-hidden rounded-lg border border-border bg-surface shadow-lg\n h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)]\n transition-[width,height] duration-200 ease-out\n data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
3441
|
+
}
|
|
3442
|
+
) })
|
|
3443
|
+
]
|
|
3444
|
+
}
|
|
3445
|
+
);
|
|
3446
|
+
}
|
|
3447
|
+
var TOP_ITEM = "group/top inline-flex items-center gap-1.5 h-10 px-3 rounded-md text-sm font-medium select-none text-foreground-secondary hover:text-foreground hover:bg-surface-raised data-[state=open]:text-accent data-[active]:text-accent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent";
|
|
3448
|
+
function MegaMenuItem({ label, icon, href, children, className = "" }) {
|
|
3449
|
+
if (!children) {
|
|
3450
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Link, { href, className: [TOP_ITEM, className].filter(Boolean).join(" "), children: [
|
|
3451
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
3452
|
+
label
|
|
3453
|
+
] }) });
|
|
3454
|
+
}
|
|
3455
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Item, { children: [
|
|
3456
|
+
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Trigger, { className: [TOP_ITEM, className].filter(Boolean).join(" "), children: [
|
|
3457
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
3458
|
+
label,
|
|
3459
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3460
|
+
"svg",
|
|
3461
|
+
{
|
|
3462
|
+
viewBox: "0 0 24 24",
|
|
3463
|
+
fill: "none",
|
|
3464
|
+
stroke: "currentColor",
|
|
3465
|
+
strokeWidth: 2,
|
|
3466
|
+
"aria-hidden": "true",
|
|
3467
|
+
className: "h-3.5 w-3.5 text-foreground-muted transition-transform duration-200 group-data-[state=open]/top:rotate-180 group-data-[state=open]/top:text-accent",
|
|
3468
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
|
|
3469
|
+
}
|
|
3470
|
+
)
|
|
3471
|
+
] }),
|
|
3472
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Content, { className: "data-[motion=from-start]:animate-in data-[motion=to-end]:animate-out", children })
|
|
3473
|
+
] });
|
|
3474
|
+
}
|
|
3475
|
+
var COLS = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" };
|
|
3476
|
+
function MegaMenuPanel({ children, columns, className = "", style }) {
|
|
3477
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3478
|
+
"div",
|
|
3479
|
+
{
|
|
3480
|
+
className: ["grid gap-6 p-6", columns ? COLS[columns] : "auto-cols-fr grid-flow-col", "w-max max-w-[min(92vw,860px)]", className].filter(Boolean).join(" "),
|
|
3481
|
+
style,
|
|
3482
|
+
children
|
|
3483
|
+
}
|
|
3484
|
+
);
|
|
3485
|
+
}
|
|
3486
|
+
function MegaMenuSection({ title, children, className = "" }) {
|
|
3487
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["min-w-[200px] flex flex-col", className].filter(Boolean).join(" "), children: [
|
|
3488
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1.5 text-[11px] font-semibold uppercase tracking-widest text-foreground-muted select-none", children: title }),
|
|
3489
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children })
|
|
3490
|
+
] });
|
|
3491
|
+
}
|
|
3492
|
+
function MegaMenuLink({ href, icon, description, active, onClick, children, className = "" }) {
|
|
3493
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3494
|
+
NavigationMenu__namespace.Link,
|
|
3495
|
+
{
|
|
3496
|
+
active,
|
|
3497
|
+
href,
|
|
3498
|
+
onClick,
|
|
3499
|
+
className: [
|
|
3500
|
+
"group/link flex items-start gap-3 rounded-md p-3 transition-colors select-none",
|
|
3501
|
+
"hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
3502
|
+
"data-[active]:bg-surface-raised",
|
|
3503
|
+
className
|
|
3504
|
+
].filter(Boolean).join(" "),
|
|
3505
|
+
children: [
|
|
3506
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-md bg-surface-raised text-accent group-hover/link:bg-surface group-data-[active]/link:bg-surface transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[18px] w-[18px] inline-flex items-center justify-center", children: icon }) }),
|
|
3507
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col min-w-0", children: [
|
|
3508
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground group-data-[active]/link:text-accent", children }),
|
|
3509
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground-muted leading-snug mt-0.5", children: description })
|
|
3510
|
+
] })
|
|
3511
|
+
]
|
|
3512
|
+
}
|
|
3513
|
+
);
|
|
3514
|
+
}
|
|
3515
|
+
function MegaMenuFeatured({ children, className = "" }) {
|
|
3516
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["min-w-[220px] rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className].filter(Boolean).join(" "), children });
|
|
3517
|
+
}
|
|
3518
|
+
MegaMenu.Item = MegaMenuItem;
|
|
3519
|
+
MegaMenu.Panel = MegaMenuPanel;
|
|
3520
|
+
MegaMenu.Section = MegaMenuSection;
|
|
3521
|
+
MegaMenu.Link = MegaMenuLink;
|
|
3522
|
+
MegaMenu.Featured = MegaMenuFeatured;
|
|
3523
|
+
var MegaMenu_default = MegaMenu;
|
|
3424
3524
|
function AppShell({
|
|
3425
3525
|
topBar,
|
|
3426
3526
|
sidebarSections = [],
|
|
@@ -6897,6 +6997,7 @@ exports.Icon = icons_default;
|
|
|
6897
6997
|
exports.IconButton = IconButton;
|
|
6898
6998
|
exports.List = List2;
|
|
6899
6999
|
exports.LoadingSpinner = LoadingSpinner;
|
|
7000
|
+
exports.MegaMenu = MegaMenu_default;
|
|
6900
7001
|
exports.Modal = Modal;
|
|
6901
7002
|
exports.NotificationProvider = NotificationProvider;
|
|
6902
7003
|
exports.NumberInput = NumberInput;
|