@mintplayer/web-components 3.6.0 → 3.7.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/chunks/{datatable-wcZQMo-4.mjs → datatable-DDDM3nf1.mjs} +34 -28
- package/context-menu/index.mjs +25 -20
- package/context-menu/src/generated/mp-context-menu-panel.generated.d.ts +5 -4
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/mp-datatable.generated.d.ts +10 -0
- package/dropdown/index.mjs +11 -6
- package/dropdown/src/generated/mp-dropdown-panel.generated.d.ts +5 -4
- package/file-manager/index.mjs +1 -1
- package/package.json +2 -2
- package/popover/index.mjs +35 -30
- package/popover/src/generated/mp-popover-panel.generated.d.ts +5 -4
- package/tooltip/index.mjs +30 -25
- package/tooltip/src/generated/mp-tooltip-panel.generated.d.ts +5 -4
|
@@ -90,53 +90,53 @@ function x({ view: e, slots: t = {} }) {
|
|
|
90
90
|
` : c}
|
|
91
91
|
${e.panel ? s`
|
|
92
92
|
<div data-mps="datatable" ${i(e.panel)}>
|
|
93
|
-
${e.
|
|
94
|
-
<div data-mps="datatable" ${i(e.
|
|
93
|
+
${e.body && e.body.custom ? s`
|
|
94
|
+
<div data-mps="datatable" ${i(e.body.body)}>
|
|
95
95
|
${t.filter === void 0 ? c : b(t.filter, {
|
|
96
|
-
column: e.
|
|
97
|
-
ctx: e.
|
|
96
|
+
column: e.body.column,
|
|
97
|
+
ctx: e.body.ctx
|
|
98
98
|
})}
|
|
99
99
|
</div>
|
|
100
|
-
` : e.
|
|
101
|
-
<div data-mps="datatable" ${i(e.
|
|
102
|
-
<button data-mps="datatable" ${i(e.
|
|
103
|
-
${e.
|
|
104
|
-
<div data-mps="datatable" ${i(e.
|
|
105
|
-
<select data-mps="datatable" ${i(e.
|
|
106
|
-
${u(e.
|
|
100
|
+
` : e.body ? s`
|
|
101
|
+
<div data-mps="datatable" ${i(e.body.body)}>
|
|
102
|
+
<button data-mps="datatable" ${i(e.body.clear)}>${e.body.clearText}</button>
|
|
103
|
+
${e.body.comparison ? s`
|
|
104
|
+
<div data-mps="datatable" ${i(e.body.comparison.wrap)}>
|
|
105
|
+
<select data-mps="datatable" ${i(e.body.comparison.operator)}>
|
|
106
|
+
${u(e.body.comparison.operators, (e) => e.key, (e) => s`
|
|
107
107
|
<option data-mps="datatable" ${i(e.option)}>${e.text}</option>
|
|
108
108
|
`)}
|
|
109
109
|
</select>
|
|
110
|
-
<input data-mps="datatable" ${i(e.
|
|
110
|
+
<input data-mps="datatable" ${i(e.body.comparison.operand)} .value=${e.body.comparison.operandText}>
|
|
111
111
|
</div>
|
|
112
112
|
` : c}
|
|
113
|
-
${e.
|
|
114
|
-
<small data-mps="datatable" ${i(e.
|
|
113
|
+
${e.body.comparison && e.body.comparison.applied ? s`
|
|
114
|
+
<small data-mps="datatable" ${i(e.body.comparison.applied)}>${e.body.comparison.appliedText}</small>
|
|
115
115
|
` : c}
|
|
116
|
-
${e.
|
|
117
|
-
<input data-mps="datatable" ${i(e.
|
|
116
|
+
${e.body.list ? s`
|
|
117
|
+
<input data-mps="datatable" ${i(e.body.list.search)} .value=${e.body.list.term}>
|
|
118
118
|
` : c}
|
|
119
|
-
${e.
|
|
120
|
-
<button data-mps="datatable" ${i(e.
|
|
119
|
+
${e.body.list ? s`
|
|
120
|
+
<button data-mps="datatable" ${i(e.body.list.invert)}>${e.body.list.invertText}</button>
|
|
121
121
|
` : c}
|
|
122
|
-
${e.
|
|
123
|
-
<div data-mps="datatable" ${i(e.
|
|
124
|
-
${e.
|
|
125
|
-
<span data-mps="datatable" ${i(e.
|
|
122
|
+
${e.body.list ? s`
|
|
123
|
+
<div data-mps="datatable" ${i(e.body.list.group)}>
|
|
124
|
+
${e.body.list.loading ? s`
|
|
125
|
+
<span data-mps="datatable" ${i(e.body.list.loading)}>${e.body.list.loadingText}</span>
|
|
126
126
|
` : c}
|
|
127
|
-
${u(e.
|
|
127
|
+
${u(e.body.list.options, (e) => e.key, (e) => s`
|
|
128
128
|
<label data-mps="datatable" ${i(e.label)}>
|
|
129
129
|
<input data-mps="datatable" ${i(e.input)} .checked=${e.checked}>
|
|
130
130
|
<span data-mps="datatable">${e.text}</span>
|
|
131
131
|
</label>
|
|
132
132
|
`)}
|
|
133
|
-
${e.
|
|
134
|
-
<span data-mps="datatable" ${i(e.
|
|
133
|
+
${e.body.list.noValues ? s`
|
|
134
|
+
<span data-mps="datatable" ${i(e.body.list.noValues)}>${e.body.list.noValuesText}</span>
|
|
135
135
|
` : c}
|
|
136
136
|
</div>
|
|
137
137
|
` : c}
|
|
138
|
-
${e.
|
|
139
|
-
<span data-mps="datatable" ${i(e.
|
|
138
|
+
${e.body.list && e.body.list.hasMore ? s`
|
|
139
|
+
<span data-mps="datatable" ${i(e.body.list.hasMore)}>${e.body.list.hasMoreText}</span>
|
|
140
140
|
` : c}
|
|
141
141
|
</div>
|
|
142
142
|
` : c}
|
|
@@ -358,6 +358,11 @@ var S = class extends o {
|
|
|
358
358
|
hrefFor: { attribute: !1 },
|
|
359
359
|
distincts: { attribute: !1 },
|
|
360
360
|
filters: { attribute: !1 },
|
|
361
|
+
filtersReadonly: {
|
|
362
|
+
type: Boolean,
|
|
363
|
+
converter: n(!1),
|
|
364
|
+
attribute: "filters-readonly"
|
|
365
|
+
},
|
|
361
366
|
fetchParams: { attribute: !1 },
|
|
362
367
|
stateKey: {
|
|
363
368
|
type: String,
|
|
@@ -408,6 +413,7 @@ var S = class extends o {
|
|
|
408
413
|
hrefFor: this.hrefFor,
|
|
409
414
|
distincts: this.distincts,
|
|
410
415
|
filters: this.filters,
|
|
416
|
+
filtersReadonly: this.filtersReadonly,
|
|
411
417
|
fetchParams: this.fetchParams,
|
|
412
418
|
stateKey: this.stateKey
|
|
413
419
|
}),
|
|
@@ -429,7 +435,7 @@ var S = class extends o {
|
|
|
429
435
|
10,
|
|
430
436
|
20,
|
|
431
437
|
50
|
|
432
|
-
], this.pagination = !1, this.autoSort = !0, this.selectionMode = "none", this.selectedIds = [], this.cutIds = [], this.focusedRowKey = null, this.rowLabel = null, this.rowKey = null, this.tree = !1, this.idKey = null, this.childCountKey = null, this.treeIndent = 1.25, this.expandedIds = [], this.selectionStrategy = "flat", this.loading = !1, this.emptyMessage = "No data", this.virtualScroll = !1, this.itemSize = 40, this.virtualBuffer = 10, this.fill = !1, this.resizableColumns = !0, this.hrefFor = null, this.distincts = null, this.filters = {}, this.fetchParams = null, this.stateKey = null;
|
|
438
|
+
], this.pagination = !1, this.autoSort = !0, this.selectionMode = "none", this.selectedIds = [], this.cutIds = [], this.focusedRowKey = null, this.rowLabel = null, this.rowKey = null, this.tree = !1, this.idKey = null, this.childCountKey = null, this.treeIndent = 1.25, this.expandedIds = [], this.selectionStrategy = "flat", this.loading = !1, this.emptyMessage = "No data", this.virtualScroll = !1, this.itemSize = 40, this.virtualBuffer = 10, this.fill = !1, this.resizableColumns = !0, this.hrefFor = null, this.distincts = null, this.filters = {}, this.filtersReadonly = !1, this.fetchParams = null, this.stateKey = null;
|
|
433
439
|
}
|
|
434
440
|
createRenderRoot() {
|
|
435
441
|
return this;
|
package/context-menu/index.mjs
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { CoreController as e, LightChildren as t,
|
|
2
|
-
import { LitElement as
|
|
3
|
-
import { installLightStyles as
|
|
4
|
-
import { contextMenuCore as
|
|
1
|
+
import { CoreController as e, LightChildren as t, coreDirective as n, stringAttribute as r } from "../machine/index.mjs";
|
|
2
|
+
import { LitElement as i, html as a, nothing as o } from "lit";
|
|
3
|
+
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { contextMenuCore as c, contextMenuPanelCore as l, contextMenuScopedStyles as u } from "@mintplayer/ui-core/context-menu";
|
|
5
5
|
//#region libs/mintplayer-web-components/context-menu/src/generated/context-menu-panel.view.generated.ts
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
${t.default === void 0 ?
|
|
6
|
+
function d({ root: e, slots: t = {} }) {
|
|
7
|
+
return a`
|
|
8
|
+
${t.default === void 0 ? o : t.default}
|
|
9
9
|
`;
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region libs/mintplayer-web-components/context-menu/src/generated/mp-context-menu-panel.generated.ts
|
|
13
|
-
var
|
|
13
|
+
var f = class extends i {
|
|
14
14
|
static {
|
|
15
15
|
this.properties = {
|
|
16
16
|
overlayId: {
|
|
17
17
|
type: String,
|
|
18
|
-
converter:
|
|
18
|
+
converter: r(""),
|
|
19
19
|
attribute: "overlay-id"
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
type:
|
|
23
|
-
converter:
|
|
21
|
+
phase: {
|
|
22
|
+
type: String,
|
|
23
|
+
converter: r("closed", [
|
|
24
|
+
"closed",
|
|
25
|
+
"entering",
|
|
26
|
+
"shown",
|
|
27
|
+
"leaving"
|
|
28
|
+
])
|
|
24
29
|
},
|
|
25
30
|
defaultRenderer: { attribute: !1 }
|
|
26
31
|
};
|
|
27
32
|
}
|
|
28
33
|
#e = new t(this);
|
|
29
|
-
#t = new e(this,
|
|
34
|
+
#t = new e(this, l, {
|
|
30
35
|
idPrefix: "mp-context-menu-panel",
|
|
31
36
|
inputs: () => ({
|
|
32
37
|
overlayId: this.overlayId,
|
|
33
|
-
|
|
38
|
+
phase: this.phase
|
|
34
39
|
}),
|
|
35
40
|
hostBag: (e) => ({
|
|
36
41
|
...e.root,
|
|
@@ -38,7 +43,7 @@ var p = class extends a {
|
|
|
38
43
|
})
|
|
39
44
|
});
|
|
40
45
|
constructor() {
|
|
41
|
-
super(), this.overlayId = "", this.
|
|
46
|
+
super(), this.overlayId = "", this.phase = "closed";
|
|
42
47
|
}
|
|
43
48
|
createRenderRoot() {
|
|
44
49
|
return this;
|
|
@@ -47,7 +52,7 @@ var p = class extends a {
|
|
|
47
52
|
this.#e.capture();
|
|
48
53
|
}
|
|
49
54
|
render() {
|
|
50
|
-
return
|
|
55
|
+
return d({
|
|
51
56
|
...this.#t.props(),
|
|
52
57
|
slots: {
|
|
53
58
|
...this.#e.slots,
|
|
@@ -58,8 +63,8 @@ var p = class extends a {
|
|
|
58
63
|
};
|
|
59
64
|
//#endregion
|
|
60
65
|
//#region libs/mintplayer-web-components/context-menu/src/generated/context-menu.directive.generated.ts
|
|
61
|
-
typeof document < "u" && document.head &&
|
|
62
|
-
var
|
|
66
|
+
typeof document < "u" && document.head && s("context-menu", u), customElements.get("mp-context-menu-panel") || customElements.define("mp-context-menu-panel", f), typeof document < "u" && document.head && s("context-menu", u);
|
|
67
|
+
var p = n(c, {
|
|
63
68
|
idPrefix: "mp-context-menu",
|
|
64
69
|
bag: (e) => e.anchor,
|
|
65
70
|
defaults: {
|
|
@@ -68,8 +73,8 @@ var m = r(l, {
|
|
|
68
73
|
},
|
|
69
74
|
overlay: (e, t) => {
|
|
70
75
|
let n = e.overlay;
|
|
71
|
-
return n ?
|
|
76
|
+
return n ? a`<mp-context-menu-panel .overlayId=${n.overlayId} .phase=${n.phase} .defaultRenderer=${t ?? null}></mp-context-menu-panel>` : null;
|
|
72
77
|
}
|
|
73
78
|
});
|
|
74
79
|
//#endregion
|
|
75
|
-
export {
|
|
80
|
+
export { f as MpContextMenuPanel, p as bsContextMenu };
|
|
@@ -12,10 +12,10 @@ export declare class MpContextMenuPanel extends LitElement {
|
|
|
12
12
|
};
|
|
13
13
|
attribute: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
type:
|
|
15
|
+
phase: {
|
|
16
|
+
type: StringConstructor;
|
|
17
17
|
converter: {
|
|
18
|
-
fromAttribute: (value: string | null) =>
|
|
18
|
+
fromAttribute: (value: string | null) => string;
|
|
19
19
|
toAttribute: (value: unknown) => string | null;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -25,7 +25,8 @@ export declare class MpContextMenuPanel extends LitElement {
|
|
|
25
25
|
};
|
|
26
26
|
/** The panel's id. */
|
|
27
27
|
overlayId: ContextMenuPanelInputs['overlayId'];
|
|
28
|
-
|
|
28
|
+
/** The overlay phase: `.show` while shown, `hidden` while closed (#465). */
|
|
29
|
+
phase: ContextMenuPanelInputs['phase'];
|
|
29
30
|
/** Renders the default slot; wins over slot="default" children. */
|
|
30
31
|
defaultRenderer: (() => unknown) | null | undefined;
|
|
31
32
|
constructor();
|
package/datatable/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DEFAULT_DATATABLE_LABELS, a as MpDatatable, n as cellText, r as computeNextSort, i as sortRows } from "../chunks/datatable-
|
|
1
|
+
export { t as DEFAULT_DATATABLE_LABELS, a as MpDatatable, n as cellText, r as computeNextSort, i as sortRows } from "../chunks/datatable-DDDM3nf1.mjs";
|
|
@@ -8,6 +8,7 @@ import { DatatableHeaderSlotArgs, DatatableCellSlotArgs, DatatableRowSlotArgs, D
|
|
|
8
8
|
* Columns are data (`DatatableColumnDef`). Slots: `header {column}` (a header label),
|
|
9
9
|
* `cell {row, column, rowIndex}` (one cell) and `row {row, rowIndex, ctx}` (all of a
|
|
10
10
|
* row's data cells) and `filter {column, ctx}` (the panel of a column with `filterMode: 'custom'`). Two-way: `sortColumns`, `page`, `perPage`, `selectedIds`, `expandedIds`, `filters`.
|
|
11
|
+
* The table owns the filter state (#465): bind `filters` two-way, or one-way with `filtersReadonly` (the user sees the filters but cannot edit them).
|
|
11
12
|
* An `aria-label` names the table. With `fetch`, filters are applied server-side; `stateKey` prefetches
|
|
12
13
|
* the first page during SSR and hands it to the client (#448).
|
|
13
14
|
*/
|
|
@@ -207,6 +208,14 @@ export declare class MpDatatable extends LitElement {
|
|
|
207
208
|
filters: {
|
|
208
209
|
attribute: boolean;
|
|
209
210
|
};
|
|
211
|
+
filtersReadonly: {
|
|
212
|
+
type: BooleanConstructor;
|
|
213
|
+
converter: {
|
|
214
|
+
fromAttribute: (value: string | null) => boolean;
|
|
215
|
+
toAttribute: (value: unknown) => string | null;
|
|
216
|
+
};
|
|
217
|
+
attribute: string;
|
|
218
|
+
};
|
|
210
219
|
fetchParams: {
|
|
211
220
|
attribute: boolean;
|
|
212
221
|
};
|
|
@@ -265,6 +274,7 @@ export declare class MpDatatable extends LitElement {
|
|
|
265
274
|
hrefFor: DatatableInputs['hrefFor'];
|
|
266
275
|
distincts: DatatableInputs['distincts'];
|
|
267
276
|
filters: DatatableInputs['filters'];
|
|
277
|
+
filtersReadonly: DatatableInputs['filtersReadonly'];
|
|
268
278
|
fetchParams: DatatableInputs['fetchParams'];
|
|
269
279
|
stateKey: DatatableInputs['stateKey'];
|
|
270
280
|
/** Renders the header slot, called per use; wins over slot="header" children. */
|
package/dropdown/index.mjs
CHANGED
|
@@ -24,9 +24,14 @@ var x = class extends s {
|
|
|
24
24
|
type: String,
|
|
25
25
|
converter: o("bottom")
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
type:
|
|
29
|
-
converter:
|
|
27
|
+
phase: {
|
|
28
|
+
type: String,
|
|
29
|
+
converter: o("closed", [
|
|
30
|
+
"closed",
|
|
31
|
+
"entering",
|
|
32
|
+
"shown",
|
|
33
|
+
"leaving"
|
|
34
|
+
])
|
|
30
35
|
},
|
|
31
36
|
hasPopup: {
|
|
32
37
|
type: String,
|
|
@@ -47,7 +52,7 @@ var x = class extends s {
|
|
|
47
52
|
inputs: () => ({
|
|
48
53
|
overlayId: this.overlayId,
|
|
49
54
|
side: this.side,
|
|
50
|
-
|
|
55
|
+
phase: this.phase,
|
|
51
56
|
hasPopup: this.hasPopup,
|
|
52
57
|
triggerId: this.triggerId
|
|
53
58
|
}),
|
|
@@ -57,7 +62,7 @@ var x = class extends s {
|
|
|
57
62
|
})
|
|
58
63
|
});
|
|
59
64
|
constructor() {
|
|
60
|
-
super(), this.overlayId = "", this.side = "bottom", this.
|
|
65
|
+
super(), this.overlayId = "", this.side = "bottom", this.phase = "closed", this.hasPopup = "menu", this.triggerId = null;
|
|
61
66
|
}
|
|
62
67
|
createRenderRoot() {
|
|
63
68
|
return this;
|
|
@@ -288,7 +293,7 @@ var A = r(f, {
|
|
|
288
293
|
},
|
|
289
294
|
overlay: (e, t) => {
|
|
290
295
|
let n = e.overlay;
|
|
291
|
-
return n ? c`<mp-dropdown-panel .overlayId=${n.overlayId} .side=${n.side} .
|
|
296
|
+
return n ? c`<mp-dropdown-panel .overlayId=${n.overlayId} .side=${n.side} .phase=${n.phase} .hasPopup=${n.hasPopup} .triggerId=${n.triggerId} .defaultRenderer=${t ?? null}></mp-dropdown-panel>` : null;
|
|
292
297
|
}
|
|
293
298
|
});
|
|
294
299
|
//#endregion
|
|
@@ -19,10 +19,10 @@ export declare class MpDropdownPanel extends LitElement {
|
|
|
19
19
|
toAttribute: (value: unknown) => string | null;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
type:
|
|
22
|
+
phase: {
|
|
23
|
+
type: StringConstructor;
|
|
24
24
|
converter: {
|
|
25
|
-
fromAttribute: (value: string | null) =>
|
|
25
|
+
fromAttribute: (value: string | null) => string;
|
|
26
26
|
toAttribute: (value: unknown) => string | null;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -49,7 +49,8 @@ export declare class MpDropdownPanel extends LitElement {
|
|
|
49
49
|
/** The panel's id, which the trigger's `aria-controls` names. */
|
|
50
50
|
overlayId: DropdownPanelInputs['overlayId'];
|
|
51
51
|
side: DropdownPanelInputs['side'];
|
|
52
|
-
|
|
52
|
+
/** The overlay phase: `.show` while shown, `hidden` while closed (#465). */
|
|
53
|
+
phase: DropdownPanelInputs['phase'];
|
|
53
54
|
hasPopup: DropdownPanelInputs['hasPopup'];
|
|
54
55
|
/** The trigger's id, naming a dialog panel. */
|
|
55
56
|
triggerId: DropdownPanelInputs['triggerId'];
|
package/file-manager/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoreController as e, booleanAttribute as t, props as n, stringAttribute as r } from "../machine/index.mjs";
|
|
2
|
-
import "../chunks/datatable-
|
|
2
|
+
import "../chunks/datatable-DDDM3nf1.mjs";
|
|
3
3
|
import "../chunks/splitter-EuJmtwjW.mjs";
|
|
4
4
|
import "../chunks/treeview-CKndcfiq.mjs";
|
|
5
5
|
import { LitElement as i, html as a, nothing as o } from "lit";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/web-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Framework-agnostic Lit web components for the @mintplayer/bootstrap design system. Consumed by @mintplayer/ng-bootstrap, @mintplayer/react-bootstrap, and @mintplayer/vue-bootstrap.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
"@lit/context": "^1.1.6"
|
|
320
320
|
},
|
|
321
321
|
"dependencies": {
|
|
322
|
-
"@mintplayer/ui-core": "^1.
|
|
322
|
+
"@mintplayer/ui-core": "^1.9.0",
|
|
323
323
|
"tslib": "^2.3.0",
|
|
324
324
|
"intl-tel-input": "^29.1.2",
|
|
325
325
|
"libphonenumber-js": "^1.13.10"
|
package/popover/index.mjs
CHANGED
|
@@ -1,63 +1,68 @@
|
|
|
1
|
-
import { CoreController as e, LightChildren as t,
|
|
2
|
-
import { LitElement as
|
|
3
|
-
import { installLightStyles as
|
|
4
|
-
import { bootstrapTransitions as
|
|
5
|
-
import { popoverCore as
|
|
6
|
-
import { bootstrapPopover as
|
|
1
|
+
import { CoreController as e, LightChildren as t, coreDirective as n, props as r, stringAttribute as i } from "../machine/index.mjs";
|
|
2
|
+
import { LitElement as a, html as o, nothing as s } from "lit";
|
|
3
|
+
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { bootstrapTransitions as l } from "@mintplayer/ui-core/bootstrap/transitions";
|
|
5
|
+
import { popoverCore as u, popoverPanelCore as d, popoverScopedStyles as f } from "@mintplayer/ui-core/popover";
|
|
6
|
+
import { bootstrapPopover as p } from "@mintplayer/ui-core/bootstrap/popover";
|
|
7
7
|
//#region libs/mintplayer-web-components/popover/src/generated/popover-panel.view.generated.ts
|
|
8
|
-
function
|
|
9
|
-
return
|
|
10
|
-
<div data-mps="popover" ${
|
|
11
|
-
${e.header ?
|
|
12
|
-
<h3 data-mps="popover" ${
|
|
13
|
-
` :
|
|
14
|
-
<div data-mps="popover" ${
|
|
15
|
-
${t.default === void 0 ?
|
|
8
|
+
function m({ view: e, slots: t = {} }) {
|
|
9
|
+
return o`
|
|
10
|
+
<div data-mps="popover" ${r(e.arrow)}></div>
|
|
11
|
+
${e.header ? o`
|
|
12
|
+
<h3 data-mps="popover" ${r(e.header)}>${e.title}</h3>
|
|
13
|
+
` : s}
|
|
14
|
+
<div data-mps="popover" ${r(e.body)}>
|
|
15
|
+
${t.default === void 0 ? s : t.default}
|
|
16
16
|
</div>
|
|
17
17
|
`;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region libs/mintplayer-web-components/popover/src/generated/mp-popover-panel.generated.ts
|
|
21
|
-
var
|
|
21
|
+
var h = class extends a {
|
|
22
22
|
static {
|
|
23
23
|
this.properties = {
|
|
24
24
|
overlayId: {
|
|
25
25
|
type: String,
|
|
26
|
-
converter:
|
|
26
|
+
converter: i(""),
|
|
27
27
|
attribute: "overlay-id"
|
|
28
28
|
},
|
|
29
29
|
side: {
|
|
30
30
|
type: String,
|
|
31
|
-
converter:
|
|
31
|
+
converter: i("bottom", [
|
|
32
32
|
"top",
|
|
33
33
|
"bottom",
|
|
34
34
|
"start",
|
|
35
35
|
"end"
|
|
36
36
|
])
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
type:
|
|
40
|
-
converter:
|
|
38
|
+
phase: {
|
|
39
|
+
type: String,
|
|
40
|
+
converter: i("closed", [
|
|
41
|
+
"closed",
|
|
42
|
+
"entering",
|
|
43
|
+
"shown",
|
|
44
|
+
"leaving"
|
|
45
|
+
])
|
|
41
46
|
},
|
|
42
47
|
heading: {
|
|
43
48
|
type: String,
|
|
44
|
-
converter:
|
|
49
|
+
converter: i(null)
|
|
45
50
|
},
|
|
46
51
|
triggerId: {
|
|
47
52
|
type: String,
|
|
48
|
-
converter:
|
|
53
|
+
converter: i(null),
|
|
49
54
|
attribute: "trigger-id"
|
|
50
55
|
},
|
|
51
56
|
defaultRenderer: { attribute: !1 }
|
|
52
57
|
};
|
|
53
58
|
}
|
|
54
59
|
#e = new t(this);
|
|
55
|
-
#t = new e(this,
|
|
60
|
+
#t = new e(this, d, {
|
|
56
61
|
idPrefix: "mp-popover-panel",
|
|
57
62
|
inputs: () => ({
|
|
58
63
|
overlayId: this.overlayId,
|
|
59
64
|
side: this.side,
|
|
60
|
-
|
|
65
|
+
phase: this.phase,
|
|
61
66
|
heading: this.heading,
|
|
62
67
|
triggerId: this.triggerId
|
|
63
68
|
}),
|
|
@@ -67,7 +72,7 @@ var g = class extends o {
|
|
|
67
72
|
})
|
|
68
73
|
});
|
|
69
74
|
constructor() {
|
|
70
|
-
super(), this.overlayId = "", this.side = "bottom", this.
|
|
75
|
+
super(), this.overlayId = "", this.side = "bottom", this.phase = "closed", this.heading = null, this.triggerId = null;
|
|
71
76
|
}
|
|
72
77
|
createRenderRoot() {
|
|
73
78
|
return this;
|
|
@@ -76,7 +81,7 @@ var g = class extends o {
|
|
|
76
81
|
this.#e.capture();
|
|
77
82
|
}
|
|
78
83
|
render() {
|
|
79
|
-
return
|
|
84
|
+
return m({
|
|
80
85
|
...this.#t.props(),
|
|
81
86
|
slots: {
|
|
82
87
|
...this.#e.slots,
|
|
@@ -87,8 +92,8 @@ var g = class extends o {
|
|
|
87
92
|
};
|
|
88
93
|
//#endregion
|
|
89
94
|
//#region libs/mintplayer-web-components/popover/src/generated/popover.directive.generated.ts
|
|
90
|
-
typeof document < "u" && document.head && (l
|
|
91
|
-
var
|
|
95
|
+
typeof document < "u" && document.head && (c(l.key, l.css, { order: l.order }), c(p.key, p.css, { order: p.order }), c("popover", f)), customElements.get("mp-popover-panel") || customElements.define("mp-popover-panel", h), typeof document < "u" && document.head && (c(l.key, l.css, { order: l.order }), c(p.key, p.css, { order: p.order }), c("popover", f));
|
|
96
|
+
var g = n(u, {
|
|
92
97
|
idPrefix: "mp-popover",
|
|
93
98
|
bag: (e) => e.anchor,
|
|
94
99
|
defaults: {
|
|
@@ -97,8 +102,8 @@ var _ = r(d, {
|
|
|
97
102
|
},
|
|
98
103
|
overlay: (e, t) => {
|
|
99
104
|
let n = e.overlay;
|
|
100
|
-
return n ?
|
|
105
|
+
return n ? o`<mp-popover-panel .overlayId=${n.overlayId} .side=${n.side} .phase=${n.phase} .heading=${n.heading} .triggerId=${n.triggerId} .defaultRenderer=${t ?? null}></mp-popover-panel>` : null;
|
|
101
106
|
}
|
|
102
107
|
});
|
|
103
108
|
//#endregion
|
|
104
|
-
export {
|
|
109
|
+
export { h as MpPopoverPanel, g as bsPopover };
|
|
@@ -19,10 +19,10 @@ export declare class MpPopoverPanel extends LitElement {
|
|
|
19
19
|
toAttribute: (value: unknown) => string | null;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
type:
|
|
22
|
+
phase: {
|
|
23
|
+
type: StringConstructor;
|
|
24
24
|
converter: {
|
|
25
|
-
fromAttribute: (value: string | null) =>
|
|
25
|
+
fromAttribute: (value: string | null) => string;
|
|
26
26
|
toAttribute: (value: unknown) => string | null;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -48,7 +48,8 @@ export declare class MpPopoverPanel extends LitElement {
|
|
|
48
48
|
/** The panel's id, which the trigger's `aria-controls` names. */
|
|
49
49
|
overlayId: PopoverPanelInputs['overlayId'];
|
|
50
50
|
side: PopoverPanelInputs['side'];
|
|
51
|
-
|
|
51
|
+
/** The overlay phase: `.show` while shown, `hidden` while closed (#465). */
|
|
52
|
+
phase: PopoverPanelInputs['phase'];
|
|
52
53
|
heading: PopoverPanelInputs['heading'];
|
|
53
54
|
/** The trigger's id, naming the dialog when there is no title. */
|
|
54
55
|
triggerId: PopoverPanelInputs['triggerId'];
|
package/tooltip/index.mjs
CHANGED
|
@@ -1,51 +1,56 @@
|
|
|
1
|
-
import { CoreController as e, LightChildren as t,
|
|
2
|
-
import { LitElement as
|
|
3
|
-
import { installLightStyles as
|
|
4
|
-
import { bootstrapTransitions as
|
|
5
|
-
import { tooltipCore as
|
|
6
|
-
import { bootstrapTooltip as
|
|
1
|
+
import { CoreController as e, LightChildren as t, coreDirective as n, props as r, stringAttribute as i } from "../machine/index.mjs";
|
|
2
|
+
import { LitElement as a, html as o, nothing as s } from "lit";
|
|
3
|
+
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { bootstrapTransitions as l } from "@mintplayer/ui-core/bootstrap/transitions";
|
|
5
|
+
import { tooltipCore as u, tooltipPanelCore as d, tooltipScopedStyles as f } from "@mintplayer/ui-core/tooltip";
|
|
6
|
+
import { bootstrapTooltip as p } from "@mintplayer/ui-core/bootstrap/tooltip";
|
|
7
7
|
//#region libs/mintplayer-web-components/tooltip/src/generated/tooltip-panel.view.generated.ts
|
|
8
|
-
function
|
|
9
|
-
return
|
|
10
|
-
<div data-mps="tooltip" ${
|
|
11
|
-
<div data-mps="tooltip" ${
|
|
12
|
-
${t.default === void 0 ?
|
|
8
|
+
function m({ view: e, slots: t = {} }) {
|
|
9
|
+
return o`
|
|
10
|
+
<div data-mps="tooltip" ${r(e.arrow)}></div>
|
|
11
|
+
<div data-mps="tooltip" ${r(e.inner)}>
|
|
12
|
+
${t.default === void 0 ? s : t.default}
|
|
13
13
|
</div>
|
|
14
14
|
`;
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region libs/mintplayer-web-components/tooltip/src/generated/mp-tooltip-panel.generated.ts
|
|
18
|
-
var
|
|
18
|
+
var h = class extends a {
|
|
19
19
|
static {
|
|
20
20
|
this.properties = {
|
|
21
21
|
overlayId: {
|
|
22
22
|
type: String,
|
|
23
|
-
converter:
|
|
23
|
+
converter: i(""),
|
|
24
24
|
attribute: "overlay-id"
|
|
25
25
|
},
|
|
26
26
|
side: {
|
|
27
27
|
type: String,
|
|
28
|
-
converter:
|
|
28
|
+
converter: i("top", [
|
|
29
29
|
"top",
|
|
30
30
|
"bottom",
|
|
31
31
|
"start",
|
|
32
32
|
"end"
|
|
33
33
|
])
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
converter:
|
|
35
|
+
phase: {
|
|
36
|
+
type: String,
|
|
37
|
+
converter: i("closed", [
|
|
38
|
+
"closed",
|
|
39
|
+
"entering",
|
|
40
|
+
"shown",
|
|
41
|
+
"leaving"
|
|
42
|
+
])
|
|
38
43
|
},
|
|
39
44
|
defaultRenderer: { attribute: !1 }
|
|
40
45
|
};
|
|
41
46
|
}
|
|
42
47
|
#e = new t(this);
|
|
43
|
-
#t = new e(this,
|
|
48
|
+
#t = new e(this, d, {
|
|
44
49
|
idPrefix: "mp-tooltip-panel",
|
|
45
50
|
inputs: () => ({
|
|
46
51
|
overlayId: this.overlayId,
|
|
47
52
|
side: this.side,
|
|
48
|
-
|
|
53
|
+
phase: this.phase
|
|
49
54
|
}),
|
|
50
55
|
hostBag: (e) => ({
|
|
51
56
|
...e.view.root,
|
|
@@ -53,7 +58,7 @@ var g = class extends o {
|
|
|
53
58
|
})
|
|
54
59
|
});
|
|
55
60
|
constructor() {
|
|
56
|
-
super(), this.overlayId = "", this.side = "top", this.
|
|
61
|
+
super(), this.overlayId = "", this.side = "top", this.phase = "closed";
|
|
57
62
|
}
|
|
58
63
|
createRenderRoot() {
|
|
59
64
|
return this;
|
|
@@ -62,7 +67,7 @@ var g = class extends o {
|
|
|
62
67
|
this.#e.capture();
|
|
63
68
|
}
|
|
64
69
|
render() {
|
|
65
|
-
return
|
|
70
|
+
return m({
|
|
66
71
|
...this.#t.props(),
|
|
67
72
|
slots: {
|
|
68
73
|
...this.#e.slots,
|
|
@@ -73,15 +78,15 @@ var g = class extends o {
|
|
|
73
78
|
};
|
|
74
79
|
//#endregion
|
|
75
80
|
//#region libs/mintplayer-web-components/tooltip/src/generated/tooltip.directive.generated.ts
|
|
76
|
-
typeof document < "u" && document.head && (l
|
|
77
|
-
var
|
|
81
|
+
typeof document < "u" && document.head && (c(l.key, l.css, { order: l.order }), c(p.key, p.css, { order: p.order }), c("tooltip", f)), customElements.get("mp-tooltip-panel") || customElements.define("mp-tooltip-panel", h), typeof document < "u" && document.head && (c(l.key, l.css, { order: l.order }), c(p.key, p.css, { order: p.order }), c("tooltip", f));
|
|
82
|
+
var g = n(u, {
|
|
78
83
|
idPrefix: "mp-tooltip",
|
|
79
84
|
bag: (e) => e.anchor,
|
|
80
85
|
defaults: { position: "top" },
|
|
81
86
|
overlay: (e, t) => {
|
|
82
87
|
let n = e.overlay;
|
|
83
|
-
return n ?
|
|
88
|
+
return n ? o`<mp-tooltip-panel .overlayId=${n.overlayId} .side=${n.side} .phase=${n.phase} .defaultRenderer=${t ?? null}></mp-tooltip-panel>` : null;
|
|
84
89
|
}
|
|
85
90
|
});
|
|
86
91
|
//#endregion
|
|
87
|
-
export {
|
|
92
|
+
export { h as MpTooltipPanel, g as bsTooltip };
|
|
@@ -19,10 +19,10 @@ export declare class MpTooltipPanel extends LitElement {
|
|
|
19
19
|
toAttribute: (value: unknown) => string | null;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
type:
|
|
22
|
+
phase: {
|
|
23
|
+
type: StringConstructor;
|
|
24
24
|
converter: {
|
|
25
|
-
fromAttribute: (value: string | null) =>
|
|
25
|
+
fromAttribute: (value: string | null) => string;
|
|
26
26
|
toAttribute: (value: unknown) => string | null;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -33,7 +33,8 @@ export declare class MpTooltipPanel extends LitElement {
|
|
|
33
33
|
/** The panel's id, which the trigger's `aria-describedby` names. */
|
|
34
34
|
overlayId: TooltipPanelInputs['overlayId'];
|
|
35
35
|
side: TooltipPanelInputs['side'];
|
|
36
|
-
|
|
36
|
+
/** The overlay phase: `.show` while shown, `hidden` while closed (#465). */
|
|
37
|
+
phase: TooltipPanelInputs['phase'];
|
|
37
38
|
/** Renders the default slot; wins over slot="default" children. */
|
|
38
39
|
defaultRenderer: (() => unknown) | null | undefined;
|
|
39
40
|
constructor();
|