@fluid-topics/ft-resizer 1.2.27 → 1.2.29

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.
@@ -16,6 +16,7 @@ export declare class FtResizer extends FtLitElement implements FtResizerProperti
16
16
  iconVariant: FtIconVariants;
17
17
  cursor: string;
18
18
  private dragging;
19
+ private isAriaPressed;
19
20
  private fixedWidth;
20
21
  private fixedHeight;
21
22
  private startX;
@@ -23,6 +24,7 @@ export declare class FtResizer extends FtLitElement implements FtResizerProperti
23
24
  protected render(): import("lit").TemplateResult<1>;
24
25
  private initDragFromMouse;
25
26
  private initDragFromTouch;
27
+ private initKeydownPress;
26
28
  private initDrag;
27
29
  private installDocumentEventListeners;
28
30
  private doDragFromMouse;
@@ -23,6 +23,7 @@ class FtResizer extends FtLitElement {
23
23
  this.iconVariant = FtIconVariants.material;
24
24
  this.cursor = "nwse-resize";
25
25
  this.dragging = false;
26
+ this.isAriaPressed = false;
26
27
  this.fixedWidth = 0;
27
28
  this.fixedHeight = 0;
28
29
  this.startX = 0;
@@ -46,9 +47,12 @@ class FtResizer extends FtLitElement {
46
47
  }
47
48
  </style>
48
49
  <div class="ft-resizer ft-no-text-select ${this.dragging ? "ft-resizer--dragging" : ""}"
50
+ role="button"
51
+ tabindex="0"
49
52
  @mousedown=${this.initDragFromMouse}
50
- @touchstart=${this.initDragFromTouch}>
51
- <ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
53
+ @touchstart=${this.initDragFromTouch}
54
+ @keydown="${this.initKeydownPress}">
55
+ <ft-icon .variant="${this.iconVariant}" .value="${this.icon}" focusable="false" aria-hidden="true"></ft-icon>
52
56
  </div>
53
57
  `;
54
58
  }
@@ -60,6 +64,39 @@ class FtResizer extends FtLitElement {
60
64
  e.stopPropagation();
61
65
  this.initDrag(e.touches[0].clientX, e.touches[0].clientY);
62
66
  }
67
+ initKeydownPress(e) {
68
+ const key = e.key;
69
+ const handledKeys = ["Enter", "Space", "Escape", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
70
+ if (handledKeys.includes(key)) {
71
+ e.preventDefault();
72
+ e.stopPropagation();
73
+ }
74
+ this.fixedWidth = this.initialWidth;
75
+ this.fixedHeight = this.initialHeight;
76
+ if (key === "Enter" || key === "Space") {
77
+ const resizeButton = e.currentTarget;
78
+ this.isAriaPressed = !this.isAriaPressed;
79
+ resizeButton.setAttribute("aria-pressed", this.isAriaPressed.toString());
80
+ }
81
+ else if (key === "Escape") {
82
+ this.isAriaPressed = false;
83
+ }
84
+ if (this.isAriaPressed) {
85
+ if (key === "ArrowLeft") {
86
+ this.fixedWidth -= 10;
87
+ }
88
+ else if (key === "ArrowRight") {
89
+ this.fixedWidth += 10;
90
+ }
91
+ else if (key === "ArrowUp") {
92
+ this.fixedHeight -= 10;
93
+ }
94
+ else if (key === "ArrowDown") {
95
+ this.fixedHeight += 10;
96
+ }
97
+ }
98
+ this.dispatchEvent(new ResizeEvent(this.fixedWidth, this.fixedHeight));
99
+ }
63
100
  initDrag(clientX, clientY) {
64
101
  this.dragging = true;
65
102
  this.startX = clientX;
@@ -106,6 +143,9 @@ __decorate([
106
143
  __decorate([
107
144
  state()
108
145
  ], FtResizer.prototype, "dragging", void 0);
146
+ __decorate([
147
+ state()
148
+ ], FtResizer.prototype, "isAriaPressed", void 0);
109
149
  __decorate([
110
150
  eventOptions({ passive: true })
111
151
  ], FtResizer.prototype, "initDragFromMouse", null);
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var z=Object.create;var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var h=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var k=(e,a,t,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of j(a))!J.call(e,p)&&p!==t&&g(e,p,{get:()=>a[p],enumerable:!(r=$(a,p))||r.enumerable});return e};var o=(e,a,t)=>(t=e!=null?z(Z(e)):{},k(a||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e));var _=h((Q,M)=>{M.exports=ftGlobals.wcUtils});var L=h((I,c)=>{c.exports=ftGlobals.lit});var D=h((F,U)=>{U.exports=ftGlobals.litDecorators});var b=h((ee,G)=>{G.exports=ftGlobals.litUnsafeHTML});var Y=o(_());var S=o(L()),E=o(D()),C=o(_());var K=o(_());var N=o(L()),T=o(D()),W=o(_()),y=o(b());var u;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(u||(u={}));var i;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(i||(i={}));var ie=new Map([...["abw"].map(e=>[e,i.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,i.AUDIO]),...["avi"].map(e=>[e,i.AVI]),...["chm","xhs"].map(e=>[e,i.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,i.CODE]),...["csv"].map(e=>[e,i.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,i.DITA]),...["epub"].map(e=>[e,i.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,i.EXCEL]),...["flac"].map(e=>[e,i.FLAC]),...["gif"].map(e=>[e,i.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,i.GZIP]),...["html","htm","xhtml"].map(e=>[e,i.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,i.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,i.JPEG]),...["json"].map(e=>[e,i.JSON]),...["m4a","m4p"].map(e=>[e,i.M4A]),...["mov","qt"].map(e=>[e,i.MOV]),...["mp3"].map(e=>[e,i.MP3]),...["mp4","m4v"].map(e=>[e,i.MP4]),...["ogg","oga"].map(e=>[e,i.OGG]),...["pdf","ps"].map(e=>[e,i.PDF]),...["png"].map(e=>[e,i.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,i.POWERPOINT]),...["rar"].map(e=>[e,i.RAR]),...["stp"].map(e=>[e,i.STP]),...["txt","rtf","md","mdown"].map(e=>[e,i.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,i.VIDEO]),...["wav"].map(e=>[e,i.WAV]),...["wma"].map(e=>[e,i.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,i.WORD]),...["xml","xsl","rdf"].map(e=>[e,i.XML]),...["yaml","yml","x-yaml"].map(e=>[e,i.YAML]),...["zip"].map(e=>[e,i.ZIP])]);var ae={[i.ABW]:"#91ABC6",[i.AUDIO]:"#1795E3",[i.AVI]:"#E63324",[i.CHM]:"#71C3EB",[i.CODE]:"#71C3EB",[i.CSV]:"#1F7345",[i.DITA]:"#71C3EB",[i.EPUB]:"#85B926",[i.EXCEL]:"#1F7345",[i.FLAC]:"#1795E3",[i.GIF]:"#59B031",[i.GZIP]:"#F8AB36",[i.HTML]:"#71C3EB",[i.IMAGE]:"#59B031",[i.JPEG]:"#59B031",[i.JSON]:"#71C3EB",[i.M4A]:"#1795E3",[i.MOV]:"#E63324",[i.MP3]:"#1795E3",[i.MP4]:"#E63324",[i.OGG]:"#1795E3",[i.PDF]:"#E44948",[i.PNG]:"#59B031",[i.POWERPOINT]:"#B54A2B",[i.RAR]:"#F8AB36",[i.STP]:"#3764B1",[i.TEXT]:"#3162AB",[i.UNKNOWN]:"#999999",[i.VIDEO]:"#E63324",[i.WAV]:"#1795E3",[i.WMA]:"#1795E3",[i.WORD]:"#3162AB",[i.XML]:"#71C3EB",[i.YAML]:"#71C3EB",[i.ZIP]:"#F8AB36"};var H=o(L()),n=o(_()),A={size:n.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:n.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:n.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:n.FtCssVariableFactory.extend("--ft-icon-material-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:n.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},B=H.css`
1
+ "use strict";(()=>{var Y=Object.create;var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var J=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of j(t))!k.call(e,p)&&p!==a&&g(e,p,{get:()=>t[p],enumerable:!(r=$(t,p))||r.enumerable});return e};var o=(e,t,a)=>(a=e!=null?Y(Z(e)):{},J(t||!e||!e.__esModule?g(a,"default",{value:e,enumerable:!0}):a,e));var _=N((Q,M)=>{M.exports=ftGlobals.wcUtils});var R=N((I,c)=>{c.exports=ftGlobals.lit});var P=N((F,b)=>{b.exports=ftGlobals.litDecorators});var H=N((ee,U)=>{U.exports=ftGlobals.litUnsafeHTML});var X=o(_());var C=o(R()),s=o(P()),D=o(_());var w=o(_());var L=o(R()),h=o(P()),B=o(_()),W=o(H());var u;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(u||(u={}));var i;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(i||(i={}));var ie=new Map([...["abw"].map(e=>[e,i.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,i.AUDIO]),...["avi"].map(e=>[e,i.AVI]),...["chm","xhs"].map(e=>[e,i.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,i.CODE]),...["csv"].map(e=>[e,i.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,i.DITA]),...["epub"].map(e=>[e,i.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,i.EXCEL]),...["flac"].map(e=>[e,i.FLAC]),...["gif"].map(e=>[e,i.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,i.GZIP]),...["html","htm","xhtml"].map(e=>[e,i.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,i.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,i.JPEG]),...["json"].map(e=>[e,i.JSON]),...["m4a","m4p"].map(e=>[e,i.M4A]),...["mov","qt"].map(e=>[e,i.MOV]),...["mp3"].map(e=>[e,i.MP3]),...["mp4","m4v"].map(e=>[e,i.MP4]),...["ogg","oga"].map(e=>[e,i.OGG]),...["pdf","ps"].map(e=>[e,i.PDF]),...["png"].map(e=>[e,i.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,i.POWERPOINT]),...["rar"].map(e=>[e,i.RAR]),...["stp"].map(e=>[e,i.STP]),...["txt","rtf","md","mdown"].map(e=>[e,i.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,i.VIDEO]),...["wav"].map(e=>[e,i.WAV]),...["wma"].map(e=>[e,i.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,i.WORD]),...["xml","xsl","rdf"].map(e=>[e,i.XML]),...["yaml","yml","x-yaml"].map(e=>[e,i.YAML]),...["zip"].map(e=>[e,i.ZIP])]);var te={[i.ABW]:"#91ABC6",[i.AUDIO]:"#1795E3",[i.AVI]:"#E63324",[i.CHM]:"#71C3EB",[i.CODE]:"#71C3EB",[i.CSV]:"#1F7345",[i.DITA]:"#71C3EB",[i.EPUB]:"#85B926",[i.EXCEL]:"#1F7345",[i.FLAC]:"#1795E3",[i.GIF]:"#59B031",[i.GZIP]:"#F8AB36",[i.HTML]:"#71C3EB",[i.IMAGE]:"#59B031",[i.JPEG]:"#59B031",[i.JSON]:"#71C3EB",[i.M4A]:"#1795E3",[i.MOV]:"#E63324",[i.MP3]:"#1795E3",[i.MP4]:"#E63324",[i.OGG]:"#1795E3",[i.PDF]:"#E44948",[i.PNG]:"#59B031",[i.POWERPOINT]:"#B54A2B",[i.RAR]:"#F8AB36",[i.STP]:"#3764B1",[i.TEXT]:"#3162AB",[i.UNKNOWN]:"#999999",[i.VIDEO]:"#E63324",[i.WAV]:"#1795E3",[i.WMA]:"#1795E3",[i.WORD]:"#3162AB",[i.XML]:"#71C3EB",[i.YAML]:"#71C3EB",[i.ZIP]:"#F8AB36"};var G=o(R()),n=o(_()),E={size:n.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:n.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:n.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:n.FtCssVariableFactory.extend("--ft-icon-material-font-family","",n.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:n.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},y=G.css`
2
2
  :host, i.ft-icon {
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -7,14 +7,14 @@
7
7
  }
8
8
 
9
9
  :host {
10
- width: ${A.size};
11
- height: ${A.size};
10
+ width: ${E.size};
11
+ height: ${E.size};
12
12
  }
13
13
 
14
14
  i.ft-icon {
15
15
  width: 100%;
16
16
  height: 100%;
17
- font-size: ${A.size};
17
+ font-size: ${E.size};
18
18
  line-height: 1;
19
19
  font-weight: normal;
20
20
  text-transform: none;
@@ -25,33 +25,33 @@
25
25
  text-rendering: auto;
26
26
  -webkit-font-smoothing: antialiased;
27
27
  -moz-osx-font-smoothing: grayscale;
28
- vertical-align: ${A.verticalAlign};
28
+ vertical-align: ${E.verticalAlign};
29
29
  }
30
30
 
31
31
  i.ft-icon.ft-icon--fluid-topics {
32
- font-family: ${A.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
32
+ font-family: ${E.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
33
33
 
34
34
  /* Ugly fix because font is broken */
35
- font-size: calc(0.75 * ${A.size});
36
- line-height: ${A.size};
35
+ font-size: calc(0.75 * ${E.size});
36
+ line-height: ${E.size};
37
37
  position: relative;
38
38
  top: -4%;
39
39
  justify-content: center;
40
40
  }
41
41
 
42
42
  .ft-icon--file-format {
43
- font-family: ${A.fileFormatFontFamily}, ft-mime, sans-serif;
43
+ font-family: ${E.fileFormatFontFamily}, ft-mime, sans-serif;
44
44
  }
45
45
 
46
46
  .ft-icon--material {
47
- font-family: ${A.materialFontFamily}, "Material Icons", sans-serif;
47
+ font-family: ${E.materialFontFamily}, "Material Icons", sans-serif;
48
48
  }
49
- `;var f;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(f||(f={}));var v=function(e,a,t,r){var p=arguments.length,x=p<3?a:r===null?r=Object.getOwnPropertyDescriptor(a,t):r,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(e,a,t,r);else for(var O=e.length-1;O>=0;O--)(d=e[O])&&(x=(p<3?d(x):p>3?d(a,t,x):d(a,t))||x);return p>3&&x&&Object.defineProperty(a,t,x),x},m=class extends W.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=N.nothing}render(){let a=this.variant&&Object.values(f).includes(this.variant)?this.variant:f.fluid_topics,t=a!==f.material||!!this.value;return N.html`
50
- <i class="ft-icon ft-icon--${a}" part="icon icon-${a}">
51
- ${(0,y.unsafeHTML)(this.resolvedIcon)}
52
- <slot ?hidden=${t}></slot>
49
+ `;var f;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(f||(f={}));var v=function(e,t,a,r){var p=arguments.length,x=p<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,a):r,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(e,t,a,r);else for(var O=e.length-1;O>=0;O--)(d=e[O])&&(x=(p<3?d(x):p>3?d(t,a,x):d(t,a))||x);return p>3&&x&&Object.defineProperty(t,a,x),x},m=class extends B.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=L.nothing}render(){let t=this.variant&&Object.values(f).includes(this.variant)?this.variant:f.fluid_topics,a=t!==f.material||!!this.value;return L.html`
50
+ <i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
51
+ ${(0,W.unsafeHTML)(this.resolvedIcon)}
52
+ <slot ?hidden=${a}></slot>
53
53
  </i>
54
- `}get textContent(){var a,t;return(t=(a=this.slottedContent)===null||a===void 0?void 0:a.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&t!==void 0?t:""}update(a){super.update(a),["value","variant"].some(t=>a.has(t))&&this.resolveIcon()}resolveIcon(){var a,t;let r=this.value||this.textContent;switch(this.variant){case f.file_format:this.resolvedIcon=(a=i[r.replace("-","_").toUpperCase()])!==null&&a!==void 0?a:r;break;case f.material:this.resolvedIcon=this.value||N.nothing;break;default:this.resolvedIcon=(t=u[r.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:r;break}}firstUpdated(a){super.firstUpdated(a),setTimeout(()=>this.resolveIcon())}};m.elementDefinitions={};m.styles=B;v([(0,T.property)()],m.prototype,"variant",void 0);v([(0,T.property)()],m.prototype,"value",void 0);v([(0,T.state)()],m.prototype,"resolvedIcon",void 0);v([(0,T.query)("slot")],m.prototype,"slottedContent",void 0);(0,K.customElement)("ft-icon")(m);var V=o(L()),R=o(_()),w={colorOutline:R.FtCssVariableFactory.external(R.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:R.FtCssVariableFactory.external(R.designSystemVariables.colorOnSurfaceMedium,"Design system")},X=V.css`
54
+ `}get textContent(){var t,a;return(a=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&a!==void 0?a:""}update(t){super.update(t),["value","variant"].some(a=>t.has(a))&&this.resolveIcon()}resolveIcon(){var t,a;let r=this.value||this.textContent;switch(this.variant){case f.file_format:this.resolvedIcon=(t=i[r.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:r;break;case f.material:this.resolvedIcon=this.value||L.nothing;break;default:this.resolvedIcon=(a=u[r.replace("-","_").toUpperCase()])!==null&&a!==void 0?a:r;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};m.elementDefinitions={};m.styles=y;v([(0,h.property)()],m.prototype,"variant",void 0);v([(0,h.property)()],m.prototype,"value",void 0);v([(0,h.state)()],m.prototype,"resolvedIcon",void 0);v([(0,h.query)("slot")],m.prototype,"slottedContent",void 0);(0,w.customElement)("ft-icon")(m);var z=o(R()),T=o(_()),K={colorOutline:T.FtCssVariableFactory.external(T.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:T.FtCssVariableFactory.external(T.designSystemVariables.colorOnSurfaceMedium,"Design system")},V=z.css`
55
55
  :host {
56
56
  display: block;
57
57
  }
@@ -62,22 +62,26 @@
62
62
 
63
63
  ft-icon {
64
64
  transform: rotate(-45deg);
65
- color: ${w.colorOutline};
65
+ color: ${K.colorOutline};
66
66
  }
67
67
 
68
68
  .ft-resizer--dragging ft-icon,
69
- .ft-resizer:hover ft-icon {
70
- color: ${w.colorOnSurfaceMedium};
69
+ .ft-resizer:hover ft-icon,
70
+ [role="button"][aria-pressed="true"] ft-icon{
71
+ color: ${K.colorOnSurfaceMedium};
71
72
  }
72
- `;var s=function(e,a,t,r){var p=arguments.length,x=p<3?a:r===null?r=Object.getOwnPropertyDescriptor(a,t):r,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(e,a,t,r);else for(var O=e.length-1;O>=0;O--)(d=e[O])&&(x=(p<3?d(x):p>3?d(a,t,x):d(a,t))||x);return p>3&&x&&Object.defineProperty(a,t,x),x},P=class extends CustomEvent{constructor(a,t){super("resize",{detail:{width:a,height:t}})}},l=class extends C.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=f.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=a=>this.doDrag(a.clientX,a.clientY),this.doDragFromTouch=a=>this.doDrag(a.touches[0].clientX,a.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 S.html`
73
+ `;var A=function(e,t,a,r){var p=arguments.length,x=p<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,a):r,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(e,t,a,r);else for(var O=e.length-1;O>=0;O--)(d=e[O])&&(x=(p<3?d(x):p>3?d(t,a,x):d(t,a))||x);return p>3&&x&&Object.defineProperty(t,a,x),x},S=class extends CustomEvent{constructor(t,a){super("resize",{detail:{width:t,height:a}})}},l=class extends D.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=f.material,this.cursor="nwse-resize",this.dragging=!1,this.isAriaPressed=!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 C.html`
73
74
  <style>
74
75
  .ft-resizer {
75
- cursor: ${(0,S.unsafeCSS)(this.cursor)}
76
+ cursor: ${(0,C.unsafeCSS)(this.cursor)}
76
77
  }
77
78
  </style>
78
79
  <div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
80
+ role="button"
81
+ tabindex="0"
79
82
  @mousedown=${this.initDragFromMouse}
80
- @touchstart=${this.initDragFromTouch}>
81
- <ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
83
+ @touchstart=${this.initDragFromTouch}
84
+ @keydown="${this.initKeydownPress}">
85
+ <ft-icon .variant="${this.iconVariant}" .value="${this.icon}" focusable="false" aria-hidden="true"></ft-icon>
82
86
  </div>
83
- `}initDragFromMouse(a){this.initDrag(a.clientX,a.clientY)}initDragFromTouch(a){a.preventDefault(),a.stopPropagation(),this.initDrag(a.touches[0].clientX,a.touches[0].clientY)}initDrag(a,t){this.dragging=!0,this.startX=a,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(a,t){let r=this.fixedWidth+a-this.startX,p=this.fixedHeight+t-this.startY;this.dispatchEvent(new P(r,p))}};l.elementDefinitions={"ft-icon":m};l.styles=[C.noTextSelect,X];s([(0,E.property)({type:Number})],l.prototype,"initialWidth",void 0);s([(0,E.property)({type:Number})],l.prototype,"initialHeight",void 0);s([(0,E.property)()],l.prototype,"icon",void 0);s([(0,E.property)()],l.prototype,"iconVariant",void 0);s([(0,E.property)()],l.prototype,"cursor",void 0);s([(0,E.state)()],l.prototype,"dragging",void 0);s([(0,E.eventOptions)({passive:!0})],l.prototype,"initDragFromMouse",null);s([(0,E.eventOptions)({passive:!0})],l.prototype,"initDragFromTouch",null);(0,Y.customElement)("ft-resizer")(l);})();
87
+ `}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let a=t.key;if(["Enter","Space","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(a)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,a==="Enter"||a==="Space"){let p=t.currentTarget;this.isAriaPressed=!this.isAriaPressed,p.setAttribute("aria-pressed",this.isAriaPressed.toString())}else a==="Escape"&&(this.isAriaPressed=!1);this.isAriaPressed&&(a==="ArrowLeft"?this.fixedWidth-=10:a==="ArrowRight"?this.fixedWidth+=10:a==="ArrowUp"?this.fixedHeight-=10:a==="ArrowDown"&&(this.fixedHeight+=10)),this.dispatchEvent(new S(this.fixedWidth,this.fixedHeight))}initDrag(t,a){this.dragging=!0,this.startX=t,this.startY=a,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,a){let r=this.fixedWidth+t-this.startX,p=this.fixedHeight+a-this.startY;this.dispatchEvent(new S(r,p))}};l.elementDefinitions={"ft-icon":m};l.styles=[D.noTextSelect,V];A([(0,s.property)({type:Number})],l.prototype,"initialWidth",void 0);A([(0,s.property)({type:Number})],l.prototype,"initialHeight",void 0);A([(0,s.property)()],l.prototype,"icon",void 0);A([(0,s.property)()],l.prototype,"iconVariant",void 0);A([(0,s.property)()],l.prototype,"cursor",void 0);A([(0,s.state)()],l.prototype,"dragging",void 0);A([(0,s.state)()],l.prototype,"isAriaPressed",void 0);A([(0,s.eventOptions)({passive:!0})],l.prototype,"initDragFromMouse",null);A([(0,s.eventOptions)({passive:!0})],l.prototype,"initDragFromTouch",null);(0,X.customElement)("ft-resizer")(l);})();