@muibook/components 9.0.0 → 10.0.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/dist/esm/agent/keywords/index.js +2 -2
- package/dist/esm/agent/prompts/index.js +855 -3
- package/dist/esm/components/mui-accordion/block/index.js +6 -6
- package/dist/esm/components/mui-alert/index.js +43 -40
- package/dist/esm/components/mui-badge/index.js +15 -7
- package/dist/esm/components/mui-body/index.js +8 -0
- package/dist/esm/components/mui-button/index.js +86 -82
- package/dist/esm/components/mui-card/body/index.js +31 -31
- package/dist/esm/components/mui-card/card/index.js +6 -6
- package/dist/esm/components/mui-card/footer/index.js +10 -10
- package/dist/esm/components/mui-carousel/controller/index.js +75 -9
- package/dist/esm/components/mui-chip/index.js +40 -31
- package/dist/esm/components/mui-dropdown/index.js +45 -44
- package/dist/esm/components/mui-icons/ai/index.js +58 -0
- package/dist/esm/components/mui-icons/index.js +8 -0
- package/dist/esm/components/mui-icons/pin/index.js +53 -0
- package/dist/esm/components/mui-icons/pin-slash/index.js +53 -0
- package/dist/esm/components/mui-icons/rectangle/index.js +55 -0
- package/dist/esm/components/mui-icons/rectangle-bottom-panel/index.js +58 -0
- package/dist/esm/components/mui-icons/rectangle-dashed/index.js +55 -0
- package/dist/esm/components/mui-icons/rectangle-left-drawer/index.js +55 -0
- package/dist/esm/components/mui-icons/rectangle-media-text/index.js +55 -0
- package/dist/esm/components/mui-input/index.js +20 -10
- package/dist/esm/components/mui-link/index.js +44 -44
- package/dist/esm/components/mui-select/index.js +9 -1
- package/dist/esm/components/mui-slat/slat/index.js +6 -6
- package/dist/esm/components/mui-smart-card/index.js +1 -0
- package/dist/esm/components/mui-switch/index.js +19 -19
- package/dist/esm/components/mui-table/cell/index.js +4 -4
- package/dist/esm/components/mui-tabs/item/index.js +9 -9
- package/dist/esm/components/mui-tabs/tab-bar/index.js +17 -16
- package/dist/esm/css/mui-brand.css +1 -1
- package/dist/esm/css/mui-tokens.css +6 -2
- package/dist/esm/custom-elements.json +986 -556
- package/dist/esm/index.js +12 -4
- package/dist/types/agent/prompts/index.d.ts +9 -0
- package/dist/types/components/mui-icons/ai.d.ts +1 -0
- package/dist/types/components/mui-icons/index.d.ts +8 -0
- package/dist/types/components/mui-icons/pin-slash.d.ts +1 -0
- package/dist/types/components/mui-icons/pin.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle-bottom-panel.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle-dashed.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle-left-drawer.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle-media-text.d.ts +1 -0
- package/dist/types/components/mui-icons/rectangle.d.ts +1 -0
- package/dist/types/index.d.ts +8 -0
- package/package.json +29 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
class l extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(e, t, c) {
|
|
12
|
+
(e === "size" || e === "color") && t !== c && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), s = t && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[t] || t || "var(--icon-color-default)", i = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, o = i[e] ?? i.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${o};
|
|
29
|
+
height: ${o};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${s};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M27.122 16.88a.643.643 0 0 1-.638-.566c-.651-4.316-1.154-5.034-5.44-5.6a.664.664 0 0 1-.6-.667c0-.327.245-.604.6-.642 4.163-.553 4.728-1.245 5.44-5.6.049-.34.307-.59.638-.59.32 0 .577.238.626.59.614 4.317 1.203 5.022 5.451 5.6.344.038.59.315.59.642 0 .34-.246.617-.59.667-4.137.692-4.714 1.22-5.45 5.6-.062.327-.308.566-.627.566m-24.324-.403c-1.117 0-1.903-.805-1.903-1.963v-1.573c0-2.995 1.67-4.693 4.592-4.693H19.08c-.43.44-.736 1.07-.736 1.8 0 .88.417 1.648 1.019 2.1H6.003c-.86 0-1.302.403-1.302 1.347v1.02c0 1.157-.786 1.962-1.903 1.962m29.826 2.857a.457.457 0 0 1-.455-.415c-.331-2.14-.282-2.152-2.529-2.567a.48.48 0 0 1-.393-.466c0-.24.16-.44.393-.478 2.235-.327 2.21-.365 2.53-2.542.024-.252.208-.44.454-.44.245 0 .417.176.454.44.307 2.101.282 2.127 2.517 2.542.245.05.405.239.405.478 0 .252-.16.415-.442.466-2.185.352-2.16.402-2.48 2.541-.037.252-.209.44-.454.44M8.408 26.032c-1.044 0-1.646-.604-1.646-1.623 0-.265.074-.642.234-1.158l2.185-6.62c.479-1.522 1.338-2.214 2.701-2.214 1.412 0 2.308.705 2.775 2.215l2.198 6.619c.16.516.22.893.22 1.157 0 1.02-.601 1.624-1.632 1.624-.884 0-1.437-.503-1.658-1.56l-.307-1.032h-3.106l-.307 1.031c-.233 1.058-.773 1.56-1.657 1.56m2.541-5.071h1.94l-.909-3.524h-.122zm-8.151 1.783c-1.252 0-2.284-1.057-2.284-2.34 0-1.284 1.032-2.341 2.284-2.341s2.283 1.057 2.283 2.34c0 1.284-1.03 2.341-2.283 2.341m2.689 10.042c-2.922 0-4.592-1.7-4.592-4.694V26.33c0-1.157.786-1.963 1.903-1.963S4.7 25.173 4.7 26.33v1.22c0 .945.442 1.347 1.301 1.347h17.903c.86 0 1.302-.402 1.302-1.346v-7.588c0-.512.153-.955.421-1.29 0 0 .23.522 1.482.522 1.251 0 1.481-.522 1.481-.522.268.335.422.778.422 1.29v8.129c0 2.995-1.658 4.694-4.592 4.694z"
|
|
48
|
+
></path>
|
|
49
|
+
<path
|
|
50
|
+
d="M19.194 16.084c0-.92.728-1.667 1.626-1.667.899 0 1.627.747 1.627 1.667l.011 8.28c0 .921-.728 1.668-1.626 1.668-.899 0-1.627-.747-1.627-1.667z"
|
|
51
|
+
></path>
|
|
52
|
+
</svg>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
customElements.get("mui-icon-ai") || customElements.define("mui-icon-ai", l);
|
|
@@ -34,3 +34,11 @@ import "./music-microphone/index.js";
|
|
|
34
34
|
import "./music-quarter-note/index.js";
|
|
35
35
|
import "./play-rectangle/index.js";
|
|
36
36
|
import "./list-and-film/index.js";
|
|
37
|
+
import "./ai/index.js";
|
|
38
|
+
import "./rectangle/index.js";
|
|
39
|
+
import "./rectangle-media-text/index.js";
|
|
40
|
+
import "./rectangle-dashed/index.js";
|
|
41
|
+
import "./rectangle-left-drawer/index.js";
|
|
42
|
+
import "./rectangle-bottom-panel/index.js";
|
|
43
|
+
import "./pin/index.js";
|
|
44
|
+
import "./pin-slash/index.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
class c extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(e, t, i) {
|
|
12
|
+
(e === "size" || e === "color") && t !== i && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), l = t && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[t] || t || "var(--icon-color-default)", o = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, s = o[e] ?? o.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${s};
|
|
29
|
+
height: ${s};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${l};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path d="M9.321 22.308c0-2.378 1.847-4.642 4.84-5.8l.334-5.027c-1.669-.939-2.837-1.899-3.359-2.556-.323-.407-.5-.855-.5-1.272 0-.856.667-1.482 1.596-1.482h11.536c.929 0 1.596.626 1.596 1.482 0 .417-.177.865-.5 1.272-.522.657-1.69 1.617-3.36 2.556l.335 5.028c2.993 1.157 4.84 3.42 4.84 5.8 0 1.126-.772 1.887-1.93 1.887h-5.372v5.1c0 1.075-1.001 3.047-1.377 3.047-.375 0-1.377-1.972-1.377-3.046v-5.1h-5.372c-1.158 0-1.93-.762-1.93-1.889"></path>
|
|
47
|
+
</svg>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
customElements.get("mui-icon-pin") || customElements.define("mui-icon-pin", c);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
class c extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(e, t, s) {
|
|
12
|
+
(e === "size" || e === "color") && t !== s && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), l = t && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[t] || t || "var(--icon-color-default)", i = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, o = i[e] ?? i.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${o};
|
|
29
|
+
height: ${o};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${l};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path d="M12.552 6.171h11.325c.922 0 1.568.615 1.568 1.456 0 .41-.164.85-.492 1.25-.512.646-1.66 1.589-3.116 2.511l.329 4.96c2.756 1.118 4.58 3.342 4.58 5.678 0 .666-.286 1.2-.768 1.517L14.551 12.095l.04-.707c-1.455-.922-2.613-1.865-3.125-2.51-.318-.4-.482-.852-.482-1.251 0-.84.646-1.456 1.568-1.456m-4.91 3.7c-.327-.328-.337-.932 0-1.27a.91.91 0 0 1 1.292.02l19.412 19.39a.89.89 0 0 1 0 1.261.903.903 0 0 1-1.271 0zm2.04 12.155c0-1.885 1.2-3.7 3.096-4.899l6.928 6.929h-.144v4.837c0 1.056-.973 2.993-1.342 2.993-.38 0-1.353-1.937-1.353-2.993v-5.012h-5.289c-1.127 0-1.896-.748-1.896-1.855"></path>
|
|
47
|
+
</svg>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
customElements.get("mui-icon-pin-slash") || customElements.define("mui-icon-pin-slash", c);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class r extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(e, t, i) {
|
|
12
|
+
(e === "size" || e === "color") && t !== i && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), l = t && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[t] || t || "var(--icon-color-default)", o = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, s = o[e] ?? o.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${s};
|
|
29
|
+
height: ${s};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${l};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M32.998 25.033a5.143 5.143 0 0 1-5.143 5.143H8.145a5.143 5.143 0 0 1-5.143-5.143V10.967a5.143 5.143 0 0 1 5.143-5.143h19.71a5.143 5.143 0 0 1 5.143 5.143zM8.145 9.681c-.71 0-1.286.576-1.286 1.286v14.066c0 .71.576 1.286 1.286 1.286h19.71c.71 0 1.285-.576 1.286-1.286V10.967c0-.71-.576-1.286-1.286-1.286z"
|
|
48
|
+
></path>
|
|
49
|
+
</svg>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.get("mui-icon-rectangle") || customElements.define("mui-icon-rectangle", r);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
class s extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(e, t, l) {
|
|
12
|
+
(e === "size" || e === "color") && t !== l && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), i = t && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[t] || t || "var(--icon-color-default)", c = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, o = c[e] ?? c.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${o};
|
|
29
|
+
height: ${o};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${i};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M32.998 25.033a5.143 5.143 0 0 1-5.143 5.143H8.145a5.143 5.143 0 0 1-5.143-5.143V10.967a5.143 5.143 0 0 1 5.143-5.143h19.71a5.143 5.143 0 0 1 5.143 5.143zM8.145 9.681c-.71 0-1.286.576-1.286 1.286v14.066c0 .71.576 1.286 1.286 1.286h19.71c.71 0 1.285-.576 1.286-1.286V10.967c0-.71-.576-1.286-1.286-1.286z"
|
|
48
|
+
></path>
|
|
49
|
+
<path
|
|
50
|
+
d="M19.927 22.244v2.572h-3.854v-2.572zm1.93-1.93c0-.956-.003-1.48-.041-1.853l-.005-.031-.03-.004c-.373-.038-.897-.041-1.854-.041h-3.854c-.957 0-1.481.003-1.854.04l-.031.005-.004.031c-.038.372-.041.897-.041 1.853 0 .957.003 1.481.041 1.854l.004.03q.015.002.031.005c.373.038.897.041 1.854.041v2.572l-1.197-.008c-.96-.019-1.568-.088-2.038-.35l-.124-.077a2.6 2.6 0 0 1-.559-.506l-.15-.202c-.325-.487-.407-1.117-.427-2.163l-.007-1.196c0-1.694 0-2.594.358-3.234l.077-.124c.14-.21.31-.4.505-.56l.203-.149c.486-.325 1.116-.407 2.162-.428l1.197-.006h3.854c1.807 0 2.71 0 3.359.434.28.188.52.428.708.709.434.648.435 1.552.435 3.358l-.007 1.196c-.02 1.046-.102 1.676-.428 2.163l-.15.202a2.6 2.6 0 0 1-.558.506c-.487.325-1.116.407-2.162.427l-1.197.008v-2.572c.957 0 1.481-.003 1.854-.041l.03-.005q.002-.015.005-.03c.038-.373.041-.897.041-1.854"
|
|
51
|
+
></path>
|
|
52
|
+
</svg>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
customElements.get("mui-icon-rectangle-bottom-panel") || customElements.define("mui-icon-rectangle-bottom-panel", s);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class r extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(t, e, s) {
|
|
12
|
+
(t === "size" || t === "color") && e !== s && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const t = this.getAttribute("size") || "small", e = this.getAttribute("color"), l = e && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[e] || e || "var(--icon-color-default)", i = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, o = i[t] ?? i.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${o};
|
|
29
|
+
height: ${o};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${l};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M6.86 22.916v2.117c0 .71.575 1.286 1.285 1.286h3.999v3.857H8.145a5.143 5.143 0 0 1-5.143-5.143v-2.117zm14.425 3.403v3.857h-6.57v-3.857zm11.713-1.286a5.143 5.143 0 0 1-5.143 5.143h-3.999v-3.857h4c.709 0 1.284-.576 1.285-1.286v-2.117h3.857zm0-4.688h-3.857v-4.69h3.857zm-26.139-4.69v4.69H3.002v-4.69zm20.996-9.831a5.143 5.143 0 0 1 5.143 5.143v2.117h-3.857v-2.117c0-.71-.576-1.286-1.286-1.286h-3.999V5.824zM12.144 9.681H8.145c-.71 0-1.286.576-1.286 1.286v2.117H3.002v-2.117a5.143 5.143 0 0 1 5.143-5.143h3.999zm9.14 0h-6.569V5.824h6.57z"
|
|
48
|
+
></path>
|
|
49
|
+
</svg>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.get("mui-icon-rectangle-dashed") || customElements.define("mui-icon-rectangle-dashed", r);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class l extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(t, e, i) {
|
|
12
|
+
(t === "size" || t === "color") && e !== i && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const t = this.getAttribute("size") || "small", e = this.getAttribute("color"), r = e && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[e] || e || "var(--icon-color-default)", o = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, s = o[t] ?? o.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${s};
|
|
29
|
+
height: ${s};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${r};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M27.855 5.823a5.143 5.143 0 0 1 5.143 5.143v14.068a5.143 5.143 0 0 1-5.143 5.143H8.145a5.143 5.143 0 0 1-5.143-5.143V10.966a5.143 5.143 0 0 1 5.143-5.143zM15.053 26.32h12.802c.71 0 1.285-.577 1.286-1.286V10.968c0-.71-.576-1.286-1.286-1.286H15.053zM8.145 9.682c-.71 0-1.286.576-1.286 1.285v14.067c0 .71.576 1.285 1.286 1.286h4.337V9.682z"
|
|
48
|
+
></path>
|
|
49
|
+
</svg>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.get("mui-icon-rectangle-left-drawer") || customElements.define("mui-icon-rectangle-left-drawer", l);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class l extends HTMLElement {
|
|
2
|
+
static get observedAttributes() {
|
|
3
|
+
return ["size", "color"];
|
|
4
|
+
}
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.attachShadow({ mode: "open" });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this.render();
|
|
10
|
+
}
|
|
11
|
+
attributeChangedCallback(t, e, i) {
|
|
12
|
+
(t === "size" || t === "color") && e !== i && this.render();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const t = this.getAttribute("size") || "small", e = this.getAttribute("color"), s = e && {
|
|
16
|
+
default: "var(--icon-color-default)",
|
|
17
|
+
inverted: "var(--icon-color-inverted)"
|
|
18
|
+
}[e] || e || "var(--icon-color-default)", o = {
|
|
19
|
+
"x-small": "1.6rem",
|
|
20
|
+
small: "2.1rem",
|
|
21
|
+
medium: "2.4rem",
|
|
22
|
+
large: "2.8rem"
|
|
23
|
+
}, c = o[t] ?? o.small;
|
|
24
|
+
this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
25
|
+
`
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
width: ${c};
|
|
29
|
+
height: ${c};
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
fill: ${s};
|
|
34
|
+
}
|
|
35
|
+
svg {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: block;
|
|
38
|
+
fill: inherit;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
|
|
42
|
+
<svg
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
viewBox="0 0 36 36"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M32.998 25.033a5.143 5.143 0 0 1-5.143 5.143H8.145a5.143 5.143 0 0 1-5.143-5.143V10.967a5.143 5.143 0 0 1 5.143-5.143h19.71a5.143 5.143 0 0 1 5.143 5.143zM8.145 9.681c-.71 0-1.286.576-1.286 1.286v14.066c0 .71.576 1.286 1.286 1.286h19.71c.71 0 1.285-.576 1.286-1.286V10.967c0-.71-.576-1.286-1.286-1.286zM22.67 22.103c.527 0 .91.396.91.924 0 .5-.383.896-.91.896H9.84c-.54 0-.923-.395-.923-.896 0-.528.382-.924.923-.924zm2.717-3.323c.527 0 .923.396.923.897a.91.91 0 0 1-.923.923H9.84a.9.9 0 0 1-.923-.923c0-.501.382-.896.923-.897zm-12.436-7.556c.963 0 1.477.527 1.477 1.477v2.559c0 .949-.514 1.476-1.476 1.476h-2.545c-.963 0-1.49-.527-1.49-1.476V12.7c0-.949.527-1.476 1.49-1.476z"
|
|
48
|
+
></path>
|
|
49
|
+
</svg>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.get("mui-icon-rectangle-media-text") || customElements.define("mui-icon-rectangle-media-text", l);
|
|
@@ -12,9 +12,19 @@ class m extends HTMLElement {
|
|
|
12
12
|
this.cleanupListeners();
|
|
13
13
|
}
|
|
14
14
|
attributeChangedCallback(e, r, o) {
|
|
15
|
-
var
|
|
16
|
-
const t = (
|
|
17
|
-
|
|
15
|
+
var s;
|
|
16
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("input");
|
|
17
|
+
if (t) {
|
|
18
|
+
if (e === "value") {
|
|
19
|
+
t.value = o ?? "";
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (e === "disabled") {
|
|
23
|
+
o === null || o === "false" ? t.removeAttribute("disabled") : t.setAttribute("disabled", "");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
["type", "placeholder", "label", "hide-label", "variant"].includes(e) && (this.render(), this.setupListener());
|
|
27
|
+
}
|
|
18
28
|
}
|
|
19
29
|
cleanupListeners() {
|
|
20
30
|
var r;
|
|
@@ -37,13 +47,13 @@ class m extends HTMLElement {
|
|
|
37
47
|
}
|
|
38
48
|
updateSlottedButtons() {
|
|
39
49
|
requestAnimationFrame(() => {
|
|
40
|
-
var t,
|
|
41
|
-
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector('slot[name="before"]'), r = (
|
|
50
|
+
var t, s;
|
|
51
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector('slot[name="before"]'), r = (s = this.shadowRoot) == null ? void 0 : s.querySelector('slot[name="after"]'), o = (l) => {
|
|
42
52
|
if (!l) return;
|
|
43
53
|
l.assignedNodes({ flatten: !0 }).forEach((i) => {
|
|
44
54
|
if (i.nodeType === Node.ELEMENT_NODE) {
|
|
45
|
-
const
|
|
46
|
-
(n === "mui-button" || n === "mui-link") && (
|
|
55
|
+
const a = i, n = a.tagName.toLowerCase();
|
|
56
|
+
(n === "mui-button" || n === "mui-link") && (a.setAttribute("usage", "input"), a.setAttribute("size", "medium"), a.removeAttribute("variant"), a.removeAttribute("weight"));
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
59
|
};
|
|
@@ -51,7 +61,7 @@ class m extends HTMLElement {
|
|
|
51
61
|
});
|
|
52
62
|
}
|
|
53
63
|
render() {
|
|
54
|
-
const e = ["text", "password", "email", "number", "search", "tel", "url", "date", "time"], r = this.getAttribute("type") || "text", o = e.includes(r) ? r : "text", t = this.getAttribute("name") || "",
|
|
64
|
+
const e = ["text", "password", "email", "number", "search", "tel", "url", "date", "time"], r = this.getAttribute("type") || "text", o = e.includes(r) ? r : "text", t = this.getAttribute("name") || "", s = this.getAttribute("value") || "", l = this.getAttribute("placeholder") || "", d = this.getAttribute("id") || `mui-input-${Math.random().toString(36).substr(2, 9)}`, i = this.getAttribute("label") || "", a = this.hasAttribute("hide-label"), n = this.hasAttribute("disabled"), u = a && i ? `aria-label="${i}"` : "", c = this.getAttribute("variant") || "", h = c || "", b = this.querySelector('[slot="before"]') !== null, p = this.querySelector('[slot="after"]') !== null, f = [h, b ? "before" : "", p ? "after" : ""].filter(Boolean).join(" "), v = (
|
|
55
65
|
/*html*/
|
|
56
66
|
`
|
|
57
67
|
<style>
|
|
@@ -222,7 +232,7 @@ class m extends HTMLElement {
|
|
|
222
232
|
|
|
223
233
|
|
|
224
234
|
</style>
|
|
225
|
-
${i ? `<label for="${d}" class="${
|
|
235
|
+
${i ? `<label for="${d}" class="${a ? "vh" : ""}">${i}</label>` : ""}
|
|
226
236
|
<div class="input-wrapper">
|
|
227
237
|
<slot name="before"></slot>
|
|
228
238
|
<input
|
|
@@ -230,7 +240,7 @@ class m extends HTMLElement {
|
|
|
230
240
|
type="${o}"
|
|
231
241
|
name="${t}"
|
|
232
242
|
id="${d}"
|
|
233
|
-
value="${
|
|
243
|
+
value="${s}"
|
|
234
244
|
placeholder="${l}"
|
|
235
245
|
${n ? 'disabled aria-disabled="true"' : ""}
|
|
236
246
|
${u}
|