@carbon/utilities-react 0.19.0-rc.0 → 0.20.0-rc.0

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.
@@ -1,5 +1,5 @@
1
- import{useEffect as i}from"react";function d(r,t="component should have no interactive child nodes"){process.env.NODE_ENV!=="production"&&i(()=>{const e=r.current?n(r.current):!1;if(e){const o=`Error: ${t}.
1
+ import{useEffect as u}from"react";function f(r,e="component should have no interactive child nodes"){u(()=>{if(process.env.NODE_ENV==="production")return;const{current:t}=r,n=t?o(t):null;if(n){const i=`Error: ${e}.
2
2
 
3
- Instead found: ${e.outerHTML}`;throw console.error(o),new Error(o)}})}function f(r,t="interactive child node(s) should have an `aria-describedby` property"){process.env.NODE_ENV!=="production"&&i(()=>{const e=r.current?n(r.current):!1;if(e&&!e.hasAttribute("aria-describedby"))throw new Error(`Error: ${t}.
3
+ Instead found: ${n.outerHTML}`;throw console.error(i),new Error(i)}},[e,r])}function l(r,e="interactive child node(s) should have an `aria-describedby` property"){u(()=>{if(process.env.NODE_ENV==="production")return;const{current:t}=r,n=t?o(t):null;if(n&&!n.hasAttribute("aria-describedby"))throw new Error(`Error: ${e}.
4
4
 
5
- Instead found: ${e.outerHTML}`)})}function n(r){if(!r||!r.childNodes)return null;if(u(r))return r;for(const t of r.childNodes){const e=n(t);if(e)return e}return null}function c(r){if(!r||!r.childNodes)return null;if(r?.getAttribute?.("role")&&r.getAttribute("role")!=="")return r;for(const t of r.childNodes){const e=c(t);if(e)return e}return null}function u(r){if(r.tabIndex===void 0||r.tabIndex<0||r.disabled)return!1;switch(r.nodeName){case"A":return!!r.href&&r.rel!=="ignore";case"INPUT":return r.type!=="hidden";default:return!0}}export{n as getInteractiveContent,c as getRoleContent,f as useInteractiveChildrenNeedDescription,d as useNoInteractiveChildren};
5
+ Instead found: ${n.outerHTML}`)},[e,r])}function o(r){if(!r||!r.childNodes)return null;if(s(r))return r;for(const e of r.childNodes){const t=o(e);if(t)return t}return null}function c(r){if(!r||!r.childNodes)return null;if(r?.getAttribute?.("role")&&r.getAttribute("role")!=="")return r;for(const e of r.childNodes){const t=c(e);if(t)return t}return null}function s(r){if(r.tabIndex===void 0||r.tabIndex<0||r.disabled)return!1;switch(r.nodeName){case"A":return!!r.href&&r.rel!=="ignore";case"INPUT":return r.type!=="hidden";default:return!0}}export{o as getInteractiveContent,c as getRoleContent,l as useInteractiveChildrenNeedDescription,f as useNoInteractiveChildren};
@@ -1,5 +1,5 @@
1
- "use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var t in e)c(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of f(e))!a.call(r,o)&&o!==t&&c(r,o,{get:()=>e[o],enumerable:!(n=d(e,o))||n.enumerable});return r};var N=r=>h(c({},"__esModule",{value:!0}),r);var E={};l(E,{getInteractiveContent:()=>i,getRoleContent:()=>s,useInteractiveChildrenNeedDescription:()=>b,useNoInteractiveChildren:()=>p});module.exports=N(E);var u=require("react");function p(r,e="component should have no interactive child nodes"){process.env.NODE_ENV!=="production"&&(0,u.useEffect)(()=>{const t=r.current?i(r.current):!1;if(t){const n=`Error: ${e}.
1
+ "use strict";var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var a=(r,t)=>{for(var e in t)u(r,e,{get:t[e],enumerable:!0})},h=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!l.call(r,o)&&o!==e&&u(r,o,{get:()=>t[o],enumerable:!(n=d(t,o))||n.enumerable});return r};var N=r=>h(u({},"__esModule",{value:!0}),r);var E={};a(E,{getInteractiveContent:()=>i,getRoleContent:()=>s,useInteractiveChildrenNeedDescription:()=>b,useNoInteractiveChildren:()=>p});module.exports=N(E);var c=require("react");function p(r,t="component should have no interactive child nodes"){(0,c.useEffect)(()=>{if(process.env.NODE_ENV==="production")return;const{current:e}=r,n=e?i(e):null;if(n){const o=`Error: ${t}.
2
2
 
3
- Instead found: ${t.outerHTML}`;throw console.error(n),new Error(n)}})}function b(r,e="interactive child node(s) should have an `aria-describedby` property"){process.env.NODE_ENV!=="production"&&(0,u.useEffect)(()=>{const t=r.current?i(r.current):!1;if(t&&!t.hasAttribute("aria-describedby"))throw new Error(`Error: ${e}.
3
+ Instead found: ${n.outerHTML}`;throw console.error(o),new Error(o)}},[t,r])}function b(r,t="interactive child node(s) should have an `aria-describedby` property"){(0,c.useEffect)(()=>{if(process.env.NODE_ENV==="production")return;const{current:e}=r,n=e?i(e):null;if(n&&!n.hasAttribute("aria-describedby"))throw new Error(`Error: ${t}.
4
4
 
5
- Instead found: ${t.outerHTML}`)})}function i(r){if(!r||!r.childNodes)return null;if(v(r))return r;for(const e of r.childNodes){const t=i(e);if(t)return t}return null}function s(r){if(!r||!r.childNodes)return null;if(r?.getAttribute?.("role")&&r.getAttribute("role")!=="")return r;for(const e of r.childNodes){const t=s(e);if(t)return t}return null}function v(r){if(r.tabIndex===void 0||r.tabIndex<0||r.disabled)return!1;switch(r.nodeName){case"A":return!!r.href&&r.rel!=="ignore";case"INPUT":return r.type!=="hidden";default:return!0}}
5
+ Instead found: ${n.outerHTML}`)},[t,r])}function i(r){if(!r||!r.childNodes)return null;if(v(r))return r;for(const t of r.childNodes){const e=i(t);if(e)return e}return null}function s(r){if(!r||!r.childNodes)return null;if(r?.getAttribute?.("role")&&r.getAttribute("role")!=="")return r;for(const t of r.childNodes){const e=s(t);if(e)return e}return null}function v(r){if(r.tabIndex===void 0||r.tabIndex<0||r.disabled)return!1;switch(r.nodeName){case"A":return!!r.href&&r.rel!=="ignore";case"INPUT":return r.type!=="hidden";default:return!0}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/utilities-react",
3
3
  "description": "Utilities and helpers to drive consistency across software products using the Carbon Design System with React",
4
- "version": "0.19.0-rc.0",
4
+ "version": "0.20.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -48,8 +48,8 @@
48
48
  "typescript-config-carbon": "^0.9.0"
49
49
  },
50
50
  "dependencies": {
51
- "@carbon/utilities": "^0.16.0-rc.0",
51
+ "@carbon/utilities": "^0.17.0-rc.0",
52
52
  "@ibm/telemetry-js": "^1.6.1"
53
53
  },
54
- "gitHead": "2878146d9047a6482e745e7279807c93855e9c09"
54
+ "gitHead": "f3e7c2811340637ead19b4a1a550a20820602cc4"
55
55
  }