@baseline-ui/icons 0.31.1 → 0.32.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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -29,6 +29,6 @@ function _interopNamespace(e) {
|
|
|
29
29
|
var m__namespace = /*#__PURE__*/_interopNamespace(m);
|
|
30
30
|
var i__default = /*#__PURE__*/_interopDefault(i);
|
|
31
31
|
|
|
32
|
-
var c=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function d(...t){return t.length===1?t[0]:e=>{for(let o of t)typeof o=="function"?o(e):o!=null&&(o.current=e);}}var w=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},S=(t,e,o)=>{let a=t.querySelector("title"),
|
|
32
|
+
var c=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function d(...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 w=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},S=(t,e,o)=>{let a=t.querySelector("title"),f=c(t);if(a)a.textContent=e,a.setAttribute("id",o);else {let r=f.createElement("title");r.textContent=e,r.setAttribute("id",o),t.prepend(r);}},R=(t,e)=>{e&&t.classList.add(e);},E=(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=i__default.default.forwardRef(({size:t,title:e,className:o,style:a,color:f,...r},l)=>{let $=reactAria.useId(),p=i__default.default.useRef(null),n="svg"in r?r.svg:void 0,b=i__default.default.useMemo(()=>{if(n){let x=c(p.current),s=E(n,x);return t&&w(s,t),e&&S(s,e,$),R(s,o),s.outerHTML}},[n,t,e,o,$]);return jsxRuntime.jsx("span",{className:o,ref:d(l,p),style:{display:"contents",...a,color:f},dangerouslySetInnerHTML:b?{__html:b}:void 0})});u.displayName="Icon";
|
|
33
33
|
|
|
34
34
|
exports.Icon = u;
|
package/dist/index.mjs
CHANGED
|
@@ -4,6 +4,6 @@ import { useId } from 'react-aria';
|
|
|
4
4
|
import { invariant } from '@baseline-ui/utils';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var c=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function d(...t){return t.length===1?t[0]:e=>{for(let o of t)typeof o=="function"?o(e):o!=null&&(o.current=e);}}var w=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},S=(t,e,o)=>{let a=t.querySelector("title"),
|
|
7
|
+
var c=t=>{var e;return (e=t?.ownerDocument)!==null&&e!==void 0?e:document};function d(...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 w=(t,e)=>{t.setAttribute("height",typeof e=="number"?`${e}px`:e),t.setAttribute("width",typeof e=="number"?`${e}px`:e);},S=(t,e,o)=>{let a=t.querySelector("title"),f=c(t);if(a)a.textContent=e,a.setAttribute("id",o);else {let r=f.createElement("title");r.textContent=e,r.setAttribute("id",o),t.prepend(r);}},R=(t,e)=>{e&&t.classList.add(e);},E=(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=i.forwardRef(({size:t,title:e,className:o,style:a,color:f,...r},l)=>{let $=useId(),p=i.useRef(null),n="svg"in r?r.svg:void 0,b=i.useMemo(()=>{if(n){let x=c(p.current),s=E(n,x);return t&&w(s,t),e&&S(s,e,$),R(s,o),s.outerHTML}},[n,t,e,o,$]);return jsx("span",{className:o,ref:d(l,p),style:{display:"contents",...a,color:f},dangerouslySetInnerHTML:b?{__html:b}:void 0})});u.displayName="Icon";
|
|
8
8
|
|
|
9
9
|
export { u as Icon };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseline-ui/icons",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@react-aria/utils": "3.24.1",
|
|
22
22
|
"dompurify": "3.1.6",
|
|
23
23
|
"react-aria": "3.33.1",
|
|
24
|
-
"@baseline-ui/utils": "0.
|
|
24
|
+
"@baseline-ui/utils": "0.32.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@svgr/cli": "^8.1.0",
|