@mintplayer/web-components 1.2.0 → 1.4.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/accordion/src/styles/accordion.styles.d.ts +2 -0
- package/card/index.mjs +246 -363
- package/card/src/card-classes.d.ts +0 -7
- package/card/src/card-global.styles.d.ts +2 -0
- package/card/src/index.d.ts +0 -9
- package/card/src/mp-card.element.d.ts +45 -18
- package/chunks/{mp-treeview-Bfq4_IVW.mjs → mp-treeview-C48F63xb.mjs} +8 -8
- package/file-manager/index.mjs +1 -1
- package/package.json +1 -1
- package/timeline/index.mjs +716 -0
- package/timeline/src/components/index.d.ts +2 -0
- package/timeline/src/components/mp-timeline-item.d.ts +63 -0
- package/timeline/src/components/mp-timeline.d.ts +85 -0
- package/timeline/src/index.d.ts +5 -0
- package/timeline/src/styles/index.d.ts +2 -0
- package/timeline/src/styles/timeline-item.styles.d.ts +2 -0
- package/timeline/src/styles/timeline.styles.d.ts +2 -0
- package/timeline-core/index.mjs +23 -0
- package/timeline-core/src/index.d.ts +2 -0
- package/timeline-core/src/models/context.d.ts +39 -0
- package/timeline-core/src/models/index.d.ts +2 -0
- package/timeline-core/src/models/timeline-item.d.ts +44 -0
- package/timeline-core/src/resolve-sides.d.ts +12 -0
- package/tree-select/index.mjs +717 -0
- package/tree-select/src/components/index.d.ts +2 -0
- package/tree-select/src/components/mp-tree-select.d.ts +122 -0
- package/tree-select/src/index.d.ts +6 -0
- package/tree-select/src/providers/in-memory-provider.d.ts +29 -0
- package/tree-select/src/styles/index.d.ts +1 -0
- package/tree-select/src/styles/tree-select.styles.d.ts +2 -0
- package/tree-select/src/types/index.d.ts +1 -0
- package/tree-select/src/types/tree-select.d.ts +51 -0
- package/treeview/index.mjs +1 -1
- package/card/src/mp-card-body.element.d.ts +0 -12
- package/card/src/mp-card-footer.element.d.ts +0 -14
- package/card/src/mp-card-group.element.d.ts +0 -9
- package/card/src/mp-card-header.element.d.ts +0 -24
- package/card/src/mp-card-img.element.d.ts +0 -28
- package/card/src/mp-card-link.element.d.ts +0 -24
- package/card/src/mp-card-subtitle.element.d.ts +0 -9
- package/card/src/mp-card-text.element.d.ts +0 -9
- package/card/src/mp-card-title.element.d.ts +0 -13
|
@@ -7,13 +7,6 @@ export declare function isCardColorName(value: string | null | undefined): value
|
|
|
7
7
|
* applying the new one.
|
|
8
8
|
*/
|
|
9
9
|
export declare function clearPrefixedClasses(el: HTMLElement, prefix: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* Apply the card root's colour contract to an element: `text-bg-<name>` for
|
|
12
|
-
* the filled variant, or `border border-<name> bg-transparent` for outline.
|
|
13
|
-
* Used by both `mp-card` and the Angular `bs-card` wrapper so both layers
|
|
14
|
-
* stay byte-identical without each duplicating the bootstrap-utility logic.
|
|
15
|
-
*/
|
|
16
|
-
export declare function applyCardColorClasses(el: HTMLElement, color: string | null, outline: boolean): void;
|
|
17
10
|
/**
|
|
18
11
|
* Apply the `text-bg-<name>` background to `el`, clearing any prior value.
|
|
19
12
|
* Used by the header / footer Bootstrap-classed regions, which don't have an
|
package/card/src/index.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
export * from './mp-card.element';
|
|
2
|
-
export * from './mp-card-body.element';
|
|
3
|
-
export * from './mp-card-footer.element';
|
|
4
|
-
export * from './mp-card-group.element';
|
|
5
|
-
export * from './mp-card-header.element';
|
|
6
|
-
export * from './mp-card-img.element';
|
|
7
|
-
export * from './mp-card-link.element';
|
|
8
|
-
export * from './mp-card-subtitle.element';
|
|
9
|
-
export * from './mp-card-text.element';
|
|
10
|
-
export * from './mp-card-title.element';
|
|
11
2
|
export * from './card-classes';
|
|
12
3
|
export * from './types/card-image-position';
|
|
13
4
|
export * from './types/card-header-nav-style';
|
|
@@ -1,29 +1,56 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* `<mp-card>` — the single web component of the card family.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Renders a shadow DOM with one default `<slot>`; the card "chrome" (border,
|
|
6
|
+
* radius, background, colour contract) lives on `:host`, so it renders
|
|
7
|
+
* correctly wherever the element is placed — including deeply slotted inside
|
|
8
|
+
* another web component (e.g. `<mp-timeline>`), where Bootstrap's inherited
|
|
9
|
+
* `--bs-*` custom properties don't reach light-DOM content (the bug the old
|
|
10
|
+
* light-DOM card hit). This deliberately revisits the issue_308 light-DOM
|
|
11
|
+
* decision: shadow + `<slot>` does NOT clobber slotted children the way a
|
|
12
|
+
* light-DOM `render()` did, so it avoids both that pitfall and the inheritance
|
|
13
|
+
* gap.
|
|
14
|
+
*
|
|
15
|
+
* Card sub-parts (header / body / footer / title / text / img / …) are plain
|
|
16
|
+
* class-carrying elements projected into the slot (by consumers or the
|
|
17
|
+
* framework `BsCard*` wrappers). `mp-card`'s shadow styles the direct regions
|
|
18
|
+
* via `::slotted(.card-header/.card-body/…)`; deeper typography (`.card-title`
|
|
19
|
+
* inside a body, which `::slotted` can't reach) comes from a small global
|
|
20
|
+
* sheet injected once via `ensureCardStylesInjected()`.
|
|
10
21
|
*
|
|
11
22
|
* Attributes:
|
|
12
|
-
* - `color`
|
|
13
|
-
* - `outline` — boolean (presence = true);
|
|
14
|
-
* plus a transparent background, instead of the filled variant.
|
|
23
|
+
* - `color` — a Bootstrap colour name; selects the filled `:host([color])`.
|
|
24
|
+
* - `outline` — boolean (presence = true); border-only variant.
|
|
15
25
|
*/
|
|
16
|
-
export declare class MpCardElement extends
|
|
17
|
-
static
|
|
26
|
+
export declare class MpCardElement extends LitElement {
|
|
27
|
+
static styles: import('lit').CSSResult[];
|
|
28
|
+
static get properties(): {
|
|
29
|
+
color: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
reflect: boolean;
|
|
32
|
+
};
|
|
33
|
+
outline: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
reflect: boolean;
|
|
36
|
+
};
|
|
37
|
+
isServerSide: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
attribute: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
color: string | null;
|
|
43
|
+
outline: boolean;
|
|
44
|
+
isServerSide: boolean;
|
|
18
45
|
connectedCallback(): void;
|
|
19
|
-
|
|
20
|
-
private applyColor;
|
|
46
|
+
render(): TemplateResult;
|
|
21
47
|
}
|
|
22
48
|
/**
|
|
23
|
-
* Inject the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
49
|
+
* Inject the global card typography sheet (`.card-title`, `.card-text`,
|
|
50
|
+
* `.card-link`, the `text-bg-*` utilities, …) into `document.head` exactly
|
|
51
|
+
* once. These rules target content nested inside a card-body, which
|
|
52
|
+
* `mp-card`'s shadow `::slotted()` rules cannot reach. Exported for the
|
|
53
|
+
* framework wrappers, which render the same class-carrying elements.
|
|
27
54
|
*/
|
|
28
55
|
export declare function ensureCardStylesInjected(): void;
|
|
29
56
|
declare global {
|
|
@@ -271,12 +271,12 @@ class R extends y {
|
|
|
271
271
|
`;
|
|
272
272
|
}
|
|
273
273
|
renderNode(e, t, s, i) {
|
|
274
|
-
const r = !!(e.children && e.children.length > 0), c = !!e.lazy && !r,
|
|
274
|
+
const r = !!(e.children && e.children.length > 0), c = !!e.lazy && !r, p = r || c, l = this._loadingIds.has(e.id), v = this._errorIds.get(e.id), a = this._expandedIds.has(e.id), u = this._selectedIds.has(e.id), f = this._focusedId === e.id, m = f ? 0 : -1, w = e.iconKey && this._iconResolver ? this._iconResolver(e.iconKey, e) : void 0, _ = (t - 1) * 20, x = `${this.instanceId}-row-${e.id}`, g = this._nodeRenderer ? this._nodeRenderer(e, {
|
|
275
275
|
level: t,
|
|
276
276
|
expanded: a,
|
|
277
|
-
selected:
|
|
277
|
+
selected: u,
|
|
278
278
|
focused: f,
|
|
279
|
-
hasChildren:
|
|
279
|
+
hasChildren: p
|
|
280
280
|
}) : void 0;
|
|
281
281
|
return d`
|
|
282
282
|
<li role="none">
|
|
@@ -285,15 +285,15 @@ class R extends y {
|
|
|
285
285
|
class="treeview-row"
|
|
286
286
|
role="treeitem"
|
|
287
287
|
data-node-id=${e.id}
|
|
288
|
-
data-selected=${
|
|
288
|
+
data-selected=${u ? "true" : "false"}
|
|
289
289
|
data-loading=${l ? "true" : "false"}
|
|
290
290
|
data-error=${v ? "true" : "false"}
|
|
291
291
|
aria-level=${t}
|
|
292
292
|
aria-setsize=${i}
|
|
293
293
|
aria-posinset=${s + 1}
|
|
294
|
-
aria-expanded=${
|
|
294
|
+
aria-expanded=${p ? a ? "true" : "false" : n}
|
|
295
295
|
aria-busy=${l ? "true" : n}
|
|
296
|
-
aria-selected=${this._selectionMode !== "none" ?
|
|
296
|
+
aria-selected=${this._selectionMode !== "none" ? u ? "true" : "false" : n}
|
|
297
297
|
tabindex=${m}
|
|
298
298
|
style=${`padding-left:${_ + 12}px`}
|
|
299
299
|
@click=${(o) => this.onRowClick(e, o)}
|
|
@@ -301,7 +301,7 @@ class R extends y {
|
|
|
301
301
|
title=${v ?? n}
|
|
302
302
|
>
|
|
303
303
|
<span
|
|
304
|
-
class=${`treeview-chevron${
|
|
304
|
+
class=${`treeview-chevron${p ? "" : " invisible"}${l ? " loading" : ""}`}
|
|
305
305
|
data-expanded=${a ? "true" : "false"}
|
|
306
306
|
@click=${(o) => this.onChevronClick(e, o)}
|
|
307
307
|
aria-hidden="true"
|
|
@@ -337,7 +337,7 @@ class R extends y {
|
|
|
337
337
|
t.stopPropagation(), this.focusNode(e.id), this.toggleSelection(e, t.ctrlKey || t.metaKey), e.children && e.children.length > 0 && this.toggleExpansion(e);
|
|
338
338
|
}
|
|
339
339
|
onChevronClick(e, t) {
|
|
340
|
-
|
|
340
|
+
((e.children?.length ?? 0) > 0 || e.lazy) && (t.stopPropagation(), this.focusNode(e.id), this.toggleExpansion(e));
|
|
341
341
|
}
|
|
342
342
|
onRowKeydown(e, t) {
|
|
343
343
|
const s = !!(e.children && e.children.length > 0), i = this._expandedIds.has(e.id);
|
package/file-manager/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { unsafeHTML as u } from "lit/directives/unsafe-html.js";
|
|
|
4
4
|
import { createRef as v, ref as w } from "lit/directives/ref.js";
|
|
5
5
|
import { styleMap as y } from "lit/directives/style-map.js";
|
|
6
6
|
import "../chunks/mp-splitter-C8cGCmac.mjs";
|
|
7
|
-
import "../chunks/mp-treeview-
|
|
7
|
+
import "../chunks/mp-treeview-C48F63xb.mjs";
|
|
8
8
|
import "../chunks/mp-datatable-Con0yQue.mjs";
|
|
9
9
|
const $ = b(`:host {
|
|
10
10
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.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": {
|