@amsterdam/design-system-react 2.2.0 → 3.0.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.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { PropsWithChildren, HTMLAttributes, BlockquoteHTMLAttributes, AnchorHTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, DialogHTMLAttributes, MouseEvent, ImgHTMLAttributes, LabelHTMLAttributes, ForwardRefExoticComponent, SVGProps, RefAttributes, OlHTMLAttributes, LiHTMLAttributes, ComponentType, OptionHTMLAttributes, OptgroupHTMLAttributes, SelectHTMLAttributes, TableHTMLAttributes, TextareaHTMLAttributes } from 'react';
2
+ import { PropsWithChildren, HTMLAttributes, BlockquoteHTMLAttributes, AnchorHTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, DialogHTMLAttributes, MouseEvent, ImgHTMLAttributes, LabelHTMLAttributes, ComponentType, SVGProps, OlHTMLAttributes, LiHTMLAttributes, OptionHTMLAttributes, OptgroupHTMLAttributes, SelectHTMLAttributes, TableHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
3
 
4
4
  declare const headingSizes: readonly [1, 2, 3, 4];
5
5
  type HeadingSize = (typeof headingSizes)[number];
@@ -253,7 +253,7 @@ type GridProps = {
253
253
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs Grid docs at Amsterdam Design System}
254
254
  */
255
255
  declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<any>> & {
256
- Cell: react.ForwardRefExoticComponent<GridCellProps & react.RefAttributes<unknown>>;
256
+ Cell: react.ForwardRefExoticComponent<GridCellProps & react.RefAttributes<any>>;
257
257
  };
258
258
 
259
259
  declare const breakoutCellTags: readonly ["article", "div", "section"];
@@ -516,7 +516,7 @@ declare const Column: react.ForwardRefExoticComponent<{
516
516
  gap?: ColumnGap;
517
517
  } & HTMLAttributes<HTMLElement> & {
518
518
  children?: react.ReactNode | undefined;
519
- } & react.RefAttributes<unknown>>;
519
+ } & react.RefAttributes<any>>;
520
520
 
521
521
  declare const dateInputTypes: readonly ["date", "datetime-local"];
522
522
  type DateInputType = (typeof dateInputTypes)[number];
@@ -935,20 +935,20 @@ type LinkListLinkProps = {
935
935
  size?: LinkListLinkSize;
936
936
  } & PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
937
937
 
938
- /**
939
- * @license EUPL-1.2+
940
- * Copyright Gemeente Amsterdam
941
- */
942
-
943
- type LogoBrand = 'amsterdam' | 'ggd-amsterdam' | 'museum-weesp' | 'stadsarchief' | 'stadsbank-van-lening' | 'vga-verzekeringen';
938
+ declare const logoBrands: readonly ["amsterdam", "ggd-amsterdam", "museum-weesp", "stadsarchief", "stadsbank-van-lening", "vga-verzekeringen"];
939
+ type LogoBrand = (typeof logoBrands)[number];
944
940
  type LogoProps = {
945
- /** The name of the brand for which to display the logo. */
946
- brand?: LogoBrand;
941
+ /** The name of the brand for which to display the logo, or configuration for a custom logo. */
942
+ brand?: LogoBrand | LogoBrandConfig;
947
943
  } & SVGProps<SVGSVGElement>;
944
+ type LogoBrandConfig = {
945
+ label: string;
946
+ svg: ComponentType<SVGProps<SVGSVGElement>>;
947
+ };
948
948
  /**
949
949
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-media-logo--docs Logo docs at Amsterdam Design System}
950
950
  */
951
- declare const Logo: ForwardRefExoticComponent<Omit<LogoProps, "ref"> & RefAttributes<SVGSVGElement>>;
951
+ declare const Logo: react.ForwardRefExoticComponent<Omit<LogoProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
952
952
 
953
953
  type MarkProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
