@blockle/blocks 0.19.0 → 0.19.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.
@@ -10,7 +10,6 @@ const BlocksProvider = ({
10
10
  className,
11
11
  ...restProps
12
12
  }) => {
13
- const ref = react.useRef(null);
14
13
  const [ariaHidden, setAriaHidden] = react.useState(false);
15
14
  const contextValue = react.useMemo(
16
15
  () => ({
@@ -19,20 +18,11 @@ const BlocksProvider = ({
19
18
  }),
20
19
  [theme, setAriaHidden]
21
20
  );
22
- react.useEffect(() => {
23
- var _a, _b;
24
- if (ariaHidden) {
25
- (_a = ref.current) == null ? void 0 : _a.setAttribute("inert", "");
26
- } else {
27
- (_b = ref.current) == null ? void 0 : _b.removeAttribute("inert");
28
- }
29
- });
30
- return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.BlocksProviderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
21
+ return /* @__PURE__ */ jsxRuntime.jsx(styles_components_display_Divider_Divider_cjs.BlocksProviderContext, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
31
22
  "div",
32
23
  {
33
- ref,
34
24
  className: styles_components_Accessibility_VisuallyHidden_VisuallyHidden_cjs.classnames(theme.vars, styles_lib_css_atoms_sprinkles_css_cjs.atoms({ fontFamily: "primary" }), className),
35
- "aria-hidden": ariaHidden ? true : void 0,
25
+ inert: ariaHidden ? true : void 0,
36
26
  ...restProps,
37
27
  children
38
28
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useRef, useState, useMemo, useEffect } from "react";
2
+ import { useState, useMemo } from "react";
3
3
  import { atoms } from "../../../lib/css/atoms/sprinkles.css.mjs";
4
4
  import { classnames } from "../../Accessibility/VisuallyHidden/VisuallyHidden.mjs";
5
5
  import { BlocksProviderContext } from "../../display/Divider/Divider.mjs";
@@ -9,7 +9,6 @@ const BlocksProvider = ({
9
9
  className,
10
10
  ...restProps
11
11
  }) => {
12
- const ref = useRef(null);
13
12
  const [ariaHidden, setAriaHidden] = useState(false);
14
13
  const contextValue = useMemo(
15
14
  () => ({
@@ -18,20 +17,11 @@ const BlocksProvider = ({
18
17
  }),
19
18
  [theme, setAriaHidden]
20
19
  );
21
- useEffect(() => {
22
- var _a, _b;
23
- if (ariaHidden) {
24
- (_a = ref.current) == null ? void 0 : _a.setAttribute("inert", "");
25
- } else {
26
- (_b = ref.current) == null ? void 0 : _b.removeAttribute("inert");
27
- }
28
- });
29
- return /* @__PURE__ */ jsx(BlocksProviderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
20
+ return /* @__PURE__ */ jsx(BlocksProviderContext, { value: contextValue, children: /* @__PURE__ */ jsx(
30
21
  "div",
31
22
  {
32
- ref,
33
23
  className: classnames(theme.vars, atoms({ fontFamily: "primary" }), className),
34
- "aria-hidden": ariaHidden ? true : void 0,
24
+ inert: ariaHidden ? true : void 0,
35
25
  ...restProps,
36
26
  children
37
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Blocks design system",
5
5
  "repository": "git@github.com:Blockle/blocks.git",
6
6
  "license": "MIT",