@radix-ui/react-accessible-icon 1.2.0 → 1.2.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.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/accessible-icon.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\nexport {\n AccessibleIcon,\n //\n Root,\n} from './accessible-icon';\nexport type { AccessibleIconProps } from './accessible-icon';\n", "import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode | undefined;\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<React.SVGAttributes<SVGElement>>, {\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\nexport {\n AccessibleIcon,\n //\n AccessibleIcon as Root,\n};\nexport type { AccessibleIconProps };\n"],
|
|
4
|
+
"sourcesContent": ["'use client';\nexport {\n AccessibleIcon,\n //\n Root,\n} from './accessible-icon.js';\nexport type { AccessibleIconProps } from './accessible-icon.js';\n", "import * as React from 'react';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\ninterface AccessibleIconProps {\n children?: React.ReactNode | undefined;\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<React.SVGAttributes<SVGElement>>, {\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\nexport {\n AccessibleIcon,\n //\n AccessibleIcon as Root,\n};\nexport type { AccessibleIconProps };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,8BAAyC;AAcrC;AAHJ,IAAM,iBAAgD,wBAAC,EAAE,UAAU,MAAM,MAAM;AAC7E,QAAM,QAAc,eAAS,KAAK,QAAQ;AAC1C,SACE,4EACG;AAAA,IAAM,mBAAa,OAA8D;AAAA;AAAA,MAEhF,eAAe;AAAA,MACf,WAAW;AAAA;AAAA,IACb,CAAC;AAAA,IACD,4CAAyB,8BAAxB,EAA8B,iBAAM;AAAA,KACvC;AAEJ,GAZsD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-accessible-icon",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@radix-ui/react-visually-hidden": "1.2.
|
|
14
|
+
"@radix-ui/react-visually-hidden": "1.2.14"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/react": "^19.3.0",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"lint": "oxlint --max-warnings 0 src",
|
|
50
50
|
"clean": "rm -rf dist",
|
|
51
51
|
"reset": "rm -rf dist node_modules",
|
|
52
|
-
"
|
|
52
|
+
"types:check:pkg": "tsc --noEmit -p tsconfig.lib.json",
|
|
53
|
+
"types:check:test": "tsc --noEmit -p tsconfig.test.json",
|
|
53
54
|
"build": "radix-build"
|
|
54
55
|
},
|
|
55
56
|
"types": "./dist/index.d.ts",
|