@nswds/app 1.89.7 → 1.90.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.js CHANGED
@@ -17503,7 +17503,7 @@ function FormatToggle({ format, setFormat }) {
17503
17503
 
17504
17504
  // package.json
17505
17505
  var package_default = {
17506
- version: "1.88.0"};
17506
+ version: "1.89.0"};
17507
17507
  var SluggerContext = React5__default.createContext(null);
17508
17508
  function flattenText(nodes) {
17509
17509
  if (nodes == null || typeof nodes === "boolean") return "";
@@ -18842,7 +18842,7 @@ function MainNavigation({ navigation }) {
18842
18842
  "aria-label": "Main Navigation",
18843
18843
  role: "navigation",
18844
18844
  id: "nsw-main-navigation",
18845
- className: "sticky z-40 hidden bg-grey-100 shadow-md shadow-grey-900/5 sm:px-6 lg:block lg:px-4 dark:shadow-none",
18845
+ className: "sticky z-40 hidden bg-grey-100 shadow-md shadow-grey-900/5 sm:px-6 lg:block lg:px-4 dark:border-b dark:border-grey-800 dark:bg-grey-900 dark:shadow-none",
18846
18846
  style: {
18847
18847
  top: `${headerHeight}px`,
18848
18848
  transition: "top 0.2s ease-in-out"
@@ -18877,9 +18877,9 @@ function TopLevel({ title, href }) {
18877
18877
  // Base styles
18878
18878
  "inline-flex items-center gap-x-1 p-4 transition lg:px-8",
18879
18879
  // Text styles
18880
- "text-base leading-6 font-bold text-grey-800",
18880
+ "text-base leading-6 font-bold text-grey-800 dark:text-grey-100",
18881
18881
  // Hover styles
18882
- "hover:bg-primary-800/10"
18882
+ "hover:bg-primary-800/10 hover:text-primary-800 dark:hover:bg-primary-200/10 dark:hover:text-primary-200"
18883
18883
  ),
18884
18884
  children: title
18885
18885
  },
@@ -18894,14 +18894,12 @@ function MegaMenu({ title, href, links }) {
18894
18894
  className: cn(
18895
18895
  "inline-flex items-center gap-x-1 p-4 transition lg:px-8",
18896
18896
  // Text styles
18897
- "text-base leading-6 font-bold text-grey-800 hover:text-primary-800 dark:text-grey-400 dark:hover:text-white",
18897
+ "text-base leading-6 font-bold text-grey-800 hover:text-primary-800 dark:text-grey-100 dark:hover:text-primary-200",
18898
18898
  // Hover styles
18899
- "hover:bg-primary-800/10 hover:font-bold hover:text-primary-800",
18900
- // Focus styles,
18901
- "",
18899
+ "hover:bg-primary-800/10 hover:font-bold dark:hover:bg-primary-200/10",
18902
18900
  // Border styles
18903
18901
  "border-b-2",
18904
- open ? "border-primary-800" : "border-transparent"
18902
+ open ? "border-primary-800 dark:border-primary-200" : "border-transparent dark:border-transparent"
18905
18903
  ),
18906
18904
  children: [
18907
18905
  title,
@@ -18921,13 +18919,13 @@ function MegaMenu({ title, href, links }) {
18921
18919
  PopoverPanel,
18922
18920
  {
18923
18921
  transition: true,
18924
- className: "absolute inset-x-0 top-0 -z-10 pt-14 shadow transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[enter]:ease-out data-[leave]:duration-150 data-[leave]:ease-in",
18925
- children: /* @__PURE__ */ jsxs("div", { className: "mx-auto grid bg-white", children: [
18922
+ className: "absolute inset-x-0 top-0 -z-10 pt-14 shadow transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[enter]:ease-out data-[leave]:duration-150 data-[leave]:ease-in dark:shadow-black/40",
18923
+ children: /* @__PURE__ */ jsxs("div", { className: "mx-auto grid bg-white dark:bg-grey-900", children: [
18926
18924
  /* @__PURE__ */ jsxs(
18927
18925
  Link13,
18928
18926
  {
18929
18927
  href,
18930
- className: "group flex items-center px-8 py-8 text-xl font-bold text-primary-800 hover:bg-primary-800/10",
18928
+ className: "group flex items-center px-8 py-8 text-xl font-bold text-primary-800 hover:bg-primary-800/10 dark:text-primary-200 dark:hover:bg-primary-200/10",
18931
18929
  children: [
18932
18930
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute inset-0" }),
18933
18931
  title,
@@ -18940,21 +18938,15 @@ function MegaMenu({ title, href, links }) {
18940
18938
  {
18941
18939
  className: cn(
18942
18940
  // Base styles
18943
- "relative mx-2 border-t bg-white p-4 hover:bg-primary-800/10 hover:font-bold hover:text-primary-800 [&:nth-last-child(-n+3)]:border-b",
18944
- // Hover styles
18945
- "",
18941
+ "relative mx-2 border-t border-grey-200 bg-white p-4 hover:bg-primary-800/10 hover:font-bold hover:text-primary-800 dark:border-grey-700 dark:bg-grey-900 dark:hover:bg-primary-200/10 dark:hover:text-primary-200 [&:nth-last-child(-n+3)]:border-b",
18946
18942
  // Focus styles
18947
18943
  "focus-within:rounded-sm focus-within:outline focus-within:outline-inherit"
18948
18944
  ),
18949
- children: /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-grey-900", children: /* @__PURE__ */ jsxs(
18945
+ children: /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-grey-900 dark:text-grey-100", children: /* @__PURE__ */ jsxs(
18950
18946
  Link13,
18951
18947
  {
18952
18948
  href: item.href,
18953
18949
  className: cn(
18954
- // Base styles
18955
- "",
18956
- // Hover styles
18957
- "",
18958
18950
  // Focus styles
18959
18951
  "outline-none"
18960
18952
  ),
@@ -18973,7 +18965,7 @@ function MegaMenu({ title, href, links }) {
18973
18965
  ] }) });
18974
18966
  }
18975
18967
  function Masthead() {
18976
- return /* @__PURE__ */ jsx("div", { id: "nsw-masthead", className: "w-full bg-primary-800", children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full items-center justify-between px-4 py-2 sm:px-6 lg:px-12", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-12", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-white", children: "A NSW Government website" }) }) }) });
18968
+ return /* @__PURE__ */ jsx("div", { id: "nsw-masthead", className: "w-full bg-primary-800 dark:bg-primary-950", children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full items-center justify-between px-4 py-2 sm:px-6 lg:px-12", children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-12", children: /* @__PURE__ */ jsx("p", { className: "text-xs text-white", children: "A NSW Government website" }) }) }) });
18977
18969
  }
18978
18970
  function Menubar({ className, ...props }) {
18979
18971
  return /* @__PURE__ */ jsx(
@@ -22916,16 +22908,68 @@ function variantLabelsAsDependency(prop) {
22916
22908
  return Array.isArray(prop) ? prop.join(" ") : prop;
22917
22909
  }
22918
22910
 
22919
- // node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs
22920
- var scaleCorrectors = {};
22921
- function addScaleCorrector(correctors) {
22922
- for (const key in correctors) {
22923
- scaleCorrectors[key] = correctors[key];
22924
- if (isCSSVariableName(key)) {
22925
- scaleCorrectors[key].isCSSVariable = true;
22911
+ // node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs
22912
+ function pixelsToPercent(pixels, axis) {
22913
+ if (axis.max === axis.min)
22914
+ return 0;
22915
+ return pixels / (axis.max - axis.min) * 100;
22916
+ }
22917
+ var correctBorderRadius = {
22918
+ correct: (latest, node) => {
22919
+ if (!node.target)
22920
+ return latest;
22921
+ if (typeof latest === "string") {
22922
+ if (px.test(latest)) {
22923
+ latest = parseFloat(latest);
22924
+ } else {
22925
+ return latest;
22926
+ }
22926
22927
  }
22928
+ const x = pixelsToPercent(latest, node.target.x);
22929
+ const y = pixelsToPercent(latest, node.target.y);
22930
+ return `${x}% ${y}%`;
22927
22931
  }
22928
- }
22932
+ };
22933
+
22934
+ // node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs
22935
+ var correctBoxShadow = {
22936
+ correct: (latest, { treeScale, projectionDelta }) => {
22937
+ const original = latest;
22938
+ const shadow = complex.parse(latest);
22939
+ if (shadow.length > 5)
22940
+ return original;
22941
+ const template = complex.createTransformer(latest);
22942
+ const offset = typeof shadow[0] !== "number" ? 1 : 0;
22943
+ const xScale = projectionDelta.x.scale * treeScale.x;
22944
+ const yScale = projectionDelta.y.scale * treeScale.y;
22945
+ shadow[0 + offset] /= xScale;
22946
+ shadow[1 + offset] /= yScale;
22947
+ const averageScale = mixNumber(xScale, yScale, 0.5);
22948
+ if (typeof shadow[2 + offset] === "number")
22949
+ shadow[2 + offset] /= averageScale;
22950
+ if (typeof shadow[3 + offset] === "number")
22951
+ shadow[3 + offset] /= averageScale;
22952
+ return template(shadow);
22953
+ }
22954
+ };
22955
+
22956
+ // node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs
22957
+ var scaleCorrectors = {
22958
+ borderRadius: {
22959
+ ...correctBorderRadius,
22960
+ applyTo: [
22961
+ "borderTopLeftRadius",
22962
+ "borderTopRightRadius",
22963
+ "borderBottomLeftRadius",
22964
+ "borderBottomRightRadius"
22965
+ ]
22966
+ },
22967
+ borderTopLeftRadius: correctBorderRadius,
22968
+ borderTopRightRadius: correctBorderRadius,
22969
+ borderBottomLeftRadius: correctBorderRadius,
22970
+ borderBottomRightRadius: correctBorderRadius,
22971
+ boxShadow: correctBoxShadow
22972
+ };
22929
22973
 
22930
22974
  // node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs
22931
22975
  function isForcedMotionValue(key, { layout: layout2, layoutId }) {
@@ -25581,51 +25625,6 @@ var globalProjectionState = {
25581
25625
  hasEverUpdated: false
25582
25626
  };
25583
25627
 
25584
- // node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs
25585
- function pixelsToPercent(pixels, axis) {
25586
- if (axis.max === axis.min)
25587
- return 0;
25588
- return pixels / (axis.max - axis.min) * 100;
25589
- }
25590
- var correctBorderRadius = {
25591
- correct: (latest, node) => {
25592
- if (!node.target)
25593
- return latest;
25594
- if (typeof latest === "string") {
25595
- if (px.test(latest)) {
25596
- latest = parseFloat(latest);
25597
- } else {
25598
- return latest;
25599
- }
25600
- }
25601
- const x = pixelsToPercent(latest, node.target.x);
25602
- const y = pixelsToPercent(latest, node.target.y);
25603
- return `${x}% ${y}%`;
25604
- }
25605
- };
25606
-
25607
- // node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs
25608
- var correctBoxShadow = {
25609
- correct: (latest, { treeScale, projectionDelta }) => {
25610
- const original = latest;
25611
- const shadow = complex.parse(latest);
25612
- if (shadow.length > 5)
25613
- return original;
25614
- const template = complex.createTransformer(latest);
25615
- const offset = typeof shadow[0] !== "number" ? 1 : 0;
25616
- const xScale = projectionDelta.x.scale * treeScale.x;
25617
- const yScale = projectionDelta.y.scale * treeScale.y;
25618
- shadow[0 + offset] /= xScale;
25619
- shadow[1 + offset] /= yScale;
25620
- const averageScale = mixNumber(xScale, yScale, 0.5);
25621
- if (typeof shadow[2 + offset] === "number")
25622
- shadow[2 + offset] /= averageScale;
25623
- if (typeof shadow[3 + offset] === "number")
25624
- shadow[3 + offset] /= averageScale;
25625
- return template(shadow);
25626
- }
25627
- };
25628
-
25629
25628
  // node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs
25630
25629
  var hasTakenAnySnapshot = false;
25631
25630
  var MeasureLayoutWithContext = class extends Component {
@@ -25637,7 +25636,6 @@ var MeasureLayoutWithContext = class extends Component {
25637
25636
  componentDidMount() {
25638
25637
  const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;
25639
25638
  const { projection } = visualElement;
25640
- addScaleCorrector(defaultScaleCorrectors);
25641
25639
  if (projection) {
25642
25640
  if (layoutGroup.group)
25643
25641
  layoutGroup.group.add(projection);
@@ -25719,22 +25717,6 @@ function MeasureLayout(props) {
25719
25717
  const layoutGroup = useContext(LayoutGroupContext);
25720
25718
  return jsx(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove });
25721
25719
  }
25722
- var defaultScaleCorrectors = {
25723
- borderRadius: {
25724
- ...correctBorderRadius,
25725
- applyTo: [
25726
- "borderTopLeftRadius",
25727
- "borderTopRightRadius",
25728
- "borderBottomLeftRadius",
25729
- "borderBottomRightRadius"
25730
- ]
25731
- },
25732
- borderTopLeftRadius: correctBorderRadius,
25733
- borderTopRightRadius: correctBorderRadius,
25734
- borderBottomLeftRadius: correctBorderRadius,
25735
- borderBottomRightRadius: correctBorderRadius,
25736
- boxShadow: correctBoxShadow
25737
- };
25738
25720
 
25739
25721
  // node_modules/framer-motion/dist/es/animation/animate/single-value.mjs
25740
25722
  function animateSingleValue(value, keyframes2, options) {