@fluid-topics/ft-resizer 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-resizer.css.d.ts +6 -0
- package/build/ft-resizer.css.js +27 -0
- package/build/ft-resizer.d.ts +2 -5
- package/build/ft-resizer.js +4 -26
- package/build/ft-resizer.light.js +55 -55
- package/build/ft-resizer.min.js +58 -58
- package/build/ft-resizer.properties.d.ts +7 -0
- package/build/ft-resizer.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FtResizerCssVariables: {
|
|
2
|
+
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
};
|
|
5
|
+
export declare const styles: import("lit").CSSResult;
|
|
6
|
+
//# sourceMappingURL=ft-resizer.css.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
export const FtResizerCssVariables = {
|
|
4
|
+
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
5
|
+
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
6
|
+
};
|
|
7
|
+
// language=CSS
|
|
8
|
+
export const styles = css `
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ft-resizer {
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ft-icon {
|
|
18
|
+
transform: rotate(-45deg);
|
|
19
|
+
color: ${FtResizerCssVariables.colorOutline};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ft-resizer--dragging ft-icon,
|
|
23
|
+
.ft-resizer:hover ft-icon {
|
|
24
|
+
color: ${FtResizerCssVariables.colorOnSurfaceMedium};
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
//# sourceMappingURL=ft-resizer.css.js.map
|
package/build/ft-resizer.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { FtResizerProperties } from "./ft-resizer.properties";
|
|
2
3
|
export declare class ResizeEvent extends CustomEvent<{
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
5
6
|
}> {
|
|
6
7
|
constructor(width: number, height: number);
|
|
7
8
|
}
|
|
8
|
-
export declare
|
|
9
|
-
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
-
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
-
};
|
|
12
|
-
export declare class FtResizer extends FtLitElement {
|
|
9
|
+
export declare class FtResizer extends FtLitElement implements FtResizerProperties {
|
|
13
10
|
static elementDefinitions: ElementDefinitionsMap;
|
|
14
11
|
static styles: import("lit").CSSResult[];
|
|
15
12
|
initialWidth: number;
|
package/build/ft-resizer.js
CHANGED
|
@@ -4,19 +4,16 @@ 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, unsafeCSS } from "lit";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FtLitElement, noTextSelect } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
11
|
+
import { styles } from "./ft-resizer.css";
|
|
11
12
|
export class ResizeEvent extends CustomEvent {
|
|
12
13
|
constructor(width, height) {
|
|
13
14
|
super("resize", { detail: { width, height } });
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
export const FtResizerCssVariables = {
|
|
17
|
-
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
18
|
-
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
19
|
-
};
|
|
20
17
|
export class FtResizer extends FtLitElement {
|
|
21
18
|
constructor() {
|
|
22
19
|
super(...arguments);
|
|
@@ -86,28 +83,9 @@ export class FtResizer extends FtLitElement {
|
|
|
86
83
|
FtResizer.elementDefinitions = {
|
|
87
84
|
"ft-icon": FtIcon,
|
|
88
85
|
};
|
|
89
|
-
// language=CSS
|
|
90
86
|
FtResizer.styles = [
|
|
91
87
|
noTextSelect,
|
|
92
|
-
|
|
93
|
-
:host {
|
|
94
|
-
display: block;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ft-resizer {
|
|
98
|
-
display: flex;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
ft-icon {
|
|
102
|
-
transform: rotate(-45deg);
|
|
103
|
-
color: ${FtResizerCssVariables.colorOutline};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.ft-resizer--dragging ft-icon,
|
|
107
|
-
.ft-resizer:hover ft-icon {
|
|
108
|
-
color: ${FtResizerCssVariables.colorOnSurfaceMedium};
|
|
109
|
-
}
|
|
110
|
-
`
|
|
88
|
+
styles,
|
|
111
89
|
];
|
|
112
90
|
__decorate([
|
|
113
91
|
property({ type: Number })
|
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
!function(e,t,i,s,x){var o,n;!function(e){e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.MY_COLLECTIONS="",e.OFFLINE_SETTINGS="",e.MY_LIBRARY="",e.RATE_PLAIN="",e.RATE="",e.FEEDBACK_PLAIN="",e.STAR_PLAIN="",e.STAR="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_DOWN="",e.THUMBS_UP_PLAIN="",e.THUMBS_UP="",e.PAUSE="",e.PLAY="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.SHORTCUT_MENU="",e.PRINT="",e.DEFAULT_ROLES="",e.ACCOUNT_SETTINGS="",e.ONLINE="",e.OFFLINE="",e.UPLOAD="",e.BOOK_PLAIN="",e.SYNC="",e.SHARED_PBK="",e.COLLECTIONS="",e.SEARCH_IN_PUBLICATION="",e.BOOKS="",e.LOCKER="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SAVE="",e.MAILS_AND_NOTIFICATIONS="",e.DOT="",e.MINUS="",e.PLUS="",e.FILTERS="",e.STRIPE_ARROW_RIGHT="",e.STRIPE_ARROW_LEFT="",e.ATTACHMENTS="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.EXPORT="",e.MENU="",e.TAG="",e.TAG_PLAIN="",e.COPY_TO_CLIPBOARD="",e.COLUMNS="",e.ARTICLE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.LOGOUT="",e.SIGN_IN="",e.THIN_ARROW="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.FACET_HAS_DESCENDANT="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.INFO="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.SHARE="󨃱",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.EXTLINK="",e.CALENDAR="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.TOPICS="",e.EYE="\f06e",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN_THEME="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.HOME="",e.TRANSLATE="",e.USER="",e.ADMIN="",e.ANALYTICS="",e.ADMIN_KHUB="",e.ADMIN_USERS="",e.ADMIN_INTEGRATION="",e.ADMIN_PORTAL=""}(o||(o={})),function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""}(n||(n={})),new Map([...["abw"].map((e=>[e,n.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,n.AUDIO])),...["avi"].map((e=>[e,n.AVI])),...["chm","xhs"].map((e=>[e,n.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,n.CODE])),...["csv"].map((e=>[e,n.CSV])),...["dita","ditamap","ditaval"].map((e=>[e,n.DITA])),...["epub"].map((e=>[e,n.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((e=>[e,n.EXCEL])),...["flac"].map((e=>[e,n.FLAC])),...["gif"].map((e=>[e,n.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((e=>[e,n.GZIP])),...["html","htm","xhtml"].map((e=>[e,n.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,n.IMAGE])),...["jpeg","jpg","jpe"].map((e=>[e,n.JPEG])),...["json"].map((e=>[e,n.JSON])),...["m4a","m4p"].map((e=>[e,n.M4A])),...["mov","qt"].map((e=>[e,n.MOV])),...["mp3"].map((e=>[e,n.MP3])),...["mp4","m4v"].map((e=>[e,n.MP4])),...["ogg","oga"].map((e=>[e,n.OGG])),...["pdf","ps"].map((e=>[e,n.PDF])),...["png"].map((e=>[e,n.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((e=>[e,n.POWERPOINT])),...["rar"].map((e=>[e,n.RAR])),...["stp"].map((e=>[e,n.STP])),...["txt","rtf","md","mdown"].map((e=>[e,n.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,n.VIDEO])),...["wav"].map((e=>[e,n.WAV])),...["wma"].map((e=>[e,n.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((e=>[e,n.WORD])),...["xml","xsl","rdf"].map((e=>[e,n.XML])),...["yaml","yml","x-yaml"].map((e=>[e,n.YAML])),...["zip"].map((e=>[e,n.ZIP]))]);
|
|
1
|
+
!function(e,t,i,s,x){var o,n;!function(e){e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.MY_COLLECTIONS="",e.OFFLINE_SETTINGS="",e.MY_LIBRARY="",e.RATE_PLAIN="",e.RATE="",e.FEEDBACK_PLAIN="",e.STAR_PLAIN="",e.STAR="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_DOWN="",e.THUMBS_UP_PLAIN="",e.THUMBS_UP="",e.PAUSE="",e.PLAY="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.SHORTCUT_MENU="",e.PRINT="",e.DEFAULT_ROLES="",e.ACCOUNT_SETTINGS="",e.ONLINE="",e.OFFLINE="",e.UPLOAD="",e.BOOK_PLAIN="",e.SYNC="",e.SHARED_PBK="",e.COLLECTIONS="",e.SEARCH_IN_PUBLICATION="",e.BOOKS="",e.LOCKER="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SAVE="",e.MAILS_AND_NOTIFICATIONS="",e.DOT="",e.MINUS="",e.PLUS="",e.FILTERS="",e.STRIPE_ARROW_RIGHT="",e.STRIPE_ARROW_LEFT="",e.ATTACHMENTS="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.EXPORT="",e.MENU="",e.TAG="",e.TAG_PLAIN="",e.COPY_TO_CLIPBOARD="",e.COLUMNS="",e.ARTICLE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.LOGOUT="",e.SIGN_IN="",e.THIN_ARROW="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.FACET_HAS_DESCENDANT="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.INFO="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.SHARE="󨃱",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.EXTLINK="",e.CALENDAR="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.TOPICS="",e.EYE="\f06e",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN_THEME="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.HOME="",e.TRANSLATE="",e.USER="",e.ADMIN="",e.ANALYTICS="",e.ADMIN_KHUB="",e.ADMIN_USERS="",e.ADMIN_INTEGRATION="",e.ADMIN_PORTAL=""}(o||(o={})),function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""}(n||(n={})),new Map([...["abw"].map((e=>[e,n.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,n.AUDIO])),...["avi"].map((e=>[e,n.AVI])),...["chm","xhs"].map((e=>[e,n.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,n.CODE])),...["csv"].map((e=>[e,n.CSV])),...["dita","ditamap","ditaval"].map((e=>[e,n.DITA])),...["epub"].map((e=>[e,n.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((e=>[e,n.EXCEL])),...["flac"].map((e=>[e,n.FLAC])),...["gif"].map((e=>[e,n.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((e=>[e,n.GZIP])),...["html","htm","xhtml"].map((e=>[e,n.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,n.IMAGE])),...["jpeg","jpg","jpe"].map((e=>[e,n.JPEG])),...["json"].map((e=>[e,n.JSON])),...["m4a","m4p"].map((e=>[e,n.M4A])),...["mov","qt"].map((e=>[e,n.MOV])),...["mp3"].map((e=>[e,n.MP3])),...["mp4","m4v"].map((e=>[e,n.MP4])),...["ogg","oga"].map((e=>[e,n.OGG])),...["pdf","ps"].map((e=>[e,n.PDF])),...["png"].map((e=>[e,n.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((e=>[e,n.POWERPOINT])),...["rar"].map((e=>[e,n.RAR])),...["stp"].map((e=>[e,n.STP])),...["txt","rtf","md","mdown"].map((e=>[e,n.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,n.VIDEO])),...["wav"].map((e=>[e,n.WAV])),...["wma"].map((e=>[e,n.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((e=>[e,n.WORD])),...["xml","xsl","rdf"].map((e=>[e,n.XML])),...["yaml","yml","x-yaml"].map((e=>[e,n.YAML])),...["zip"].map((e=>[e,n.ZIP]))]);const a=t.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),c=t.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),r=t.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),l=t.FtCssVariableFactory.extend("--ft-icon-material-font-family",t.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),m=t.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),f=i.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host, i.ft-icon {
|
|
7
|
+
width: ${a};
|
|
8
|
+
height: ${a};
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
i.ft-icon {
|
|
13
|
+
font-size: ${a};
|
|
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: ${m};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ft-icon--fluid-topics {
|
|
28
|
+
font-family: ${c}, ft-icons, fticons, sans-serif;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ft-icon--file-format {
|
|
32
|
+
font-family: ${r}, ft-mime, sans-serif;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ft-icon--material {
|
|
36
|
+
font-family: ${l}, "Material Icons", sans-serif;
|
|
37
|
+
}
|
|
38
|
+
`;var h;!function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"}(h||(h={}));var p=function(e,t,i,s){for(var x,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s,a=e.length-1;a>=0;a--)(x=e[a])&&(n=(o<3?x(n):o>3?x(t,i,n):x(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};class d extends t.FtLitElement{constructor(){super(...arguments),this.variant=h.fluid_topics,this.resolvedIcon=i.nothing}render(){const e="material"!==this.variant||this.value;return i.html`
|
|
2
39
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
3
40
|
${x.unsafeHTML(this.resolvedIcon)}
|
|
4
41
|
<slot ?hidden=${e}></slot>
|
|
5
42
|
</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 e,t;let s=this.value||this.textContent;switch(this.variant){case
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 e,t;let s=this.value||this.textContent;switch(this.variant){case h.file_format:this.resolvedIcon=null!==(e=n[s.toUpperCase()])&&void 0!==e?e:s;break;case h.fluid_topics:this.resolvedIcon=null!==(t=o[s.toUpperCase()])&&void 0!==t?t:s;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(e){super.firstUpdated(e),setTimeout((()=>{this.resolveIcon()}))}}d.elementDefinitions={},d.styles=f,p([s.property()],d.prototype,"variant",void 0),p([s.property()],d.prototype,"value",void 0),p([s.state()],d.prototype,"resolvedIcon",void 0),p([s.query("slot")],d.prototype,"slottedContent",void 0),t.customElement("ft-icon")(d);const u={colorOutline:t.FtCssVariableFactory.external(t.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:t.FtCssVariableFactory.external(t.designSystemVariables.colorOnSurfaceMedium,"Design system")},v=i.css`
|
|
44
|
+
:host {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
10
47
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
text-align: center;
|
|
15
|
-
}
|
|
48
|
+
.ft-resizer {
|
|
49
|
+
display: flex;
|
|
50
|
+
}
|
|
16
51
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
text-transform: none;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-variant: normal;
|
|
24
|
-
speak: none;
|
|
25
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
26
|
-
text-rendering: auto;
|
|
27
|
-
-webkit-font-smoothing: antialiased;
|
|
28
|
-
-moz-osx-font-smoothing: grayscale;
|
|
29
|
-
vertical-align: ${h};
|
|
30
|
-
}
|
|
52
|
+
ft-icon {
|
|
53
|
+
transform: rotate(-45deg);
|
|
54
|
+
color: ${u.colorOutline};
|
|
55
|
+
}
|
|
31
56
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
font-family: ${m}, ft-mime, sans-serif;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ft-icon--material {
|
|
41
|
-
font-family: ${f}, "Material Icons", sans-serif;
|
|
42
|
-
}
|
|
43
|
-
`,c([s.property()],p.prototype,"variant",void 0),c([s.property()],p.prototype,"value",void 0),c([s.state()],p.prototype,"resolvedIcon",void 0),c([s.query("slot")],p.prototype,"slottedContent",void 0),t.customElement("ft-icon")(p);var d=function(e,t,i,s){for(var x,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s,a=e.length-1;a>=0;a--)(x=e[a])&&(n=(o<3?x(n):o>3?x(t,i,n):x(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};class u extends CustomEvent{constructor(e,t){super("resize",{detail:{width:e,height:t}})}}const v={colorOutline:t.FtCssVariableFactory.external(t.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:t.FtCssVariableFactory.external(t.designSystemVariables.colorOnSurfaceMedium,"Design system")};class g extends t.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=e=>this.doDrag(e.clientX,e.clientY),this.doDragFromTouch=e=>this.doDrag(e.touches[0].clientX,e.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return i.html`
|
|
57
|
+
.ft-resizer--dragging ft-icon,
|
|
58
|
+
.ft-resizer:hover ft-icon {
|
|
59
|
+
color: ${u.colorOnSurfaceMedium};
|
|
60
|
+
}
|
|
61
|
+
`;var g=function(e,t,i,s){for(var x,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s,a=e.length-1;a>=0;a--)(x=e[a])&&(n=(o<3?x(n):o>3?x(t,i,n):x(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};class b extends CustomEvent{constructor(e,t){super("resize",{detail:{width:e,height:t}})}}class y extends t.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=e=>this.doDrag(e.clientX,e.clientY),this.doDragFromTouch=e=>this.doDrag(e.touches[0].clientX,e.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return i.html`
|
|
44
62
|
<style>
|
|
45
63
|
.ft-resizer {
|
|
46
64
|
cursor: ${i.unsafeCSS(this.cursor)}
|
|
@@ -51,22 +69,4 @@
|
|
|
51
69
|
@touchstart=${this.initDragFromTouch}>
|
|
52
70
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
53
71
|
</div>
|
|
54
|
-
`}initDragFromMouse(e){this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initDrag(e,t){this.dragging=!0,this.startX=e,this.startY=t,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(e,t){let i=this.fixedWidth+e-this.startX,s=this.fixedHeight+t-this.startY;this.dispatchEvent(new
|
|
55
|
-
:host {
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.ft-resizer {
|
|
60
|
-
display: flex;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
ft-icon {
|
|
64
|
-
transform: rotate(-45deg);
|
|
65
|
-
color: ${v.colorOutline};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.ft-resizer--dragging ft-icon,
|
|
69
|
-
.ft-resizer:hover ft-icon {
|
|
70
|
-
color: ${v.colorOnSurfaceMedium};
|
|
71
|
-
}
|
|
72
|
-
`],d([s.property({type:Number})],g.prototype,"initialWidth",void 0),d([s.property({type:Number})],g.prototype,"initialHeight",void 0),d([s.property()],g.prototype,"icon",void 0),d([s.property()],g.prototype,"cursor",void 0),d([s.state()],g.prototype,"dragging",void 0),t.customElement("ft-resizer")(g),e.FtResizer=g,e.FtResizerCssVariables=v,e.ResizeEvent=u,Object.defineProperty(e,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
72
|
+
`}initDragFromMouse(e){this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initDrag(e,t){this.dragging=!0,this.startX=e,this.startY=t,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(e,t){let i=this.fixedWidth+e-this.startX,s=this.fixedHeight+t-this.startY;this.dispatchEvent(new b(i,s))}}y.elementDefinitions={"ft-icon":d},y.styles=[t.noTextSelect,v],g([s.property({type:Number})],y.prototype,"initialWidth",void 0),g([s.property({type:Number})],y.prototype,"initialHeight",void 0),g([s.property()],y.prototype,"icon",void 0),g([s.property()],y.prototype,"cursor",void 0),g([s.state()],y.prototype,"dragging",void 0),t.customElement("ft-resizer")(y),e.FtResizer=y,e.FtResizerCssVariables=u,e.ResizeEvent=b,e.styles=v,Object.defineProperty(e,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
package/build/ft-resizer.min.js
CHANGED
|
@@ -89,55 +89,73 @@ const pt=2;
|
|
|
89
89
|
* Copyright 2017 Google LLC
|
|
90
90
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
91
|
*/
|
|
92
|
-
class ft 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=B,t.type!==pt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===B||null==t)return this._t=void 0,this.it=t;if(t===z)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:[]}}}ft.directiveName="unsafeHTML",ft.resultType=1;const xt=(t=>(...e)=>({_$litDirective$:t,values:e}))(ft);var vt,mt;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}(vt||(vt={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(mt||(mt={})),new Map([...["abw"].map((t=>[t,mt.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,mt.AUDIO])),...["avi"].map((t=>[t,mt.AVI])),...["chm","xhs"].map((t=>[t,mt.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,mt.CODE])),...["csv"].map((t=>[t,mt.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,mt.DITA])),...["epub"].map((t=>[t,mt.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,mt.EXCEL])),...["flac"].map((t=>[t,mt.FLAC])),...["gif"].map((t=>[t,mt.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,mt.GZIP])),...["html","htm","xhtml"].map((t=>[t,mt.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,mt.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,mt.JPEG])),...["json"].map((t=>[t,mt.JSON])),...["m4a","m4p"].map((t=>[t,mt.M4A])),...["mov","qt"].map((t=>[t,mt.MOV])),...["mp3"].map((t=>[t,mt.MP3])),...["mp4","m4v"].map((t=>[t,mt.MP4])),...["ogg","oga"].map((t=>[t,mt.OGG])),...["pdf","ps"].map((t=>[t,mt.PDF])),...["png"].map((t=>[t,mt.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,mt.POWERPOINT])),...["rar"].map((t=>[t,mt.RAR])),...["stp"].map((t=>[t,mt.STP])),...["txt","rtf","md","mdown"].map((t=>[t,mt.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,mt.VIDEO])),...["wav"].map((t=>[t,mt.WAV])),...["wma"].map((t=>[t,mt.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,mt.WORD])),...["xml","xsl","rdf"].map((t=>[t,mt.XML])),...["yaml","yml","x-yaml"].map((t=>[t,mt.YAML])),...["zip"].map((t=>[t,mt.ZIP]))]);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</i>
|
|
97
|
-
`}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 t,e;let i=this.value||this.textContent;switch(this.variant){case yt.file_format:this.resolvedIcon=null!==(t=mt[i.toUpperCase()])&&void 0!==t?t:i;break;case yt.fluid_topics:this.resolvedIcon=null!==(e=vt[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||B}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}$t.elementDefinitions={},$t.styles=u`
|
|
98
|
-
:host {
|
|
99
|
-
display: inline-block;
|
|
100
|
-
}
|
|
92
|
+
class ft 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=B,t.type!==pt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===B||null==t)return this._t=void 0,this.it=t;if(t===z)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:[]}}}ft.directiveName="unsafeHTML",ft.resultType=1;const xt=(t=>(...e)=>({_$litDirective$:t,values:e}))(ft);var vt,mt;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}(vt||(vt={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(mt||(mt={})),new Map([...["abw"].map((t=>[t,mt.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,mt.AUDIO])),...["avi"].map((t=>[t,mt.AVI])),...["chm","xhs"].map((t=>[t,mt.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,mt.CODE])),...["csv"].map((t=>[t,mt.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,mt.DITA])),...["epub"].map((t=>[t,mt.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,mt.EXCEL])),...["flac"].map((t=>[t,mt.FLAC])),...["gif"].map((t=>[t,mt.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,mt.GZIP])),...["html","htm","xhtml"].map((t=>[t,mt.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,mt.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,mt.JPEG])),...["json"].map((t=>[t,mt.JSON])),...["m4a","m4p"].map((t=>[t,mt.M4A])),...["mov","qt"].map((t=>[t,mt.MOV])),...["mp3"].map((t=>[t,mt.MP3])),...["mp4","m4v"].map((t=>[t,mt.MP4])),...["ogg","oga"].map((t=>[t,mt.OGG])),...["pdf","ps"].map((t=>[t,mt.PDF])),...["png"].map((t=>[t,mt.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,mt.POWERPOINT])),...["rar"].map((t=>[t,mt.RAR])),...["stp"].map((t=>[t,mt.STP])),...["txt","rtf","md","mdown"].map((t=>[t,mt.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,mt.VIDEO])),...["wav"].map((t=>[t,mt.WAV])),...["wma"].map((t=>[t,mt.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,mt.WORD])),...["xml","xsl","rdf"].map((t=>[t,mt.XML])),...["yaml","yml","x-yaml"].map((t=>[t,mt.YAML])),...["zip"].map((t=>[t,mt.ZIP]))]);const yt=rt.create("--ft-icon-font-size","SIZE","24px"),bt=rt.extend("--ft-icon-fluid-topics-font-family",rt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),gt=rt.extend("--ft-icon-file-format-font-family",rt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),wt=rt.extend("--ft-icon-material-font-family",rt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ot=rt.create("--ft-icon-vertical-align","UNKNOWN","unset"),St=u`
|
|
93
|
+
:host {
|
|
94
|
+
display: inline-block;
|
|
95
|
+
}
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
:host, i.ft-icon {
|
|
98
|
+
width: ${yt};
|
|
99
|
+
height: ${yt};
|
|
100
|
+
text-align: center;
|
|
101
|
+
}
|
|
107
102
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
103
|
+
i.ft-icon {
|
|
104
|
+
font-size: ${yt};
|
|
105
|
+
line-height: 1;
|
|
106
|
+
font-weight: normal;
|
|
107
|
+
text-transform: none;
|
|
108
|
+
font-style: normal;
|
|
109
|
+
font-variant: normal;
|
|
110
|
+
speak: none;
|
|
111
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
112
|
+
text-rendering: auto;
|
|
113
|
+
-webkit-font-smoothing: antialiased;
|
|
114
|
+
-moz-osx-font-smoothing: grayscale;
|
|
115
|
+
vertical-align: ${Ot};
|
|
116
|
+
}
|
|
122
117
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
.ft-icon--fluid-topics {
|
|
119
|
+
font-family: ${bt}, ft-icons, fticons, sans-serif;
|
|
120
|
+
}
|
|
126
121
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
.ft-icon--file-format {
|
|
123
|
+
font-family: ${gt}, ft-mime, sans-serif;
|
|
124
|
+
}
|
|
130
125
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
.ft-icon--material {
|
|
127
|
+
font-family: ${wt}, "Material Icons", sans-serif;
|
|
128
|
+
}
|
|
129
|
+
`;var Nt;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Nt||(Nt={}));var $t=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 Et extends ct{constructor(){super(...arguments),this.variant=Nt.fluid_topics,this.resolvedIcon=B}render(){const t="material"!==this.variant||this.value;return D`
|
|
130
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
131
|
+
${xt(this.resolvedIcon)}
|
|
132
|
+
<slot ?hidden=${t}></slot>
|
|
133
|
+
</i>
|
|
134
|
+
`}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 t,e;let i=this.value||this.textContent;switch(this.variant){case Nt.file_format:this.resolvedIcon=null!==(t=mt[i.toUpperCase()])&&void 0!==t?t:i;break;case Nt.fluid_topics:this.resolvedIcon=null!==(e=vt[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||B}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Et.elementDefinitions={},Et.styles=St,$t([i()],Et.prototype,"variant",void 0),$t([i()],Et.prototype,"value",void 0),$t([s()],Et.prototype,"resolvedIcon",void 0),$t([
|
|
135
135
|
/**
|
|
136
136
|
* @license
|
|
137
137
|
* Copyright 2017 Google LLC
|
|
138
138
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
139
139
|
*/
|
|
140
|
-
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")]
|
|
140
|
+
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")],Et.prototype,"slottedContent",void 0),n("ft-icon")(Et);const Ct={colorOutline:rt.external(at.colorOutline,"Design system"),colorOnSurfaceMedium:rt.external(at.colorOnSurfaceMedium,"Design system")},Rt=u`
|
|
141
|
+
:host {
|
|
142
|
+
display: block;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-resizer {
|
|
146
|
+
display: flex;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
ft-icon {
|
|
150
|
+
transform: rotate(-45deg);
|
|
151
|
+
color: ${Ct.colorOutline};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ft-resizer--dragging ft-icon,
|
|
155
|
+
.ft-resizer:hover ft-icon {
|
|
156
|
+
color: ${Ct.colorOnSurfaceMedium};
|
|
157
|
+
}
|
|
158
|
+
`;var Mt=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 Ut extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class kt extends ct{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return D`
|
|
141
159
|
<style>
|
|
142
160
|
.ft-resizer {
|
|
143
161
|
cursor: ${h(this.cursor)}
|
|
@@ -148,22 +166,4 @@ function(t,e){return(({finisher:t,descriptor:e})=>(i,s)=>{var o;if(void 0===s){c
|
|
|
148
166
|
@touchstart=${this.initDragFromTouch}>
|
|
149
167
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
150
168
|
</div>
|
|
151
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,s=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
152
|
-
:host {
|
|
153
|
-
display: block;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.ft-resizer {
|
|
157
|
-
display: flex;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
ft-icon {
|
|
161
|
-
transform: rotate(-45deg);
|
|
162
|
-
color: ${Rt.colorOutline};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.ft-resizer--dragging ft-icon,
|
|
166
|
-
.ft-resizer:hover ft-icon {
|
|
167
|
-
color: ${Rt.colorOnSurfaceMedium};
|
|
168
|
-
}
|
|
169
|
-
`],Et([i({type:Number})],Mt.prototype,"initialWidth",void 0),Et([i({type:Number})],Mt.prototype,"initialHeight",void 0),Et([i()],Mt.prototype,"icon",void 0),Et([i()],Mt.prototype,"cursor",void 0),Et([s()],Mt.prototype,"dragging",void 0),n("ft-resizer")(Mt),t.FtResizer=Mt,t.FtResizerCssVariables=Rt,t.ResizeEvent=Ct,Object.defineProperty(t,"i",{value:!0})}({});
|
|
169
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,s=this.fixedHeight+e-this.startY;this.dispatchEvent(new Ut(i,s))}}kt.elementDefinitions={"ft-icon":Et},kt.styles=[ht,Rt],Mt([i({type:Number})],kt.prototype,"initialWidth",void 0),Mt([i({type:Number})],kt.prototype,"initialHeight",void 0),Mt([i()],kt.prototype,"icon",void 0),Mt([i()],kt.prototype,"cursor",void 0),Mt([s()],kt.prototype,"dragging",void 0),n("ft-resizer")(kt),t.FtResizer=kt,t.FtResizerCssVariables=Ct,t.ResizeEvent=Ut,t.styles=Rt,Object.defineProperty(t,"i",{value:!0})}({});
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { customElement } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { FtResizer } from "./ft-resizer";
|
|
3
3
|
export * from "./ft-resizer";
|
|
4
|
+
export * from "./ft-resizer.css";
|
|
5
|
+
export * from "./ft-resizer.properties";
|
|
4
6
|
customElement("ft-resizer")(FtResizer);
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-resizer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "small",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "0.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "0.3.13",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.13",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "84b5fc920bc5d2bdb646b5da8815ad51caaf228e"
|
|
27
27
|
}
|