@mediaradar/design-components 0.32.0 → 0.32.1

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.cjs CHANGED
@@ -4201,7 +4201,8 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4201
4201
  (0, import_react19.useEffect)(() => {
4202
4202
  if (!open) return;
4203
4203
  const opener = document.activeElement;
4204
- const first = panel.current?.querySelector(`[data-modal-body] :is(${FOCUSABLE})`) ?? panel.current?.querySelector(`[data-modal-footer] :is(${FOCUSABLE})`);
4204
+ const firstIn = (region) => panel.current?.querySelector(region)?.querySelector(FOCUSABLE) ?? null;
4205
+ const first = firstIn("[data-modal-body]") ?? firstIn("[data-modal-footer]");
4205
4206
  (first ?? panel.current)?.focus();
4206
4207
  const overflow = document.body.style.overflow;
4207
4208
  document.body.style.overflow = "hidden";