954
954
  /**
@@ -1056,7 +1056,10 @@ type PageFooterProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
1056
1056
  declare const PageFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
1057
1057
  children?: react.ReactNode | undefined;
1058
1058
  } & react.RefAttributes<HTMLElement>> & {
1059
- Menu: react.ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
1059
+ Menu: react.ForwardRefExoticComponent<{
1060
+ heading?: string;
1061
+ headingLevel?: HeadingProps["level"];
1062
+ } & HTMLAttributes<HTMLUListElement> & {
1060
1063
  children?: react.ReactNode | undefined;
1061
1064
  } & react.RefAttributes<HTMLUListElement>>;
1062
1065
  MenuLink: react.ForwardRefExoticComponent<react.AnchorHTMLAttributes<HTMLAnchorElement> & {
@@ -1067,7 +1070,19 @@ declare const PageFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLEle
1067
1070
  } & react.RefAttributes<HTMLDivElement>>;
1068
1071
  };
1069
1072
 
1070
- type PageFooterMenuProps = PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
1073
+ type PageFooterMenuProps = {
1074
+ /**
1075
+ * Describes the menu for users of assistive technology.
1076
+ * The heading gets visually hidden – sighted users can infer the meaning of the menu from its appearance.
1077
+ * @default Over deze website
1078
+ */
1079
+ heading?: string;
1080
+ /**
1081
+ * The hierarchical level of the Footer Menu’s Heading within the document.
1082
+ * The default value is 2. This will almost always be correct – but verify this yourself.
1083
+ */
1084
+ headingLevel?: HeadingProps['level'];
1085
+ } & PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
1071
1086
 
1072
1087
  type PageFooterMenuLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
1073
1088
 
@@ -1079,15 +1094,19 @@ type PageHeaderProps = {
1079
1094
  /** The accessible name of the logo. */
1080
1095
  logoAccessibleName?: string;
1081
1096
  /** The name of the brand for which to display the logo. */
1082
- logoBrand?: LogoBrand;
1097
+ logoBrand?: LogoBrand | LogoBrandConfig;
1083
1098
  /** The url for the link on the logo. */
1084
1099
  logoLink?: string;
1085
1100
  /** The React component to use for the logo link. */
1086
1101
  logoLinkComponent?: ComponentType<AnchorHTMLAttributes<HTMLAnchorElement>>;
1087
1102
  /** The accessible text for the link on the logo. */
1088
1103
  logoLinkTitle?: string;
1089
- /** The text for the menu button. */
1104
+ /** The visible text for the menu button. */
1090
1105
  menuButtonText?: string;
1106
+ /** The text for screen readers when the button hides the menu. */
1107
+ menuButtonTextForHide?: string;
1108
+ /** The text for screen readers when the button shows the menu. */
1109
+ menuButtonTextForShow?: string;
1091
1110
  /** A slot for the menu items. Use PageHeader.MenuLink here. */
1092
1111
  menuItems?: ReactNode;
1093
1112
  /** The accessible label for the navigation section. */
@@ -1104,15 +1123,19 @@ declare const PageHeader: react.ForwardRefExoticComponent<{
1104
1123
  /** The accessible name of the logo. */
1105
1124
  logoAccessibleName?: string;
1106
1125
  /** The name of the brand for which to display the logo. */
1107
- logoBrand?: LogoBrand;
1126
+ logoBrand?: LogoBrand | LogoBrandConfig;
1108
1127
  /** The url for the link on the logo. */
1109
1128
  logoLink?: string;
1110
1129
  /** The React component to use for the logo link. */
1111
1130
  logoLinkComponent?: ComponentType<AnchorHTMLAttributes<HTMLAnchorElement>>;
1112
1131
  /** The accessible text for the link on the logo. */
1113
1132
  logoLinkTitle?: string;
1114
- /** The text for the menu button. */
1133
+ /** The visible text for the menu button. */
1115
1134
  menuButtonText?: string;
1135
+ /** The text for screen readers when the button hides the menu. */
1136
+ menuButtonTextForHide?: string;
1137
+ /** The text for screen readers when the button shows the menu. */
1138
+ menuButtonTextForShow?: string;
1116
1139
  /** A slot for the menu items. Use PageHeader.MenuLink here. */
1117
1140
  menuItems?: ReactNode;
1118
1141
  /** The accessible label for the navigation section. */
@@ -1266,7 +1289,7 @@ declare const Paragraph: react.ForwardRefExoticComponent<{
1266
1289
  /** The size of the text. */
1267
1290
  size?: "small" | "large";
1268
1291
  } & HTMLAttributes<HTMLParagraphElement> & {
1269
- children?: react.ReactNode | undefined;
1292
+ children?: ReactNode | undefined;
1270
1293
  } & react.RefAttributes<HTMLParagraphElement>>;
1271
1294
 
1272
1295
  type PasswordInputProps = {
@@ -1367,7 +1390,7 @@ declare const Row: react.ForwardRefExoticComponent<{
1367
1390
  wrap?: boolean;
1368
1391
  } & HTMLAttributes<HTMLElement> & {
1369
1392
  children?: react.ReactNode | undefined;
1370
- } & react.RefAttributes<unknown>>;
1393
+ } & react.RefAttributes<any>>;
1371
1394
 
1372
1395
  type SearchFieldProps = PropsWithChildren<HTMLAttributes<HTMLFormElement>>;
1373
1396
  /**
@@ -1713,7 +1736,7 @@ declare const Spotlight: react.ForwardRefExoticComponent<{
1713
1736
  color?: SpotlightColor;
1714
1737
  } & HTMLAttributes<HTMLElement> & {
1715
1738
  children?: react.ReactNode | undefined;
1716
- } & react.RefAttributes<unknown>>;
1739
+ } & react.RefAttributes<any>>;
1717
1740
 
1718
1741
  type StandaloneLinkProps = {
1719
1742
  /** Changes the text colour for readability on a light or dark background. */
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { clsx } from 'clsx';
3
- import { createContext, forwardRef, useContext, useState, useId, useRef, useImperativeHandle, useEffect, useCallback, useMemo, useLayoutEffect, startTransition } from 'react';
3
+ import { createContext, forwardRef, useContext, useState, useId, useRef, useImperativeHandle, useEffect, useCallback, useMemo, startTransition } from 'react';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
@@ -659,6 +659,17 @@ CardHeading.displayName = 'Card.Heading';
659
659
  var _excluded$1l = ["children", "className", "color", "size"];
660
660
  function ownKeys$1u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
661
661
  function _objectSpread$1u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1u(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
662
+ var wrapChildren = function wrapChildren(size, children) {
663
+ if (size === 'large') return jsx("b", {
664
+ className: "ams-paragraph__b",
665
+ children: children
666
+ });
667
+ if (size === 'small') return jsx("small", {
668
+ className: "ams-paragraph__small",
669
+ children: children
670
+ });
671
+ return children;
672
+ };
662
673
  /**
663
674
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-text-paragraph--docs Paragraph docs at Amsterdam Design System}
664
675
  */
@@ -672,7 +683,7 @@ var Paragraph = /*#__PURE__*/forwardRef(function (_ref, ref) {
672
683
  className: clsx('ams-paragraph', color && "ams-paragraph--".concat(color), size && "ams-paragraph--".concat(size), className),
673
684
  ref: ref
674
685
  }, restProps), {}, {
675
- children: children
686
+ children: wrapChildren(size, children)
676
687
  }));
677
688
  });
