@wistia/ui 1.0.0-beta.dba1dda4.f5f73bd → 1.0.0-beta.f55651ae.979e07f

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
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v1.0.0-beta.dba1dda4.f5f73bd
3
+ * @license @wistia/ui v1.0.0-beta.f55651ae.979e07f
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -246,7 +246,7 @@ const AriaLiveProvider = ({ children, debug = false }) => {
246
246
  document.body.append(liveRegion);
247
247
  liveRegionRef.current = liveRegion;
248
248
  return () => {
249
- if (liveRegionRef.current) document.body.removeChild(liveRegionRef.current);
249
+ if (liveRegionRef.current) liveRegionRef.current.remove();
250
250
  };
251
251
  }, [debug]);
252
252
  useEffect(() => {
@@ -7268,8 +7268,8 @@ const isClickableElement = (element) => {
7268
7268
  */
7269
7269
  const ClickRegion = ({ children, targetRef }) => {
7270
7270
  useEffect(() => {
7271
- if (targetRef.current?.tagName === "A") targetRef.current.dataset.clickRegionTargetLink = "";
7272
- else if (targetRef.current?.tagName === "BUTTON") targetRef.current.dataset.clickRegionTargetButton = "";
7271
+ if (targetRef.current?.tagName === "A") targetRef.current.setAttribute("data-click-region-target-link", "");
7272
+ else if (targetRef.current?.tagName === "BUTTON") targetRef.current.setAttribute("data-click-region-target-button", "");
7273
7273
  }, [targetRef]);
7274
7274
  const handleClick = useCallback((event) => {
7275
7275
  const node = targetRef.current;
@@ -7278,7 +7278,7 @@ const ClickRegion = ({ children, targetRef }) => {
7278
7278
  event.stopPropagation();
7279
7279
  return;
7280
7280
  }
7281
- if (node === null || event.defaultPrevented || !Object.hasOwn(node.dataset, "clickRegionTargetButton")) return;
7281
+ if (node === null || event.defaultPrevented || !node.hasAttribute("data-click-region-target-button")) return;
7282
7282
  event.stopPropagation();
7283
7283
  event.preventDefault();
7284
7284
  node.focus();