bricks-ui-library 0.0.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/README.md +173 -0
- package/dist/bricks-ui-library.css +1 -0
- package/dist/bricks-ui-library.es.js +1320 -0
- package/dist/bricks-ui-library.umd.js +1 -0
- package/dist/favicon.ico +0 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(w,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(w=typeof globalThis<"u"?globalThis:w||self,c(w.BricksUiLibrary={},w.Vue))})(this,(function(w,c){"use strict";const Ie={class:"hello-world"},Se=c.defineComponent({__name:"HelloWorld",props:{title:{default:"Hello World!"},subtitle:{default:"This is a sample component"},titleColor:{default:"#42b883"},subtitleColor:{default:"#7f8c8d"},showSubtitle:{type:Boolean,default:!0}},setup(e){return(t,o)=>(c.openBlock(),c.createElementBlock("div",Ie,[c.createElementVNode("h1",{class:"title",style:c.normalizeStyle({color:e.titleColor})},c.toDisplayString(e.title),5),e.showSubtitle?(c.openBlock(),c.createElementBlock("h3",{key:0,class:"subtitle",style:c.normalizeStyle({color:e.subtitleColor})},c.toDisplayString(e.subtitle),5)):c.createCommentVNode("",!0)]))}}),D=(e,t)=>{const o=e.__vccOpts||e;for(const[i,n]of t)o[i]=n;return o},$=D(Se,[["__scopeId","data-v-029130f9"]]),X=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(e,t,o,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),a=n.pop(),f={provider:n.length>0?n[0]:i,prefix:a,name:l};return t&&!O(f)?null:f}const s=n[0],r=s.split("-");if(r.length>1){const l={provider:i,prefix:r.shift(),name:r.join("-")};return t&&!O(l)?null:l}if(o&&i===""){const l={provider:i,prefix:"",name:s};return t&&!O(l,o)?null:l}return null},O=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Z=Object.freeze({left:0,top:0,width:16,height:16}),A=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Z,...A}),z=Object.freeze({...B,body:"",hidden:!1});function Te(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(o.rotate=i),o}function ee(e,t){const o=Te(e,t);for(const i in z)i in A?i in e&&!(i in o)&&(o[i]=A[i]):i in t?o[i]=t[i]:i in e&&(o[i]=e[i]);return o}function Ce(e,t){const o=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(r){if(o[r])return n[r]=[];if(!(r in n)){n[r]=null;const l=i[r]&&i[r].parent,a=l&&s(l);a&&(n[r]=[l].concat(a))}return n[r]}return Object.keys(o).concat(Object.keys(i)).forEach(s),n}function Ee(e,t,o){const i=e.icons,n=e.aliases||Object.create(null);let s={};function r(l){s=ee(i[l]||n[l],s)}return r(t),o.forEach(r),ee(e,s)}function te(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const i=Ce(e);for(const n in i){const s=i[n];s&&(t(n,Ee(e,n,s)),o.push(n))}return o}const _e={provider:"",aliases:{},not_found:{},...Z};function R(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function ne(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!R(e,_e))return null;const o=t.icons;for(const n in o){const s=o[n];if(!n||typeof s.body!="string"||!R(s,z))return null}const i=t.aliases||Object.create(null);for(const n in i){const s=i[n],r=s.parent;if(!n||typeof r!="string"||!o[r]&&!i[r]||!R(s,z))return null}return t}const oe=Object.create(null);function Le(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){const o=oe[e]||(oe[e]=Object.create(null));return o[t]||(o[t]=Le(e,t))}function ie(e,t){return ne(t)?te(t,(o,i)=>{i?e.icons[o]=i:e.missing.add(o)}):[]}function je(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}let _=!1;function se(e){return typeof e=="boolean"&&(_=e),_}function Pe(e){const t=typeof e=="string"?F(e,!0,_):e;if(t){const o=C(t.provider,t.prefix),i=t.name;return o.icons[i]||(o.missing.has(i)?null:void 0)}}function Fe(e,t){const o=F(e,!0,_);if(!o)return!1;const i=C(o.provider,o.prefix);return t?je(i,o.name,t):(i.missing.add(o.name),!0)}function Oe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),_&&!t&&!e.prefix){let n=!1;return ne(e)&&(e.prefix="",te(e,(s,r)=>{Fe(s,r)&&(n=!0)})),n}const o=e.prefix;if(!O({prefix:o,name:"a"}))return!1;const i=C(t,o);return!!ie(i,e)}const re=Object.freeze({width:null,height:null}),ce=Object.freeze({...re,...A}),Ae=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Be=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function le(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const i=e.split(Ae);if(i===null||!i.length)return e;const n=[];let s=i.shift(),r=Be.test(s);for(;;){if(r){const l=parseFloat(s);isNaN(l)?n.push(s):n.push(Math.ceil(l*t*o)/o)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");r=!r}}function Me(e,t="defs"){let o="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const r=e.indexOf(">",s);if(r===-1)break;o+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(r+1)}return{defs:o,content:e}}function ve(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Ve(e,t,o){const i=Me(e);return ve(i.defs,t+i.content+o)}const Ne=e=>e==="unset"||e==="undefined"||e==="none";function De(e,t){const o={...B,...e},i={...ce,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,i].forEach(g=>{const u=[],E=g.hFlip,S=g.vFlip;let k=g.rotate;E?S?k+=2:(u.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),u.push("scale(-1 1)"),n.top=n.left=0):S&&(u.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),u.push("scale(1 -1)"),n.top=n.left=0);let b;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:b=n.height/2+n.top,u.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:u.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:b=n.width/2+n.left,u.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}k%2===1&&(n.left!==n.top&&(b=n.left,n.left=n.top,n.top=b),n.width!==n.height&&(b=n.width,n.width=n.height,n.height=b)),u.length&&(s=Ve(s,'<g transform="'+u.join(" ")+'">',"</g>"))});const r=i.width,l=i.height,a=n.width,f=n.height;let d,h;r===null?(h=l===null?"1em":l==="auto"?f:l,d=le(h,a/f)):(d=r==="auto"?a:r,h=l===null?le(d,f/a):l==="auto"?f:l);const m={},y=(g,u)=>{Ne(u)||(m[g]=u.toString())};y("width",d),y("height",h);const I=[n.left,n.top,a,f];return m.viewBox=I.join(" "),{attributes:m,viewBox:I,body:s}}const $e=/\sid="(\S+)"/g,ze="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Re=0;function He(e,t=ze){const o=[];let i;for(;i=$e.exec(e);)o.push(i[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(s=>{const r=typeof t=="function"?t(s):t+(Re++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const H=Object.create(null);function We(e,t){H[e]=t}function W(e){return H[e]||H[""]}function U(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}}const q=Object.create(null),L=["https://api.simplesvg.com","https://api.unisvg.com"],M=[];for(;L.length>0;)L.length===1||Math.random()>.5?M.push(L.shift()):M.push(L.pop());q[""]=U({resources:["https://api.iconify.design"].concat(M)});function Ue(e,t){const o=U(t);return o===null?!1:(q[e]=o,!0)}function Q(e){return q[e]}let ae=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function qe(e,t){const o=Q(e);if(!o)return 0;let i;if(!o.maxURL)i=0;else{let n=0;o.resources.forEach(r=>{n=Math.max(n,r.length)});const s=t+".json?icons=";i=o.maxURL-n-o.path.length-s.length}return i}function Qe(e){return e===404}const Ge=(e,t,o)=>{const i=[],n=qe(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return o.forEach((a,f)=>{l+=a.length+1,l>=n&&f>0&&(i.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),i.push(r),i};function Ke(e){if(typeof e=="string"){const t=Q(e);if(t)return t.path}return"/"}const Ye={prepare:Ge,send:(e,t,o)=>{if(!ae){o("abort",424);return}let i=Ke(t.provider);switch(t.type){case"icons":{const s=t.prefix,l=t.icons.join(","),a=new URLSearchParams({icons:l});i+=s+".json?"+a.toString();break}case"custom":{const s=t.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:o("abort",400);return}let n=503;ae(e+i).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{o(Qe(r)?"abort":"next",r)});return}return n=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?o("abort",s):o("next",n)});return}setTimeout(()=>{o("success",s)})}).catch(()=>{o("next",n)})}};function Je(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((n,s)=>n.provider!==s.provider?n.provider.localeCompare(s.provider):n.prefix!==s.prefix?n.prefix.localeCompare(s.prefix):n.name.localeCompare(s.name));let i={provider:"",prefix:"",name:""};return e.forEach(n=>{if(i.name===n.name&&i.prefix===n.prefix&&i.provider===n.provider)return;i=n;const s=n.provider,r=n.prefix,l=n.name,a=o[s]||(o[s]=Object.create(null)),f=a[r]||(a[r]=C(s,r));let d;l in f.icons?d=t.loaded:r===""||f.missing.has(l)?d=t.missing:d=t.pending;const h={provider:s,prefix:r,name:l};d.push(h)}),t}function fe(e,t){e.forEach(o=>{const i=o.loaderCallbacks;i&&(o.loaderCallbacks=i.filter(n=>n.id!==t))})}function Xe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const i=e.provider,n=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==n)return!0;const f=a.name;if(e.icons[f])r.loaded.push({provider:i,prefix:n,name:f});else if(e.missing.has(f))r.missing.push({provider:i,prefix:n,name:f});else return o=!0,!0;return!1}),r.pending.length!==l&&(o||fe([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Ze=0;function et(e,t,o){const i=Ze++,n=fe.bind(null,o,i);if(!t.pending.length)return n;const s={id:i,icons:t,callback:e,abort:n};return o.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),n}function tt(e,t=!0,o=!1){const i=[];return e.forEach(n=>{const s=typeof n=="string"?F(n,t,o):n;s&&i.push(s)}),i}var nt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ot(e,t,o,i){const n=e.resources.length,s=e.random?Math.floor(Math.random()*n):e.index;let r;if(e.random){let p=e.resources.slice(0);for(r=[];p.length>1;){const x=Math.floor(Math.random()*p.length);r.push(p[x]),p=p.slice(0,x).concat(p.slice(x+1))}r=r.concat(p)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",f=0,d,h=null,m=[],y=[];typeof i=="function"&&y.push(i);function I(){h&&(clearTimeout(h),h=null)}function g(){a==="pending"&&(a="aborted"),I(),m.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),m=[]}function u(p,x){x&&(y=[]),typeof p=="function"&&y.push(p)}function E(){return{startTime:l,payload:t,status:a,queriesSent:f,queriesPending:m.length,subscribe:u,abort:g}}function S(){a="failed",y.forEach(p=>{p(void 0,d)})}function k(){m.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),m=[]}function b(p,x,P){const N=x!=="success";switch(m=m.filter(T=>T!==p),a){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(x==="abort"){d=P,S();return}if(N){d=P,m.length||(r.length?J():S());return}if(I(),k(),!e.random){const T=e.resources.indexOf(p.resource);T!==-1&&T!==e.index&&(e.index=T)}a="completed",y.forEach(T=>{T(P)})}function J(){if(a!=="pending")return;I();const p=r.shift();if(p===void 0){if(m.length){h=setTimeout(()=>{I(),a==="pending"&&(k(),S())},e.timeout);return}S();return}const x={status:"pending",resource:p,callback:(P,N)=>{b(x,P,N)}};m.push(x),f++,h=setTimeout(J,e.rotate),o(p,t,x.callback)}return setTimeout(J),E}function ue(e){const t={...nt,...e};let o=[];function i(){o=o.filter(l=>l().status==="pending")}function n(l,a,f){const d=ot(t,l,a,(h,m)=>{i(),f&&f(h,m)});return o.push(d),d}function s(l){return o.find(a=>l(a))||null}return{query:n,find:s,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:i}}function de(){}const G=Object.create(null);function it(e){if(!G[e]){const t=Q(e);if(!t)return;const o=ue(t),i={config:t,redundancy:o};G[e]=i}return G[e]}function st(e,t,o){let i,n;if(typeof e=="string"){const s=W(e);if(!s)return o(void 0,424),de;n=s.send;const r=it(e);r&&(i=r.redundancy)}else{const s=U(e);if(s){i=ue(s);const r=e.resources?e.resources[0]:"",l=W(r);l&&(n=l.send)}}return!i||!n?(o(void 0,424),de):i.query(t,n,o)().abort}function he(){}function rt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xe(e)}))}function ct(e){const t=[],o=[];return e.forEach(i=>{(i.match(X)?t:o).push(i)}),{valid:t,invalid:o}}function j(e,t,o){function i(){const n=e.pendingIcons;t.forEach(s=>{n&&n.delete(s),e.icons[s]||e.missing.add(s)})}if(o&&typeof o=="object")try{if(!ie(e,o).length){i();return}}catch(n){console.error(n)}i(),rt(e)}function pe(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function lt(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:i}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const s=e.loadIcon;if(e.loadIcons&&(n.length>1||!s)){pe(e.loadIcons(n,i,o),d=>{j(e,n,d)});return}if(s){n.forEach(d=>{const h=s(d,i,o);pe(h,m=>{const y=m?{prefix:i,icons:{[d]:m}}:null;j(e,[d],y)})});return}const{valid:r,invalid:l}=ct(n);if(l.length&&j(e,l,null),!r.length)return;const a=i.match(X)?W(o):null;if(!a){j(e,r,null);return}a.prepare(o,i,r).forEach(d=>{st(o,d,h=>{j(e,d.icons,h)})})}))}const at=(e,t)=>{const o=tt(e,!0,se()),i=Je(o);if(!i.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(i.loaded,i.missing,i.pending,he)}),()=>{a=!1}}const n=Object.create(null),s=[];let r,l;return i.pending.forEach(a=>{const{provider:f,prefix:d}=a;if(d===l&&f===r)return;r=f,l=d,s.push(C(f,d));const h=n[f]||(n[f]=Object.create(null));h[d]||(h[d]=[])}),i.pending.forEach(a=>{const{provider:f,prefix:d,name:h}=a,m=C(f,d),y=m.pendingIcons||(m.pendingIcons=new Set);y.has(h)||(y.add(h),n[f][d].push(h))}),s.forEach(a=>{const f=n[a.provider][a.prefix];f.length&<(a,f)}),t?et(t,i,s):he};function ft(e,t){const o={...e};for(const i in t){const n=t[i],s=typeof n;i in re?(n===null||n&&(s==="string"||s==="number"))&&(o[i]=n):s===typeof o[i]&&(o[i]=i==="rotate"?n%4:n)}return o}const ut=/[\s,]+/;function dt(e,t){t.split(ut).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ht(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function i(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:i(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/n,s%1===0?i(s):0)}}return t}function pt(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)o+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function mt(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function gt(e){return"data:image/svg+xml,"+mt(e)}function yt(e){return'url("'+gt(e)+'")'}const me={...ce,inline:!1},bt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},xt={display:"inline-block"},K={backgroundColor:"currentColor"},ge={backgroundColor:"transparent"},ye={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},be={webkitMask:K,mask:K,background:ge};for(const e in be){const t=be[e];for(const o in ye)t[e+o]=ye[o]}const v={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";v[e+"-flip"]=t,v[e.slice(0,1)+"-flip"]=t,v[e+"Flip"]=t});function xe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ke=(e,t)=>{const o=ft(me,t),i={...bt},n=t.mode||"svg",s={},r=t.style,l=typeof r=="object"&&!(r instanceof Array)?r:{};for(let g in t){const u=t[g];if(u!==void 0)switch(g){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[g]=u===!0||u==="true"||u===1;break;case"flip":typeof u=="string"&&dt(o,u);break;case"color":s.color=u;break;case"rotate":typeof u=="string"?o[g]=ht(u):typeof u=="number"&&(o[g]=u);break;case"ariaHidden":case"aria-hidden":u!==!0&&u!=="true"&&delete i["aria-hidden"];break;default:{const E=v[g];E?(u===!0||u==="true"||u===1)&&(o[E]=!0):me[g]===void 0&&(i[g]=u)}}}const a=De(e,o),f=a.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),n==="svg"){i.style={...s,...l},Object.assign(i,f);let g=0,u=t.id;return typeof u=="string"&&(u=u.replace(/-/g,"_")),i.innerHTML=He(a.body,u?()=>u+"ID"+g++:"iconifyVue"),c.h("svg",i)}const{body:d,width:h,height:m}=e,y=n==="mask"||(n==="bg"?!1:d.indexOf("currentColor")!==-1),I=pt(d,{...f,width:h+"",height:m+""});return i.style={...s,"--svg":yt(I),width:xe(f.width),height:xe(f.height),...xt,...y?K:ge,...l},c.h("span",i)};if(se(!0),We("",Ye),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Oe(i))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const i="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;Ue(o,n)||console.error(i)}catch{console.error(i)}}}}const kt={...B,body:""},wt=c.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,o){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=F(e,!1,!0))===null)return this.abortLoading(),null;let n=Pe(i);if(!n)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",n!==null&&(this._loadingIcon={name:e,abort:at([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),o){n=Object.assign({},n);const r=o(n.body,i.name,i.prefix,i.provider);typeof r=="string"&&(n.body=r)}const s=["iconify"];return i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),{data:n,classes:s}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return ke(kt,e);let o=e;return t.classes&&(o={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),ke({...B,...t.data},o)}}),It={class:"icon-wrapper"},St={key:1,class:"default-icon"},Tt={class:"details"},Ct={class:"heading"},Et={class:"content"},V=D(c.defineComponent({__name:"WelcomeItem",props:{icon:{default:""},heading:{default:"Item Title"},content:{default:"Item content description"},vertical:{type:Boolean,default:!1},iconSize:{default:"1.5rem"}},setup(e){return(t,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["item",{vertical:e.vertical}])},[c.createElementVNode("div",It,[c.renderSlot(t.$slots,"icon",{},()=>[e.icon?(c.openBlock(),c.createBlock(c.unref(wt),{key:0,icon:e.icon,style:c.normalizeStyle({fontSize:e.iconSize}),class:"iconify-icon"},null,8,["icon","style"])):(c.openBlock(),c.createElementBlock("div",St,c.toDisplayString(e.icon||"?"),1))],!0)]),c.createElementVNode("div",Tt,[c.createElementVNode("h3",Ct,[c.renderSlot(t.$slots,"heading",{},()=>[c.createTextVNode(c.toDisplayString(e.heading),1)],!0)]),c.createElementVNode("div",Et,[c.renderSlot(t.$slots,"default",{},()=>[c.createTextVNode(c.toDisplayString(e.content),1)],!0)])])],2))}}),[["__scopeId","data-v-207e41b6"]]),_t={class:"welcome-container"},Lt={key:0,class:"welcome-title"},jt={key:0},Pt=["innerHTML"],Ft=["innerHTML"],Y=D(c.defineComponent({__name:"TheWelcome",props:{items:{default:()=>[{icon:"documentation",heading:"Documentation",content:"Vue's official documentation provides you with all information you need to get started."},{icon:"tooling",heading:"Tooling",content:"This project is served and bundled with Vite. The recommended IDE setup is VSCode + Vue - Official extension."},{icon:"ecosystem",heading:"Ecosystem",content:"Get official tools and libraries for your project: Pinia, Vue Router, Vue Test Utils, and Vue Dev Tools."},{icon:"community",heading:"Community",content:"Got stuck? Ask your question on Vue Land (our official Discord server), or StackOverflow."},{icon:"support",heading:"Support Vue",content:"As an independent project, Vue relies on community backing for its sustainability. You can help us by becoming a sponsor."}]},title:{default:"Welcome to Your Component Library"}},setup(e){const t=o=>({documentation:"mdi:book-open-variant",tooling:"mdi:hammer-wrench",ecosystem:"mdi:puzzle",community:"mdi:forum",support:"mdi:heart"})[o]??"mdi:information";return(o,i)=>(c.openBlock(),c.createElementBlock("div",_t,[e.title?(c.openBlock(),c.createElementBlock("h2",Lt,c.toDisplayString(e.title),1)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.items,(n,s)=>(c.openBlock(),c.createBlock(V,{key:s,icon:t(n.icon),heading:n.heading},{default:c.withCtx(()=>[Array.isArray(n.content)?(c.openBlock(),c.createElementBlock("div",jt,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.content,(r,l)=>(c.openBlock(),c.createElementBlock("p",{key:l,innerHTML:r},null,8,Pt))),128))])):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:n.content},null,8,Ft))]),_:2},1032,["icon","heading"]))),128))]))}}),[["__scopeId","data-v-95e350f3"]]),Ot=[$,Y,V],we={install:e=>{Ot.forEach(t=>{const o=t.name||t.__name||"UnknownComponent";e.component(o,t)})},HelloWorld:$,TheWelcome:Y,WelcomeItem:V};typeof window<"u"&&window.Vue&&window.Vue.use(we),w.HelloWorld=$,w.TheWelcome=Y,w.WelcomeItem=V,w.default=we,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bricks-ui-library",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A Vue 3 component library for developing pure display components that receive data through props and render it within the components.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/bricks-ui-library.umd.cjs",
|
|
8
|
+
"module": "./dist/bricks-ui-library.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/bricks-ui-library.js",
|
|
12
|
+
"require": "./dist/bricks-ui-library.umd.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./dist/style.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
22
|
+
"build-lib": "vite build --mode lib",
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"build-only": "vite build",
|
|
25
|
+
"type-check": "vue-tsc --build",
|
|
26
|
+
"prepublishOnly": "npm run build-lib"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"vue",
|
|
30
|
+
"component",
|
|
31
|
+
"ui",
|
|
32
|
+
"library",
|
|
33
|
+
"display",
|
|
34
|
+
"props"
|
|
35
|
+
],
|
|
36
|
+
"author": "Your Name",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org/"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@iconify/vue": "^4.1.2",
|
|
47
|
+
"vue": "^3.5.26"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@tsconfig/node24": "^24.0.3",
|
|
51
|
+
"@types/node": "^24.10.4",
|
|
52
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
53
|
+
"@vue/tsconfig": "^0.8.1",
|
|
54
|
+
"npm-run-all2": "^8.0.4",
|
|
55
|
+
"typescript": "~5.9.3",
|
|
56
|
+
"vite": "^7.3.0",
|
|
57
|
+
"vite-plugin-vue-devtools": "^8.0.5",
|
|
58
|
+
"vue-tsc": "^3.2.1"
|
|
59
|
+
}
|
|
60
|
+
}
|