@m3e/all 1.0.0 → 1.0.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/custom-elements.json +3608 -3628
- package/dist/html-custom-data.json +0 -5
- package/dist/index.js +24 -23
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +18 -15
- package/dist/index.min.js.map +1 -1
- package/package.json +40 -40
|
@@ -118,11 +118,6 @@
|
|
|
118
118
|
"description": "Whether the ripple always originates from the center of the element's bounds, rather\r\nthan originating from the location of the click event.",
|
|
119
119
|
"values": []
|
|
120
120
|
},
|
|
121
|
-
{
|
|
122
|
-
"name": "disable-enter",
|
|
123
|
-
"description": "Whether the ripple is disabled when the enter key is pressed.",
|
|
124
|
-
"values": []
|
|
125
|
-
},
|
|
126
121
|
{
|
|
127
122
|
"name": "disabled",
|
|
128
123
|
"description": "Whether click events will not trigger the ripple.\r\nRipples can be still controlled manually by using the `show` and 'hide' methods.",
|
package/dist/index.js
CHANGED
|
@@ -3807,8 +3807,7 @@ var _M3eRippleElement_instances, _M3eRippleElement_ripple, _M3eRippleElement_pre
|
|
|
3807
3807
|
* The component can be attached to an interactive element using the `for` attribute or programmatically using the `attach` method.
|
|
3808
3808
|
* The ripple is displayed when the interactive element is pressed and hidden when released. This can be disabled using the `disabled` attribute.
|
|
3809
3809
|
*
|
|
3810
|
-
* The pressed state actives either using both pointer and keyboard events. For keyboard events, `SPACE`
|
|
3811
|
-
* You can disabled whether the `ENTER` key actives a ripple using the `disable-enter` attribute.
|
|
3810
|
+
* The pressed state actives either using both pointer and keyboard events. For keyboard events, `SPACE` activate a ripple.
|
|
3812
3811
|
*
|
|
3813
3812
|
* Alternately, you can use the `show` and `hide` methods to programmatically control the ripple.
|
|
3814
3813
|
*
|
|
@@ -3826,7 +3825,6 @@ var _M3eRippleElement_instances, _M3eRippleElement_ripple, _M3eRippleElement_pre
|
|
|
3826
3825
|
* @tag m3e-ripple
|
|
3827
3826
|
*
|
|
3828
3827
|
* @attr centered - Whether the ripple always originates from the center of the element's bounds, rather than originating from the location of the click event.
|
|
3829
|
-
* @attr disable-enter - Whether the ripple is disabled when the enter key is pressed.
|
|
3830
3828
|
* @attr disabled - Whether click events will not trigger the ripple. Ripples can be still controlled manually by using the `show` and 'hide' methods.
|
|
3831
3829
|
* @attr for - The identifier of the interactive control to which this element is attached.
|
|
3832
3830
|
* @attr radius - The radius, in pixels, of the ripple.
|
|
@@ -3847,7 +3845,7 @@ let M3eRippleElement = class M3eRippleElement extends HtmlFor(Role(i$E, "none"))
|
|
|
3847
3845
|
/** @private */ _M3eRippleElement_pressedController.set(this, new PressedController(this, {
|
|
3848
3846
|
target: null,
|
|
3849
3847
|
minPressedDuration: 150,
|
|
3850
|
-
isPressedKey: (key) => key === " "
|
|
3848
|
+
isPressedKey: (key) => key === " ",
|
|
3851
3849
|
callback: (pressed, { x, y }) => __classPrivateFieldGet$z(this, _M3eRippleElement_instances, "m", _M3eRippleElement_handlePressedChange).call(this, pressed, x, y),
|
|
3852
3850
|
}));
|
|
3853
3851
|
/**
|
|
@@ -3856,11 +3854,6 @@ let M3eRippleElement = class M3eRippleElement extends HtmlFor(Role(i$E, "none"))
|
|
|
3856
3854
|
* @default false
|
|
3857
3855
|
*/
|
|
3858
3856
|
this.disabled = false;
|
|
3859
|
-
/**
|
|
3860
|
-
* Whether the ripple is disabled when the enter key is pressed.
|
|
3861
|
-
* @default false
|
|
3862
|
-
*/
|
|
3863
|
-
this.disableEnter = false;
|
|
3864
3857
|
/**
|
|
3865
3858
|
* Whether the ripple always originates from the center of the element's bounds, rather
|
|
3866
3859
|
* than originating from the location of the click event.
|
|
@@ -4052,9 +4045,6 @@ M3eRippleElement.styles = i$H `
|
|
|
4052
4045
|
__decorate$D([
|
|
4053
4046
|
n$1$D({ type: Boolean, reflect: true })
|
|
4054
4047
|
], M3eRippleElement.prototype, "disabled", void 0);
|
|
4055
|
-
__decorate$D([
|
|
4056
|
-
n$1$D({ attribute: "disable-enter", type: Boolean, reflect: true })
|
|
4057
|
-
], M3eRippleElement.prototype, "disableEnter", void 0);
|
|
4058
4048
|
__decorate$D([
|
|
4059
4049
|
n$1$D({ type: Boolean, reflect: true })
|
|
4060
4050
|
], M3eRippleElement.prototype, "centered", void 0);
|
|
@@ -4389,7 +4379,7 @@ let M3eStateLayerElement = class M3eStateLayerElement extends HtmlFor(Role(i$E,
|
|
|
4389
4379
|
/** @private */
|
|
4390
4380
|
_M3eStateLayerElement_focusController.set(this, new FocusController(this, {
|
|
4391
4381
|
target: null,
|
|
4392
|
-
callback: (focused) => __classPrivateFieldGet$z(this, _M3eStateLayerElement_instances, "m", _M3eStateLayerElement_handleFocusChange).call(this, focused),
|
|
4382
|
+
callback: (focused, focusVisible) => __classPrivateFieldGet$z(this, _M3eStateLayerElement_instances, "m", _M3eStateLayerElement_handleFocusChange).call(this, focused && focusVisible),
|
|
4393
4383
|
}));
|
|
4394
4384
|
/**
|
|
4395
4385
|
* Whether hover and focus event will not trigger the state layer. State layers can still
|
|
@@ -10653,7 +10643,7 @@ let M3eButtonElement = class M3eButtonElement extends KeyboardClick(LinkButton(F
|
|
|
10653
10643
|
},
|
|
10654
10644
|
});
|
|
10655
10645
|
new PressedController(this, {
|
|
10656
|
-
isPressedKey: (key) => key === " "
|
|
10646
|
+
isPressedKey: (key) => key === " ",
|
|
10657
10647
|
minPressedDuration: 150,
|
|
10658
10648
|
callback: (pressed) => {
|
|
10659
10649
|
if (!this.disabled && !this.disabledInteractive) {
|
|
@@ -10980,7 +10970,7 @@ let M3eButtonGroupElement = class M3eButtonGroupElement extends Role(i$E, "group
|
|
|
10980
10970
|
target: null,
|
|
10981
10971
|
capture: true,
|
|
10982
10972
|
minPressedDuration: 150,
|
|
10983
|
-
isPressedKey: (key) => key === " "
|
|
10973
|
+
isPressedKey: (key) => key === " ",
|
|
10984
10974
|
callback: (pressed) => {
|
|
10985
10975
|
if (!this._base)
|
|
10986
10976
|
return;
|
|
@@ -11897,7 +11887,7 @@ let M3eCardElement = class M3eCardElement extends KeyboardClick(LinkButton(FormS
|
|
|
11897
11887
|
*/
|
|
11898
11888
|
this.orientation = "vertical";
|
|
11899
11889
|
new PressedController(this, {
|
|
11900
|
-
isPressedKey: (key) => key === " "
|
|
11890
|
+
isPressedKey: (key) => key === " ",
|
|
11901
11891
|
callback: (pressed) => {
|
|
11902
11892
|
if (this.actionable && !this.disabled && !this.disabledInteractive) {
|
|
11903
11893
|
this._base?.classList.toggle("pressed", pressed);
|
|
@@ -12218,7 +12208,7 @@ let M3eCheckboxElement = class M3eCheckboxElement extends Labelled(RequiredConst
|
|
|
12218
12208
|
return x `<div class="base">
|
|
12219
12209
|
<m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
|
|
12220
12210
|
<m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring>
|
|
12221
|
-
<m3e-ripple class="ripple" centered
|
|
12211
|
+
<m3e-ripple class="ripple" centered ?disabled="${this.disabled}"></m3e-ripple>
|
|
12222
12212
|
<div class="touch" aria-hidden="true"></div>
|
|
12223
12213
|
<div class="wrapper" aria-hidden="true">${__classPrivateFieldGet$r(this, _M3eCheckboxElement_instances, "m", _M3eCheckboxElement_renderIcon).call(this)}</div>
|
|
12224
12214
|
</div>`;
|
|
@@ -17380,7 +17370,7 @@ let M3eFabElement = class M3eFabElement extends KeyboardClick(LinkButton(FormSub
|
|
|
17380
17370
|
*/
|
|
17381
17371
|
this.extended = false;
|
|
17382
17372
|
new PressedController(this, {
|
|
17383
|
-
isPressedKey: (key) => key === " "
|
|
17373
|
+
isPressedKey: (key) => key === " ",
|
|
17384
17374
|
callback: (pressed) => {
|
|
17385
17375
|
if (!this.disabled && !this.disabledInteractive) {
|
|
17386
17376
|
this._base?.classList.toggle("pressed", pressed);
|
|
@@ -17917,6 +17907,8 @@ let M3eFabMenuElement = class M3eFabMenuElement extends Role(i$E, "menu") {
|
|
|
17917
17907
|
* @param {boolean} [restoreFocus=false] A value indicating whether to restore focus to the menu's trigger.
|
|
17918
17908
|
*/
|
|
17919
17909
|
hide(restoreFocus = false) {
|
|
17910
|
+
__classPrivateFieldGet$l(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
|
|
17911
|
+
__classPrivateFieldSet$d(this, _M3eFabMenuElement_anchoringCleanup, undefined);
|
|
17920
17912
|
if (__classPrivateFieldGet$l(this, _M3eFabMenuElement_trigger, "f")) {
|
|
17921
17913
|
__classPrivateFieldGet$l(this, _M3eFabMenuElement_trigger, "f").ariaExpanded = "false";
|
|
17922
17914
|
if (restoreFocus) {
|
|
@@ -18683,6 +18675,12 @@ _M3eFormFieldElement_changeControl = function _M3eFormFieldElement_changeControl
|
|
|
18683
18675
|
__classPrivateFieldGet$k(this, _M3eFormFieldElement_control, "f").form?.removeEventListener("reset", __classPrivateFieldGet$k(this, _M3eFormFieldElement_formResetHandler, "f"));
|
|
18684
18676
|
}
|
|
18685
18677
|
__classPrivateFieldSet$c(this, _M3eFormFieldElement_control, control);
|
|
18678
|
+
if (["INPUT", "TEXTAREA"].includes(__classPrivateFieldGet$k(this, _M3eFormFieldElement_control, "f")?.tagName ?? "")) {
|
|
18679
|
+
this._base.style.setProperty("--_form-field-cursor", "text");
|
|
18680
|
+
}
|
|
18681
|
+
else {
|
|
18682
|
+
this._base.style.removeProperty("--_form-field-cursor");
|
|
18683
|
+
}
|
|
18686
18684
|
if (__classPrivateFieldGet$k(this, _M3eFormFieldElement_control, "f")) {
|
|
18687
18685
|
__classPrivateFieldGet$k(this, _M3eFormFieldElement_controlMutationController, "f").observe(__classPrivateFieldGet$k(this, _M3eFormFieldElement_control, "f"));
|
|
18688
18686
|
__classPrivateFieldGet$k(this, _M3eFormFieldElement_control, "f").addEventListener("invalid", __classPrivateFieldGet$k(this, _M3eFormFieldElement_controlInvalidHandler, "f"));
|
|
@@ -18754,6 +18752,9 @@ M3eFormFieldElement.styles = i$H `
|
|
|
18754
18752
|
width: var(--m3e-form-field-width, 14.5rem);
|
|
18755
18753
|
color: var(--_form-field-color);
|
|
18756
18754
|
}
|
|
18755
|
+
:host(:not(.-disabled)) .base {
|
|
18756
|
+
cursor: var(--_form-field-cursor);
|
|
18757
|
+
}
|
|
18757
18758
|
.base {
|
|
18758
18759
|
display: flex;
|
|
18759
18760
|
align-items: center;
|
|
@@ -21074,7 +21075,7 @@ let M3eIconButtonElement = class M3eIconButtonElement extends KeyboardClick(Link
|
|
|
21074
21075
|
},
|
|
21075
21076
|
});
|
|
21076
21077
|
new PressedController(this, {
|
|
21077
|
-
isPressedKey: (key) => key === " "
|
|
21078
|
+
isPressedKey: (key) => key === " ",
|
|
21078
21079
|
minPressedDuration: 150,
|
|
21079
21080
|
callback: (pressed) => {
|
|
21080
21081
|
if (!this.disabled && !this.disabledInteractive) {
|
|
@@ -24636,7 +24637,7 @@ _M3eNavMenuElement_updateFocusVisible = function _M3eNavMenuElement_updateFocusV
|
|
|
24636
24637
|
});
|
|
24637
24638
|
};
|
|
24638
24639
|
_M3eNavMenuElement_updateItemFocusVisible = function _M3eNavMenuElement_updateItemFocusVisible(item, focused, focusVisible) {
|
|
24639
|
-
if (focused) {
|
|
24640
|
+
if (focused && focusVisible) {
|
|
24640
24641
|
item.stateLayer?.show("focused");
|
|
24641
24642
|
}
|
|
24642
24643
|
else {
|
|
@@ -25988,7 +25989,7 @@ let M3eRadioElement = class M3eRadioElement extends Labelled(Dirty(Touched(Check
|
|
|
25988
25989
|
return x `<div class="base">
|
|
25989
25990
|
<m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
|
|
25990
25991
|
<m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring>
|
|
25991
|
-
<m3e-ripple class="ripple" centered
|
|
25992
|
+
<m3e-ripple class="ripple" centered ?disabled="${this.disabled}"></m3e-ripple>
|
|
25992
25993
|
<div class="touch" aria-hidden="true"></div>
|
|
25993
25994
|
<div class="wrapper" aria-hidden="true">${__classPrivateFieldGet$c(this, _M3eRadioElement_instances, "m", _M3eRadioElement_renderIcon).call(this)}</div>
|
|
25994
25995
|
</div>`;
|
|
@@ -29069,7 +29070,7 @@ let M3eSplitButtonElement = class M3eSplitButtonElement extends Role(i$E, "group
|
|
|
29069
29070
|
/** @private */ _M3eSplitButtonElement_pressedController.set(this, new PressedController(this, {
|
|
29070
29071
|
target: null,
|
|
29071
29072
|
capture: true,
|
|
29072
|
-
isPressedKey: (key) => key === " "
|
|
29073
|
+
isPressedKey: (key) => key === " ",
|
|
29073
29074
|
callback: (pressed, _, target) => {
|
|
29074
29075
|
switch (target) {
|
|
29075
29076
|
case __classPrivateFieldGet$7(this, _M3eSplitButtonElement_leadingButton, "f"):
|
|
@@ -30131,7 +30132,7 @@ let M3eSwitchElement = class M3eSwitchElement extends Labelled(Dirty(Touched(Con
|
|
|
30131
30132
|
*/
|
|
30132
30133
|
this.value = "on";
|
|
30133
30134
|
new PressedController(this, {
|
|
30134
|
-
isPressedKey: (key) => key === " "
|
|
30135
|
+
isPressedKey: (key) => key === " ",
|
|
30135
30136
|
callback: (pressed) => this._track?.classList.toggle("pressed", pressed && !this.disabled),
|
|
30136
30137
|
});
|
|
30137
30138
|
}
|