@radix-ui/react-accessible-icon 1.0.3 → 1.1.0-rc.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.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import * as React from "react";
2
- export interface AccessibleIconProps {
1
+ import * as React from 'react';
2
+
3
+ interface AccessibleIconProps {
3
4
  children?: React.ReactNode;
4
5
  /**
5
6
  * The accessible label for the icon. This label will be visually hidden but announced to screen
@@ -7,7 +8,7 @@ export interface AccessibleIconProps {
7
8
  */
8
9
  label: string;
9
10
  }
10
- export const AccessibleIcon: React.FC<AccessibleIconProps>;
11
- export const Root: React.FC<AccessibleIconProps>;
11
+ declare const AccessibleIcon: React.FC<AccessibleIconProps>;
12
+ declare const Root: React.FC<AccessibleIconProps>;
12
13
 
13
- //# sourceMappingURL=index.d.ts.map
14
+ export { AccessibleIcon, type AccessibleIconProps, Root };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import * as React from "react";
2
- export interface AccessibleIconProps {
1
+ import * as React from 'react';
2
+
3
+ interface AccessibleIconProps {
3
4
  children?: React.ReactNode;
4
5
  /**
5
6
  * The accessible label for the icon. This label will be visually hidden but announced to screen
@@ -7,7 +8,7 @@ export interface AccessibleIconProps {
7
8
  */
8
9
  label: string;
9
10
  }
10
- export const AccessibleIcon: React.FC<AccessibleIconProps>;
11
- export const Root: React.FC<AccessibleIconProps>;
11
+ declare const AccessibleIcon: React.FC<AccessibleIconProps>;
12
+ declare const Root: React.FC<AccessibleIconProps>;
12
13
 
13
- //# sourceMappingURL=index.d.ts.map
14
+ export { AccessibleIcon, type AccessibleIconProps, Root };
package/dist/index.js CHANGED
@@ -1,29 +1,52 @@
1
- var $l7iZU$react = require("react");
2
- var $l7iZU$radixuireactvisuallyhidden = require("@radix-ui/react-visually-hidden");
3
-
4
- function $parcel$export(e, n, v, s) {
5
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
- }
7
-
8
- $parcel$export(module.exports, "AccessibleIcon", () => $7e03469ebd912a45$export$5aec92af04ace2d2);
9
- $parcel$export(module.exports, "Root", () => $7e03469ebd912a45$export$be92b6f5f03c0fe9);
10
-
11
-
12
- const $7e03469ebd912a45$var$NAME = 'AccessibleIcon';
13
- const $7e03469ebd912a45$export$5aec92af04ace2d2 = ({ children: children , label: label })=>{
14
- const child = $l7iZU$react.Children.only(children);
15
- return /*#__PURE__*/ $l7iZU$react.createElement($l7iZU$react.Fragment, null, /*#__PURE__*/ $l7iZU$react.cloneElement(child, {
1
+ "use strict";
2
+ (() => {
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+
32
+ // packages/react/accessible-icon/src/AccessibleIcon.tsx
33
+ var React = __toESM(__require("react"));
34
+ var VisuallyHiddenPrimitive = __toESM(__require("@radix-ui/react-visually-hidden"));
35
+ var import_jsx_runtime = __require("react/jsx-runtime");
36
+ var NAME = "AccessibleIcon";
37
+ var AccessibleIcon = ({ children, label }) => {
38
+ const child = React.Children.only(children);
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
40
+ React.cloneElement(child, {
16
41
  // accessibility
17
- 'aria-hidden': 'true',
18
- focusable: 'false' // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
19
- }), /*#__PURE__*/ $l7iZU$react.createElement($l7iZU$radixuireactvisuallyhidden.Root, null, label));
20
- };
21
- /*#__PURE__*/ Object.assign($7e03469ebd912a45$export$5aec92af04ace2d2, {
22
- displayName: $7e03469ebd912a45$var$NAME
23
- });
24
- const $7e03469ebd912a45$export$be92b6f5f03c0fe9 = $7e03469ebd912a45$export$5aec92af04ace2d2;
25
-
26
-
27
-
28
-
42
+ "aria-hidden": "true",
43
+ focusable: "false"
44
+ // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
45
+ }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenPrimitive.Root, { children: label })
47
+ ] });
48
+ };
49
+ AccessibleIcon.displayName = NAME;
50
+ var Root2 = AccessibleIcon;
51
+ })();
29
52
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"mappings":";;;;;;;;;ACAA;;AAGA,MAAMI,0BAAI,GAAG,gBAAb,AAAA;AAWA,MAAMJ,yCAA6C,GAAG,CAAC,EAdvD,UAcyDK,QAAF,CAAA,EAdvD,OAcmEC,KAAAA,CAAAA,EAAb,GAAyB;IAC7E,MAAMC,KAAK,GAAGL,qBAAA,CAAeO,IAAf,CAAoBJ,QAApB,CAAd,AAAA;IACA,OAAA,aACE,CAAA,0BAAA,CAAA,qBAAA,EAAA,IAAA,EAAA,aACGH,CAAAA,yBAAA,CAAmBK,KAAnB,EAAgD;QAC/C,gBAAA;QACA,aAAA,EAAe,MAFgC;QAG/CI,SAAS,EAAE,OAHoC,CAG3B,sFAApBA;KAHD,CADH,EAAA,aAME,CAAA,0BAAA,CAAC,sCAAD,EAAA,IAAA,EAA+BL,KAA/B,CANF,CADF,CAEqD;CAJvD,AAYC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,MAAML,yCAAI,GAAGD,yCAAb,AAAA;;AD9BA","sources":["packages/react/accessible-icon/src/index.ts","packages/react/accessible-icon/src/AccessibleIcon.tsx"],"sourcesContent":["export {\n AccessibleIcon,\n //\n Root,\n} from './AccessibleIcon';\nexport type { AccessibleIconProps } from './AccessibleIcon';\n","import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nconst NAME = 'AccessibleIcon';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode;\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label: string;\n}\n\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ children, label }) => {\n const child = React.Children.only(children);\n return (\n <>\n {React.cloneElement(child as React.ReactElement, {\n // accessibility\n 'aria-hidden': 'true',\n focusable: 'false', // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n <VisuallyHiddenPrimitive.Root>{label}</VisuallyHiddenPrimitive.Root>\n </>\n );\n};\n\nAccessibleIcon.displayName = NAME;\n\nconst Root = AccessibleIcon;\n\nexport {\n AccessibleIcon,\n //\n Root,\n};\nexport type { AccessibleIconProps };\n"],"names":["AccessibleIcon","Root","React","VisuallyHiddenPrimitive","NAME","children","label","child","Children","only","cloneElement","focusable"],"version":3,"file":"index.js.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/AccessibleIcon.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nconst NAME = 'AccessibleIcon';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode;\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label: string;\n}\n\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ children, label }) => {\n const child = React.Children.only(children);\n return (\n <>\n {React.cloneElement(child as React.ReactElement, {\n // accessibility\n 'aria-hidden': 'true',\n focusable: 'false', // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n <VisuallyHiddenPrimitive.Root>{label}</VisuallyHiddenPrimitive.Root>\n </>\n );\n};\n\nAccessibleIcon.displayName = NAME;\n\nconst Root = AccessibleIcon;\n\nexport {\n AccessibleIcon,\n //\n Root,\n};\nexport type { AccessibleIconProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAuB;AACvB,gCAAyC;AAgBrC;AAdJ,MAAM,OAAO;AAWb,MAAM,iBAAgD,CAAC,EAAE,UAAU,MAAM,MAAM;AAC7E,UAAM,QAAc,eAAS,KAAK,QAAQ;AAC1C,WACE,4EACG;AAAA,MAAM,mBAAa,OAA6B;AAAA;AAAA,QAE/C,eAAe;AAAA,QACf,WAAW;AAAA;AAAA,MACb,CAAC;AAAA,MACD,4CAAyB,8BAAxB,EAA8B,iBAAM;AAAA,OACvC;AAAA,EAEJ;AAEA,iBAAe,cAAc;AAE7B,MAAMA,QAAO;",
6
+ "names": ["Root"]
7
+ }
package/dist/index.mjs CHANGED
@@ -1,24 +1,24 @@
1
- import {Children as $eOI90$Children, createElement as $eOI90$createElement, Fragment as $eOI90$Fragment, cloneElement as $eOI90$cloneElement} from "react";
2
- import {Root as $eOI90$Root} from "@radix-ui/react-visually-hidden";
3
-
4
-
5
-
6
- const $08b6689415b2f49a$var$NAME = 'AccessibleIcon';
7
- const $08b6689415b2f49a$export$5aec92af04ace2d2 = ({ children: children , label: label })=>{
8
- const child = $eOI90$Children.only(children);
9
- return /*#__PURE__*/ $eOI90$createElement($eOI90$Fragment, null, /*#__PURE__*/ $eOI90$cloneElement(child, {
10
- // accessibility
11
- 'aria-hidden': 'true',
12
- focusable: 'false' // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
13
- }), /*#__PURE__*/ $eOI90$createElement($eOI90$Root, null, label));
1
+ // packages/react/accessible-icon/src/AccessibleIcon.tsx
2
+ import * as React from "react";
3
+ import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ var NAME = "AccessibleIcon";
6
+ var AccessibleIcon = ({ children, label }) => {
7
+ const child = React.Children.only(children);
8
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9
+ React.cloneElement(child, {
10
+ // accessibility
11
+ "aria-hidden": "true",
12
+ focusable: "false"
13
+ // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
14
+ }),
15
+ /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { children: label })
16
+ ] });
17
+ };
18
+ AccessibleIcon.displayName = NAME;
19
+ var Root2 = AccessibleIcon;
20
+ export {
21
+ AccessibleIcon,
22
+ Root2 as Root
14
23
  };
