gridsmith-ui 0.3.1 → 0.3.2
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.d.ts +3 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1051,8 +1051,10 @@ interface DrawerProps {
|
|
|
1051
1051
|
flush?: boolean;
|
|
1052
1052
|
/** Use a lighter backdrop (no blur, subtle dim). Use for compact overlays. */
|
|
1053
1053
|
lightBackdrop?: boolean;
|
|
1054
|
+
/** Offset the drawer from the top of its container. When set, the area above this offset remains visible and interactive (e.g. keeping a navbar accessible). */
|
|
1055
|
+
topOffset?: string;
|
|
1054
1056
|
}
|
|
1055
|
-
declare function Drawer({ open, onClose, position, width, title, children, footer, container, flush, lightBackdrop }: DrawerProps): react.ReactPortal | null;
|
|
1057
|
+
declare function Drawer({ open, onClose, position, width, title, children, footer, container, flush, lightBackdrop, topOffset }: DrawerProps): react.ReactPortal | null;
|
|
1056
1058
|
|
|
1057
1059
|
interface TooltipProps {
|
|
1058
1060
|
content: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -95065,7 +95065,7 @@ var borderByPosition = {
|
|
|
95065
95065
|
left: "border-r-[length:var(--ds-border-width)] border-r-[var(--ds-border-default)]",
|
|
95066
95066
|
bottom: "border-t-[length:var(--ds-border-width)] border-t-[var(--ds-border-default)]"
|
|
95067
95067
|
};
|
|
95068
|
-
function Drawer({ open, onClose, position = "right", width = "400px", title, children, footer, container, flush, lightBackdrop }) {
|
|
95068
|
+
function Drawer({ open, onClose, position = "right", width = "400px", title, children, footer, container, flush, lightBackdrop, topOffset }) {
|
|
95069
95069
|
const titleId = useId();
|
|
95070
95070
|
const isMobile = useBreakpoint("sm");
|
|
95071
95071
|
const panelRef = useRef(null);
|
|
@@ -95101,9 +95101,11 @@ function Drawer({ open, onClose, position = "right", width = "400px", title, chi
|
|
|
95101
95101
|
"div",
|
|
95102
95102
|
{
|
|
95103
95103
|
className: cn(
|
|
95104
|
-
`${positionClass}
|
|
95104
|
+
`${positionClass} z-50 transition-opacity duration-[var(--ds-transition-speed)]`,
|
|
95105
|
+
topOffset ? "left-0 right-0 bottom-0" : "inset-0",
|
|
95105
95106
|
open ? "pointer-events-auto" : "pointer-events-none"
|
|
95106
95107
|
),
|
|
95108
|
+
style: topOffset ? { top: topOffset } : void 0,
|
|
95107
95109
|
onTransitionEnd: handleTransitionEnd,
|
|
95108
95110
|
children: [
|
|
95109
95111
|
/* @__PURE__ */ jsx(
|
|
@@ -95255,6 +95257,7 @@ var AppShell = forwardRef(function AppShell2({
|
|
|
95255
95257
|
container: shellRef.current ?? void 0,
|
|
95256
95258
|
flush: mobileMenuFlush,
|
|
95257
95259
|
lightBackdrop: mobileMenuLightBackdrop,
|
|
95260
|
+
topOffset: layout !== "stacked" && navbar != null ? "var(--ds-navbar-height)" : void 0,
|
|
95258
95261
|
children: mobileMenu
|
|
95259
95262
|
}
|
|
95260
95263
|
),
|
|
@@ -95315,12 +95318,13 @@ function getTypeClasses(type, active) {
|
|
|
95315
95318
|
);
|
|
95316
95319
|
}
|
|
95317
95320
|
}
|
|
95318
|
-
function HamburgerButton({ onClick, className: cls }) {
|
|
95321
|
+
function HamburgerButton({ onClick, open, className: cls }) {
|
|
95319
95322
|
return /* @__PURE__ */ jsx(
|
|
95320
95323
|
"button",
|
|
95321
95324
|
{
|
|
95322
95325
|
onClick,
|
|
95323
|
-
"aria-label": "
|
|
95326
|
+
"aria-label": open ? "Close navigation menu" : "Open navigation menu",
|
|
95327
|
+
"aria-expanded": open ?? void 0,
|
|
95324
95328
|
className: cn(
|
|
95325
95329
|
"flex items-center justify-center shrink-0",
|
|
95326
95330
|
"w-10 h-10 rounded-[var(--ds-radius-md)]",
|
|
@@ -95330,7 +95334,7 @@ function HamburgerButton({ onClick, className: cls }) {
|
|
|
95330
95334
|
"cursor-pointer",
|
|
95331
95335
|
cls
|
|
95332
95336
|
),
|
|
95333
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "menu", size: 20 })
|
|
95337
|
+
children: /* @__PURE__ */ jsx(Icon, { name: open ? "close" : "menu", size: 20 })
|
|
95334
95338
|
}
|
|
95335
95339
|
);
|
|
95336
95340
|
}
|
|
@@ -95378,7 +95382,7 @@ var Navbar = forwardRef(function Navbar2({
|
|
|
95378
95382
|
style: { padding: padStyle, gap: "var(--ds-space-4)" },
|
|
95379
95383
|
children: [
|
|
95380
95384
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4", children: [
|
|
95381
|
-
showHamburger && /* @__PURE__ */ jsx(HamburgerButton, { onClick: handleHamburger }),
|
|
95385
|
+
showHamburger && /* @__PURE__ */ jsx(HamburgerButton, { onClick: handleHamburger, open: appShell?.sidebarOpen }),
|
|
95382
95386
|
logo && /* @__PURE__ */ jsx("div", { className: "flex items-center shrink-0", children: logo })
|
|
95383
95387
|
] }),
|
|
95384
95388
|
navLinks && !hideNavLinks ? /* @__PURE__ */ jsx(NavbarTypeContext.Provider, { value: type, children: /* @__PURE__ */ jsx("nav", { className: "flex items-center gap-ds-1 min-w-0 overflow-x-clip justify-center", "data-navbar-type": type, children: navLinks }) }) : /* @__PURE__ */ jsx("div", {}),
|
|
@@ -95404,7 +95408,7 @@ var Navbar = forwardRef(function Navbar2({
|
|
|
95404
95408
|
),
|
|
95405
95409
|
style: { padding: padStyle, gap: "var(--ds-space-4)" },
|
|
95406
95410
|
children: [
|
|
95407
|
-
showHamburger && /* @__PURE__ */ jsx(HamburgerButton, { onClick: handleHamburger }),
|
|
95411
|
+
showHamburger && /* @__PURE__ */ jsx(HamburgerButton, { onClick: handleHamburger, open: appShell?.sidebarOpen }),
|
|
95408
95412
|
logo && /* @__PURE__ */ jsx("div", { className: "flex items-center shrink-0", children: logo }),
|
|
95409
95413
|
align === "right" && /* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
95410
95414
|
navLinks && !hideNavLinks && /* @__PURE__ */ jsx(NavbarTypeContext.Provider, { value: type, children: /* @__PURE__ */ jsx("nav", { className: cn("flex items-center gap-ds-1 min-w-0 overflow-x-clip", align === "left" && "flex-1"), "data-navbar-type": type, children: navLinks }) }),
|