@nswds/app 1.52.0 → 1.54.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.d.cts CHANGED
@@ -1921,6 +1921,7 @@ declare function MobileHeader({ sitename, navigation, version, hide, }: {
1921
1921
  version?: boolean;
1922
1922
  hide?: {
1923
1923
  search?: boolean;
1924
+ menu?: boolean;
1924
1925
  };
1925
1926
  }): react_jsx_runtime.JSX.Element;
1926
1927
 
package/dist/index.d.ts CHANGED
@@ -1921,6 +1921,7 @@ declare function MobileHeader({ sitename, navigation, version, hide, }: {
1921
1921
  version?: boolean;
1922
1922
  hide?: {
1923
1923
  search?: boolean;
1924
+ menu?: boolean;
1924
1925
  };
1925
1926
  }): react_jsx_runtime.JSX.Element;
1926
1927
 
package/dist/index.js CHANGED
@@ -7741,7 +7741,7 @@ function Heading({
7741
7741
 
7742
7742
  // package.json
7743
7743
  var package_default = {
7744
- version: "1.49.0"};
7744
+ version: "1.53.0"};
7745
7745
  function Logo(props) {
7746
7746
  return /* @__PURE__ */ jsxs(Fragment, { children: [
7747
7747
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "NSW Government" }),
@@ -23331,31 +23331,58 @@ function MobileHeader({
23331
23331
  hide = {}
23332
23332
  }) {
23333
23333
  const [open, setOpen] = useState(false);
23334
- const { search = true } = hide;
23334
+ const { search = true, menu = true } = hide;
23335
23335
  return /* @__PURE__ */ jsxs("div", { className: "lg:hidden", children: [
23336
- /* @__PURE__ */ jsxs("div", { className: "relative flex w-full items-center justify-between", children: [
23337
- /* @__PURE__ */ jsxs(Button2, { variant: "ghost", size: "icon", onClick: () => setOpen(true), className: "m-4", children: [
23338
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Main Navigation Menu" }),
23339
- /* @__PURE__ */ jsx(Icons.menu, { "aria-hidden": "true" })
23340
- ] }),
23341
- /* @__PURE__ */ jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsxs(
23342
- Link10,
23343
- {
23344
- href: "/",
23345
- "aria-label": "Home page",
23346
- className: "flex flex-col items-center justify-between",
23347
- children: [
23348
- /* @__PURE__ */ jsx(Logo, { className: "m-2 h-12 w-auto transition-colors" }),
23349
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center text-center", children: [
23350
- /* @__PURE__ */ jsx(Heading, { level: 2, size: 6, className: "ml-6", children: sitename }),
23351
- version && /* @__PURE__ */ jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
23352
- ] })
23353
- ]
23354
- }
23355
- ) }),
23356
- search && /* @__PURE__ */ jsx(MobileSearch, { navigation })
23357
- ] }),
23358
- /* @__PURE__ */ jsxs(Dialog$1, { open, onClose: setOpen, className: "relative z-50", children: [
23336
+ /* @__PURE__ */ jsxs(
23337
+ "div",
23338
+ {
23339
+ className: clsx21(
23340
+ "relative flex w-full items-center py-4",
23341
+ menu && !search && "justify-start",
23342
+ search && "justify-between",
23343
+ !menu && !search && "justify-center"
23344
+ ),
23345
+ children: [
23346
+ menu && /* @__PURE__ */ jsxs(Button2, { variant: "ghost", size: "icon", onClick: () => setOpen(true), className: "m-4", children: [
23347
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Main Navigation Menu" }),
23348
+ /* @__PURE__ */ jsx(Icons.menu, { "aria-hidden": "true" })
23349
+ ] }),
23350
+ /* @__PURE__ */ jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsxs(
23351
+ Link10,
23352
+ {
23353
+ href: "/",
23354
+ "aria-label": "Home page",
23355
+ className: clsx21(
23356
+ "flex items-center",
23357
+ menu && !search && "justify-start",
23358
+ search && !menu && "flex-row justify-between",
23359
+ menu && search || !menu && !search && "flex-col justify-center"
23360
+ ),
23361
+ children: [
23362
+ /* @__PURE__ */ jsx(Logo, { className: "m-2 h-12 w-auto transition-colors" }),
23363
+ /* @__PURE__ */ jsxs(
23364
+ "div",
23365
+ {
23366
+ className: clsx21(
23367
+ "flex flex-wrap items-center",
23368
+ menu && !search && "justify-center text-left",
23369
+ search && !menu && "justify-center text-left",
23370
+ menu && search && "justify-center text-center"
23371
+ ),
23372
+ children: [
23373
+ /* @__PURE__ */ jsx(Text, { size: 1, className: "text-primary-800 ml-2 leading-1 font-bold lg:ml-6", children: sitename }),
23374
+ version && /* @__PURE__ */ jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
23375
+ ]
23376
+ }
23377
+ )
23378
+ ]
23379
+ }
23380
+ ) }),
23381
+ search && /* @__PURE__ */ jsx(MobileSearch, { navigation })
23382
+ ]
23383
+ }
23384
+ ),
23385
+ menu && /* @__PURE__ */ jsxs(Dialog$1, { open, onClose: setOpen, className: "relative z-50", children: [
23359
23386
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0" }),
23360
23387
  /* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-y-0 left-0 flex max-w-full pr-10 sm:pr-16", children: /* @__PURE__ */ jsx(
23361
23388
  DialogPanel,