@civicactions/cmsds-open-data-components 4.1.2-alpha.4 → 4.1.2-alpha.6

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/main.js CHANGED
@@ -3232,21 +3232,25 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3232
3232
  ]
3233
3233
  })
3234
3234
  }),
3235
+ loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
3236
+ "aria-valuetext": "Dataset loading",
3237
+ role: "img",
3238
+ className: "ds-u-margin--3"
3239
+ }),
3240
+ !loading && table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3241
+ variation: "warn",
3242
+ role: "region",
3243
+ children: "No results found for the current filters"
3244
+ }),
3235
3245
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3236
3246
  "aria-live": "polite",
3237
- className: !loading ? "ds-u-visibility--screen-reader" : undefined,
3238
- children: loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
3239
- "aria-valuetext": "Dataset loading",
3240
- className: "ds-u-margin--3"
3241
- })
3247
+ className: "ds-u-visibility--screen-reader",
3248
+ children: loading ? "Dataset loading" : ""
3242
3249
  }),
3243
3250
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3244
3251
  "aria-live": "assertive",
3245
- className: !loading && table.getRowModel().rows.length === 0 ? undefined : "ds-u-visibility--screen-reader",
3246
- children: !loading && table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3247
- variation: "warn",
3248
- children: "No results found for the current filters"
3249
- })
3252
+ className: "ds-u-visibility--screen-reader",
3253
+ children: !loading && table.getRowModel().rows.length === 0 ? "No results found for the current filters" : ""
3250
3254
  })
3251
3255
  ]
3252
3256
  });
@@ -7548,15 +7552,20 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
7548
7552
  }
7549
7553
  }
7550
7554
  };
7555
+ (0, $hgUW1$useEffect)(()=>{
7556
+ if (!mobileMax && mobileMenuOpen) setMobileMenuOpen(false);
7557
+ }, [
7558
+ mobileMax
7559
+ ]);
7551
7560
  (0, $hgUW1$useEffect)(()=>{
7552
7561
  document.addEventListener('keyup', handleMenuClose);
7553
7562
  document.addEventListener('mousedown', handleClick);
7554
7563
  if (mobileMenuOpen) handleFocusIn();
7555
7564
  else closeMobileMenu();
7556
- if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
7565
+ if (menu.current) menu.current.addEventListener('keydown', trapFocus);
7557
7566
  return ()=>{
7558
7567
  document.removeEventListener('keyup', handleMenuClose);
7559
- document.addEventListener('mousedown', handleClick);
7568
+ document.removeEventListener('mousedown', handleClick);
7560
7569
  if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
7561
7570
  };
7562
7571
  }, [