678
689
  Paragraph.displayName = 'Paragraph';
@@ -2105,27 +2116,27 @@ function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var t
2105
2116
  var logoConfig = {
2106
2117
  amsterdam: {
2107
2118
  label: 'Gemeente Amsterdam logo',
2108
- logo: LogoAmsterdam
2119
+ svg: LogoAmsterdam
2109
2120
  },
2110
2121
  'ggd-amsterdam': {
2111
2122
  label: 'GGD Amsterdam logo',
2112
- logo: LogoGgdAmsterdam
2123
+ svg: LogoGgdAmsterdam
2113
2124
  },
2114
2125
  'museum-weesp': {
2115
2126
  label: 'Gemeente Amsterdam Museum Weesp logo',
2116
- logo: LogoMuseumWeesp
2127
+ svg: LogoMuseumWeesp
2117
2128
  },
2118
2129
  stadsarchief: {
2119
2130
  label: 'Gemeente Amsterdam Stadsarchief logo',
2120
- logo: LogoStadsarchief
2131
+ svg: LogoStadsarchief
2121
2132
  },
2122
2133
  'stadsbank-van-lening': {
2123
2134
  label: 'Gemeente Amsterdam Stadsbank van Lening logo',
2124
- logo: LogoStadsbankVanLening
2135
+ svg: LogoStadsbankVanLening
2125
2136
  },
2126
2137
  'vga-verzekeringen': {
2127
2138
  label: 'Gemeente Amsterdam VGA Verzekeringen logo',
2128
- logo: LogoVgaVerzekeringen
2139
+ svg: LogoVgaVerzekeringen
2129
2140
  }
2130
2141
  };
