@covalent/components 6.0.3 → 6.0.5
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/action-ribbon/action-ribbon-base.d.ts.map +1 -0
- package/{src/action-ribbon → action-ribbon}/action-ribbon.d.ts +1 -0
- package/action-ribbon/action-ribbon.d.ts.map +1 -0
- package/action-ribbon.js +18 -0
- package/action-ribbon.mjs +13 -11
- package/alert/alert-base.d.ts.map +1 -0
- package/{src/alert → alert}/alert.d.ts +1 -0
- package/alert/alert.d.ts.map +1 -0
- package/alert.js +21 -0
- package/alert.mjs +14 -12
- package/{src/app-shell → app-shell}/app-shell.d.ts +1 -0
- package/app-shell/app-shell.d.ts.map +1 -0
- package/app-shell.js +41 -0
- package/app-shell.mjs +19 -17
- package/aria-property.mjs +2 -38
- package/base-element.mjs +2 -25
- package/{src/button → button}/button.d.ts +3 -2
- package/button/button.d.ts.map +1 -0
- package/button.js +44 -0
- package/button.mjs +11 -9
- package/card/card-base.d.ts.map +1 -0
- package/{src/card → card}/card.d.ts +3 -2
- package/card/card.d.ts.map +1 -0
- package/card.js +19 -0
- package/card.mjs +3 -1
- package/check-list-item.js +27 -0
- package/check-list-item.mjs +17 -15
- package/{src/checkbox → checkbox}/checkbox.d.ts +3 -2
- package/checkbox/checkbox.d.ts.map +1 -0
- package/checkbox.js +2 -0
- package/checkbox.mjs +15 -13
- package/chips/chip-base.d.ts.map +1 -0
- package/chips/chip-set-base.d.ts.map +1 -0
- package/{src/chips → chips}/chip-set.d.ts +1 -0
- package/chips/chip-set.d.ts.map +1 -0
- package/{src/chips → chips}/chip.d.ts +1 -0
- package/chips/chip.d.ts.map +1 -0
- package/chips/foundation.d.ts.map +1 -0
- package/circular-progress/circular-progress.d.ts +11 -0
- package/circular-progress/circular-progress.d.ts.map +1 -0
- package/circular-progress.js +65 -0
- package/circular-progress.mjs +11 -9
- package/class-map.mjs +3 -56
- package/{src/code-snippet → code-snippet}/code-snippet.d.ts +3 -2
- package/code-snippet/code-snippet.d.ts.map +1 -0
- package/code-snippet.js +13 -0
- package/code-snippet.mjs +36 -34
- package/{src/dialog → dialog}/dialog.d.ts +3 -2
- package/dialog/dialog.d.ts.map +1 -0
- package/dialog.js +1 -0
- package/dialog.mjs +15 -608
- package/dialog2.mjs +750 -0
- package/directive-helpers.mjs +2 -8
- package/{src/drawer → drawer}/drawer.d.ts +3 -2
- package/drawer/drawer.d.ts.map +1 -0
- package/drawer.js +6 -0
- package/drawer.mjs +11 -9
- package/{src/empty-state → empty-state}/empty-state.d.ts +3 -2
- package/empty-state/empty-state.d.ts.map +1 -0
- package/empty-state.js +27 -0
- package/empty-state.mjs +17 -15
- package/event-options.mjs +2 -11
- package/form-element.mjs +2 -47
- package/{src/formfield → formfield}/formfield.d.ts +3 -2
- package/formfield/formfield.d.ts.map +1 -0
- package/foundation.mjs +3 -112
- package/foundation2.mjs +2 -40
- package/{src/icon → icon}/icon.d.ts +1 -0
- package/icon/icon.d.ts.map +1 -0
- package/{src/icon-button → icon-button}/icon-button.d.ts +3 -2
- package/icon-button/icon-button.d.ts.map +1 -0
- package/icon-button.js +32 -0
- package/icon-button.mjs +23 -21
- package/icon-check-toggle.js +15 -0
- package/icon-check-toggle.mjs +5 -5
- package/{src/icon-checkbox → icon-checkbox}/icon-check-toggle.d.ts +3 -2
- package/icon-checkbox/icon-check-toggle.d.ts.map +1 -0
- package/{src/icon-radio → icon-radio}/icon-radio-toggle.d.ts +3 -2
- package/icon-radio/icon-radio-toggle.d.ts.map +1 -0
- package/icon-radio-toggle.js +14 -0
- package/icon-radio-toggle.mjs +19 -19
- package/icon.js +5 -0
- package/icon.mjs +11 -9
- package/if-defined.mjs +2 -7
- package/index.d.ts +46 -0
- package/index.d.ts.map +1 -0
- package/index.js +1 -0
- package/index.mjs +126 -0
- package/inert.esm.mjs +3 -615
- package/linear-progress/linear-progress.d.ts +11 -0
- package/linear-progress/linear-progress.d.ts.map +1 -0
- package/linear-progress.js +36 -0
- package/linear-progress.mjs +21 -19
- package/list/check-list-item.d.ts +11 -0
- package/list/check-list-item.d.ts.map +1 -0
- package/{src/list → list}/list-expansion.d.ts +5 -4
- package/list/list-expansion.d.ts.map +1 -0
- package/{src/list → list}/list-item.d.ts +3 -2
- package/list/list-item.d.ts.map +1 -0
- package/{src/list → list}/list.d.ts +3 -2
- package/list/list.d.ts.map +1 -0
- package/{src/list → list}/nav-list-item.d.ts +3 -2
- package/list/nav-list-item.d.ts.map +1 -0
- package/list/radio-list-item.d.ts +11 -0
- package/list/radio-list-item.d.ts.map +1 -0
- package/list-expansion.js +9 -0
- package/list-expansion.mjs +20 -18
- package/list-item.js +1 -0
- package/list-item.mjs +8 -48
- package/list-item2.mjs +43 -0
- package/list.js +1 -0
- package/list.mjs +2 -27
- package/list2.mjs +25 -0
- package/{src/menu → menu}/menu.d.ts +3 -2
- package/menu/menu.d.ts.map +1 -0
- package/menu.js +5 -0
- package/menu.mjs +11 -9
- package/mwc-checkbox-base.mjs +11 -168
- package/mwc-checkbox.css.mjs +2 -7
- package/mwc-drawer-base.mjs +12 -242
- package/mwc-icon.mjs +3 -20
- package/mwc-line-ripple-directive.mjs +16 -452
- package/mwc-list-base.mjs +26 -755
- package/mwc-list-item-base.mjs +9 -183
- package/mwc-list-item.css.mjs +3 -11
- package/mwc-menu-base.mjs +21 -976
- package/mwc-radio-base.mjs +11 -438
- package/mwc-radio.css.mjs +2 -7
- package/mwc-slider.css.mjs +23 -794
- package/mwc-tab-base.mjs +25 -503
- package/mwc-top-app-bar-base.mjs +12 -282
- package/nav-list-item.js +10 -0
- package/nav-list-item.mjs +26 -24
- package/observer.mjs +2 -29
- package/package.json +226 -5
- package/property.mjs +2 -17
- package/query-assigned-elements.mjs +9 -591
- package/query-assigned-nodes.mjs +2 -14
- package/query.mjs +2 -22
- package/{src/radio → radio}/radio.d.ts +3 -2
- package/radio/radio.d.ts.map +1 -0
- package/radio-list-item.js +27 -0
- package/radio-list-item.mjs +17 -15
- package/radio.js +2 -0
- package/radio.mjs +12 -10
- package/ripple-handlers.mjs +12 -666
- package/{src/select → select}/select.d.ts +3 -2
- package/select/select.d.ts.map +1 -0
- package/select.js +272 -0
- package/select.mjs +124 -122
- package/{src/side-sheet → side-sheet}/side-sheet.d.ts +2 -2
- package/side-sheet/side-sheet.d.ts.map +1 -0
- package/side-sheet.js +4 -0
- package/side-sheet.mjs +3 -3
- package/slider/slider-range.d.ts +11 -0
- package/slider/slider-range.d.ts.map +1 -0
- package/{src/slider → slider}/slider.d.ts +3 -2
- package/slider/slider.d.ts.map +1 -0
- package/slider-range.js +64 -0
- package/slider-range.mjs +23 -21
- package/slider.js +14 -0
- package/slider.mjs +16 -14
- package/{src/snackbar → snackbar}/snackbar.d.ts +3 -2
- package/snackbar/snackbar.d.ts.map +1 -0
- package/snackbar.js +93 -0
- package/snackbar.mjs +12 -10
- package/state.mjs +2 -9
- package/status-header/status-header-base.d.ts.map +1 -0
- package/{src/status-header → status-header}/status-header-item.d.ts +1 -0
- package/status-header/status-header-item.d.ts.map +1 -0
- package/{src/status-header → status-header}/status-header.d.ts +1 -0
- package/status-header/status-header.d.ts.map +1 -0
- package/status-header-item.js +4 -0
- package/status-header-item.mjs +17 -15
- package/status-header.js +24 -0
- package/status-header.mjs +17 -15
- package/style-map.mjs +2 -37
- package/style.css +1 -0
- package/{src/switch → switch}/switch.d.ts +3 -2
- package/switch/switch.d.ts.map +1 -0
- package/switch.js +174 -0
- package/switch.mjs +10 -8
- package/{src/tab → tab}/tab-bar.d.ts +3 -2
- package/tab/tab-bar.d.ts.map +1 -0
- package/{src/tab → tab}/tab.d.ts +3 -2
- package/tab/tab.d.ts.map +1 -0
- package/tab-bar.js +278 -0
- package/tab-bar.mjs +23 -21
- package/tab.js +6 -0
- package/tab.mjs +11 -9
- package/{src/text-lockup → text-lockup}/text-lockup.d.ts +1 -0
- package/text-lockup/text-lockup.d.ts.map +1 -0
- package/text-lockup.js +7 -0
- package/text-lockup.mjs +11 -9
- package/{src/textarea → textarea}/textarea.d.ts +3 -2
- package/textarea/textarea.d.ts.map +1 -0
- package/textarea.js +40 -0
- package/textarea.mjs +14 -12
- package/{src/textfield → textfield}/textfield.d.ts +3 -2
- package/textfield/textfield.d.ts.map +1 -0
- package/textfield.js +7 -0
- package/textfield.mjs +132 -39
- package/textfield2.mjs +1 -1
- package/{src/toolbar → toolbar}/toolbar.d.ts +3 -2
- package/toolbar/toolbar.d.ts.map +1 -0
- package/toolbar.js +4 -0
- package/toolbar.mjs +11 -9
- package/{src/tooltip → tooltip}/tooltip.d.ts +3 -2
- package/tooltip/tooltip.d.ts.map +1 -0
- package/tooltip.js +126 -0
- package/tooltip.mjs +66 -64
- package/top-app-bar/top-app-bar-fixed.d.ts +11 -0
- package/top-app-bar/top-app-bar-fixed.d.ts.map +1 -0
- package/{src/top-app-bar → top-app-bar}/top-app-bar.d.ts +3 -2
- package/top-app-bar/top-app-bar.d.ts.map +1 -0
- package/top-app-bar-fixed.js +28 -0
- package/top-app-bar-fixed.mjs +16 -14
- package/top-app-bar.js +3 -0
- package/top-app-bar.mjs +6 -28
- package/{src/tree-list → tree-list}/tree-list-item.d.ts +1 -0
- package/tree-list/tree-list-item.d.ts.map +1 -0
- package/{src/tree-list → tree-list}/tree-list.d.ts +1 -0
- package/tree-list/tree-list.d.ts.map +1 -0
- package/tree-list-item.js +26 -0
- package/tree-list-item.mjs +7 -5
- package/tree-list.js +10 -0
- package/tree-list.mjs +13 -12
- package/tslib.es6.mjs +1 -82
- package/{src/typography → typography}/typography.d.ts +1 -0
- package/typography/typography.d.ts.map +1 -0
- package/typography.js +4 -0
- package/typography.mjs +16 -14
- package/utils.mjs +2 -49
- package/covalent.mjs +0 -44
- package/covalent.umd.js +0 -3501
- package/src/action-ribbon/action-ribbon-base.d.ts.map +0 -1
- package/src/action-ribbon/action-ribbon.d.ts.map +0 -1
- package/src/alert/alert-base.d.ts.map +0 -1
- package/src/alert/alert.d.ts.map +0 -1
- package/src/app-shell/app-shell.d.ts.map +0 -1
- package/src/button/button.d.ts.map +0 -1
- package/src/card/card-base.d.ts.map +0 -1
- package/src/card/card.d.ts.map +0 -1
- package/src/checkbox/checkbox.d.ts.map +0 -1
- package/src/chips/chip-base.d.ts.map +0 -1
- package/src/chips/chip-set-base.d.ts.map +0 -1
- package/src/chips/chip-set.d.ts.map +0 -1
- package/src/chips/chip.d.ts.map +0 -1
- package/src/chips/foundation.d.ts.map +0 -1
- package/src/circular-progress/circular-progress.d.ts +0 -10
- package/src/circular-progress/circular-progress.d.ts.map +0 -1
- package/src/code-snippet/code-snippet.d.ts.map +0 -1
- package/src/dialog/dialog.d.ts.map +0 -1
- package/src/drawer/drawer.d.ts.map +0 -1
- package/src/empty-state/empty-state.d.ts.map +0 -1
- package/src/formfield/formfield.d.ts.map +0 -1
- package/src/icon/icon.d.ts.map +0 -1
- package/src/icon-button/icon-button.d.ts.map +0 -1
- package/src/icon-checkbox/icon-check-toggle.d.ts.map +0 -1
- package/src/icon-radio/icon-radio-toggle.d.ts.map +0 -1
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/linear-progress/linear-progress.d.ts +0 -10
- package/src/linear-progress/linear-progress.d.ts.map +0 -1
- package/src/list/check-list-item.d.ts +0 -10
- package/src/list/check-list-item.d.ts.map +0 -1
- package/src/list/list-expansion.d.ts.map +0 -1
- package/src/list/list-item.d.ts.map +0 -1
- package/src/list/list.d.ts.map +0 -1
- package/src/list/nav-list-item.d.ts.map +0 -1
- package/src/list/radio-list-item.d.ts +0 -10
- package/src/list/radio-list-item.d.ts.map +0 -1
- package/src/menu/menu.d.ts.map +0 -1
- package/src/radio/radio.d.ts.map +0 -1
- package/src/select/select.d.ts.map +0 -1
- package/src/side-sheet/side-sheet.d.ts.map +0 -1
- package/src/slider/slider-range.d.ts +0 -10
- package/src/slider/slider-range.d.ts.map +0 -1
- package/src/slider/slider.d.ts.map +0 -1
- package/src/snackbar/snackbar.d.ts.map +0 -1
- package/src/status-header/status-header-base.d.ts.map +0 -1
- package/src/status-header/status-header-item.d.ts.map +0 -1
- package/src/status-header/status-header.d.ts.map +0 -1
- package/src/switch/switch.d.ts.map +0 -1
- package/src/tab/tab-bar.d.ts.map +0 -1
- package/src/tab/tab.d.ts.map +0 -1
- package/src/text-lockup/text-lockup.d.ts.map +0 -1
- package/src/textarea/textarea.d.ts.map +0 -1
- package/src/textfield/textfield.d.ts.map +0 -1
- package/src/toolbar/toolbar.d.ts.map +0 -1
- package/src/tooltip/tooltip.d.ts.map +0 -1
- package/src/top-app-bar/top-app-bar-fixed.d.ts +0 -10
- package/src/top-app-bar/top-app-bar-fixed.d.ts.map +0 -1
- package/src/top-app-bar/top-app-bar.d.ts.map +0 -1
- package/src/tree-list/tree-list-item.d.ts.map +0 -1
- package/src/tree-list/tree-list.d.ts.map +0 -1
- package/src/typography/typography.d.ts.map +0 -1
- /package/{src/action-ribbon → action-ribbon}/action-ribbon-base.d.ts +0 -0
- /package/{src/alert → alert}/alert-base.d.ts +0 -0
- /package/{src/card → card}/card-base.d.ts +0 -0
- /package/{src/chips → chips}/chip-base.d.ts +0 -0
- /package/{src/chips → chips}/chip-set-base.d.ts +0 -0
- /package/{src/chips → chips}/foundation.d.ts +0 -0
- /package/{src/status-header → status-header}/status-header-base.d.ts +0 -0
package/tooltip.js
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("./query-assigned-elements.mjs"),L=require("./property.mjs"),X=require("./query.mjs"),tt=require("./utils.mjs"),S=require("./tslib.es6.mjs"),et=require("./foundation2.mjs");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2020 Google Inc.
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/var x;(function(o){o.RICH="mdc-tooltip--rich",o.SHOWN="mdc-tooltip--shown",o.SHOWING="mdc-tooltip--showing",o.SHOWING_TRANSITION="mdc-tooltip--showing-transition",o.HIDE="mdc-tooltip--hide",o.HIDE_TRANSITION="mdc-tooltip--hide-transition",o.MULTILINE_TOOLTIP="mdc-tooltip--multiline",o.SURFACE="mdc-tooltip__surface",o.SURFACE_ANIMATION="mdc-tooltip__surface-animation",o.TOOLTIP_CARET_TOP="mdc-tooltip__caret-surface-top",o.TOOLTIP_CARET_BOTTOM="mdc-tooltip__caret-surface-bottom"})(x||(x={}));var O={BOUNDED_ANCHOR_GAP:4,UNBOUNDED_ANCHOR_GAP:8,MIN_VIEWPORT_TOOLTIP_THRESHOLD:8,HIDE_DELAY_MS:600,SHOW_DELAY_MS:500,MIN_HEIGHT:24,MAX_WIDTH:200,CARET_INDENTATION:24,ANIMATION_SCALE:.8},G={ARIA_EXPANDED:"aria-expanded",ARIA_HASPOPUP:"aria-haspopup",PERSISTENT:"data-mdc-tooltip-persistent",SCROLLABLE_ANCESTOR:"tooltip-scrollable-ancestor",HAS_CARET:"data-mdc-tooltip-has-caret"},it={HIDDEN:"MDCTooltip:hidden"},P;(function(o){o[o.DETECTED=0]="DETECTED",o[o.START=1]="START",o[o.CENTER=2]="CENTER",o[o.END=3]="END"})(P||(P={}));var F;(function(o){o[o.DETECTED=0]="DETECTED",o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW"})(F||(F={}));var $;(function(o){o[o.BOUNDED=0]="BOUNDED",o[o.UNBOUNDED=1]="UNBOUNDED"})($||($={}));var d={LEFT:"left",RIGHT:"right",CENTER:"center",TOP:"top",BOTTOM:"bottom"},h;(function(o){o[o.DETECTED=0]="DETECTED",o[o.ABOVE_START=1]="ABOVE_START",o[o.ABOVE_CENTER=2]="ABOVE_CENTER",o[o.ABOVE_END=3]="ABOVE_END",o[o.TOP_SIDE_START=4]="TOP_SIDE_START",o[o.CENTER_SIDE_START=5]="CENTER_SIDE_START",o[o.BOTTOM_SIDE_START=6]="BOTTOM_SIDE_START",o[o.TOP_SIDE_END=7]="TOP_SIDE_END",o[o.CENTER_SIDE_END=8]="CENTER_SIDE_END",o[o.BOTTOM_SIDE_END=9]="BOTTOM_SIDE_END",o[o.BELOW_START=10]="BELOW_START",o[o.BELOW_CENTER=11]="BELOW_CENTER",o[o.BELOW_END=12]="BELOW_END"})(h||(h={}));var _;(function(o){o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW",o[o.SIDE_TOP=3]="SIDE_TOP",o[o.SIDE_CENTER=4]="SIDE_CENTER",o[o.SIDE_BOTTOM=5]="SIDE_BOTTOM"})(_||(_={}));var T;(function(o){o[o.START=1]="START",o[o.CENTER=2]="CENTER",o[o.END=3]="END",o[o.SIDE_START=4]="SIDE_START",o[o.SIDE_END=5]="SIDE_END"})(T||(T={}));/**
|
23
|
+
* @license
|
24
|
+
* Copyright 2020 Google Inc.
|
25
|
+
*
|
26
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
27
|
+
* of this software and associated documentation files (the "Software"), to deal
|
28
|
+
* in the Software without restriction, including without limitation the rights
|
29
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
30
|
+
* copies of the Software, and to permit persons to whom the Software is
|
31
|
+
* furnished to do so, subject to the following conditions:
|
32
|
+
*
|
33
|
+
* The above copyright notice and this permission notice shall be included in
|
34
|
+
* all copies or substantial portions of the Software.
|
35
|
+
*
|
36
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
37
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
38
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
39
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
40
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
41
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
42
|
+
* THE SOFTWARE.
|
43
|
+
*/var rt=function(){function o(){this.rafIDs=new Map}return o.prototype.request=function(r,t){var i=this;this.cancel(r);var e=requestAnimationFrame(function(n){i.rafIDs.delete(r),t(n)});this.rafIDs.set(r,e)},o.prototype.cancel=function(r){var t=this.rafIDs.get(r);t&&(cancelAnimationFrame(t),this.rafIDs.delete(r))},o.prototype.cancelAll=function(){var r=this;this.rafIDs.forEach(function(t,i){r.cancel(i)})},o.prototype.getQueue=function(){var r=[];return this.rafIDs.forEach(function(t,i){r.push(i)}),r},o}();/**
|
44
|
+
* @license
|
45
|
+
* Copyright 2016 Google Inc.
|
46
|
+
*
|
47
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
48
|
+
* of this software and associated documentation files (the "Software"), to deal
|
49
|
+
* in the Software without restriction, including without limitation the rights
|
50
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
51
|
+
* copies of the Software, and to permit persons to whom the Software is
|
52
|
+
* furnished to do so, subject to the following conditions:
|
53
|
+
*
|
54
|
+
* The above copyright notice and this permission notice shall be included in
|
55
|
+
* all copies or substantial portions of the Software.
|
56
|
+
*
|
57
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
58
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
59
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
60
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
61
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
62
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
63
|
+
* THE SOFTWARE.
|
64
|
+
*/var Q={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};function ot(o){return Boolean(o.document)&&typeof o.document.createElement=="function"}function J(o,r){if(ot(o)&&r in Q){var t=o.document.createElement("div"),i=Q[r],e=i.standard,n=i.prefixed,a=e in t.style;return a?e:n}return r}/**
|
65
|
+
* @license
|
66
|
+
* Copyright 2020 Google Inc.
|
67
|
+
*
|
68
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
69
|
+
* of this software and associated documentation files (the "Software"), to deal
|
70
|
+
* in the Software without restriction, including without limitation the rights
|
71
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
72
|
+
* copies of the Software, and to permit persons to whom the Software is
|
73
|
+
* furnished to do so, subject to the following conditions:
|
74
|
+
*
|
75
|
+
* The above copyright notice and this permission notice shall be included in
|
76
|
+
* all copies or substantial portions of the Software.
|
77
|
+
*
|
78
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
79
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
80
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
81
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
82
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
83
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
84
|
+
* THE SOFTWARE.
|
85
|
+
*/var p={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},D=new Set;D.add(p.BACKSPACE);D.add(p.ENTER);D.add(p.SPACEBAR);D.add(p.PAGE_UP);D.add(p.PAGE_DOWN);D.add(p.END);D.add(p.HOME);D.add(p.ARROW_LEFT);D.add(p.ARROW_UP);D.add(p.ARROW_RIGHT);D.add(p.ARROW_DOWN);D.add(p.DELETE);D.add(p.ESCAPE);D.add(p.TAB);var R={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27,TAB:9},w=new Map;w.set(R.BACKSPACE,p.BACKSPACE);w.set(R.ENTER,p.ENTER);w.set(R.SPACEBAR,p.SPACEBAR);w.set(R.PAGE_UP,p.PAGE_UP);w.set(R.PAGE_DOWN,p.PAGE_DOWN);w.set(R.END,p.END);w.set(R.HOME,p.HOME);w.set(R.ARROW_LEFT,p.ARROW_LEFT);w.set(R.ARROW_UP,p.ARROW_UP);w.set(R.ARROW_RIGHT,p.ARROW_RIGHT);w.set(R.ARROW_DOWN,p.ARROW_DOWN);w.set(R.DELETE,p.DELETE);w.set(R.ESCAPE,p.ESCAPE);w.set(R.TAB,p.TAB);var H=new Set;H.add(p.PAGE_UP);H.add(p.PAGE_DOWN);H.add(p.END);H.add(p.HOME);H.add(p.ARROW_LEFT);H.add(p.ARROW_UP);H.add(p.ARROW_RIGHT);H.add(p.ARROW_DOWN);function nt(o){var r=o.key;if(D.has(r))return r;var t=w.get(o.keyCode);return t||p.UNKNOWN}/**
|
86
|
+
* @license
|
87
|
+
* Copyright 2020 Google Inc.
|
88
|
+
*
|
89
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
90
|
+
* of this software and associated documentation files (the "Software"), to deal
|
91
|
+
* in the Software without restriction, including without limitation the rights
|
92
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
93
|
+
* copies of the Software, and to permit persons to whom the Software is
|
94
|
+
* furnished to do so, subject to the following conditions:
|
95
|
+
*
|
96
|
+
* The above copyright notice and this permission notice shall be included in
|
97
|
+
* all copies or substantial portions of the Software.
|
98
|
+
*
|
99
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
100
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
101
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
102
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
103
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
104
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
105
|
+
* THE SOFTWARE.
|
106
|
+
*/var at=x.RICH,q=x.SHOWN,Y=x.SHOWING,U=x.SHOWING_TRANSITION,V=x.HIDE,z=x.HIDE_TRANSITION,st=x.MULTILINE_TOOLTIP,j;(function(o){o.POLL_ANCHOR="poll_anchor"})(j||(j={}));var Z=typeof window<"u",lt=function(o){S.__extends(r,o);function r(t){var i=o.call(this,S.__assign(S.__assign({},r.defaultAdapter),t))||this;return i.tooltipShown=!1,i.anchorGap=O.BOUNDED_ANCHOR_GAP,i.xTooltipPos=P.DETECTED,i.yTooltipPos=F.DETECTED,i.tooltipPositionWithCaret=h.DETECTED,i.minViewportTooltipThreshold=O.MIN_VIEWPORT_TOOLTIP_THRESHOLD,i.hideDelayMs=O.HIDE_DELAY_MS,i.showDelayMs=O.SHOW_DELAY_MS,i.anchorRect=null,i.parentRect=null,i.frameId=null,i.hideTimeout=null,i.showTimeout=null,i.addAncestorScrollEventListeners=new Array,i.removeAncestorScrollEventListeners=new Array,i.animFrame=new rt,i.anchorBlurHandler=function(e){i.handleAnchorBlur(e)},i.documentClickHandler=function(e){i.handleDocumentClick(e)},i.documentKeydownHandler=function(e){i.handleKeydown(e)},i.tooltipMouseEnterHandler=function(){i.handleTooltipMouseEnter()},i.tooltipMouseLeaveHandler=function(){i.handleTooltipMouseLeave()},i.richTooltipFocusOutHandler=function(e){i.handleRichTooltipFocusOut(e)},i.windowScrollHandler=function(){i.handleWindowScrollEvent()},i.windowResizeHandler=function(){i.handleWindowChangeEvent()},i}return Object.defineProperty(r,"defaultAdapter",{get:function(){return{getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},addClass:function(){},hasClass:function(){return!1},removeClass:function(){},getComputedStyleProperty:function(){return""},setStyleProperty:function(){},setSurfaceAnimationStyleProperty:function(){},getViewportWidth:function(){return 0},getViewportHeight:function(){return 0},getTooltipSize:function(){return{width:0,height:0}},getAnchorBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getParentBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getAnchorAttribute:function(){return null},setAnchorAttribute:function(){return null},isRTL:function(){return!1},anchorContainsElement:function(){return!1},tooltipContainsElement:function(){return!1},focusAnchorElement:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerAnchorEventHandler:function(){},deregisterAnchorEventHandler:function(){},registerDocumentEventHandler:function(){},deregisterDocumentEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){},notifyHidden:function(){},getTooltipCaretBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setTooltipCaretStyle:function(){},clearTooltipCaretStyles:function(){},getActiveElement:function(){return null}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){this.richTooltip=this.adapter.hasClass(at),this.persistentTooltip=this.adapter.getAttribute(G.PERSISTENT)==="true",this.interactiveTooltip=!!this.adapter.getAnchorAttribute(G.ARIA_EXPANDED)&&this.adapter.getAnchorAttribute(G.ARIA_HASPOPUP)==="dialog",this.hasCaret=this.richTooltip&&this.adapter.getAttribute(G.HAS_CARET)==="true"},r.prototype.isShown=function(){return this.tooltipShown},r.prototype.isRich=function(){return this.richTooltip},r.prototype.isPersistent=function(){return this.persistentTooltip},r.prototype.handleAnchorMouseEnter=function(){var t=this;this.tooltipShown?this.show():(this.clearHideTimeout(),this.showTimeout=setTimeout(function(){t.show()},this.showDelayMs))},r.prototype.handleAnchorTouchstart=function(){var t=this;this.showTimeout=setTimeout(function(){t.show()},this.showDelayMs),this.adapter.registerWindowEventHandler("contextmenu",this.preventContextMenuOnLongTouch)},r.prototype.preventContextMenuOnLongTouch=function(t){t.preventDefault()},r.prototype.handleAnchorTouchend=function(){this.clearShowTimeout(),this.isShown()||this.adapter.deregisterWindowEventHandler("contextmenu",this.preventContextMenuOnLongTouch)},r.prototype.handleAnchorFocus=function(t){var i=this,e=t.relatedTarget,n=e instanceof HTMLElement&&this.adapter.tooltipContainsElement(e);n||(this.showTimeout=setTimeout(function(){i.show()},this.showDelayMs))},r.prototype.handleAnchorMouseLeave=function(){var t=this;this.clearShowTimeout(),this.hideTimeout=setTimeout(function(){t.hide()},this.hideDelayMs)},r.prototype.handleAnchorClick=function(){this.tooltipShown?this.hide():this.show()},r.prototype.handleDocumentClick=function(t){var i=t.target instanceof HTMLElement&&(this.adapter.anchorContainsElement(t.target)||this.adapter.tooltipContainsElement(t.target));this.richTooltip&&this.persistentTooltip&&i||this.hide()},r.prototype.handleKeydown=function(t){var i=nt(t);if(i===p.ESCAPE){var e=this.adapter.getActiveElement(),n=e instanceof HTMLElement&&this.adapter.tooltipContainsElement(e);n&&this.adapter.focusAnchorElement(),this.hide()}},r.prototype.handleAnchorBlur=function(t){if(this.richTooltip){var i=t.relatedTarget instanceof HTMLElement&&this.adapter.tooltipContainsElement(t.relatedTarget);if(i||t.relatedTarget===null&&this.interactiveTooltip)return}this.hide()},r.prototype.handleTooltipMouseEnter=function(){this.show()},r.prototype.handleTooltipMouseLeave=function(){var t=this;this.clearShowTimeout(),this.hideTimeout=setTimeout(function(){t.hide()},this.hideDelayMs)},r.prototype.handleRichTooltipFocusOut=function(t){var i=t.relatedTarget instanceof HTMLElement&&(this.adapter.anchorContainsElement(t.relatedTarget)||this.adapter.tooltipContainsElement(t.relatedTarget));i||t.relatedTarget===null&&this.interactiveTooltip||this.hide()},r.prototype.handleWindowScrollEvent=function(){if(this.persistentTooltip){this.handleWindowChangeEvent();return}this.hide()},r.prototype.handleWindowChangeEvent=function(){var t=this;this.animFrame.request(j.POLL_ANCHOR,function(){t.repositionTooltipOnAnchorMove()})},r.prototype.show=function(){var t,i,e=this;if(this.clearHideTimeout(),this.clearShowTimeout(),!this.tooltipShown){this.tooltipShown=!0,this.adapter.removeAttribute("aria-hidden"),this.richTooltip&&(this.interactiveTooltip&&this.adapter.setAnchorAttribute("aria-expanded","true"),this.adapter.registerEventHandler("focusout",this.richTooltipFocusOutHandler)),this.persistentTooltip||(this.adapter.registerEventHandler("mouseenter",this.tooltipMouseEnterHandler),this.adapter.registerEventHandler("mouseleave",this.tooltipMouseLeaveHandler)),this.adapter.removeClass(V),this.adapter.addClass(Y),this.isTooltipMultiline()&&!this.richTooltip&&this.adapter.addClass(st),this.anchorRect=this.adapter.getAnchorBoundingRect(),this.parentRect=this.adapter.getParentBoundingRect(),this.richTooltip?this.positionRichTooltip():this.positionPlainTooltip(),this.adapter.registerAnchorEventHandler("blur",this.anchorBlurHandler),this.adapter.registerDocumentEventHandler("click",this.documentClickHandler),this.adapter.registerDocumentEventHandler("keydown",this.documentKeydownHandler),this.adapter.registerWindowEventHandler("scroll",this.windowScrollHandler),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler);try{for(var n=S.__values(this.addAncestorScrollEventListeners),a=n.next();!a.done;a=n.next()){var c=a.value;c()}}catch(u){t={error:u}}finally{try{a&&!a.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.frameId=requestAnimationFrame(function(){e.clearAllAnimationClasses(),e.adapter.addClass(q),e.adapter.addClass(U)})}},r.prototype.hide=function(){var t,i;if(this.clearHideTimeout(),this.clearShowTimeout(),!!this.tooltipShown){this.frameId&&cancelAnimationFrame(this.frameId),this.tooltipShown=!1,this.adapter.setAttribute("aria-hidden","true"),this.adapter.deregisterEventHandler("focusout",this.richTooltipFocusOutHandler),this.richTooltip&&this.interactiveTooltip&&this.adapter.setAnchorAttribute("aria-expanded","false"),this.persistentTooltip||(this.adapter.deregisterEventHandler("mouseenter",this.tooltipMouseEnterHandler),this.adapter.deregisterEventHandler("mouseleave",this.tooltipMouseLeaveHandler)),this.clearAllAnimationClasses(),this.adapter.addClass(V),this.adapter.addClass(z),this.adapter.removeClass(q),this.adapter.deregisterAnchorEventHandler("blur",this.anchorBlurHandler),this.adapter.deregisterDocumentEventHandler("click",this.documentClickHandler),this.adapter.deregisterDocumentEventHandler("keydown",this.documentKeydownHandler),this.adapter.deregisterWindowEventHandler("scroll",this.windowScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("contextmenu",this.preventContextMenuOnLongTouch);try{for(var e=S.__values(this.removeAncestorScrollEventListeners),n=e.next();!n.done;n=e.next()){var a=n.value;a()}}catch(c){t={error:c}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}}},r.prototype.handleTransitionEnd=function(){var t=this.adapter.hasClass(V);this.adapter.removeClass(Y),this.adapter.removeClass(U),this.adapter.removeClass(V),this.adapter.removeClass(z),t&&this.showTimeout===null&&this.adapter.notifyHidden()},r.prototype.clearAllAnimationClasses=function(){this.adapter.removeClass(U),this.adapter.removeClass(z)},r.prototype.setTooltipPosition=function(t){var i=t.xPos,e=t.yPos,n=t.withCaretPos;if(this.hasCaret&&n){this.tooltipPositionWithCaret=n;return}i&&(this.xTooltipPos=i),e&&(this.yTooltipPos=e)},r.prototype.setAnchorBoundaryType=function(t){t===$.UNBOUNDED?this.anchorGap=O.UNBOUNDED_ANCHOR_GAP:this.anchorGap=O.BOUNDED_ANCHOR_GAP},r.prototype.setShowDelay=function(t){this.showDelayMs=t},r.prototype.setHideDelay=function(t){this.hideDelayMs=t},r.prototype.isTooltipMultiline=function(){var t=this.adapter.getTooltipSize();return t.height>O.MIN_HEIGHT&&t.width>=O.MAX_WIDTH},r.prototype.positionPlainTooltip=function(){var t=this.calculateTooltipStyles(this.anchorRect),i=t.top,e=t.yTransformOrigin,n=t.left,a=t.xTransformOrigin,c=Z?J(window,"transform"):"transform";this.adapter.setSurfaceAnimationStyleProperty(c+"-origin",a+" "+e),this.adapter.setStyleProperty("top",i+"px"),this.adapter.setStyleProperty("left",n+"px")},r.prototype.positionRichTooltip=function(){var t,i,e,n,a=this.adapter.getComputedStyleProperty("width");this.adapter.setStyleProperty("width",a);var c=this.hasCaret?this.calculateTooltipWithCaretStyles(this.anchorRect):this.calculateTooltipStyles(this.anchorRect),u=c.top,s=c.yTransformOrigin,l=c.left,v=c.xTransformOrigin,A=Z?J(window,"transform"):"transform";this.adapter.setSurfaceAnimationStyleProperty(A+"-origin",v+" "+s);var E=l-((i=(t=this.parentRect)===null||t===void 0?void 0:t.left)!==null&&i!==void 0?i:0),f=u-((n=(e=this.parentRect)===null||e===void 0?void 0:e.top)!==null&&n!==void 0?n:0);this.adapter.setStyleProperty("top",f+"px"),this.adapter.setStyleProperty("left",E+"px")},r.prototype.calculateTooltipStyles=function(t){if(!t)return{top:0,left:0};var i=this.adapter.getTooltipSize(),e=this.calculateYTooltipDistance(t,i.height),n=this.calculateXTooltipDistance(t,i.width);return{top:e.distance,yTransformOrigin:e.yTransformOrigin,left:n.distance,xTransformOrigin:n.xTransformOrigin}},r.prototype.calculateXTooltipDistance=function(t,i){var e=!this.adapter.isRTL(),n,a,c,u,s;this.richTooltip?(n=e?t.left-i:t.right,a=e?t.right:t.left-i,u=e?d.RIGHT:d.LEFT,s=e?d.LEFT:d.RIGHT):(n=e?t.left:t.right-i,a=e?t.right-i:t.left,c=t.left+(t.width-i)/2,u=e?d.LEFT:d.RIGHT,s=e?d.RIGHT:d.LEFT);var l=this.richTooltip?this.determineValidPositionOptions(n,a):this.determineValidPositionOptions(c,n,a);if(this.xTooltipPos===P.START&&l.has(n))return{distance:n,xTransformOrigin:u};if(this.xTooltipPos===P.END&&l.has(a))return{distance:a,xTransformOrigin:s};if(this.xTooltipPos===P.CENTER&&l.has(c))return{distance:c,xTransformOrigin:d.CENTER};var v=this.richTooltip?[{distance:a,xTransformOrigin:s},{distance:n,xTransformOrigin:u}]:[{distance:c,xTransformOrigin:d.CENTER},{distance:n,xTransformOrigin:u},{distance:a,xTransformOrigin:s}],A=v.find(function(g){var y=g.distance;return l.has(y)});if(A)return A;if(t.left<0)return{distance:this.minViewportTooltipThreshold,xTransformOrigin:d.LEFT};var E=this.adapter.getViewportWidth(),f=E-(i+this.minViewportTooltipThreshold);return{distance:f,xTransformOrigin:d.RIGHT}},r.prototype.determineValidPositionOptions=function(){for(var t,i,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=new Set,c=new Set;try{for(var u=S.__values(e),s=u.next();!s.done;s=u.next()){var l=s.value;this.positionHonorsViewportThreshold(l)?a.add(l):this.positionDoesntCollideWithViewport(l)&&c.add(l)}}catch(v){t={error:v}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}return a.size?a:c},r.prototype.positionHonorsViewportThreshold=function(t){var i=this.adapter.getViewportWidth(),e=this.adapter.getTooltipSize().width;return t+e<=i-this.minViewportTooltipThreshold&&t>=this.minViewportTooltipThreshold},r.prototype.positionDoesntCollideWithViewport=function(t){var i=this.adapter.getViewportWidth(),e=this.adapter.getTooltipSize().width;return t+e<=i&&t>=0},r.prototype.calculateYTooltipDistance=function(t,i){var e=t.bottom+this.anchorGap,n=t.top-(this.anchorGap+i),a=this.determineValidYPositionOptions(n,e);return this.yTooltipPos===F.ABOVE&&a.has(n)?{distance:n,yTransformOrigin:d.BOTTOM}:this.yTooltipPos===F.BELOW&&a.has(e)?{distance:e,yTransformOrigin:d.TOP}:a.has(e)?{distance:e,yTransformOrigin:d.TOP}:a.has(n)?{distance:n,yTransformOrigin:d.BOTTOM}:{distance:e,yTransformOrigin:d.TOP}},r.prototype.determineValidYPositionOptions=function(t,i){var e=new Set,n=new Set;return this.yPositionHonorsViewportThreshold(t)?e.add(t):this.yPositionDoesntCollideWithViewport(t)&&n.add(t),this.yPositionHonorsViewportThreshold(i)?e.add(i):this.yPositionDoesntCollideWithViewport(i)&&n.add(i),e.size?e:n},r.prototype.yPositionHonorsViewportThreshold=function(t){var i=this.adapter.getViewportHeight(),e=this.adapter.getTooltipSize().height;return t+e+this.minViewportTooltipThreshold<=i&&t>=this.minViewportTooltipThreshold},r.prototype.yPositionDoesntCollideWithViewport=function(t){var i=this.adapter.getViewportHeight(),e=this.adapter.getTooltipSize().height;return t+e<=i&&t>=0},r.prototype.calculateTooltipWithCaretStyles=function(t){this.adapter.clearTooltipCaretStyles();var i=this.adapter.getTooltipCaretBoundingRect();if(!t||!i)return{position:h.DETECTED,top:0,left:0};var e=i.width/O.ANIMATION_SCALE,n=i.height/O.ANIMATION_SCALE/2,a=this.adapter.getTooltipSize(),c=this.calculateYWithCaretDistanceOptions(t,a.height,{caretWidth:e,caretHeight:n}),u=this.calculateXWithCaretDistanceOptions(t,a.width,{caretWidth:e,caretHeight:n}),s=this.validateTooltipWithCaretDistances(c,u);s.size<1&&(s=this.generateBackupPositionOption(t,a,{caretWidth:e,caretHeight:n}));var l=this.determineTooltipWithCaretDistance(s),v=l.position,A=l.xDistance,E=l.yDistance,f=this.setCaretPositionStyles(v,{caretWidth:e,caretHeight:n}),g=f.yTransformOrigin,y=f.xTransformOrigin;return{yTransformOrigin:g,xTransformOrigin:y,top:E,left:A}},r.prototype.calculateXWithCaretDistanceOptions=function(t,i,e){var n=e.caretWidth,a=e.caretHeight,c=!this.adapter.isRTL(),u=t.left+t.width/2,s=t.left-(i+this.anchorGap+a),l=t.right+this.anchorGap+a,v=c?s:l,A=c?l:s,E=u-(O.CARET_INDENTATION+n/2),f=u-(i-O.CARET_INDENTATION-n/2),g=c?E:f,y=c?f:E,m=u-i/2,C=new Map([[T.START,g],[T.CENTER,m],[T.END,y],[T.SIDE_END,A],[T.SIDE_START,v]]);return C},r.prototype.calculateYWithCaretDistanceOptions=function(t,i,e){var n=e.caretWidth,a=e.caretHeight,c=t.top+t.height/2,u=t.bottom+this.anchorGap+a,s=t.top-(this.anchorGap+i+a),l=c-(O.CARET_INDENTATION+n/2),v=c-i/2,A=c-(i-O.CARET_INDENTATION-n/2),E=new Map([[_.ABOVE,s],[_.BELOW,u],[_.SIDE_TOP,l],[_.SIDE_CENTER,v],[_.SIDE_BOTTOM,A]]);return E},r.prototype.repositionTooltipOnAnchorMove=function(){var t=this.adapter.getAnchorBoundingRect();!t||!this.anchorRect||(t.top!==this.anchorRect.top||t.left!==this.anchorRect.left||t.height!==this.anchorRect.height||t.width!==this.anchorRect.width)&&(this.anchorRect=t,this.parentRect=this.adapter.getParentBoundingRect(),this.richTooltip?this.positionRichTooltip():this.positionPlainTooltip())},r.prototype.validateTooltipWithCaretDistances=function(t,i){var e,n,a,c,u,s,l=new Map,v=new Map,A=new Map([[_.ABOVE,[T.START,T.CENTER,T.END]],[_.BELOW,[T.START,T.CENTER,T.END]],[_.SIDE_TOP,[T.SIDE_START,T.SIDE_END]],[_.SIDE_CENTER,[T.SIDE_START,T.SIDE_END]],[_.SIDE_BOTTOM,[T.SIDE_START,T.SIDE_END]]]);try{for(var E=S.__values(A.keys()),f=E.next();!f.done;f=E.next()){var g=f.value,y=t.get(g);if(this.yPositionHonorsViewportThreshold(y))try{for(var m=(a=void 0,S.__values(A.get(g))),C=m.next();!C.done;C=m.next()){var b=C.value,B=i.get(b);if(this.positionHonorsViewportThreshold(B)){var K=this.caretPositionOptionsMapping(b,g);l.set(K,{xDistance:B,yDistance:y})}}}catch(W){a={error:W}}finally{try{C&&!C.done&&(c=m.return)&&c.call(m)}finally{if(a)throw a.error}}if(this.yPositionDoesntCollideWithViewport(y))try{for(var k=(u=void 0,S.__values(A.get(g))),M=k.next();!M.done;M=k.next()){var b=M.value,B=i.get(b);if(this.positionDoesntCollideWithViewport(B)){var K=this.caretPositionOptionsMapping(b,g);v.set(K,{xDistance:B,yDistance:y})}}}catch(W){u={error:W}}finally{try{M&&!M.done&&(s=k.return)&&s.call(k)}finally{if(u)throw u.error}}}}catch(W){e={error:W}}finally{try{f&&!f.done&&(n=E.return)&&n.call(E)}finally{if(e)throw e.error}}return l.size?l:v},r.prototype.generateBackupPositionOption=function(t,i,e){var n=!this.adapter.isRTL(),a,c;if(t.left<0)a=this.minViewportTooltipThreshold+e.caretHeight,c=n?T.END:T.START;else{var u=this.adapter.getViewportWidth();a=u-(i.width+this.minViewportTooltipThreshold+e.caretHeight),c=n?T.START:T.END}var s,l;if(t.top<0)s=this.minViewportTooltipThreshold+e.caretHeight,l=_.BELOW;else{var v=this.adapter.getViewportHeight();s=v-(i.height+this.minViewportTooltipThreshold+e.caretHeight),l=_.ABOVE}var A=this.caretPositionOptionsMapping(c,l);return new Map([[A,{xDistance:a,yDistance:s}]])},r.prototype.determineTooltipWithCaretDistance=function(t){if(t.has(this.tooltipPositionWithCaret)){var i=t.get(this.tooltipPositionWithCaret);return{position:this.tooltipPositionWithCaret,xDistance:i.xDistance,yDistance:i.yDistance}}var e=[h.ABOVE_START,h.ABOVE_CENTER,h.ABOVE_END,h.TOP_SIDE_START,h.CENTER_SIDE_START,h.BOTTOM_SIDE_START,h.TOP_SIDE_END,h.CENTER_SIDE_END,h.BOTTOM_SIDE_END,h.BELOW_START,h.BELOW_CENTER,h.BELOW_END],n=e.find(function(c){return t.has(c)}),a=t.get(n);return{position:n,xDistance:a.xDistance,yDistance:a.yDistance}},r.prototype.caretPositionOptionsMapping=function(t,i){switch(i){case _.ABOVE:if(t===T.START)return h.ABOVE_START;if(t===T.CENTER)return h.ABOVE_CENTER;if(t===T.END)return h.ABOVE_END;break;case _.BELOW:if(t===T.START)return h.BELOW_START;if(t===T.CENTER)return h.BELOW_CENTER;if(t===T.END)return h.BELOW_END;break;case _.SIDE_TOP:if(t===T.SIDE_START)return h.TOP_SIDE_START;if(t===T.SIDE_END)return h.TOP_SIDE_END;break;case _.SIDE_CENTER:if(t===T.SIDE_START)return h.CENTER_SIDE_START;if(t===T.SIDE_END)return h.CENTER_SIDE_END;break;case _.SIDE_BOTTOM:if(t===T.SIDE_START)return h.BOTTOM_SIDE_START;if(t===T.SIDE_END)return h.BOTTOM_SIDE_END;break}throw new Error("MDCTooltipFoundation: Invalid caret position of "+t+", "+i)},r.prototype.setCaretPositionStyles=function(t,i){var e,n,a=this.calculateCaretPositionOnTooltip(t,i);if(!a)return{yTransformOrigin:0,xTransformOrigin:0};this.adapter.clearTooltipCaretStyles(),this.adapter.setTooltipCaretStyle(a.yAlignment,a.yAxisPx),this.adapter.setTooltipCaretStyle(a.xAlignment,a.xAxisPx);var c=a.skew*(Math.PI/180),u=Math.cos(c);this.adapter.setTooltipCaretStyle("transform","rotate("+a.rotation+"deg) skewY("+a.skew+"deg) scaleX("+u+")"),this.adapter.setTooltipCaretStyle("transform-origin",a.xAlignment+" "+a.yAlignment);try{for(var s=S.__values(a.caretCorners),l=s.next();!l.done;l=s.next()){var v=l.value;this.adapter.setTooltipCaretStyle(v,"0")}}catch(A){e={error:A}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return{yTransformOrigin:a.yTransformOrigin,xTransformOrigin:a.xTransformOrigin}},r.prototype.calculateCaretPositionOnTooltip=function(t,i){var e=!this.adapter.isRTL(),n=this.adapter.getComputedStyleProperty("width"),a=this.adapter.getComputedStyleProperty("height");if(!(!n||!a||!i)){var c="calc(("+n+" - "+i.caretWidth+"px) / 2)",u="calc(("+a+" - "+i.caretWidth+"px) / 2)",s="0",l=O.CARET_INDENTATION+"px",v="calc("+n+" - "+l+")",A="calc("+a+" - "+l+")",E=35,f=Math.abs(90-E),g=["border-bottom-right-radius","border-top-left-radius"],y=["border-bottom-left-radius","border-top-right-radius"],m=20;switch(t){case h.BELOW_CENTER:return{yAlignment:d.TOP,xAlignment:d.LEFT,yAxisPx:s,xAxisPx:c,rotation:-1*E,skew:-1*m,xTransformOrigin:c,yTransformOrigin:s,caretCorners:g};case h.BELOW_END:return{yAlignment:d.TOP,xAlignment:e?d.RIGHT:d.LEFT,yAxisPx:s,xAxisPx:l,rotation:e?E:-1*E,skew:e?m:-1*m,xTransformOrigin:e?v:l,yTransformOrigin:s,caretCorners:e?y:g};case h.BELOW_START:return{yAlignment:d.TOP,xAlignment:e?d.LEFT:d.RIGHT,yAxisPx:s,xAxisPx:l,rotation:e?-1*E:E,skew:e?-1*m:m,xTransformOrigin:e?l:v,yTransformOrigin:s,caretCorners:e?g:y};case h.TOP_SIDE_END:return{yAlignment:d.TOP,xAlignment:e?d.LEFT:d.RIGHT,yAxisPx:l,xAxisPx:s,rotation:e?f:-1*f,skew:e?-1*m:m,xTransformOrigin:e?s:n,yTransformOrigin:l,caretCorners:e?g:y};case h.CENTER_SIDE_END:return{yAlignment:d.TOP,xAlignment:e?d.LEFT:d.RIGHT,yAxisPx:u,xAxisPx:s,rotation:e?f:-1*f,skew:e?-1*m:m,xTransformOrigin:e?s:n,yTransformOrigin:u,caretCorners:e?g:y};case h.BOTTOM_SIDE_END:return{yAlignment:d.BOTTOM,xAlignment:e?d.LEFT:d.RIGHT,yAxisPx:l,xAxisPx:s,rotation:e?-1*f:f,skew:e?m:-1*m,xTransformOrigin:e?s:n,yTransformOrigin:A,caretCorners:e?y:g};case h.TOP_SIDE_START:return{yAlignment:d.TOP,xAlignment:e?d.RIGHT:d.LEFT,yAxisPx:l,xAxisPx:s,rotation:e?-1*f:f,skew:e?m:-1*m,xTransformOrigin:e?n:s,yTransformOrigin:l,caretCorners:e?y:g};case h.CENTER_SIDE_START:return{yAlignment:d.TOP,xAlignment:e?d.RIGHT:d.LEFT,yAxisPx:u,xAxisPx:s,rotation:e?-1*f:f,skew:e?m:-1*m,xTransformOrigin:e?n:s,yTransformOrigin:u,caretCorners:e?y:g};case h.BOTTOM_SIDE_START:return{yAlignment:d.BOTTOM,xAlignment:e?d.RIGHT:d.LEFT,yAxisPx:l,xAxisPx:s,rotation:e?f:-1*f,skew:e?-1*m:m,xTransformOrigin:e?n:s,yTransformOrigin:A,caretCorners:e?g:y};case h.ABOVE_CENTER:return{yAlignment:d.BOTTOM,xAlignment:d.LEFT,yAxisPx:s,xAxisPx:c,rotation:E,skew:m,xTransformOrigin:c,yTransformOrigin:a,caretCorners:y};case h.ABOVE_END:return{yAlignment:d.BOTTOM,xAlignment:e?d.RIGHT:d.LEFT,yAxisPx:s,xAxisPx:l,rotation:e?-1*E:E,skew:e?-1*m:m,xTransformOrigin:e?v:l,yTransformOrigin:a,caretCorners:e?g:y};default:case h.ABOVE_START:return{yAlignment:d.BOTTOM,xAlignment:e?d.LEFT:d.RIGHT,yAxisPx:s,xAxisPx:l,rotation:e?E:-1*E,skew:e?m:-1*m,xTransformOrigin:e?l:v,yTransformOrigin:a,caretCorners:e?y:g}}}},r.prototype.clearShowTimeout=function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},r.prototype.clearHideTimeout=function(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},r.prototype.attachScrollHandler=function(t){var i=this;this.addAncestorScrollEventListeners.push(function(){t("scroll",i.windowScrollHandler)})},r.prototype.removeScrollHandler=function(t){var i=this;this.removeAncestorScrollEventListeners.push(function(){t("scroll",i.windowScrollHandler)})},r.prototype.destroy=function(){var t,i;this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.clearHideTimeout(),this.clearShowTimeout(),this.adapter.removeClass(q),this.adapter.removeClass(U),this.adapter.removeClass(Y),this.adapter.removeClass(V),this.adapter.removeClass(z),this.richTooltip&&this.adapter.deregisterEventHandler("focusout",this.richTooltipFocusOutHandler),this.persistentTooltip||(this.adapter.deregisterEventHandler("mouseenter",this.tooltipMouseEnterHandler),this.adapter.deregisterEventHandler("mouseleave",this.tooltipMouseLeaveHandler)),this.adapter.deregisterAnchorEventHandler("blur",this.anchorBlurHandler),this.adapter.deregisterDocumentEventHandler("click",this.documentClickHandler),this.adapter.deregisterDocumentEventHandler("keydown",this.documentKeydownHandler),this.adapter.deregisterWindowEventHandler("scroll",this.windowScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler);try{for(var e=S.__values(this.removeAncestorScrollEventListeners),n=e.next();!n.done;n=e.next()){var a=n.value;a()}}catch(c){t={error:c}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}this.animFrame.cancelAll()},r}(et.MDCFoundation);const dt=`.mdc-tooltip__surface,.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{color:#fff;color:var(--mdc-theme-text-primary-on-dark, white)}.mdc-tooltip__surface{background-color:#0009}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{z-index:9}.mdc-tooltip--showing-transition .mdc-tooltip__surface-animation{transition:opacity .15s 0ms cubic-bezier(0,0,.2,1),transform .15s 0ms cubic-bezier(0,0,.2,1)}.mdc-tooltip--hide-transition .mdc-tooltip__surface-animation{transition:opacity 75ms 0ms cubic-bezier(.4,0,1,1)}.mdc-tooltip__title{color:#000000de;color:var(--mdc-theme-text-primary-on-light, rgba(0, 0, 0, .87))}.mdc-tooltip__content{color:#0009}.mdc-tooltip__content-link{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tooltip{position:fixed;display:none}.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__surface,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-top,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-bottom{background-color:#fff}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface:before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface:before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;align-items:flex-start;border-radius:4px;display:flex;flex-direction:column;line-height:20px;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{display:block;line-height:20px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit);margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__title:before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);max-width:184px;margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:304px;align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__title,.mdc-tooltip__content{color:var(--mdc-theme-text-primary-on-background)}.mdc-tooltip__content-link{color:var(--mdc-theme-accent)}.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__surface,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-top,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-bottom{background-color:var(--mdc-theme-surface)}
|
107
|
+
`;var ct=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,N=(o,r,t,i)=>{for(var e=i>1?void 0:i?ht(r,t):r,n=o.length-1,a;n>=0;n--)(a=o[n])&&(e=(i?a(r,t,e):a(e))||e);return i&&e&&ct(r,t,e),e};exports.CovalentTooltip=class extends I.s{constructor(){super(...arguments),this.mdcFoundationClass=lt}createAdapter(){return{...tt.addHasRemoveClass(this.mdcRoot),getAttribute:r=>this.mdcRoot.getAttribute(r),setAttribute:(r,t)=>this.mdcRoot.setAttribute(r,t),removeAttribute:r=>this.mdcRoot.removeAttribute(r),getComputedStyleProperty:r=>getComputedStyle(this.mdcRoot,r).cssText,setStyleProperty:(r,t)=>this.mdcRoot.style.setProperty(r,t),setSurfaceAnimationStyleProperty:(r,t)=>this.mdcSurface.style.setProperty(r,t),getViewportWidth:()=>Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),getViewportHeight:()=>Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),getTooltipSize:()=>Object.assign({width:this.mdcRoot.clientWidth,height:this.mdcRoot.clientHeight}),getAnchorBoundingRect:()=>{var r;return((r=this.anchor)==null?void 0:r.getBoundingClientRect())??null},getParentBoundingRect:()=>{var r;return((r=this.renderRoot.getRootNode().parentElement)==null?void 0:r.getBoundingClientRect())??null},getAnchorAttribute:r=>{var t;return((t=this.anchor)==null?void 0:t.getAttribute(r))??null},setAnchorAttribute:(r,t)=>{var i;return(i=this.anchor)==null?void 0:i.setAttribute(r,t)},isRTL:()=>!1,anchorContainsElement:r=>{var t;return((t=this.anchor)==null?void 0:t.contains(r))??!1},tooltipContainsElement:r=>this.contains(r),focusAnchorElement:()=>{var r;return(r=this.anchor)==null?void 0:r.focus()},registerEventHandler:(r,t)=>{var i;return(i=this.mdcRoot)==null?void 0:i.addEventListener(r,t)},deregisterEventHandler:(r,t)=>{var i;return(i=this.mdcRoot)==null?void 0:i.removeEventListener(r,t)},registerAnchorEventHandler:(r,t)=>{var i;return(i=this.anchor)==null?void 0:i.addEventListener(r,t)},deregisterAnchorEventHandler:(r,t)=>{var i;return(i=this.anchor)==null?void 0:i.removeEventListener(r,t)},registerDocumentEventHandler:(r,t)=>document.addEventListener(r,t),deregisterDocumentEventHandler:(r,t)=>document.removeEventListener(r,t),registerWindowEventHandler:(r,t)=>window.addEventListener(r,t),deregisterWindowEventHandler:(r,t)=>window.removeEventListener(r,t),notifyHidden:()=>this.dispatchEvent(new Event(it.HIDDEN)),getTooltipCaretBoundingRect:()=>null,setTooltipCaretStyle:()=>{},clearTooltipCaretStyles:()=>{},getActiveElement:()=>document.activeElement}}updated(r){super.updated(r),this.showDelay!==void 0&&!isNaN(this.showDelay)&&this.mdcFoundation.setShowDelay(this.showDelay),this.hideDelay!==void 0&&!isNaN(this.hideDelay)&&this.mdcFoundation.setHideDelay(this.hideDelay)}async firstUpdated(){var r,t,i,e,n;this.mdcFoundation!==void 0&&this.mdcFoundation.destroy(),this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),(r=this.anchor)==null||r.addEventListener("click",()=>this.mdcFoundation.handleAnchorClick()),(t=this.anchor)==null||t.addEventListener("mouseenter",()=>this.mdcFoundation.handleAnchorMouseEnter()),(i=this.anchor)==null||i.addEventListener("touchstart",()=>this.mdcFoundation.handleAnchorTouchstart()),this.persistent||((e=this.anchor)==null||e.addEventListener("mouseleave",()=>this.mdcFoundation.handleAnchorMouseLeave()),(n=this.anchor)==null||n.addEventListener("touchend",()=>this.mdcFoundation.handleAnchorTouchend()))}disconnectedCallback(){var r,t,i,e,n;super.connectedCallback(),(r=this.anchor)==null||r.removeEventListener("click",()=>this.mdcFoundation.handleAnchorClick()),(t=this.anchor)==null||t.removeEventListener("mouseenter",()=>this.mdcFoundation.handleAnchorMouseEnter()),(i=this.anchor)==null||i.removeEventListener("mouseleave",()=>this.mdcFoundation.handleAnchorMouseLeave()),(e=this.anchor)==null||e.removeEventListener("touchstart",()=>this.mdcFoundation.handleAnchorTouchstart()),(n=this.anchor)==null||n.removeEventListener("touchend",()=>this.mdcFoundation.handleAnchorTouchend())}render(){return I.y`
|
108
|
+
<div
|
109
|
+
class="mdc-tooltip ${this.rich?"mdc-tooltip--rich":""}"
|
110
|
+
role="tooltip"
|
111
|
+
aria-hidden="true"
|
112
|
+
data-mdc-tooltip-persistent="true"
|
113
|
+
>
|
114
|
+
<div class="mdc-tooltip__surface mdc-tooltip__surface-animation">
|
115
|
+
${this.rich?I.y`<div class="mdc-tooltip__title">${this.richTitle}</div>
|
116
|
+
<div class="mdc-tooltip__content">
|
117
|
+
<slot></slot>
|
118
|
+
</div>
|
119
|
+
<div class="mdc-tooltip--rich-actions">
|
120
|
+
<slot name="actionItems"></slot>
|
121
|
+
</div>`:I.y`<slot></slot>`}
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
`}};exports.CovalentTooltip.styles=[I.i`
|
125
|
+
${I.r(dt)}
|
126
|
+
`];N([X.i(".mdc-tooltip")],exports.CovalentTooltip.prototype,"mdcRoot",2);N([X.i(".mdc-tooltip__surface")],exports.CovalentTooltip.prototype,"mdcSurface",2);N([L.e({type:Object})],exports.CovalentTooltip.prototype,"anchor",2);N([L.e()],exports.CovalentTooltip.prototype,"richTitle",2);N([L.e({type:Boolean,reflect:!0})],exports.CovalentTooltip.prototype,"rich",2);N([L.e({type:Boolean,reflect:!0})],exports.CovalentTooltip.prototype,"persistent",2);N([L.e({type:Number})],exports.CovalentTooltip.prototype,"showDelay",2);N([L.e({type:Number})],exports.CovalentTooltip.prototype,"hideDelay",2);exports.CovalentTooltip=N([I.e("cv-tooltip")],exports.CovalentTooltip);const pt=exports.CovalentTooltip;exports.default=pt;
|
package/tooltip.mjs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { i as it, r as rt, s as ot, y as Y, e as nt } from "./query-assigned-elements.mjs";
|
2
2
|
import { e as L } from "./property.mjs";
|
3
3
|
import { i as et } from "./query.mjs";
|
4
4
|
import { a as at } from "./utils.mjs";
|
5
|
-
import {
|
5
|
+
import { a as st, b as J, c as H } from "./tslib.es6.mjs";
|
6
6
|
import { M as lt } from "./foundation2.mjs";
|
7
7
|
/**
|
8
8
|
* @license
|
@@ -78,10 +78,10 @@ var _;
|
|
78
78
|
(function(i) {
|
79
79
|
i[i.ABOVE = 1] = "ABOVE", i[i.BELOW = 2] = "BELOW", i[i.SIDE_TOP = 3] = "SIDE_TOP", i[i.SIDE_CENTER = 4] = "SIDE_CENTER", i[i.SIDE_BOTTOM = 5] = "SIDE_BOTTOM";
|
80
80
|
})(_ || (_ = {}));
|
81
|
-
var
|
81
|
+
var T;
|
82
82
|
(function(i) {
|
83
83
|
i[i.START = 1] = "START", i[i.CENTER = 2] = "CENTER", i[i.END = 3] = "END", i[i.SIDE_START = 4] = "SIDE_START", i[i.SIDE_END = 5] = "SIDE_END";
|
84
|
-
})(
|
84
|
+
})(T || (T = {}));
|
85
85
|
/**
|
86
86
|
* @license
|
87
87
|
* Copyright 2020 Google Inc.
|
@@ -300,11 +300,11 @@ function pt(i) {
|
|
300
300
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
301
301
|
* THE SOFTWARE.
|
302
302
|
*/
|
303
|
-
var ut = x.RICH, $ = x.SHOWN, q = x.SHOWING, U = x.SHOWING_TRANSITION, V = x.HIDE, z = x.HIDE_TRANSITION,
|
303
|
+
var ut = x.RICH, $ = x.SHOWN, q = x.SHOWING, U = x.SHOWING_TRANSITION, V = x.HIDE, z = x.HIDE_TRANSITION, Tt = x.MULTILINE_TOOLTIP, Q;
|
304
304
|
(function(i) {
|
305
305
|
i.POLL_ANCHOR = "poll_anchor";
|
306
306
|
})(Q || (Q = {}));
|
307
|
-
var tt = typeof window < "u",
|
307
|
+
var tt = typeof window < "u", mt = (
|
308
308
|
/** @class */
|
309
309
|
function(i) {
|
310
310
|
st(o, i);
|
@@ -490,7 +490,7 @@ var tt = typeof window < "u", Tt = (
|
|
490
490
|
}, o.prototype.show = function() {
|
491
491
|
var t, r, e = this;
|
492
492
|
if (this.clearHideTimeout(), this.clearShowTimeout(), !this.tooltipShown) {
|
493
|
-
this.tooltipShown = !0, this.adapter.removeAttribute("aria-hidden"), this.richTooltip && (this.interactiveTooltip && this.adapter.setAnchorAttribute("aria-expanded", "true"), this.adapter.registerEventHandler("focusout", this.richTooltipFocusOutHandler)), this.persistentTooltip || (this.adapter.registerEventHandler("mouseenter", this.tooltipMouseEnterHandler), this.adapter.registerEventHandler("mouseleave", this.tooltipMouseLeaveHandler)), this.adapter.removeClass(V), this.adapter.addClass(q), this.isTooltipMultiline() && !this.richTooltip && this.adapter.addClass(
|
493
|
+
this.tooltipShown = !0, this.adapter.removeAttribute("aria-hidden"), this.richTooltip && (this.interactiveTooltip && this.adapter.setAnchorAttribute("aria-expanded", "true"), this.adapter.registerEventHandler("focusout", this.richTooltipFocusOutHandler)), this.persistentTooltip || (this.adapter.registerEventHandler("mouseenter", this.tooltipMouseEnterHandler), this.adapter.registerEventHandler("mouseleave", this.tooltipMouseLeaveHandler)), this.adapter.removeClass(V), this.adapter.addClass(q), this.isTooltipMultiline() && !this.richTooltip && this.adapter.addClass(Tt), this.anchorRect = this.adapter.getAnchorBoundingRect(), this.parentRect = this.adapter.getParentBoundingRect(), this.richTooltip ? this.positionRichTooltip() : this.positionPlainTooltip(), this.adapter.registerAnchorEventHandler("blur", this.anchorBlurHandler), this.adapter.registerDocumentEventHandler("click", this.documentClickHandler), this.adapter.registerDocumentEventHandler("keydown", this.documentKeydownHandler), this.adapter.registerWindowEventHandler("scroll", this.windowScrollHandler), this.adapter.registerWindowEventHandler("resize", this.windowResizeHandler);
|
494
494
|
try {
|
495
495
|
for (var n = H(this.addAncestorScrollEventListeners), a = n.next(); !a.done; a = n.next()) {
|
496
496
|
var c = a.value;
|
@@ -657,12 +657,12 @@ var tt = typeof window < "u", Tt = (
|
|
657
657
|
left: A
|
658
658
|
};
|
659
659
|
}, o.prototype.calculateXWithCaretDistanceOptions = function(t, r, e) {
|
660
|
-
var n = e.caretWidth, a = e.caretHeight, c = !this.adapter.isRTL(), u = t.left + t.width / 2, s = t.left - (r + this.anchorGap + a), l = t.right + this.anchorGap + a, g = c ? s : l, A = c ? l : s, E = u - (O.CARET_INDENTATION + n / 2), f = u - (r - O.CARET_INDENTATION - n / 2), v = c ? E : f, y = c ? f : E,
|
661
|
-
[
|
662
|
-
[
|
663
|
-
[
|
664
|
-
[
|
665
|
-
[
|
660
|
+
var n = e.caretWidth, a = e.caretHeight, c = !this.adapter.isRTL(), u = t.left + t.width / 2, s = t.left - (r + this.anchorGap + a), l = t.right + this.anchorGap + a, g = c ? s : l, A = c ? l : s, E = u - (O.CARET_INDENTATION + n / 2), f = u - (r - O.CARET_INDENTATION - n / 2), v = c ? E : f, y = c ? f : E, m = u - r / 2, C = /* @__PURE__ */ new Map([
|
661
|
+
[T.START, v],
|
662
|
+
[T.CENTER, m],
|
663
|
+
[T.END, y],
|
664
|
+
[T.SIDE_END, A],
|
665
|
+
[T.SIDE_START, g]
|
666
666
|
]);
|
667
667
|
return C;
|
668
668
|
}, o.prototype.calculateYWithCaretDistanceOptions = function(t, r, e) {
|
@@ -682,30 +682,30 @@ var tt = typeof window < "u", Tt = (
|
|
682
682
|
[
|
683
683
|
_.ABOVE,
|
684
684
|
[
|
685
|
-
|
686
|
-
|
687
|
-
|
685
|
+
T.START,
|
686
|
+
T.CENTER,
|
687
|
+
T.END
|
688
688
|
]
|
689
689
|
],
|
690
690
|
[
|
691
691
|
_.BELOW,
|
692
692
|
[
|
693
|
-
|
694
|
-
|
695
|
-
|
693
|
+
T.START,
|
694
|
+
T.CENTER,
|
695
|
+
T.END
|
696
696
|
]
|
697
697
|
],
|
698
698
|
[
|
699
699
|
_.SIDE_TOP,
|
700
|
-
[
|
700
|
+
[T.SIDE_START, T.SIDE_END]
|
701
701
|
],
|
702
702
|
[
|
703
703
|
_.SIDE_CENTER,
|
704
|
-
[
|
704
|
+
[T.SIDE_START, T.SIDE_END]
|
705
705
|
],
|
706
706
|
[
|
707
707
|
_.SIDE_BOTTOM,
|
708
|
-
[
|
708
|
+
[T.SIDE_START, T.SIDE_END]
|
709
709
|
]
|
710
710
|
]);
|
711
711
|
try {
|
@@ -713,18 +713,18 @@ var tt = typeof window < "u", Tt = (
|
|
713
713
|
var v = f.value, y = t.get(v);
|
714
714
|
if (this.yPositionHonorsViewportThreshold(y))
|
715
715
|
try {
|
716
|
-
for (var
|
717
|
-
var
|
718
|
-
if (this.positionHonorsViewportThreshold(
|
719
|
-
var K = this.caretPositionOptionsMapping(
|
720
|
-
l.set(K, { xDistance:
|
716
|
+
for (var m = (a = void 0, H(A.get(v))), C = m.next(); !C.done; C = m.next()) {
|
717
|
+
var b = C.value, B = r.get(b);
|
718
|
+
if (this.positionHonorsViewportThreshold(B)) {
|
719
|
+
var K = this.caretPositionOptionsMapping(b, v);
|
720
|
+
l.set(K, { xDistance: B, yDistance: y });
|
721
721
|
}
|
722
722
|
}
|
723
723
|
} catch (W) {
|
724
724
|
a = { error: W };
|
725
725
|
} finally {
|
726
726
|
try {
|
727
|
-
C && !C.done && (c =
|
727
|
+
C && !C.done && (c = m.return) && c.call(m);
|
728
728
|
} finally {
|
729
729
|
if (a)
|
730
730
|
throw a.error;
|
@@ -733,10 +733,10 @@ var tt = typeof window < "u", Tt = (
|
|
733
733
|
if (this.yPositionDoesntCollideWithViewport(y))
|
734
734
|
try {
|
735
735
|
for (var k = (u = void 0, H(A.get(v))), M = k.next(); !M.done; M = k.next()) {
|
736
|
-
var
|
737
|
-
if (this.positionDoesntCollideWithViewport(
|
738
|
-
var K = this.caretPositionOptionsMapping(
|
739
|
-
g.set(K, { xDistance:
|
736
|
+
var b = M.value, B = r.get(b);
|
737
|
+
if (this.positionDoesntCollideWithViewport(B)) {
|
738
|
+
var K = this.caretPositionOptionsMapping(b, v);
|
739
|
+
g.set(K, { xDistance: B, yDistance: y });
|
740
740
|
}
|
741
741
|
}
|
742
742
|
} catch (W) {
|
@@ -764,10 +764,10 @@ var tt = typeof window < "u", Tt = (
|
|
764
764
|
}, o.prototype.generateBackupPositionOption = function(t, r, e) {
|
765
765
|
var n = !this.adapter.isRTL(), a, c;
|
766
766
|
if (t.left < 0)
|
767
|
-
a = this.minViewportTooltipThreshold + e.caretHeight, c = n ?
|
767
|
+
a = this.minViewportTooltipThreshold + e.caretHeight, c = n ? T.END : T.START;
|
768
768
|
else {
|
769
769
|
var u = this.adapter.getViewportWidth();
|
770
|
-
a = u - (r.width + this.minViewportTooltipThreshold + e.caretHeight), c = n ?
|
770
|
+
a = u - (r.width + this.minViewportTooltipThreshold + e.caretHeight), c = n ? T.START : T.END;
|
771
771
|
}
|
772
772
|
var s, l;
|
773
773
|
if (t.top < 0)
|
@@ -811,37 +811,37 @@ var tt = typeof window < "u", Tt = (
|
|
811
811
|
}, o.prototype.caretPositionOptionsMapping = function(t, r) {
|
812
812
|
switch (r) {
|
813
813
|
case _.ABOVE:
|
814
|
-
if (t ===
|
814
|
+
if (t === T.START)
|
815
815
|
return h.ABOVE_START;
|
816
|
-
if (t ===
|
816
|
+
if (t === T.CENTER)
|
817
817
|
return h.ABOVE_CENTER;
|
818
|
-
if (t ===
|
818
|
+
if (t === T.END)
|
819
819
|
return h.ABOVE_END;
|
820
820
|
break;
|
821
821
|
case _.BELOW:
|
822
|
-
if (t ===
|
822
|
+
if (t === T.START)
|
823
823
|
return h.BELOW_START;
|
824
|
-
if (t ===
|
824
|
+
if (t === T.CENTER)
|
825
825
|
return h.BELOW_CENTER;
|
826
|
-
if (t ===
|
826
|
+
if (t === T.END)
|
827
827
|
return h.BELOW_END;
|
828
828
|
break;
|
829
829
|
case _.SIDE_TOP:
|
830
|
-
if (t ===
|
830
|
+
if (t === T.SIDE_START)
|
831
831
|
return h.TOP_SIDE_START;
|
832
|
-
if (t ===
|
832
|
+
if (t === T.SIDE_END)
|
833
833
|
return h.TOP_SIDE_END;
|
834
834
|
break;
|
835
835
|
case _.SIDE_CENTER:
|
836
|
-
if (t ===
|
836
|
+
if (t === T.SIDE_START)
|
837
837
|
return h.CENTER_SIDE_START;
|
838
|
-
if (t ===
|
838
|
+
if (t === T.SIDE_END)
|
839
839
|
return h.CENTER_SIDE_END;
|
840
840
|
break;
|
841
841
|
case _.SIDE_BOTTOM:
|
842
|
-
if (t ===
|
842
|
+
if (t === T.SIDE_START)
|
843
843
|
return h.BOTTOM_SIDE_START;
|
844
|
-
if (t ===
|
844
|
+
if (t === T.SIDE_END)
|
845
845
|
return h.BOTTOM_SIDE_END;
|
846
846
|
break;
|
847
847
|
}
|
@@ -875,7 +875,7 @@ var tt = typeof window < "u", Tt = (
|
|
875
875
|
}, o.prototype.calculateCaretPositionOnTooltip = function(t, r) {
|
876
876
|
var e = !this.adapter.isRTL(), n = this.adapter.getComputedStyleProperty("width"), a = this.adapter.getComputedStyleProperty("height");
|
877
877
|
if (!(!n || !a || !r)) {
|
878
|
-
var c = "calc((" + n + " - " + r.caretWidth + "px) / 2)", u = "calc((" + a + " - " + r.caretWidth + "px) / 2)", s = "0", l = O.CARET_INDENTATION + "px", g = "calc(" + n + " - " + l + ")", A = "calc(" + a + " - " + l + ")", E = 35, f = Math.abs(90 - E), v = ["border-bottom-right-radius", "border-top-left-radius"], y = ["border-bottom-left-radius", "border-top-right-radius"],
|
878
|
+
var c = "calc((" + n + " - " + r.caretWidth + "px) / 2)", u = "calc((" + a + " - " + r.caretWidth + "px) / 2)", s = "0", l = O.CARET_INDENTATION + "px", g = "calc(" + n + " - " + l + ")", A = "calc(" + a + " - " + l + ")", E = 35, f = Math.abs(90 - E), v = ["border-bottom-right-radius", "border-top-left-radius"], y = ["border-bottom-left-radius", "border-top-right-radius"], m = 20;
|
879
879
|
switch (t) {
|
880
880
|
case h.BELOW_CENTER:
|
881
881
|
return {
|
@@ -884,7 +884,7 @@ var tt = typeof window < "u", Tt = (
|
|
884
884
|
yAxisPx: s,
|
885
885
|
xAxisPx: c,
|
886
886
|
rotation: -1 * E,
|
887
|
-
skew: -1 *
|
887
|
+
skew: -1 * m,
|
888
888
|
xTransformOrigin: c,
|
889
889
|
yTransformOrigin: s,
|
890
890
|
caretCorners: v
|
@@ -896,7 +896,7 @@ var tt = typeof window < "u", Tt = (
|
|
896
896
|
yAxisPx: s,
|
897
897
|
xAxisPx: l,
|
898
898
|
rotation: e ? E : -1 * E,
|
899
|
-
skew: e ?
|
899
|
+
skew: e ? m : -1 * m,
|
900
900
|
xTransformOrigin: e ? g : l,
|
901
901
|
yTransformOrigin: s,
|
902
902
|
caretCorners: e ? y : v
|
@@ -908,7 +908,7 @@ var tt = typeof window < "u", Tt = (
|
|
908
908
|
yAxisPx: s,
|
909
909
|
xAxisPx: l,
|
910
910
|
rotation: e ? -1 * E : E,
|
911
|
-
skew: e ? -1 *
|
911
|
+
skew: e ? -1 * m : m,
|
912
912
|
xTransformOrigin: e ? l : g,
|
913
913
|
yTransformOrigin: s,
|
914
914
|
caretCorners: e ? v : y
|
@@ -920,7 +920,7 @@ var tt = typeof window < "u", Tt = (
|
|
920
920
|
yAxisPx: l,
|
921
921
|
xAxisPx: s,
|
922
922
|
rotation: e ? f : -1 * f,
|
923
|
-
skew: e ? -1 *
|
923
|
+
skew: e ? -1 * m : m,
|
924
924
|
xTransformOrigin: e ? s : n,
|
925
925
|
yTransformOrigin: l,
|
926
926
|
caretCorners: e ? v : y
|
@@ -932,7 +932,7 @@ var tt = typeof window < "u", Tt = (
|
|
932
932
|
yAxisPx: u,
|
933
933
|
xAxisPx: s,
|
934
934
|
rotation: e ? f : -1 * f,
|
935
|
-
skew: e ? -1 *
|
935
|
+
skew: e ? -1 * m : m,
|
936
936
|
xTransformOrigin: e ? s : n,
|
937
937
|
yTransformOrigin: u,
|
938
938
|
caretCorners: e ? v : y
|
@@ -944,7 +944,7 @@ var tt = typeof window < "u", Tt = (
|
|
944
944
|
yAxisPx: l,
|
945
945
|
xAxisPx: s,
|
946
946
|
rotation: e ? -1 * f : f,
|
947
|
-
skew: e ?
|
947
|
+
skew: e ? m : -1 * m,
|
948
948
|
xTransformOrigin: e ? s : n,
|
949
949
|
yTransformOrigin: A,
|
950
950
|
caretCorners: e ? y : v
|
@@ -956,7 +956,7 @@ var tt = typeof window < "u", Tt = (
|
|
956
956
|
yAxisPx: l,
|
957
957
|
xAxisPx: s,
|
958
958
|
rotation: e ? -1 * f : f,
|
959
|
-
skew: e ?
|
959
|
+
skew: e ? m : -1 * m,
|
960
960
|
xTransformOrigin: e ? n : s,
|
961
961
|
yTransformOrigin: l,
|
962
962
|
caretCorners: e ? y : v
|
@@ -968,7 +968,7 @@ var tt = typeof window < "u", Tt = (
|
|
968
968
|
yAxisPx: u,
|
969
969
|
xAxisPx: s,
|
970
970
|
rotation: e ? -1 * f : f,
|
971
|
-
skew: e ?
|
971
|
+
skew: e ? m : -1 * m,
|
972
972
|
xTransformOrigin: e ? n : s,
|
973
973
|
yTransformOrigin: u,
|
974
974
|
caretCorners: e ? y : v
|
@@ -980,7 +980,7 @@ var tt = typeof window < "u", Tt = (
|
|
980
980
|
yAxisPx: l,
|
981
981
|
xAxisPx: s,
|
982
982
|
rotation: e ? f : -1 * f,
|
983
|
-
skew: e ? -1 *
|
983
|
+
skew: e ? -1 * m : m,
|
984
984
|
xTransformOrigin: e ? n : s,
|
985
985
|
yTransformOrigin: A,
|
986
986
|
caretCorners: e ? v : y
|
@@ -992,7 +992,7 @@ var tt = typeof window < "u", Tt = (
|
|
992
992
|
yAxisPx: s,
|
993
993
|
xAxisPx: c,
|
994
994
|
rotation: E,
|
995
|
-
skew:
|
995
|
+
skew: m,
|
996
996
|
xTransformOrigin: c,
|
997
997
|
yTransformOrigin: a,
|
998
998
|
caretCorners: y
|
@@ -1004,7 +1004,7 @@ var tt = typeof window < "u", Tt = (
|
|
1004
1004
|
yAxisPx: s,
|
1005
1005
|
xAxisPx: l,
|
1006
1006
|
rotation: e ? -1 * E : E,
|
1007
|
-
skew: e ? -1 *
|
1007
|
+
skew: e ? -1 * m : m,
|
1008
1008
|
xTransformOrigin: e ? g : l,
|
1009
1009
|
yTransformOrigin: a,
|
1010
1010
|
caretCorners: e ? v : y
|
@@ -1017,7 +1017,7 @@ var tt = typeof window < "u", Tt = (
|
|
1017
1017
|
yAxisPx: s,
|
1018
1018
|
xAxisPx: l,
|
1019
1019
|
rotation: e ? E : -1 * E,
|
1020
|
-
skew: e ?
|
1020
|
+
skew: e ? m : -1 * m,
|
1021
1021
|
xTransformOrigin: e ? l : g,
|
1022
1022
|
yTransformOrigin: a,
|
1023
1023
|
caretCorners: e ? y : v
|
@@ -1067,9 +1067,9 @@ var Et = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, N = (i, o,
|
|
1067
1067
|
(a = i[n]) && (e = (r ? a(o, t, e) : a(e)) || e);
|
1068
1068
|
return r && e && Et(o, t, e), e;
|
1069
1069
|
};
|
1070
|
-
let S = class extends
|
1070
|
+
let S = class extends ot {
|
1071
1071
|
constructor() {
|
1072
|
-
super(...arguments), this.mdcFoundationClass =
|
1072
|
+
super(...arguments), this.mdcFoundationClass = mt;
|
1073
1073
|
}
|
1074
1074
|
createAdapter() {
|
1075
1075
|
return {
|
@@ -1210,8 +1210,8 @@ let S = class extends it {
|
|
1210
1210
|
}
|
1211
1211
|
};
|
1212
1212
|
S.styles = [
|
1213
|
-
|
1214
|
-
${
|
1213
|
+
it`
|
1214
|
+
${rt(ft)}
|
1215
1215
|
`
|
1216
1216
|
];
|
1217
1217
|
N([
|
@@ -1241,6 +1241,8 @@ N([
|
|
1241
1241
|
S = N([
|
1242
1242
|
nt("cv-tooltip")
|
1243
1243
|
], S);
|
1244
|
+
const wt = S;
|
1244
1245
|
export {
|
1245
|
-
S as
|
1246
|
+
S as CovalentTooltip,
|
1247
|
+
wt as default
|
1246
1248
|
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { TopAppBarFixedBase } from '@material/mwc-top-app-bar-fixed/mwc-top-app-bar-fixed-base';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'cv-top-app-bar-fixed': CovalentTopAppBarFixed;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export declare class CovalentTopAppBarFixed extends TopAppBarFixedBase {
|
8
|
+
static styles: import("lit").CSSResult[];
|
9
|
+
}
|
10
|
+
export default CovalentTopAppBarFixed;
|
11
|
+
//# sourceMappingURL=top-app-bar-fixed.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"top-app-bar-fixed.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/top-app-bar/top-app-bar-fixed.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAIhG,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,sBAAsB,CAAC;KAChD;CACF;AAED,qBACa,sBAAuB,SAAQ,kBAAkB;IAC5D,OAAgB,MAAM,4BAKpB;CACH;AAED,eAAe,sBAAsB,CAAC"}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { TopAppBarBase } from '@material/mwc-top-app-bar/mwc-top-app-bar-base';
|
2
2
|
declare global {
|
3
3
|
interface HTMLElementTagNameMap {
|
4
|
-
'cv-top-app-bar':
|
4
|
+
'cv-top-app-bar': CovalentTopAppBar;
|
5
5
|
}
|
6
6
|
}
|
7
|
-
export declare class
|
7
|
+
export declare class CovalentTopAppBar extends TopAppBarBase {
|
8
8
|
static styles: import("lit").CSSResult[];
|
9
9
|
}
|
10
|
+
export default CovalentTopAppBar;
|
10
11
|
//# sourceMappingURL=top-app-bar.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"top-app-bar.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/top-app-bar/top-app-bar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAI/E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,iBAAiB,CAAC;KACrC;CACF;AAED,qBACa,iBAAkB,SAAQ,aAAa;IAClD,OAAgB,MAAM,4BAKpB;CACH;AAED,eAAe,iBAAiB,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./query-assigned-elements.mjs"),a=require("./mwc-top-app-bar-base.mjs"),d=require("./tslib.es6.mjs"),n=require("./top-app-bar.mjs");require("./property.mjs");require("./base-element.mjs");require("./utils.mjs");require("./query.mjs");require("./class-map.mjs");/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2018 Google Inc.
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/var c=function(e){d.__extends(r,e);function r(){var s=e!==null&&e.apply(this,arguments)||this;return s.wasScrolled=!1,s}return r.prototype.handleTargetScroll=function(){var s=this.adapter.getViewportScrollY();s<=0?this.wasScrolled&&(this.adapter.removeClass(a.cssClasses.FIXED_SCROLLED_CLASS),this.wasScrolled=!1):this.wasScrolled||(this.adapter.addClass(a.cssClasses.FIXED_SCROLLED_CLASS),this.wasScrolled=!0)},r}(a.MDCTopAppBarFoundation);const u=c;/**
|
23
|
+
* @license
|
24
|
+
* Copyright 2019 Google LLC
|
25
|
+
* SPDX-License-Identifier: Apache-2.0
|
26
|
+
*/class v extends a.TopAppBarBase{constructor(){super(...arguments),this.mdcFoundationClass=u}barClasses(){return Object.assign(Object.assign({},super.barClasses()),{"mdc-top-app-bar--fixed":!0})}registerListeners(){this.scrollTarget.addEventListener("scroll",this.handleTargetScroll,a.passiveEventOptionsIfSupported)}unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll)}}var C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,T=(e,r,s,o)=>{for(var t=o>1?void 0:o?S(r,s):r,p=e.length-1,l;p>=0;p--)(l=e[p])&&(t=(o?l(r,s,t):l(t))||t);return o&&t&&C(r,s,t),t};exports.CovalentTopAppBarFixed=class extends v{};exports.CovalentTopAppBarFixed.styles=[n.styles,i.i`
|
27
|
+
${i.r(n.baseStyles)}
|
28
|
+
`];exports.CovalentTopAppBarFixed=T([i.e("cv-top-app-bar-fixed")],exports.CovalentTopAppBarFixed);const h=exports.CovalentTopAppBarFixed;exports.default=h;
|