@mintplayer/web-components 1.2.0 → 1.3.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/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/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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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": {
|