@m3e/web 2.0.5 → 2.1.1
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/dist/all.js +801 -473
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +52 -58
- package/dist/all.min.js.map +1 -1
- package/dist/autocomplete.js +342 -69
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/chips.js +18 -4
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core-a11y.js +3 -118
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +13 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +193 -1
- package/dist/core-anchoring.js.map +1 -1
- package/dist/core-anchoring.min.js +1 -1
- package/dist/core-anchoring.min.js.map +1 -1
- package/dist/core.js +147 -91
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +408 -328
- package/dist/custom-elements.json +5820 -4150
- package/dist/html-custom-data.json +174 -99
- package/dist/loading-indicator.js +1 -0
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +1 -1
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/option.js +94 -121
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/progress-indicator.js +2 -0
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +2 -2
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/select.js +59 -23
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +71 -2
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts +3 -0
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts.map +1 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts +12 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts.map +1 -0
- package/dist/src/autocomplete/index.d.ts +2 -0
- package/dist/src/autocomplete/index.d.ts.map +1 -1
- package/dist/src/chips/ChipElement.d.ts +2 -0
- package/dist/src/chips/ChipElement.d.ts.map +1 -1
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts +13 -0
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts.map +1 -0
- package/dist/src/chips/InputChipSetElement.d.ts +10 -0
- package/dist/src/chips/InputChipSetElement.d.ts.map +1 -1
- package/dist/src/chips/index.d.ts +1 -0
- package/dist/src/chips/index.d.ts.map +1 -1
- package/dist/src/core/a11y/FocusTrapElement.d.ts +1 -1
- package/dist/src/core/a11y/list-key/ListKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/Typeahead.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +74 -0
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -0
- package/dist/src/core/anchoring/index.d.ts +1 -0
- package/dist/src/core/anchoring/index.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/MutationController.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/ResizeController.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/AttachInternals.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts +9 -2
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts +3 -0
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts.map +1 -0
- package/dist/src/core/shared/primitives/index.d.ts +2 -1
- package/dist/src/core/shared/primitives/index.d.ts.map +1 -1
- package/dist/src/loading-indicator/LoadingIndicatorElement.d.ts.map +1 -1
- package/dist/src/menu/MenuItemElementBase.d.ts.map +1 -1
- package/dist/src/option/OptionElement.d.ts +21 -1
- package/dist/src/option/OptionElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts +11 -34
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelState.d.ts +3 -0
- package/dist/src/option/OptionPanelState.d.ts.map +1 -0
- package/dist/src/option/index.d.ts +1 -0
- package/dist/src/option/index.d.ts.map +1 -1
- package/dist/src/progress-indicator/CircularProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/LinearProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/select/SelectElement.d.ts +3 -2
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/toc/TocElement.d.ts.map +1 -1
- package/dist/toc.js +0 -1
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/datepicker.js +0 -2346
- package/dist/datepicker.js.map +0 -1
- package/dist/datepicker.min.js +0 -102
- package/dist/datepicker.min.js.map +0 -1
- package/dist/src/core/shared/decorators/component.d.ts +0 -19
- package/dist/src/core/shared/decorators/component.d.ts.map +0 -1
- package/dist/src/core/shared/decorators/element.d.ts +0 -19
- package/dist/src/core/shared/decorators/element.d.ts.map +0 -1
- package/dist/src/core/shared/utils/getState.d.ts +0 -15
- package/dist/src/core/shared/utils/getState.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarElement.d.ts +0 -203
- package/dist/src/datepicker/CalendarElement.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarView.d.ts +0 -3
- package/dist/src/datepicker/CalendarView.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarViewElementBase.d.ts +0 -28
- package/dist/src/datepicker/CalendarViewElementBase.d.ts.map +0 -1
- package/dist/src/datepicker/DateAdapter.d.ts +0 -4
- package/dist/src/datepicker/DateAdapter.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerElement.d.ts +0 -180
- package/dist/src/datepicker/DatepickerElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerToggleElement.d.ts +0 -21
- package/dist/src/datepicker/DatepickerToggleElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerVariant.d.ts +0 -3
- package/dist/src/datepicker/DatepickerVariant.d.ts.map +0 -1
- package/dist/src/datepicker/MonthViewElement.d.ts +0 -35
- package/dist/src/datepicker/MonthViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/MultiYearViewElement.d.ts +0 -27
- package/dist/src/datepicker/MultiYearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/YearViewElement.d.ts +0 -27
- package/dist/src/datepicker/YearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/index.d.ts +0 -10
- package/dist/src/datepicker/index.d.ts.map +0 -1
- package/dist/src/datepicker/utils.d.ts +0 -26
- package/dist/src/datepicker/utils.d.ts.map +0 -1
package/dist/core-anchoring.js
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
* Copyright (c) 2025 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
+
import { LitElement, html, unsafeCSS, css } from 'lit';
|
|
7
|
+
import { AttachInternals, addCustomState, deleteCustomState, DesignToken, customElement, setCustomState } from '@m3e/web/core';
|
|
8
|
+
import { M3eDirectionality } from '@m3e/web/core/bidi';
|
|
9
|
+
|
|
10
|
+
/******************************************************************************
|
|
11
|
+
Copyright (c) Microsoft Corporation.
|
|
12
|
+
|
|
13
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
14
|
+
purpose with or without fee is hereby granted.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
17
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
18
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
19
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
20
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
21
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
22
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
23
|
+
***************************************************************************** */
|
|
24
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
25
|
+
|
|
26
|
+
function __decorate(decorators, target, key, desc) {
|
|
27
|
+
var c = arguments.length,
|
|
28
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
29
|
+
d;
|
|
30
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
|
+
}
|
|
33
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
34
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
35
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
36
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
37
|
+
}
|
|
38
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
39
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
40
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
41
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
42
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
43
|
+
}
|
|
44
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
45
|
+
var e = new Error(message);
|
|
46
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
47
|
+
};
|
|
48
|
+
|
|
6
49
|
/**
|
|
7
50
|
* Custom positioning reference element.
|
|
8
51
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
@@ -1743,5 +1786,154 @@ async function positionAnchor(target, anchor, options, update) {
|
|
|
1743
1786
|
return autoUpdate(anchor, target, async () => await computeAnchorPosition());
|
|
1744
1787
|
}
|
|
1745
1788
|
|
|
1746
|
-
|
|
1789
|
+
var _M3eFloatingPanelElement_instances, _M3eFloatingPanelElement_trigger, _M3eFloatingPanelElement_anchor, _M3eFloatingPanelElement_anchorCleanup, _M3eFloatingPanelElement_documentClickHandler, _M3eFloatingPanelElement_toggleHandler, _M3eFloatingPanelElement_handleDocumentClick;
|
|
1790
|
+
/**
|
|
1791
|
+
* A lightweight, generic floating surface used to present content above the page.
|
|
1792
|
+
*
|
|
1793
|
+
* @tag m3e-floating-panel
|
|
1794
|
+
*
|
|
1795
|
+
* @slot - Renders the contents of the panel.
|
|
1796
|
+
*
|
|
1797
|
+
* @fires beforetoggle - Dispatched before the toggle state changes.
|
|
1798
|
+
* @fires toggle - Dispatched after the toggle state has changed.
|
|
1799
|
+
*
|
|
1800
|
+
* @cssprop --m3e-floating-panel-container-shape - Corner radius of the panel container.
|
|
1801
|
+
* @cssprop --m3e-floating-panel-container-min-width - Minimum width of the panel container.
|
|
1802
|
+
* @cssprop --m3e-floating-panel-container-max-width - Maximum width of the panel container.
|
|
1803
|
+
* @cssprop --m3e-floating-panel-container-max-height - Maximum height of the panel container.
|
|
1804
|
+
* @cssprop --m3e-floating-panel-container-padding-block - Vertical padding inside the panel container.
|
|
1805
|
+
* @cssprop --m3e-floating-panel-container-padding-inline - Horizontal padding inside the panel container.
|
|
1806
|
+
* @cssprop --m3e-floating-panel-container-color - Background color of the panel container.
|
|
1807
|
+
* @cssprop --m3e-floating-panel-container-elevation - Box shadow elevation of the panel container.
|
|
1808
|
+
*/
|
|
1809
|
+
let M3eFloatingPanelElement = class M3eFloatingPanelElement extends AttachInternals(LitElement) {
|
|
1810
|
+
constructor() {
|
|
1811
|
+
super(...arguments);
|
|
1812
|
+
_M3eFloatingPanelElement_instances.add(this);
|
|
1813
|
+
/** @private */
|
|
1814
|
+
_M3eFloatingPanelElement_trigger.set(this, void 0);
|
|
1815
|
+
/** @private */
|
|
1816
|
+
_M3eFloatingPanelElement_anchor.set(this, void 0);
|
|
1817
|
+
/** @private */
|
|
1818
|
+
_M3eFloatingPanelElement_anchorCleanup.set(this, void 0);
|
|
1819
|
+
/** @private */
|
|
1820
|
+
_M3eFloatingPanelElement_documentClickHandler.set(this, e => __classPrivateFieldGet(this, _M3eFloatingPanelElement_instances, "m", _M3eFloatingPanelElement_handleDocumentClick).call(this, e));
|
|
1821
|
+
/** @private */
|
|
1822
|
+
_M3eFloatingPanelElement_toggleHandler.set(this, e => {
|
|
1823
|
+
if (e.newState === "closed") {
|
|
1824
|
+
__classPrivateFieldGet(this, _M3eFloatingPanelElement_anchorCleanup, "f")?.call(this);
|
|
1825
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_anchorCleanup, undefined, "f");
|
|
1826
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_anchor, undefined, "f");
|
|
1827
|
+
}
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/** Whether the panel is open. */
|
|
1831
|
+
get isOpen() {
|
|
1832
|
+
return __classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f") !== undefined;
|
|
1833
|
+
}
|
|
1834
|
+
/** The element that triggered the panel to open. */
|
|
1835
|
+
get trigger() {
|
|
1836
|
+
return __classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f") ?? null;
|
|
1837
|
+
}
|
|
1838
|
+
/** @inheritdoc */
|
|
1839
|
+
connectedCallback() {
|
|
1840
|
+
super.connectedCallback();
|
|
1841
|
+
addCustomState(this, "-no-animate");
|
|
1842
|
+
this.setAttribute("popover", "manual");
|
|
1843
|
+
this.addEventListener("toggle", __classPrivateFieldGet(this, _M3eFloatingPanelElement_toggleHandler, "f"));
|
|
1844
|
+
document.addEventListener("click", __classPrivateFieldGet(this, _M3eFloatingPanelElement_documentClickHandler, "f"));
|
|
1845
|
+
}
|
|
1846
|
+
/** @inheritdoc */
|
|
1847
|
+
disconnectedCallback() {
|
|
1848
|
+
super.disconnectedCallback();
|
|
1849
|
+
this.removeEventListener("toggle", __classPrivateFieldGet(this, _M3eFloatingPanelElement_toggleHandler, "f"));
|
|
1850
|
+
document.removeEventListener("click", __classPrivateFieldGet(this, _M3eFloatingPanelElement_documentClickHandler, "f"));
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Opens the panel.
|
|
1854
|
+
* @param {HTMLElement} trigger The element that triggered the panel.
|
|
1855
|
+
* @param {HTMLElement | undefined} anchor The element used to position the panel.
|
|
1856
|
+
* @returns {Promise<void>} A `Promise` that resolves when the panel is opened.
|
|
1857
|
+
*/
|
|
1858
|
+
async show(trigger, anchor) {
|
|
1859
|
+
if (__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f") && __classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f") !== trigger) {
|
|
1860
|
+
this.hide();
|
|
1861
|
+
}
|
|
1862
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_anchorCleanup, await positionAnchor(this, anchor ?? trigger, {
|
|
1863
|
+
position: "bottom-start",
|
|
1864
|
+
inline: true,
|
|
1865
|
+
flip: true
|
|
1866
|
+
}, (x, y, position) => {
|
|
1867
|
+
setCustomState(this, "-top", position.includes("top"));
|
|
1868
|
+
setCustomState(this, "-bottom", position.includes("bottom"));
|
|
1869
|
+
if (M3eDirectionality.current === "rtl") {
|
|
1870
|
+
this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
|
|
1871
|
+
this.style.left = "";
|
|
1872
|
+
} else {
|
|
1873
|
+
this.style.left = `${x}px`;
|
|
1874
|
+
this.style.right = "";
|
|
1875
|
+
}
|
|
1876
|
+
this.style.top = `${y}px`;
|
|
1877
|
+
}), "f");
|
|
1878
|
+
this.showPopover();
|
|
1879
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_trigger, trigger, "f");
|
|
1880
|
+
__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f").ariaExpanded = "true";
|
|
1881
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_anchor, anchor, "f");
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Hides the panel.
|
|
1885
|
+
* @param {boolean} [restoreFocus=false] Whether to restore focus to the panel's trigger.
|
|
1886
|
+
*/
|
|
1887
|
+
hide(restoreFocus = false) {
|
|
1888
|
+
this.hidePopover();
|
|
1889
|
+
if (__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f")) {
|
|
1890
|
+
__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f").ariaExpanded = "false";
|
|
1891
|
+
if (restoreFocus) {
|
|
1892
|
+
__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f").focus();
|
|
1893
|
+
}
|
|
1894
|
+
__classPrivateFieldSet(this, _M3eFloatingPanelElement_trigger, undefined, "f");
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* Toggles the panel.
|
|
1899
|
+
* @param {HTMLElement} trigger The element that triggered the panel.
|
|
1900
|
+
* @param {HTMLElement | undefined} anchor The element used to position the panel.
|
|
1901
|
+
* @returns {Promise<void>} A `Promise` that resolves when the panel is opened or closed.
|
|
1902
|
+
*/
|
|
1903
|
+
async toggle(trigger, anchor) {
|
|
1904
|
+
if (__classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f")) {
|
|
1905
|
+
this.hide();
|
|
1906
|
+
} else {
|
|
1907
|
+
await this.show(trigger, anchor);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
/** @inheritdoc */
|
|
1911
|
+
firstUpdated(_changedProperties) {
|
|
1912
|
+
super.firstUpdated(_changedProperties);
|
|
1913
|
+
requestAnimationFrame(() => deleteCustomState(this, "-no-animate"));
|
|
1914
|
+
}
|
|
1915
|
+
/** @inheritdoc */
|
|
1916
|
+
render() {
|
|
1917
|
+
return html`<div class="base"><slot></slot></div>`;
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1920
|
+
_M3eFloatingPanelElement_trigger = new WeakMap();
|
|
1921
|
+
_M3eFloatingPanelElement_anchor = new WeakMap();
|
|
1922
|
+
_M3eFloatingPanelElement_anchorCleanup = new WeakMap();
|
|
1923
|
+
_M3eFloatingPanelElement_documentClickHandler = new WeakMap();
|
|
1924
|
+
_M3eFloatingPanelElement_toggleHandler = new WeakMap();
|
|
1925
|
+
_M3eFloatingPanelElement_instances = new WeakSet();
|
|
1926
|
+
_M3eFloatingPanelElement_handleDocumentClick = function _M3eFloatingPanelElement_handleDocumentClick(e) {
|
|
1927
|
+
if (this.isOpen && !e.composedPath().some(x => x === this || x === __classPrivateFieldGet(this, _M3eFloatingPanelElement_trigger, "f") || x === __classPrivateFieldGet(this, _M3eFloatingPanelElement_anchor, "f"))) {
|
|
1928
|
+
this.hide();
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
/** The styles of the element. */
|
|
1932
|
+
M3eFloatingPanelElement.styles = css`:host { position: absolute; flex-direction: column; padding: unset; margin: unset; border: unset; overflow-y: auto; scrollbar-width: ${DesignToken.scrollbar.thinWidth}; scrollbar-color: ${DesignToken.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-floating-panel-container-padding-block, 0.25rem) ); border-radius: var(--m3e-floating-panel-container-shape, ${DesignToken.shape.corner.large}); min-width: var(--m3e-floating-panel-container-min-width, 7rem); max-width: var(--m3e-floating-panel-container-max-width, 17.5rem); max-height: var(--m3e-floating-panel-container-max-height, 17.5rem); background-color: var(--m3e-floating-panel-container-color, ${DesignToken.color.surfaceContainer}); box-shadow: var(--m3e-floating-panel-container-elevation, ${DesignToken.elevation.level3}); opacity: 0; display: none; } .base { box-sizing: border-box; display: flex; flex-direction: column; padding-block: var(--m3e-floating-panel-container-padding-block, 0.25rem); padding-inline: var(--m3e-floating-panel-container-padding-inline, 0.25rem); } :host(:not(:state(-no-animate))) { transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.short2} ${DesignToken.motion.easing.standard},
|
|
1933
|
+
transform ${DesignToken.motion.duration.short2} ${DesignToken.motion.easing.standard},
|
|
1934
|
+
overlay ${DesignToken.motion.duration.short2} ${DesignToken.motion.easing.standard} allow-discrete,
|
|
1935
|
+
display ${DesignToken.motion.duration.short2} ${DesignToken.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: block; opacity: 1; } :host::backdrop { background-color: transparent; } :host(:state(-bottom)) { transform-origin: top; } :host(:state(-top)) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } } @media (prefers-reduced-motion) { :host(:not(:state(-no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`;
|
|
1936
|
+
M3eFloatingPanelElement = __decorate([customElement("m3e-floating-panel")], M3eFloatingPanelElement);
|
|
1937
|
+
|
|
1938
|
+
export { M3eFloatingPanelElement, positionAnchor };
|
|
1747
1939
|
//# sourceMappingURL=core-anchoring.js.map
|