hazo_ui 6.15.0 → 6.16.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/CHANGE_LOG.md +17 -0
- package/dist/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/index.locale-picker.cjs +2 -0
- package/dist/index.locale-picker.cjs.map +1 -1
- package/dist/index.locale-picker.js +2 -0
- package/dist/index.locale-picker.js.map +1 -1
- package/package.json +4 -2
- package/tailwind-preset.cjs +120 -0
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import { cva } from 'class-variance-authority';
|
|
11
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
12
|
-
import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, ChevronLeft, Filter, Plus, ArrowUpDown, icons, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1, Globe } from 'lucide-react';
|
|
12
|
+
import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, ChevronLeft, Filter, Plus, ArrowUpDown, icons, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, Menu, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1, Globe } from 'lucide-react';
|
|
13
13
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
14
14
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
15
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -807,6 +807,8 @@ var en_default = {
|
|
|
807
807
|
"locale_picker.change_language": "Change language",
|
|
808
808
|
"app_logo.alt_fallback": "Logo",
|
|
809
809
|
"app_header.aria_label": "Application header",
|
|
810
|
+
"app_header.menu_label": "Menu",
|
|
811
|
+
"app_header.nav_title": "Navigation",
|
|
810
812
|
"skeleton.loading_content": "Loading content",
|
|
811
813
|
"spinner.loading": "Loading",
|
|
812
814
|
"spinner.loading_text": "Loading...",
|
|
@@ -12457,6 +12459,7 @@ function Logo({
|
|
|
12457
12459
|
}
|
|
12458
12460
|
function AppHeader({ identity, homeHref, navItems, actions, className }) {
|
|
12459
12461
|
const t = useHazoUiT();
|
|
12462
|
+
const [drawerOpen, setDrawerOpen] = React27.useState(false);
|
|
12460
12463
|
return /* @__PURE__ */ jsxs(
|
|
12461
12464
|
"header",
|
|
12462
12465
|
{
|
|
@@ -12476,9 +12479,34 @@ function AppHeader({ identity, homeHref, navItems, actions, className }) {
|
|
|
12476
12479
|
href: homeHref
|
|
12477
12480
|
}
|
|
12478
12481
|
),
|
|
12479
|
-
navItems
|
|
12482
|
+
navItems && /* @__PURE__ */ jsx("div", { className: "hidden md:flex items-center", children: navItems })
|
|
12480
12483
|
] }),
|
|
12481
|
-
/* @__PURE__ */
|
|
12484
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12485
|
+
actions,
|
|
12486
|
+
navItems && /* @__PURE__ */ jsxs(Drawer, { open: drawerOpen, onOpenChange: setDrawerOpen, children: [
|
|
12487
|
+
/* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
12488
|
+
"button",
|
|
12489
|
+
{
|
|
12490
|
+
className: "md:hidden rounded-md p-1.5 hover:bg-navbar-active/10",
|
|
12491
|
+
"aria-label": t("app_header.menu_label"),
|
|
12492
|
+
children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" })
|
|
12493
|
+
}
|
|
12494
|
+
) }),
|
|
12495
|
+
/* @__PURE__ */ jsxs(DrawerContent, { children: [
|
|
12496
|
+
/* @__PURE__ */ jsx(DrawerTitle, { className: "sr-only", children: t("app_header.nav_title") }),
|
|
12497
|
+
/* @__PURE__ */ jsx(
|
|
12498
|
+
"div",
|
|
12499
|
+
{
|
|
12500
|
+
className: "p-4 [&_nav]:flex-col [&_nav]:gap-2 [&_nav]:items-stretch",
|
|
12501
|
+
onClick: (e) => {
|
|
12502
|
+
if (e.target.closest("a")) setDrawerOpen(false);
|
|
12503
|
+
},
|
|
12504
|
+
children: navItems
|
|
12505
|
+
}
|
|
12506
|
+
)
|
|
12507
|
+
] })
|
|
12508
|
+
] })
|
|
12509
|
+
] })
|
|
12482
12510
|
]
|
|
12483
12511
|
}
|
|
12484
12512
|
);
|