@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/globals.css CHANGED
@@ -3116,6 +3116,10 @@
3116
3116
  .text-\[length\:var\(--font-size-4\)\] {
3117
3117
  font-size: var(--font-size-4);
3118
3118
  }
3119
+ .leading-1 {
3120
+ --tw-leading: calc(var(--spacing) * 1);
3121
+ line-height: calc(var(--spacing) * 1);
3122
+ }
3119
3123
  .leading-5 {
3120
3124
  --tw-leading: calc(var(--spacing) * 5);
3121
3125
  line-height: calc(var(--spacing) * 5);
@@ -8202,6 +8206,11 @@
8202
8206
  margin-top: calc(var(--spacing) * 4);
8203
8207
  }
8204
8208
  }
8209
+ .lg\:ml-6 {
8210
+ @media (width >= 64rem) {
8211
+ margin-left: calc(var(--spacing) * 6);
8212
+ }
8213
+ }
8205
8214
  .lg\:block {
8206
8215
  @media (width >= 64rem) {
8207
8216
  display: block;
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.53.0"};
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,58 @@ 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 py-4",
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
+ menu && !search && "justify-start",
23411
+ search && !menu && "flex-row justify-between",
23412
+ menu && search || !menu && !search && "flex-col justify-center"
23413
+ ),
23414
+ children: [
23415
+ /* @__PURE__ */ jsxRuntime.jsx(Logo, { className: "m-2 h-12 w-auto transition-colors" }),
23416
+ /* @__PURE__ */ jsxRuntime.jsxs(
23417
+ "div",
23418
+ {
23419
+ className: clsx21__default.default(
23420
+ "flex flex-wrap items-center",
23421
+ menu && !search && "justify-center text-left",
23422
+ search && !menu && "justify-center text-left",
23423
+ menu && search && "justify-center text-center"
23424
+ ),
23425
+ children: [
23426
+ /* @__PURE__ */ jsxRuntime.jsx(Text, { size: 1, className: "text-primary-800 ml-2 leading-1 font-bold lg:ml-6", children: sitename }),
23427
+ version && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
23428
+ ]
23429
+ }
23430
+ )
23431
+ ]
23432
+ }
23433
+ ) }),
23434
+ search && /* @__PURE__ */ jsxRuntime.jsx(MobileSearch, { navigation })
23435
+ ]
23436
+ }
23437
+ ),
23438
+ menu && /* @__PURE__ */ jsxRuntime.jsxs(Headless4.Dialog, { open, onClose: setOpen, className: "relative z-50", children: [
23412
23439
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0" }),
23413
23440
  /* @__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
23441
  Headless4.DialogPanel,