15
- /*#__PURE__*/ Object.assign($08b6689415b2f49a$export$5aec92af04ace2d2, {
16
- displayName: $08b6689415b2f49a$var$NAME
17
- });
18
- const $08b6689415b2f49a$export$be92b6f5f03c0fe9 = $08b6689415b2f49a$export$5aec92af04ace2d2;
19
-
20
-
21
-
22
-
23
- export {$08b6689415b2f49a$export$5aec92af04ace2d2 as AccessibleIcon, $08b6689415b2f49a$export$be92b6f5f03c0fe9 as Root};
24
24
  //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"mappings":";;;ACAA;;AAGA,MAAMI,0BAAI,GAAG,gBAAb,AAAA;AAWA,MAAMJ,yCAA6C,GAAG,CAAC,EAdvD,UAcyDK,QAAF,CAAA,EAdvD,OAcmEC,KAAAA,CAAAA,EAAb,GAAyB;IAC7E,MAAMC,KAAK,GAAGL,eAAA,CAAeO,IAAf,CAAoBJ,QAApB,CAAd,AAAA;IACA,OAAA,aACE,CAAA,oBAAA,CAAA,eAAA,EAAA,IAAA,EAAA,aACGH,CAAAA,mBAAA,CAAmBK,KAAnB,EAAgD;QAC/C,gBAAA;QACA,aAAA,EAAe,MAFgC;QAG/CI,SAAS,EAAE,OAHoC,CAG3B,sFAApBA;KAHD,CADH,EAAA,aAME,CAAA,oBAAA,CAAC,WAAD,EAAA,IAAA,EAA+BL,KAA/B,CANF,CADF,CAEqD;CAJvD,AAYC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,MAAML,yCAAI,GAAGD,yCAAb,AAAA;;AD9BA","sources":["packages/react/accessible-icon/src/index.ts","packages/react/accessible-icon/src/AccessibleIcon.tsx"],"sourcesContent":["export {\n AccessibleIcon,\n //\n Root,\n} from './AccessibleIcon';\nexport type { AccessibleIconProps } from './AccessibleIcon';\n","import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nconst NAME = 'AccessibleIcon';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode;\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label: string;\n}\n\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ children, label }) => {\n const child = React.Children.only(children);\n return (\n <>\n {React.cloneElement(child as React.ReactElement, {\n // accessibility\n 'aria-hidden': 'true',\n focusable: 'false', // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n <VisuallyHiddenPrimitive.Root>{label}</VisuallyHiddenPrimitive.Root>\n </>\n );\n};\n\nAccessibleIcon.displayName = NAME;\n\nconst Root = AccessibleIcon;\n\nexport {\n AccessibleIcon,\n //\n Root,\n};\nexport type { AccessibleIconProps };\n"],"names":["AccessibleIcon","Root","React","VisuallyHiddenPrimitive","NAME","children","label","child","Children","only","cloneElement","focusable"],"version":3,"file":"index.mjs.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/AccessibleIcon.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nconst NAME = 'AccessibleIcon';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode;\n /**\n * The accessible label for the icon. This label will be visually hidden but announced to screen\n * reader users, similar to `alt` text for `img` tags.\n */\n label: string;\n}\n\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ children, label }) => {\n const child = React.Children.only(children);\n return (\n <>\n {React.cloneElement(child as React.ReactElement, {\n // accessibility\n 'aria-hidden': 'true',\n focusable: 'false', // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable\n })}\n <VisuallyHiddenPrimitive.Root>{label}</VisuallyHiddenPrimitive.Root>\n </>\n );\n};\n\nAccessibleIcon.displayName = NAME;\n\nconst Root = AccessibleIcon;\n\nexport {\n AccessibleIcon,\n //\n Root,\n};\nexport type { AccessibleIconProps };\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,6BAA6B;AAgBrC,mBAME,KANF;AAdJ,IAAM,OAAO;AAWb,IAAM,iBAAgD,CAAC,EAAE,UAAU,MAAM,MAAM;AAC7E,QAAM,QAAc,eAAS,KAAK,QAAQ;AAC1C,SACE,iCACG;AAAA,IAAM,mBAAa,OAA6B;AAAA;AAAA,MAE/C,eAAe;AAAA,MACf,WAAW;AAAA;AAAA,IACb,CAAC;AAAA,IACD,oBAAyB,8BAAxB,EAA8B,iBAAM;AAAA,KACvC;AAEJ;AAEA,eAAe,cAAc;AAE7B,IAAMA,QAAO;",
