@fluid-topics/ft-floating-menu 1.1.12 → 1.1.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.
@@ -13,7 +13,8 @@ export declare class FtBaseFloatingMenu extends FtLitElement implements FtBaseFl
13
13
  private container;
14
14
  private menuWrapper;
15
15
  private menuContent;
16
- private actionButton;
16
+ private actionButton?;
17
+ private customToggle;
17
18
  primary: boolean;
18
19
  secondary: boolean;
19
20
  tertiary: boolean;
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html } from "lit";
8
- import { property, query, state } from "lit/decorators.js";
8
+ import { property, query, queryAssignedElements, state } from "lit/decorators.js";
9
9
  import { eventPathContainsMatchingElement, FtLitElement, jsonProperty, } from "@fluid-topics/ft-wc-utils";
10
10
  import { classMap } from "lit/directives/class-map.js";
11
11
  import { FtFloatingMenuItem } from "./ft-floating-menu-item";
@@ -119,7 +119,8 @@ class FtBaseFloatingMenu extends FtLitElement {
119
119
  positionMenuWrapper() {
120
120
  this.menuWrapper.style.left = "";
121
121
  this.menuWrapper.style.top = "";
122
- computePosition(this.actionButton, this.menuWrapper, {
122
+ const reference = this.customToggle.length > 0 ? this.customToggle[0] : this.actionButton;
123
+ computePosition(reference, this.menuWrapper, {
123
124
  platform: {
124
125
  ...platform,
125
126
  getOffsetParent: (element) => {
@@ -168,6 +169,9 @@ __decorate([
168
169
  __decorate([
169
170
  query("#actions-button")
170
171
  ], FtBaseFloatingMenu.prototype, "actionButton", void 0);
172
+ __decorate([
173
+ queryAssignedElements({ slot: "toggle" })
174
+ ], FtBaseFloatingMenu.prototype, "customToggle", void 0);
171
175
  __decorate([
172
176
  property({ type: Boolean })
173
177
  ], FtBaseFloatingMenu.prototype, "primary", void 0);
@@ -0,0 +1,4 @@
1
+ export declare const FtFloatingMenuLabelCssVariables: {
2
+ color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
3
+ };
4
+ export declare const labelStyles: import("lit").CSSResult;
@@ -0,0 +1,20 @@
1
+ import { css } from "lit";
2
+ import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
3
+ export const FtFloatingMenuLabelCssVariables = {
4
+ color: FtCssVariableFactory.extend("--ft-floating-menu-label-color", "", designSystemVariables.colorOnSurfaceMedium),
5
+ };
6
+ // language=CSS
7
+ export const labelStyles = css `
8
+ .ft-floating-menu-label {
9
+ padding: 4px 8px;
10
+ }
11
+
12
+ .ft-floating-menu-label ft-typography {
13
+ flex-shrink: 1;
14
+ flex-grow: 1;
15
+ width: max-content;
16
+ text-overflow: ellipsis;
17
+ overflow: hidden;
18
+ color: ${FtFloatingMenuLabelCssVariables.color}
19
+ }
20
+ `;
@@ -0,0 +1,7 @@
1
+ import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
2
+ import { FtFloatingMenuLabelProperties } from "./ft-floating-menu-label.properties";
3
+ export declare class FtFloatingMenuLabel extends FtLitElement implements FtFloatingMenuLabelProperties {
4
+ static elementDefinitions: ElementDefinitionsMap;
5
+ static styles: import("lit").CSSResult;
6
+ protected render(): import("lit").TemplateResult<1>;
7
+ }
@@ -0,0 +1,20 @@
1
+ import { html } from "lit";
2
+ import { FtLitElement } from "@fluid-topics/ft-wc-utils";
3
+ import { FtTypography } from "@fluid-topics/ft-typography";
4
+ import { labelStyles } from "./ft-floating-menu-label.css";
5
+ class FtFloatingMenuLabel extends FtLitElement {
6
+ render() {
7
+ return html `
8
+ <div class="ft-floating-menu-label">
9
+ <ft-typography variant="caption">
10
+ <slot></slot>
11
+ </ft-typography>
12
+ </div>
13
+ `;
14
+ }
15
+ }
16
+ FtFloatingMenuLabel.elementDefinitions = {
17
+ "ft-typography": FtTypography,
18
+ };
19
+ FtFloatingMenuLabel.styles = labelStyles;
20
+ export { FtFloatingMenuLabel };
@@ -0,0 +1,2 @@
1
+ export interface FtFloatingMenuLabelProperties {
2
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -566,7 +566,7 @@ const Bo=Symbol.for(""),Fo=t=>{if(t?.r===Bo)return t?._$litStatic$},Do=t=>({_$li
566
566
  @focusin=${this.onHover}
567
567
  @focusout=${this.onOut}
568
568
  @touchstart=${this.onTouch}>
569
- <slot part="slot"></slot>
569
+ <slot part="slot" @click=${this.onClick}></slot>
570
570
  <div part="tooltip" role="tooltip" inert
571
571
  class="ft-tooltip ft-tooltip--${this.validPosition}"
572
572
  ?hidden=${!this.visible}>
@@ -576,7 +576,7 @@ const Bo=Symbol.for(""),Fo=t=>{if(t?.r===Bo)return t?._$litStatic$},Do=t=>({_$li
576
576
  </div>
577
577
  </div>
578
578
  </div>
579
- `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",qe(this.slottedElement,this.tooltip,{platform:{...Xe,getOffsetParent:t=>Xe.getOffsetParent(t,Je)},middleware:[Oe({crossAxis:!0}),xe({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}ir.elementDefinitions={"ft-typography":jo},ir.styles=qo,rr([r.property()],ir.prototype,"text",void 0),rr([r.property({type:Boolean})],ir.prototype,"manual",void 0),rr([r.property({type:Boolean})],ir.prototype,"inline",void 0),rr([r.property({type:Number})],ir.prototype,"delay",void 0),rr([r.property()],ir.prototype,"position",void 0),rr([r.queryAssignedNodes()],ir.prototype,"slotNodes",void 0),rr([r.query(".ft-tooltip--container")],ir.prototype,"container",void 0),rr([r.query(".ft-tooltip")],ir.prototype,"tooltip",void 0),rr([r.query(".ft-tooltip--content")],ir.prototype,"tooltipContent",void 0),rr([r.state()],ir.prototype,"visible",void 0),rr([r.eventOptions({passive:!0})],ir.prototype,"onTouch",null),rr([r.eventOptions({passive:!0})],ir.prototype,"onHover",null),rr([r.eventOptions({passive:!0})],ir.prototype,"onOut",null),o.customElement("ft-tooltip")(ir),function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;"}(tr||(tr={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(or||(or={})),new Map([...["abw"].map((t=>[t,or.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,or.AUDIO])),...["avi"].map((t=>[t,or.AVI])),...["chm","xhs"].map((t=>[t,or.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,or.CODE])),...["csv"].map((t=>[t,or.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,or.DITA])),...["epub"].map((t=>[t,or.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,or.EXCEL])),...["flac"].map((t=>[t,or.FLAC])),...["gif"].map((t=>[t,or.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,or.GZIP])),...["html","htm","xhtml"].map((t=>[t,or.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,or.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,or.JPEG])),...["json"].map((t=>[t,or.JSON])),...["m4a","m4p"].map((t=>[t,or.M4A])),...["mov","qt"].map((t=>[t,or.MOV])),...["mp3"].map((t=>[t,or.MP3])),...["mp4","m4v"].map((t=>[t,or.MP4])),...["ogg","oga"].map((t=>[t,or.OGG])),...["pdf","ps"].map((t=>[t,or.PDF])),...["png"].map((t=>[t,or.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,or.POWERPOINT])),...["rar"].map((t=>[t,or.RAR])),...["stp"].map((t=>[t,or.STP])),...["txt","rtf","md","mdown"].map((t=>[t,or.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,or.VIDEO])),...["wav"].map((t=>[t,or.WAV])),...["wma"].map((t=>[t,or.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,or.WORD])),...["xml","xsl","rdf"].map((t=>[t,or.XML])),...["yaml","yml","x-yaml"].map((t=>[t,or.YAML])),...["zip"].map((t=>[t,or.ZIP]))]),or.ABW,or.AUDIO,or.AVI,or.CHM,or.CODE,or.CSV,or.DITA,or.EPUB,or.EXCEL,or.FLAC,or.GIF,or.GZIP,or.HTML,or.IMAGE,or.JPEG,or.JSON,or.M4A,or.MOV,or.MP3,or.MP4,or.OGG,or.PDF,or.PNG,or.POWERPOINT,or.RAR,or.STP,or.TEXT,or.UNKNOWN,or.VIDEO,or.WAV,or.WMA,or.WORD,or.XML,or.YAML,or.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(er||(er={}));var nr=function(t,o,e,r){for(var i,n=arguments.length,a=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(n<3?i(a):n>3?i(o,e,a):i(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ar extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(er).includes(this.variant)?this.variant:er.fluid_topics,o=t!==er.material||!!this.value;return e.html`
579
+ `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",qe(this.slottedElement,this.tooltip,{platform:{...Xe,getOffsetParent:t=>Xe.getOffsetParent(t,Je)},middleware:[Oe({crossAxis:!0}),xe({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}ir.elementDefinitions={"ft-typography":jo},ir.styles=qo,rr([r.property()],ir.prototype,"text",void 0),rr([r.property({type:Boolean})],ir.prototype,"manual",void 0),rr([r.property({type:Boolean})],ir.prototype,"inline",void 0),rr([r.property({type:Number})],ir.prototype,"delay",void 0),rr([r.property()],ir.prototype,"position",void 0),rr([r.queryAssignedNodes()],ir.prototype,"slotNodes",void 0),rr([r.query(".ft-tooltip--container")],ir.prototype,"container",void 0),rr([r.query(".ft-tooltip")],ir.prototype,"tooltip",void 0),rr([r.query(".ft-tooltip--content")],ir.prototype,"tooltipContent",void 0),rr([r.state()],ir.prototype,"visible",void 0),rr([r.eventOptions({passive:!0})],ir.prototype,"onTouch",null),rr([r.eventOptions({passive:!0})],ir.prototype,"onHover",null),rr([r.eventOptions({passive:!0})],ir.prototype,"onOut",null),rr([r.eventOptions({passive:!0})],ir.prototype,"onClick",null),o.customElement("ft-tooltip")(ir),function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;"}(tr||(tr={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(or||(or={})),new Map([...["abw"].map((t=>[t,or.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,or.AUDIO])),...["avi"].map((t=>[t,or.AVI])),...["chm","xhs"].map((t=>[t,or.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,or.CODE])),...["csv"].map((t=>[t,or.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,or.DITA])),...["epub"].map((t=>[t,or.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,or.EXCEL])),...["flac"].map((t=>[t,or.FLAC])),...["gif"].map((t=>[t,or.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,or.GZIP])),...["html","htm","xhtml"].map((t=>[t,or.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,or.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,or.JPEG])),...["json"].map((t=>[t,or.JSON])),...["m4a","m4p"].map((t=>[t,or.M4A])),...["mov","qt"].map((t=>[t,or.MOV])),...["mp3"].map((t=>[t,or.MP3])),...["mp4","m4v"].map((t=>[t,or.MP4])),...["ogg","oga"].map((t=>[t,or.OGG])),...["pdf","ps"].map((t=>[t,or.PDF])),...["png"].map((t=>[t,or.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,or.POWERPOINT])),...["rar"].map((t=>[t,or.RAR])),...["stp"].map((t=>[t,or.STP])),...["txt","rtf","md","mdown"].map((t=>[t,or.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,or.VIDEO])),...["wav"].map((t=>[t,or.WAV])),...["wma"].map((t=>[t,or.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,or.WORD])),...["xml","xsl","rdf"].map((t=>[t,or.XML])),...["yaml","yml","x-yaml"].map((t=>[t,or.YAML])),...["zip"].map((t=>[t,or.ZIP]))]),or.ABW,or.AUDIO,or.AVI,or.CHM,or.CODE,or.CSV,or.DITA,or.EPUB,or.EXCEL,or.FLAC,or.GIF,or.GZIP,or.HTML,or.IMAGE,or.JPEG,or.JSON,or.M4A,or.MOV,or.MP3,or.MP4,or.OGG,or.PDF,or.PNG,or.POWERPOINT,or.RAR,or.STP,or.TEXT,or.UNKNOWN,or.VIDEO,or.WAV,or.WMA,or.WORD,or.XML,or.YAML,or.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(er||(er={}));var nr=function(t,o,e,r){for(var i,n=arguments.length,a=n<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,l=t.length-1;l>=0;l--)(i=t[l])&&(a=(n<3?i(a):n>3?i(o,e,a):i(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ar extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(er).includes(this.variant)?this.variant:er.fluid_topics,o=t!==er.material||!!this.value;return e.html`
580
580
  <i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
581
581
  ${n.unsafeHTML(this.resolvedIcon)}
582
582
  <slot ?hidden=${o}></slot>
@@ -906,4 +906,23 @@ const Bo=Symbol.for(""),Fo=t=>{if(t?.r===Bo)return t?._$litStatic$},Do=t=>({_$li
906
906
  </div>
907
907
  </div>
908
908
  </div>
909
- `}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){o.eventPathContainsMatchingElement(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){super.contentAvailableCallback(t),["menuOpen"].some((o=>t.has(o)))&&this.menuOpen&&(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper())}positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="",qe(this.actionButton,this.menuWrapper,{platform:{...Xe,getOffsetParent:t=>Xe.getOffsetParent(t,Je)},middleware:[Oe({crossAxis:!0}),xe({allowedPlacements:[this.convertPlacement()]})]}).then((({x:t,y:o})=>{this.menuWrapper.style.left=`${t}px`,this.menuWrapper.style.top=`${o}px`})),this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment+"-center"}}}vr.elementDefinitions={"ft-floating-menu-item":xr},Or([r.state()],vr.prototype,"menuOpen",void 0),Or([r.state()],vr.prototype,"forceMenuOpen",void 0),Or([r.query(".ft-floating-menu")],vr.prototype,"container",void 0),Or([r.query(".ft-floating-menu--wrapper")],vr.prototype,"menuWrapper",void 0),Or([r.query("#ft-floating-menu-options")],vr.prototype,"menuContent",void 0),Or([r.query("#actions-button")],vr.prototype,"actionButton",void 0),Or([r.property({type:Boolean})],vr.prototype,"primary",void 0),Or([r.property({type:Boolean})],vr.prototype,"secondary",void 0),Or([r.property({type:Boolean})],vr.prototype,"tertiary",void 0),Or([r.property({type:Boolean})],vr.prototype,"neutral",void 0),Or([r.property({type:Boolean})],vr.prototype,"small",void 0),Or([r.property()],vr.prototype,"label",void 0),Or([r.property()],vr.prototype,"tooltipPosition",void 0),Or([r.property()],vr.prototype,"iconVariant",void 0),Or([r.property()],vr.prototype,"icon",void 0),Or([r.property()],vr.prototype,"text",void 0),Or([r.property()],vr.prototype,"horizontalAlignment",void 0),Or([r.property()],vr.prototype,"verticalAlignment",void 0),Or([r.property({type:Boolean})],vr.prototype,"disabled",void 0),Or([o.jsonProperty([])],vr.prototype,"closeMenuMatchers",void 0);class Nr extends vr{}Nr.elementDefinitions={"ft-or-ftds-button":pr},Nr.styles=l;class Sr extends vr{}Sr.elementDefinitions={"ft-or-ftds-button":yr},Sr.styles=l,o.customElement("ft-floating-menu")(Nr),o.customElement("ftds-floating-menu")(Sr),o.customElement("ft-floating-menu-item")(xr),t.FtFloatingMenu=Nr,t.FtFloatingMenuCssVariables=a,t.FtFloatingMenuItem=xr,t.FtFloatingMenuItemCssVariables=gr,t.FtFloatingMenuItemSelect=mr,t.FtdsFloatingMenu=Sr,t.itemStyles=ur,t.styles=l}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
909
+ `}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){o.eventPathContainsMatchingElement(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){super.contentAvailableCallback(t),["menuOpen"].some((o=>t.has(o)))&&this.menuOpen&&(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper())}positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";const t=this.customToggle.length>0?this.customToggle[0]:this.actionButton;qe(t,this.menuWrapper,{platform:{...Xe,getOffsetParent:t=>Xe.getOffsetParent(t,Je)},middleware:[Oe({crossAxis:!0}),xe({allowedPlacements:[this.convertPlacement()]})]}).then((({x:t,y:o})=>{this.menuWrapper.style.left=`${t}px`,this.menuWrapper.style.top=`${o}px`})),this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment+"-center"}}}vr.elementDefinitions={"ft-floating-menu-item":xr},Or([r.state()],vr.prototype,"menuOpen",void 0),Or([r.state()],vr.prototype,"forceMenuOpen",void 0),Or([r.query(".ft-floating-menu")],vr.prototype,"container",void 0),Or([r.query(".ft-floating-menu--wrapper")],vr.prototype,"menuWrapper",void 0),Or([r.query("#ft-floating-menu-options")],vr.prototype,"menuContent",void 0),Or([r.query("#actions-button")],vr.prototype,"actionButton",void 0),Or([r.queryAssignedElements({slot:"toggle"})],vr.prototype,"customToggle",void 0),Or([r.property({type:Boolean})],vr.prototype,"primary",void 0),Or([r.property({type:Boolean})],vr.prototype,"secondary",void 0),Or([r.property({type:Boolean})],vr.prototype,"tertiary",void 0),Or([r.property({type:Boolean})],vr.prototype,"neutral",void 0),Or([r.property({type:Boolean})],vr.prototype,"small",void 0),Or([r.property()],vr.prototype,"label",void 0),Or([r.property()],vr.prototype,"tooltipPosition",void 0),Or([r.property()],vr.prototype,"iconVariant",void 0),Or([r.property()],vr.prototype,"icon",void 0),Or([r.property()],vr.prototype,"text",void 0),Or([r.property()],vr.prototype,"horizontalAlignment",void 0),Or([r.property()],vr.prototype,"verticalAlignment",void 0),Or([r.property({type:Boolean})],vr.prototype,"disabled",void 0),Or([o.jsonProperty([])],vr.prototype,"closeMenuMatchers",void 0);class Nr extends vr{}Nr.elementDefinitions={"ft-or-ftds-button":pr},Nr.styles=l;class Sr extends vr{}Sr.elementDefinitions={"ft-or-ftds-button":yr},Sr.styles=l;const wr={color:o.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",o.designSystemVariables.colorOnSurfaceMedium)},$r=e.css`
910
+ .ft-floating-menu-label {
911
+ padding: 4px 8px;
912
+ }
913
+
914
+ .ft-floating-menu-label ft-typography {
915
+ flex-shrink: 1;
916
+ flex-grow: 1;
917
+ width: max-content;
918
+ text-overflow: ellipsis;
919
+ overflow: hidden;
920
+ color: ${wr.color}
921
+ }
922
+ `;class Cr extends o.FtLitElement{render(){return e.html`
923
+ <div class="ft-floating-menu-label">
924
+ <ft-typography variant="caption">
925
+ <slot></slot>
926
+ </ft-typography>
927
+ </div>
928
+ `}}Cr.elementDefinitions={"ft-typography":jo},Cr.styles=$r,o.customElement("ft-floating-menu")(Nr),o.customElement("ftds-floating-menu")(Sr),o.customElement("ft-floating-menu-item")(xr),o.customElement("ft-floating-menu-label")(Cr),t.FtFloatingMenu=Nr,t.FtFloatingMenuCssVariables=a,t.FtFloatingMenuItem=xr,t.FtFloatingMenuItemCssVariables=gr,t.FtFloatingMenuItemSelect=mr,t.FtFloatingMenuLabel=Cr,t.FtFloatingMenuLabelCssVariables=wr,t.FtdsFloatingMenu=Sr,t.itemStyles=ur,t.labelStyles=$r,t.styles=l}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
@@ -51,7 +51,7 @@ const S={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:O},w=(t=S,o,
51
51
  */;function U(t,o){return(e,i,r)=>{const n=o=>o.renderRoot?.querySelector(t)??null;if(o){const{get:t,set:o}="object"==typeof i?e:r??(()=>{const t=Symbol();return{get(){return this[t]},set(o){this[t]=o}}})();return E(0,0,{get(){let e=t.call(this);return void 0===e&&(e=n(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return E(0,0,{get(){return n(this)}})}}
52
52
  /**
53
53
  * @license
54
- * Copyright 2017 Google LLC
54
+ * Copyright 2021 Google LLC
55
55
  * SPDX-License-Identifier: BSD-3-Clause
56
56
  */function k(t,o){try{return function(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var e,i,r;if(Array.isArray(t)){if((e=t.length)!=o.length)return!1;for(i=e;0!=i--;)if(!k(t[i],o[i]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(i of t.entries())if(!o.has(i[0]))return!1;for(i of t.entries())if(!k(i[1],o.get(i[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(i of t.entries())if(!o.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if((e=(r=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(i=e;0!=i--;)if(!Object.prototype.hasOwnProperty.call(o,r[i]))return!1;for(i=e;0!=i--;){var n=r[i];if(!k(t[n],o[n]))return!1}return!0}return t!=t&&o!=o}(t,o)}catch(t){return!1}}const I=t=>o=>{window.customElements.get(t)||window.customElements.define(t,o)};function W(t,o){const e=()=>JSON.parse(JSON.stringify(t));return C({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!k(t,o),...null!=o?o:{}})}
57
57
  /**
@@ -689,7 +689,7 @@ const _i=Symbol.for(""),Gi=t=>{if(t?.r===_i)return t?._$litStatic$},Yi=t=>({_$li
689
689
  @focusin=${this.onHover}
690
690
  @focusout=${this.onOut}
691
691
  @touchstart=${this.onTouch}>
692
- <slot part="slot"></slot>
692
+ <slot part="slot" @click=${this.onClick}></slot>
693
693
  <div part="tooltip" role="tooltip" inert
694
694
  class="ft-tooltip ft-tooltip--${this.validPosition}"
695
695
  ?hidden=${!this.visible}>
@@ -699,7 +699,13 @@ const _i=Symbol.for(""),Gi=t=>{if(t?.r===_i)return t?._$litStatic$},Yi=t=>({_$li
699
699
  </div>
700
700
  </div>
701
701
  </div>
702
- `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",sn(this.slottedElement,this.tooltip,{platform:{...an,getOffsetParent:t=>an.getOffsetParent(t,ln)},middleware:[Ur({crossAxis:!0}),Er({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}pn.elementDefinitions={"ft-typography":Qi},pn.styles=ar,fn([C()],pn.prototype,"text",void 0),fn([C({type:Boolean})],pn.prototype,"manual",void 0),fn([C({type:Boolean})],pn.prototype,"inline",void 0),fn([C({type:Number})],pn.prototype,"delay",void 0),fn([C()],pn.prototype,"position",void 0),fn([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],pn.prototype,"slotNodes",void 0),fn([U(".ft-tooltip--container")],pn.prototype,"container",void 0),fn([U(".ft-tooltip")],pn.prototype,"tooltip",void 0),fn([U(".ft-tooltip--content")],pn.prototype,"tooltipContent",void 0),fn([$()],pn.prototype,"visible",void 0),fn([R({passive:!0})],pn.prototype,"onTouch",null),fn([R({passive:!0})],pn.prototype,"onHover",null),fn([R({passive:!0})],pn.prototype,"onOut",null),I("ft-tooltip")(pn);
702
+ `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",sn(this.slottedElement,this.tooltip,{platform:{...an,getOffsetParent:t=>an.getOffsetParent(t,ln)},middleware:[Ur({crossAxis:!0}),Er({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}pn.elementDefinitions={"ft-typography":Qi},pn.styles=ar,fn([C()],pn.prototype,"text",void 0),fn([C({type:Boolean})],pn.prototype,"manual",void 0),fn([C({type:Boolean})],pn.prototype,"inline",void 0),fn([C({type:Number})],pn.prototype,"delay",void 0),fn([C()],pn.prototype,"position",void 0),fn([
703
+ /**
704
+ * @license
705
+ * Copyright 2017 Google LLC
706
+ * SPDX-License-Identifier: BSD-3-Clause
707
+ */
708
+ function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],pn.prototype,"slotNodes",void 0),fn([U(".ft-tooltip--container")],pn.prototype,"container",void 0),fn([U(".ft-tooltip")],pn.prototype,"tooltip",void 0),fn([U(".ft-tooltip--content")],pn.prototype,"tooltipContent",void 0),fn([$()],pn.prototype,"visible",void 0),fn([R({passive:!0})],pn.prototype,"onTouch",null),fn([R({passive:!0})],pn.prototype,"onHover",null),fn([R({passive:!0})],pn.prototype,"onOut",null),fn([R({passive:!0})],pn.prototype,"onClick",null),I("ft-tooltip")(pn);
703
709
  /**
704
710
  * @license
705
711
  * Copyright 2017 Google LLC
@@ -1035,4 +1041,23 @@ class hn extends Pi{constructor(t){if(super(t),this.et=tt,t.type!==Mi)throw Erro
1035
1041
  </div>
1036
1042
  </div>
1037
1043
  </div>
1038
- `}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){(function(t,o,e=window.document.body){if(o.length>0){const i=t.composedPath();for(let t of i){if(t===e)return!1;if(t.matches&&o.some((o=>t.matches(o))))return!0}}return!1})(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){super.contentAvailableCallback(t),["menuOpen"].some((o=>t.has(o)))&&this.menuOpen&&(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper())}positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="",sn(this.actionButton,this.menuWrapper,{platform:{...an,getOffsetParent:t=>an.getOffsetParent(t,ln)},middleware:[Ur({crossAxis:!0}),Er({allowedPlacements:[this.convertPlacement()]})]}).then((({x:t,y:o})=>{this.menuWrapper.style.left=`${t}px`,this.menuWrapper.style.top=`${o}px`})),this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment+"-center"}}}Ln.elementDefinitions={"ft-floating-menu-item":In},Wn([$()],Ln.prototype,"menuOpen",void 0),Wn([$()],Ln.prototype,"forceMenuOpen",void 0),Wn([U(".ft-floating-menu")],Ln.prototype,"container",void 0),Wn([U(".ft-floating-menu--wrapper")],Ln.prototype,"menuWrapper",void 0),Wn([U("#ft-floating-menu-options")],Ln.prototype,"menuContent",void 0),Wn([U("#actions-button")],Ln.prototype,"actionButton",void 0),Wn([C({type:Boolean})],Ln.prototype,"primary",void 0),Wn([C({type:Boolean})],Ln.prototype,"secondary",void 0),Wn([C({type:Boolean})],Ln.prototype,"tertiary",void 0),Wn([C({type:Boolean})],Ln.prototype,"neutral",void 0),Wn([C({type:Boolean})],Ln.prototype,"small",void 0),Wn([C()],Ln.prototype,"label",void 0),Wn([C()],Ln.prototype,"tooltipPosition",void 0),Wn([C()],Ln.prototype,"iconVariant",void 0),Wn([C()],Ln.prototype,"icon",void 0),Wn([C()],Ln.prototype,"text",void 0),Wn([C()],Ln.prototype,"horizontalAlignment",void 0),Wn([C()],Ln.prototype,"verticalAlignment",void 0),Wn([C({type:Boolean})],Ln.prototype,"disabled",void 0),Wn([W([])],Ln.prototype,"closeMenuMatchers",void 0);class Kn extends Ln{}Kn.elementDefinitions={"ft-or-ftds-button":Sn},Kn.styles=te;class zn extends Ln{}zn.elementDefinitions={"ft-or-ftds-button":$n},zn.styles=te,I("ft-floating-menu")(Kn),I("ftds-floating-menu")(zn),I("ft-floating-menu-item")(In),t.FtFloatingMenu=Kn,t.FtFloatingMenuCssVariables=Qo,t.FtFloatingMenuItem=In,t.FtFloatingMenuItemCssVariables=Rn,t.FtFloatingMenuItemSelect=kn,t.FtdsFloatingMenu=zn,t.itemStyles=En,t.styles=te}({});
1044
+ `}onClick(){this.menuOpen=!this.menuOpen,setTimeout((()=>document.addEventListener("click",this.hideOptions)))}onClickItem(){this.closeMenu()}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onContentClick(t){(function(t,o,e=window.document.body){if(o.length>0){const i=t.composedPath();for(let t of i){if(t===e)return!1;if(t.matches&&o.some((o=>t.matches(o))))return!0}}return!1})(t,this.closeMenuMatchers,this)&&(this.closeMenu(),t.stopPropagation())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}contentAvailableCallback(t){super.contentAvailableCallback(t),["menuOpen"].some((o=>t.has(o)))&&this.menuOpen&&(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper())}positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";const t=this.customToggle.length>0?this.customToggle[0]:this.actionButton;sn(t,this.menuWrapper,{platform:{...an,getOffsetParent:t=>an.getOffsetParent(t,ln)},middleware:[Ur({crossAxis:!0}),Er({allowedPlacements:[this.convertPlacement()]})]}).then((({x:t,y:o})=>{this.menuWrapper.style.left=`${t}px`,this.menuWrapper.style.top=`${o}px`})),this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment+"-center"}}}Ln.elementDefinitions={"ft-floating-menu-item":In},Wn([$()],Ln.prototype,"menuOpen",void 0),Wn([$()],Ln.prototype,"forceMenuOpen",void 0),Wn([U(".ft-floating-menu")],Ln.prototype,"container",void 0),Wn([U(".ft-floating-menu--wrapper")],Ln.prototype,"menuWrapper",void 0),Wn([U("#ft-floating-menu-options")],Ln.prototype,"menuContent",void 0),Wn([U("#actions-button")],Ln.prototype,"actionButton",void 0),Wn([function(t){return(o,e)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const o=this.renderRoot?.querySelector(n),e=o?.assignedElements(t)??[];return void 0===r?e:e.filter((t=>t.matches(r)))}})}}({slot:"toggle"})],Ln.prototype,"customToggle",void 0),Wn([C({type:Boolean})],Ln.prototype,"primary",void 0),Wn([C({type:Boolean})],Ln.prototype,"secondary",void 0),Wn([C({type:Boolean})],Ln.prototype,"tertiary",void 0),Wn([C({type:Boolean})],Ln.prototype,"neutral",void 0),Wn([C({type:Boolean})],Ln.prototype,"small",void 0),Wn([C()],Ln.prototype,"label",void 0),Wn([C()],Ln.prototype,"tooltipPosition",void 0),Wn([C()],Ln.prototype,"iconVariant",void 0),Wn([C()],Ln.prototype,"icon",void 0),Wn([C()],Ln.prototype,"text",void 0),Wn([C()],Ln.prototype,"horizontalAlignment",void 0),Wn([C()],Ln.prototype,"verticalAlignment",void 0),Wn([C({type:Boolean})],Ln.prototype,"disabled",void 0),Wn([W([])],Ln.prototype,"closeMenuMatchers",void 0);class Kn extends Ln{}Kn.elementDefinitions={"ft-or-ftds-button":Sn},Kn.styles=te;class zn extends Ln{}zn.elementDefinitions={"ft-or-ftds-button":$n},zn.styles=te;const Fn={color:vo.extend("--ft-floating-menu-label-color","",Ro.colorOnSurfaceMedium)},Zn=xt`
1045
+ .ft-floating-menu-label {
1046
+ padding: 4px 8px;
1047
+ }
1048
+
1049
+ .ft-floating-menu-label ft-typography {
1050
+ flex-shrink: 1;
1051
+ flex-grow: 1;
1052
+ width: max-content;
1053
+ text-overflow: ellipsis;
1054
+ overflow: hidden;
1055
+ color: ${Fn.color}
1056
+ }
1057
+ `;class Bn extends Fo{render(){return oo`
1058
+ <div class="ft-floating-menu-label">
1059
+ <ft-typography variant="caption">
1060
+ <slot></slot>
1061
+ </ft-typography>
1062
+ </div>
1063
+ `}}Bn.elementDefinitions={"ft-typography":Qi},Bn.styles=Zn,I("ft-floating-menu")(Kn),I("ftds-floating-menu")(zn),I("ft-floating-menu-item")(In),I("ft-floating-menu-label")(Bn),t.FtFloatingMenu=Kn,t.FtFloatingMenuCssVariables=Qo,t.FtFloatingMenuItem=In,t.FtFloatingMenuItemCssVariables=Rn,t.FtFloatingMenuItemSelect=kn,t.FtFloatingMenuLabel=Bn,t.FtFloatingMenuLabelCssVariables=Fn,t.FtdsFloatingMenu=zn,t.itemStyles=En,t.labelStyles=Zn,t.styles=te}({});
package/build/index.d.ts CHANGED
@@ -7,3 +7,6 @@ export * from "./ftds-floating-menu";
7
7
  export * from "./ft-floating-menu-item.css";
8
8
  export * from "./ft-floating-menu-item.properties";
9
9
  export * from "./ft-floating-menu-item";
10
+ export * from "./ft-floating-menu-label.css";
11
+ export * from "./ft-floating-menu-label.properties";
12
+ export * from "./ft-floating-menu-label";
package/build/index.js CHANGED
@@ -2,6 +2,7 @@ import { customElement } from "@fluid-topics/ft-wc-utils";
2
2
  import { FtFloatingMenu } from "./ft-floating-menu";
3
3
  import { FtFloatingMenuItem } from "./ft-floating-menu-item";
4
4
  import { FtdsFloatingMenu } from "./ftds-floating-menu";
5
+ import { FtFloatingMenuLabel } from "./ft-floating-menu-label";
5
6
  export * from "./ft-base-floating-menu.properties";
6
7
  export * from "./ft-floating-menu.css";
7
8
  export * from "./ft-floating-menu.properties";
@@ -11,6 +12,10 @@ export * from "./ftds-floating-menu";
11
12
  export * from "./ft-floating-menu-item.css";
12
13
  export * from "./ft-floating-menu-item.properties";
13
14
  export * from "./ft-floating-menu-item";
15
+ export * from "./ft-floating-menu-label.css";
16
+ export * from "./ft-floating-menu-label.properties";
17
+ export * from "./ft-floating-menu-label";
14
18
  customElement("ft-floating-menu")(FtFloatingMenu);
15
19
  customElement("ftds-floating-menu")(FtdsFloatingMenu);
16
20
  customElement("ft-floating-menu-item")(FtFloatingMenuItem);
21
+ customElement("ft-floating-menu-label")(FtFloatingMenuLabel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-floating-menu",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Floating menu component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,12 +20,12 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@floating-ui/dom": "1.5.3",
23
- "@fluid-topics/ft-button": "1.1.12",
24
- "@fluid-topics/ft-icon": "1.1.12",
25
- "@fluid-topics/ft-ripple": "1.1.12",
26
- "@fluid-topics/ft-typography": "1.1.12",
27
- "@fluid-topics/ft-wc-utils": "1.1.12",
23
+ "@fluid-topics/ft-button": "1.1.13",
24
+ "@fluid-topics/ft-icon": "1.1.13",
25
+ "@fluid-topics/ft-ripple": "1.1.13",
26
+ "@fluid-topics/ft-typography": "1.1.13",
27
+ "@fluid-topics/ft-wc-utils": "1.1.13",
28
28
  "lit": "3.1.0"
29
29
  },
30
- "gitHead": "81a42d69a8e10526af88b3c220eff325cbc33c3c"
30
+ "gitHead": "6678af642af51eb1590bccbeeb0de8cbc5938ab1"
31
31
  }