luxen-ui 0.20.0 → 0.21.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.
Files changed (36) hide show
  1. package/cdn/chunks/iconify-icon.js +1 -1
  2. package/cdn/custom-elements.json +236 -188
  3. package/cdn/elements/badge/badge.d.ts +36 -0
  4. package/cdn/elements/badge/badge.d.ts.map +1 -1
  5. package/cdn/elements/badge/badge.js.map +1 -1
  6. package/cdn/elements/icon/icon.d.ts +37 -0
  7. package/cdn/elements/icon/icon.d.ts.map +1 -1
  8. package/cdn/elements/icon/icon.js +2 -2
  9. package/cdn/elements/icon/icon.js.map +1 -1
  10. package/cdn/elements/select/select.js +1 -1
  11. package/cdn/elements/select/select.js.map +1 -1
  12. package/cdn/elements/tag/tag.d.ts +7 -7
  13. package/cdn/elements/tag/tag.js +1 -1
  14. package/cdn/elements/tag/tag.js.map +1 -1
  15. package/cdn/standalone.css +58 -8
  16. package/cdn/styles/elements/badge.css +58 -8
  17. package/dist/css/elements/badge.css +58 -8
  18. package/dist/custom-elements.json +236 -188
  19. package/dist/elements/badge/badge.d.ts +36 -0
  20. package/dist/elements/badge/badge.d.ts.map +1 -1
  21. package/dist/elements/badge/badge.js +36 -0
  22. package/dist/elements/icon/icon.d.ts +37 -1
  23. package/dist/elements/icon/icon.d.ts.map +1 -1
  24. package/dist/elements/icon/icon.js +59 -1
  25. package/dist/elements/select/select.css +10 -9
  26. package/dist/elements/tag/tag.css +9 -9
  27. package/dist/elements/tag/tag.d.ts +7 -7
  28. package/dist/elements/tag/tag.js +7 -7
  29. package/dist/metadata/badge.json +29 -2
  30. package/dist/metadata/index.json +50 -23
  31. package/dist/metadata/tag.json +20 -20
  32. package/dist/templates/elements/badge.md +90 -0
  33. package/dist/templates/elements/icon.md +33 -0
  34. package/dist/templates/elements/tag.md +19 -15
  35. package/package.json +1 -1
  36. package/templates/choosing-elements.md.tpl +8 -4