6
+ "names": ["Root"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-accessible-icon",
3
- "version": "1.0.3",
3
+ "version": "1.1.0-rc.1",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,8 +28,7 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.13.10",
32
- "@radix-ui/react-visually-hidden": "1.0.3"
31
+ "@radix-ui/react-visually-hidden": "1.1.0-rc.1"
33
32
  },
34
33
  "peerDependencies": {
35
34
  "@types/react": "*",
@@ -52,5 +51,6 @@
52
51
  },
53
52
  "bugs": {
54
53
  "url": "https://github.com/radix-ui/primitives/issues"
55
- }
54
+ },
55
+ "stableVersion": "1.0.3"
56
56
  }
@@ -1 +0,0 @@
1
- {"mappings":";AAKA;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,OAAA,MAAM,gBAAgB,MAAM,EAAE,CAAC,mBAAmB,CAYjD,CAAC;AAIF,OAAA,MAAM,mCAAqB,CAAC","sources":["packages/react/accessible-icon/src/packages/react/accessible-icon/src/AccessibleIcon.tsx","packages/react/accessible-icon/src/packages/react/accessible-icon/src/index.ts","packages/react/accessible-icon/src/index.ts"],"sourcesContent":[null,null,"export {\n AccessibleIcon,\n //\n Root,\n} from './AccessibleIcon';\nexport type { AccessibleIconProps } from './AccessibleIcon';\n"],"names":[],"version":3,"file":"index.d.ts.map"}