@nswds/app 1.52.0 → 1.53.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 CHANGED
@@ -7794,7 +7794,7 @@ function Heading({
7794
7794
 
7795
7795
  // package.json
7796
7796
  var package_default = {
7797
- version: "1.49.0"};
7797
+ version: "1.51.1"};
7798
7798
  function Logo(props) {
7799
7799
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7800
7800
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "NSW Government" }),
@@ -23384,31 +23384,45 @@ function MobileHeader({
23384
23384
  hide = {}
23385
23385
  }) {
23386
23386
  const [open, setOpen] = React16.useState(false);
23387
- const { search = true } = hide;
23387
+ const { search = true, menu = true } = hide;
23388
23388
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:hidden", children: [
23389
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex w-full items-center justify-between", children: [
23390
- /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "ghost", size: "icon", onClick: () => setOpen(true), className: "m-4", children: [
23391
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Main Navigation Menu" }),
23392
- /* @__PURE__ */ jsxRuntime.jsx(Icons.menu, { "aria-hidden": "true" })
23393
- ] }),
23394
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
23395
- Link10__default.default,
23396
- {
23397
- href: "/",
23398
- "aria-label": "Home page",
23399
- className: "flex flex-col items-center justify-between",
23400
- children: [
23401
- /* @__PURE__ */ jsxRuntime.jsx(Logo, { className: "m-2 h-12 w-auto transition-colors" }),
23402
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center text-center", children: [
23403
- /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 2, size: 6, className: "ml-6", children: sitename }),
23404
- version && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
23405
- ] })
23406
- ]
23407
- }
23408
- ) }),
23409
- search && /* @__PURE__ */ jsxRuntime.jsx(MobileSearch, { navigation })
23410
- ] }),
23411
- /* @__PURE__ */ jsxRuntime.jsxs(Headless4.Dialog, { open, onClose: setOpen, className: "relative z-50", children: [
23389
+ /* @__PURE__ */ jsxRuntime.jsxs(
23390
+ "div",
23391
+ {
23392
+ className: clsx21__default.default(
23393
+ "relative flex w-full items-center",
23394
+ menu && !search && "justify-start",
23395
+ search && "justify-between",
23396
+ !menu && !search && "justify-center"
23397
+ ),
23398
+ children: [
23399
+ menu && /* @__PURE__ */ jsxRuntime.jsxs(Button2, { variant: "ghost", size: "icon", onClick: () => setOpen(true), className: "m-4", children: [
23400
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Main Navigation Menu" }),
23401
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.menu, { "aria-hidden": "true" })
23402
+ ] }),
23403
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
23404
+ Link10__default.default,
23405
+ {
23406
+ href: "/",
23407
+ "aria-label": "Home page",
23408
+ className: clsx21__default.default(
23409
+ "flex items-center",
23410
+ search && menu ? "flex-col justify-between" : "flex-row"
23411
+ ),
23412
+ children: [
23413
+ /* @__PURE__ */ jsxRuntime.jsx(Logo, { className: "m-2 h-12 w-auto transition-colors" }),
23414
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center text-center", children: [
23415
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 2, size: 6, className: "ml-6", children: sitename }),
23416
+ version && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
23417
+ ] })
23418
+ ]
23419
+ }
23420
+ ) }),
23421
+ search && /* @__PURE__ */ jsxRuntime.jsx(MobileSearch, { navigation })
23422
+ ]
23423
+ }
23424
+ ),
23425
+ menu && /* @__PURE__ */ jsxRuntime.jsxs(Headless4.Dialog, { open, onClose: setOpen, className: "relative z-50", children: [
23412
23426
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0" }),
23413
23427
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none fixed inset-y-0 left-0 flex max-w-full pr-10 sm:pr-16", children: /* @__PURE__ */ jsxRuntime.jsx(
23414
23428
  Headless4.DialogPanel,