@muibook/components 19.6.0 → 20.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/README.md +1 -1
- package/dist/esm/agent/keywords/index.js +32 -1
- package/dist/esm/agent/prompts/index.js +10 -8
- package/dist/esm/components/mui-addon/index.js +14 -14
- package/dist/esm/components/mui-avatar/index.js +4 -1
- package/dist/esm/components/mui-badge/index.js +35 -18
- package/dist/esm/components/mui-button/index.js +187 -52
- package/dist/esm/components/mui-card/body/index.js +1 -1
- package/dist/esm/components/mui-chip/index.js +56 -26
- package/dist/esm/components/mui-chip-rail/index.js +239 -0
- package/dist/esm/components/mui-code/index.js +5 -5
- package/dist/esm/components/mui-dropdown/index.js +55 -46
- package/dist/esm/components/mui-file-upload/index.js +1 -0
- package/dist/esm/components/mui-heading/index.js +3 -2
- package/dist/esm/components/mui-input/index.js +21 -17
- package/dist/esm/components/mui-link/index.js +199 -55
- package/dist/esm/components/mui-message/index.js +7 -6
- package/dist/esm/components/mui-prompt/index.js +102 -102
- package/dist/esm/components/mui-select/index.js +4 -4
- package/dist/esm/components/mui-stack/hstack/index.js +10 -5
- package/dist/esm/components/mui-status/index.js +239 -0
- package/dist/esm/components/mui-stepper/step/index.js +46 -32
- package/dist/esm/components/mui-switch/index.js +21 -13
- package/dist/esm/components/mui-tabs/controller/index.js +17 -6
- package/dist/esm/components/mui-tabs/item/index.js +17 -5
- package/dist/esm/components/mui-tabs/tab-bar/index.js +93 -39
- package/dist/esm/components/mui-video-thumbnail/index.js +205 -0
- package/dist/esm/css/mui-brand.css +1 -1
- package/dist/esm/css/mui-tokens.css +267 -77
- package/dist/esm/custom-elements.json +2212 -1538
- package/dist/esm/dynamic-attrs.json +26 -6
- package/dist/esm/index.js +7 -4
- package/dist/types/components/mui-button/api.d.ts +4 -0
- package/dist/types/components/mui-chip/api.d.ts +4 -0
- package/dist/types/components/mui-chip-rail/api.d.ts +21 -0
- package/dist/types/components/mui-chip-rail/doc.d.ts +2 -0
- package/dist/types/components/mui-chip-rail/index.d.ts +3 -0
- package/dist/types/components/mui-link/api.d.ts +4 -0
- package/dist/types/components/mui-status/api.d.ts +24 -0
- package/dist/types/components/mui-status/doc.d.ts +2 -0
- package/dist/types/components/mui-status/index.d.ts +1 -0
- package/dist/types/components/mui-video-thumbnail/api.d.ts +28 -0
- package/dist/types/components/mui-video-thumbnail/doc.d.ts +2 -0
- package/dist/types/components/mui-video-thumbnail/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Learn more at [Muibook.com](https://muibook.com/#/create-mui-app)
|
|
|
61
61
|
|
|
62
62
|
# Muibook Repository
|
|
63
63
|
|
|
64
|
-
Muibook is the home of the
|
|
64
|
+
Muibook is the home of the MichaelUI Design System — native Web Components with clean, composable patterns that help you write less code.
|
|
65
65
|
|
|
66
66
|
- 📖 Comprehensive guides: From basic usage to advanced customization
|
|
67
67
|
- 🎨 Design principles: Learn the MichaelUI design language
|
|
@@ -57,7 +57,38 @@ const e = {
|
|
|
57
57
|
avatar: ["avatar", "profile", "user", "initials", "image", "icon", "person"],
|
|
58
58
|
image: ["image", "photo", "picture", "figure", "caption", "img"],
|
|
59
59
|
skeleton: ["skeleton", "loading", "placeholder", "shimmer", "pulse", "line", "rect", "circle"],
|
|
60
|
-
badge: [
|
|
60
|
+
badge: [
|
|
61
|
+
"badge",
|
|
62
|
+
"count",
|
|
63
|
+
"label",
|
|
64
|
+
"tag",
|
|
65
|
+
"metadata",
|
|
66
|
+
"notification",
|
|
67
|
+
"overlay",
|
|
68
|
+
"paid",
|
|
69
|
+
"busy",
|
|
70
|
+
"offline",
|
|
71
|
+
"beta",
|
|
72
|
+
"default",
|
|
73
|
+
"shared",
|
|
74
|
+
"positive",
|
|
75
|
+
"warning",
|
|
76
|
+
"error"
|
|
77
|
+
],
|
|
78
|
+
status: [
|
|
79
|
+
"status",
|
|
80
|
+
"state",
|
|
81
|
+
"workflow state",
|
|
82
|
+
"record status",
|
|
83
|
+
"object status",
|
|
84
|
+
"active",
|
|
85
|
+
"draft",
|
|
86
|
+
"pending",
|
|
87
|
+
"review",
|
|
88
|
+
"blocked",
|
|
89
|
+
"synced",
|
|
90
|
+
"queued"
|
|
91
|
+
],
|
|
61
92
|
// ACCORDION
|
|
62
93
|
accordion: [
|
|
63
94
|
"accordion",
|
|
@@ -59,6 +59,7 @@ TEXT NODE RULES FOR MUISCAN:
|
|
|
59
59
|
- keep inline children such as Link nested inside the same Span
|
|
60
60
|
- Exceptions:
|
|
61
61
|
- mui-badge: consume TEXT as the badge's direct rendered text; preserve before/after slot children; do not invent Body
|
|
62
|
+
- mui-status: consume TEXT as the status's direct rendered text; preserve before/after icon slot children; do not invent Body, Badge, or Message inside Status
|
|
62
63
|
- mui-chip: consume TEXT as the chip's direct rendered text; preserve before/after slot children; do not invent Body
|
|
63
64
|
- mui-alert: preserve variant/label, convert default content to Span, consume TEXT into Span.props.text, keep inline children such as Link, do not invent Body
|
|
64
65
|
- mui-message: map scanned heading directly to Message.props.heading, preserve variant/icon/size, keep remaining children as default message content; if there is no supporting body content, prefer Body or FormMessage instead of Message
|
|
@@ -86,8 +87,8 @@ SURFACES:
|
|
|
86
87
|
- SmartCard: state, number, variant, partner, type, logo, logo-height, bg-color, bg-image, inverted
|
|
87
88
|
|
|
88
89
|
CONTENT:
|
|
89
|
-
- Heading: text, size (1|2|3|4|5|6), level (1|2|3|4|5|6)
|
|
90
|
-
- Body: text, size (x-small|small|medium|large), weight (regular|bold), variant (default|optional|success|warning|error), style; use _Icon icon=mui-icon-info slot=before for lightweight inline guidance
|
|
90
|
+
- Heading: text, size (1|2|3|4|5|6), level (1|2|3|4|5|6), truncate, clamp
|
|
91
|
+
- Body: text, size (x-small|small|medium|large), weight (regular|bold), variant (default|optional|info|success|warning|error), truncate, clamp, style; use _Icon icon=mui-icon-info slot=before for lightweight inline guidance
|
|
91
92
|
- Span: text, style; supports inline children such as Link
|
|
92
93
|
- Code: size, scrollable
|
|
93
94
|
- Quote: default text
|
|
@@ -96,7 +97,8 @@ CONTENT:
|
|
|
96
97
|
- List: slot default
|
|
97
98
|
- ListItem: text, variant, size (x-small|small|medium|large), weight (regular|bold)
|
|
98
99
|
- _Icon: icon, size (xx-small|x-small|small|medium|large), color, slot
|
|
99
|
-
- Badge: text, variant (default|positive|warning|error|overlay)
|
|
100
|
+
- Badge: text, variant (default|positive|warning|error|overlay), color (grey|purple|violet|pink|magenta|red|orange|amber|yellow|lime|green|teal|cyan|blue|indigo|CSS background value). Use for compact non-interactive presentational metadata, counts, and lightweight state-like labels such as Offline, Online, Busy, Do not disturb, Beta, Default, IMG, or Shared when the surrounding UI already explains the object. Good inside cards, messages, chips, buttons, tabs, navigation, and hero or marketing surfaces. Use color to override the badge background only through theme-aware badge background tokens; do not use positive, warning, or attention just to get a different background colour.
|
|
101
|
+
- Status: text, variant (info|positive|warning|attention), color (grey|purple|violet|pink|magenta|red|orange|amber|yellow|lime|green|teal|cyan|blue|indigo), size (small|medium); slots before/after. Use for compact object or workflow state labels such as Active, Draft, Pending, Review, Blocked, or Synced when the value is the primary state of a record, workflow, or system, especially in tables, slats, dashboards, and data-heavy pages. Status is non-interactive by default, but can be interactive when composed as a trigger or compact state action. Omit variant for default low-emphasis grey status; use variant for semantic feedback and color for non-semantic categorical labels. Use action only when the status is a trigger. Do not use for counts, helper text, paragraph guidance, page-level notices, or decorative metadata.
|
|
100
102
|
- Skeleton: loading, shape (line|rect|circle), size, animation (shimmer|pulse|none), lines, width, height, radius, gap, duration, line-widths, max-width, style
|
|
101
103
|
|
|
102
104
|
ACCORDION:
|
|
@@ -109,7 +111,7 @@ FORMS AND INPUTS:
|
|
|
109
111
|
- FormSectionFooter: slot, style
|
|
110
112
|
- FormGroup: heading, variant (vertical|horizontal), hide-label, style
|
|
111
113
|
- Field: label, variant (default|success|warning|error), message, hide-label, size (x-small|small|medium|large), optional, style
|
|
112
|
-
- FormMessage: text, size (x-small|small|medium|large), weight (regular|bold), variant (default|optional|success|warning|error), style
|
|
114
|
+
- FormMessage: text, size (x-small|small|medium|large), weight (regular|bold), variant (default|optional|info|success|warning|error), style
|
|
113
115
|
- Input: label, type (text|email|password|number|tel|url), placeholder, value, id, name, disabled, hide-label, variant (default|error), size (x-small|small|medium|large), optional, max-length; slots before/after
|
|
114
116
|
- Textarea: label, placeholder, value, name, id, variant (default|success|warning|error), size (x-small|small|medium|large), rows, optional, hide-label, max-length, disabled, style
|
|
115
117
|
- Select: label, placeholder, options, value, id, name, disabled, variant (default|error), size (x-small|small|medium|large)
|
|
@@ -123,14 +125,14 @@ FORMS AND INPUTS:
|
|
|
123
125
|
- Addon: text, size (x-small|small|medium|large), slot (before|after), style
|
|
124
126
|
|
|
125
127
|
ACTIONS:
|
|
126
|
-
- Button: text, variant (primary|secondary|tertiary|overlay|attention), size (small|medium|large), disabled, aria-label; slots default/before/after
|
|
128
|
+
- Button: text, variant (primary|secondary|tertiary|overlay|attention), size (xx-small|x-small|small|medium|large), stroke (border|ring), stroke-ring-size (100|200|300|400|500), disabled, aria-label; slots default/before/after
|
|
127
129
|
- ButtonGroup: slot default, right, style
|
|
128
|
-
- Link: text, href, variant (primary|secondary|tertiary|overlay|attention), size (x-small|small|medium|large), target, download, weight (regular|bold), disabled; slots default/before/after
|
|
130
|
+
- Link: text, href, variant (primary|secondary|tertiary|overlay|attention), size (xx-small|x-small|small|medium|large), stroke (border|ring), stroke-ring-size (100|200|300|400|500), target, download, weight (regular|bold), disabled; slots default/before/after
|
|
129
131
|
- Dropdown: zindex, position, persistent; slots action/default
|
|
130
|
-
- Chip: text, active, dismiss, usage; slots default/before/after
|
|
132
|
+
- Chip: text, active, dismiss, usage; slots default/before/after. Chip labels truncate when constrained; keep text short and let icons/dismiss controls remain visible.
|
|
131
133
|
|
|
132
134
|
NAVIGATION:
|
|
133
|
-
- TabBar: speed, controlsPosition; slots default/controls
|
|
135
|
+
- TabBar: speed, controlsPosition, stroke (border|none), active-inset, radius; slots default/controls
|
|
134
136
|
- TabItem: text, icon, active, id
|
|
135
137
|
- TabController: slot default
|
|
136
138
|
- TabPanel: item
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class a extends HTMLElement {
|
|
2
2
|
static get observedAttributes() {
|
|
3
3
|
return ["slot", "size"];
|
|
4
4
|
}
|
|
@@ -16,8 +16,8 @@ class s extends HTMLElement {
|
|
|
16
16
|
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
17
17
|
if (!t) return;
|
|
18
18
|
const i = this.getAttribute("size") || "medium";
|
|
19
|
-
t.assignedElements({ flatten: !0 }).forEach((
|
|
20
|
-
|
|
19
|
+
t.assignedElements({ flatten: !0 }).forEach((s) => {
|
|
20
|
+
s.tagName.toLowerCase() === "mui-body" && s.setAttribute("size", i);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
@@ -30,32 +30,32 @@ class s extends HTMLElement {
|
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
box-sizing: border-box;
|
|
33
|
-
min-height:
|
|
33
|
+
min-height: var(--action-size-medium);
|
|
34
34
|
padding: var(--space-200) var(--space-400);
|
|
35
35
|
background: var(--addon-background);
|
|
36
36
|
border: var(--border-thin);
|
|
37
37
|
border-color: var(--form-default-border-color);
|
|
38
|
-
min-width:
|
|
38
|
+
min-width: var(--action-size-medium);
|
|
39
39
|
white-space: nowrap;
|
|
40
40
|
}
|
|
41
41
|
:host([size="x-small"]) {
|
|
42
|
-
min-height: var(--action-
|
|
43
|
-
min-width: var(--action-
|
|
42
|
+
min-height: var(--action-size-x-small);
|
|
43
|
+
min-width: var(--action-size-x-small);
|
|
44
44
|
padding: var(--action-padding-x-small);
|
|
45
45
|
}
|
|
46
46
|
:host([size="small"]) {
|
|
47
|
-
min-height: var(--action-
|
|
48
|
-
min-width: var(--action-
|
|
47
|
+
min-height: var(--action-size-small);
|
|
48
|
+
min-width: var(--action-size-small);
|
|
49
49
|
padding: var(--action-padding-small);
|
|
50
50
|
}
|
|
51
51
|
:host([size="medium"]) {
|
|
52
|
-
min-height:
|
|
53
|
-
min-width:
|
|
52
|
+
min-height: var(--action-size-medium);
|
|
53
|
+
min-width: var(--action-size-medium);
|
|
54
54
|
padding: var(--space-200) var(--space-400);
|
|
55
55
|
}
|
|
56
56
|
:host([size="large"]) {
|
|
57
|
-
min-height: var(--action-
|
|
58
|
-
min-width: var(--action-
|
|
57
|
+
min-height: var(--action-size-large);
|
|
58
|
+
min-width: var(--action-size-large);
|
|
59
59
|
padding: var(--space-300) var(--space-500);
|
|
60
60
|
}
|
|
61
61
|
:host([slot="before"]) {
|
|
@@ -75,4 +75,4 @@ class s extends HTMLElement {
|
|
|
75
75
|
t == null || t.addEventListener("slotchange", () => this.syncSlottedContent());
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
customElements.get("mui-addon") || customElements.define("mui-addon",
|
|
78
|
+
customElements.get("mui-addon") || customElements.define("mui-addon", a);
|
|
@@ -87,7 +87,7 @@ class w extends HTMLElement {
|
|
|
87
87
|
font-weight: var(--font-weight-bold);
|
|
88
88
|
letter-spacing: -0.05rem;
|
|
89
89
|
font-size: ${k};
|
|
90
|
-
color: var(--text-color);
|
|
90
|
+
color: var(--avatar-text-color, var(--text-color));
|
|
91
91
|
background: ${p};
|
|
92
92
|
overflow: hidden;
|
|
93
93
|
align-items: center;
|
|
@@ -119,6 +119,9 @@ class w extends HTMLElement {
|
|
|
119
119
|
width: 100%;
|
|
120
120
|
height: 100%;
|
|
121
121
|
}
|
|
122
|
+
::slotted([class*="mui-icon"]) {
|
|
123
|
+
fill: var(--avatar-icon-color, currentColor);
|
|
124
|
+
}
|
|
122
125
|
`
|
|
123
126
|
);
|
|
124
127
|
if (this.shadowRoot.innerHTML = `
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
class
|
|
1
|
+
class m extends HTMLElement {
|
|
2
2
|
constructor() {
|
|
3
3
|
super(), this.attachShadow({ mode: "open" });
|
|
4
4
|
}
|
|
5
5
|
static get observedAttributes() {
|
|
6
|
-
return ["variant", "size"];
|
|
6
|
+
return ["variant", "size", "color"];
|
|
7
7
|
}
|
|
8
8
|
connectedCallback() {
|
|
9
9
|
this.hasAttribute("variant") || this.setAttribute("variant", "neutral"), this.hasAttribute("size") || this.setAttribute("size", "medium"), this.setAttribute("role", "status"), this.render();
|
|
@@ -12,31 +12,48 @@ class b extends HTMLElement {
|
|
|
12
12
|
this.render();
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
|
|
15
|
+
var o;
|
|
16
|
+
const e = this.getAttribute("variant") || "neutral", s = this.getAttribute("size") || "medium", r = (o = this.getAttribute("color")) == null ? void 0 : o.trim(), g = {
|
|
16
17
|
neutral: "var(--badge-background-neutral)",
|
|
17
18
|
positive: "var(--badge-background-positive)",
|
|
18
19
|
warning: "var(--badge-background-warning)",
|
|
19
20
|
attention: "var(--badge-background-attention)",
|
|
20
21
|
overlay: "var(--badge-background-overlay)"
|
|
21
|
-
},
|
|
22
|
+
}, n = {
|
|
23
|
+
grey: "var(--badge-background-grey)",
|
|
24
|
+
purple: "var(--badge-background-purple)",
|
|
25
|
+
violet: "var(--badge-background-violet)",
|
|
26
|
+
pink: "var(--badge-background-pink)",
|
|
27
|
+
magenta: "var(--badge-background-magenta)",
|
|
28
|
+
red: "var(--badge-background-red)",
|
|
29
|
+
orange: "var(--badge-background-orange)",
|
|
30
|
+
amber: "var(--badge-background-amber)",
|
|
31
|
+
yellow: "var(--badge-background-yellow)",
|
|
32
|
+
lime: "var(--badge-background-lime)",
|
|
33
|
+
green: "var(--badge-background-green)",
|
|
34
|
+
teal: "var(--badge-background-teal)",
|
|
35
|
+
cyan: "var(--badge-background-cyan)",
|
|
36
|
+
blue: "var(--badge-background-blue)",
|
|
37
|
+
indigo: "var(--badge-background-indigo)"
|
|
38
|
+
}, d = {
|
|
22
39
|
neutral: "var(--badge-text-color)",
|
|
23
40
|
positive: "var(--badge-text-color)",
|
|
24
41
|
warning: "var(--badge-text-color)",
|
|
25
42
|
attention: "var(--badge-text-color)",
|
|
26
43
|
overlay: "var(--badge-text-color-overlay)"
|
|
27
|
-
},
|
|
44
|
+
}, b = {
|
|
28
45
|
neutral: "none",
|
|
29
46
|
positive: "none",
|
|
30
47
|
warning: "none",
|
|
31
48
|
attention: "none",
|
|
32
49
|
overlay: "var(--badge-border-overlay)"
|
|
33
|
-
},
|
|
50
|
+
}, l = {
|
|
34
51
|
neutral: "off",
|
|
35
52
|
positive: "polite",
|
|
36
53
|
warning: "assertive",
|
|
37
54
|
attention: "assertive",
|
|
38
55
|
overlay: "off"
|
|
39
|
-
},
|
|
56
|
+
}, t = r, c = t && n[t] ? n[t] : r || "var(--badge-background, " + g[e] + ")", v = d[e], u = b[e], h = l[e], i = {
|
|
40
57
|
"xx-small": {
|
|
41
58
|
fontSize: "var(--font-size-15)",
|
|
42
59
|
lineHeight: "1",
|
|
@@ -65,7 +82,7 @@ class b extends HTMLElement {
|
|
|
65
82
|
lineHeight: "1",
|
|
66
83
|
padding: "var(--space-100) var(--space-300)"
|
|
67
84
|
}
|
|
68
|
-
},
|
|
85
|
+
}, a = i[s] || i.medium, p = (
|
|
69
86
|
/*css*/
|
|
70
87
|
`
|
|
71
88
|
:host {
|
|
@@ -77,14 +94,14 @@ class b extends HTMLElement {
|
|
|
77
94
|
display: inline-flex;
|
|
78
95
|
align-items: center;
|
|
79
96
|
border-radius: var(--badge-radius);
|
|
80
|
-
background: ${
|
|
81
|
-
border: ${
|
|
82
|
-
font-size: ${
|
|
83
|
-
line-height: ${
|
|
97
|
+
background: ${c};
|
|
98
|
+
border: ${u};
|
|
99
|
+
font-size: ${a.fontSize};
|
|
100
|
+
line-height: ${a.lineHeight};
|
|
84
101
|
font-weight: var(--badge-font-weight);
|
|
85
|
-
color: ${
|
|
86
|
-
padding: ${
|
|
87
|
-
min-height: ${
|
|
102
|
+
color: ${v};
|
|
103
|
+
padding: ${a.padding};
|
|
104
|
+
min-height: ${a.minHeight || "auto"};
|
|
88
105
|
}
|
|
89
106
|
|
|
90
107
|
:host([usage="slat-end"]) {
|
|
@@ -92,13 +109,13 @@ class b extends HTMLElement {
|
|
|
92
109
|
}
|
|
93
110
|
`
|
|
94
111
|
);
|
|
95
|
-
this.setAttribute("role", "status"), this.setAttribute("aria-live",
|
|
112
|
+
this.setAttribute("role", "status"), this.setAttribute("aria-live", h), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
|
|
96
113
|
`
|
|
97
|
-
<style>${
|
|
114
|
+
<style>${p}</style>
|
|
98
115
|
<span class="badge">
|
|
99
116
|
<slot></slot>
|
|
100
117
|
</span>
|
|
101
118
|
`);
|
|
102
119
|
}
|
|
103
120
|
}
|
|
104
|
-
customElements.get("mui-badge") || customElements.define("mui-badge",
|
|
121
|
+
customElements.get("mui-badge") || customElements.define("mui-badge", m);
|