@civicactions/cmsds-open-data-components 4.1.2-alpha.3 → 4.1.2-alpha.5

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