@mintplayer/web-components 3.2.0 → 3.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/README.md +10 -11
- package/accordion/index.mjs +14 -12
- package/card/index.mjs +7 -5
- package/card/src/mp-card.element.d.ts +7 -2
- package/carousel/index.mjs +10 -9
- package/checkbox/index.mjs +1 -1
- package/chunks/{datatable-Ce-UT16z.mjs → datatable-wRsV3aob.mjs} +31 -15
- package/chunks/{datetime-picker-BT6lb4qw.mjs → datetime-picker-BQGY51b5.mjs} +8 -7
- package/custom-elements.json +1856 -1192
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/mp-datatable.generated.d.ts +20 -2
- package/datatable/src/index.d.ts +1 -1
- package/datepicker/index.mjs +8 -7
- package/datetime-picker/index.mjs +1 -1
- package/dropdown-menu/index.mjs +14 -8
- package/file-manager/index.mjs +7 -6
- package/input-group/index.mjs +12 -10
- package/machine/index.mjs +8 -1
- package/machine/src/index.d.ts +1 -0
- package/machine/src/mark-links.d.ts +6 -0
- package/nav/index.d.ts +1 -0
- package/nav/index.mjs +126 -0
- package/nav/src/generated/index.d.ts +2 -0
- package/nav/src/generated/mp-nav-item.generated.d.ts +20 -0
- package/nav/src/generated/mp-nav.generated.d.ts +63 -0
- package/nav/src/generated/nav-item.view.generated.d.ts +10 -0
- package/nav/src/generated/nav.view.generated.d.ts +10 -0
- package/nav/src/index.d.ts +1 -0
- package/nav/src/nav-item.lit.d.ts +1 -0
- package/navbar/index.mjs +64 -56
- package/navbar/src/navbar-item.lit.d.ts +1 -0
- package/otp-input/index.mjs +8 -7
- package/package.json +10 -4
- package/phone-input/index.mjs +8 -7
- package/query-builder/index.mjs +14 -12
- package/scheduler/index.mjs +27 -26
- package/select/index.mjs +11 -10
- package/signature-pad/index.mjs +8 -7
- package/spinner/index.d.ts +1 -0
- package/spinner/index.mjs +63 -0
- package/spinner/src/generated/index.d.ts +1 -0
- package/spinner/src/generated/mp-spinner.generated.d.ts +51 -0
- package/spinner/src/generated/spinner.view.generated.d.ts +9 -0
- package/spinner/src/index.d.ts +1 -0
- package/timepicker/index.mjs +13 -12
- package/typeahead/index.mjs +21 -18
- package/theming/bs-theme-preboot.js +0 -1
- package/theming/color-mode.css +0 -37
package/README.md
CHANGED
|
@@ -10,17 +10,16 @@ Run `nx build mintplayer-web-components` to build the library.
|
|
|
10
10
|
|
|
11
11
|
Run `nx test mintplayer-web-components` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Architecture and styling
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
The `mp-*` custom elements are the Lit front of the framework-neutral TypeScript cores in
|
|
16
|
+
`@mintplayer/ui-core`, for apps without a framework. The Angular, React and Vue libraries do **not**
|
|
17
|
+
use these elements; they render their own HTML from the same cores.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
longer address them.
|
|
19
|
+
- **Generated elements** (every component with a D10 manifest) render in the light DOM. Their CSS is
|
|
20
|
+
scoped onto a `data-mps` attribute and installed once per page, together with the Bootstrap partial
|
|
21
|
+
their markup uses. Load only the page-level Bootstrap baseline globally.
|
|
22
|
+
- **A few hand-written, slot-based elements** (checkbox, toggle button, tab control, pagination, shell…)
|
|
23
|
+
keep a shadow root and take your content through native `<slot>`s.
|
|
24
24
|
|
|
25
|
-
See **Styling and encapsulation** in the [workspace README](../../README.md)
|
|
26
|
-
and the migration table.
|
|
25
|
+
See **Styling and encapsulation** in the [workspace README](../../README.md).
|
package/accordion/index.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { adoptLightStyles as e, installLightStyles as t } from "../light-dom/index.mjs";
|
|
2
2
|
import { props as n } from "../machine/index.mjs";
|
|
3
3
|
import { LitElement as r, css as i, html as a, unsafeCSS as o } from "lit";
|
|
4
|
-
import {
|
|
4
|
+
import { installBootstrap as s } from "@mintplayer/ui-core/bootstrap";
|
|
5
|
+
import { bootstrapAccordion as c } from "@mintplayer/ui-core/bootstrap/accordion";
|
|
6
|
+
import { ACCORDION_SCOPE as l, accordionKeydown as u, accordionScopedStyles as d, accordionSummaryClick as f, connectAccordion as p, connectAccordionTab as m } from "@mintplayer/ui-core/accordion";
|
|
5
7
|
//#region libs/mintplayer-web-components/accordion/src/styles/accordion.styles.ts
|
|
6
|
-
var
|
|
8
|
+
var h = o("@layer mp.bootstrap {\n .accordion {\n --bs-accordion-color: var(--bs-body-color);\n --bs-accordion-bg: var(--bs-body-bg);\n --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;\n --bs-accordion-border-color: var(--bs-border-color);\n --bs-accordion-border-width: var(--bs-border-width);\n --bs-accordion-border-radius: var(--bs-border-radius);\n --bs-accordion-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width)));\n --bs-accordion-btn-padding-x: 1.25rem;\n --bs-accordion-btn-padding-y: 1rem;\n --bs-accordion-btn-color: var(--bs-body-color);\n --bs-accordion-btn-bg: var(--bs-accordion-bg);\n --bs-accordion-btn-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");\n --bs-accordion-btn-icon-width: 1.25rem;\n --bs-accordion-btn-icon-transform: rotate(-180deg);\n --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;\n --bs-accordion-btn-active-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%282.0392156863%, 17.2549019608%, 39.6862745098%%29' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");\n --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n --bs-accordion-body-padding-x: 1.25rem;\n --bs-accordion-body-padding-y: 1rem;\n --bs-accordion-active-color: var(--bs-primary-text-emphasis);\n --bs-accordion-active-bg: var(--bs-primary-bg-subtle);\n }\n .accordion-button {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);\n font-size: 1rem;\n color: var(--bs-accordion-btn-color);\n text-align: left;\n background-color: var(--bs-accordion-btn-bg);\n border: 0;\n border-radius: 0;\n overflow-anchor: none;\n transition: var(--bs-accordion-transition);\n }\n @media (prefers-reduced-motion: reduce) {\n .accordion-button {\n transition: none;\n }\n }\n .accordion-button:not(.collapsed) {\n color: var(--bs-accordion-active-color);\n background-color: var(--bs-accordion-active-bg);\n box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);\n }\n .accordion-button:not(.collapsed)::after {\n background-image: var(--bs-accordion-btn-active-icon);\n transform: var(--bs-accordion-btn-icon-transform);\n }\n .accordion-button::after {\n flex-shrink: 0;\n width: var(--bs-accordion-btn-icon-width);\n height: var(--bs-accordion-btn-icon-width);\n margin-left: auto;\n content: \"\";\n background-image: var(--bs-accordion-btn-icon);\n background-repeat: no-repeat;\n background-size: var(--bs-accordion-btn-icon-width);\n transition: var(--bs-accordion-btn-icon-transition);\n }\n @media (prefers-reduced-motion: reduce) {\n .accordion-button::after {\n transition: none;\n }\n }\n .accordion-button:hover {\n z-index: 2;\n }\n .accordion-button:focus {\n z-index: 3;\n outline: 0;\n box-shadow: var(--bs-accordion-btn-focus-box-shadow);\n }\n .accordion-header {\n margin-bottom: 0;\n }\n .accordion-item {\n color: var(--bs-accordion-color);\n background-color: var(--bs-accordion-bg);\n border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);\n }\n .accordion-item:first-of-type {\n border-top-left-radius: var(--bs-accordion-border-radius);\n border-top-right-radius: var(--bs-accordion-border-radius);\n }\n .accordion-item:first-of-type > .accordion-header .accordion-button {\n border-top-left-radius: var(--bs-accordion-inner-border-radius);\n border-top-right-radius: var(--bs-accordion-inner-border-radius);\n }\n .accordion-item:not(:first-of-type) {\n border-top: 0;\n }\n .accordion-item:last-of-type {\n border-bottom-right-radius: var(--bs-accordion-border-radius);\n border-bottom-left-radius: var(--bs-accordion-border-radius);\n }\n .accordion-item:last-of-type > .accordion-header .accordion-button.collapsed {\n border-bottom-right-radius: var(--bs-accordion-inner-border-radius);\n border-bottom-left-radius: var(--bs-accordion-inner-border-radius);\n }\n .accordion-item:last-of-type > .accordion-collapse {\n border-bottom-right-radius: var(--bs-accordion-border-radius);\n border-bottom-left-radius: var(--bs-accordion-border-radius);\n }\n .accordion-body {\n padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x);\n }\n .accordion-flush > .accordion-item {\n border-right: 0;\n border-left: 0;\n border-radius: 0;\n }\n .accordion-flush > .accordion-item:first-child {\n border-top: 0;\n }\n .accordion-flush > .accordion-item:last-child {\n border-bottom: 0;\n }\n .accordion-flush > .accordion-item > .accordion-collapse,\n .accordion-flush > .accordion-item > .accordion-header .accordion-button,\n .accordion-flush > .accordion-item > .accordion-header .accordion-button.collapsed {\n border-radius: 0;\n }\n .accordion {\n --bs-accordion-color: inherit;\n --bs-accordion-bg: inherit;\n --bs-accordion-transition: inherit;\n --bs-accordion-border-color: inherit;\n --bs-accordion-border-width: inherit;\n --bs-accordion-border-radius: inherit;\n --bs-accordion-inner-border-radius: inherit;\n --bs-accordion-btn-padding-x: inherit;\n --bs-accordion-btn-padding-y: inherit;\n --bs-accordion-btn-color: inherit;\n --bs-accordion-btn-bg: inherit;\n --bs-accordion-btn-icon: inherit;\n --bs-accordion-btn-icon-width: inherit;\n --bs-accordion-btn-icon-transform: inherit;\n --bs-accordion-btn-icon-transition: inherit;\n --bs-accordion-btn-active-icon: inherit;\n --bs-accordion-btn-focus-box-shadow: inherit;\n --bs-accordion-body-padding-x: inherit;\n --bs-accordion-body-padding-y: inherit;\n --bs-accordion-active-color: inherit;\n --bs-accordion-active-bg: inherit;\n }\n}\n:host {\n display: block;\n --bs-accordion-color: var(--bs-body-color);\n --bs-accordion-bg: var(--bs-body-bg);\n --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;\n --bs-accordion-border-color: var(--bs-border-color);\n --bs-accordion-border-width: var(--bs-border-width);\n --bs-accordion-border-radius: var(--bs-border-radius);\n --bs-accordion-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width)));\n --bs-accordion-btn-padding-x: 1.25rem;\n --bs-accordion-btn-padding-y: 1rem;\n --bs-accordion-btn-color: var(--bs-body-color);\n --bs-accordion-btn-bg: var(--bs-accordion-bg);\n --bs-accordion-btn-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");\n --bs-accordion-btn-icon-width: 1.25rem;\n --bs-accordion-btn-icon-transform: rotate(-180deg);\n --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;\n --bs-accordion-btn-active-icon: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgb%282.0392156863%, 17.2549019608%, 39.6862745098%%29' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");\n --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n --bs-accordion-body-padding-x: 0;\n --bs-accordion-body-padding-y: 0;\n --bs-accordion-active-color: var(--bs-primary-text-emphasis);\n --bs-accordion-active-bg: var(--bs-primary-bg-subtle);\n}\n\n:host([data-nested]) {\n margin: calc(-1 * var(--bs-accordion-border-width));\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}"), g = "acc", _ = class t extends r {
|
|
7
9
|
static {
|
|
8
|
-
this.styles = [
|
|
10
|
+
this.styles = [h];
|
|
9
11
|
}
|
|
10
12
|
static get observedAttributes() {
|
|
11
13
|
return [
|
|
@@ -109,25 +111,25 @@ var p = o("@layer mp.bootstrap {\n .accordion {\n --bs-accordion-color: var(
|
|
|
109
111
|
}
|
|
110
112
|
render() {
|
|
111
113
|
let e = {
|
|
112
|
-
id:
|
|
114
|
+
id: g,
|
|
113
115
|
multi: this.#e,
|
|
114
116
|
highlightActiveTab: this.#t
|
|
115
117
|
};
|
|
116
118
|
return a`
|
|
117
|
-
<div ${n(
|
|
119
|
+
<div ${n(p(e))} @toggle=${this.#l}>
|
|
118
120
|
${this.#r.map((t, n) => this.#f(e, t, n))}
|
|
119
121
|
<slot></slot>
|
|
120
122
|
</div>
|
|
121
123
|
`;
|
|
122
124
|
}
|
|
123
125
|
#f(e, t, r) {
|
|
124
|
-
let i =
|
|
126
|
+
let i = m(e, r, { disabled: t.disabled });
|
|
125
127
|
return a`
|
|
126
128
|
<details ${n(i.item)} ?open=${t.active}>
|
|
127
129
|
<summary
|
|
128
130
|
${n(i.summary)}
|
|
129
|
-
@click=${(e) =>
|
|
130
|
-
@keydown=${(e) => this.#o &&
|
|
131
|
+
@click=${(e) => f(e, t.disabled)}
|
|
132
|
+
@keydown=${(e) => this.#o && u(this.#o, e, r, t.disabled)}>
|
|
131
133
|
<slot name="h${r}"></slot>
|
|
132
134
|
</summary>
|
|
133
135
|
<div ${n(i.content)}><slot name="c${r}"></slot></div>
|
|
@@ -135,10 +137,10 @@ var p = o("@layer mp.bootstrap {\n .accordion {\n --bs-accordion-color: var(
|
|
|
135
137
|
`;
|
|
136
138
|
}
|
|
137
139
|
};
|
|
138
|
-
typeof document < "u" && document.head && t(
|
|
140
|
+
typeof document < "u" && document.head && s(c), typeof document < "u" && document.head && t(l, d), typeof customElements < "u" && !customElements.get("mp-accordion") && customElements.define("mp-accordion", _);
|
|
139
141
|
//#endregion
|
|
140
142
|
//#region libs/mintplayer-web-components/accordion/src/components/mp-accordion-tab.ts
|
|
141
|
-
var
|
|
143
|
+
var v = class extends r {
|
|
142
144
|
static {
|
|
143
145
|
this.styles = i`
|
|
144
146
|
:host {
|
|
@@ -153,6 +155,6 @@ var g = class extends r {
|
|
|
153
155
|
return a`<slot></slot>`;
|
|
154
156
|
}
|
|
155
157
|
};
|
|
156
|
-
typeof customElements < "u" && !customElements.get("mp-accordion-tab") && customElements.define("mp-accordion-tab",
|
|
158
|
+
typeof customElements < "u" && !customElements.get("mp-accordion-tab") && customElements.define("mp-accordion-tab", v);
|
|
157
159
|
//#endregion
|
|
158
|
-
export {
|
|
160
|
+
export { _ as MpAccordion, v as MpAccordionTab, h as accordionStyles };
|
package/card/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactiveElement as e } from "lit";
|
|
2
|
-
import {
|
|
2
|
+
import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
|
|
3
|
+
import { bootstrapCardPage as n } from "@mintplayer/ui-core/bootstrap/card";
|
|
4
|
+
import { CARD_COLORS as r, capColorClasses as i, cardColorClasses as a, cardColorClasses as o, cardImgClass as s, isCardColor as c } from "@mintplayer/ui-core/card";
|
|
3
5
|
//#region libs/mintplayer-web-components/card/src/mp-card.element.ts
|
|
4
|
-
var
|
|
6
|
+
var l = class extends e {
|
|
5
7
|
constructor(...e) {
|
|
6
8
|
super(...e), this.color = null, this.outline = !1, this.#e = [];
|
|
7
9
|
}
|
|
@@ -22,10 +24,10 @@ var s = class extends e {
|
|
|
22
24
|
return this;
|
|
23
25
|
}
|
|
24
26
|
updated() {
|
|
25
|
-
let e = ["card", ...
|
|
27
|
+
let e = ["card", ...o(this.color, this.outline)];
|
|
26
28
|
this.classList.remove(...this.#e.filter((t) => !e.includes(t))), this.classList.add(...e), this.#e = e;
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
typeof customElements < "u" && !customElements.get("mp-card") && customElements.define("mp-card",
|
|
31
|
+
typeof document < "u" && document.head && t(n), typeof customElements < "u" && !customElements.get("mp-card") && customElements.define("mp-card", l);
|
|
30
32
|
//#endregion
|
|
31
|
-
export {
|
|
33
|
+
export { r as CARD_COLORS, l as MpCardElement, i as capColorClasses, a as cardColorClasses, s as cardImgClass, c as isCardColor };
|
|
@@ -3,8 +3,13 @@ import { ReactiveElement } from 'lit';
|
|
|
3
3
|
* `<mp-card>`, the Lit front of the card (PRD #437 §8, wave A). The card has
|
|
4
4
|
* no core: the element IS the Bootstrap `.card`, rendered in the light DOM
|
|
5
5
|
* with no template of its own, so its children (`.card-header`, `.card-body`,
|
|
6
|
-
* …) are ordinary children
|
|
7
|
-
*
|
|
6
|
+
* …) are ordinary children. Nothing is moved and nothing re-renders, so
|
|
7
|
+
* consumer nodes keep their identity.
|
|
8
|
+
*
|
|
9
|
+
* Styles (#452): those children are the consumer's own raw Bootstrap markup,
|
|
10
|
+
* which a component never stamps, so the element installs the VERBATIM card
|
|
11
|
+
* part (`bootstrapCardPage`) — the route the PRD gives raw page markup. It
|
|
12
|
+
* replaces a scoped copy under the same registry key, never adds a second.
|
|
8
13
|
*
|
|
9
14
|
* No-JS: visible and complete without JS once the consumer writes the
|
|
10
15
|
* classes by hand (`<mp-card class="card text-bg-primary">`); the element only
|
package/carousel/index.mjs
CHANGED
|
@@ -3,8 +3,9 @@ import { LitElement as o, html as s, nothing as c } from "lit";
|
|
|
3
3
|
import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
|
|
4
4
|
import { repeat as u } from "lit/directives/repeat.js";
|
|
5
5
|
import { carouselCore as d, carouselItemCore as f, carouselScopedStyles as p } from "@mintplayer/ui-core/carousel";
|
|
6
|
+
import { bootstrapCarousel as m } from "@mintplayer/ui-core/bootstrap/carousel";
|
|
6
7
|
//#region libs/mintplayer-web-components/carousel/src/generated/carousel.view.generated.ts
|
|
7
|
-
function
|
|
8
|
+
function h({ view: e, slots: t = {} }) {
|
|
8
9
|
return s`
|
|
9
10
|
${e.playPause ? s`
|
|
10
11
|
<div data-mps="carousel" ${i(e.playPause.wrap)}>
|
|
@@ -44,7 +45,7 @@ function m({ view: e, slots: t = {} }) {
|
|
|
44
45
|
}
|
|
45
46
|
//#endregion
|
|
46
47
|
//#region libs/mintplayer-web-components/carousel/src/generated/mp-carousel.generated.ts
|
|
47
|
-
var
|
|
48
|
+
var g = class extends o {
|
|
48
49
|
static {
|
|
49
50
|
this.properties = {
|
|
50
51
|
animation: {
|
|
@@ -119,7 +120,7 @@ var h = class extends o {
|
|
|
119
120
|
this.#e.capture();
|
|
120
121
|
}
|
|
121
122
|
render() {
|
|
122
|
-
return
|
|
123
|
+
return h({
|
|
123
124
|
...this.#t.props(),
|
|
124
125
|
slots: {
|
|
125
126
|
...this.#e.slots,
|
|
@@ -146,17 +147,17 @@ var h = class extends o {
|
|
|
146
147
|
return this.#t.call("togglePaused", e);
|
|
147
148
|
}
|
|
148
149
|
};
|
|
149
|
-
typeof document < "u" && document.head && l("carousel", p), customElements.get("mp-carousel") || customElements.define("mp-carousel",
|
|
150
|
+
typeof document < "u" && document.head && (l(m.key, m.css, { order: m.order }), l("carousel", p)), customElements.get("mp-carousel") || customElements.define("mp-carousel", g);
|
|
150
151
|
//#endregion
|
|
151
152
|
//#region libs/mintplayer-web-components/carousel/src/generated/carousel-item.view.generated.ts
|
|
152
|
-
function
|
|
153
|
+
function _({ view: e, slots: t = {} }) {
|
|
153
154
|
return s`
|
|
154
155
|
${t.default === void 0 ? c : t.default}
|
|
155
156
|
`;
|
|
156
157
|
}
|
|
157
158
|
//#endregion
|
|
158
159
|
//#region libs/mintplayer-web-components/carousel/src/generated/mp-carousel-item.generated.ts
|
|
159
|
-
var
|
|
160
|
+
var v = class extends o {
|
|
160
161
|
static {
|
|
161
162
|
this.properties = { defaultRenderer: { attribute: !1 } };
|
|
162
163
|
}
|
|
@@ -176,7 +177,7 @@ var _ = class extends o {
|
|
|
176
177
|
this.#e.capture();
|
|
177
178
|
}
|
|
178
179
|
render() {
|
|
179
|
-
return
|
|
180
|
+
return _({
|
|
180
181
|
...this.#t.props(),
|
|
181
182
|
slots: {
|
|
182
183
|
...this.#e.slots,
|
|
@@ -185,6 +186,6 @@ var _ = class extends o {
|
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
};
|
|
188
|
-
typeof document < "u" && document.head && l("carousel", p), customElements.get("mp-carousel-item") || customElements.define("mp-carousel-item",
|
|
189
|
+
typeof document < "u" && document.head && (l(m.key, m.css, { order: m.order }), l("carousel", p)), customElements.get("mp-carousel-item") || customElements.define("mp-carousel-item", v);
|
|
189
190
|
//#endregion
|
|
190
|
-
export {
|
|
191
|
+
export { g as MpCarousel, v as MpCarouselItem };
|
package/checkbox/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { ifDefined as d } from "lit/directives/if-defined.js";
|
|
|
6
6
|
//#region libs/mintplayer-web-components/_styles/form-check.styles.ts
|
|
7
7
|
var f = c(".form-check {\n display: block;\n min-height: 1.5rem;\n padding-left: 1.5em;\n margin-bottom: 0.125rem;\n}\n.form-check .form-check-input {\n float: left;\n margin-left: -1.5em;\n}\n\n.form-check-reverse {\n padding-right: 1.5em;\n padding-left: 0;\n text-align: right;\n}\n.form-check-reverse .form-check-input {\n float: right;\n margin-right: -1.5em;\n margin-left: 0;\n}\n\n.form-check-input {\n --bs-form-check-bg: var(--bs-body-bg);\n flex-shrink: 0;\n width: 1em;\n height: 1em;\n margin-top: 0.25em;\n vertical-align: top;\n appearance: none;\n background-color: var(--bs-form-check-bg);\n background-image: var(--bs-form-check-bg-image);\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n border: var(--bs-border-width) solid var(--bs-border-color);\n print-color-adjust: exact;\n}\n.form-check-input[type=checkbox] {\n border-radius: 0.25em;\n}\n.form-check-input[type=radio] {\n border-radius: 50%;\n}\n.form-check-input:active {\n filter: brightness(90%);\n}\n.form-check-input:focus {\n border-color: rgb(52.5490196078%, 71.568627451%, 99.6078431373%);\n outline: 0;\n box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n}\n.form-check-input:checked {\n background-color: #0d6efd;\n border-color: #0d6efd;\n}\n.form-check-input:checked[type=checkbox] {\n --bs-form-check-bg-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e\");\n}\n.form-check-input:checked[type=radio] {\n --bs-form-check-bg-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e\");\n}\n.form-check-input[type=checkbox]:indeterminate {\n background-color: #0d6efd;\n border-color: #0d6efd;\n --bs-form-check-bg-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\");\n}\n.form-check-input:disabled {\n pointer-events: none;\n filter: none;\n opacity: 0.5;\n}\n.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label {\n cursor: default;\n opacity: 0.5;\n}\n\n.form-switch {\n padding-left: 2.5em;\n}\n.form-switch .form-check-input {\n --bs-form-switch-bg: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e\");\n width: 2em;\n margin-left: -2.5em;\n background-image: var(--bs-form-switch-bg);\n background-position: left center;\n border-radius: 2em;\n transition: background-position 0.15s ease-in-out;\n}\n@media (prefers-reduced-motion: reduce) {\n .form-switch .form-check-input {\n transition: none;\n }\n}\n.form-switch .form-check-input:focus {\n --bs-form-switch-bg: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgb%2852.5490196078%, 71.568627451%, 99.6078431373%%29'/%3e%3c/svg%3e\");\n}\n.form-switch .form-check-input:checked {\n background-position: right center;\n --bs-form-switch-bg: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\");\n}\n.form-switch.form-check-reverse {\n padding-right: 2.5em;\n padding-left: 0;\n}\n.form-switch.form-check-reverse .form-check-input {\n margin-right: -2.5em;\n margin-left: 0;\n}\n\n.form-check-inline {\n display: inline-block;\n margin-right: 1rem;\n}\n\n.btn-check {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.btn-check[disabled] + .btn, .btn-check:disabled + .btn {\n pointer-events: none;\n filter: none;\n opacity: 0.65;\n}\n\n@container style(--mp-color-mode: dark) {\n .form-switch .form-check-input:not(:checked):not(:focus) {\n --bs-form-switch-bg: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e\");\n }\n}\n@media (forced-colors: active) {\n .form-check.form-switch .form-check-input {\n forced-color-adjust: none;\n background-color: Canvas;\n background-size: 50% 100%;\n border-color: CanvasText;\n }\n .form-check.form-switch .form-check-input:not(:checked) {\n --bs-form-switch-bg: radial-gradient(circle closest-side, CanvasText 75%, transparent 76%);\n }\n .form-check.form-switch .form-check-input:checked {\n --bs-form-switch-bg: radial-gradient(circle closest-side, HighlightText 75%, transparent 76%);\n background-color: Highlight;\n border-color: Highlight;\n }\n .form-check.form-switch .form-check-input:focus-visible {\n outline: 2px solid Highlight;\n outline-offset: 2px;\n }\n}\n.form-check {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n padding-left: 0;\n}\n\n.form-check .form-check-input {\n margin-top: 0;\n margin-left: 0;\n margin-right: 0.5em;\n vertical-align: middle;\n}\n\n.form-check.form-switch .form-check-input {\n float: none;\n}"), p = Symbol.for("mintplayer.color-mode-warning");
|
|
8
8
|
function m() {
|
|
9
|
-
getComputedStyle(document.documentElement).getPropertyValue("--mp-color-mode").trim() === "" && console.warn("[@mintplayer/web-components] The --mp-color-mode token is not set on <html>, so component icons will not follow dark mode.
|
|
9
|
+
getComputedStyle(document.documentElement).getPropertyValue("--mp-color-mode").trim() === "" && console.warn("[@mintplayer/web-components] The --mp-color-mode token is not set on <html>, so component icons will not follow dark mode. Load the @mintplayer/ui-core/styles/bootstrap baseline, or import \"@mintplayer/ui-core/theming/color-mode.css\" next to your Bootstrap CSS (custom themes declare --mp-color-mode: light|dark themselves).");
|
|
10
10
|
}
|
|
11
11
|
function h() {
|
|
12
12
|
let e = globalThis;
|
|
@@ -4,11 +4,13 @@ import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
|
|
|
4
4
|
import { repeat as u } from "lit/directives/repeat.js";
|
|
5
5
|
import { styleMap as d } from "lit/directives/style-map.js";
|
|
6
6
|
import { DEFAULT_DATATABLE_LABELS as f, cellText as p, computeNextSort as m, datatableCore as h, datatableScopedStyles as g, sortRows as _ } from "@mintplayer/ui-core/datatable";
|
|
7
|
+
import { bootstrapForms as v } from "@mintplayer/ui-core/bootstrap/forms";
|
|
8
|
+
import { bootstrapPagination as y } from "@mintplayer/ui-core/bootstrap/pagination";
|
|
7
9
|
//#region libs/mintplayer-web-components/datatable/src/generated/datatable.view.generated.ts
|
|
8
|
-
function
|
|
10
|
+
function b(e, t) {
|
|
9
11
|
return typeof e == "function" ? e(t) : e;
|
|
10
12
|
}
|
|
11
|
-
function
|
|
13
|
+
function x({ view: e, slots: t = {} }) {
|
|
12
14
|
return s`
|
|
13
15
|
<div data-mps="datatable" ${i(e.live)}>${e.announcement}</div>
|
|
14
16
|
<div data-mps="datatable" ${i(e.shell)}>
|
|
@@ -34,7 +36,7 @@ function y({ view: e, slots: t = {} }) {
|
|
|
34
36
|
<span data-mps="datatable" ${i(e.text)}>
|
|
35
37
|
${t.header === void 0 ? s`
|
|
36
38
|
${e.label}
|
|
37
|
-
` :
|
|
39
|
+
` : b(t.header, { column: e.column })}
|
|
38
40
|
</span>
|
|
39
41
|
${e.sortIndex ? s`
|
|
40
42
|
<span data-mps="datatable" ${i(e.sortIndex)}>${e.sortIndexText}</span>
|
|
@@ -45,7 +47,7 @@ function y({ view: e, slots: t = {} }) {
|
|
|
45
47
|
<span data-mps="datatable" ${i(e.text)}>
|
|
46
48
|
${t.header === void 0 ? s`
|
|
47
49
|
${e.label}
|
|
48
|
-
` :
|
|
50
|
+
` : b(t.header, { column: e.column })}
|
|
49
51
|
</span>
|
|
50
52
|
${e.sortIndex ? s`
|
|
51
53
|
<span data-mps="datatable" ${i(e.sortIndex)}>${e.sortIndexText}</span>
|
|
@@ -56,7 +58,7 @@ function y({ view: e, slots: t = {} }) {
|
|
|
56
58
|
<span data-mps="datatable" ${i(e.text)}>
|
|
57
59
|
${t.header === void 0 ? s`
|
|
58
60
|
${e.label}
|
|
59
|
-
` :
|
|
61
|
+
` : b(t.header, { column: e.column })}
|
|
60
62
|
</span>
|
|
61
63
|
</span>
|
|
62
64
|
`}
|
|
@@ -90,7 +92,7 @@ function y({ view: e, slots: t = {} }) {
|
|
|
90
92
|
<div data-mps="datatable" ${i(e.panel)}>
|
|
91
93
|
${e.open && e.open.custom ? s`
|
|
92
94
|
<div data-mps="datatable" ${i(e.open.body)}>
|
|
93
|
-
${t.filter === void 0 ? c :
|
|
95
|
+
${t.filter === void 0 ? c : b(t.filter, {
|
|
94
96
|
column: e.open.column,
|
|
95
97
|
ctx: e.open.ctx
|
|
96
98
|
})}
|
|
@@ -108,6 +110,9 @@ function y({ view: e, slots: t = {} }) {
|
|
|
108
110
|
<input data-mps="datatable" ${i(e.open.comparison.operand)} .value=${e.open.comparison.operandText}>
|
|
109
111
|
</div>
|
|
110
112
|
` : c}
|
|
113
|
+
${e.open.comparison && e.open.comparison.applied ? s`
|
|
114
|
+
<small data-mps="datatable" ${i(e.open.comparison.applied)}>${e.open.comparison.appliedText}</small>
|
|
115
|
+
` : c}
|
|
111
116
|
${e.open.list ? s`
|
|
112
117
|
<input data-mps="datatable" ${i(e.open.list.search)} .value=${e.open.list.term}>
|
|
113
118
|
` : c}
|
|
@@ -177,14 +182,14 @@ function y({ view: e, slots: t = {} }) {
|
|
|
177
182
|
<td data-mps="datatable" ${i(n.td)}>
|
|
178
183
|
${t.cell === void 0 ? s`
|
|
179
184
|
${n.text}
|
|
180
|
-
` :
|
|
185
|
+
` : b(t.cell, {
|
|
181
186
|
row: e.row,
|
|
182
187
|
column: n.column,
|
|
183
188
|
rowIndex: e.rowIndex
|
|
184
189
|
})}
|
|
185
190
|
</td>
|
|
186
191
|
`)}
|
|
187
|
-
` :
|
|
192
|
+
` : b(t.row, {
|
|
188
193
|
row: e.row,
|
|
189
194
|
rowIndex: e.rowIndex,
|
|
190
195
|
ctx: e.ctx
|
|
@@ -239,7 +244,7 @@ function y({ view: e, slots: t = {} }) {
|
|
|
239
244
|
}
|
|
240
245
|
//#endregion
|
|
241
246
|
//#region libs/mintplayer-web-components/datatable/src/generated/mp-datatable.generated.ts
|
|
242
|
-
var
|
|
247
|
+
var S = class extends o {
|
|
243
248
|
static {
|
|
244
249
|
this.properties = {
|
|
245
250
|
columns: { attribute: !1 },
|
|
@@ -352,6 +357,13 @@ var b = class extends o {
|
|
|
352
357
|
},
|
|
353
358
|
hrefFor: { attribute: !1 },
|
|
354
359
|
distincts: { attribute: !1 },
|
|
360
|
+
filters: { attribute: !1 },
|
|
361
|
+
fetchParams: { attribute: !1 },
|
|
362
|
+
stateKey: {
|
|
363
|
+
type: String,
|
|
364
|
+
converter: a(null),
|
|
365
|
+
attribute: "state-key"
|
|
366
|
+
},
|
|
355
367
|
headerRenderer: { attribute: !1 },
|
|
356
368
|
cellRenderer: { attribute: !1 },
|
|
357
369
|
rowRenderer: { attribute: !1 },
|
|
@@ -394,7 +406,10 @@ var b = class extends o {
|
|
|
394
406
|
fill: this.fill,
|
|
395
407
|
resizableColumns: this.resizableColumns,
|
|
396
408
|
hrefFor: this.hrefFor,
|
|
397
|
-
distincts: this.distincts
|
|
409
|
+
distincts: this.distincts,
|
|
410
|
+
filters: this.filters,
|
|
411
|
+
fetchParams: this.fetchParams,
|
|
412
|
+
stateKey: this.stateKey
|
|
398
413
|
}),
|
|
399
414
|
hostBag: (e) => ({
|
|
400
415
|
...e.view.root,
|
|
@@ -405,7 +420,8 @@ var b = class extends o {
|
|
|
405
420
|
"page",
|
|
406
421
|
"perPage",
|
|
407
422
|
"selectedIds",
|
|
408
|
-
"expandedIds"
|
|
423
|
+
"expandedIds",
|
|
424
|
+
"filters"
|
|
409
425
|
]
|
|
410
426
|
});
|
|
411
427
|
constructor() {
|
|
@@ -413,7 +429,7 @@ var b = class extends o {
|
|
|
413
429
|
10,
|
|
414
430
|
20,
|
|
415
431
|
50
|
|
416
|
-
], 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;
|
|
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;
|
|
417
433
|
}
|
|
418
434
|
createRenderRoot() {
|
|
419
435
|
return this;
|
|
@@ -422,7 +438,7 @@ var b = class extends o {
|
|
|
422
438
|
this.#e.capture();
|
|
423
439
|
}
|
|
424
440
|
render() {
|
|
425
|
-
return
|
|
441
|
+
return x({
|
|
426
442
|
...this.#t.props(),
|
|
427
443
|
slots: {
|
|
428
444
|
...this.#e.slots,
|
|
@@ -437,6 +453,6 @@ var b = class extends o {
|
|
|
437
453
|
return this.#t.call("reload", e);
|
|
438
454
|
}
|
|
439
455
|
};
|
|
440
|
-
typeof document < "u" && document.head && l("datatable", g), customElements.get("mp-datatable") || customElements.define("mp-datatable",
|
|
456
|
+
typeof document < "u" && document.head && (l(v.key, v.css, { order: v.order }), l(y.key, y.css, { order: y.order }), l("datatable", g)), customElements.get("mp-datatable") || customElements.define("mp-datatable", S);
|
|
441
457
|
//#endregion
|
|
442
|
-
export {
|
|
458
|
+
export { S as a, _ as i, p as n, m as r, f as t };
|
|
@@ -2,9 +2,10 @@ import { CoreController as e, booleanAttribute as t, numberAttribute as n, props
|
|
|
2
2
|
import { LitElement as a, html as o, nothing as s } from "lit";
|
|
3
3
|
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
4
4
|
import { repeat as l } from "lit/directives/repeat.js";
|
|
5
|
-
import {
|
|
5
|
+
import { bootstrapForms as u } from "@mintplayer/ui-core/bootstrap/forms";
|
|
6
|
+
import { datetimePickerCore as d, datetimePickerScopedStyles as f } from "@mintplayer/ui-core/datetime-picker";
|
|
6
7
|
//#region libs/mintplayer-web-components/datetime-picker/src/generated/datetime-picker.view.generated.ts
|
|
7
|
-
function
|
|
8
|
+
function p({ view: e, slots: t = {} }) {
|
|
8
9
|
return o`
|
|
9
10
|
<div data-mps="datetime-picker" ${r(e.group)}>
|
|
10
11
|
<input data-mps="datetime-picker" ${r(e.input)}>
|
|
@@ -79,7 +80,7 @@ function f({ view: e, slots: t = {} }) {
|
|
|
79
80
|
}
|
|
80
81
|
//#endregion
|
|
81
82
|
//#region libs/mintplayer-web-components/datetime-picker/src/generated/mp-datetime-picker.generated.ts
|
|
82
|
-
var
|
|
83
|
+
var m = class extends a {
|
|
83
84
|
static {
|
|
84
85
|
this.properties = {
|
|
85
86
|
value: { attribute: !1 },
|
|
@@ -144,7 +145,7 @@ var p = class extends a {
|
|
|
144
145
|
calendarLabels: { attribute: !1 }
|
|
145
146
|
};
|
|
146
147
|
}
|
|
147
|
-
#e = new e(this,
|
|
148
|
+
#e = new e(this, d, {
|
|
148
149
|
idPrefix: "mp-datetime-picker",
|
|
149
150
|
inputs: () => ({
|
|
150
151
|
value: this.value,
|
|
@@ -183,7 +184,7 @@ var p = class extends a {
|
|
|
183
184
|
return this;
|
|
184
185
|
}
|
|
185
186
|
render() {
|
|
186
|
-
return
|
|
187
|
+
return p({ ...this.#e.props() });
|
|
187
188
|
}
|
|
188
189
|
openDate(...e) {
|
|
189
190
|
return this.#e.call("openDate", e);
|
|
@@ -198,6 +199,6 @@ var p = class extends a {
|
|
|
198
199
|
return this.#e.call("clear", e);
|
|
199
200
|
}
|
|
200
201
|
};
|
|
201
|
-
typeof document < "u" && document.head && c("datetime-picker",
|
|
202
|
+
typeof document < "u" && document.head && (c(u.key, u.css, { order: u.order }), c("datetime-picker", f)), customElements.get("mp-datetime-picker") || customElements.define("mp-datetime-picker", m);
|
|
202
203
|
//#endregion
|
|
203
|
-
export {
|
|
204
|
+
export { m as t };
|