@mustib/web-components 0.0.0-alpha.2 → 0.0.0-alpha.4
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/components/mu-element.d.ts +13 -4
- package/components/mu-element.js +1 -1
- package/components/mu-icon.d.ts +3 -3
- package/components/mu-icon.js +3 -3
- package/components/mu-range-fill.d.ts +3 -3
- package/components/mu-range-fill.js +3 -3
- package/components/mu-range-thumb-value.d.ts +3 -3
- package/components/mu-range-thumb-value.js +3 -3
- package/components/mu-range-thumb.d.ts +3 -3
- package/components/mu-range-thumb.js +4 -4
- package/components/mu-range.d.ts +12 -6
- package/components/mu-range.js +15 -15
- package/components/mu-select-item.d.ts +3 -3
- package/components/mu-select-item.js +4 -4
- package/components/mu-select-items.d.ts +3 -3
- package/components/mu-select-items.js +3 -3
- package/components/mu-select-label-content.d.ts +3 -3
- package/components/mu-select-label-content.js +3 -3
- package/components/mu-select-label.d.ts +4 -4
- package/components/mu-select-label.js +3 -3
- package/components/mu-select.d.ts +3 -3
- package/components/mu-select.js +3 -3
- package/components/mu-transparent.d.ts +3 -3
- package/components/mu-transparent.js +2 -2
- package/components/mu-trigger.d.ts +2 -2
- package/components/mu-trigger.js +1 -1
- package/index.d.ts +46 -13
- package/index.js +13 -13
- package/{mu-element-BTuCCJpo.js → mu-element-C36Rgp-m.js} +17 -16
- package/package.json +1 -7
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { closestPierce, EventAction } from '@mustib/utils/browser';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
|
|
4
|
+
type MuElementComponent = {
|
|
5
|
+
attributes: {
|
|
6
|
+
disabled: MuElement['disabled'];
|
|
7
|
+
readonly: MuElement['readonly'];
|
|
8
|
+
'no-event-action-attributes': MuElement['noEventActionAttributes'];
|
|
9
|
+
'event-action-events': MuElement['eventActionEvents'];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
4
12
|
type Elements = [
|
|
5
13
|
'mu-select-item',
|
|
6
14
|
'mu-select-items',
|
|
@@ -17,11 +25,11 @@ type Elements = [
|
|
|
17
25
|
'mu-range-thumb-value',
|
|
18
26
|
'mu-icon'
|
|
19
27
|
];
|
|
20
|
-
declare abstract class
|
|
28
|
+
declare abstract class MuElement extends LitElement {
|
|
21
29
|
#private;
|
|
22
30
|
static closestPierce: typeof closestPierce;
|
|
23
31
|
static register(this: {
|
|
24
|
-
new ():
|
|
32
|
+
new (): MuElement;
|
|
25
33
|
}, tagName: Elements[number]): void;
|
|
26
34
|
static css: {
|
|
27
35
|
focus: any;
|
|
@@ -71,7 +79,7 @@ declare abstract class MUElement extends LitElement {
|
|
|
71
79
|
resolve: () => void;
|
|
72
80
|
}>;
|
|
73
81
|
getMuElementById(id: string): {
|
|
74
|
-
element:
|
|
82
|
+
element: MuElement;
|
|
75
83
|
} | undefined;
|
|
76
84
|
closestPierce(selector: string): HTMLElement | null;
|
|
77
85
|
/**
|
|
@@ -104,4 +112,5 @@ declare abstract class MUElement extends LitElement {
|
|
|
104
112
|
disconnectedCallback(): void;
|
|
105
113
|
}
|
|
106
114
|
|
|
107
|
-
export {
|
|
115
|
+
export { MuElement };
|
|
116
|
+
export type { MuElementComponent };
|
package/components/mu-element.js
CHANGED
package/components/mu-icon.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuIconComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
name: MuIcon['name'];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
declare class MuIcon extends
|
|
10
|
+
declare class MuIcon extends MuElement {
|
|
11
11
|
static styles?: CSSResultGroup | undefined;
|
|
12
12
|
eventActionData: undefined;
|
|
13
13
|
_addEventActionAttributes: undefined;
|
package/components/mu-icon.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
|
|
5
|
-
class MuIcon extends
|
|
5
|
+
class MuIcon extends MuElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.eventActionData = undefined;
|
|
@@ -29,7 +29,7 @@ class MuIcon extends MUElement {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
MuIcon.styles = [
|
|
32
|
-
|
|
32
|
+
MuElement.cssBase,
|
|
33
33
|
css `
|
|
34
34
|
:host {
|
|
35
35
|
display: inline-block;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuRangeFillComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
for: MuRangeFill['for'];
|
|
8
8
|
type: MuRangeFill['type'];
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
declare class MuRangeFill extends
|
|
11
|
+
declare class MuRangeFill extends MuElement {
|
|
12
12
|
static styles: CSSResultGroup;
|
|
13
13
|
eventActionData: undefined;
|
|
14
14
|
_addEventActionAttributes: undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property, query } from 'lit/decorators.js';
|
|
4
4
|
|
|
5
|
-
class MuRangeFill extends
|
|
5
|
+
class MuRangeFill extends MuElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.eventActionData = undefined;
|
|
@@ -48,7 +48,7 @@ class MuRangeFill extends MUElement {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
MuRangeFill.styles = [
|
|
51
|
-
|
|
51
|
+
MuElement.cssBase,
|
|
52
52
|
css `
|
|
53
53
|
#container {
|
|
54
54
|
--range-fill-background-color: var(--mu-range-fill-background-color, var(--mu-color-500));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuRangeThumbValueComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
reversed: MuRangeThumbValue['reversed'];
|
|
8
8
|
type: MuRangeThumbValue['type'];
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
declare class MuRangeThumbValue extends
|
|
11
|
+
declare class MuRangeThumbValue extends MuElement {
|
|
12
12
|
static styles: CSSResultGroup;
|
|
13
13
|
eventActionData: undefined;
|
|
14
14
|
_addEventActionAttributes: undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property, query } from 'lit/decorators.js';
|
|
4
4
|
|
|
5
|
-
class MuRangeThumbValue extends
|
|
5
|
+
class MuRangeThumbValue extends MuElement {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.eventActionData = undefined;
|
|
@@ -72,7 +72,7 @@ class MuRangeThumbValue extends MUElement {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
MuRangeThumbValue.styles = [
|
|
75
|
-
|
|
75
|
+
MuElement.cssBase,
|
|
76
76
|
css `
|
|
77
77
|
:host([reversed]) #container[axis='x'] {
|
|
78
78
|
top: 100%;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import { MuRangeThumbValue } from './mu-range-thumb-value.js';
|
|
4
4
|
import '@mustib/utils/browser';
|
|
5
5
|
|
|
6
6
|
type MuRangeThumbComponent = {
|
|
7
|
-
attributes: {
|
|
7
|
+
attributes: MuElementComponent['attributes'] & {
|
|
8
8
|
'min-value': MuRangeThumb['minValue'];
|
|
9
9
|
'max-value': MuRangeThumb['maxValue'];
|
|
10
10
|
value: MuRangeThumb['value'];
|
|
@@ -16,7 +16,7 @@ type MuRangeThumbComponent = {
|
|
|
16
16
|
'force-step': MuRangeThumb['forceStep'];
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
declare class MuRangeThumb extends
|
|
19
|
+
declare class MuRangeThumb extends MuElement {
|
|
20
20
|
static styles?: CSSResultGroup | undefined;
|
|
21
21
|
eventActionData: undefined;
|
|
22
22
|
_addEventActionAttributes: undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate, g as getElementBoundaries } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { state, property, query } from 'lit/decorators.js';
|
|
4
4
|
import { MuTransparent } from './mu-transparent.js';
|
|
5
5
|
import { MuRangeThumbValue } from './mu-range-thumb-value.js';
|
|
6
6
|
|
|
7
|
-
class MuRangeThumb extends
|
|
7
|
+
class MuRangeThumb extends MuElement {
|
|
8
8
|
get range() {
|
|
9
9
|
return this._range;
|
|
10
10
|
}
|
|
@@ -215,7 +215,7 @@ class MuRangeThumb extends MUElement {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
MuRangeThumb.styles = [
|
|
218
|
-
|
|
218
|
+
MuElement.cssBase,
|
|
219
219
|
css `
|
|
220
220
|
#container {
|
|
221
221
|
--thumb-size: var(--mu-range-thumb-size, calc(var(--range-thickness) * 3));
|
|
@@ -235,7 +235,7 @@ MuRangeThumb.styles = [
|
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
:host([focused]) #container {
|
|
238
|
-
${
|
|
238
|
+
${MuElement.css.focus};
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
#container[axis='x'] {
|
package/components/mu-range.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import { MuRangeFill } from './mu-range-fill.js';
|
|
4
4
|
import { MuRangeThumb } from './mu-range-thumb.js';
|
|
5
5
|
import '@mustib/utils/browser';
|
|
6
6
|
import './mu-range-thumb-value.js';
|
|
7
7
|
|
|
8
8
|
type MuRangeComponent = {
|
|
9
|
-
attributes: {
|
|
9
|
+
attributes: MuElementComponent['attributes'] & {
|
|
10
10
|
axis: MuRange['axis'];
|
|
11
11
|
min: MuRange['min'];
|
|
12
12
|
max: MuRange['max'];
|
|
@@ -27,6 +27,7 @@ type RangeFill = {
|
|
|
27
27
|
element: MuRangeFill;
|
|
28
28
|
linkedThumbs: RangeThumb[];
|
|
29
29
|
};
|
|
30
|
+
type ChangeEventSrc = 'pointerdown' | 'pointerup' | 'pointermove' | 'keydown' | 'insert';
|
|
30
31
|
type Events = {
|
|
31
32
|
/**
|
|
32
33
|
* Emitted when pointerdown on a non-thumb element and empty-area attribute has a value of "dispatch".
|
|
@@ -44,6 +45,7 @@ type Events = {
|
|
|
44
45
|
name: string;
|
|
45
46
|
value: number;
|
|
46
47
|
}[];
|
|
48
|
+
src: ChangeEventSrc;
|
|
47
49
|
}>;
|
|
48
50
|
/**
|
|
49
51
|
* Emitted when new thumbs are added after the initial render.
|
|
@@ -64,7 +66,7 @@ type Events = {
|
|
|
64
66
|
}[];
|
|
65
67
|
}>;
|
|
66
68
|
};
|
|
67
|
-
declare class MuRange extends
|
|
69
|
+
declare class MuRange extends MuElement {
|
|
68
70
|
static styles?: CSSResultGroup | undefined;
|
|
69
71
|
eventActionData: undefined;
|
|
70
72
|
_addEventActionAttributes: undefined;
|
|
@@ -151,11 +153,15 @@ declare class MuRange extends MUElement {
|
|
|
151
153
|
* Switches the active thumb for keyboard navigation
|
|
152
154
|
*/
|
|
153
155
|
switchNavigationActiveItem(direction: 'next' | 'prev'): boolean;
|
|
154
|
-
dispatchChangeEvent(thumbs
|
|
156
|
+
dispatchChangeEvent(thumbs: {
|
|
155
157
|
name: string;
|
|
156
158
|
value: number;
|
|
157
|
-
}[]): void;
|
|
158
|
-
_setThumbValue(
|
|
159
|
+
}[] | undefined, src: ChangeEventSrc): void;
|
|
160
|
+
_setThumbValue({ src, thumb, value, }: {
|
|
161
|
+
thumb: RangeThumb;
|
|
162
|
+
value: number;
|
|
163
|
+
src: ChangeEventSrc;
|
|
164
|
+
}): void;
|
|
159
165
|
/**
|
|
160
166
|
* Updates the range fill element
|
|
161
167
|
*/
|
package/components/mu-range.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate, t as throttle, d as debounce, w as wait, g as getElementBoundaries } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { MuTransparent } from './mu-transparent.js';
|
|
@@ -6,7 +6,7 @@ import { MuRangeFill } from './mu-range-fill.js';
|
|
|
6
6
|
import { MuRangeThumb } from './mu-range-thumb.js';
|
|
7
7
|
import './mu-range-thumb-value.js';
|
|
8
8
|
|
|
9
|
-
class MuRange extends
|
|
9
|
+
class MuRange extends MuElement {
|
|
10
10
|
get isControlled() {
|
|
11
11
|
return this.value !== undefined;
|
|
12
12
|
}
|
|
@@ -215,7 +215,7 @@ class MuRange extends MUElement {
|
|
|
215
215
|
e.preventDefault();
|
|
216
216
|
this.focus();
|
|
217
217
|
thumb.element.focused = true;
|
|
218
|
-
this._setThumbValue(thumb, value);
|
|
218
|
+
this._setThumbValue({ thumb, value, src: 'keydown' });
|
|
219
219
|
};
|
|
220
220
|
const jumpPercentage = 10;
|
|
221
221
|
const jumpStepValue = (thumb.element.maxValue - thumb.element.minValue) / jumpPercentage;
|
|
@@ -252,7 +252,7 @@ class MuRange extends MUElement {
|
|
|
252
252
|
this._isPointerDown = true;
|
|
253
253
|
document.addEventListener('pointermove', this._documentPointermoveHandler);
|
|
254
254
|
document.addEventListener('pointerup', this._documentPointerupHandler);
|
|
255
|
-
const thumbEl =
|
|
255
|
+
const thumbEl = MuElement.closestPierce('mu-range-thumb', e.target);
|
|
256
256
|
if ((thumbEl && (thumbEl.disabled || thumbEl.readonly)) ||
|
|
257
257
|
this.emptyArea === 'prevent')
|
|
258
258
|
return;
|
|
@@ -317,7 +317,7 @@ class MuRange extends MUElement {
|
|
|
317
317
|
: rightThumb;
|
|
318
318
|
}
|
|
319
319
|
if (candidateThumb) {
|
|
320
|
-
this._setThumbValue(candidateThumb, value);
|
|
320
|
+
this._setThumbValue({ thumb: candidateThumb, value, src: 'pointerdown' });
|
|
321
321
|
this.activeThumb = candidateThumb;
|
|
322
322
|
}
|
|
323
323
|
};
|
|
@@ -328,13 +328,13 @@ class MuRange extends MUElement {
|
|
|
328
328
|
if (!this.activeThumb)
|
|
329
329
|
return;
|
|
330
330
|
const { value } = this._getValuesFromEvent(e);
|
|
331
|
-
this._setThumbValue(this.activeThumb, value);
|
|
331
|
+
this._setThumbValue({ thumb: this.activeThumb, value, src: 'pointerup' });
|
|
332
332
|
};
|
|
333
333
|
this._pointermoveHandler = (e) => {
|
|
334
334
|
if (!this.activeThumb)
|
|
335
335
|
return;
|
|
336
336
|
const { value } = this._getValuesFromEvent(e);
|
|
337
|
-
this._setThumbValue(this.activeThumb, value);
|
|
337
|
+
this._setThumbValue({ thumb: this.activeThumb, value, src: 'pointermove' });
|
|
338
338
|
};
|
|
339
339
|
this._documentPointermoveHandler = throttle((e) => {
|
|
340
340
|
this._pointermoveHandler(e);
|
|
@@ -390,7 +390,7 @@ class MuRange extends MUElement {
|
|
|
390
390
|
const thumb = this._thumbsElementsMap.get(thumbEl);
|
|
391
391
|
if (!thumb)
|
|
392
392
|
return;
|
|
393
|
-
this._setThumbValue(thumb,
|
|
393
|
+
this._setThumbValue({ thumb, value: thumb.value, src: 'insert' });
|
|
394
394
|
this.activeThumb = thumb;
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
@@ -414,17 +414,17 @@ class MuRange extends MUElement {
|
|
|
414
414
|
navigationThumb.element.focused = true;
|
|
415
415
|
return true;
|
|
416
416
|
}
|
|
417
|
-
dispatchChangeEvent(thumbs = this._thumbs) {
|
|
417
|
+
dispatchChangeEvent(thumbs = this._thumbs, src) {
|
|
418
418
|
const eventName = 'mu-range-change';
|
|
419
419
|
const data = thumbs.map((thumb) => ({ name: thumb.name, value: thumb.value }));
|
|
420
420
|
this.dispatchEvent(new CustomEvent(eventName, {
|
|
421
421
|
bubbles: true,
|
|
422
422
|
composed: true,
|
|
423
|
-
detail: { data: data },
|
|
423
|
+
detail: { data: data, src },
|
|
424
424
|
cancelable: true,
|
|
425
425
|
}));
|
|
426
426
|
}
|
|
427
|
-
_setThumbValue(thumb, value) {
|
|
427
|
+
_setThumbValue({ src, thumb, value, }) {
|
|
428
428
|
const stepValue = this._getThumbStepValue(thumb, value);
|
|
429
429
|
if (stepValue === thumb.value)
|
|
430
430
|
return;
|
|
@@ -434,7 +434,7 @@ class MuRange extends MUElement {
|
|
|
434
434
|
name: _thumb.name,
|
|
435
435
|
value: _thumb.name === thumb.name ? stepValue : thumb.value,
|
|
436
436
|
}));
|
|
437
|
-
this.dispatchChangeEvent(sortedThumbs);
|
|
437
|
+
this.dispatchChangeEvent(sortedThumbs, src);
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
const success = thumb.element.setValue(stepValue);
|
|
@@ -442,7 +442,7 @@ class MuRange extends MUElement {
|
|
|
442
442
|
thumb.value = stepValue;
|
|
443
443
|
this.sortThumbs();
|
|
444
444
|
thumb.linkedFillElements?.forEach(this.updateRangeFill);
|
|
445
|
-
this.dispatchChangeEvent();
|
|
445
|
+
this.dispatchChangeEvent(undefined, src);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
@@ -665,7 +665,7 @@ class MuRange extends MUElement {
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
MuRange.styles = [
|
|
668
|
-
|
|
668
|
+
MuElement.cssBase,
|
|
669
669
|
css `
|
|
670
670
|
#container {
|
|
671
671
|
--range-background-color: var(--mu-range-background-color, var(--mu-color-100));
|
|
@@ -680,7 +680,7 @@ MuRange.styles = [
|
|
|
680
680
|
position: absolute;
|
|
681
681
|
inset: -4px;
|
|
682
682
|
border-radius: inherit;
|
|
683
|
-
${
|
|
683
|
+
${MuElement.css.focus}
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
:host([axis='x']) #container,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuSelectItemComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
value: MuSelectItem['value'];
|
|
8
8
|
selected: MuSelectItem['selected'];
|
|
9
9
|
active: MuSelectItem['active'];
|
|
@@ -15,7 +15,7 @@ type MuSelectItemComponent = {
|
|
|
15
15
|
* without the need for controlling its state externally. It should not be modified by other parties, and its state is
|
|
16
16
|
* solely controlled by its controller.
|
|
17
17
|
*/
|
|
18
|
-
declare class MuSelectItem extends
|
|
18
|
+
declare class MuSelectItem extends MuElement {
|
|
19
19
|
static styles: any[];
|
|
20
20
|
eventActionData: undefined;
|
|
21
21
|
value: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ import { property } from 'lit/decorators.js';
|
|
|
7
7
|
* without the need for controlling its state externally. It should not be modified by other parties, and its state is
|
|
8
8
|
* solely controlled by its controller.
|
|
9
9
|
*/
|
|
10
|
-
class MuSelectItem extends
|
|
10
|
+
class MuSelectItem extends MuElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.eventActionData = undefined;
|
|
@@ -51,7 +51,7 @@ class MuSelectItem extends MUElement {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
MuSelectItem.styles = [
|
|
54
|
-
|
|
54
|
+
MuElement.cssBase,
|
|
55
55
|
css `
|
|
56
56
|
:host {
|
|
57
57
|
overflow: hidden;
|
|
@@ -62,7 +62,7 @@ MuSelectItem.styles = [
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
:host(:focus-visible) #container {
|
|
65
|
-
${
|
|
65
|
+
${MuElement.css.focus}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
:host([active]) #container {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EventAction, GenerateData } from '@mustib/utils/browser';
|
|
2
2
|
import { PropertyValues } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
4
4
|
import { MuSelectItem } from './mu-select-item.js';
|
|
5
5
|
|
|
6
6
|
type MuSelectItemsComponent = {
|
|
7
|
-
attributes: {
|
|
7
|
+
attributes: MuElementComponent['attributes'] & {
|
|
8
8
|
opened: MuSelectItems['opened'];
|
|
9
9
|
multiple: MuSelectItems['multiple'];
|
|
10
10
|
value: MuSelectItems['value'];
|
|
@@ -83,7 +83,7 @@ type SwitchActiveItemOptions = Partial<{
|
|
|
83
83
|
*/
|
|
84
84
|
switchBack: boolean;
|
|
85
85
|
}>;
|
|
86
|
-
declare class MuSelectItems extends
|
|
86
|
+
declare class MuSelectItems extends MuElement {
|
|
87
87
|
static styles: any[];
|
|
88
88
|
static eventAction: EventAction<GenerateData<MuSelectItems>>;
|
|
89
89
|
opened: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, E as EventAction, _ as __decorate, g as getElementBoundaries, d as debounce, a as disableElementScroll, e as enableElementScroll } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { MuTransparent } from './mu-transparent.js';
|
|
5
5
|
import { MuSelectItem } from './mu-select-item.js';
|
|
6
6
|
|
|
7
|
-
class MuSelectItems extends
|
|
7
|
+
class MuSelectItems extends MuElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.opened = false;
|
|
@@ -494,7 +494,7 @@ class MuSelectItems extends MUElement {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
MuSelectItems.styles = [
|
|
497
|
-
|
|
497
|
+
MuElement.cssBase,
|
|
498
498
|
css `
|
|
499
499
|
#container {
|
|
500
500
|
--select-items-background-color: var(--mu-select-items-background-color, var(--mu-color-800));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuSelectLabelContentComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
type: MuSelectLabelContent['type'];
|
|
8
8
|
active: MuSelectLabelContent['active'];
|
|
9
9
|
};
|
|
@@ -18,7 +18,7 @@ declare const types: readonly ["label", "value", "autocomplete", "template"];
|
|
|
18
18
|
*
|
|
19
19
|
* You also need to set the `type` attribute to either `"label"` or `"value"` so the parent label knows which element to update.
|
|
20
20
|
*/
|
|
21
|
-
declare class MuSelectLabelContent extends
|
|
21
|
+
declare class MuSelectLabelContent extends MuElement {
|
|
22
22
|
static styles: CSSResultGroup;
|
|
23
23
|
/**
|
|
24
24
|
* Generate template markup for the template type.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { property, state } from 'lit/decorators.js';
|
|
4
4
|
import { repeat } from 'lit/directives/repeat.js';
|
|
@@ -14,7 +14,7 @@ const contentSelector = '[data-is="content"]';
|
|
|
14
14
|
*
|
|
15
15
|
* You also need to set the `type` attribute to either `"label"` or `"value"` so the parent label knows which element to update.
|
|
16
16
|
*/
|
|
17
|
-
class MuSelectLabelContent extends
|
|
17
|
+
class MuSelectLabelContent extends MuElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this.eventActionData = undefined;
|
|
@@ -84,7 +84,7 @@ class MuSelectLabelContent extends MUElement {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
MuSelectLabelContent.styles = [
|
|
87
|
-
|
|
87
|
+
MuElement.cssBase,
|
|
88
88
|
css `
|
|
89
89
|
:host {
|
|
90
90
|
overflow: hidden;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import './mu-trigger.js';
|
|
4
4
|
import { MuSelectLabelContent } from './mu-select-label-content.js';
|
|
5
5
|
import './mu-icon.js';
|
|
@@ -7,14 +7,14 @@ import '@mustib/utils/browser';
|
|
|
7
7
|
import './mu-transparent.js';
|
|
8
8
|
|
|
9
9
|
type MuSelectLabelComponent = {
|
|
10
|
-
attributes: {
|
|
10
|
+
attributes: MuElementComponent['attributes'] & {
|
|
11
11
|
opened: MuSelectLabel['opened'];
|
|
12
12
|
label: MuSelectLabel['label'];
|
|
13
13
|
legend: MuSelectLabel['legend'];
|
|
14
14
|
type: MuSelectLabel['type'];
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
declare class MuSelectLabel extends
|
|
17
|
+
declare class MuSelectLabel extends MuElement {
|
|
18
18
|
static styles: CSSResultGroup;
|
|
19
19
|
opened: boolean;
|
|
20
20
|
label: string;
|
|
@@ -27,7 +27,7 @@ declare class MuSelectLabel extends MUElement {
|
|
|
27
27
|
protected _valueType: 'value' | 'template' | 'autocomplete-label';
|
|
28
28
|
protected labelElement?: MuSelectLabelContent;
|
|
29
29
|
protected valueElement?: MuSelectLabelContent;
|
|
30
|
-
protected _isReadyPromise: ReturnType<
|
|
30
|
+
protected _isReadyPromise: ReturnType<MuElement['generateIsReadyPromise']>;
|
|
31
31
|
eventActionData: undefined;
|
|
32
32
|
get hasAutocomplete(): boolean;
|
|
33
33
|
get hasAutocompleteBoth(): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import './mu-trigger.js';
|
|
4
4
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -7,7 +7,7 @@ import { MuSelectLabelContent } from './mu-select-label-content.js';
|
|
|
7
7
|
import './mu-icon.js';
|
|
8
8
|
import 'lit/directives/repeat.js';
|
|
9
9
|
|
|
10
|
-
class MuSelectLabel extends
|
|
10
|
+
class MuSelectLabel extends MuElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.opened = false;
|
|
@@ -263,7 +263,7 @@ class MuSelectLabel extends MUElement {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
MuSelectLabel.styles = [
|
|
266
|
-
|
|
266
|
+
MuElement.cssBase,
|
|
267
267
|
css `
|
|
268
268
|
:host(:focus-within) #container,
|
|
269
269
|
:host([opened]) #container {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventAction, GenerateData } from '@mustib/utils/browser';
|
|
2
2
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
4
4
|
import { MuSelectItems, MuSelectItemsComponent } from './mu-select-items.js';
|
|
5
5
|
import { MuSelectLabel } from './mu-select-label.js';
|
|
6
6
|
import './mu-select-item.js';
|
|
@@ -10,7 +10,7 @@ import './mu-select-label-content.js';
|
|
|
10
10
|
import './mu-icon.js';
|
|
11
11
|
|
|
12
12
|
type MuSelectComponent = {
|
|
13
|
-
attributes: {
|
|
13
|
+
attributes: MuElementComponent['attributes'] & {
|
|
14
14
|
opened: MuSelect['opened'];
|
|
15
15
|
'no-close-after-select': MuSelect['noCloseAfterSelect'];
|
|
16
16
|
'no-close-after-blur': MuSelect['noCloseAfterBlur'];
|
|
@@ -21,7 +21,7 @@ type Events = {
|
|
|
21
21
|
'mu-select-opened': CustomEvent;
|
|
22
22
|
'mu-select-closed': CustomEvent;
|
|
23
23
|
};
|
|
24
|
-
declare class MuSelect extends
|
|
24
|
+
declare class MuSelect extends MuElement {
|
|
25
25
|
static styles: CSSResultGroup;
|
|
26
26
|
static eventAction: EventAction<GenerateData<MuSelect>>;
|
|
27
27
|
opened: boolean;
|
package/components/mu-select.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as MuElement, E as EventAction, _ as __decorate } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property, queryAssignedElements } from 'lit/decorators.js';
|
|
4
4
|
import { MuTransparent } from './mu-transparent.js';
|
|
@@ -10,7 +10,7 @@ import './mu-select-label-content.js';
|
|
|
10
10
|
import 'lit/directives/repeat.js';
|
|
11
11
|
import './mu-icon.js';
|
|
12
12
|
|
|
13
|
-
class MuSelect extends
|
|
13
|
+
class MuSelect extends MuElement {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.opened = false;
|
|
@@ -188,7 +188,7 @@ class MuSelect extends MUElement {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
MuSelect.styles = [
|
|
191
|
-
|
|
191
|
+
MuElement.cssBase,
|
|
192
192
|
css `
|
|
193
193
|
:host([opened]) #container {
|
|
194
194
|
z-index: 100;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { MuElement, MuElementComponent } from './mu-element.js';
|
|
3
3
|
import '@mustib/utils/browser';
|
|
4
4
|
|
|
5
5
|
type MuTransparentComponent = {
|
|
6
|
-
attributes: {
|
|
6
|
+
attributes: MuElementComponent['attributes'] & {
|
|
7
7
|
'content-selector': MuTransparent['contentSelector'];
|
|
8
8
|
};
|
|
9
9
|
events: Events;
|
|
@@ -27,7 +27,7 @@ type Events = {
|
|
|
27
27
|
* Use the `content` property to access the underlying
|
|
28
28
|
* meaningful child element, regardless of the wrapping.
|
|
29
29
|
*/
|
|
30
|
-
declare class MuTransparent extends
|
|
30
|
+
declare class MuTransparent extends MuElement {
|
|
31
31
|
static styles?: CSSResultGroup;
|
|
32
32
|
eventActionData: undefined;
|
|
33
33
|
_addEventActionAttributes: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, M as
|
|
1
|
+
import { _ as __decorate, M as MuElement } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ import { property } from 'lit/decorators.js';
|
|
|
16
16
|
* Use the `content` property to access the underlying
|
|
17
17
|
* meaningful child element, regardless of the wrapping.
|
|
18
18
|
*/
|
|
19
|
-
class MuTransparent extends
|
|
19
|
+
class MuTransparent extends MuElement {
|
|
20
20
|
/**
|
|
21
21
|
* Returns the meaningful child elements of the transparent component.
|
|
22
22
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MuTransparent } from './mu-transparent.js';
|
|
1
|
+
import { MuTransparent, MuTransparentComponent } from './mu-transparent.js';
|
|
2
2
|
import 'lit';
|
|
3
3
|
import './mu-element.js';
|
|
4
4
|
import '@mustib/utils/browser';
|
|
5
5
|
|
|
6
6
|
type MuTriggerComponent = {
|
|
7
|
-
attributes: {
|
|
7
|
+
attributes: MuTransparentComponent['attributes'] & {
|
|
8
8
|
'listen-to': MuTrigger['listenTo'];
|
|
9
9
|
detail: MuTrigger['detail'];
|
|
10
10
|
'stop-propagation': MuTrigger['stopPropagation'];
|
package/components/mu-trigger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __decorate, p as parseJson } from '../mu-element-
|
|
1
|
+
import { _ as __decorate, p as parseJson } from '../mu-element-C36Rgp-m.js';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { MuTransparent } from './mu-transparent.js';
|
|
4
4
|
import 'lit';
|
package/index.d.ts
CHANGED
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
import './components/mu-
|
|
2
|
-
|
|
3
|
-
import './components/mu-
|
|
4
|
-
|
|
5
|
-
import './components/mu-
|
|
6
|
-
|
|
7
|
-
import './components/mu-
|
|
8
|
-
|
|
9
|
-
import './components/mu-range-thumb.js';
|
|
10
|
-
|
|
1
|
+
import { MuIconComponent } from './components/mu-icon.js';
|
|
2
|
+
export { MuIcon } from './components/mu-icon.js';
|
|
3
|
+
import { MuRangeComponent } from './components/mu-range.js';
|
|
4
|
+
export { MuRange } from './components/mu-range.js';
|
|
5
|
+
import { MuRangeFillComponent } from './components/mu-range-fill.js';
|
|
6
|
+
export { MuRangeFill } from './components/mu-range-fill.js';
|
|
7
|
+
import { MuRangeThumbComponent } from './components/mu-range-thumb.js';
|
|
8
|
+
export { MuRangeThumb } from './components/mu-range-thumb.js';
|
|
9
|
+
import { MuRangeThumbValueComponent } from './components/mu-range-thumb-value.js';
|
|
10
|
+
export { MuRangeThumbValue } from './components/mu-range-thumb-value.js';
|
|
11
|
+
import { MuSelectComponent } from './components/mu-select.js';
|
|
12
|
+
export { MuSelect } from './components/mu-select.js';
|
|
13
|
+
import { MuSelectItemComponent } from './components/mu-select-item.js';
|
|
14
|
+
export { MuSelectItem } from './components/mu-select-item.js';
|
|
15
|
+
import { MuSelectItemsComponent } from './components/mu-select-items.js';
|
|
16
|
+
export { Events, MuSelectItems } from './components/mu-select-items.js';
|
|
17
|
+
import { MuSelectLabelComponent } from './components/mu-select-label.js';
|
|
18
|
+
export { MuSelectLabel } from './components/mu-select-label.js';
|
|
19
|
+
import { MuSelectLabelContentComponent } from './components/mu-select-label-content.js';
|
|
20
|
+
export { MuSelectLabelContent } from './components/mu-select-label-content.js';
|
|
21
|
+
import { MuTransparentComponent } from './components/mu-transparent.js';
|
|
22
|
+
export { MuTransparent } from './components/mu-transparent.js';
|
|
23
|
+
import { MuTriggerComponent } from './components/mu-trigger.js';
|
|
24
|
+
export { MuTrigger } from './components/mu-trigger.js';
|
|
25
|
+
export { MuElement, MuElementComponent } from './components/mu-element.js';
|
|
11
26
|
import 'lit';
|
|
12
|
-
import './components/mu-element.js';
|
|
13
27
|
import '@mustib/utils/browser';
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
|
|
29
|
+
type ComponentsAttributes = {
|
|
30
|
+
'mu-select': MuSelectComponent['attributes'];
|
|
31
|
+
'mu-select-items': MuSelectItemsComponent['attributes'];
|
|
32
|
+
'mu-select-item': MuSelectItemComponent['attributes'];
|
|
33
|
+
'mu-select-label': MuSelectLabelComponent['attributes'];
|
|
34
|
+
'mu-select-label-content': MuSelectLabelContentComponent['attributes'];
|
|
35
|
+
'mu-range': MuRangeComponent['attributes'];
|
|
36
|
+
'mu-range-fill': MuRangeFillComponent['attributes'];
|
|
37
|
+
'mu-range-thumb': MuRangeThumbComponent['attributes'];
|
|
38
|
+
'mu-range-thumb-value': MuRangeThumbValueComponent['attributes'];
|
|
39
|
+
'mu-icon': MuIconComponent['attributes'];
|
|
40
|
+
'mu-transparent': MuTransparentComponent['attributes'];
|
|
41
|
+
'mu-trigger': MuTriggerComponent['attributes'];
|
|
42
|
+
};
|
|
43
|
+
type MuComponentsAttributes<GlobalAttributes = Record<string, any>> = {
|
|
44
|
+
[key in keyof ComponentsAttributes]: Partial<ComponentsAttributes[key]> & GlobalAttributes;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { MuIconComponent, MuRangeComponent, MuRangeFillComponent, MuRangeThumbComponent, MuRangeThumbValueComponent, MuSelectComponent, MuSelectItemComponent, MuSelectItemsComponent, MuSelectLabelComponent, MuSelectLabelContentComponent, MuTransparentComponent, MuTriggerComponent };
|
|
48
|
+
export type { MuComponentsAttributes };
|
package/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
export { M as MuElement } from './mu-element-C36Rgp-m.js';
|
|
2
|
+
export { MuIcon } from './components/mu-icon.js';
|
|
3
|
+
export { MuRange } from './components/mu-range.js';
|
|
4
|
+
export { MuRangeFill } from './components/mu-range-fill.js';
|
|
5
|
+
export { MuRangeThumb } from './components/mu-range-thumb.js';
|
|
6
|
+
export { MuRangeThumbValue } from './components/mu-range-thumb-value.js';
|
|
7
|
+
export { MuSelect } from './components/mu-select.js';
|
|
8
|
+
export { MuSelectItem } from './components/mu-select-item.js';
|
|
9
|
+
export { MuSelectItems } from './components/mu-select-items.js';
|
|
10
|
+
export { MuSelectLabel } from './components/mu-select-label.js';
|
|
11
|
+
export { MuSelectLabelContent } from './components/mu-select-label-content.js';
|
|
12
|
+
export { MuTransparent } from './components/mu-transparent.js';
|
|
13
|
+
export { MuTrigger } from './components/mu-trigger.js';
|
|
14
14
|
import 'lit';
|
|
15
15
|
import 'lit/decorators.js';
|
|
16
16
|
import 'lit/directives/repeat.js';
|
|
@@ -893,9 +893,9 @@ class EventAction {
|
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
895
|
|
|
896
|
-
var _a,
|
|
896
|
+
var _a, _MuElement_muElements;
|
|
897
897
|
let count = 0;
|
|
898
|
-
class
|
|
898
|
+
class MuElement extends LitElement {
|
|
899
899
|
static register(tagName) {
|
|
900
900
|
if (customElements.get(tagName))
|
|
901
901
|
return;
|
|
@@ -950,7 +950,7 @@ class MUElement extends LitElement {
|
|
|
950
950
|
return obj;
|
|
951
951
|
}
|
|
952
952
|
getMuElementById(id) {
|
|
953
|
-
return __classPrivateFieldGet(_a, _a, "f",
|
|
953
|
+
return __classPrivateFieldGet(_a, _a, "f", _MuElement_muElements).get(id);
|
|
954
954
|
}
|
|
955
955
|
closestPierce(selector) {
|
|
956
956
|
return _a.closestPierce(selector, this);
|
|
@@ -1023,7 +1023,7 @@ class MUElement extends LitElement {
|
|
|
1023
1023
|
this.dataset.muId = this.muId;
|
|
1024
1024
|
if (!this.id)
|
|
1025
1025
|
this.id = this.muId;
|
|
1026
|
-
__classPrivateFieldGet(_a, _a, "f",
|
|
1026
|
+
__classPrivateFieldGet(_a, _a, "f", _MuElement_muElements).set(this.muId, { element: this });
|
|
1027
1027
|
this.updateComplete.then(() => {
|
|
1028
1028
|
this.eventActionData?.eventAction.addListeners(this, this.eventActionEvents || this.eventActionData.events);
|
|
1029
1029
|
if (!this.noEventActionAttributes)
|
|
@@ -1032,20 +1032,20 @@ class MUElement extends LitElement {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
disconnectedCallback() {
|
|
1034
1034
|
super.disconnectedCallback();
|
|
1035
|
-
__classPrivateFieldGet(_a, _a, "f",
|
|
1035
|
+
__classPrivateFieldGet(_a, _a, "f", _MuElement_muElements).delete(this.muId);
|
|
1036
1036
|
this.eventActionData?.eventAction.removeListeners(this, this.eventActionEvents || this.eventActionData.events);
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
_a =
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1039
|
+
_a = MuElement;
|
|
1040
|
+
_MuElement_muElements = { value: new Map() };
|
|
1041
|
+
MuElement.closestPierce = closestPierce;
|
|
1042
|
+
MuElement.css = {
|
|
1043
1043
|
focus: css `
|
|
1044
1044
|
--focus-color: oklch(from currentColor l c h / 0.5);
|
|
1045
1045
|
box-shadow: 0 0 0 var(--focus-width, 2px) var(--mu-focus-color, var(--focus-color)) inset;
|
|
1046
1046
|
`,
|
|
1047
1047
|
};
|
|
1048
|
-
|
|
1048
|
+
MuElement.cssColors = css `
|
|
1049
1049
|
--mu-color-100: hsl(var(--mu-hue), 20%, 95%);
|
|
1050
1050
|
--mu-color-200: hsl(var(--mu-hue), 30%, 85%);
|
|
1051
1051
|
--mu-color-300: hsl(var(--mu-hue), 40%, 75%);
|
|
@@ -1056,7 +1056,7 @@ MUElement.cssColors = css `
|
|
|
1056
1056
|
--mu-color-800: hsl(var(--mu-hue), 90%, 25%);
|
|
1057
1057
|
--mu-color-900: hsl(var(--mu-hue), 100%, 15%);
|
|
1058
1058
|
`;
|
|
1059
|
-
|
|
1059
|
+
MuElement.cssBase = css `
|
|
1060
1060
|
*, *::before, *::after, :where(:host) {
|
|
1061
1061
|
margin: 0;
|
|
1062
1062
|
padding: 0;
|
|
@@ -1099,16 +1099,16 @@ MUElement.cssBase = css `
|
|
|
1099
1099
|
`;
|
|
1100
1100
|
__decorate([
|
|
1101
1101
|
property({ type: Boolean, reflect: true })
|
|
1102
|
-
],
|
|
1102
|
+
], MuElement.prototype, "disabled", void 0);
|
|
1103
1103
|
__decorate([
|
|
1104
1104
|
property({ type: Boolean, reflect: true })
|
|
1105
|
-
],
|
|
1105
|
+
], MuElement.prototype, "readonly", void 0);
|
|
1106
1106
|
__decorate([
|
|
1107
1107
|
property({
|
|
1108
1108
|
type: Boolean,
|
|
1109
1109
|
attribute: 'no-event-action-attributes',
|
|
1110
1110
|
})
|
|
1111
|
-
],
|
|
1111
|
+
], MuElement.prototype, "noEventActionAttributes", void 0);
|
|
1112
1112
|
__decorate([
|
|
1113
1113
|
property({
|
|
1114
1114
|
converter: {
|
|
@@ -1119,7 +1119,8 @@ __decorate([
|
|
|
1119
1119
|
return value === null ? [] : parseJson(value);
|
|
1120
1120
|
},
|
|
1121
1121
|
},
|
|
1122
|
+
attribute: 'event-action-events',
|
|
1122
1123
|
})
|
|
1123
|
-
],
|
|
1124
|
+
], MuElement.prototype, "eventActionEvents", void 0);
|
|
1124
1125
|
|
|
1125
|
-
export { EventAction as E,
|
|
1126
|
+
export { EventAction as E, MuElement as M, __decorate as _, disableElementScroll as a, debounce as d, enableElementScroll as e, getElementBoundaries as g, parseJson as p, throttle as t, wait as w };
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "A customizable web-components library with lit",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.0.0-alpha.
|
|
6
|
+
"version": "0.0.0-alpha.4",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@mustib/utils": "2.7.0"
|
|
9
9
|
},
|
|
@@ -30,12 +30,6 @@
|
|
|
30
30
|
"default": "./index.js"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
"./decorators": {
|
|
34
|
-
"import": {
|
|
35
|
-
"types": "./decorators.d.ts",
|
|
36
|
-
"default": "./decorators.js"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
33
|
"./*": {
|
|
40
34
|
"import": {
|
|
41
35
|
"types": "./*.d.ts",
|