@fluid-topics/ft-icon 0.3.12 → 0.3.13
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.d.ts +9 -0
- package/build/ft-icon.css.js +49 -0
- package/build/ft-icon.d.ts +1 -15
- package/build/ft-icon.js +5 -53
- package/build/ft-icon.light.js +38 -38
- package/build/ft-icon.min.js +40 -40
- package/build/ft-icon.properties.d.ts +10 -0
- package/build/ft-icon.properties.js +7 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FtIconCssVariables: {
|
|
2
|
+
size: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
fluidTopicsFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
fileFormatFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
materialFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
verticalAlign: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
};
|
|
8
|
+
export declare const styles: import("lit").CSSResult;
|
|
9
|
+
//# sourceMappingURL=ft-icon.css.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
export const FtIconCssVariables = {
|
|
4
|
+
size: FtCssVariableFactory.create("--ft-icon-font-size", "SIZE", "24px"),
|
|
5
|
+
fluidTopicsFontFamily: FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "ft-icons")),
|
|
6
|
+
fileFormatFontFamily: FtCssVariableFactory.extend("--ft-icon-file-format-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "ft-mime")),
|
|
7
|
+
materialFontFamily: FtCssVariableFactory.extend("--ft-icon-material-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "Material Icons")),
|
|
8
|
+
verticalAlign: FtCssVariableFactory.create("--ft-icon-vertical-align", "UNKNOWN", "unset"),
|
|
9
|
+
};
|
|
10
|
+
//language=css
|
|
11
|
+
export const styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host, i.ft-icon {
|
|
17
|
+
width: ${FtIconCssVariables.size};
|
|
18
|
+
height: ${FtIconCssVariables.size};
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
i.ft-icon {
|
|
23
|
+
font-size: ${FtIconCssVariables.size};
|
|
24
|
+
line-height: 1;
|
|
25
|
+
font-weight: normal;
|
|
26
|
+
text-transform: none;
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-variant: normal;
|
|
29
|
+
speak: none;
|
|
30
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
31
|
+
text-rendering: auto;
|
|
32
|
+
-webkit-font-smoothing: antialiased;
|
|
33
|
+
-moz-osx-font-smoothing: grayscale;
|
|
34
|
+
vertical-align: ${FtIconCssVariables.verticalAlign};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ft-icon--fluid-topics {
|
|
38
|
+
font-family: ${FtIconCssVariables.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ft-icon--file-format {
|
|
42
|
+
font-family: ${FtIconCssVariables.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ft-icon--material {
|
|
46
|
+
font-family: ${FtIconCssVariables.materialFontFamily}, "Material Icons", sans-serif;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
//# sourceMappingURL=ft-icon.css.js.map
|
package/build/ft-icon.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
|
|
4
|
-
fluid_topics = "fluid-topics",
|
|
5
|
-
file_format = "file-format",
|
|
6
|
-
material = "material"
|
|
7
|
-
}
|
|
8
|
-
export interface FtIconProperties {
|
|
9
|
-
variant: FtIconVariants;
|
|
10
|
-
}
|
|
11
|
-
export declare const FtIconCssVariables: {
|
|
12
|
-
size: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
-
fluidTopicsFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
-
fileFormatFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
-
materialFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
-
verticalAlign: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
-
};
|
|
3
|
+
import { FtIconProperties, FtIconVariants } from "./ft-icon.properties";
|
|
18
4
|
export declare class FtIcon extends FtLitElement implements FtIconProperties {
|
|
19
5
|
static elementDefinitions: ElementDefinitionsMap;
|
|
20
6
|
static styles: import("lit").CSSResult;
|
package/build/ft-icon.js
CHANGED
|
@@ -4,24 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { property, query, state } from "lit/decorators.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
11
11
|
import { FtFileFormatIcons, FtIcons } from "./icons";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
FtIconVariants["fluid_topics"] = "fluid-topics";
|
|
15
|
-
FtIconVariants["file_format"] = "file-format";
|
|
16
|
-
FtIconVariants["material"] = "material";
|
|
17
|
-
})(FtIconVariants || (FtIconVariants = {}));
|
|
18
|
-
export const FtIconCssVariables = {
|
|
19
|
-
size: FtCssVariableFactory.create("--ft-icon-font-size", "SIZE", "24px"),
|
|
20
|
-
fluidTopicsFontFamily: FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "ft-icons")),
|
|
21
|
-
fileFormatFontFamily: FtCssVariableFactory.extend("--ft-icon-file-format-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "ft-mime")),
|
|
22
|
-
materialFontFamily: FtCssVariableFactory.extend("--ft-icon-material-font-family", FtCssVariableFactory.create("--ft-icon-font-family", "UNKNOWN", "Material Icons")),
|
|
23
|
-
verticalAlign: FtCssVariableFactory.create("--ft-icon-vertical-align", "UNKNOWN", "unset"),
|
|
24
|
-
};
|
|
12
|
+
import { styles } from "./ft-icon.css";
|
|
13
|
+
import { FtIconVariants } from "./ft-icon.properties";
|
|
25
14
|
export class FtIcon extends FtLitElement {
|
|
26
15
|
constructor() {
|
|
27
16
|
super(...arguments);
|
|
@@ -70,44 +59,7 @@ export class FtIcon extends FtLitElement {
|
|
|
70
59
|
}
|
|
71
60
|
FtIcon.elementDefinitions = {};
|
|
72
61
|
//language=css
|
|
73
|
-
FtIcon.styles =
|
|
74
|
-
:host {
|
|
75
|
-
display: inline-block;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:host, i.ft-icon {
|
|
79
|
-
width: ${FtIconCssVariables.size};
|
|
80
|
-
height: ${FtIconCssVariables.size};
|
|
81
|
-
text-align: center;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
i.ft-icon {
|
|
85
|
-
font-size: ${FtIconCssVariables.size};
|
|
86
|
-
line-height: 1;
|
|
87
|
-
font-weight: normal;
|
|
88
|
-
text-transform: none;
|
|
89
|
-
font-style: normal;
|
|
90
|
-
font-variant: normal;
|
|
91
|
-
speak: none;
|
|
92
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
93
|
-
text-rendering: auto;
|
|
94
|
-
-webkit-font-smoothing: antialiased;
|
|
95
|
-
-moz-osx-font-smoothing: grayscale;
|
|
96
|
-
vertical-align: ${FtIconCssVariables.verticalAlign};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ft-icon--fluid-topics {
|
|
100
|
-
font-family: ${FtIconCssVariables.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.ft-icon--file-format {
|
|
104
|
-
font-family: ${FtIconCssVariables.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.ft-icon--material {
|
|
108
|
-
font-family: ${FtIconCssVariables.materialFontFamily}, "Material Icons", sans-serif;
|
|
109
|
-
}
|
|
110
|
-
`;
|
|
62
|
+
FtIcon.styles = styles;
|
|
111
63
|
__decorate([
|
|
112
64
|
property()
|
|
113
65
|
], FtIcon.prototype, "variant", void 0);
|
package/build/ft-icon.light.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
!function(e,t,a,i,o){var x,p;e.FtIcons=void 0,(x=e.FtIcons||(e.FtIcons={})).THIN_ARROW_LEFT="",x.THIN_ARROW_RIGHT="",x.MY_COLLECTIONS="",x.OFFLINE_SETTINGS="",x.MY_LIBRARY="",x.RATE_PLAIN="",x.RATE="",x.FEEDBACK_PLAIN="",x.STAR_PLAIN="",x.STAR="",x.THUMBS_DOWN_PLAIN="",x.THUMBS_DOWN="",x.THUMBS_UP_PLAIN="",x.THUMBS_UP="",x.PAUSE="",x.PLAY="",x.RELATIVES_PLAIN="",x.RELATIVES="",x.SHORTCUT_MENU="",x.PRINT="",x.DEFAULT_ROLES="",x.ACCOUNT_SETTINGS="",x.ONLINE="",x.OFFLINE="",x.UPLOAD="",x.BOOK_PLAIN="",x.SYNC="",x.SHARED_PBK="",x.COLLECTIONS="",x.SEARCH_IN_PUBLICATION="",x.BOOKS="",x.LOCKER="",x.ARROW_DOWN="",x.ARROW_LEFT="",x.ARROW_RIGHT="",x.ARROW_UP="",x.SAVE="",x.MAILS_AND_NOTIFICATIONS="",x.DOT="",x.MINUS="",x.PLUS="",x.FILTERS="",x.STRIPE_ARROW_RIGHT="",x.STRIPE_ARROW_LEFT="",x.ATTACHMENTS="",x.ADD_BOOKMARK="",x.BOOKMARK="",x.EXPORT="",x.MENU="",x.TAG="",x.TAG_PLAIN="",x.COPY_TO_CLIPBOARD="",x.COLUMNS="",x.ARTICLE="",x.CLOSE_PLAIN="",x.CHECK_PLAIN="",x.LOGOUT="",x.SIGN_IN="",x.THIN_ARROW="",x.TRIANGLE_BOTTOM="",x.TRIANGLE_LEFT="",x.TRIANGLE_RIGHT="",x.TRIANGLE_TOP="",x.FACET_HAS_DESCENDANT="",x.MINUS_PLAIN="",x.PLUS_PLAIN="",x.INFO="",x.ICON_EXPAND="",x.ICON_COLLAPSE="",x.ADD_TO_PBK="",x.ALERT="",x.ADD_ALERT="",x.BACK_TO_SEARCH="",x.DOWNLOAD="",x.EDIT="",x.FEEDBACK="",x.MODIFY_PBK="",x.SCHEDULED="",x.SEARCH="",x.SHARE="󨃱",x.TOC="",x.WRITE_UGC="",x.TRASH="",x.EXTLINK="",x.CALENDAR="",x.BOOK="",x.DOWNLOAD_PLAIN="",x.CHECK="",x.TOPICS="",x.EYE="\f06e",x.DISC="",x.CIRCLE="",x.SHARED="",x.SORT_UNSORTED="",x.SORT_UP="",x.SORT_DOWN="",x.WORKING="",x.CLOSE="",x.ZOOM_OUT="",x.ZOOM_IN="",x.ZOOM_REALSIZE="",x.ZOOM_FULLSCREEN="",x.ADMIN_RESTRICTED="",x.ADMIN_THEME="",x.WARNING="",x.CONTEXT="",x.SEARCH_HOME="",x.STEPS="",x.HOME="",x.TRANSLATE="",x.USER="",x.ADMIN="",x.ANALYTICS="",x.ADMIN_KHUB="",x.ADMIN_USERS="",x.ADMIN_INTEGRATION="",x.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"]]);
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
</i>
|
|
6
|
-
`}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:""}update(e){super.update(e),["value","variant"].some((t=>e.has(t)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case e.FtIconVariants.file_format:this.resolvedIcon=null!==(t=e.FtFileFormatIcons[o.toUpperCase()])&&void 0!==t?t:o;break;case e.FtIconVariants.fluid_topics:this.resolvedIcon=null!==(i=e.FtIcons[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||a.nothing}}firstUpdated(e){super.firstUpdated(e),setTimeout((()=>{this.resolveIcon()}))}}d.elementDefinitions={},d.styles=a.css`
|
|
7
|
-
:host {
|
|
8
|
-
display: inline-block;
|
|
9
|
-
}
|
|
1
|
+
!function(e,t,a,i,o){var x,p;e.FtIcons=void 0,(x=e.FtIcons||(e.FtIcons={})).THIN_ARROW_LEFT="",x.THIN_ARROW_RIGHT="",x.MY_COLLECTIONS="",x.OFFLINE_SETTINGS="",x.MY_LIBRARY="",x.RATE_PLAIN="",x.RATE="",x.FEEDBACK_PLAIN="",x.STAR_PLAIN="",x.STAR="",x.THUMBS_DOWN_PLAIN="",x.THUMBS_DOWN="",x.THUMBS_UP_PLAIN="",x.THUMBS_UP="",x.PAUSE="",x.PLAY="",x.RELATIVES_PLAIN="",x.RELATIVES="",x.SHORTCUT_MENU="",x.PRINT="",x.DEFAULT_ROLES="",x.ACCOUNT_SETTINGS="",x.ONLINE="",x.OFFLINE="",x.UPLOAD="",x.BOOK_PLAIN="",x.SYNC="",x.SHARED_PBK="",x.COLLECTIONS="",x.SEARCH_IN_PUBLICATION="",x.BOOKS="",x.LOCKER="",x.ARROW_DOWN="",x.ARROW_LEFT="",x.ARROW_RIGHT="",x.ARROW_UP="",x.SAVE="",x.MAILS_AND_NOTIFICATIONS="",x.DOT="",x.MINUS="",x.PLUS="",x.FILTERS="",x.STRIPE_ARROW_RIGHT="",x.STRIPE_ARROW_LEFT="",x.ATTACHMENTS="",x.ADD_BOOKMARK="",x.BOOKMARK="",x.EXPORT="",x.MENU="",x.TAG="",x.TAG_PLAIN="",x.COPY_TO_CLIPBOARD="",x.COLUMNS="",x.ARTICLE="",x.CLOSE_PLAIN="",x.CHECK_PLAIN="",x.LOGOUT="",x.SIGN_IN="",x.THIN_ARROW="",x.TRIANGLE_BOTTOM="",x.TRIANGLE_LEFT="",x.TRIANGLE_RIGHT="",x.TRIANGLE_TOP="",x.FACET_HAS_DESCENDANT="",x.MINUS_PLAIN="",x.PLUS_PLAIN="",x.INFO="",x.ICON_EXPAND="",x.ICON_COLLAPSE="",x.ADD_TO_PBK="",x.ALERT="",x.ADD_ALERT="",x.BACK_TO_SEARCH="",x.DOWNLOAD="",x.EDIT="",x.FEEDBACK="",x.MODIFY_PBK="",x.SCHEDULED="",x.SEARCH="",x.SHARE="󨃱",x.TOC="",x.WRITE_UGC="",x.TRASH="",x.EXTLINK="",x.CALENDAR="",x.BOOK="",x.DOWNLOAD_PLAIN="",x.CHECK="",x.TOPICS="",x.EYE="\f06e",x.DISC="",x.CIRCLE="",x.SHARED="",x.SORT_UNSORTED="",x.SORT_UP="",x.SORT_DOWN="",x.WORKING="",x.CLOSE="",x.ZOOM_OUT="",x.ZOOM_IN="",x.ZOOM_REALSIZE="",x.ZOOM_FULLSCREEN="",x.ADMIN_RESTRICTED="",x.ADMIN_THEME="",x.WARNING="",x.CONTEXT="",x.SEARCH_HOME="",x.STEPS="",x.HOME="",x.TRANSLATE="",x.USER="",x.ADMIN="",x.ANALYTICS="",x.ADMIN_KHUB="",x.ADMIN_USERS="",x.ADMIN_INTEGRATION="",x.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"]]);const s={size:t.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:t.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:t.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:t.FtCssVariableFactory.extend("--ft-icon-material-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:t.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},m=a.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
:host, i.ft-icon {
|
|
7
|
+
width: ${s.size};
|
|
8
|
+
height: ${s.size};
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
i.ft-icon {
|
|
13
|
+
font-size: ${s.size};
|
|
14
|
+
line-height: 1;
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
text-transform: none;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-variant: normal;
|
|
19
|
+
speak: none;
|
|
20
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
21
|
+
text-rendering: auto;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
-moz-osx-font-smoothing: grayscale;
|
|
24
|
+
vertical-align: ${s.verticalAlign};
|
|
25
|
+
}
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
.ft-icon--fluid-topics {
|
|
28
|
+
font-family: ${s.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
29
|
+
}
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
.ft-icon--file-format {
|
|
32
|
+
font-family: ${s.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
33
|
+
}
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
.ft-icon--material {
|
|
36
|
+
font-family: ${s.materialFontFamily}, "Material Icons", sans-serif;
|
|
37
|
+
}
|
|
38
|
+
`;var c;e.FtIconVariants=void 0,(c=e.FtIconVariants||(e.FtIconVariants={})).fluid_topics="fluid-topics",c.file_format="file-format",c.material="material";var d=function(e,t,a,i){for(var o,x=arguments.length,p=x<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i,n=e.length-1;n>=0;n--)(o=e[n])&&(p=(x<3?o(p):x>3?o(t,a,p):o(t,a))||p);return x>3&&p&&Object.defineProperty(t,a,p),p};class f extends t.FtLitElement{constructor(){super(...arguments),this.variant=e.FtIconVariants.fluid_topics,this.resolvedIcon=a.nothing}render(){const e="material"!==this.variant||this.value;return a.html`
|
|
39
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
40
|
+
${o.unsafeHTML(this.resolvedIcon)}
|
|
41
|
+
<slot ?hidden=${e}></slot>
|
|
42
|
+
</i>
|
|
43
|
+
`}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:""}update(e){super.update(e),["value","variant"].some((t=>e.has(t)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case e.FtIconVariants.file_format:this.resolvedIcon=null!==(t=e.FtFileFormatIcons[o.toUpperCase()])&&void 0!==t?t:o;break;case e.FtIconVariants.fluid_topics:this.resolvedIcon=null!==(i=e.FtIcons[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||a.nothing}}firstUpdated(e){super.firstUpdated(e),setTimeout((()=>{this.resolveIcon()}))}}f.elementDefinitions={},f.styles=m,d([i.property()],f.prototype,"variant",void 0),d([i.property()],f.prototype,"value",void 0),d([i.state()],f.prototype,"resolvedIcon",void 0),d([i.query("slot")],f.prototype,"slottedContent",void 0),t.customElement("ft-icon")(f),e.FtIcon=f,e.FtIconCssVariables=s,e.resolveFileFormatIcon=function(t,a){var i,o,x,p;t=(null!=t?t:"").toLowerCase(),a=(null!=a?a:"").toLowerCase();const[s,m]=((null!==(i=l.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(p=null!==(x=null!==(o=n.get(m))&&void 0!==o?o:n.get(a))&&void 0!==x?x:n.get(s))&&void 0!==p?p:e.FtFileFormatIcons.UNKNOWN},e.styles=m,Object.defineProperty(e,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
package/build/ft-icon.min.js
CHANGED
|
@@ -85,57 +85,57 @@ const ct=2;
|
|
|
85
85
|
* Copyright 2017 Google LLC
|
|
86
86
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
87
|
*/
|
|
88
|
-
class pt extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.it=W,t.type!==ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this._t=void 0,this.it=t;if(t===B)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}pt.directiveName="unsafeHTML",pt.resultType=1;const ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(pt);var dt,ut;t.FtIcons=void 0,(dt=t.FtIcons||(t.FtIcons={})).THIN_ARROW_LEFT="",dt.THIN_ARROW_RIGHT="",dt.MY_COLLECTIONS="",dt.OFFLINE_SETTINGS="",dt.MY_LIBRARY="",dt.RATE_PLAIN="",dt.RATE="",dt.FEEDBACK_PLAIN="",dt.STAR_PLAIN="",dt.STAR="",dt.THUMBS_DOWN_PLAIN="",dt.THUMBS_DOWN="",dt.THUMBS_UP_PLAIN="",dt.THUMBS_UP="",dt.PAUSE="",dt.PLAY="",dt.RELATIVES_PLAIN="",dt.RELATIVES="",dt.SHORTCUT_MENU="",dt.PRINT="",dt.DEFAULT_ROLES="",dt.ACCOUNT_SETTINGS="",dt.ONLINE="",dt.OFFLINE="",dt.UPLOAD="",dt.BOOK_PLAIN="",dt.SYNC="",dt.SHARED_PBK="",dt.COLLECTIONS="",dt.SEARCH_IN_PUBLICATION="",dt.BOOKS="",dt.LOCKER="",dt.ARROW_DOWN="",dt.ARROW_LEFT="",dt.ARROW_RIGHT="",dt.ARROW_UP="",dt.SAVE="",dt.MAILS_AND_NOTIFICATIONS="",dt.DOT="",dt.MINUS="",dt.PLUS="",dt.FILTERS="",dt.STRIPE_ARROW_RIGHT="",dt.STRIPE_ARROW_LEFT="",dt.ATTACHMENTS="",dt.ADD_BOOKMARK="",dt.BOOKMARK="",dt.EXPORT="",dt.MENU="",dt.TAG="",dt.TAG_PLAIN="",dt.COPY_TO_CLIPBOARD="",dt.COLUMNS="",dt.ARTICLE="",dt.CLOSE_PLAIN="",dt.CHECK_PLAIN="",dt.LOGOUT="",dt.SIGN_IN="",dt.THIN_ARROW="",dt.TRIANGLE_BOTTOM="",dt.TRIANGLE_LEFT="",dt.TRIANGLE_RIGHT="",dt.TRIANGLE_TOP="",dt.FACET_HAS_DESCENDANT="",dt.MINUS_PLAIN="",dt.PLUS_PLAIN="",dt.INFO="",dt.ICON_EXPAND="",dt.ICON_COLLAPSE="",dt.ADD_TO_PBK="",dt.ALERT="",dt.ADD_ALERT="",dt.BACK_TO_SEARCH="",dt.DOWNLOAD="",dt.EDIT="",dt.FEEDBACK="",dt.MODIFY_PBK="",dt.SCHEDULED="",dt.SEARCH="",dt.SHARE="󨃱",dt.TOC="",dt.WRITE_UGC="",dt.TRASH="",dt.EXTLINK="",dt.CALENDAR="",dt.BOOK="",dt.DOWNLOAD_PLAIN="",dt.CHECK="",dt.TOPICS="",dt.EYE="\f06e",dt.DISC="",dt.CIRCLE="",dt.SHARED="",dt.SORT_UNSORTED="",dt.SORT_UP="",dt.SORT_DOWN="",dt.WORKING="",dt.CLOSE="",dt.ZOOM_OUT="",dt.ZOOM_IN="",dt.ZOOM_REALSIZE="",dt.ZOOM_FULLSCREEN="",dt.ADMIN_RESTRICTED="",dt.ADMIN_THEME="",dt.WARNING="",dt.CONTEXT="",dt.SEARCH_HOME="",dt.STEPS="",dt.HOME="",dt.TRANSLATE="",dt.USER="",dt.ADMIN="",dt.ANALYTICS="",dt.ADMIN_KHUB="",dt.ADMIN_USERS="",dt.ADMIN_INTEGRATION="",dt.ADMIN_PORTAL="",t.FtFileFormatIcons=void 0,(ut=t.FtFileFormatIcons||(t.FtFileFormatIcons={})).UNKNOWN="",ut.ABW="",ut.AUDIO="",ut.AVI="",ut.CHM="",ut.CODE="",ut.CSV="",ut.DITA="",ut.EPUB="",ut.EXCEL="",ut.FLAC="",ut.GIF="",ut.GZIP="",ut.HTML="",ut.IMAGE="",ut.JPEG="",ut.JSON="",ut.M4A="",ut.MOV="",ut.MP3="",ut.MP4="",ut.OGG="",ut.PDF="",ut.PNG="",ut.POWERPOINT="",ut.RAR="",ut.STP="",ut.TEXT="",ut.VIDEO="",ut.WAV="",ut.WMA="",ut.WORD="",ut.XML="",ut.YAML="",ut.ZIP="";const xt=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]))]),ft=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"]]);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</i>
|
|
93
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var e,i;let s=this.value||this.textContent;switch(this.variant){case t.FtIconVariants.file_format:this.resolvedIcon=null!==(e=t.FtFileFormatIcons[s.toUpperCase()])&&void 0!==e?e:s;break;case t.FtIconVariants.fluid_topics:this.resolvedIcon=null!==(i=t.FtIcons[s.toUpperCase()])&&void 0!==i?i:s;break;default:this.resolvedIcon=this.value||W}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}var wt;gt.elementDefinitions={},gt.styles=c`
|
|
94
|
-
:host {
|
|
95
|
-
display: inline-block;
|
|
96
|
-
}
|
|
88
|
+
class pt extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.it=W,t.type!==ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this._t=void 0,this.it=t;if(t===B)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}pt.directiveName="unsafeHTML",pt.resultType=1;const ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(pt);var dt,ut;t.FtIcons=void 0,(dt=t.FtIcons||(t.FtIcons={})).THIN_ARROW_LEFT="",dt.THIN_ARROW_RIGHT="",dt.MY_COLLECTIONS="",dt.OFFLINE_SETTINGS="",dt.MY_LIBRARY="",dt.RATE_PLAIN="",dt.RATE="",dt.FEEDBACK_PLAIN="",dt.STAR_PLAIN="",dt.STAR="",dt.THUMBS_DOWN_PLAIN="",dt.THUMBS_DOWN="",dt.THUMBS_UP_PLAIN="",dt.THUMBS_UP="",dt.PAUSE="",dt.PLAY="",dt.RELATIVES_PLAIN="",dt.RELATIVES="",dt.SHORTCUT_MENU="",dt.PRINT="",dt.DEFAULT_ROLES="",dt.ACCOUNT_SETTINGS="",dt.ONLINE="",dt.OFFLINE="",dt.UPLOAD="",dt.BOOK_PLAIN="",dt.SYNC="",dt.SHARED_PBK="",dt.COLLECTIONS="",dt.SEARCH_IN_PUBLICATION="",dt.BOOKS="",dt.LOCKER="",dt.ARROW_DOWN="",dt.ARROW_LEFT="",dt.ARROW_RIGHT="",dt.ARROW_UP="",dt.SAVE="",dt.MAILS_AND_NOTIFICATIONS="",dt.DOT="",dt.MINUS="",dt.PLUS="",dt.FILTERS="",dt.STRIPE_ARROW_RIGHT="",dt.STRIPE_ARROW_LEFT="",dt.ATTACHMENTS="",dt.ADD_BOOKMARK="",dt.BOOKMARK="",dt.EXPORT="",dt.MENU="",dt.TAG="",dt.TAG_PLAIN="",dt.COPY_TO_CLIPBOARD="",dt.COLUMNS="",dt.ARTICLE="",dt.CLOSE_PLAIN="",dt.CHECK_PLAIN="",dt.LOGOUT="",dt.SIGN_IN="",dt.THIN_ARROW="",dt.TRIANGLE_BOTTOM="",dt.TRIANGLE_LEFT="",dt.TRIANGLE_RIGHT="",dt.TRIANGLE_TOP="",dt.FACET_HAS_DESCENDANT="",dt.MINUS_PLAIN="",dt.PLUS_PLAIN="",dt.INFO="",dt.ICON_EXPAND="",dt.ICON_COLLAPSE="",dt.ADD_TO_PBK="",dt.ALERT="",dt.ADD_ALERT="",dt.BACK_TO_SEARCH="",dt.DOWNLOAD="",dt.EDIT="",dt.FEEDBACK="",dt.MODIFY_PBK="",dt.SCHEDULED="",dt.SEARCH="",dt.SHARE="󨃱",dt.TOC="",dt.WRITE_UGC="",dt.TRASH="",dt.EXTLINK="",dt.CALENDAR="",dt.BOOK="",dt.DOWNLOAD_PLAIN="",dt.CHECK="",dt.TOPICS="",dt.EYE="\f06e",dt.DISC="",dt.CIRCLE="",dt.SHARED="",dt.SORT_UNSORTED="",dt.SORT_UP="",dt.SORT_DOWN="",dt.WORKING="",dt.CLOSE="",dt.ZOOM_OUT="",dt.ZOOM_IN="",dt.ZOOM_REALSIZE="",dt.ZOOM_FULLSCREEN="",dt.ADMIN_RESTRICTED="",dt.ADMIN_THEME="",dt.WARNING="",dt.CONTEXT="",dt.SEARCH_HOME="",dt.STEPS="",dt.HOME="",dt.TRANSLATE="",dt.USER="",dt.ADMIN="",dt.ANALYTICS="",dt.ADMIN_KHUB="",dt.ADMIN_USERS="",dt.ADMIN_INTEGRATION="",dt.ADMIN_PORTAL="",t.FtFileFormatIcons=void 0,(ut=t.FtFileFormatIcons||(t.FtFileFormatIcons={})).UNKNOWN="",ut.ABW="",ut.AUDIO="",ut.AVI="",ut.CHM="",ut.CODE="",ut.CSV="",ut.DITA="",ut.EPUB="",ut.EXCEL="",ut.FLAC="",ut.GIF="",ut.GZIP="",ut.HTML="",ut.IMAGE="",ut.JPEG="",ut.JSON="",ut.M4A="",ut.MOV="",ut.MP3="",ut.MP4="",ut.OGG="",ut.PDF="",ut.PNG="",ut.POWERPOINT="",ut.RAR="",ut.STP="",ut.TEXT="",ut.VIDEO="",ut.WAV="",ut.WMA="",ut.WORD="",ut.XML="",ut.YAML="",ut.ZIP="";const xt=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]))]),ft=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 vt={size:ot.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ot.extend("--ft-icon-fluid-topics-font-family",ot.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ot.extend("--ft-icon-file-format-font-family",ot.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ot.extend("--ft-icon-material-font-family",ot.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ot.create("--ft-icon-vertical-align","UNKNOWN","unset")},mt=c`
|
|
89
|
+
:host {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
}
|
|
97
92
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
:host, i.ft-icon {
|
|
94
|
+
width: ${vt.size};
|
|
95
|
+
height: ${vt.size};
|
|
96
|
+
text-align: center;
|
|
97
|
+
}
|
|
103
98
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
99
|
+
i.ft-icon {
|
|
100
|
+
font-size: ${vt.size};
|
|
101
|
+
line-height: 1;
|
|
102
|
+
font-weight: normal;
|
|
103
|
+
text-transform: none;
|
|
104
|
+
font-style: normal;
|
|
105
|
+
font-variant: normal;
|
|
106
|
+
speak: none;
|
|
107
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
108
|
+
text-rendering: auto;
|
|
109
|
+
-webkit-font-smoothing: antialiased;
|
|
110
|
+
-moz-osx-font-smoothing: grayscale;
|
|
111
|
+
vertical-align: ${vt.verticalAlign};
|
|
112
|
+
}
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
.ft-icon--fluid-topics {
|
|
115
|
+
font-family: ${vt.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
116
|
+
}
|
|
122
117
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
.ft-icon--file-format {
|
|
119
|
+
font-family: ${vt.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
120
|
+
}
|
|
126
121
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
.ft-icon--material {
|
|
123
|
+
font-family: ${vt.materialFontFamily}, "Material Icons", sans-serif;
|
|
124
|
+
}
|
|
125
|
+
`;var bt;t.FtIconVariants=void 0,(bt=t.FtIconVariants||(t.FtIconVariants={})).fluid_topics="fluid-topics",bt.file_format="file-format",bt.material="material";var gt,wt=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 yt extends lt{constructor(){super(...arguments),this.variant=t.FtIconVariants.fluid_topics,this.resolvedIcon=W}render(){const t="material"!==this.variant||this.value;return _`
|
|
126
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
127
|
+
${ht(this.resolvedIcon)}
|
|
128
|
+
<slot ?hidden=${t}></slot>
|
|
129
|
+
</i>
|
|
130
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var e,i;let s=this.value||this.textContent;switch(this.variant){case t.FtIconVariants.file_format:this.resolvedIcon=null!==(e=t.FtFileFormatIcons[s.toUpperCase()])&&void 0!==e?e:s;break;case t.FtIconVariants.fluid_topics:this.resolvedIcon=null!==(i=t.FtIcons[s.toUpperCase()])&&void 0!==i?i:s;break;default:this.resolvedIcon=this.value||W}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}yt.elementDefinitions={},yt.styles=mt,wt([i()],yt.prototype,"variant",void 0),wt([i()],yt.prototype,"value",void 0),wt([function(t){return i({...t,state:!0})}
|
|
131
131
|
/**
|
|
132
132
|
* @license
|
|
133
133
|
* Copyright 2017 Google LLC
|
|
134
134
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
135
|
-
*/()],
|
|
135
|
+
*/()],yt.prototype,"resolvedIcon",void 0),wt([
|
|
136
136
|
/**
|
|
137
137
|
* @license
|
|
138
138
|
* Copyright 2017 Google LLC
|
|
139
139
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
140
140
|
*/
|
|
141
|
-
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")],
|
|
141
|
+
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")],yt.prototype,"slottedContent",void 0),(gt="ft-icon",t=>{window.customElements.get(gt)||window.customElements.define(gt,t)})(yt),t.FtIcon=yt,t.FtIconCssVariables=vt,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=ft.get(e))&&void 0!==s?s:e)+"/").split("/");return null!==(r=null!==(n=null!==(o=xt.get(l))&&void 0!==o?o:xt.get(i))&&void 0!==n?n:xt.get(a))&&void 0!==r?r:t.FtFileFormatIcons.UNKNOWN},t.styles=mt,Object.defineProperty(t,"i",{value:!0})}({});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum FtIconVariants {
|
|
2
|
+
fluid_topics = "fluid-topics",
|
|
3
|
+
file_format = "file-format",
|
|
4
|
+
material = "material"
|
|
5
|
+
}
|
|
6
|
+
export interface FtIconProperties {
|
|
7
|
+
variant?: FtIconVariants;
|
|
8
|
+
value?: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ft-icon.properties.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var FtIconVariants;
|
|
2
|
+
(function (FtIconVariants) {
|
|
3
|
+
FtIconVariants["fluid_topics"] = "fluid-topics";
|
|
4
|
+
FtIconVariants["file_format"] = "file-format";
|
|
5
|
+
FtIconVariants["material"] = "material";
|
|
6
|
+
})(FtIconVariants || (FtIconVariants = {}));
|
|
7
|
+
//# sourceMappingURL=ft-icon.properties.js.map
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-icon",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
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.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "0.3.13",
|
|
23
23
|
"lit": "2.2.8"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "84b5fc920bc5d2bdb646b5da8815ad51caaf228e"
|
|
26
26
|
}
|