@baseline-ui/icons 0.41.1 → 0.42.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.
- package/Acknowledgements.md +0 -189
- package/package.json +4 -13
- package/dist/index.d.mts +0 -39
- package/dist/index.d.ts +0 -39
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
package/Acknowledgements.md
CHANGED
|
@@ -1831,195 +1831,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
1831
1831
|
|
|
1832
1832
|
---
|
|
1833
1833
|
|
|
1834
|
-
The following software may be included in this product: @react-spring/animated (9.7.5)
|
|
1835
|
-
This software contains the following license and notice below:
|
|
1836
|
-
|
|
1837
|
-
MIT License
|
|
1838
|
-
|
|
1839
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1840
|
-
|
|
1841
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1842
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1843
|
-
in the Software without restriction, including without limitation the rights
|
|
1844
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1845
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1846
|
-
furnished to do so, subject to the following conditions:
|
|
1847
|
-
|
|
1848
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1849
|
-
copies or substantial portions of the Software.
|
|
1850
|
-
|
|
1851
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1852
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1853
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1854
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1855
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1856
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1857
|
-
SOFTWARE.
|
|
1858
|
-
|
|
1859
|
-
---
|
|
1860
|
-
|
|
1861
|
-
The following software may be included in this product: @react-spring/core (9.7.4)
|
|
1862
|
-
This software contains the following license and notice below:
|
|
1863
|
-
|
|
1864
|
-
MIT License
|
|
1865
|
-
|
|
1866
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1867
|
-
|
|
1868
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1869
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1870
|
-
in the Software without restriction, including without limitation the rights
|
|
1871
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1872
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1873
|
-
furnished to do so, subject to the following conditions:
|
|
1874
|
-
|
|
1875
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1876
|
-
copies or substantial portions of the Software.
|
|
1877
|
-
|
|
1878
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1879
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1880
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1881
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1882
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1883
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1884
|
-
SOFTWARE.
|
|
1885
|
-
|
|
1886
|
-
---
|
|
1887
|
-
|
|
1888
|
-
The following software may be included in this product: @react-spring/rafz (9.7.5)
|
|
1889
|
-
This software contains the following license and notice below:
|
|
1890
|
-
|
|
1891
|
-
MIT License
|
|
1892
|
-
|
|
1893
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1894
|
-
|
|
1895
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1896
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1897
|
-
in the Software without restriction, including without limitation the rights
|
|
1898
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1899
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1900
|
-
furnished to do so, subject to the following conditions:
|
|
1901
|
-
|
|
1902
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1903
|
-
copies or substantial portions of the Software.
|
|
1904
|
-
|
|
1905
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1906
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1907
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1908
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1909
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1910
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1911
|
-
SOFTWARE.
|
|
1912
|
-
|
|
1913
|
-
---
|
|
1914
|
-
|
|
1915
|
-
The following software may be included in this product: @react-spring/shared (9.7.5)
|
|
1916
|
-
This software contains the following license and notice below:
|
|
1917
|
-
|
|
1918
|
-
MIT License
|
|
1919
|
-
|
|
1920
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1921
|
-
|
|
1922
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1923
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1924
|
-
in the Software without restriction, including without limitation the rights
|
|
1925
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1926
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1927
|
-
furnished to do so, subject to the following conditions:
|
|
1928
|
-
|
|
1929
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1930
|
-
copies or substantial portions of the Software.
|
|
1931
|
-
|
|
1932
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1933
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1934
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1935
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1936
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1937
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1938
|
-
SOFTWARE.
|
|
1939
|
-
|
|
1940
|
-
---
|
|
1941
|
-
|
|
1942
|
-
The following software may be included in this product: @react-spring/types (9.7.4)
|
|
1943
|
-
This software contains the following license and notice below:
|
|
1944
|
-
|
|
1945
|
-
MIT License
|
|
1946
|
-
|
|
1947
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1948
|
-
|
|
1949
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1950
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1951
|
-
in the Software without restriction, including without limitation the rights
|
|
1952
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1953
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1954
|
-
furnished to do so, subject to the following conditions:
|
|
1955
|
-
|
|
1956
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1957
|
-
copies or substantial portions of the Software.
|
|
1958
|
-
|
|
1959
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1960
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1961
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1962
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1963
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1964
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1965
|
-
SOFTWARE.
|
|
1966
|
-
|
|
1967
|
-
---
|
|
1968
|
-
|
|
1969
|
-
The following software may be included in this product: @react-spring/types (9.7.5)
|
|
1970
|
-
This software contains the following license and notice below:
|
|
1971
|
-
|
|
1972
|
-
MIT License
|
|
1973
|
-
|
|
1974
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
1975
|
-
|
|
1976
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1977
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
1978
|
-
in the Software without restriction, including without limitation the rights
|
|
1979
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1980
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
1981
|
-
furnished to do so, subject to the following conditions:
|
|
1982
|
-
|
|
1983
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1984
|
-
copies or substantial portions of the Software.
|
|
1985
|
-
|
|
1986
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1987
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1988
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1989
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1990
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1991
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1992
|
-
SOFTWARE.
|
|
1993
|
-
|
|
1994
|
-
---
|
|
1995
|
-
|
|
1996
|
-
The following software may be included in this product: @react-spring/web (9.7.4)
|
|
1997
|
-
This software contains the following license and notice below:
|
|
1998
|
-
|
|
1999
|
-
MIT License
|
|
2000
|
-
|
|
2001
|
-
Copyright (c) 2018-present Paul Henschel, react-spring, all contributors
|
|
2002
|
-
|
|
2003
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2004
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
2005
|
-
in the Software without restriction, including without limitation the rights
|
|
2006
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2007
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
2008
|
-
furnished to do so, subject to the following conditions:
|
|
2009
|
-
|
|
2010
|
-
The above copyright notice and this permission notice shall be included in all
|
|
2011
|
-
copies or substantial portions of the Software.
|
|
2012
|
-
|
|
2013
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2014
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2015
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2016
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2017
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2018
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2019
|
-
SOFTWARE.
|
|
2020
|
-
|
|
2021
|
-
---
|
|
2022
|
-
|
|
2023
1834
|
The following software may be included in this product: @rollup/pluginutils (5.1.0)
|
|
2024
1835
|
This software contains the following license and notice below:
|
|
2025
1836
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseline-ui/icons",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"source": "./src/index.ts",
|
|
3
|
+
"version": "0.42.0",
|
|
4
|
+
"description": "A collection of icons for the baseline-ui library",
|
|
9
5
|
"files": [
|
|
10
|
-
"dist",
|
|
11
6
|
"8",
|
|
12
7
|
"12",
|
|
13
8
|
"16",
|
|
@@ -18,10 +13,7 @@
|
|
|
18
13
|
],
|
|
19
14
|
"license": "SEE LICENSE IN https://pspdfkit.com/legal/License.pdf",
|
|
20
15
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
-
"dompurify": "3.2.4",
|
|
23
|
-
"react-aria": "3.33.1",
|
|
24
|
-
"@baseline-ui/utils": "0.41.1"
|
|
16
|
+
"dompurify": "3.2.4"
|
|
25
17
|
},
|
|
26
18
|
"devDependencies": {
|
|
27
19
|
"@svgr/cli": "^8.1.0",
|
|
@@ -36,8 +28,7 @@
|
|
|
36
28
|
"access": "public"
|
|
37
29
|
},
|
|
38
30
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"build:icons": "./scripts/buildIcons.sh",
|
|
31
|
+
"build": "./scripts/buildIcons.sh && tsup && rm -rf src/icons",
|
|
41
32
|
"acknowledgements": "pnpm-licenses generate-disclaimer --prod --output-file=Acknowledgements.md"
|
|
42
33
|
}
|
|
43
34
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, SVGProps } from 'react';
|
|
2
|
-
|
|
3
|
-
interface SharedProps {
|
|
4
|
-
/** The `className` property assigned to the SVG element of the component. */
|
|
5
|
-
className?: string;
|
|
6
|
-
/**
|
|
7
|
-
* The `width` and `height` of the icon. This can be a string or a number. If
|
|
8
|
-
* you want to set the width and height to different values, you can pass
|
|
9
|
-
* `width` and `height` as separate props.
|
|
10
|
-
*
|
|
11
|
-
* @default "1em"
|
|
12
|
-
*/
|
|
13
|
-
size?: string | number;
|
|
14
|
-
/** The style applicable to the SVG element of the component. */
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
title?: string;
|
|
17
|
-
/** The color of the icon. */
|
|
18
|
-
color?: string;
|
|
19
|
-
}
|
|
20
|
-
interface IconComponentProps extends SharedProps {
|
|
21
|
-
/**
|
|
22
|
-
* The SVG string of the icon to render. This is useful if you want to render
|
|
23
|
-
* an icon that is not in the catalog of icons provided in the list above. You
|
|
24
|
-
* can use the `createIcon` function to create an icon from an SVG string.
|
|
25
|
-
*
|
|
26
|
-
* @default undefined
|
|
27
|
-
*/
|
|
28
|
-
svg: string;
|
|
29
|
-
}
|
|
30
|
-
interface SVGRProps {
|
|
31
|
-
title?: string;
|
|
32
|
-
titleId?: string;
|
|
33
|
-
size?: CSSProperties["width"];
|
|
34
|
-
}
|
|
35
|
-
type IconProps = SVGRProps & SVGProps<SVGSVGElement>;
|
|
36
|
-
|
|
37
|
-
declare const Icon: React.ForwardRefExoticComponent<IconComponentProps & React.RefAttributes<HTMLSpanElement>>;
|
|
38
|
-
|
|
39
|
-
export { Icon, type IconComponentProps, type IconProps, type SVGRProps };
|
package/dist/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, SVGProps } from 'react';
|
|
2
|
-
|
|
3
|
-
interface SharedProps {
|
|
4
|
-
/** The `className` property assigned to the SVG element of the component. */
|
|
5
|
-
className?: string;
|
|
6
|
-
/**
|
|
7
|
-
* The `width` and `height` of the icon. This can be a string or a number. If
|
|
8
|
-
* you want to set the width and height to different values, you can pass
|
|
9
|
-
* `width` and `height` as separate props.
|
|
10
|
-
*
|
|
11
|
-
* @default "1em"
|
|
12
|
-
*/
|
|
13
|
-
size?: string | number;
|
|
14
|
-
/** The style applicable to the SVG element of the component. */
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
title?: string;
|
|
17
|
-
/** The color of the icon. */
|
|
18
|
-
color?: string;
|
|
19
|
-
}
|
|
20
|
-
interface IconComponentProps extends SharedProps {
|
|
21
|
-
/**
|
|
22
|
-
* The SVG string of the icon to render. This is useful if you want to render
|
|
23
|
-
* an icon that is not in the catalog of icons provided in the list above. You
|
|
24
|
-
* can use the `createIcon` function to create an icon from an SVG string.
|
|
25
|
-
*
|
|
26
|
-
* @default undefined
|
|
27
|
-
*/
|
|
28
|
-
svg: string;
|
|
29
|
-
}
|
|
30
|
-
interface SVGRProps {
|
|
31
|
-
title?: string;
|
|
32
|
-
titleId?: string;
|
|
33
|
-
size?: CSSProperties["width"];
|
|
34
|
-
}
|
|
35
|
-
type IconProps = SVGRProps & SVGProps<SVGSVGElement>;
|
|
36
|
-
|
|
37
|
-
declare const Icon: React.ForwardRefExoticComponent<IconComponentProps & React.RefAttributes<HTMLSpanElement>>;
|
|
38
|
-
|
|
39
|
-
export { Icon, type IconComponentProps, type IconProps, type SVGRProps };
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var m=require('dompurify'),d=require('react'),reactAria=require('react-aria'),utils=require('@baseline-ui/utils'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var m__namespace=/*#__PURE__*/_interopNamespace(m);var d__default=/*#__PURE__*/_interopDefault(d);var f=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function n(...t){return t.length===1&&t[0]?t[0]:e=>{for(let o of t)typeof o=="function"?o(e):o!=null&&(o.current=e);}}var E=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},w=(t,e,o)=>{let a=t.querySelector("title"),c=f(t);if(a)a.textContent=e,a.setAttribute("id",o);else {let r=c.createElement("title");r.textContent=e,r.setAttribute("id",o),t.prepend(r);}},T=(t,e)=>{e&&t.classList.add(e);},D=(t,e)=>{let o=e.createElement("span");o.innerHTML=m__namespace.default.sanitize(t);let a=o.querySelector("svg");return utils.invariant(a,"Icon: svg prop must be a valid svg string"),a},u=d__default.default.forwardRef(({size:t,title:e,className:o,style:a,color:c,...r},l)=>{let i=reactAria.useId(),p=d__default.default.useRef(null),$="svg"in r?r.svg:void 0,b=d__default.default.useMemo(()=>{if($){let x=f(p.current),s=D($,x);return t&&E(s,t),e&&w(s,e,i),T(s,o),s.outerHTML}},[$,t,e,o,i]);return jsxRuntime.jsx("span",{className:o,ref:n(l,p),style:{display:"contents",...a,color:c},dangerouslySetInnerHTML:b?{__html:b}:void 0})});u.displayName="Icon";exports.Icon=u;
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as m from'dompurify';import d from'react';import {useId}from'react-aria';import {invariant}from'@baseline-ui/utils';import {jsx}from'react/jsx-runtime';var f=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function n(...t){return t.length===1&&t[0]?t[0]:e=>{for(let o of t)typeof o=="function"?o(e):o!=null&&(o.current=e);}}var E=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},w=(t,e,o)=>{let a=t.querySelector("title"),c=f(t);if(a)a.textContent=e,a.setAttribute("id",o);else {let r=c.createElement("title");r.textContent=e,r.setAttribute("id",o),t.prepend(r);}},T=(t,e)=>{e&&t.classList.add(e);},D=(t,e)=>{let o=e.createElement("span");o.innerHTML=m.default.sanitize(t);let a=o.querySelector("svg");return invariant(a,"Icon: svg prop must be a valid svg string"),a},u=d.forwardRef(({size:t,title:e,className:o,style:a,color:c,...r},l)=>{let i=useId(),p=d.useRef(null),$="svg"in r?r.svg:void 0,b=d.useMemo(()=>{if($){let x=f(p.current),s=D($,x);return t&&E(s,t),e&&w(s,e,i),T(s,o),s.outerHTML}},[$,t,e,o,i]);return jsx("span",{className:o,ref:n(l,p),style:{display:"contents",...a,color:c},dangerouslySetInnerHTML:b?{__html:b}:void 0})});u.displayName="Icon";export{u as Icon};
|