2131
2142
  /**
@@ -2137,10 +2148,11 @@ var Logo = /*#__PURE__*/forwardRef(function (_ref, ref) {
2137
2148
  brand = _ref$brand === void 0 ? 'amsterdam' : _ref$brand,
2138
2149
  className = _ref.className,
2139
2150
  restProps = _objectWithoutProperties(_ref, _excluded$M);
2140
- var LogoComponent = logoConfig[brand].logo;
2141
- var logoLabel = logoConfig[brand].label;
2151
+ var config = typeof brand === 'string' ? logoConfig[brand] : brand;
2152
+ var label = config.label,
2153
+ LogoComponent = config.svg;
2142
2154
  return jsx(LogoComponent, _objectSpread$O(_objectSpread$O({}, restProps), {}, {
2143
- "aria-label": ariaLabel || logoLabel,
2155
+ "aria-label": ariaLabel || label,
2144
2156
  className: clsx('ams-logo', className),
2145
2157
  ref: ref
2146
2158
  }));
@@ -2301,18 +2313,28 @@ var Page = /*#__PURE__*/forwardRef(function (_ref, ref) {
2301
2313
  });
2302
2314
  Page.displayName = 'Page';
2303
2315
 
2304
- var _excluded$E = ["children", "className"];
2316
+ var _excluded$E = ["children", "className", "heading", "headingLevel"];
2305
2317
  function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2306
2318
  function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2307
2319
  var PageFooterMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
2308
2320
  var children = _ref.children,
2309
2321
  className = _ref.className,
2322
+ _ref$heading = _ref.heading,
2323
+ heading = _ref$heading === void 0 ? 'Over deze website' : _ref$heading,
2324
+ _ref$headingLevel = _ref.headingLevel,
2325
+ headingLevel = _ref$headingLevel === void 0 ? 2 : _ref$headingLevel,
2310
2326
  restProps = _objectWithoutProperties(_ref, _excluded$E);
2311
- return jsx("ul", _objectSpread$G(_objectSpread$G({}, restProps), {}, {
2312
- className: clsx('ams-page-footer__menu', className),
2313
- ref: ref,
2314
- children: children
2315
- }));
2327
+ var HeadingTag = getHeadingTag(headingLevel);
2328
+ return jsxs(Fragment, {
2329
+ children: [jsx(HeadingTag, {
2330
+ className: "ams-visually-hidden",
2331
+ children: heading
2332
+ }), jsx("ul", _objectSpread$G(_objectSpread$G({}, restProps), {}, {
2333
+ className: clsx('ams-page-footer__menu', className),
2334
+ ref: ref,
2335
+ children: children
2336
+ }))]
2337
+ });
2316
2338
  });
2317
2339
  PageFooterMenu.displayName = 'PageFooter.Menu';
2318
2340
 
@@ -2382,23 +2404,21 @@ var useIsAfterBreakpoint = function useIsAfterBreakpoint(breakpoint) {
2382
2404
  _useState2 = _slicedToArray(_useState, 2),
2383
2405
  matches = _useState2[0],
2384
2406
  setMatches = _useState2[1];
2385
- useLayoutEffect(function () {
2407
+ useEffect(function () {
2386
2408
  // Check for window object to avoid SSR issues
2387
- if (typeof window !== 'undefined') {
2388
- var media = window.matchMedia("(min-width: ".concat(BREAKPOINTS[breakpoint], ")"));
2389
- if (media.matches !== matches) {
2390
- setMatches(media.matches);
2391
- }
2392
- var listener = function listener() {
2393
- return setMatches(media.matches);
2394
- };
2395
- window.addEventListener('resize', listener);
2396
- return function () {
2397
- return window.removeEventListener('resize', listener);
2398
- };
2399
- }
2400
- return undefined;
2401
- }, [matches, breakpoint]);
2409
+ if (typeof window === 'undefined') return undefined;
2410
+ var query = "(min-width: ".concat(BREAKPOINTS[breakpoint], ")");
2411
+ var media = window.matchMedia(query);
2412
+ var listener = function listener() {
2413
+ return setMatches(media.matches);
2414
+ };
2415
+ // Set initial state
2416
+ setMatches(media.matches);
2417
+ media.addEventListener('change', listener);
2418
+ return function () {
2419
+ return media.removeEventListener('change', listener);
2420
+ };
2421
+ }, [breakpoint]);
2402
2422
  return matches;
2403
2423
  };
2404
2424
 
