@muibook/components 1.1.0 → 1.1.2
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/components/mui-body/index.js +23 -19
- package/dist/esm/components/mui-table/cell/index.js +9 -8
- package/dist/esm/components/mui-table/row/index.js +1 -0
- package/dist/esm/components/mui-table/row-group/index.js +1 -1
- package/dist/esm/index.js +36 -34
- package/dist/types/index.d.ts +32 -32
- package/package.json +1 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { getPartMap as
|
|
2
|
-
class
|
|
1
|
+
import { getPartMap as r } from "../../utils/part-map/index.js";
|
|
2
|
+
class o extends HTMLElement {
|
|
3
3
|
static get observedAttributes() {
|
|
4
4
|
return ["size", "weight", "variant"];
|
|
5
5
|
}
|
|
6
6
|
constructor() {
|
|
7
7
|
super(), this.attachShadow({ mode: "open" });
|
|
8
|
-
const
|
|
9
|
-
this.setAttribute("size",
|
|
8
|
+
const t = this.getAttribute("size") || "medium", e = this.getAttribute("weight") || "regular", i = this.getAttribute("variant") || "default";
|
|
9
|
+
this.setAttribute("size", t), this.setAttribute("variant", i), this.setAttribute("weight", e);
|
|
10
10
|
}
|
|
11
11
|
async connectedCallback() {
|
|
12
|
-
await this.waitForPartMap();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
await this.waitForPartMap(), this.render();
|
|
13
|
+
}
|
|
14
|
+
attributeChangedCallback(t, e, i) {
|
|
15
|
+
e !== i && this.shadowRoot && this.render();
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const t = this.shadowRoot;
|
|
19
|
+
if (!t || t.children.length > 0) return;
|
|
20
|
+
const e = r("spacing", "layout", "visual");
|
|
21
|
+
t.innerHTML = /*html*/
|
|
22
|
+
`
|
|
16
23
|
<style>
|
|
17
24
|
:host { display: block; }
|
|
18
25
|
|
|
@@ -63,20 +70,17 @@ class r extends HTMLElement {
|
|
|
63
70
|
|
|
64
71
|
</style>
|
|
65
72
|
|
|
66
|
-
<p part="${
|
|
67
|
-
|
|
68
|
-
`
|
|
69
|
-
);
|
|
70
|
-
this.shadowRoot && (this.shadowRoot.innerHTML = t);
|
|
73
|
+
<p part="${e}"><slot></slot></p>
|
|
74
|
+
`;
|
|
71
75
|
}
|
|
72
76
|
waitForPartMap() {
|
|
73
|
-
return new Promise((
|
|
74
|
-
if (typeof
|
|
75
|
-
const
|
|
76
|
-
typeof
|
|
77
|
+
return new Promise((t) => {
|
|
78
|
+
if (typeof r == "function") return t();
|
|
79
|
+
const e = () => {
|
|
80
|
+
typeof r == "function" ? t() : requestAnimationFrame(e);
|
|
77
81
|
};
|
|
78
|
-
|
|
82
|
+
e();
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
|
-
customElements.define("mui-body",
|
|
86
|
+
customElements.define("mui-body", o);
|
|
@@ -14,12 +14,13 @@ class s extends HTMLElement {
|
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
align-self: ${this.getAttribute("align-y") || "initial"};
|
|
16
16
|
text-align: left;
|
|
17
|
+
|
|
17
18
|
}
|
|
18
19
|
:host(*:first-of-type) {
|
|
19
|
-
padding-left: var(--space-
|
|
20
|
+
padding-left: var(--space-400);
|
|
20
21
|
}
|
|
21
22
|
:host(*:last-of-type) {
|
|
22
|
-
padding-right: var(--space-
|
|
23
|
+
padding-right: var(--space-400);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/* Card Slot (Supports: Table Cell, Accordion Block) */
|
|
@@ -30,6 +31,12 @@ class s extends HTMLElement {
|
|
|
30
31
|
padding-right: var(--space-500);
|
|
31
32
|
}
|
|
32
33
|
@media (min-width: 768px) {
|
|
34
|
+
:host(*:first-of-type) {
|
|
35
|
+
padding-left: var(--space-600);
|
|
36
|
+
}
|
|
37
|
+
:host(*:last-of-type) {
|
|
38
|
+
padding-right: var(--space-600);
|
|
39
|
+
}
|
|
33
40
|
:host(.card-slot:first-of-type) {
|
|
34
41
|
padding-left: var(--space-600);
|
|
35
42
|
}
|
|
@@ -40,17 +47,11 @@ class s extends HTMLElement {
|
|
|
40
47
|
|
|
41
48
|
:host([checkbox]) {
|
|
42
49
|
width: auto;
|
|
43
|
-
padding: 0;
|
|
44
50
|
text-align: center;
|
|
45
51
|
}
|
|
46
52
|
:host([action]) {
|
|
47
53
|
width: 4.4rem;
|
|
48
54
|
height: 4.4rem;
|
|
49
|
-
padding: 0;
|
|
50
|
-
padding-right: var(--space-300);
|
|
51
|
-
}
|
|
52
|
-
:host([heading]) {
|
|
53
|
-
font-weight: bold;
|
|
54
55
|
}
|
|
55
56
|
`
|
|
56
57
|
);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,40 +1,26 @@
|
|
|
1
|
-
import { PartTypes as
|
|
2
|
-
import "./components/mui-addon/index.js";
|
|
1
|
+
import { PartTypes as Tr, Parts as br, getPartMap as cr } from "./utils/part-map/index.js";
|
|
3
2
|
import "./components/mui-field/index.js";
|
|
3
|
+
import "./components/mui-file-upload/index.js";
|
|
4
|
+
import "./components/mui-addon/index.js";
|
|
4
5
|
import "./components/mui-input/index.js";
|
|
5
6
|
import "./components/mui-select/index.js";
|
|
6
7
|
import "./components/mui-switch/index.js";
|
|
7
|
-
import "./components/mui-file-upload/index.js";
|
|
8
|
-
import "./components/mui-card/header/index.js";
|
|
9
|
-
import "./components/mui-card/body/index.js";
|
|
10
|
-
import "./components/mui-list/item/index.js";
|
|
11
|
-
import "./components/mui-list/list/index.js";
|
|
12
|
-
import "./components/mui-quote/index.js";
|
|
13
|
-
import "./components/mui-alert/index.js";
|
|
14
|
-
import "./components/mui-message/index.js";
|
|
15
|
-
import "./components/mui-badge/index.js";
|
|
16
|
-
import "./components/mui-button/index.js";
|
|
17
|
-
import "./components/mui-button-group/index.js";
|
|
18
|
-
import "./components/mui-link/index.js";
|
|
19
|
-
import "./components/mui-grid/index.js";
|
|
20
|
-
import "./components/mui-stack/hstack/index.js";
|
|
21
|
-
import "./components/mui-stack/vstack/index.js";
|
|
22
|
-
import "./components/mui-container/index.js";
|
|
23
|
-
import "./components/mui-responsive/index.js";
|
|
24
|
-
import "./components/mui-rule/index.js";
|
|
25
8
|
import "./components/mui-table/table/index.js";
|
|
26
9
|
import "./components/mui-table/cell/index.js";
|
|
27
10
|
import "./components/mui-table/row/index.js";
|
|
28
11
|
import "./components/mui-table/row-group/index.js";
|
|
29
12
|
import "./components/mui-slat/index.js";
|
|
30
|
-
import "./components/mui-
|
|
31
|
-
import "./components/mui-
|
|
32
|
-
import "./components/mui-
|
|
33
|
-
import "./components/mui-
|
|
34
|
-
import "./components/mui-
|
|
13
|
+
import "./components/mui-accordion/group/index.js";
|
|
14
|
+
import "./components/mui-accordion/inline/index.js";
|
|
15
|
+
import "./components/mui-accordion/block/index.js";
|
|
16
|
+
import "./components/mui-heading/index.js";
|
|
17
|
+
import "./components/mui-body/index.js";
|
|
18
|
+
import "./components/mui-list/item/index.js";
|
|
19
|
+
import "./components/mui-list/list/index.js";
|
|
20
|
+
import "./components/mui-quote/index.js";
|
|
35
21
|
import "./components/mui-code/index.js";
|
|
36
|
-
import "./components/mui-
|
|
37
|
-
import "./components/mui-card/
|
|
22
|
+
import "./components/mui-image/index.js";
|
|
23
|
+
import "./components/mui-smart-card/index.js";
|
|
38
24
|
import "./components/mui-icons/accessibility/index.js";
|
|
39
25
|
import "./components/mui-icons/add/index.js";
|
|
40
26
|
import "./components/mui-icons/attention/index.js";
|
|
@@ -58,14 +44,30 @@ import "./components/mui-icons/toggle/index.js";
|
|
|
58
44
|
import "./components/mui-icons/up-arrow/index.js";
|
|
59
45
|
import "./components/mui-icons/up-chevron/index.js";
|
|
60
46
|
import "./components/mui-icons/warning/index.js";
|
|
61
|
-
import "./components/mui-
|
|
62
|
-
import "./components/mui-
|
|
63
|
-
import "./components/mui-
|
|
47
|
+
import "./components/mui-stack/hstack/index.js";
|
|
48
|
+
import "./components/mui-stack/vstack/index.js";
|
|
49
|
+
import "./components/mui-grid/index.js";
|
|
50
|
+
import "./components/mui-responsive/index.js";
|
|
51
|
+
import "./components/mui-container/index.js";
|
|
52
|
+
import "./components/mui-rule/index.js";
|
|
53
|
+
import "./components/mui-card/card/index.js";
|
|
54
|
+
import "./components/mui-card/header/index.js";
|
|
55
|
+
import "./components/mui-card/body/index.js";
|
|
56
|
+
import "./components/mui-card/footer/index.js";
|
|
57
|
+
import "./components/mui-alert/index.js";
|
|
58
|
+
import "./components/mui-message/index.js";
|
|
59
|
+
import "./components/mui-badge/index.js";
|
|
60
|
+
import "./components/mui-button/index.js";
|
|
61
|
+
import "./components/mui-button-group/index.js";
|
|
62
|
+
import "./components/mui-link/index.js";
|
|
63
|
+
import "./components/mui-tabs/controller/index.js";
|
|
64
|
+
import "./components/mui-tabs/item/index.js";
|
|
65
|
+
import "./components/mui-tabs/panel/index.js";
|
|
66
|
+
import "./components/mui-tabs/tab-bar/index.js";
|
|
64
67
|
import "./components/mui-carousel/controller/index.js";
|
|
65
68
|
import "./components/mui-carousel/panel/index.js";
|
|
66
|
-
import "./components/mui-smart-card/index.js";
|
|
67
69
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
Tr as PartTypes,
|
|
71
|
+
br as Parts,
|
|
72
|
+
cr as getPartMap
|
|
71
73
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
export * from "./utils/part-map";
|
|
2
|
-
export * from "./components/mui-addon";
|
|
3
2
|
export * from "./components/mui-field";
|
|
3
|
+
export * from "./components/mui-file-upload";
|
|
4
|
+
export * from "./components/mui-addon";
|
|
4
5
|
export * from "./components/mui-input";
|
|
5
6
|
export * from "./components/mui-select";
|
|
6
7
|
export * from "./components/mui-switch";
|
|
7
|
-
export * from "./components/mui-file-upload";
|
|
8
|
-
export * from "./components/mui-card/header";
|
|
9
|
-
export * from "./components/mui-card/body";
|
|
10
|
-
export * from "./components/mui-list/item";
|
|
11
|
-
export * from "./components/mui-list/list";
|
|
12
|
-
export * from "./components/mui-quote";
|
|
13
|
-
export * from "./components/mui-alert";
|
|
14
|
-
export * from "./components/mui-message";
|
|
15
|
-
export * from "./components/mui-badge";
|
|
16
|
-
export * from "./components/mui-button";
|
|
17
|
-
export * from "./components/mui-button-group";
|
|
18
|
-
export * from "./components/mui-link";
|
|
19
|
-
export * from "./components/mui-grid";
|
|
20
|
-
export * from "./components/mui-stack/hstack";
|
|
21
|
-
export * from "./components/mui-stack/vstack";
|
|
22
|
-
export * from "./components/mui-container";
|
|
23
|
-
export * from "./components/mui-responsive";
|
|
24
|
-
export * from "./components/mui-rule";
|
|
25
8
|
export * from "./components/mui-table/table";
|
|
26
9
|
export * from "./components/mui-table/cell";
|
|
27
10
|
export * from "./components/mui-table/row";
|
|
28
11
|
export * from "./components/mui-table/row-group";
|
|
29
12
|
export * from "./components/mui-slat";
|
|
30
|
-
export * from "./components/mui-
|
|
31
|
-
export * from "./components/mui-
|
|
32
|
-
export * from "./components/mui-
|
|
33
|
-
export * from "./components/mui-
|
|
34
|
-
export * from "./components/mui-
|
|
13
|
+
export * from "./components/mui-accordion/group";
|
|
14
|
+
export * from "./components/mui-accordion/inline";
|
|
15
|
+
export * from "./components/mui-accordion/block";
|
|
16
|
+
export * from "./components/mui-heading";
|
|
17
|
+
export * from "./components/mui-body";
|
|
18
|
+
export * from "./components/mui-list/item";
|
|
19
|
+
export * from "./components/mui-list/list";
|
|
20
|
+
export * from "./components/mui-quote";
|
|
35
21
|
export * from "./components/mui-code";
|
|
36
|
-
export * from "./components/mui-
|
|
37
|
-
export * from "./components/mui-card
|
|
38
|
-
export * from "./components/mui-card/body";
|
|
39
|
-
export * from "./components/mui-card/footer";
|
|
22
|
+
export * from "./components/mui-image";
|
|
23
|
+
export * from "./components/mui-smart-card";
|
|
40
24
|
export * from "./components/mui-icons/accessibility";
|
|
41
25
|
export * from "./components/mui-icons/add";
|
|
42
26
|
export * from "./components/mui-icons/attention";
|
|
@@ -60,9 +44,25 @@ export * from "./components/mui-icons/toggle";
|
|
|
60
44
|
export * from "./components/mui-icons/up-arrow";
|
|
61
45
|
export * from "./components/mui-icons/up-chevron";
|
|
62
46
|
export * from "./components/mui-icons/warning";
|
|
63
|
-
export * from "./components/mui-
|
|
64
|
-
export * from "./components/mui-
|
|
65
|
-
export * from "./components/mui-
|
|
47
|
+
export * from "./components/mui-stack/hstack";
|
|
48
|
+
export * from "./components/mui-stack/vstack";
|
|
49
|
+
export * from "./components/mui-grid";
|
|
50
|
+
export * from "./components/mui-responsive";
|
|
51
|
+
export * from "./components/mui-container";
|
|
52
|
+
export * from "./components/mui-rule";
|
|
53
|
+
export * from "./components/mui-card/card";
|
|
54
|
+
export * from "./components/mui-card/header";
|
|
55
|
+
export * from "./components/mui-card/body";
|
|
56
|
+
export * from "./components/mui-card/footer";
|
|
57
|
+
export * from "./components/mui-alert";
|
|
58
|
+
export * from "./components/mui-message";
|
|
59
|
+
export * from "./components/mui-badge";
|
|
60
|
+
export * from "./components/mui-button";
|
|
61
|
+
export * from "./components/mui-button-group";
|
|
62
|
+
export * from "./components/mui-link";
|
|
63
|
+
export * from "./components/mui-tabs/controller";
|
|
64
|
+
export * from "./components/mui-tabs/item";
|
|
65
|
+
export * from "./components/mui-tabs/panel";
|
|
66
|
+
export * from "./components/mui-tabs/tab-bar";
|
|
66
67
|
export * from "./components/mui-carousel/controller";
|
|
67
68
|
export * from "./components/mui-carousel/panel";
|
|
68
|
-
export * from "./components/mui-smart-card";
|