@m3e/web 2.4.1 → 2.5.0
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/README.md +9 -2
- package/dist/all.js +525 -65
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +45 -45
- package/dist/all.min.js.map +1 -1
- package/dist/bottom-sheet.js +33 -6
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/breadcrumb.js +303 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/breadcrumb.min.js +7 -0
- package/dist/breadcrumb.min.js.map +1 -0
- package/dist/content-pane.js +69 -0
- package/dist/content-pane.js.map +1 -0
- package/dist/content-pane.min.js +7 -0
- package/dist/content-pane.min.js.map +1 -0
- package/dist/core-a11y.js +12 -9
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +2 -2
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core.js +48 -4
- 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 +293 -173
- package/dist/custom-elements.json +2823 -1378
- package/dist/html-custom-data.json +195 -88
- package/dist/list.js +37 -37
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +1 -1
- package/dist/list.min.js.map +1 -1
- package/dist/split-pane.js +56 -15
- package/dist/split-pane.js.map +1 -1
- package/dist/split-pane.min.js +1 -1
- package/dist/split-pane.min.js.map +1 -1
- package/dist/src/all.d.ts +2 -0
- package/dist/src/all.d.ts.map +1 -1
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts +8 -2
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
- package/dist/src/breadcrumb/BreadcrumbElement.d.ts +47 -0
- package/dist/src/breadcrumb/BreadcrumbElement.d.ts.map +1 -0
- package/dist/src/breadcrumb/BreadcrumbItemButtonElement.d.ts +37 -0
- package/dist/src/breadcrumb/BreadcrumbItemButtonElement.d.ts.map +1 -0
- package/dist/src/breadcrumb/BreadcrumbItemCurrent.d.ts +3 -0
- package/dist/src/breadcrumb/BreadcrumbItemCurrent.d.ts.map +1 -0
- package/dist/src/breadcrumb/BreadcrumbItemElement.d.ts +88 -0
- package/dist/src/breadcrumb/BreadcrumbItemElement.d.ts.map +1 -0
- package/dist/src/breadcrumb/index.d.ts +4 -0
- package/dist/src/breadcrumb/index.d.ts.map +1 -0
- package/dist/src/breadcrumb/isIconOnly.d.ts +3 -0
- package/dist/src/breadcrumb/isIconOnly.d.ts.map +1 -0
- package/dist/src/content-pane/ContentPaneElement.d.ts +44 -0
- package/dist/src/content-pane/ContentPaneElement.d.ts.map +1 -0
- package/dist/src/content-pane/index.d.ts +2 -0
- package/dist/src/content-pane/index.d.ts.map +1 -0
- package/dist/src/core/a11y/InteractivityChecker.d.ts +4 -2
- package/dist/src/core/a11y/InteractivityChecker.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/LinkButton.d.ts +2 -1
- package/dist/src/core/shared/mixins/LinkButton.d.ts.map +1 -1
- package/dist/src/core/shared/utils/getScrollbarWidth.d.ts +7 -0
- package/dist/src/core/shared/utils/getScrollbarWidth.d.ts.map +1 -0
- package/dist/src/core/shared/utils/index.d.ts +1 -0
- package/dist/src/core/shared/utils/index.d.ts.map +1 -1
- package/dist/src/list/ListActionElement.d.ts +1 -0
- package/dist/src/list/ListActionElement.d.ts.map +1 -1
- package/dist/src/list/index.d.ts +0 -1
- package/dist/src/list/index.d.ts.map +1 -1
- package/dist/src/split-pane/SplitPaneElement.d.ts +6 -0
- package/dist/src/split-pane/SplitPaneElement.d.ts.map +1 -1
- package/dist/tooltip.js +2 -2
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +11 -1
package/dist/all.js
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
import { __classPrivateFieldGet, __decorate, __classPrivateFieldSet } from 'tslib';
|
|
7
7
|
import { unsafeCSS, css, LitElement, html, nothing, isServer, noChange, svg } from 'lit';
|
|
8
8
|
import { query, property, queryAssignedElements, state } from 'lit/decorators.js';
|
|
9
|
-
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, hasAssignedNodes as hasAssignedNodes$1, debounce as debounce$1, customElement as customElement$1, EventAttribute as EventAttribute$1, MutationController as MutationController$1, setCustomState as setCustomState$1, deleteCustomState as deleteCustomState$1, prefersReducedMotion as prefersReducedMotion$1, scrollIntoViewIfNeeded as scrollIntoViewIfNeeded$1, forcedColorsActive as forcedColorsActive$1, addCustomState as addCustomState$1, ActionElementBase as ActionElementBase$1, ReconnectedCallback as ReconnectedCallback$1, SuppressInitialAnimation as SuppressInitialAnimation$1, AttachInternals as AttachInternals$1, VelocityTracker as VelocityTracker$1, ScrollLockController as ScrollLockController$1, InertController as InertController$1, ResizeController as ResizeController$1, focusWhenReady as focusWhenReady$1, hasCustomState as hasCustomState$1, computeCssSize as computeCssSize$1, registerStyleSheet as registerStyleSheet$1, spaceSeparatedStringConverter as spaceSeparatedStringConverter$1, KeyboardClick as KeyboardClick$1, LinkButton as LinkButton$1,
|
|
9
|
+
import { DesignToken as DesignToken$1, HtmlFor as HtmlFor$1, Role as Role$1, hasAssignedNodes as hasAssignedNodes$1, debounce as debounce$1, customElement as customElement$1, EventAttribute as EventAttribute$1, MutationController as MutationController$1, setCustomState as setCustomState$1, deleteCustomState as deleteCustomState$1, prefersReducedMotion as prefersReducedMotion$1, scrollIntoViewIfNeeded as scrollIntoViewIfNeeded$1, forcedColorsActive as forcedColorsActive$1, addCustomState as addCustomState$1, ActionElementBase as ActionElementBase$1, ReconnectedCallback as ReconnectedCallback$1, SuppressInitialAnimation as SuppressInitialAnimation$1, AttachInternals as AttachInternals$1, VelocityTracker as VelocityTracker$1, ScrollLockController as ScrollLockController$1, InertController as InertController$1, ResizeController as ResizeController$1, focusWhenReady as focusWhenReady$1, hasCustomState as hasCustomState$1, computeCssSize as computeCssSize$1, registerStyleSheet as registerStyleSheet$1, spaceSeparatedStringConverter as spaceSeparatedStringConverter$1, KeyboardClick as KeyboardClick$1, LinkButton as LinkButton$1, Focusable as Focusable$1, Disabled as Disabled$1, renderPseudoLink as renderPseudoLink$1, FormSubmitter as FormSubmitter$1, DisabledInteractive as DisabledInteractive$1, FocusController as FocusController$1, PressedController as PressedController$1, isSelectedMixin as isSelectedMixin$1, dateConverter as dateConverter$1, Labelled as Labelled$1, RequiredConstraintValidation as RequiredConstraintValidation$1, Dirty as Dirty$1, Touched as Touched$1, Required as Required$1, ConstraintValidation as ConstraintValidation$1, CheckedIndeterminate as CheckedIndeterminate$1, FormAssociated as FormAssociated$1, HoverController as HoverController$1, formValue as formValue$1, isDisabledMixin as isDisabledMixin$1, isDisabledInteractiveMixin as isDisabledInteractiveMixin$1, isLinkButtonMixin as isLinkButtonMixin$1, getTextContent as getTextContent$1, Vertical as Vertical$1, Selected as Selected$1, getScrollbarWidth as getScrollbarWidth$1, ScrollController as ScrollController$1, isReadOnlyMixin as isReadOnlyMixin$1, interceptProperty as interceptProperty$1, computeLineCount as computeLineCount$1, generateClipPaths as generateClipPaths$1, Checked as Checked$1, AnimationLoopController as AnimationLoopController$1, resolveFragmentUrl as resolveFragmentUrl$1, safeStyleMap as safeStyleMap$1, updateLabels as updateLabels$1, waitForUpgrade as waitForUpgrade$1, guid as guid$1, IntersectionController as IntersectionController$1, LongPressController as LongPressController$1 } from '@m3e/web/core';
|
|
10
10
|
import { ListKeyManager, M3eLiveAnnouncer, M3eInteractivityChecker, isModifierAllowed, addAriaReferencedId, removeAriaReferencedId, selectionManager, SelectionManager, ListManager, RovingTabIndexManager, M3eAriaDescriber, typeaheadLabel } from '@m3e/web/core/a11y';
|
|
11
11
|
import { M3eOptGroupElement as M3eOptGroupElement$1 } from '@m3e/web/option';
|
|
12
12
|
import { M3eDirectionality } from '@m3e/web/core/bidi';
|
|
13
13
|
import { positionAnchor, M3eFloatingPanelElement } from '@m3e/web/core/anchoring';
|
|
14
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
15
14
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
15
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
16
16
|
import { M3eButtonElement as M3eButtonElement$1 } from '@m3e/web/button';
|
|
17
17
|
import { M3eIconButtonElement as M3eIconButtonElement$1 } from '@m3e/web/icon-button';
|
|
18
18
|
import '@m3e/web/tooltip';
|
|
@@ -1463,9 +1463,10 @@ var M3eBottomSheetElement_1;
|
|
|
1463
1463
|
* @attr handle - Whether to display a drag handle and enable the top region of the sheet as a gesture surface for dragging between detents.
|
|
1464
1464
|
* @attr handle-label - The accessible label given to the drag handle.
|
|
1465
1465
|
* @attr hideable - Whether the bottom sheet can hide when its swiped down.
|
|
1466
|
-
* @attr hide-friction - The friction coefficient to hide the sheet
|
|
1466
|
+
* @attr hide-friction - The friction coefficient to hide the sheet.
|
|
1467
1467
|
* @attr modal - Whether the bottom sheet behaves as modal.
|
|
1468
1468
|
* @attr open - Whether the bottom sheet is open.
|
|
1469
|
+
* @attr overshoot-limit - A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
|
|
1469
1470
|
*
|
|
1470
1471
|
* @fires opening - Emitted when the sheet begins to open.
|
|
1471
1472
|
* @fires opened - Emitted when the sheet has opened.
|
|
@@ -1581,10 +1582,15 @@ let M3eBottomSheetElement = M3eBottomSheetElement_1 = class M3eBottomSheetElemen
|
|
|
1581
1582
|
*/
|
|
1582
1583
|
this.hideable = false;
|
|
1583
1584
|
/**
|
|
1584
|
-
* The friction coefficient to hide the sheet
|
|
1585
|
+
* The friction coefficient to hide the sheet.
|
|
1585
1586
|
* @default 0.5
|
|
1586
1587
|
*/
|
|
1587
1588
|
this.hideFriction = 0.5;
|
|
1589
|
+
/**
|
|
1590
|
+
* A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
|
|
1591
|
+
* @default 4
|
|
1592
|
+
*/
|
|
1593
|
+
this.overshootLimit = 4;
|
|
1588
1594
|
}
|
|
1589
1595
|
/**
|
|
1590
1596
|
* Shows the sheet.
|
|
@@ -1767,10 +1773,13 @@ _M3eBottomSheetElement_handleHeaderPointerDown = function _M3eBottomSheetElement
|
|
|
1767
1773
|
e.target.style.cursor = "grabbing";
|
|
1768
1774
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_velocityTracker, "f").reset();
|
|
1769
1775
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_velocityTracker, "f").add(e.clientY);
|
|
1776
|
+
const maxHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computeMaxHeight).call(this);
|
|
1777
|
+
const effectiveMaxHeight = this.detents.length > 0 ? Math.max(...this.detents.map(x => __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computeDetentHeight).call(this, x))) : maxHeight;
|
|
1770
1778
|
__classPrivateFieldSet(this, _M3eBottomSheetElement_dragState, {
|
|
1771
1779
|
startY: e.clientY,
|
|
1772
1780
|
startHeight: this.clientHeight,
|
|
1773
|
-
|
|
1781
|
+
effectiveMaxHeight,
|
|
1782
|
+
maxHeight,
|
|
1774
1783
|
minHeight: __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_computeMinHeight).call(this)
|
|
1775
1784
|
}, "f");
|
|
1776
1785
|
__classPrivateFieldSet(this, _M3eBottomSheetElement_dragged, false, "f");
|
|
@@ -1787,10 +1796,22 @@ _M3eBottomSheetElement_handleHeaderPointerMove = function _M3eBottomSheetElement
|
|
|
1787
1796
|
(e.getCoalescedEvents?.() ?? [e]).forEach(x => __classPrivateFieldGet(this, _M3eBottomSheetElement_velocityTracker, "f").add(x.clientY, e.timeStamp));
|
|
1788
1797
|
let newHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").startHeight - (e.clientY - __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").startY);
|
|
1789
1798
|
if (newHeight < __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight) {
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1799
|
+
if (this.hideable) {
|
|
1800
|
+
const overshoot = (__classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight - newHeight) * this.hideFriction;
|
|
1801
|
+
newHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight - overshoot;
|
|
1802
|
+
} else {
|
|
1803
|
+
const overshoot = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight - newHeight;
|
|
1804
|
+
const overshootLimit = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").maxHeight * (this.overshootLimit / 100);
|
|
1805
|
+
const compressed = overshootLimit * overshoot / (overshoot + overshootLimit);
|
|
1806
|
+
newHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight - compressed;
|
|
1807
|
+
}
|
|
1808
|
+
} else if (newHeight > __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").effectiveMaxHeight) {
|
|
1809
|
+
const overshoot = newHeight - __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").effectiveMaxHeight;
|
|
1810
|
+
const overshootLimit = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").maxHeight * (this.overshootLimit / 100);
|
|
1811
|
+
const compressed = overshootLimit * overshoot / (overshoot + overshootLimit);
|
|
1812
|
+
newHeight = __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").effectiveMaxHeight + compressed;
|
|
1813
|
+
}
|
|
1814
|
+
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_updateHeight).call(this, newHeight);
|
|
1794
1815
|
__classPrivateFieldSet(this, _M3eBottomSheetElement_dragged, true, "f");
|
|
1795
1816
|
};
|
|
1796
1817
|
_M3eBottomSheetElement_handleHeaderPointerUp = function _M3eBottomSheetElement_handleHeaderPointerUp(e) {
|
|
@@ -1830,6 +1851,8 @@ _M3eBottomSheetElement_handleHeaderPointerUp = function _M3eBottomSheetElement_h
|
|
|
1830
1851
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_snapToDetent).call(this, __classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_getClosestDetent).call(this));
|
|
1831
1852
|
} else if (this.clientHeight < __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight) {
|
|
1832
1853
|
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_snapToHeight).call(this, __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").minHeight);
|
|
1854
|
+
} else if (this.clientHeight > __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").effectiveMaxHeight) {
|
|
1855
|
+
__classPrivateFieldGet(this, _M3eBottomSheetElement_instances, "m", _M3eBottomSheetElement_snapToHeight).call(this, __classPrivateFieldGet(this, _M3eBottomSheetElement_dragState, "f").effectiveMaxHeight);
|
|
1833
1856
|
}
|
|
1834
1857
|
}
|
|
1835
1858
|
} finally {
|
|
@@ -2084,6 +2107,10 @@ __decorate([property({
|
|
|
2084
2107
|
attribute: "hide-friction",
|
|
2085
2108
|
type: Number
|
|
2086
2109
|
})], M3eBottomSheetElement.prototype, "hideFriction", void 0);
|
|
2110
|
+
__decorate([property({
|
|
2111
|
+
attribute: "overshoot-limit",
|
|
2112
|
+
type: Number
|
|
2113
|
+
})], M3eBottomSheetElement.prototype, "overshootLimit", void 0);
|
|
2087
2114
|
M3eBottomSheetElement = M3eBottomSheetElement_1 = __decorate([customElement$1("m3e-bottom-sheet")], M3eBottomSheetElement);
|
|
2088
2115
|
|
|
2089
2116
|
/**
|
|
@@ -2152,6 +2179,296 @@ __decorate([property({
|
|
|
2152
2179
|
})], M3eBottomSheetTriggerElement.prototype, "secondary", void 0);
|
|
2153
2180
|
M3eBottomSheetTriggerElement = __decorate([customElement$1("m3e-bottom-sheet-trigger")], M3eBottomSheetTriggerElement);
|
|
2154
2181
|
|
|
2182
|
+
var _M3eBreadcrumbElement_instances, _M3eBreadcrumbElement_customSeparator, _M3eBreadcrumbElement_handleSlotChange, _M3eBreadcrumbElement_handleSeparatorSlotChange, _M3eBreadcrumbElement_setSeparator;
|
|
2183
|
+
/**
|
|
2184
|
+
* Displays a hierarchical navigation path and identifies the user's
|
|
2185
|
+
* current location within an application.
|
|
2186
|
+
*
|
|
2187
|
+
* @description
|
|
2188
|
+
* The `m3e-breadcrumb` component arranges `m3e-breadcrumb-item` children into
|
|
2189
|
+
* a trail of navigation steps. It tracks the last item as the current page and
|
|
2190
|
+
* supports a custom separator slot for alternate divider content.
|
|
2191
|
+
*
|
|
2192
|
+
* @example
|
|
2193
|
+
* The following example illustrates a simple breadcrumb with three items.
|
|
2194
|
+
* ```html
|
|
2195
|
+
* <m3e-breadcrumb>
|
|
2196
|
+
* <m3e-breadcrumb-item href="/dashboard">Dashboard</m3e-breadcrumb-item>
|
|
2197
|
+
* <m3e-breadcrumb-item href="/dashboard/reports">Reports</m3e-breadcrumb-item>
|
|
2198
|
+
* <m3e-breadcrumb-item href="/dashboard/reports/annual">Annual</m3e-breadcrumb-item>
|
|
2199
|
+
* </m3e-breadcrumb>
|
|
2200
|
+
* ```
|
|
2201
|
+
*
|
|
2202
|
+
* @tag m3e-breadcrumb
|
|
2203
|
+
*
|
|
2204
|
+
* @slot - Renders breadcrumb items.
|
|
2205
|
+
* @slot separator - Renders a custom separator between breadcrumb items.
|
|
2206
|
+
*
|
|
2207
|
+
* @attr wrap - Whether breadcrumb items should wrap onto a new line.
|
|
2208
|
+
*/
|
|
2209
|
+
let M3eBreadcrumbElement = class M3eBreadcrumbElement extends Role$1(LitElement, "navigation") {
|
|
2210
|
+
constructor() {
|
|
2211
|
+
super(...arguments);
|
|
2212
|
+
_M3eBreadcrumbElement_instances.add(this);
|
|
2213
|
+
/** @private */
|
|
2214
|
+
_M3eBreadcrumbElement_customSeparator.set(this, []);
|
|
2215
|
+
/**
|
|
2216
|
+
* Whether items wrap to a new line.
|
|
2217
|
+
* @default false
|
|
2218
|
+
*/
|
|
2219
|
+
this.wrap = false;
|
|
2220
|
+
}
|
|
2221
|
+
/** @inheritdoc */
|
|
2222
|
+
render() {
|
|
2223
|
+
return html`<div class="base" role="list"><slot @slotchange="${__classPrivateFieldGet(this, _M3eBreadcrumbElement_instances, "m", _M3eBreadcrumbElement_handleSlotChange)}"></slot><slot name="separator" @slotchange="${__classPrivateFieldGet(this, _M3eBreadcrumbElement_instances, "m", _M3eBreadcrumbElement_handleSeparatorSlotChange)}"></slot></div>`;
|
|
2224
|
+
}
|
|
2225
|
+
};
|
|
2226
|
+
_M3eBreadcrumbElement_customSeparator = new WeakMap();
|
|
2227
|
+
_M3eBreadcrumbElement_instances = new WeakSet();
|
|
2228
|
+
_M3eBreadcrumbElement_handleSlotChange = function _M3eBreadcrumbElement_handleSlotChange() {
|
|
2229
|
+
const items = this.querySelectorAll("m3e-breadcrumb-item");
|
|
2230
|
+
for (let i = 0; i < items.length; i++) {
|
|
2231
|
+
const item = items[i];
|
|
2232
|
+
if (i < items.length - 1) {
|
|
2233
|
+
item.removeAttribute("current");
|
|
2234
|
+
} else if (!item.hasAttribute("current")) {
|
|
2235
|
+
item.setAttribute("current", "page");
|
|
2236
|
+
}
|
|
2237
|
+
__classPrivateFieldGet(this, _M3eBreadcrumbElement_instances, "m", _M3eBreadcrumbElement_setSeparator).call(this, item);
|
|
2238
|
+
}
|
|
2239
|
+
};
|
|
2240
|
+
_M3eBreadcrumbElement_handleSeparatorSlotChange = function _M3eBreadcrumbElement_handleSeparatorSlotChange(e) {
|
|
2241
|
+
__classPrivateFieldSet(this, _M3eBreadcrumbElement_customSeparator, e.target.assignedElements({
|
|
2242
|
+
flatten: true
|
|
2243
|
+
}), "f");
|
|
2244
|
+
this.querySelectorAll("m3e-breadcrumb-item").forEach(x => __classPrivateFieldGet(this, _M3eBreadcrumbElement_instances, "m", _M3eBreadcrumbElement_setSeparator).call(this, x));
|
|
2245
|
+
};
|
|
2246
|
+
_M3eBreadcrumbElement_setSeparator = function _M3eBreadcrumbElement_setSeparator(item) {
|
|
2247
|
+
item._setSeparator(__classPrivateFieldGet(this, _M3eBreadcrumbElement_customSeparator, "f").map(x => {
|
|
2248
|
+
const clone = x.cloneNode(true);
|
|
2249
|
+
clone.part = "separator";
|
|
2250
|
+
return clone;
|
|
2251
|
+
}));
|
|
2252
|
+
};
|
|
2253
|
+
/** The styles of the element. */
|
|
2254
|
+
M3eBreadcrumbElement.styles = css`:host { display: block; } .base { display: flex; align-items: center; } :host([wrap]) .base { flex-wrap: wrap; } slot[name="separator"] { display: none; }`;
|
|
2255
|
+
__decorate([property({
|
|
2256
|
+
type: Boolean,
|
|
2257
|
+
reflect: true
|
|
2258
|
+
})], M3eBreadcrumbElement.prototype, "wrap", void 0);
|
|
2259
|
+
M3eBreadcrumbElement = __decorate([customElement$1("m3e-breadcrumb")], M3eBreadcrumbElement);
|
|
2260
|
+
|
|
2261
|
+
/** @internal */
|
|
2262
|
+
function isIconOnly(slot) {
|
|
2263
|
+
const elements = slot.assignedElements({
|
|
2264
|
+
flatten: true
|
|
2265
|
+
});
|
|
2266
|
+
if (elements.length === 1) {
|
|
2267
|
+
const rect = elements[0].getBoundingClientRect();
|
|
2268
|
+
return rect.width <= 28 && rect.height <= 28;
|
|
2269
|
+
}
|
|
2270
|
+
return false;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
var _M3eBreadcrumbItemButtonElement_instances, _M3eBreadcrumbItemButtonElement_clickHandler, _M3eBreadcrumbItemButtonElement_handleSlotChange, _M3eBreadcrumbItemButtonElement_handleClick;
|
|
2274
|
+
/**
|
|
2275
|
+
* @internal
|
|
2276
|
+
* An internal interactive element used to present the content of a breadcrumb item.
|
|
2277
|
+
*/
|
|
2278
|
+
let M3eBreadcrumbItemButtonElement = class M3eBreadcrumbItemButtonElement extends KeyboardClick$1(LinkButton$1(Focusable$1(Disabled$1(AttachInternals$1(Role$1(LitElement, "button"), true))))) {
|
|
2279
|
+
constructor() {
|
|
2280
|
+
super(...arguments);
|
|
2281
|
+
_M3eBreadcrumbItemButtonElement_instances.add(this);
|
|
2282
|
+
/** @private */
|
|
2283
|
+
_M3eBreadcrumbItemButtonElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eBreadcrumbItemButtonElement_instances, "m", _M3eBreadcrumbItemButtonElement_handleClick).call(this, e));
|
|
2284
|
+
}
|
|
2285
|
+
/** @inheritdoc */
|
|
2286
|
+
connectedCallback() {
|
|
2287
|
+
this.addEventListener("click", __classPrivateFieldGet(this, _M3eBreadcrumbItemButtonElement_clickHandler, "f"));
|
|
2288
|
+
super.connectedCallback();
|
|
2289
|
+
}
|
|
2290
|
+
/** @inheritdoc */
|
|
2291
|
+
disconnectedCallback() {
|
|
2292
|
+
super.disconnectedCallback();
|
|
2293
|
+
this.removeEventListener("click", __classPrivateFieldGet(this, _M3eBreadcrumbItemButtonElement_clickHandler, "f"));
|
|
2294
|
+
}
|
|
2295
|
+
/** @inheritdoc */
|
|
2296
|
+
firstUpdated(_changedProperties) {
|
|
2297
|
+
super.firstUpdated(_changedProperties);
|
|
2298
|
+
[this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
|
|
2299
|
+
}
|
|
2300
|
+
/** @inheritdoc */
|
|
2301
|
+
update(changedProperties) {
|
|
2302
|
+
super.update(changedProperties);
|
|
2303
|
+
if (changedProperties.has("disabled") || changedProperties.has("current")) {
|
|
2304
|
+
this.ariaDisabled = this.disabled && !this.current ? "true" : null;
|
|
2305
|
+
}
|
|
2306
|
+
if (changedProperties.has("current")) {
|
|
2307
|
+
if (this.current) {
|
|
2308
|
+
this.role = null;
|
|
2309
|
+
} else if (this.hasAttribute("href")) {
|
|
2310
|
+
this.role = "link";
|
|
2311
|
+
} else {
|
|
2312
|
+
this.role = "button";
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
/** @inheritdoc */
|
|
2317
|
+
render() {
|
|
2318
|
+
return html`<div class="base" aria-current="${ifDefined(this.current)}">${this.current ? nothing : html`<m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>${this[renderPseudoLink$1]()}`}<slot class="icon" name="icon" aria-hidden="true"></slot><m3e-text-overflow class="overflow"><slot @slotchange="${__classPrivateFieldGet(this, _M3eBreadcrumbItemButtonElement_instances, "m", _M3eBreadcrumbItemButtonElement_handleSlotChange)}"></slot></m3e-text-overflow>${this.current ? nothing : html`<div class="touch" aria-hidden="true"></div>`}</div>`;
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
_M3eBreadcrumbItemButtonElement_clickHandler = new WeakMap();
|
|
2322
|
+
_M3eBreadcrumbItemButtonElement_instances = new WeakSet();
|
|
2323
|
+
_M3eBreadcrumbItemButtonElement_handleSlotChange = function _M3eBreadcrumbItemButtonElement_handleSlotChange(e) {
|
|
2324
|
+
setCustomState$1(this, "-icon-only", isIconOnly(e.target));
|
|
2325
|
+
};
|
|
2326
|
+
_M3eBreadcrumbItemButtonElement_handleClick = function _M3eBreadcrumbItemButtonElement_handleClick(e) {
|
|
2327
|
+
// If current and link, disable default link click handler behavior.
|
|
2328
|
+
if (this.current && this.href) {
|
|
2329
|
+
e.preventDefault();
|
|
2330
|
+
}
|
|
2331
|
+
};
|
|
2332
|
+
/** The styles of the element. */
|
|
2333
|
+
M3eBreadcrumbItemButtonElement.styles = css`:host { display: block; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; justify-content: center; position: relative; border-radius: var(--m3e-breadcrumb-item-shape, ${DesignToken$1.shape.corner.full}); height: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); column-gap: var(--m3e-breadcrumb-item-icon-label-space, 0.5rem); } .icon { font-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); --m3e-icon-size: var(--m3e-breadcrumb-item--icon-size, 1.25rem); } ::slotted([slot="icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]) { width: 1em; height: 1em; } :host(:state(-icon-only)) .overflow { flex: none; } :host(:not(:state(-icon-only))), :host(:not(:state(-icon-only))) .base { min-width: 0; } :host(:state(-icon-only):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-icon-color, ${DesignToken$1.color.onSurfaceVariant}); } :host(:state(-icon-only)) .base { width: calc(var(--m3e-breadcrumb-item-container-height, 2.5rem) + ${DesignToken$1.density.calc(-1)}); padding-inline: var(--m3e-breadcrumb-item-icon-padding-inline, 0px); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-icon-hover-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-icon-focus-state-layer-color, ${DesignToken$1.color.onSurface} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-icon-pressed-state-layer-color, ${DesignToken$1.color.onSurface}); } :host(:not(:state(-icon-only)):not([current]):not(:disabled)) .base { color: var(--m3e-breadcrumb-item-label-color, ${DesignToken$1.color.primary}); } :host(:not(:state(-icon-only))) .base { font-size: var(--m3e-breadcrumb-item-label-font-size, ${DesignToken$1.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-breadcrumb-item-label-font-weight, ${DesignToken$1.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-breadcrumb-item-label-line-height, ${DesignToken$1.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-breadcrumb-item-label-tracking, ${DesignToken$1.typescale.standard.label.large.tracking}); } :host(:not(:state(-icon-only))) .base { padding-inline: var(--m3e-breadcrumb-item-label-padding-inline, 0.75rem); --m3e-state-layer-hover-color: var( --m3e-breadcrumb-item-label-hover-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-state-layer-focus-color: var( --m3e-breadcrumb-item-label-focus-state-layer-color, ${DesignToken$1.color.primary} ); --m3e-ripple-color: var(--m3e-breadcrumb-item-label-pressed-state-layer-color, ${DesignToken$1.color.primary}); } :host([current]) .base { color: var(--m3e-breadcrumb-item-last-color, ${DesignToken$1.color.onSurface}); } :host(:not(:disabled):not([current])) { cursor: pointer; user-select: none; } :host(:disabled:not([current])) .base { color: color-mix( in srgb, var(--m3e-breadcrumb-item-disabled-color, ${DesignToken$1.color.onSurface}) var(--m3e-breadcrumb-item-disabled-opacity, 38%), transparent ); } .touch { position: absolute; height: 3rem; width: max(3rem, 100%); margin: auto; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { :host(:state(-icon-only):not([current]):not(:disabled)) .base, :host(:not(:state(-icon-only)):not([current]):not(:disabled)) .base { color: LinkText; outline: 1px solid LinkText; } :host(:disabled) .base { color: GrayText; } }`;
|
|
2334
|
+
__decorate([query(".focus-ring")], M3eBreadcrumbItemButtonElement.prototype, "_focusRing", void 0);
|
|
2335
|
+
__decorate([query(".state-layer")], M3eBreadcrumbItemButtonElement.prototype, "_stateLayer", void 0);
|
|
2336
|
+
__decorate([query(".ripple")], M3eBreadcrumbItemButtonElement.prototype, "_ripple", void 0);
|
|
2337
|
+
__decorate([property({
|
|
2338
|
+
reflect: true
|
|
2339
|
+
})], M3eBreadcrumbItemButtonElement.prototype, "current", void 0);
|
|
2340
|
+
M3eBreadcrumbItemButtonElement = __decorate([customElement$1("m3e-breadcrumb-item-button")], M3eBreadcrumbItemButtonElement);
|
|
2341
|
+
|
|
2342
|
+
var _M3eBreadcrumbItemElement_instances, _M3eBreadcrumbItemElement_defaultSeparator, _M3eBreadcrumbItemElement_renderSeparator, _M3eBreadcrumbItemElement_handleIconSlotChange, _M3eBreadcrumbItemElement_handleSlotChange, _M3eBreadcrumbItemElement_updateIconFilled;
|
|
2343
|
+
/**
|
|
2344
|
+
* An item in a breadcrumb.
|
|
2345
|
+
*
|
|
2346
|
+
* @description
|
|
2347
|
+
* The `m3e-breadcrumb-item` element represents a single item in a breadcrumb
|
|
2348
|
+
* navigation trail. It renders an internal button and supports navigation
|
|
2349
|
+
* attributes for link behavior.
|
|
2350
|
+
*
|
|
2351
|
+
* @tag m3e-breadcrumb-item
|
|
2352
|
+
*
|
|
2353
|
+
* @slot - Renders the content of the breadcrumb item.
|
|
2354
|
+
*
|
|
2355
|
+
* @attr item-label - The accessible label used by the internal breadcrumb button.
|
|
2356
|
+
* @attr disabled - Whether the breadcrumb item is disabled.
|
|
2357
|
+
* @attr current - Marks the breadcrumb item as the current location in the trail.
|
|
2358
|
+
* @attr href - The URL to which the internal breadcrumb link button points.
|
|
2359
|
+
* @attr target - The target of the internal breadcrumb link button.
|
|
2360
|
+
* @attr download - A value indicating whether the internal link target will be downloaded, optionally specifying a file name.
|
|
2361
|
+
* @attr rel - The relationship between the internal link target and the document.
|
|
2362
|
+
*
|
|
2363
|
+
* @fires click - Emitted when the element is clicked.
|
|
2364
|
+
*
|
|
2365
|
+
* @cssprop --m3e-breadcrumb-item-shape - Shape of the internal breadcrumb item button.
|
|
2366
|
+
* @cssprop --m3e-breadcrumb-item-container-height - Height of the internal breadcrumb item button container.
|
|
2367
|
+
* @cssprop --m3e-breadcrumb-item-icon-color - Color of breadcrumb item icon-only content.
|
|
2368
|
+
* @cssprop --m3e-breadcrumb-item-icon-padding-inline - Horizontal padding for icon-only breadcrumb items.
|
|
2369
|
+
* @cssprop --m3e-breadcrumb-item-icon-hover-state-layer-color - Hover state layer color for icon-only breadcrumb items.
|
|
2370
|
+
* @cssprop --m3e-breadcrumb-item-icon-focus-state-layer-color - Focus state layer color for icon-only breadcrumb items.
|
|
2371
|
+
* @cssprop --m3e-breadcrumb-item-icon-pressed-state-layer-color - Pressed state layer color for icon-only breadcrumb items.
|
|
2372
|
+
* @cssprop --m3e-breadcrumb-item-label-color - Color of breadcrumb item label content.
|
|
2373
|
+
* @cssprop --m3e-breadcrumb-item-label-font-size - Font size of breadcrumb item label content.
|
|
2374
|
+
* @cssprop --m3e-breadcrumb-item-label-font-weight - Font weight of breadcrumb item label content.
|
|
2375
|
+
* @cssprop --m3e-breadcrumb-item-label-line-height - Line height of breadcrumb item label content.
|
|
2376
|
+
* @cssprop --m3e-breadcrumb-item-label-tracking - Letter spacing of breadcrumb item label content.
|
|
2377
|
+
* @cssprop --m3e-breadcrumb-item-label-padding-inline - Horizontal padding for label breadcrumb items.
|
|
2378
|
+
* @cssprop --m3e-breadcrumb-item-label-hover-state-layer-color - Hover state layer color for label breadcrumb items.
|
|
2379
|
+
* @cssprop --m3e-breadcrumb-item-label-focus-state-layer-color - Focus state layer color for label breadcrumb items.
|
|
2380
|
+
* @cssprop --m3e-breadcrumb-item-label-pressed-state-layer-color - Pressed state layer color for label breadcrumb items.
|
|
2381
|
+
* @cssprop --m3e-breadcrumb-item-last-color - Color used for the current breadcrumb item.
|
|
2382
|
+
* @cssprop --m3e-breadcrumb-item-icon-label-space - Space between icon and label.
|
|
2383
|
+
* @cssprop --m3e-breadcrumb-item-icon-size - Size of the icon.
|
|
2384
|
+
* @cssprop --m3e-breadcrumb-item-disabled-color - Disabled color used by the breadcrumb item button.
|
|
2385
|
+
* @cssprop --m3e-breadcrumb-item-disabled-opacity - Disabled opacity used by the breadcrumb item button.
|
|
2386
|
+
*/
|
|
2387
|
+
let M3eBreadcrumbItemElement = class M3eBreadcrumbItemElement extends LinkButton$1(AttachInternals$1(Role$1(LitElement, "listitem")), true) {
|
|
2388
|
+
constructor() {
|
|
2389
|
+
super(...arguments);
|
|
2390
|
+
_M3eBreadcrumbItemElement_instances.add(this);
|
|
2391
|
+
/** @private */
|
|
2392
|
+
_M3eBreadcrumbItemElement_defaultSeparator.set(this, void 0);
|
|
2393
|
+
/**
|
|
2394
|
+
* The accessible label given to the item's internal button.
|
|
2395
|
+
* @default ""
|
|
2396
|
+
*/
|
|
2397
|
+
this.itemLabel = "";
|
|
2398
|
+
/**
|
|
2399
|
+
* Whether the element is disabled.
|
|
2400
|
+
* @default false
|
|
2401
|
+
*/
|
|
2402
|
+
this.disabled = false;
|
|
2403
|
+
}
|
|
2404
|
+
/** @inheritdoc */
|
|
2405
|
+
focus(options) {
|
|
2406
|
+
this._button?.focus(options);
|
|
2407
|
+
}
|
|
2408
|
+
/** @inheritdoc */
|
|
2409
|
+
blur() {
|
|
2410
|
+
this._button?.blur();
|
|
2411
|
+
}
|
|
2412
|
+
/** @inheritdoc */
|
|
2413
|
+
click() {
|
|
2414
|
+
this._button?.click();
|
|
2415
|
+
}
|
|
2416
|
+
/** @inheritdoc */
|
|
2417
|
+
updated(_changedProperties) {
|
|
2418
|
+
super.updated(_changedProperties);
|
|
2419
|
+
if (_changedProperties.has("current")) {
|
|
2420
|
+
__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_updateIconFilled).call(this);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
/** @inheritdoc */
|
|
2424
|
+
render() {
|
|
2425
|
+
return html`<div class="base"><m3e-breadcrumb-item-button class="button" aria-label="${ifDefined(this.itemLabel || undefined)}" ?disabled="${this.disabled}" current="${ifDefined(this.current)}" href="${ifDefined(this.href || undefined)}" target="${ifDefined(this.target || undefined)}" download="${ifDefined(this.download || undefined)}" rel="${ifDefined(this.rel || undefined)}"><slot name="icon" slot="icon" @slotchange="${__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_handleIconSlotChange)}"></slot><slot @slotchange="${__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_handleSlotChange)}"></slot></m3e-breadcrumb-item-button>${__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_renderSeparator).call(this)}</div>`;
|
|
2426
|
+
}
|
|
2427
|
+
/** @internal */
|
|
2428
|
+
_setSeparator(nodes) {
|
|
2429
|
+
const separator = this.shadowRoot?.querySelector(".separator");
|
|
2430
|
+
if (!separator) return;
|
|
2431
|
+
if (nodes.length > 0) {
|
|
2432
|
+
if (!__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_defaultSeparator, "f") && separator.firstElementChild) {
|
|
2433
|
+
__classPrivateFieldSet(this, _M3eBreadcrumbItemElement_defaultSeparator, separator.firstElementChild, "f");
|
|
2434
|
+
}
|
|
2435
|
+
separator.replaceChildren(...nodes);
|
|
2436
|
+
} else if (__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_defaultSeparator, "f")) {
|
|
2437
|
+
separator.replaceChildren(__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_defaultSeparator, "f"));
|
|
2438
|
+
__classPrivateFieldSet(this, _M3eBreadcrumbItemElement_defaultSeparator, undefined, "f");
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2442
|
+
_M3eBreadcrumbItemElement_defaultSeparator = new WeakMap();
|
|
2443
|
+
_M3eBreadcrumbItemElement_instances = new WeakSet();
|
|
2444
|
+
_M3eBreadcrumbItemElement_renderSeparator = function _M3eBreadcrumbItemElement_renderSeparator() {
|
|
2445
|
+
return this.current ? nothing : html`<div class="separator" aria-hidden="true"><svg class="separator-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg></div>`;
|
|
2446
|
+
};
|
|
2447
|
+
_M3eBreadcrumbItemElement_handleIconSlotChange = function _M3eBreadcrumbItemElement_handleIconSlotChange() {
|
|
2448
|
+
__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_updateIconFilled).call(this);
|
|
2449
|
+
};
|
|
2450
|
+
_M3eBreadcrumbItemElement_handleSlotChange = function _M3eBreadcrumbItemElement_handleSlotChange(e) {
|
|
2451
|
+
setCustomState$1(this, "-icon-only", isIconOnly(e.target));
|
|
2452
|
+
__classPrivateFieldGet(this, _M3eBreadcrumbItemElement_instances, "m", _M3eBreadcrumbItemElement_updateIconFilled).call(this);
|
|
2453
|
+
};
|
|
2454
|
+
_M3eBreadcrumbItemElement_updateIconFilled = function _M3eBreadcrumbItemElement_updateIconFilled() {
|
|
2455
|
+
this.querySelectorAll("m3e-icon").forEach(x => x.filled = this.current !== undefined && this.current !== null);
|
|
2456
|
+
};
|
|
2457
|
+
/** The styles of the element. */
|
|
2458
|
+
M3eBreadcrumbItemElement.styles = css`:host { display: block; } .base { display: flex; align-items: center; height: 100%; } :host(:not(:state(-icon-only))[current]), :host(:not(:state(-icon-only))[current]) .base { min-width: 0; } .button { flex: 1 1 auto; } .separator { flex: none; display: flex; justify-content: center; align-items: center; min-width: 0.5rem; --m3e-icon-size: var(--m3e-breadcrumb-separator-icon-size, 1.5rem); } .separator-icon { width: 1em; height: 1em; font-size: var(--m3e-icon-size); vertical-align: middle; }`;
|
|
2459
|
+
__decorate([query(".button")], M3eBreadcrumbItemElement.prototype, "_button", void 0);
|
|
2460
|
+
__decorate([property({
|
|
2461
|
+
attribute: "item-label"
|
|
2462
|
+
})], M3eBreadcrumbItemElement.prototype, "itemLabel", void 0);
|
|
2463
|
+
__decorate([property({
|
|
2464
|
+
type: Boolean,
|
|
2465
|
+
reflect: true
|
|
2466
|
+
})], M3eBreadcrumbItemElement.prototype, "disabled", void 0);
|
|
2467
|
+
__decorate([property({
|
|
2468
|
+
reflect: true
|
|
2469
|
+
})], M3eBreadcrumbItemElement.prototype, "current", void 0);
|
|
2470
|
+
M3eBreadcrumbItemElement = __decorate([customElement$1("m3e-breadcrumb-item")], M3eBreadcrumbItemElement);
|
|
2471
|
+
|
|
2155
2472
|
/**
|
|
2156
2473
|
* Component design tokens that control the `M3eButtonElement` for all size variants.
|
|
2157
2474
|
* @internal
|
|
@@ -6323,6 +6640,64 @@ let M3eSuggestionChipElement = class M3eSuggestionChipElement extends FormSubmit
|
|
|
6323
6640
|
M3eSuggestionChipElement.formAssociated = true;
|
|
6324
6641
|
M3eSuggestionChipElement = __decorate([customElement$1("m3e-suggestion-chip")], M3eSuggestionChipElement);
|
|
6325
6642
|
|
|
6643
|
+
var _M3eContentPaneElement_instances, _M3eContentPaneElement_updateScrollbarWidth;
|
|
6644
|
+
/**
|
|
6645
|
+
* A shaped surface for vertically scrollable content.
|
|
6646
|
+
*
|
|
6647
|
+
* @description
|
|
6648
|
+
* The `m3e-content-pane` component renders a shaped surface with padding and vertical
|
|
6649
|
+
* scrolling for document‑like content.
|
|
6650
|
+
*
|
|
6651
|
+
* @example
|
|
6652
|
+
* The following example illustrates basic usage of the content pane.
|
|
6653
|
+
* ```html
|
|
6654
|
+
* <m3e-content-pane>
|
|
6655
|
+
* <p>This is some scrollable content.</p>
|
|
6656
|
+
* <p>More content here...</p>
|
|
6657
|
+
* </m3e-content-pane>
|
|
6658
|
+
* ```
|
|
6659
|
+
*
|
|
6660
|
+
* @tag m3e-content-pane
|
|
6661
|
+
*
|
|
6662
|
+
* @slot - Renders the content of the pane.
|
|
6663
|
+
*
|
|
6664
|
+
* @cssprop --m3e-content-pane-container-shape - Corner radius applied to the pane’s outer surface.
|
|
6665
|
+
* @cssprop --m3e-content-pane-container-color - Background color of the pane’s surface.
|
|
6666
|
+
* @cssprop --m3e-content-pane-container-padding - Internal padding applied to all sides of the scrollable content.
|
|
6667
|
+
*/
|
|
6668
|
+
let M3eContentPaneElement = class M3eContentPaneElement extends ReconnectedCallback$1(LitElement) {
|
|
6669
|
+
constructor() {
|
|
6670
|
+
super(...arguments);
|
|
6671
|
+
_M3eContentPaneElement_instances.add(this);
|
|
6672
|
+
}
|
|
6673
|
+
/** @inheritdoc */
|
|
6674
|
+
reconnectedCallback() {
|
|
6675
|
+
super.reconnectedCallback();
|
|
6676
|
+
__classPrivateFieldGet(this, _M3eContentPaneElement_instances, "m", _M3eContentPaneElement_updateScrollbarWidth).call(this);
|
|
6677
|
+
}
|
|
6678
|
+
/** @inheritdoc */
|
|
6679
|
+
firstUpdated(_changedProperties) {
|
|
6680
|
+
super.firstUpdated(_changedProperties);
|
|
6681
|
+
__classPrivateFieldGet(this, _M3eContentPaneElement_instances, "m", _M3eContentPaneElement_updateScrollbarWidth).call(this);
|
|
6682
|
+
}
|
|
6683
|
+
/** @inheritdoc */
|
|
6684
|
+
render() {
|
|
6685
|
+
return html`<div class="base"><div class="scroll-container"><slot></slot></div></div>`;
|
|
6686
|
+
}
|
|
6687
|
+
};
|
|
6688
|
+
_M3eContentPaneElement_instances = new WeakSet();
|
|
6689
|
+
_M3eContentPaneElement_updateScrollbarWidth = function _M3eContentPaneElement_updateScrollbarWidth() {
|
|
6690
|
+
const base = this.shadowRoot?.querySelector(".base");
|
|
6691
|
+
if (!base) return;
|
|
6692
|
+
const style = getComputedStyle(base);
|
|
6693
|
+
const scrollbarThinWidth = style.getPropertyValue("--m3e-scrollbar-thin-width");
|
|
6694
|
+
const scrollbarWidth = scrollbarThinWidth.endsWith("px") ? parseFloat(scrollbarThinWidth) : getScrollbarWidth$1(!scrollbarThinWidth || scrollbarThinWidth === "thin");
|
|
6695
|
+
base.style.setProperty("--_scrollbar-width", `${scrollbarWidth}px`);
|
|
6696
|
+
};
|
|
6697
|
+
/** The styles of the element. */
|
|
6698
|
+
M3eContentPaneElement.styles = css`:host { display: block; } .base { width: 100%; height: 100%; overflow: hidden; border-radius: var(--m3e-content-pane-container-shape, ${DesignToken$1.shape.corner.extraLarge}); background-color: var(--m3e-content-pane-container-color, ${DesignToken$1.color.surface}); } .scroll-container { width: inherit; height: inherit; border-radius: inherit; box-sizing: border-box; overflow-y: auto; outline: none; padding-block: var(--m3e-content-pane-container-padding, ${DesignToken$1.shape.corner.value.extraLarge}); padding-inline-start: var(--m3e-content-pane-container-padding, ${DesignToken$1.shape.corner.value.extraLarge}); padding-inline-end: calc( var(--m3e-content-pane-container-padding, ${DesignToken$1.shape.corner.value.extraLarge}) - var( --_scrollbar-width, 0px ) ); scrollbar-color: ${DesignToken$1.scrollbar.color}; scrollbar-width: ${DesignToken$1.scrollbar.thinWidth}; }`;
|
|
6699
|
+
M3eContentPaneElement = __decorate([customElement$1("m3e-content-pane")], M3eContentPaneElement);
|
|
6700
|
+
|
|
6326
6701
|
var _AnimationLoopController_frameId, _AnimationLoopController_lastTime, _AnimationLoopController_running, _AnimationLoopController_callback, _AnimationLoopController_loop;
|
|
6327
6702
|
/** A `ReactiveController` used to execute a function in an animation loop. */
|
|
6328
6703
|
class AnimationLoopController {
|
|
@@ -6788,6 +7163,45 @@ function generateClipPaths(paths, maxPoints) {
|
|
|
6788
7163
|
return normalizePointSets(paths.map(x => samplePath(x, maxPoints))).map(x => pointsToPercentClipPath(x));
|
|
6789
7164
|
}
|
|
6790
7165
|
|
|
7166
|
+
let _cachedScrollbarWidth = null;
|
|
7167
|
+
let _cachedThinScrollbarWidth = null;
|
|
7168
|
+
/**
|
|
7169
|
+
* Computes the width of a scrollbar.
|
|
7170
|
+
* @param {boolean} [thin=false] Whether to get the width of a thin scrollbar.
|
|
7171
|
+
* @returns {number} The width of a scrollbar.
|
|
7172
|
+
*/
|
|
7173
|
+
function getScrollbarWidth(thin = false) {
|
|
7174
|
+
if (thin) {
|
|
7175
|
+
if (_cachedThinScrollbarWidth !== null) {
|
|
7176
|
+
return _cachedThinScrollbarWidth;
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
if (_cachedScrollbarWidth !== null) {
|
|
7180
|
+
return _cachedScrollbarWidth;
|
|
7181
|
+
}
|
|
7182
|
+
const outer = document.createElement("div");
|
|
7183
|
+
outer.style.visibility = "hidden";
|
|
7184
|
+
outer.style.overflow = "scroll";
|
|
7185
|
+
if (thin) {
|
|
7186
|
+
outer.style.scrollbarWidth = "thin";
|
|
7187
|
+
}
|
|
7188
|
+
outer.style.width = "100px";
|
|
7189
|
+
outer.style.position = "absolute";
|
|
7190
|
+
outer.style.top = "-9999px";
|
|
7191
|
+
document.body.appendChild(outer);
|
|
7192
|
+
const inner = document.createElement("div");
|
|
7193
|
+
inner.style.width = "100%";
|
|
7194
|
+
outer.appendChild(inner);
|
|
7195
|
+
let scrollbarWidth;
|
|
7196
|
+
if (thin) {
|
|
7197
|
+
scrollbarWidth = _cachedThinScrollbarWidth = outer.offsetWidth - inner.offsetWidth;
|
|
7198
|
+
} else {
|
|
7199
|
+
scrollbarWidth = _cachedScrollbarWidth = outer.offsetWidth - inner.offsetWidth;
|
|
7200
|
+
}
|
|
7201
|
+
outer.remove();
|
|
7202
|
+
return scrollbarWidth;
|
|
7203
|
+
}
|
|
7204
|
+
|
|
6791
7205
|
/**
|
|
6792
7206
|
* Gets the text content of a given node, including slotted content.
|
|
6793
7207
|
* @param {Node} node The node for which to get text content.
|
|
@@ -9733,9 +10147,10 @@ const _clickHandler = Symbol("_clickHandler");
|
|
|
9733
10147
|
* Mixin to augment an element with behavior that supports functioning as a link.
|
|
9734
10148
|
* @template T The type of the base class.
|
|
9735
10149
|
* @param {T} base The base class.
|
|
10150
|
+
* @param {boolean} [disableClick=false] Whether to disable the default click handler.
|
|
9736
10151
|
* @returns {Constructor<LinkButtonMixin>} A constructor that implements `LinkButtonMixin`.
|
|
9737
10152
|
*/
|
|
9738
|
-
function LinkButton(base) {
|
|
10153
|
+
function LinkButton(base, disableClick = false) {
|
|
9739
10154
|
var __LinkButtonMixin_instances, __LinkButtonMixin_handleLinkPointerDown, __LinkButtonMixin_handleLinkFocus, __LinkButtonMixin_handleLinkBlur, _a;
|
|
9740
10155
|
class _LinkButtonMixin extends base {
|
|
9741
10156
|
constructor() {
|
|
@@ -9806,7 +10221,9 @@ function LinkButton(base) {
|
|
|
9806
10221
|
/** @inheritdoc */
|
|
9807
10222
|
connectedCallback() {
|
|
9808
10223
|
super.connectedCallback();
|
|
9809
|
-
|
|
10224
|
+
if (!disableClick) {
|
|
10225
|
+
this.addEventListener("click", this[_clickHandler]);
|
|
10226
|
+
}
|
|
9810
10227
|
if (this.hasAttribute("href") && this.role === "button") {
|
|
9811
10228
|
this.role = "link";
|
|
9812
10229
|
}
|
|
@@ -9814,7 +10231,9 @@ function LinkButton(base) {
|
|
|
9814
10231
|
/** @inheritdoc */
|
|
9815
10232
|
disconnectedCallback() {
|
|
9816
10233
|
super.disconnectedCallback();
|
|
9817
|
-
|
|
10234
|
+
if (!disableClick) {
|
|
10235
|
+
this.removeEventListener("click", this[_clickHandler]);
|
|
10236
|
+
}
|
|
9818
10237
|
}
|
|
9819
10238
|
/** @internal */
|
|
9820
10239
|
[(__LinkButtonMixin_instances = new WeakSet(), _a = _clickHandler, renderPseudoLink)]() {
|
|
@@ -17362,6 +17781,40 @@ _M3eActionListElement_keyDownHandler = new WeakMap();
|
|
|
17362
17781
|
_a$8 = selectionManager;
|
|
17363
17782
|
M3eActionListElement = __decorate([customElement$1("m3e-action-list")], M3eActionListElement);
|
|
17364
17783
|
|
|
17784
|
+
/**
|
|
17785
|
+
* @internal
|
|
17786
|
+
* An internal interactive element used to present the content of a list item.
|
|
17787
|
+
*/
|
|
17788
|
+
let M3eListItemButtonElement = class M3eListItemButtonElement extends KeyboardClick$1(LinkButton$1(Focusable$1(Disabled$1(AttachInternals$1(Role$1(M3eListItemElement, "button"), true))))) {
|
|
17789
|
+
constructor() {
|
|
17790
|
+
super();
|
|
17791
|
+
new FocusController$1(this, {
|
|
17792
|
+
callback: (_, focusVisible) => this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible", focusVisible)
|
|
17793
|
+
});
|
|
17794
|
+
new PressedController$1(this, {
|
|
17795
|
+
callback: pressed => this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed", pressed)
|
|
17796
|
+
});
|
|
17797
|
+
new HoverController$1(this, {
|
|
17798
|
+
callback: hovering => this.shadowRoot?.querySelector(".base")?.classList.toggle("hover", hovering)
|
|
17799
|
+
});
|
|
17800
|
+
}
|
|
17801
|
+
/** @inheritdoc */
|
|
17802
|
+
firstUpdated(_changedProperties) {
|
|
17803
|
+
super.firstUpdated(_changedProperties);
|
|
17804
|
+
[this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
|
|
17805
|
+
}
|
|
17806
|
+
/** @inheritdoc */
|
|
17807
|
+
render() {
|
|
17808
|
+
return html`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>${this[renderPseudoLink$1]()} ${super._renderBase()}</div>`;
|
|
17809
|
+
}
|
|
17810
|
+
};
|
|
17811
|
+
/** The styles of the element. */
|
|
17812
|
+
M3eListItemButtonElement.styles = [M3eListItemElement.styles, css`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } :host(:not(:disabled)) { cursor: pointer; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } slot[name="trailing"] { align-self: var(--_list-item-button-trailing-align-self, auto); }`];
|
|
17813
|
+
__decorate([query(".focus-ring")], M3eListItemButtonElement.prototype, "_focusRing", void 0);
|
|
17814
|
+
__decorate([query(".state-layer")], M3eListItemButtonElement.prototype, "_stateLayer", void 0);
|
|
17815
|
+
__decorate([query(".ripple")], M3eListItemButtonElement.prototype, "_ripple", void 0);
|
|
17816
|
+
M3eListItemButtonElement = __decorate([customElement$1("m3e-list-item-button")], M3eListItemButtonElement);
|
|
17817
|
+
|
|
17365
17818
|
var _M3eListActionElement_instances, _M3eListActionElement_handleClick;
|
|
17366
17819
|
/**
|
|
17367
17820
|
* An item in a list that performs an action.
|
|
@@ -17443,7 +17896,7 @@ var _M3eListActionElement_instances, _M3eListActionElement_handleClick;
|
|
|
17443
17896
|
* @cssprop --m3e-list-item-three-line-top-offset - Top offset for media in three line items.
|
|
17444
17897
|
* @cssprop --m3e-list-item-disabled-media-opacity - Opacity for media when disabled.
|
|
17445
17898
|
*/
|
|
17446
|
-
let M3eListActionElement = class M3eListActionElement extends LinkButton$1(M3eListItemElement) {
|
|
17899
|
+
let M3eListActionElement = class M3eListActionElement extends LinkButton$1(M3eListItemElement, true) {
|
|
17447
17900
|
constructor() {
|
|
17448
17901
|
super(...arguments);
|
|
17449
17902
|
_M3eListActionElement_instances.add(this);
|
|
@@ -17485,40 +17938,6 @@ __decorate([property({
|
|
|
17485
17938
|
})], M3eListActionElement.prototype, "disabled", void 0);
|
|
17486
17939
|
M3eListActionElement = __decorate([customElement$1("m3e-list-action")], M3eListActionElement);
|
|
17487
17940
|
|
|
17488
|
-
/**
|
|
17489
|
-
* @internal
|
|
17490
|
-
* An internal interactive element used to present the content of a list item.
|
|
17491
|
-
*/
|
|
17492
|
-
let M3eListItemButtonElement = class M3eListItemButtonElement extends KeyboardClick$1(LinkButton$1(Focusable$1(Disabled$1(AttachInternals$1(Role$1(M3eListItemElement, "button"), true))))) {
|
|
17493
|
-
constructor() {
|
|
17494
|
-
super();
|
|
17495
|
-
new FocusController$1(this, {
|
|
17496
|
-
callback: (_, focusVisible) => this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible", focusVisible)
|
|
17497
|
-
});
|
|
17498
|
-
new PressedController$1(this, {
|
|
17499
|
-
callback: pressed => this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed", pressed)
|
|
17500
|
-
});
|
|
17501
|
-
new HoverController$1(this, {
|
|
17502
|
-
callback: hovering => this.shadowRoot?.querySelector(".base")?.classList.toggle("hover", hovering)
|
|
17503
|
-
});
|
|
17504
|
-
}
|
|
17505
|
-
/** @inheritdoc */
|
|
17506
|
-
firstUpdated(_changedProperties) {
|
|
17507
|
-
super.firstUpdated(_changedProperties);
|
|
17508
|
-
[this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
|
|
17509
|
-
}
|
|
17510
|
-
/** @inheritdoc */
|
|
17511
|
-
render() {
|
|
17512
|
-
return html`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>${this[renderPseudoLink$1]()} ${super._renderBase()}</div>`;
|
|
17513
|
-
}
|
|
17514
|
-
};
|
|
17515
|
-
/** The styles of the element. */
|
|
17516
|
-
M3eListItemButtonElement.styles = [M3eListItemElement.styles, css`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } :host(:not(:disabled)) { cursor: pointer; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } slot[name="trailing"] { align-self: var(--_list-item-button-trailing-align-self, auto); }`];
|
|
17517
|
-
__decorate([query(".focus-ring")], M3eListItemButtonElement.prototype, "_focusRing", void 0);
|
|
17518
|
-
__decorate([query(".state-layer")], M3eListItemButtonElement.prototype, "_stateLayer", void 0);
|
|
17519
|
-
__decorate([query(".ripple")], M3eListItemButtonElement.prototype, "_ripple", void 0);
|
|
17520
|
-
M3eListItemButtonElement = __decorate([customElement$1("m3e-list-item-button")], M3eListItemButtonElement);
|
|
17521
|
-
|
|
17522
17941
|
var _M3eListOptionElement_instances, _M3eListOptionElement_value, _M3eListOptionElement_textContent, _M3eListOptionElement_clickHandler, _M3eListOptionElement_handleSlotChange, _M3eListOptionElement_handleClick;
|
|
17523
17942
|
/**
|
|
17524
17943
|
* A selectable option in a list.
|
|
@@ -24949,7 +25368,7 @@ __decorate([property({
|
|
|
24949
25368
|
})], M3eSplitButtonElement.prototype, "size", void 0);
|
|
24950
25369
|
M3eSplitButtonElement = __decorate([customElement$1("m3e-split-button")], M3eSplitButtonElement);
|
|
24951
25370
|
|
|
24952
|
-
var _M3eSplitPaneElement_instances, _M3eSplitPaneElement_breakpointUnobserve,
|
|
25371
|
+
var _M3eSplitPaneElement_instances, _M3eSplitPaneElement_breakpointUnobserve, _M3eSplitPaneElement_dragState, _M3eSplitPaneElement_valueChanged, _M3eSplitPaneElement_snapAnimation, _M3eSplitPaneElement_pressedController, _M3eSplitPaneElement_startMutationController, _M3eSplitPaneElement_endMutationController, _M3eSplitPaneElement_renderDragHandle, _M3eSplitPaneElement_handleStartSlotChange, _M3eSplitPaneElement_handleEndSlotChange, _M3eSplitPaneElement_handleSlotChange, _M3eSplitPaneElement_updatePaneVisibility, _M3eSplitPaneElement_hasVisibleElements, _M3eSplitPaneElement_initialize, _M3eSplitPaneElement_initBreakpointMonitoring, _M3eSplitPaneElement_updateOrientation, _M3eSplitPaneElement_clearOrientation, _M3eSplitPaneElement_handlePointerDown, _M3eSplitPaneElement_handlePointerMove, _M3eSplitPaneElement_handlePointerUp, _M3eSplitPaneElement_handleKeyDown, _M3eSplitPaneElement_changeValue, _M3eSplitPaneElement_getClosestDetent, _M3eSplitPaneElement_getNextHigherDetent, _M3eSplitPaneElement_getNextLowerDetent, _M3eSplitPaneElement_computeDetent, _M3eSplitPaneElement_clearSnapAnimation, _M3eSplitPaneElement_snapToValue, _M3eSplitPaneElement_cycleDetent;
|
|
24953
25372
|
/**
|
|
24954
25373
|
* A dual-view layout that separates content with a movable drag handle.
|
|
24955
25374
|
* @description
|
|
@@ -24998,6 +25417,7 @@ var _M3eSplitPaneElement_instances, _M3eSplitPaneElement_breakpointUnobserve, _M
|
|
|
24998
25417
|
* @attr max - A fractional value, between 0 and 100, indicating the maximum size of the start pane.
|
|
24999
25418
|
* @attr min - A fractional value, between 0 and 100, indicating the minimum size of the start pane.
|
|
25000
25419
|
* @attr orientation - The orientation of the split.
|
|
25420
|
+
* @attr overshoot-limit - A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
|
|
25001
25421
|
* @attr step - A fractional value, between 0 and 100, indicating the increment by which to adjust the value when resized via keyboard.
|
|
25002
25422
|
* @attr value - A fractional value, between 0 and 100, indicating the size of the start pane.
|
|
25003
25423
|
* @attr wrap-detents - Whether cycling through detents will wrap.
|
|
@@ -25026,12 +25446,10 @@ let M3eSplitPaneElement = class M3eSplitPaneElement extends FormAssociated$1(Dis
|
|
|
25026
25446
|
/** @private */
|
|
25027
25447
|
_M3eSplitPaneElement_breakpointUnobserve.set(this, void 0);
|
|
25028
25448
|
/** @private */
|
|
25029
|
-
|
|
25449
|
+
_M3eSplitPaneElement_dragState.set(this, void 0);
|
|
25030
25450
|
/** @private */
|
|
25031
25451
|
_M3eSplitPaneElement_valueChanged.set(this, false);
|
|
25032
25452
|
/** @private */
|
|
25033
|
-
_M3eSplitPaneElement_cachedSize.set(this, 0);
|
|
25034
|
-
/** @private */
|
|
25035
25453
|
_M3eSplitPaneElement_snapAnimation.set(this, void 0);
|
|
25036
25454
|
/** @private */
|
|
25037
25455
|
_M3eSplitPaneElement_pressedController.set(this, new PressedController$1(this, {
|
|
@@ -25071,6 +25489,11 @@ let M3eSplitPaneElement = class M3eSplitPaneElement extends FormAssociated$1(Dis
|
|
|
25071
25489
|
* @default 100
|
|
25072
25490
|
*/
|
|
25073
25491
|
this.max = 100;
|
|
25492
|
+
/**
|
|
25493
|
+
* A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
|
|
25494
|
+
* @default 4
|
|
25495
|
+
*/
|
|
25496
|
+
this.overshootLimit = 4;
|
|
25074
25497
|
/**
|
|
25075
25498
|
* A fractional value, between 0 and 100, indicating the increment by which to adjust the value when resized via keyboard.
|
|
25076
25499
|
* @default 1
|
|
@@ -25117,7 +25540,7 @@ let M3eSplitPaneElement = class M3eSplitPaneElement extends FormAssociated$1(Dis
|
|
|
25117
25540
|
return this._orientation ?? (this.orientation !== "vertical" ? "horizontal" : "vertical");
|
|
25118
25541
|
}
|
|
25119
25542
|
/** @inheritdoc */
|
|
25120
|
-
get [(_M3eSplitPaneElement_breakpointUnobserve = new WeakMap(),
|
|
25543
|
+
get [(_M3eSplitPaneElement_breakpointUnobserve = new WeakMap(), _M3eSplitPaneElement_dragState = new WeakMap(), _M3eSplitPaneElement_valueChanged = new WeakMap(), _M3eSplitPaneElement_snapAnimation = new WeakMap(), _M3eSplitPaneElement_pressedController = new WeakMap(), _M3eSplitPaneElement_startMutationController = new WeakMap(), _M3eSplitPaneElement_endMutationController = new WeakMap(), _M3eSplitPaneElement_instances = new WeakSet(), formValue$1)]() {
|
|
25121
25544
|
return this.value?.toString() ?? null;
|
|
25122
25545
|
}
|
|
25123
25546
|
/**
|
|
@@ -25246,18 +25669,46 @@ _M3eSplitPaneElement_handlePointerDown = function _M3eSplitPaneElement_handlePoi
|
|
|
25246
25669
|
if (this.disabled) return;
|
|
25247
25670
|
this._dragHandle.setPointerCapture(e.pointerId);
|
|
25248
25671
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_valueChanged, false, "f");
|
|
25249
|
-
|
|
25250
|
-
|
|
25672
|
+
let min = this.min;
|
|
25673
|
+
if (min === 0 && this.detents.length > 0) {
|
|
25674
|
+
const detent = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_getClosestDetent).call(this, 0);
|
|
25675
|
+
if (detent > -1) {
|
|
25676
|
+
min = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_computeDetent).call(this, this.detents[detent]) ?? this.min;
|
|
25677
|
+
}
|
|
25678
|
+
}
|
|
25679
|
+
let max = this.max;
|
|
25680
|
+
if (max === 100 && this.detents.length > 0) {
|
|
25681
|
+
const detent = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_getClosestDetent).call(this, 100);
|
|
25682
|
+
if (detent > -1) {
|
|
25683
|
+
max = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_computeDetent).call(this, this.detents[detent]) ?? this.max;
|
|
25684
|
+
}
|
|
25685
|
+
}
|
|
25686
|
+
__classPrivateFieldSet(this, _M3eSplitPaneElement_dragState, {
|
|
25687
|
+
startPos: this.currentOrientation === "vertical" ? e.clientY : e.clientX,
|
|
25688
|
+
startValue: this.value,
|
|
25689
|
+
cachedSize: this.currentOrientation === "vertical" ? this.clientHeight : this.clientWidth,
|
|
25690
|
+
min,
|
|
25691
|
+
max
|
|
25692
|
+
}, "f");
|
|
25251
25693
|
};
|
|
25252
25694
|
_M3eSplitPaneElement_handlePointerMove = function _M3eSplitPaneElement_handlePointerMove(e) {
|
|
25253
|
-
if (!this._dragHandle.hasPointerCapture(e.pointerId)) return;
|
|
25695
|
+
if (!this._dragHandle.hasPointerCapture(e.pointerId) || !__classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f")) return;
|
|
25254
25696
|
const pos = this.currentOrientation === "vertical" ? e.clientY : e.clientX;
|
|
25255
|
-
let delta = __classPrivateFieldGet(this,
|
|
25697
|
+
let delta = __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").cachedSize > 0 ? (pos - __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").startPos) / __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").cachedSize * 100 : 0;
|
|
25256
25698
|
if (M3eDirectionality.current === "rtl" && this.currentOrientation !== "vertical") {
|
|
25257
25699
|
delta = -delta;
|
|
25258
25700
|
}
|
|
25259
|
-
|
|
25260
|
-
|
|
25701
|
+
let value = __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").startValue + delta;
|
|
25702
|
+
if (value < __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").min) {
|
|
25703
|
+
const overshoot = __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").min - value;
|
|
25704
|
+
const compressed = this.overshootLimit * overshoot / (overshoot + this.overshootLimit);
|
|
25705
|
+
value = __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").min - compressed;
|
|
25706
|
+
} else if (value > __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").max) {
|
|
25707
|
+
const overshoot = value - __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").max;
|
|
25708
|
+
const compressed = this.overshootLimit * overshoot / (overshoot + this.overshootLimit);
|
|
25709
|
+
value = __classPrivateFieldGet(this, _M3eSplitPaneElement_dragState, "f").max + compressed;
|
|
25710
|
+
}
|
|
25711
|
+
if (__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_changeValue).call(this, value, false, true)) {
|
|
25261
25712
|
__classPrivateFieldSet(this, _M3eSplitPaneElement_valueChanged, true, "f");
|
|
25262
25713
|
}
|
|
25263
25714
|
};
|
|
@@ -25265,14 +25716,17 @@ _M3eSplitPaneElement_handlePointerUp = function _M3eSplitPaneElement_handlePoint
|
|
|
25265
25716
|
if (e.pointerType === "mouse" && e.button > 1) return;
|
|
25266
25717
|
if (this._dragHandle.hasPointerCapture(e.pointerId)) {
|
|
25267
25718
|
this._dragHandle.releasePointerCapture(e.pointerId);
|
|
25268
|
-
__classPrivateFieldSet(this,
|
|
25269
|
-
__classPrivateFieldSet(this, _M3eSplitPaneElement_cachedSize, 0, "f");
|
|
25719
|
+
__classPrivateFieldSet(this, _M3eSplitPaneElement_dragState, undefined, "f");
|
|
25270
25720
|
const detent = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_getClosestDetent).call(this, this.value);
|
|
25271
25721
|
if (detent >= 0) {
|
|
25272
25722
|
const value = __classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_computeDetent).call(this, this.detents[detent]);
|
|
25273
25723
|
if (value !== undefined) {
|
|
25274
25724
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_snapToValue).call(this, value, false);
|
|
25275
25725
|
}
|
|
25726
|
+
} else if (this.value < this.min) {
|
|
25727
|
+
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_snapToValue).call(this, this.min, false);
|
|
25728
|
+
} else if (this.value > this.max) {
|
|
25729
|
+
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_snapToValue).call(this, this.max, false);
|
|
25276
25730
|
}
|
|
25277
25731
|
if (__classPrivateFieldGet(this, _M3eSplitPaneElement_valueChanged, "f")) {
|
|
25278
25732
|
this.dispatchEvent(new Event("change", {
|
|
@@ -25411,9 +25865,11 @@ _M3eSplitPaneElement_handleKeyDown = function _M3eSplitPaneElement_handleKeyDown
|
|
|
25411
25865
|
break;
|
|
25412
25866
|
}
|
|
25413
25867
|
};
|
|
25414
|
-
_M3eSplitPaneElement_changeValue = function _M3eSplitPaneElement_changeValue(value, emitChange = true) {
|
|
25868
|
+
_M3eSplitPaneElement_changeValue = function _M3eSplitPaneElement_changeValue(value, emitChange = true, allowOvershoot = false) {
|
|
25415
25869
|
__classPrivateFieldGet(this, _M3eSplitPaneElement_instances, "m", _M3eSplitPaneElement_clearSnapAnimation).call(this);
|
|
25416
|
-
|
|
25870
|
+
if (!allowOvershoot) {
|
|
25871
|
+
value = Math.max(this.min, Math.min(this.max, value));
|
|
25872
|
+
}
|
|
25417
25873
|
if (value != this.value) {
|
|
25418
25874
|
const prev = this.value;
|
|
25419
25875
|
this.value = value;
|
|
@@ -25545,6 +26001,10 @@ __decorate([property({
|
|
|
25545
26001
|
__decorate([property({
|
|
25546
26002
|
type: Number
|
|
25547
26003
|
})], M3eSplitPaneElement.prototype, "max", void 0);
|
|
26004
|
+
__decorate([property({
|
|
26005
|
+
attribute: "overshoot-limit",
|
|
26006
|
+
type: Number
|
|
26007
|
+
})], M3eSplitPaneElement.prototype, "overshootLimit", void 0);
|
|
25548
26008
|
__decorate([property({
|
|
25549
26009
|
type: Number
|
|
25550
26010
|
})], M3eSplitPaneElement.prototype, "step", void 0);
|
|
@@ -31541,13 +32001,13 @@ _M3eRichTooltipElement_handleSubheadSlotChange = function _M3eRichTooltipElement
|
|
|
31541
32001
|
__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_updateMessage).call(this);
|
|
31542
32002
|
};
|
|
31543
32003
|
_M3eRichTooltipElement_handleContentSlotChange = function _M3eRichTooltipElement_handleContentSlotChange(e) {
|
|
31544
|
-
this._interactive = M3eInteractivityChecker.findInteractiveElements(this).length > 0;
|
|
32004
|
+
this._interactive = M3eInteractivityChecker.findInteractiveElements(this, true).length > 0;
|
|
31545
32005
|
__classPrivateFieldSet(this, _M3eRichTooltipElement_contentText, getTextContent$1(e.target, true), "f");
|
|
31546
32006
|
__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_updateMessage).call(this);
|
|
31547
32007
|
};
|
|
31548
32008
|
_M3eRichTooltipElement_handleActionsSlotChange = function _M3eRichTooltipElement_handleActionsSlotChange(e) {
|
|
31549
32009
|
this.shadowRoot?.querySelector(".base")?.classList.toggle("has-actions", hasAssignedNodes$1(e.target));
|
|
31550
|
-
this._interactive = M3eInteractivityChecker.findInteractiveElements(this).length > 0;
|
|
32010
|
+
this._interactive = M3eInteractivityChecker.findInteractiveElements(this, true).length > 0;
|
|
31551
32011
|
__classPrivateFieldGet(this, _M3eRichTooltipElement_instances, "m", _M3eRichTooltipElement_updateMessage).call(this);
|
|
31552
32012
|
};
|
|
31553
32013
|
_M3eRichTooltipElement_updateMessage = function _M3eRichTooltipElement_updateMessage() {
|
|
@@ -32420,5 +32880,5 @@ __decorate([property({
|
|
|
32420
32880
|
})], M3eTreeElement.prototype, "cascade", void 0);
|
|
32421
32881
|
M3eTreeElement = M3eTreeElement_1 = __decorate([customElement$1("m3e-tree")], M3eTreeElement);
|
|
32422
32882
|
|
|
32423
|
-
export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, EventAttribute, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement,
|
|
32883
|
+
export { ActionElementBase, AnimationLoopController, AttachInternals, CalendarViewElementBase, Checked, CheckedIndeterminate, ConstraintValidation, DesignToken, Dirty, Disabled, DisabledInteractive, EventAttribute, FocusController, Focusable, FormAssociated, FormSubmitter, HoverController, HtmlFor, InertController, IntersectionController, KeyboardClick, Labelled, LinkButton, LongPressController, M3eAccordionElement, M3eActionListElement, M3eAppBarElement, M3eAssistChipElement, M3eAutocompleteElement, M3eAvatarElement, M3eBadgeElement, M3eBottomSheetActionElement, M3eBottomSheetElement, M3eBottomSheetTriggerElement, M3eBreadcrumbElement, M3eBreadcrumbItemElement, M3eButtonElement, M3eButtonGroupElement, M3eButtonSegmentElement, M3eCalendarElement, M3eCardElement, M3eCheckboxElement, M3eChipElement, M3eChipSetElement, M3eCircularProgressIndicatorElement, M3eCollapsibleElement, M3eContentPaneElement, M3eDatepickerElement, M3eDatepickerToggleElement, M3eDialogActionElement, M3eDialogElement, M3eDialogTriggerElement, M3eDividerElement, M3eDrawerContainerElement, M3eDrawerToggleElement, M3eElevationElement, M3eExpandableListItemElement, M3eExpansionHeaderElement, M3eExpansionPanelElement, M3eFabElement, M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eFocusRingElement, M3eFormFieldElement, M3eHeadingElement, M3eIconButtonElement, M3eIconElement, M3eInputChipElement, M3eInputChipSetElement, M3eLinearProgressIndicatorElement, M3eListActionElement, M3eListElement, M3eListItemElement, M3eListOptionElement, M3eLoadingIndicatorElement, M3eMenuElement, M3eMenuItemCheckboxElement, M3eMenuItemElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement, M3eMonthViewElement, M3eMultiYearViewElement, M3eNavBarElement, M3eNavItemElement, M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement, M3eNavRailElement, M3eNavRailToggleElement, M3eOptGroupElement, M3eOptionElement, M3eOptionPanelElement, M3ePaginatorElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRadioElement, M3eRadioGroupElement, M3eRichTooltipActionElement, M3eRichTooltipElement, M3eRippleElement, M3eScrollContainerElement, M3eSearchBarElement, M3eSearchViewElement, M3eSegmentedButtonElement, M3eSelectElement, M3eSelectionListElement, M3eShapeElement, M3eSkeletonElement, M3eSlideElement, M3eSlideGroupElement, M3eSliderElement, M3eSliderThumbElement, M3eSnackbar, M3eSnackbarElement, M3eSplitButtonElement, M3eSplitPaneElement, M3eStateLayerElement, M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement, M3eSuggestionChipElement, M3eSwitchElement, M3eTabElement, M3eTabPanelElement, M3eTabsElement, M3eTextHighlightElement, M3eTextOverflowElement, M3eTextareaAutosizeElement, M3eThemeElement, M3eTocElement, M3eTocItemElement, M3eToolbarElement, M3eTooltipElement, M3eTreeElement, M3eTreeItemElement, M3eYearViewElement, MutationController, PressedController, ProgressElementIndicatorBase, ReadOnly, ReconnectedCallback, Required, RequiredConstraintValidation, ResizeController, Role, ScrollController, ScrollLockController, Selected, StepperButtonElementBase, SuppressInitialAnimation, TocGenerator, TooltipElementBase, Touched, VelocityTracker, Vertical, addCustomState, checkOrSelect, computeCssSize, computeLineCount, customElement, dateConverter, debounce, defaultValue, deleteCustomState, findFormFieldControl, focusWhenReady, forcedColorsActive, formValue, generateClipPaths, getScrollbarWidth, getTextContent, guid, hasAssignedNodes, hasCustomState, hasKeys, interceptProperty, internals, isAttachInternalsMixin, isCheckedIndeterminateMixin, isCheckedMixin, isCheckedOrSelected, isCheckedOrSelectedMixin, isConstraintValidationMixin, isDirtyMixin, isDisabledInteractiveMixin, isDisabledMixin, isFormAssociatedMixin, isFormFieldControl, isFormSubmitterMixin, isHtmlForMixin, isLabelledMixin, isLinkButtonMixin, isReadOnlyMixin, isRequiredConstraintValidationMixin, isRequiredMixin, isSelectedMixin, isTouchedMixin, isVerticalMixin, prefersReducedMotion, registerIcon, registerStyleSheet, renderPseudoLink, resolveElementById, resolveFragmentUrl, safeStyleMap, scrollIntoViewIfNeeded, setCustomState, spaceSeparatedStringConverter, updateLabels, validate, waitForUpgrade };
|
|
32424
32884
|
//# sourceMappingURL=all.js.map
|