@fluid-topics/ft-icon 1.0.0-alpha.1 → 1.0.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/build/ft-icon.css.js +1 -0
- package/build/ft-icon.js +1 -1
- package/build/ft-icon.light.js +2 -1
- package/build/ft-icon.min.js +5 -4
- package/package.json +3 -3
package/build/ft-icon.css.js
CHANGED
package/build/ft-icon.js
CHANGED
|
@@ -20,7 +20,7 @@ class FtIcon extends FtLitElement {
|
|
|
20
20
|
const variant = this.variant && Object.values(FtIconVariants).includes(this.variant) ? this.variant : FtIconVariants.fluid_topics;
|
|
21
21
|
const slotHidden = variant !== FtIconVariants.material || !!this.value;
|
|
22
22
|
return html `
|
|
23
|
-
<i class="ft-icon
|
|
23
|
+
<i class="ft-icon ft-icon--${variant}" part="icon icon-${variant}">
|
|
24
24
|
${unsafeHTML(this.resolvedIcon)}
|
|
25
25
|
<slot ?hidden=${slotHidden}></slot>
|
|
26
26
|
</i>
|
package/build/ft-icon.light.js
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
/* Ugly fix because font is broken */
|
|
35
35
|
font-size: calc(0.75 * ${s.size});
|
|
36
|
+
line-height: ${s.size};
|
|
36
37
|
position: relative;
|
|
37
38
|
top: -4%;
|
|
38
39
|
justify-content: center;
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
font-family: ${s.materialFontFamily}, "Material Icons", sans-serif;
|
|
47
48
|
}
|
|
48
49
|
`;var m;e.FtIconVariants=void 0,(m=e.FtIconVariants||(e.FtIconVariants={})).fluid_topics="fluid-topics",m.file_format="file-format",m.material="material";var f=function(e,t,a,i){for(var o,x=arguments.length,n=x<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i,p=e.length-1;p>=0;p--)(o=e[p])&&(n=(x<3?o(n):x>3?o(t,a,n):o(t,a))||n);return x>3&&n&&Object.defineProperty(t,a,n),n};class d extends t.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=a.nothing}render(){const t=this.variant&&Object.values(e.FtIconVariants).includes(this.variant)?this.variant:e.FtIconVariants.fluid_topics,i=t!==e.FtIconVariants.material||!!this.value;return a.html`
|
|
49
|
-
<i class="ft-icon
|
|
50
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
50
51
|
${o.unsafeHTML(this.resolvedIcon)}
|
|
51
52
|
<slot ?hidden=${i}></slot>
|
|
52
53
|
</i>
|
package/build/ft-icon.min.js
CHANGED
|
@@ -47,7 +47,7 @@ const r=window,a=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"
|
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
49
|
*/
|
|
50
|
-
var E;N.finalized=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:N}),(null!==(x=v.reactiveElementVersions)&&void 0!==x?x:v.reactiveElementVersions=[]).push("1.6.1");const
|
|
50
|
+
var E;N.finalized=!0,N.elementProperties=new Map,N.elementStyles=[],N.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:N}),(null!==(x=v.reactiveElementVersions)&&void 0!==x?x:v.reactiveElementVersions=[]).push("1.6.1");const $=window,C=$.trustedTypes,R=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",M=`lit$${(Math.random()+"").slice(9)}$`,k="?"+M,U=`<${k}>`,j=document,F=()=>j.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,L=Array.isArray,_="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,W=/>/g,z=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,I=/"/g,D=/^(?:script|style|textarea|title)$/i,H=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),P=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),J=new WeakMap,V=j.createTreeWalker(j,129,null,!1),q=(t,e)=>{const i=t.length-1,s=[];let o,n=2===e?"<svg>":"",r=T;for(let e=0;e<i;e++){const i=t[e];let a,l,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,l=r.exec(i),null!==l);)h=r.lastIndex,r===T?"!--"===l[1]?r=B:void 0!==l[1]?r=W:void 0!==l[2]?(D.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=z):void 0!==l[3]&&(r=z):r===z?">"===l[0]?(r=null!=o?o:T,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?z:'"'===l[3]?I:K):r===I||r===K?r=z:r===B||r===W?r=T:(r=z,o=void 0);const p=r===z&&t[e+1].startsWith("/>")?" ":"";n+=r===T?i+U:c>=0?(s.push(a),i.slice(0,c)+S+i.slice(c)+M+p):i+M+(-2===c?(s.push(void 0),e):p)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==R?R.createHTML(a):a,s]};class X{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const r=t.length-1,a=this.parts,[l,c]=q(t,e);if(this.el=X.createElement(l,i),V.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=V.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(S)||e.startsWith(M)){const i=c[n++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+S).split(M),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?et:"?"===e[1]?st:"@"===e[1]?ot:tt})}else a.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(D.test(s.tagName)){const t=s.textContent.split(M),e=t.length-1;if(e>0){s.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],F()),V.nextNode(),a.push({type:2,index:++o});s.append(t[e],F())}}}else if(8===s.nodeType)if(s.data===k)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(M,t+1));)a.push({type:7,index:o}),t+=M.length-1}o++}}static createElement(t,e){const i=j.createElement("template");return i.innerHTML=t,i}}function G(t,e,i=t,s){var o,n,r,a;if(e===P)return e;let l=void 0!==s?null===(o=i._$Co)||void 0===o?void 0:o[s]:i._$Cl;const c=A(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,i,s)),void 0!==s?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[s]=l:i._$Cl=l),void 0!==l&&(e=G(t,l._$AS(t,e.values),l,s)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:j).importNode(i,!0);V.currentNode=o;let n=V.nextNode(),r=0,a=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Y(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new nt(n,this,t)),this._$AV.push(e),l=s[++a]}r!==(null==l?void 0:l.index)&&(n=V.nextNode(),r++)}return o}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{constructor(t,e,i,s){var o;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),A(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==P&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>L(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&A(this._$AH)?this._$AA.nextSibling.data=t:this.$(j.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=X.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(i);else{const t=new Q(o,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=J.get(t.strings);return void 0===e&&J.set(t.strings,e=new X(t)),e}T(t){L(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Y(this.k(F()),this.k(F()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class tt{constructor(t,e,i,s,o){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let n=!1;if(void 0===o)t=G(this,t,e,0),n=!A(t)||t!==this._$AH&&t!==P,n&&(this._$AH=t);else{const s=t;let r,a;for(t=o[0],r=0;r<o.length-1;r++)a=G(this,s[i+r],e,r),a===P&&(a=this._$AH[r]),n||(n=!A(a)||a!==this._$AH[r]),a===Z?t=Z:t!==Z&&(t+=(null!=a?a:"")+o[r+1]),this._$AH[r]=a}n&&!s&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const it=C?C.emptyScript:"";class st extends tt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,it):this.element.removeAttribute(this.name)}}class ot extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=G(this,t,e,0))&&void 0!==i?i:Z)===P)return;const s=this._$AH,o=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Z&&(s===Z||o);o&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const rt=$.litHtmlPolyfillSupport;null==rt||rt(X,Y),(null!==(E=$.litHtmlVersions)&&void 0!==E?E:$.litHtmlVersions=[]).push("2.7.3");
|
|
51
51
|
/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
@@ -96,7 +96,7 @@ const yt=2;class Ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
96
96
|
* @license
|
|
97
97
|
* Copyright 2017 Google LLC
|
|
98
98
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
99
|
-
*/class Nt extends Ot{constructor(t){if(super(t),this.et=Z,t.type!==yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||null==t)return this.ft=void 0,this.et=t;if(t===P)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Nt.directiveName="unsafeHTML",Nt.resultType=1;const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(Nt);var Ct
|
|
99
|
+
*/class Nt extends Ot{constructor(t){if(super(t),this.et=Z,t.type!==yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||null==t)return this.ft=void 0,this.et=t;if(t===P)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Nt.directiveName="unsafeHTML",Nt.resultType=1;const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(Nt);var $t,Ct;t.FtIcons=void 0,($t=t.FtIcons||(t.FtIcons={})).THUMBS_DOWN="",$t.THUMBS_DOWN_PLAIN="",$t.THUMBS_UP="",$t.THUMBS_UP_PLAIN="",$t.STAR="",$t.STAR_PLAIN="",$t.DESKTOP="",$t.TABLET_LANDSCAPE="",$t.TABLET_PORTRAIT="",$t.MOBILE_LANDSCAPE="",$t.MOBILE_PORTRAIT="",$t.ARROW_RIGHT_TO_LINE="",$t.THIN_ARROW_UP="",$t.CONTEXTUAL="",$t.UNSTRUCTURED_DOC="",$t.RESET="",$t.THIN_ARROW_LEFT="",$t.THIN_ARROW_RIGHT="",$t.MY_COLLECTIONS="",$t.OFFLINE_SETTINGS="",$t.MY_LIBRARY="",$t.RATE_PLAIN="",$t.RATE="",$t.FEEDBACK_PLAIN="",$t.PAUSE="",$t.PLAY="",$t.RELATIVES_PLAIN="",$t.RELATIVES="",$t.SHORTCUT_MENU="",$t.PRINT="",$t.DEFAULT_ROLES="",$t.ACCOUNT_SETTINGS="",$t.ONLINE="",$t.OFFLINE="",$t.UPLOAD="",$t.BOOK_PLAIN="",$t.SYNC="",$t.SHARED_PBK="",$t.COLLECTIONS="",$t.SEARCH_IN_PUBLICATION="",$t.BOOKS="",$t.LOCKER="",$t.ARROW_DOWN="",$t.ARROW_LEFT="",$t.ARROW_RIGHT="",$t.ARROW_UP="",$t.SAVE="",$t.MAILS_AND_NOTIFICATIONS="",$t.DOT="",$t.MINUS="",$t.PLUS="",$t.FILTERS="",$t.STRIPE_ARROW_RIGHT="",$t.STRIPE_ARROW_LEFT="",$t.ATTACHMENTS="",$t.ADD_BOOKMARK="",$t.BOOKMARK="",$t.EXPORT="",$t.MENU="",$t.TAG="",$t.TAG_PLAIN="",$t.COPY_TO_CLIPBOARD="",$t.COLUMNS="",$t.ARTICLE="",$t.CLOSE_PLAIN="",$t.CHECK_PLAIN="",$t.LOGOUT="",$t.SIGN_IN="",$t.THIN_ARROW="",$t.TRIANGLE_BOTTOM="",$t.TRIANGLE_LEFT="",$t.TRIANGLE_RIGHT="",$t.TRIANGLE_TOP="",$t.FACET_HAS_DESCENDANT="",$t.MINUS_PLAIN="",$t.PLUS_PLAIN="",$t.INFO="",$t.ICON_EXPAND="",$t.ICON_COLLAPSE="",$t.ADD_TO_PBK="",$t.ALERT="",$t.ADD_ALERT="",$t.BACK_TO_SEARCH="",$t.DOWNLOAD="",$t.EDIT="",$t.FEEDBACK="",$t.MODIFY_PBK="",$t.SCHEDULED="",$t.SEARCH="",$t.SHARE="󨃱",$t.TOC="",$t.WRITE_UGC="",$t.TRASH="",$t.EXTLINK="",$t.CALENDAR="",$t.BOOK="",$t.DOWNLOAD_PLAIN="",$t.CHECK="",$t.TOPICS="",$t.EYE="",$t.DISC="",$t.CIRCLE="",$t.SHARED="",$t.SORT_UNSORTED="",$t.SORT_UP="",$t.SORT_DOWN="",$t.WORKING="",$t.CLOSE="",$t.ZOOM_OUT="",$t.ZOOM_IN="",$t.ZOOM_REALSIZE="",$t.ZOOM_FULLSCREEN="",$t.ADMIN_RESTRICTED="",$t.ADMIN_THEME="",$t.WARNING="",$t.CONTEXT="",$t.SEARCH_HOME="",$t.STEPS="",$t.HOME="",$t.TRANSLATE="",$t.USER="",$t.ADMIN="",$t.ANALYTICS="",$t.ADMIN_KHUB="",$t.ADMIN_USERS="",$t.ADMIN_INTEGRATION="",$t.ADMIN_PORTAL="",t.FtFileFormatIcons=void 0,(Ct=t.FtFileFormatIcons||(t.FtFileFormatIcons={})).UNKNOWN="",Ct.ABW="",Ct.AUDIO="",Ct.AVI="",Ct.CHM="",Ct.CODE="",Ct.CSV="",Ct.DITA="",Ct.EPUB="",Ct.EXCEL="",Ct.FLAC="",Ct.GIF="",Ct.GZIP="",Ct.HTML="",Ct.IMAGE="",Ct.JPEG="",Ct.JSON="",Ct.M4A="",Ct.MOV="",Ct.MP3="",Ct.MP4="",Ct.OGG="",Ct.PDF="",Ct.PNG="",Ct.POWERPOINT="",Ct.RAR="",Ct.STP="",Ct.TEXT="",Ct.VIDEO="",Ct.WAV="",Ct.WMA="",Ct.WORD="",Ct.XML="",Ct.YAML="",Ct.ZIP="";const Rt=new Map([...["abw"].map((e=>[e,t.FtFileFormatIcons.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((e=>[e,t.FtFileFormatIcons.AUDIO])),...["avi"].map((e=>[e,t.FtFileFormatIcons.AVI])),...["chm","xhs"].map((e=>[e,t.FtFileFormatIcons.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((e=>[e,t.FtFileFormatIcons.CODE])),...["csv"].map((e=>[e,t.FtFileFormatIcons.CSV])),...["dita","ditamap","ditaval"].map((e=>[e,t.FtFileFormatIcons.DITA])),...["epub"].map((e=>[e,t.FtFileFormatIcons.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((e=>[e,t.FtFileFormatIcons.EXCEL])),...["flac"].map((e=>[e,t.FtFileFormatIcons.FLAC])),...["gif"].map((e=>[e,t.FtFileFormatIcons.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((e=>[e,t.FtFileFormatIcons.GZIP])),...["html","htm","xhtml"].map((e=>[e,t.FtFileFormatIcons.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((e=>[e,t.FtFileFormatIcons.IMAGE])),...["jpeg","jpg","jpe"].map((e=>[e,t.FtFileFormatIcons.JPEG])),...["json"].map((e=>[e,t.FtFileFormatIcons.JSON])),...["m4a","m4p"].map((e=>[e,t.FtFileFormatIcons.M4A])),...["mov","qt"].map((e=>[e,t.FtFileFormatIcons.MOV])),...["mp3"].map((e=>[e,t.FtFileFormatIcons.MP3])),...["mp4","m4v"].map((e=>[e,t.FtFileFormatIcons.MP4])),...["ogg","oga"].map((e=>[e,t.FtFileFormatIcons.OGG])),...["pdf","ps"].map((e=>[e,t.FtFileFormatIcons.PDF])),...["png"].map((e=>[e,t.FtFileFormatIcons.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((e=>[e,t.FtFileFormatIcons.POWERPOINT])),...["rar"].map((e=>[e,t.FtFileFormatIcons.RAR])),...["stp"].map((e=>[e,t.FtFileFormatIcons.STP])),...["txt","rtf","md","mdown"].map((e=>[e,t.FtFileFormatIcons.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((e=>[e,t.FtFileFormatIcons.VIDEO])),...["wav"].map((e=>[e,t.FtFileFormatIcons.WAV])),...["wma"].map((e=>[e,t.FtFileFormatIcons.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((e=>[e,t.FtFileFormatIcons.WORD])),...["xml","xsl","rdf"].map((e=>[e,t.FtFileFormatIcons.XML])),...["yaml","yml","x-yaml"].map((e=>[e,t.FtFileFormatIcons.YAML])),...["zip"].map((e=>[e,t.FtFileFormatIcons.ZIP]))]),St=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const Mt={size:pt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:pt.extend("--ft-icon-fluid-topics-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:pt.extend("--ft-icon-file-format-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:pt.extend("--ft-icon-material-font-family",pt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:pt.create("--ft-icon-vertical-align","UNKNOWN","unset")},kt=d`
|
|
100
100
|
:host, i.ft-icon {
|
|
101
101
|
display: inline-flex;
|
|
102
102
|
align-items: center;
|
|
@@ -131,6 +131,7 @@ const yt=2;class Ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
131
131
|
|
|
132
132
|
/* Ugly fix because font is broken */
|
|
133
133
|
font-size: calc(0.75 * ${Mt.size});
|
|
134
|
+
line-height: ${Mt.size};
|
|
134
135
|
position: relative;
|
|
135
136
|
top: -4%;
|
|
136
137
|
justify-content: center;
|
|
@@ -144,7 +145,7 @@ const yt=2;class Ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
144
145
|
font-family: ${Mt.materialFontFamily}, "Material Icons", sans-serif;
|
|
145
146
|
}
|
|
146
147
|
`;var Ut;t.FtIconVariants=void 0,(Ut=t.FtIconVariants||(t.FtIconVariants={})).fluid_topics="fluid-topics",Ut.file_format="file-format",Ut.material="material";var jt,Ft=function(t,e,i,s){for(var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class At extends bt{constructor(){super(...arguments),this.resolvedIcon=Z}render(){const e=this.variant&&Object.values(t.FtIconVariants).includes(this.variant)?this.variant:t.FtIconVariants.fluid_topics,i=e!==t.FtIconVariants.material||!!this.value;return H`
|
|
147
|
-
<i class="ft-icon
|
|
148
|
+
<i class="ft-icon ft-icon--${e}" part="icon icon-${e}">
|
|
148
149
|
${Et(this.resolvedIcon)}
|
|
149
150
|
<slot ?hidden=${i}></slot>
|
|
150
151
|
</i>
|
|
@@ -159,4 +160,4 @@ const yt=2;class Ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
159
160
|
* Copyright 2017 Google LLC
|
|
160
161
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
161
162
|
*/
|
|
162
|
-
function(t,e){return(({finisher:t,descriptor:e})=>(i,s)=>{var o;if(void 0===s){const s=null!==(o=i.originalKey)&&void 0!==o?o:i.key,n=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(n.finisher=function(e){t(e,s)}),n}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(o,s)}})({descriptor:i=>{const s={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i,s;return void 0===this[e]&&(this[e]=null!==(s=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==s?s:null),this[e]}}return s}})}("slot")],At.prototype,"slottedContent",void 0),(jt="ft-icon",t=>{window.customElements.get(jt)||window.customElements.define(jt,t)})(At),t.FtIcon=At,t.FtIconCssVariables=Mt,t.resolveFileFormatIcon=function(e,i){var s,o,n,r;e=(null!=e?e:"").toLowerCase(),i=(null!=i?i:"").toLowerCase();const[a,l]=((null!==(s=St.get(e))&&void 0!==s?s:e)+"/").split("/");return null!==(r=null!==(n=null!==(o
|
|
163
|
+
function(t,e){return(({finisher:t,descriptor:e})=>(i,s)=>{var o;if(void 0===s){const s=null!==(o=i.originalKey)&&void 0!==o?o:i.key,n=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(n.finisher=function(e){t(e,s)}),n}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(o,s)}})({descriptor:i=>{const s={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i,s;return void 0===this[e]&&(this[e]=null!==(s=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==s?s:null),this[e]}}return s}})}("slot")],At.prototype,"slottedContent",void 0),(jt="ft-icon",t=>{window.customElements.get(jt)||window.customElements.define(jt,t)})(At),t.FtIcon=At,t.FtIconCssVariables=Mt,t.resolveFileFormatIcon=function(e,i){var s,o,n,r;e=(null!=e?e:"").toLowerCase(),i=(null!=i?i:"").toLowerCase();const[a,l]=((null!==(s=St.get(e))&&void 0!==s?s:e)+"/").split("/");return null!==(r=null!==(n=null!==(o=Rt.get(l))&&void 0!==o?o:Rt.get(i))&&void 0!==n?n:Rt.get(a))&&void 0!==r?r:t.FtFileFormatIcons.UNKNOWN},t.styles=kt}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-icon",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Typography components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.0.0
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.0.0",
|
|
23
23
|
"lit": "2.7.2"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "90895771e0ea740f1a0d972b9fd3796051757255"
|
|
26
26
|
}
|