@@ -2411,6 +2431,8 @@ var PageHeaderGridCellNarrowWindowOnly = /*#__PURE__*/forwardRef(function (_ref,
2411
2431
  restProps = _objectWithoutProperties(_ref, _excluded$A);
2412
2432
  return jsx(Grid.Cell, _objectSpread$C(_objectSpread$C({}, restProps), {}, {
2413
2433
  className: clsx('ams-page-header__grid-cell-narrow-window-only', className),
2434
+ hidden // Hide until its CSS loads; this cell duplicates the non-fixed links in the Page Header Menu.
2435
+ : true,
2414
2436
  ref: ref,
2415
2437
  children: children
2416
2438
  }));
@@ -2461,7 +2483,7 @@ var PageHeaderMenuLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
2461
2483
  });
2462
2484
  PageHeaderMenuLink.displayName = 'PageHeader.MenuLink';
2463
2485
 
2464
- var _excluded$y = ["brandName", "children", "className", "logoAccessibleName", "logoBrand", "logoLink", "logoLinkComponent", "logoLinkTitle", "menuButtonText", "menuItems", "navigationLabel", "noMenuButtonOnWideWindow"];
2486
+ var _excluded$y = ["brandName", "children", "className", "logoAccessibleName", "logoBrand", "logoLink", "logoLinkComponent", "logoLinkTitle", "menuButtonText", "menuButtonTextForHide", "menuButtonTextForShow", "menuItems", "navigationLabel", "noMenuButtonOnWideWindow"];
2465
2487
  function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2466
2488
  function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2467
2489
  var LogoLinkContent = function LogoLinkContent(_ref) {
@@ -2499,6 +2521,10 @@ var PageHeaderRoot = /*#__PURE__*/forwardRef(function (_ref2, ref) {
2499
2521
  logoLinkTitle = _ref2$logoLinkTitle === void 0 ? "Ga naar de homepage".concat(brandName ? " van ".concat(brandName) : '') : _ref2$logoLinkTitle,
2500
2522
  _ref2$menuButtonText = _ref2.menuButtonText,
2501
2523
  menuButtonText = _ref2$menuButtonText === void 0 ? 'Menu' : _ref2$menuButtonText,
2524
+ _ref2$menuButtonTextF = _ref2.menuButtonTextForHide,
2525
+ menuButtonTextForHide = _ref2$menuButtonTextF === void 0 ? 'Verberg navigatiemenu' : _ref2$menuButtonTextF,
2526
+ _ref2$menuButtonTextF2 = _ref2.menuButtonTextForShow,
2527
+ menuButtonTextForShow = _ref2$menuButtonTextF2 === void 0 ? 'Laat navigatiemenu zien' : _ref2$menuButtonTextF2,
2502
2528
  menuItems = _ref2.menuItems,
2503
2529
  _ref2$navigationLabel = _ref2.navigationLabel,
2504
2530
  navigationLabel = _ref2$navigationLabel === void 0 ? 'Hoofdnavigatie' : _ref2$navigationLabel,
@@ -2550,7 +2576,9 @@ var PageHeaderRoot = /*#__PURE__*/forwardRef(function (_ref2, ref) {
2550
2576
  }), jsxs("ul", {
2551
2577
  className: "ams-page-header__menu",
2552
2578
  children: [menuItems, hasMegaMenu && jsx("li", {
2553
- className: clsx(noMenuButtonOnWideWindow && 'ams-page-header__mega-menu-button-item--hide-on-wide-window'),
2579
+ className: clsx('ams-page-header__mega-menu-button-item', noMenuButtonOnWideWindow && 'ams-page-header__mega-menu-button-item--hide-on-wide-window'),
2580
+ hidden // Hide the list item containing the menu button until its CSS loads. If it doesn't load, the menu will always be visible.
2581
+ : true,
2554
2582
  children: jsxs("button", {
2555
2583
  "aria-controls": "ams-page-header-mega-menu",
2556
2584
  "aria-expanded": open,
@@ -2560,8 +2588,12 @@ var PageHeaderRoot = /*#__PURE__*/forwardRef(function (_ref2, ref) {
2560
2588
  },
2561
2589
  type: "button",
2562
2590
  children: [jsx("span", {
2591
+ "aria-hidden": "true",
2563
2592
  className: "ams-page-header__mega-menu-button-label",
2564
2593
  children: menuButtonText
2594
+ }), jsx("span", {
2595
+ className: "ams-visually-hidden",
2596
+ children: open ? menuButtonTextForHide : menuButtonTextForShow
2565
2597
  }), jsx("span", {
2566
2598
  "aria-hidden": "true",
2567
2599
  className: "ams-page-header__mega-menu-button-hidden-label",
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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