@@ -1,2 +1,2 @@
1
- var e=Object.freeze({left:0,top:0,width:16,height:16}),t=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n=Object.freeze({...e,...t}),r=Object.freeze({...n,body:``,hidden:!1}),i=Object.freeze({width:null,height:null}),a=Object.freeze({...i,...t});function o(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var s=/[\s,]+/;function c(e,t){t.split(s).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}var l={...a,preserveAspectRatio:``};function u(e){let t={...l},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=o(n(`rotate`,``)),c(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function d(e,t){for(let n in l)if(e[n]!==t[n])return!0;return!1}var f=/^[a-z0-9]+(-[a-z0-9]+)*$/,p=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!m(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!m(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!m(e,n)?null:e}return null},m=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function h(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function g(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function _(e,n){let i=g(e,n);for(let a in r)a in t?a in e&&!(a in i)&&(i[a]=t[a]):a in n?i[a]=n[a]:a in e&&(i[a]=e[a]);return i}function v(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=_(r[e]||i[e],a)}return o(t),n.forEach(o),_(e,a)}function y(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=h(e);for(let i in r){let a=r[i];a&&(t(i,v(e,i,a)),n.push(i))}return n}var b={provider:``,aliases:{},not_found:{},...e};function x(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ee(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!x(e,b))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!x(t,r))return null}let i=t.aliases||Object.create(null);for(let e in i){let t=i[e],a=t.parent;if(!e||typeof a!=`string`||!n[a]&&!i[a]||!x(t,r))return null}return t}var S=Object.create(null);function te(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){let n=S[e]||(S[e]=Object.create(null));return n[t]||(n[t]=te(e,t))}function w(e,t){return ee(t)?y(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function ne(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function re(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(S)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(S[e]||{})).forEach(t=>{let r=C(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var T=!1;function E(e){return typeof e==`boolean`&&(T=e),T}function D(e){let t=typeof e==`string`?p(e,!0,T):e;if(t){let e=C(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function ie(e,t){let n=p(e,!0,T);if(!n)return!1;let r=C(n.provider,n.prefix);return t?ne(r,n.name,t):(r.missing.add(n.name),!0)}function O(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),T&&!t&&!e.prefix){let t=!1;return ee(e)&&(e.prefix=``,y(e,(e,n)=>{ie(e,n)&&(t=!0)})),t}let n=e.prefix;return m({prefix:n,name:`a`})?!!w(C(t,n),e):!1}function ae(e){return!!D(e)}function oe(e){let t=D(e);return t&&{...n,...t}}function k(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function se(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||k([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var ce=0;function le(e,t,n){let r=ce++,i=k.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function ue(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=C(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}var A=Object.create(null);function de(e,t){A[e]=t}function j(e){return A[e]||A[``]}function fe(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?p(e,t,n):e;i&&r.push(i)}),r}function M(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var N=Object.create(null),P=[`https://api.simplesvg.com`,`https://api.unisvg.com`],F=[];P.length>0;)P.length===1||Math.random()>.5?F.push(P.shift()):F.push(P.pop());N[``]=M({resources:[`https://api.iconify.design`].concat(F)});function pe(e,t){let n=M(t);return n===null?!1:(N[e]=n,!0)}function I(e){return N[e]}function me(){return Object.keys(N)}var he={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ge(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function _e(e){let t={...he,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ge(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function ve(){}var L=Object.create(null);function ye(e){if(!L[e]){let t=I(e);if(!t)return;L[e]={config:t,redundancy:_e(t)}}return L[e]}function be(e,t,n){let r,i;if(typeof e==`string`){let t=j(e);if(!t)return n(void 0,424),ve;i=t.send;let a=ye(e);a&&(r=a.redundancy)}else{let t=M(e);if(t){r=_e(t);let n=j(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),ve):r.query(t,i,n)().abort}function R(){}function xe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,se(e)}))}function Se(e){let t=[],n=[];return e.forEach(e=>{(e.match(f)?t:n).push(e)}),{valid:t,invalid:n}}function z(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!w(e,n).length){r();return}}catch(e){console.error(e)}r(),xe(e)}function B(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ce(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){B(e.loadIcons(r,n,t),t=>{z(e,r,t)});return}if(i){r.forEach(r=>{B(i(r,n,t),t=>{z(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Se(r);if(o.length&&z(e,o,null),!a.length)return;let s=n.match(f)?j(t):null;if(!s){z(e,a,null);return}s.prepare(t,n,a).forEach(n=>{be(t,n,t=>{z(e,n.icons,t)})})}))}var V=(e,t)=>{let n=ue(fe(e,!0,E()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,R)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(C(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=C(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Ce(e,t)}),t?le(t,n,i):R},we=e=>new Promise((t,r)=>{let i=typeof e==`string`?p(e,!0):e;if(!i){r(e);return}V([i||e],a=>{if(a.length&&i){let e=D(i);if(e){t({...n,...e});return}}r(e)})});function H(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function Te(e,t){if(typeof e==`object`)return{data:H(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=H(e);if(t)return{data:t,value:e}}let n=p(e,!0,!0);if(!n)return{value:e};let r=D(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:V([n],()=>t(e,n,D(n)))}}var U=!1;try{U=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ee(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(U||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var De=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Oe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function W(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(De);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Oe.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function ke(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Ae(e,t){return e?`<defs>`+e+`</defs>`+t:t}function je(e,t,n){let r=ke(e);return Ae(r.defs,t+r.content+n)}var Me=e=>e===`unset`||e===`undefined`||e===`none`;function G(e,t){let r={...n,...e},i={...a,...t},o={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body;[r,i].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,i=e.rotate;n?r?i+=2:(t.push(`translate(`+(o.width+o.left).toString()+` `+(0-o.top).toString()+`)`),t.push(`scale(-1 1)`),o.top=o.left=0):r&&(t.push(`translate(`+(0-o.left).toString()+` `+(o.height+o.top).toString()+`)`),t.push(`scale(1 -1)`),o.top=o.left=0);let a;switch(i<0&&(i-=Math.floor(i/4)*4),i%=4,i){case 1:a=o.height/2+o.top,t.unshift(`rotate(90 `+a.toString()+` `+a.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(o.width/2+o.left).toString()+` `+(o.height/2+o.top).toString()+`)`);break;case 3:a=o.width/2+o.left,t.unshift(`rotate(-90 `+a.toString()+` `+a.toString()+`)`);break}i%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),t.length&&(s=je(s,`<g transform="`+t.join(` `)+`">`,`</g>`))});let c=i.width,l=i.height,u=o.width,d=o.height,f,p;c===null?(p=l===null?`1em`:l===`auto`?d:l,f=W(p,u/d)):(f=c===`auto`?u:c,p=l===null?W(f,d/u):l===`auto`?d:l);let m={},h=(e,t)=>{Me(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[o.left,o.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:s}}function K(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Ne(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Pe(e){return`data:image/svg+xml,`+Ne(e)}function q(e){return`url("`+Pe(e)+`")`}var J=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Fe(e){J=e}function Ie(){return J}function Le(e,t){let n=I(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Re(e){return e===404}var ze=(e,t,n)=>{let r=[],i=Le(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Be(e){if(typeof e==`string`){let t=I(e);if(t)return t.path}return`/`}var Ve={prepare:ze,send:(e,t,n)=>{if(!J){n(`abort`,424);return}let r=Be(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;J(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Re(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function He(e,t,n){C(n||``,t).loadIcons=e}function Ue(e,t,n){C(n||``,t).loadIcon=e}var Y=`data-style`,We=``;function Ge(e){We=e}function Ke(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Y));n||(n=document.createElement(`style`),n.setAttribute(Y,Y),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+We}function X(){de(``,Ve),E(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!O(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;pe(e,r)||console.error(n)}catch{console.error(n)}}}}return{iconLoaded:ae,getIcon:oe,listIcons:re,addIcon:ie,addCollection:O,calculateSize:W,buildIcon:G,iconToHTML:K,svgToURL:q,loadIcons:V,loadIcon:we,addAPIProvider:pe,setCustomIconLoader:Ue,setCustomIconsLoader:He,appendCustomStyle:Ge,_api:{getAPIConfig:I,setAPIModule:de,sendAPIQuery:be,setFetch:Fe,getFetch:Ie,listAPIProviders:me}}}var Z={"background-color":`currentColor`},qe={"background-color":`transparent`},Je={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},Ye={"-webkit-mask":Z,mask:Z,background:qe};for(let e in Ye){let t=Ye[e];for(let n in Je)t[e+`-`+n]=Je[n]}function Xe(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function Ze(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=q(K(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:Xe(a.width),height:Xe(a.height),...n?Z:qe};for(let e in c)s.setProperty(e,c[e]);return r}var Q;function Qe(){try{Q=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{Q=null}}function $e(e){return Q===void 0&&Qe(),Q?Q.createHTML(e):e}function et(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=$e(K(e.body,n)),t.firstChild}function $(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function tt(e,t){let r=t.icon.data,i=t.customisations,a=G(r,i);i.preserveAspectRatio&&(a.attributes.preserveAspectRatio=i.preserveAspectRatio);let o=t.renderedMode,s;switch(o){case`svg`:s=et(a);break;default:s=Ze(a,{...n,...r},o===`mask`)}let c=$(e);c?s.tagName===`SPAN`&&c.tagName===s.tagName?c.setAttribute(`style`,s.getAttribute(`style`)):e.replaceChild(s,c):e.appendChild(s)}function nt(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function rt(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Ke(e,t),this._state=nt({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Ke(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}tt(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=u(this);(e.attrMode!==n||d(e.customisations,r)||!$(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=Te(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=nt(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=$(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,u(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ee(e.data.body,n),i=this._state.inline;tt(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=X();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{iconLoaded:it,getIcon:at,listIcons:ot,addIcon:st,addCollection:ct,calculateSize:lt,buildIcon:ut,iconToHTML:dt,svgToURL:ft,loadIcons:pt,loadIcon:mt,setCustomIconLoader:ht,setCustomIconsLoader:gt,addAPIProvider:_t,_api:vt}=rt()||X();
1
+ var e=Object.freeze({left:0,top:0,width:16,height:16}),t=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n=Object.freeze({...e,...t}),r=Object.freeze({...n,body:``,hidden:!1}),i=Object.freeze({width:null,height:null}),a=Object.freeze({...i,...t});function o(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var s=/[\s,]+/;function c(e,t){t.split(s).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}var l={...a,preserveAspectRatio:``};function u(e){let t={...l},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=o(n(`rotate`,``)),c(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function d(e,t){for(let n in l)if(e[n]!==t[n])return!0;return!1}var f=/^[a-z0-9]+(-[a-z0-9]+)*$/,p=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!m(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!m(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!m(e,n)?null:e}return null},m=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function h(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function g(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function _(e,n){let i=g(e,n);for(let a in r)a in t?a in e&&!(a in i)&&(i[a]=t[a]):a in n?i[a]=n[a]:a in e&&(i[a]=e[a]);return i}function v(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=_(r[e]||i[e],a)}return o(t),n.forEach(o),_(e,a)}function y(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=h(e);for(let i in r){let a=r[i];a&&(t(i,v(e,i,a)),n.push(i))}return n}var b={provider:``,aliases:{},not_found:{},...e};function x(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ee(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!x(e,b))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!x(t,r))return null}let i=t.aliases||Object.create(null);for(let e in i){let t=i[e],a=t.parent;if(!e||typeof a!=`string`||!n[a]&&!i[a]||!x(t,r))return null}return t}var S=Object.create(null);function te(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){let n=S[e]||(S[e]=Object.create(null));return n[t]||(n[t]=te(e,t))}function w(e,t){return ee(t)?y(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function ne(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function re(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(S)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(S[e]||{})).forEach(t=>{let r=C(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var T=!1;function E(e){return typeof e==`boolean`&&(T=e),T}function D(e){let t=typeof e==`string`?p(e,!0,T):e;if(t){let e=C(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function ie(e,t){let n=p(e,!0,T);if(!n)return!1;let r=C(n.provider,n.prefix);return t?ne(r,n.name,t):(r.missing.add(n.name),!0)}function O(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),T&&!t&&!e.prefix){let t=!1;return ee(e)&&(e.prefix=``,y(e,(e,n)=>{ie(e,n)&&(t=!0)})),t}let n=e.prefix;return m({prefix:n,name:`a`})?!!w(C(t,n),e):!1}function ae(e){return!!D(e)}function oe(e){let t=D(e);return t&&{...n,...t}}function k(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function se(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||k([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var ce=0;function le(e,t,n){let r=ce++,i=k.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function ue(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=C(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}var A=Object.create(null);function de(e,t){A[e]=t}function j(e){return A[e]||A[``]}function fe(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?p(e,t,n):e;i&&r.push(i)}),r}function M(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var N=Object.create(null),P=[`https://api.simplesvg.com`,`https://api.unisvg.com`],F=[];P.length>0;)P.length===1||Math.random()>.5?F.push(P.shift()):F.push(P.pop());N[``]=M({resources:[`https://api.iconify.design`].concat(F)});function pe(e,t){let n=M(t);return n===null?!1:(N[e]=n,!0)}function I(e){return N[e]}function me(){return Object.keys(N)}var he={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ge(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function _e(e){let t={...he,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ge(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function ve(){}var L=Object.create(null);function ye(e){if(!L[e]){let t=I(e);if(!t)return;L[e]={config:t,redundancy:_e(t)}}return L[e]}function be(e,t,n){let r,i;if(typeof e==`string`){let t=j(e);if(!t)return n(void 0,424),ve;i=t.send;let a=ye(e);a&&(r=a.redundancy)}else{let t=M(e);if(t){r=_e(t);let n=j(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),ve):r.query(t,i,n)().abort}function R(){}function xe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,se(e)}))}function Se(e){let t=[],n=[];return e.forEach(e=>{(e.match(f)?t:n).push(e)}),{valid:t,invalid:n}}function z(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!w(e,n).length){r();return}}catch(e){console.error(e)}r(),xe(e)}function B(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ce(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){B(e.loadIcons(r,n,t),t=>{z(e,r,t)});return}if(i){r.forEach(r=>{B(i(r,n,t),t=>{z(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Se(r);if(o.length&&z(e,o,null),!a.length)return;let s=n.match(f)?j(t):null;if(!s){z(e,a,null);return}s.prepare(t,n,a).forEach(n=>{be(t,n,t=>{z(e,n.icons,t)})})}))}var V=(e,t)=>{let n=ue(fe(e,!0,E()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,R)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(C(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=C(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Ce(e,t)}),t?le(t,n,i):R},we=e=>new Promise((t,r)=>{let i=typeof e==`string`?p(e,!0):e;if(!i){r(e);return}V([i||e],a=>{if(a.length&&i){let e=D(i);if(e){t({...n,...e});return}}r(e)})});function H(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function Te(e,t){if(typeof e==`object`)return{data:H(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=H(e);if(t)return{data:t,value:e}}let n=p(e,!0,!0);if(!n)return{value:e};let r=D(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:V([n],()=>t(e,n,D(n)))}}var U=!1;try{U=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ee(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(U||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var De=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Oe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function W(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(De);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Oe.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function ke(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Ae(e,t){return e?`<defs>`+e+`</defs>`+t:t}function je(e,t,n){let r=ke(e);return Ae(r.defs,t+r.content+n)}var Me=e=>e===`unset`||e===`undefined`||e===`none`;function G(e,t){let r={...n,...e},i={...a,...t},o={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body;[r,i].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,i=e.rotate;n?r?i+=2:(t.push(`translate(`+(o.width+o.left).toString()+` `+(0-o.top).toString()+`)`),t.push(`scale(-1 1)`),o.top=o.left=0):r&&(t.push(`translate(`+(0-o.left).toString()+` `+(o.height+o.top).toString()+`)`),t.push(`scale(1 -1)`),o.top=o.left=0);let a;switch(i<0&&(i-=Math.floor(i/4)*4),i%=4,i){case 1:a=o.height/2+o.top,t.unshift(`rotate(90 `+a.toString()+` `+a.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(o.width/2+o.left).toString()+` `+(o.height/2+o.top).toString()+`)`);break;case 3:a=o.width/2+o.left,t.unshift(`rotate(-90 `+a.toString()+` `+a.toString()+`)`);break}i%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),t.length&&(s=je(s,`<g transform="`+t.join(` `)+`">`,`</g>`))});let c=i.width,l=i.height,u=o.width,d=o.height,f,p;c===null?(p=l===null?`1em`:l===`auto`?d:l,f=W(p,u/d)):(f=c===`auto`?u:c,p=l===null?W(f,d/u):l===`auto`?d:l);let m={},h=(e,t)=>{Me(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[o.left,o.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:s}}function K(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Ne(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Pe(e){return`data:image/svg+xml,`+Ne(e)}function q(e){return`url("`+Pe(e)+`")`}var J=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Fe(e){J=e}function Ie(){return J}function Le(e,t){let n=I(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Re(e){return e===404}var ze=(e,t,n)=>{let r=[],i=Le(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Be(e){if(typeof e==`string`){let t=I(e);if(t)return t.path}return`/`}var Ve={prepare:ze,send:(e,t,n)=>{if(!J){n(`abort`,424);return}let r=Be(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;J(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Re(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function He(e,t,n){C(n||``,t).loadIcons=e}function Ue(e,t,n){C(n||``,t).loadIcon=e}var Y=`data-style`,We=``;function Ge(e){We=e}function Ke(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Y));n||(n=document.createElement(`style`),n.setAttribute(Y,Y),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+We}function X(){de(``,Ve),E(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!O(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;pe(e,r)||console.error(n)}catch{console.error(n)}}}}return{iconLoaded:ae,getIcon:oe,listIcons:re,addIcon:ie,addCollection:O,calculateSize:W,buildIcon:G,iconToHTML:K,svgToURL:q,loadIcons:V,loadIcon:we,addAPIProvider:pe,setCustomIconLoader:Ue,setCustomIconsLoader:He,appendCustomStyle:Ge,_api:{getAPIConfig:I,setAPIModule:de,sendAPIQuery:be,setFetch:Fe,getFetch:Ie,listAPIProviders:me}}}var Z={"background-color":`currentColor`},qe={"background-color":`transparent`},Je={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},Ye={"-webkit-mask":Z,mask:Z,background:qe};for(let e in Ye){let t=Ye[e];for(let n in Je)t[e+`-`+n]=Je[n]}function Xe(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function Ze(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=q(K(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:Xe(a.width),height:Xe(a.height),...n?Z:qe};for(let e in c)s.setProperty(e,c[e]);return r}var Q;function Qe(){try{Q=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{Q=null}}function $e(e){return Q===void 0&&Qe(),Q?Q.createHTML(e):e}function et(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=$e(K(e.body,n)),t.firstChild}function $(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function tt(e,t){let r=t.icon.data,i=t.customisations,a=G(r,i);i.preserveAspectRatio&&(a.attributes.preserveAspectRatio=i.preserveAspectRatio);let o=t.renderedMode,s;switch(o){case`svg`:s=et(a);break;default:s=Ze(a,{...n,...r},o===`mask`)}let c=$(e);c?s.tagName===`SPAN`&&c.tagName===s.tagName?c.setAttribute(`style`,s.getAttribute(`style`)):e.replaceChild(s,c):e.appendChild(s)}function nt(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function rt(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Ke(e,t),this._state=nt({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Ke(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}tt(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=u(this);(e.attrMode!==n||d(e.customisations,r)||!$(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=Te(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=nt(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=$(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,u(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ee(e.data.body,n),i=this._state.inline;tt(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=X();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{iconLoaded:it,getIcon:at,listIcons:ot,addIcon:st,addCollection:ct,calculateSize:lt,buildIcon:ut,iconToHTML:dt,svgToURL:ft,loadIcons:pt,loadIcon:mt,setCustomIconLoader:ht,setCustomIconsLoader:gt,addAPIProvider:_t,_api:vt}=rt()||X();export{mt as t};
2
2
  //# sourceMappingURL=iconify-icon.js.map
@@ -172,6 +172,181 @@
172
172
  }
173
173
  ]
174
174
  },
175
+ {
176
+ "kind": "javascript-module",
177
+ "path": "src/html/elements/avatar/avatar.ts",
178
+ "declarations": [
179
+ {
180
+ "kind": "class",
181
+ "description": "",
182
+ "name": "Avatar",
183
+ "cssProperties": [
184
+ {
185
+ "description": "Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.",
186
+ "name": "--size",
187
+ "default": "40px"
188
+ },
189
+ {
190
+ "description": "Background fill color for initials and the default icon.",
191
+ "name": "--color"
192
+ },
193
+ {
194
+ "description": "Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).",
195
+ "name": "--text-color"
196
+ },
197
+ {
198
+ "description": "Set to `circle` for a fully circular avatar (default is a rounded square).",
199
+ "name": "--appearance"
200
+ }
201
+ ],
202
+ "cssParts": [
203
+ {
204
+ "description": "The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.",
205
+ "name": "base"
206
+ }
207
+ ],
208
+ "members": [
209
+ {
210
+ "kind": "field",
211
+ "name": "src",
212
+ "type": {
213
+ "text": "string"
214
+ },
215
+ "default": "''",
216
+ "description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
217
+ "attribute": "src"
218
+ },
219
+ {
220
+ "kind": "field",
221
+ "name": "name",
222
+ "type": {
223
+ "text": "string"
224
+ },
225
+ "default": "''",
226
+ "description": "Name used as the accessible label and to derive the initials fallback.",
227
+ "attribute": "name"
228
+ },
229
+ {
230
+ "kind": "field",
231
+ "name": "size",
232
+ "type": {
233
+ "text": "string"
234
+ },
235
+ "default": "'md'",
236
+ "description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
237
+ "attribute": "size",
238
+ "reflects": true
239
+ },
240
+ {
241
+ "kind": "field",
242
+ "name": "badge",
243
+ "type": {
244
+ "text": "number"
245
+ },
246
+ "default": "0",
247
+ "description": "Count shown in the corner badge. `0` hides the badge.",
248
+ "attribute": "badge"
249
+ },
250
+ {
251
+ "kind": "field",
252
+ "name": "interactive",
253
+ "type": {
254
+ "text": "boolean"
255
+ },
256
+ "default": "false",
257
+ "description": "Render as a `<button>` with focus ring and hover states.",
258
+ "attribute": "interactive",
259
+ "reflects": true
260
+ }
261
+ ],
262
+ "attributes": [
263
+ {
264
+ "name": "src",
265
+ "type": {
266
+ "text": "string"
267
+ },
268
+ "default": "''",
269
+ "description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
270
+ "fieldName": "src"
271
+ },
272
+ {
273
+ "name": "name",
274
+ "type": {
275
+ "text": "string"
276
+ },
277
+ "default": "''",
278
+ "description": "Name used as the accessible label and to derive the initials fallback.",
279
+ "fieldName": "name"
280
+ },
281
+ {
282
+ "name": "size",
283
+ "type": {
284
+ "text": "string"
285
+ },
286
+ "default": "'md'",
287
+ "description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
288
+ "fieldName": "size"
289
+ },
290
+ {
291
+ "name": "badge",
292
+ "type": {
293
+ "text": "number"
294
+ },
295
+ "default": "0",
296
+ "description": "Count shown in the corner badge. `0` hides the badge.",
297
+ "fieldName": "badge"
298
+ },
299
+ {
300
+ "name": "interactive",
301
+ "type": {
302
+ "text": "boolean"
303
+ },
304
+ "default": "false",
305
+ "description": "Render as a `<button>` with focus ring and hover states.",
306
+ "fieldName": "interactive"
307
+ }
308
+ ],
309
+ "superclass": {
310
+ "name": "LuxenElement",
311
+ "module": "/src/html/shared/luxen-element.js"
312
+ },
313
+ "tagName": "l-avatar",
314
+ "customElement": true,
315
+ "summary": "An avatar component for displaying user images, initials, or a default icon.",
316
+ "_cssClasses": [
317
+ {
318
+ "name": ".l-avatar-group",
319
+ "description": "Flex wrapper that overlaps a row of stacked avatars."
320
+ }
321
+ ]
322
+ }
323
+ ],
324
+ "exports": [
325
+ {
326
+ "kind": "js",
327
+ "name": "Avatar",
328
+ "declaration": {
329
+ "name": "Avatar",
330
+ "module": "src/html/elements/avatar/avatar.ts"
331
+ }
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "kind": "javascript-module",
337
+ "path": "src/html/elements/avatar/index.ts",
338
+ "declarations": [],
339
+ "exports": [
340
+ {
341
+ "kind": "js",
342
+ "name": "*",
343
+ "declaration": {
344
+ "name": "*",
345
+ "module": "src/html/elements/avatar/avatar.js"
346
+ }
347
+ }
348
+ ]
349
+ },
175
350
  {
176
351
  "kind": "javascript-module",
177
352
  "path": "src/html/elements/alert-dialog/alert-dialog.ts",
@@ -654,187 +829,30 @@
654
829
  },
655
830
  {
656
831
  "kind": "javascript-module",
657
- "path": "src/html/elements/avatar/avatar.ts",
832
+ "path": "src/html/elements/badge/badge.ts",
658
833
  "declarations": [
659
834
  {
660
835
  "kind": "class",
661
- "description": "",
662
- "name": "Avatar",
836
+ "description": "A small, non-interactive label for a status, a count, or a category. Light\nDOM and pure CSS, so a badge renders correctly before — or without — its\nscript.\n\n`variant` is the interface-state axis and stays the library's: `info`,\n`success`, `warning`, `danger`. When the colour instead says *what kind of\nthing* this is — a site, a department, an asset class — give the badge your\nown class and set the hooks below. They win over `variant`, `appearance` and\n`pill` rather than competing with them, so a tinted badge keeps its tint\nthrough an appearance change.\n\n```css\nl-badge.chip-site {\n --text-color: var(--brand-site-ink);\n --background-color: var(--brand-site-soft);\n}\n```\n\nSize stays on the `size` attribute — there is no hook for height, label size\nor padding, and none is wanted: three steps are the design, not a default to\ndial past.",
837
+ "name": "Badge",
663
838
  "cssProperties": [
664
839
  {
665
- "description": "Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.",
666
- "name": "--size",
667
- "default": "40px"
668
- },
669
- {
670
- "description": "Background fill color for initials and the default icon.",
671
- "name": "--color"
672
- },
673
- {
674
- "description": "Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).",
840
+ "description": "Label color. The border is a tint of it, so this alone repaints an outlined badge. Defaults to the `variant` step.",
675
841
  "name": "--text-color"
676
842
  },
677
843
  {
678
- "description": "Set to `circle` for a fully circular avatar (default is a rounded square).",
679
- "name": "--appearance"
680
- }
681
- ],
682
- "cssParts": [
683
- {
684
- "description": "The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.",
685
- "name": "base"
686
- }
687
- ],
688
- "members": [
689
- {
690
- "kind": "field",
691
- "name": "src",
692
- "type": {
693
- "text": "string"
694
- },
695
- "default": "''",
696
- "description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
697
- "attribute": "src"
698
- },
699
- {
700
- "kind": "field",
701
- "name": "name",
702
- "type": {
703
- "text": "string"
704
- },
705
- "default": "''",
706
- "description": "Name used as the accessible label and to derive the initials fallback.",
707
- "attribute": "name"
708
- },
709
- {
710
- "kind": "field",
711
- "name": "size",
712
- "type": {
713
- "text": "string"
714
- },
715
- "default": "'md'",
716
- "description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
717
- "attribute": "size",
718
- "reflects": true
719
- },
720
- {
721
- "kind": "field",
722
- "name": "badge",
723
- "type": {
724
- "text": "number"
725
- },
726
- "default": "0",
727
- "description": "Count shown in the corner badge. `0` hides the badge.",
728
- "attribute": "badge"
729
- },
730
- {
731
- "kind": "field",
732
- "name": "interactive",
733
- "type": {
734
- "text": "boolean"
735
- },
736
- "default": "false",
737
- "description": "Render as a `<button>` with focus ring and hover states.",
738
- "attribute": "interactive",
739
- "reflects": true
740
- }
741
- ],
742
- "attributes": [
743
- {
744
- "name": "src",
745
- "type": {
746
- "text": "string"
747
- },
748
- "default": "''",
749
- "description": "Image URL. Falls back to initials (then the default icon) if it fails to load.",
750
- "fieldName": "src"
751
- },
752
- {
753
- "name": "name",
754
- "type": {
755
- "text": "string"
756
- },
757
- "default": "''",
758
- "description": "Name used as the accessible label and to derive the initials fallback.",
759
- "fieldName": "name"
760
- },
761
- {
762
- "name": "size",
763
- "type": {
764
- "text": "string"
765
- },
766
- "default": "'md'",
767
- "description": "Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`.",
768
- "fieldName": "size"
844
+ "description": "Badge fill. Defaults to the `appearance` step — transparent when outlined.",
845
+ "name": "--background-color"
769
846
  },
770
847
  {
771
- "name": "badge",
772
- "type": {
773
- "text": "number"
774
- },
775
- "default": "0",
776
- "description": "Count shown in the corner badge. `0` hides the badge.",
777
- "fieldName": "badge"
848
+ "description": "Badge border. Defaults to a 30% tint of `--text-color`; setting it replaces that derivation and holds through `appearance=\"filled\"`, whose default line is transparent.",
849
+ "name": "--border-color"
778
850
  },
779
851
  {
780
- "name": "interactive",
781
- "type": {
782
- "text": "boolean"
783
- },
784
- "default": "false",
785
- "description": "Render as a `<button>` with focus ring and hover states.",
786
- "fieldName": "interactive"
852
+ "description": "Corner radius. The corner stays a squircle; `pill` is what trades it for a true arc. Defaults to `--l-radius-md`.",
853
+ "name": "--border-radius"
787
854
  }
788
855
  ],
789
- "superclass": {
790
- "name": "LuxenElement",
791
- "module": "/src/html/shared/luxen-element.js"
792
- },
793
- "tagName": "l-avatar",
794
- "customElement": true,
795
- "summary": "An avatar component for displaying user images, initials, or a default icon.",
796
- "_cssClasses": [
797
- {
798
- "name": ".l-avatar-group",
799
- "description": "Flex wrapper that overlaps a row of stacked avatars."
800
- }
801
- ]
802
- }
803
- ],
804
- "exports": [
805
- {
806
- "kind": "js",
807
- "name": "Avatar",
808
- "declaration": {
809
- "name": "Avatar",
810
- "module": "src/html/elements/avatar/avatar.ts"
811
- }
812
- }
813
- ]
814
- },
815
- {
816
- "kind": "javascript-module",
817
- "path": "src/html/elements/avatar/index.ts",
818
- "declarations": [],
819
- "exports": [
820
- {
821
- "kind": "js",
822
- "name": "*",
823
- "declaration": {
824
- "name": "*",
825
- "module": "src/html/elements/avatar/avatar.js"
826
- }
827
- }
828
- ]
829
- },
830
- {
831
- "kind": "javascript-module",
832
- "path": "src/html/elements/badge/badge.ts",
833
- "declarations": [
834
- {
835
- "kind": "class",
836
- "description": "",
837
- "name": "Badge",
838
856
  "members": [
839
857
  {
840
858
  "kind": "field",
@@ -919,7 +937,13 @@
919
937
  },
920
938
  "tagName": "l-badge",
921
939
  "customElement": true,
922
- "summary": "A badge component for displaying small status indicators."
940
+ "summary": "A badge component for displaying small status indicators.",
941
+ "examples": [
942
+ {
943
+ "language": "html",
944
+ "code": "<l-badge variant=\"success\">Active</l-badge>\n<l-badge class=\"chip-site\">\n <l-icon name=\"mdi:map-marker-outline\"></l-icon>\n Lyon branch\n</l-badge>"
945
+ }
946
+ ]
923
947
  }
924
948
  ],
925
949
  "exports": [
@@ -4340,6 +4364,30 @@
4340
4364
  }
4341
4365
  ],
4342
4366
  "exports": [
4367
+ {
4368
+ "kind": "js",
4369
+ "name": "addCollection",
4370
+ "declaration": {
4371
+ "name": "addCollection",
4372
+ "package": "iconify-icon"
4373
+ }
4374
+ },
4375
+ {
4376
+ "kind": "js",
4377
+ "name": "addIcon",
4378
+ "declaration": {
4379
+ "name": "addIcon",
4380
+ "package": "iconify-icon"
4381
+ }
4382
+ },
4383
+ {
4384
+ "kind": "js",
4385
+ "name": "setCustomIconLoader",
4386
+ "declaration": {
4387
+ "name": "setCustomIconLoader",
4388
+ "package": "iconify-icon"
4389
+ }
4390
+ },
4343
4391
  {
4344
4392
  "kind": "js",
4345
4393
  "name": "Icon",
@@ -8986,44 +9034,44 @@
8986
9034
  "name": "Tag",
8987
9035
  "cssProperties": [
8988
9036
  {
8989
- "description": "Corner radius. Defaults to a full pill.",
8990
- "name": "--border-radius"
9037
+ "description": "Label color.",
9038
+ "name": "--text-color"
8991
9039
  },
8992
9040
  {
8993
- "description": "Chip height. Defaults to the `size` step (a selectable chip is taller, to keep a comfortable target).",
8994
- "name": "--height"
9041
+ "description": "Chip fill.",
9042
+ "name": "--background-color"
8995
9043
  },
8996
9044
  {
8997
- "description": "Label size. Defaults to the `size` step — 12px, or 14px at `size=\"lg\"`. Set it with `--height` to land between the two steps in a dense filter panel.",
8998
- "name": "--font-size"
9045
+ "description": "Chip border, and the rule that splits off the remove button. Defaults to a tint of `--text-color`; setting it pins the line in every state, so a token-based theme keeps its own value on hover.",
9046
+ "name": "--border-color"
8999
9047
  },
9000
9048
  {
9001
- "description": "Horizontal padding. Defaults to the `size` step.",
9002
- "name": "--padding-inline"
9049
+ "description": "Label, border, and checkbox accent when selected. Defaults to the library's form-control accent, lightened in dark mode.",
9050
+ "name": "--selected-text-color"
9003
9051
  },
9004
9052
  {
9005
- "description": "Chip background.",
9006
- "name": "--background"
9053
+ "description": "Chip fill when selected. Defaults to a tint of `--selected-text-color`.",
9054
+ "name": "--selected-background-color"
9007
9055
  },
9008
9056
  {
9009
- "description": "Text color.",
9010
- "name": "--color"
9057
+ "description": "Chip border when selected. Defaults to a 45% tint of `--selected-text-color`. Selection replaces the line the same way it replaces the fill and the ink, so a chip themed with `--border-color` still gets its emphasis step; set this to theme that step too.",
9058
+ "name": "--selected-border-color"
9011
9059
  },
9012
9060
  {
9013
- "description": "Chip border, and the rule that splits off the remove button. Defaults to a tint of `--color`; setting it pins the line in every state, so a token-based theme keeps its own value on hover.",
9014
- "name": "--border-color"
9061
+ "description": "Chip height. Defaults to the `size` step (a selectable chip is taller, to keep a comfortable target).",
9062
+ "name": "--height"
9015
9063
  },
9016
9064
  {
9017
- "description": "Text, border, and checkbox accent when selected. Defaults to the library's form-control accent, lightened in dark mode.",
9018
- "name": "--selected-color"
9065
+ "description": "Label size. Defaults to the `size` step — 12px, or 14px at `size=\"lg\"`. Set it with `--height` to land between the two steps in a dense filter panel.",
9066
+ "name": "--font-size"
9019
9067
  },
9020
9068
  {
9021
- "description": "Chip background when selected. Defaults to a tint of `--selected-color`.",
9022
- "name": "--selected-background"
9069
+ "description": "Horizontal padding. Defaults to the `size` step.",
9070
+ "name": "--padding-inline"
9023
9071
  },
9024
9072
  {
9025
- "description": "Chip border when selected. Defaults to a 45% tint of `--selected-color`. Selection replaces the line the same way it replaces the fill and the ink, so a chip themed with `--border-color` still gets its emphasis step; set this to theme that step too.",
9026
- "name": "--selected-border-color"
9073
+ "description": "Corner radius. Defaults to a full pill.",
9074
+ "name": "--border-radius"
9027
9075
  }
9028
9076
  ],
9029
9077
  "cssParts": [
@@ -3,8 +3,44 @@ export type BadgeVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral'
3
3
  export type BadgeSize = 'sm' | 'md' | 'lg';
4
4
  export type BadgeAppearance = 'outlined' | 'filled' | 'filled-outlined' | 'accent';
5
5
  /**
6
+ * A small, non-interactive label for a status, a count, or a category. Light
7
+ * DOM and pure CSS, so a badge renders correctly before — or without — its
8
+ * script.
9
+ *
10
+ * `variant` is the interface-state axis and stays the library's: `info`,
11
+ * `success`, `warning`, `danger`. When the colour instead says *what kind of
12
+ * thing* this is — a site, a department, an asset class — give the badge your
13
+ * own class and set the hooks below. They win over `variant`, `appearance` and
14
+ * `pill` rather than competing with them, so a tinted badge keeps its tint
15
+ * through an appearance change.
16
+ *
17
+ * ```css
18
+ * l-badge.chip-site {
19
+ * --text-color: var(--brand-site-ink);
20
+ * --background-color: var(--brand-site-soft);
21
+ * }
22
+ * ```
23
+ *
24
+ * Size stays on the `size` attribute — there is no hook for height, label size
25
+ * or padding, and none is wanted: three steps are the design, not a default to
26
+ * dial past.
27
+ *
6
28
  * @summary A badge component for displaying small status indicators.
7
29
  * @customElement l-badge
30
+ *
31
+ * @example
32
+ * ```html
33
+ * <l-badge variant="success">Active</l-badge>
34
+ * <l-badge class="chip-site">
35
+ * <l-icon name="mdi:map-marker-outline"></l-icon>
36
+ * Lyon branch
37
+ * </l-badge>
38
+ * ```
39
+ *
40
+ * @cssproperty [--text-color] - Label color. The border is a tint of it, so this alone repaints an outlined badge. Defaults to the `variant` step.
41
+ * @cssproperty [--background-color] - Badge fill. Defaults to the `appearance` step — transparent when outlined.
42
+ * @cssproperty [--border-color] - Badge border. Defaults to a 30% tint of `--text-color`; setting it replaces that derivation and holds through `appearance="filled"`, whose default line is transparent.
43
+ * @cssproperty [--border-radius] - Corner radius. The corner stays a squircle; `pill` is what trades it for a true arc. Defaults to `--l-radius-md`.
8
44
  */
9
45
  export declare class Badge extends LuxenElement {
10
46
  createRenderRoot(): this;
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/html/elements/badge/badge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,CAAC;AAEnF;;;GAGG;AACH,qBAAa,KAAM,SAAQ,YAAY;IAC5B,gBAAgB;IAIzB,oFAAoF;IACvD,OAAO,CAAC,EAAE,YAAY,CAAC;IAEpD,4BAA4B;IACgB,IAAI,UAAS;IAEzD,6CAA6C;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IAE9C,qFAAqF;IACxD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC3D"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/html/elements/badge/badge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,KAAM,SAAQ,YAAY;IAC5B,gBAAgB;IAIzB,oFAAoF;IACvD,OAAO,CAAC,EAAE,YAAY,CAAC;IAEpD,4BAA4B;IACgB,IAAI,UAAS;IAEzD,6CAA6C;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IAE9C,qFAAqF;IACxD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC3D"}