@fluid-topics/ft-icon 0.1.6 → 0.1.7
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.light.js +41 -0
- package/build/ft-icon.min.js +15 -1
- package/package.json +3 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
!function(e,t,a,o,x){var i,p;e.FtIcons=void 0,(i=e.FtIcons||(e.FtIcons={})).THIN_ARROW_LEFT="",i.THIN_ARROW_RIGHT="",i.MY_COLLECTIONS="",i.OFFLINE_SETTINGS="",i.MY_LIBRARY="",i.RATE_PLAIN="",i.RATE="",i.FEEDBACK_PLAIN="",i.STAR_PLAIN="",i.STAR="",i.THUMBS_DOWN_PLAIN="",i.THUMBS_DOWN="",i.THUMBS_UP_PLAIN="",i.THUMBS_UP="",i.PAUSE="",i.PLAY="",i.RELATIVES_PLAIN="",i.RELATIVES="",i.SHORTCUT_MENU="",i.PRINT="",i.DEFAULT_ROLES="",i.ACCOUNT_SETTINGS="",i.ONLINE="",i.OFFLINE="",i.UPLOAD="",i.BOOK_PLAIN="",i.SYNC="",i.SHARED_PBK="",i.COLLECTIONS="",i.SEARCH_IN_PUBLICATION="",i.BOOKS="",i.LOCKER="",i.ARROW_DOWN="",i.ARROW_LEFT="",i.ARROW_RIGHT="",i.ARROW_UP="",i.SAVE="",i.MAILS_AND_NOTIFICATIONS="",i.DOT="",i.MINUS="",i.PLUS="",i.FILTERS="",i.STRIPE_ARROW_RIGHT="",i.STRIPE_ARROW_LEFT="",i.ATTACHMENTS="",i.ADD_BOOKMARK="",i.BOOKMARK="",i.EXPORT="",i.MENU="",i.TAG="",i.TAG_PLAIN="",i.COPY_TO_CLIPBOARD="",i.COLUMNS="",i.ARTICLE="",i.CLOSE_PLAIN="",i.CHECK_PLAIN="",i.LOGOUT="",i.SIGN_IN="",i.THIN_ARROW="",i.TRIANGLE_BOTTOM="",i.TRIANGLE_LEFT="",i.TRIANGLE_RIGHT="",i.TRIANGLE_TOP="",i.FACET_HAS_DESCENDANT="",i.MINUS_PLAIN="",i.PLUS_PLAIN="",i.INFO="",i.ICON_EXPAND="",i.ICON_COLLAPSE="",i.ADD_TO_PBK="",i.ALERT="",i.ADD_ALERT="",i.BACK_TO_SEARCH="",i.DOWNLOAD="",i.EDIT="",i.FEEDBACK="",i.MODIFY_PBK="",i.SCHEDULED="",i.SEARCH="",i.SHARE="󨃱",i.TOC="",i.WRITE_UGC="",i.TRASH="",i.EXTLINK="",i.CALENDAR="",i.BOOK="",i.DOWNLOAD_PLAIN="",i.CHECK="",i.TOPICS="",i.EYE="\f06e",i.DISC="",i.CIRCLE="",i.SHARED="",i.SORT_UNSORTED="",i.SORT_UP="",i.SORT_DOWN="",i.WORKING="",i.CLOSE="",i.ZOOM_OUT="",i.ZOOM_IN="",i.ZOOM_REALSIZE="",i.ZOOM_FULLSCREEN="",i.ADMIN_RESTRICTED="",i.ADMIN_THEME="",i.WARNING="",i.CONTEXT="",i.SEARCH_HOME="",i.STEPS="",i.HOME="",i.TRANSLATE="",i.USER="",i.ADMIN="",i.ANALYTICS="",i.ADMIN_KHUB="",i.ADMIN_USERS="",i.ADMIN_INTEGRATION="",i.ADMIN_PORTAL="",e.FtFileFormatIcons=void 0,(p=e.FtFileFormatIcons||(e.FtFileFormatIcons={})).UNKNOWN="",p.ABW="",p.AUDIO="",p.AVI="",p.CHM="",p.CODE="",p.CSV="",p.DITA="",p.EPUB="",p.EXCEL="",p.FLAC="",p.GIF="",p.GZIP="",p.HTML="",p.IMAGE="",p.JPEG="",p.JSON="",p.M4A="",p.MOV="",p.MP3="",p.MP4="",p.OGG="",p.PDF="",p.PNG="",p.POWERPOINT="",p.RAR="",p.STP="",p.TEXT="",p.VIDEO="",p.WAV="",p.WMA="",p.WORD="",p.XML="",p.YAML="",p.ZIP="";const n=new Map([...["abw"].map((t=>[t,e.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((t=>[t,e.FtFileFormatIcons.AUDIO])),...["avi"].map((t=>[t,e.FtFileFormatIcons.AVI])),...["chm","xhs"].map((t=>[t,e.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((t=>[t,e.FtFileFormatIcons.CODE])),...["csv"].map((t=>[t,e.FtFileFormatIcons.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,e.FtFileFormatIcons.DITA])),...["epub"].map((t=>[t,e.FtFileFormatIcons.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,e.FtFileFormatIcons.EXCEL])),...["flac"].map((t=>[t,e.FtFileFormatIcons.FLAC])),...["gif"].map((t=>[t,e.FtFileFormatIcons.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,e.FtFileFormatIcons.GZIP])),...["html","htm","xhtml"].map((t=>[t,e.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((t=>[t,e.FtFileFormatIcons.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,e.FtFileFormatIcons.JPEG])),...["json"].map((t=>[t,e.FtFileFormatIcons.JSON])),...["m4a","m4p"].map((t=>[t,e.FtFileFormatIcons.M4A])),...["mov","qt"].map((t=>[t,e.FtFileFormatIcons.MOV])),...["mp3"].map((t=>[t,e.FtFileFormatIcons.MP3])),...["mp4","m4v"].map((t=>[t,e.FtFileFormatIcons.MP4])),...["ogg","oga"].map((t=>[t,e.FtFileFormatIcons.OGG])),...["pdf","ps"].map((t=>[t,e.FtFileFormatIcons.PDF])),...["png"].map((t=>[t,e.FtFileFormatIcons.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,e.FtFileFormatIcons.POWERPOINT])),...["rar"].map((t=>[t,e.FtFileFormatIcons.RAR])),...["stp"].map((t=>[t,e.FtFileFormatIcons.STP])),...["txt","rtf","md","mdown"].map((t=>[t,e.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((t=>[t,e.FtFileFormatIcons.VIDEO])),...["wav"].map((t=>[t,e.FtFileFormatIcons.WAV])),...["wma"].map((t=>[t,e.FtFileFormatIcons.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,e.FtFileFormatIcons.WORD])),...["xml","xsl","rdf"].map((t=>[t,e.FtFileFormatIcons.XML])),...["yaml","yml","x-yaml"].map((t=>[t,e.FtFileFormatIcons.YAML])),...["zip"].map((t=>[t,e.FtFileFormatIcons.ZIP]))]),l=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"]]);var s,m=function(e,t,a,o){for(var x,i=arguments.length,p=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o,n=e.length-1;n>=0;n--)(x=e[n])&&(p=(i<3?x(p):i>3?x(t,a,p):x(t,a))||p);return i>3&&p&&Object.defineProperty(t,a,p),p};e.FtIconVariants=void 0,(s=e.FtIconVariants||(e.FtIconVariants={})).fluid_topics="fluid-topics",s.file_format="file-format";const c={size:o.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:o.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",o.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:o.FtCssVariable.extend("--ft-icon-file-format-font-family",o.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime"))},d=t.css`
|
|
2
|
+
.ft-icon--fluid-topics {
|
|
3
|
+
font-family: ${c.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
4
|
+
font-size: ${c.size};
|
|
5
|
+
line-height: 1;
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
text-transform: none;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-variant: normal;
|
|
10
|
+
speak: none;
|
|
11
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
12
|
+
text-rendering: auto;
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
}
|
|
16
|
+
`,f=t.css`
|
|
17
|
+
.ft-icon--file-format {
|
|
18
|
+
font-family: ${c.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
19
|
+
font-size: ${c.size};
|
|
20
|
+
line-height: 1;
|
|
21
|
+
font-weight: normal;
|
|
22
|
+
text-transform: none;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-variant: normal;
|
|
25
|
+
speak: none;
|
|
26
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
27
|
+
text-rendering: auto;
|
|
28
|
+
-webkit-font-smoothing: antialiased;
|
|
29
|
+
-moz-osx-font-smoothing: grayscale;
|
|
30
|
+
}
|
|
31
|
+
`;e.FtIcon=class extends o.FtLitElement{constructor(){super(...arguments),this.variant=e.FtIconVariants.fluid_topics}getStyles(){return[d,f,t.css`
|
|
32
|
+
:host, i.ft-icon {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
width: ${c.size};
|
|
35
|
+
height: ${c.size};
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
`]}getTemplate(){return t.html`
|
|
39
|
+
<slot @slotchange=${()=>this.requestUpdate()} hidden></slot>
|
|
40
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">${x.unsafeHTML(this.getIcon())}</i>
|
|
41
|
+
`}get textContent(){var e,t;return null!==(t=null===(e=this.slottedContent)||void 0===e?void 0:e.assignedNodes().map((e=>e.textContent)).join("").trim())&&void 0!==t?t:""}getIcon(){var t,a;return this.variant===e.FtIconVariants.file_format?null!==(t=e.FtFileFormatIcons[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(a=e.FtIcons[this.textContent.toUpperCase()])&&void 0!==a?a:this.textContent}},e.FtIcon.elementDefinitions={},m([a.property()],e.FtIcon.prototype,"variant",void 0),m([a.query("slot")],e.FtIcon.prototype,"slottedContent",void 0),e.FtIcon=m([o.customElement("ft-icon")],e.FtIcon),e.FtIconCssVariables=c,e.FtIconFileFormat=f,e.FtIconFluidTopics=d,e.resolveFileFormatIcon=function(t,a){var o,x,i,p;t=(null!=t?t:"").toLowerCase(),a=(null!=a?a:"").toLowerCase();const[s,m]=((null!==(o=l.get(t))&&void 0!==o?o:t)+"/").split("/");return null!==(p=null!==(i=null!==(x=n.get(m))&&void 0!==x?x:n.get(a))&&void 0!==i?i:n.get(s))&&void 0!==p?p:e.FtFileFormatIcons.UNKNOWN},Object.defineProperty(e,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.wcUtils,ftGlobals.litUnsafeHTML);
|
package/build/ft-icon.min.js
CHANGED
|
@@ -39,7 +39,21 @@ var it;null===(it=window.HTMLSlotElement)||void 0===it||it.prototype.assignedEle
|
|
|
39
39
|
* Copyright 2021 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return a(o,this.constructor.elementStyles),o}}}(Y)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),A
|
|
42
|
+
function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:n}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...n,customElements:t.registry});return a(o,this.constructor.elementStyles),o}}}(Y)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),A`
|
|
43
|
+
${t.map((t=>A`
|
|
44
|
+
<style>${t}</style>
|
|
45
|
+
`))}
|
|
46
|
+
${this.getTemplate()}
|
|
47
|
+
`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}var st,rt;r`
|
|
48
|
+
.ft-no-text-select {
|
|
49
|
+
-webkit-touch-callout: none;
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
-khtml-user-select: none;
|
|
52
|
+
-moz-user-select: none;
|
|
53
|
+
-ms-user-select: none;
|
|
54
|
+
user-select: none;
|
|
55
|
+
}
|
|
56
|
+
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(rt=null===(st=window.safari)||void 0===st?void 0:st.pushNotification)||void 0===rt||rt.toString());
|
|
43
57
|
/**
|
|
44
58
|
* @license
|
|
45
59
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-icon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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": "^0.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "^0.1.7",
|
|
23
23
|
"lit": "^2.0.2"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "78397cca67971191c46739cfb6c87481aaa65745"
|
|
26
26
|
}
|