@radix-ui/react-id
Advanced tools
Comparing version 0.1.3 to 0.1.4-rc.1
@@ -0,3 +1,7 @@ | ||
import * as React from "react"; | ||
export function useId(deterministicId?: string): string; | ||
export function IdProvider({ children }: { | ||
children: React.ReactNode; | ||
}): JSX.Element; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
var e,t,r=require("@radix-ui/react-use-layout-effect").useLayoutEffect,u=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);const n=u["useId".toString()]||(()=>{});let c=0;exports.useId=function(e){const[t,o]=u.useState(n());return r((()=>{e||o((e=>null!=e?e:String(c++)))}),[e]),e||(t?`radix-${t}`:"")}; | ||
var e,t,r=require("@radix-ui/react-use-layout-effect").useLayoutEffect,n=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);const i=n["useId".toString()]||(()=>{});let u=0;exports.useId=function(e){const[t,o]=n.useState(i());return r((()=>{e||o((e=>null!=e?e:String(u++)))}),[e]),e||(t?`radix-${t}`:"")},exports.IdProvider=function({children:e}){return n.useEffect((()=>{console.warn(o)}),[]),/*#__PURE__*/n.createElement(n.Fragment,null,e)};const o="Warning: The `IdProvider` has been deprecated. For details, see https://radix-ui.com/docs/primitives/utilities/id-provider"; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{useLayoutEffect as t}from"@radix-ui/react-use-layout-effect";import*as r from"react";const e=r["useId".toString()]||(()=>{});let o=0;export function useId(u){const[i,n]=r.useState(e());return t((()=>{u||n((t=>null!=t?t:String(o++)))}),[u]),u||(i?`radix-${i}`:"")} | ||
import{useLayoutEffect as e}from"@radix-ui/react-use-layout-effect";import*as t from"react";const r=t["useId".toString()]||(()=>{});let i=0;export function useId(n){const[o,s]=t.useState(r());return e((()=>{n||s((e=>null!=e?e:String(i++)))}),[n]),n||(o?`radix-${o}`:"")}export function IdProvider({children:e}){return t.useEffect((()=>{console.warn(n)}),[]),/*#__PURE__*/t.createElement(t.Fragment,null,e)}const n="Warning: The `IdProvider` has been deprecated. For details, see https://radix-ui.com/docs/primitives/utilities/id-provider"; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-id", | ||
"version": "0.1.3", | ||
"version": "0.1.4-rc.1", | ||
"license": "MIT", | ||
@@ -32,3 +32,4 @@ "source": "src/index.ts", | ||
"@radix-ui/react-use-layout-effect": "0.1.0" | ||
} | ||
}, | ||
"stableVersion": "0.1.3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7676
14
0