@muibook/components 19.4.0 → 19.5.1

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.
Files changed (69) hide show
  1. package/dist/esm/agent/prompts/index.js +3 -3
  2. package/dist/esm/components/mui-form-group/index.js +14 -34
  3. package/dist/esm/components/mui-grid/index.js +35 -15
  4. package/dist/esm/components/mui-stack/hstack/index.js +18 -14
  5. package/dist/esm/components/mui-stack/vstack/index.js +18 -14
  6. package/dist/esm/css/mui-brand.css +1 -1
  7. package/dist/esm/custom-elements.json +4115 -6068
  8. package/dist/esm/dynamic-attrs.json +6 -6
  9. package/dist/types/components/mui-accordion/api.d.ts +73 -0
  10. package/dist/types/components/mui-addon/api.d.ts +28 -0
  11. package/dist/types/components/mui-alert/api.d.ts +28 -0
  12. package/dist/types/components/mui-avatar/api.d.ts +28 -0
  13. package/dist/types/components/mui-badge/api.d.ts +28 -0
  14. package/dist/types/components/mui-body/api.d.ts +21 -0
  15. package/dist/types/components/mui-button/api.d.ts +24 -0
  16. package/dist/types/components/mui-button-group/api.d.ts +17 -0
  17. package/dist/types/components/mui-card/api.d.ts +50 -0
  18. package/dist/types/components/mui-carousel/api.d.ts +35 -0
  19. package/dist/types/components/mui-checkbox/api.d.ts +36 -0
  20. package/dist/types/components/mui-chip/api.d.ts +28 -0
  21. package/dist/types/components/mui-chip-input/api.d.ts +36 -0
  22. package/dist/types/components/mui-code/api.d.ts +21 -0
  23. package/dist/types/components/mui-container/api.d.ts +17 -0
  24. package/dist/types/components/mui-dialog/api.d.ts +46 -0
  25. package/dist/types/components/mui-drawer/api.d.ts +39 -0
  26. package/dist/types/components/mui-dropdown/api.d.ts +25 -0
  27. package/dist/types/components/mui-field/api.d.ts +24 -0
  28. package/dist/types/components/mui-file-upload/api.d.ts +16 -0
  29. package/dist/types/components/mui-form-group/api.d.ts +28 -0
  30. package/dist/types/components/mui-form-group/index.d.ts +0 -1
  31. package/dist/types/components/mui-form-message/api.d.ts +17 -0
  32. package/dist/types/components/mui-form-section/api.d.ts +24 -0
  33. package/dist/types/components/mui-form-section-footer/api.d.ts +13 -0
  34. package/dist/types/components/mui-grid/api.d.ts +28 -0
  35. package/dist/types/components/mui-heading/api.d.ts +28 -0
  36. package/dist/types/components/mui-hint/api.d.ts +21 -0
  37. package/dist/types/components/mui-icons/api.d.ts +28 -0
  38. package/dist/types/components/mui-illustrations/api.d.ts +17 -0
  39. package/dist/types/components/mui-image/api.d.ts +24 -0
  40. package/dist/types/components/mui-input/api.d.ts +32 -0
  41. package/dist/types/components/mui-link/api.d.ts +24 -0
  42. package/dist/types/components/mui-list/api.d.ts +32 -0
  43. package/dist/types/components/mui-loader/api.d.ts +17 -0
  44. package/dist/types/components/mui-media-player/api.d.ts +24 -0
  45. package/dist/types/components/mui-message/api.d.ts +28 -0
  46. package/dist/types/components/mui-progress/api.d.ts +24 -0
  47. package/dist/types/components/mui-prompt/api.d.ts +45 -0
  48. package/dist/types/components/mui-prompt-message/api.d.ts +17 -0
  49. package/dist/types/components/mui-prompt-preview/api.d.ts +36 -0
  50. package/dist/types/components/mui-prompt-toggle/api.d.ts +17 -0
  51. package/dist/types/components/mui-quote/api.d.ts +9 -0
  52. package/dist/types/components/mui-radio/api.d.ts +28 -0
  53. package/dist/types/components/mui-radio-group/api.d.ts +28 -0
  54. package/dist/types/components/mui-range-input/api.d.ts +29 -0
  55. package/dist/types/components/mui-responsive/api.d.ts +16 -0
  56. package/dist/types/components/mui-rule/api.d.ts +13 -0
  57. package/dist/types/components/mui-select/api.d.ts +24 -0
  58. package/dist/types/components/mui-skeleton/api.d.ts +28 -0
  59. package/dist/types/components/mui-slat/api.d.ts +42 -0
  60. package/dist/types/components/mui-slide-frame/api.d.ts +28 -0
  61. package/dist/types/components/mui-smart-card/api.d.ts +20 -0
  62. package/dist/types/components/mui-spinner/api.d.ts +13 -0
  63. package/dist/types/components/mui-stack/api.d.ts +54 -0
  64. package/dist/types/components/mui-stepper/api.d.ts +47 -0
  65. package/dist/types/components/mui-switch/api.d.ts +42 -0
  66. package/dist/types/components/mui-table/api.d.ts +65 -0
  67. package/dist/types/components/mui-tabs/api.d.ts +80 -0
  68. package/dist/types/components/mui-textarea/api.d.ts +24 -0
  69. package/package.json +1 -1
@@ -66,9 +66,9 @@ TEXT NODE RULES FOR MUISCAN:
66
66
  Available Components:
67
67
 
68
68
  LAYOUT:
69
- - VStack: space, alignX, alignY, style
70
- - HStack: space, alignX, alignY, style
71
- - Grid: col, space, alignX, alignY
69
+ - VStack: space, padding, alignX, alignY, height, width, fill, viewport, style
70
+ - HStack: space, padding, alignX, alignY, height, width, fill, viewport, style
71
+ - Grid: col, space, padding, alignX, alignY, height, width, fill, viewport, style
72
72
  - Container: size (small|medium|large), center, style
73
73
  - Responsive: breakpoint, breakpoint-low, breakpoint-high; slots showBelow/showMiddle/showAbove
74
74
  - Rule: length, weight, direction (horizontal|vertical)
@@ -1,29 +1,20 @@
1
1
  import "../mui-heading/index.js";
2
- import "../mui-body/index.js";
3
- class n extends HTMLElement {
4
- constructor() {
5
- super(), this.slotEl = null, this.updateChoiceGroupState = () => {
6
- var o;
7
- const t = ((o = this.slotEl) == null ? void 0 : o.assignedElements({ flatten: !0 })) || [], e = "mui-radio-group, mui-radio, mui-checkbox, mui-switch", i = t.some((r) => {
8
- var a;
9
- const s = r.tagName.toLowerCase();
10
- return s === "mui-radio-group" || s === "mui-radio" || s === "mui-checkbox" || s === "mui-switch" ? !0 : !!((a = r.querySelector) != null && a.call(r, e));
11
- });
12
- i !== this.hasAttribute("choice-group") && (this.toggleAttribute("choice-group", i), this.render(), this.bindSlotBehavior());
13
- }, this.attachShadow({ mode: "open" });
14
- }
2
+ class r extends HTMLElement {
15
3
  static get observedAttributes() {
16
- return ["heading", "heading-level", "heading-space", "hide-label", "variant", "space", "aligny"];
4
+ return ["heading", "heading-level", "heading-space", "hide-heading", "hide-label", "variant", "space", "aligny"];
5
+ }
6
+ constructor() {
7
+ super(), this.attachShadow({ mode: "open" });
17
8
  }
18
9
  connectedCallback() {
19
- this.render(), this.bindSlotBehavior(), this.updateChoiceGroupState();
10
+ this.render();
20
11
  }
21
12
  attributeChangedCallback() {
22
- this.render(), this.bindSlotBehavior(), this.updateChoiceGroupState();
13
+ this.render();
23
14
  }
24
15
  render() {
25
16
  if (!this.shadowRoot) return;
26
- const t = this.getAttribute("heading") || "", e = this.hasAttribute("hide-label"), i = this.hasAttribute("choice-group"), o = this.getHeadingLevel();
17
+ const e = this.getAttribute("heading") || "", t = this.hasAttribute("hide-heading") || this.hasAttribute("hide-label"), i = this.getHeadingLevel();
27
18
  this.syncLayoutAttributes(), this.shadowRoot.innerHTML = /*html*/
28
19
  `
29
20
  <style>
@@ -41,11 +32,6 @@ class n extends HTMLElement {
41
32
  margin: 0;
42
33
  margin-bottom: var(--form-group-heading-space);
43
34
  }
44
- .group-label {
45
- display: inline-flex;
46
- margin: 0;
47
- margin-bottom: var(--form-group-space);
48
- }
49
35
  .content {
50
36
  display: grid;
51
37
  gap: var(--form-group-space);
@@ -73,7 +59,7 @@ class n extends HTMLElement {
73
59
  </style>
74
60
 
75
61
  <div class="group">
76
- ${t && !e ? i ? `<mui-body class="group-label" size="small" weight="bold" variant="optional">${t}</mui-body>` : `<mui-heading class="group-heading" size="5" level="${o}">${t}</mui-heading>` : ""}
62
+ ${e && !t ? `<mui-heading class="group-heading" size="5" level="${i}">${e}</mui-heading>` : ""}
77
63
  <div class="content">
78
64
  <div class="content-inner">
79
65
  <slot></slot>
@@ -82,19 +68,13 @@ class n extends HTMLElement {
82
68
  </div>
83
69
  `;
84
70
  }
85
- bindSlotBehavior() {
86
- var e;
87
- if (!this.shadowRoot) return;
88
- const t = this.shadowRoot.querySelector("slot");
89
- t && this.slotEl !== t && ((e = this.slotEl) == null || e.removeEventListener("slotchange", this.updateChoiceGroupState), this.slotEl = t, this.slotEl.addEventListener("slotchange", this.updateChoiceGroupState));
90
- }
91
71
  syncLayoutAttributes() {
92
- const t = this.getAttribute("space"), e = this.getAttribute("aligny"), i = this.getAttribute("heading-space");
93
- t ? this.style.setProperty("--form-group-space", t) : this.style.removeProperty("--form-group-space"), e ? this.style.setProperty("--form-group-align-y", e) : this.style.removeProperty("--form-group-align-y"), i ? this.style.setProperty("--form-group-heading-space", i) : this.style.removeProperty("--form-group-heading-space");
72
+ const e = this.getAttribute("space"), t = this.getAttribute("aligny"), i = this.getAttribute("heading-space");
73
+ e ? this.style.setProperty("--form-group-space", e) : this.style.removeProperty("--form-group-space"), t ? this.style.setProperty("--form-group-align-y", t) : this.style.removeProperty("--form-group-align-y"), i ? this.style.setProperty("--form-group-heading-space", i) : this.style.removeProperty("--form-group-heading-space");
94
74
  }
95
75
  getHeadingLevel() {
96
- const t = this.getAttribute("heading-level") || "5";
97
- return ["1", "2", "3", "4", "5", "6"].includes(t) ? t : "5";
76
+ const e = this.getAttribute("heading-level") || "5";
77
+ return ["1", "2", "3", "4", "5", "6"].includes(e) ? e : "5";
98
78
  }
99
79
  }
100
- customElements.get("mui-form-group") || customElements.define("mui-form-group", n);
80
+ customElements.get("mui-form-group") || customElements.define("mui-form-group", r);
@@ -1,49 +1,69 @@
1
- import { getPartMap as e } from "../../utils/part-map/index.js";
2
- class l extends HTMLElement {
1
+ import { getPartMap as o } from "../../utils/part-map/index.js";
2
+ class h extends HTMLElement {
3
3
  static get observedAttributes() {
4
- return ["col", "space", "alignx", "aligny"];
4
+ return ["col", "space", "alignx", "aligny", "padding", "height", "width", "viewport", "fill"];
5
5
  }
6
6
  constructor() {
7
7
  super(), this.attachShadow({ mode: "open" }), this.col = "1fr 1fr", this.space = "var(--space-000)", this.alignX = "normal", this.alignY = "normal";
8
8
  }
9
9
  async connectedCallback() {
10
10
  await this.waitForPartMap();
11
- const t = this.getAttribute("col") || this.col, a = this.getAttribute("space") || this.space, i = this.getAttribute("alignx") || this.alignX, s = this.getAttribute("aligny") || this.alignY, o = e("layout", "spacing"), r = (
11
+ const t = this.getAttribute("col") || this.col, i = this.getAttribute("space") || this.space, s = this.getAttribute("alignx") || this.alignX, e = this.getAttribute("aligny") || this.alignY, r = o("layout", "spacing");
12
+ this.syncDimensions();
13
+ const a = (
12
14
  /*css*/
13
15
  `
14
16
  :host {
15
17
  display: block;
18
+ height: var(--grid-height, auto);
19
+ width: var(--grid-width, auto);
16
20
  }
17
21
  div {
18
22
  display: grid;
19
23
  grid-template-columns: var(--col);
20
24
  gap: var(--gap);
25
+ padding: var(--padding);
26
+ box-sizing: border-box;
21
27
  align-items: var(--alignY);
22
28
  justify-items: var(--alignX);
23
29
  }
30
+ :host([height]) div,
31
+ :host([viewport]) div,
32
+ :host([fill]) div {
33
+ height: 100%;
34
+ }
35
+ :host([width]) div,
36
+ :host([fill]) div {
37
+ width: 100%;
38
+ }
24
39
  `
25
40
  );
26
41
  this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
27
42
  `
28
- <style>${r}</style>
29
- <div part="${o}" style="--col: ${t}; --gap: ${a}; --alignX: ${i}; --alignY: ${s};">
43
+ <style>${a}</style>
44
+ <div part="${r}" style="--col: ${t}; --gap: ${i}; --padding: ${this.getAttribute("padding") || "var(--space-000)"}; --alignX: ${s}; --alignY: ${e};">
30
45
  <slot></slot>
31
46
  </div>
32
47
  `);
33
48
  }
34
- attributeChangedCallback(t, a, i) {
35
- if (a === i || !this.shadowRoot) return;
36
- const s = this.shadowRoot.querySelector("div");
37
- s && (t === "col" && s.style.setProperty("--col", i || this.col), t === "space" && s.style.setProperty("--gap", i || this.space), t === "alignx" && s.style.setProperty("--alignX", i || this.alignX), t === "aligny" && s.style.setProperty("--alignY", i || this.alignY));
49
+ attributeChangedCallback(t, i, s) {
50
+ if (i === s || !this.shadowRoot) return;
51
+ (t === "height" || t === "width" || t === "viewport" || t === "fill") && this.syncDimensions();
52
+ const e = this.shadowRoot.querySelector("div");
53
+ e && (t === "col" && e.style.setProperty("--col", s || this.col), t === "space" && e.style.setProperty("--gap", s || this.space), t === "padding" && e.style.setProperty("--padding", s || "var(--space-000)"), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY));
54
+ }
55
+ syncDimensions() {
56
+ const t = this.getAttribute("height") || (this.hasAttribute("viewport") ? "100dvh" : this.hasAttribute("fill") ? "100%" : "auto"), i = this.getAttribute("width") || (this.hasAttribute("fill") ? "100%" : "auto");
57
+ this.style.setProperty("--grid-height", t), this.style.setProperty("--grid-width", i);
38
58
  }
39
59
  waitForPartMap() {
40
60
  return new Promise((t) => {
41
- if (typeof e == "function") return t();
42
- const a = () => {
43
- typeof e == "function" ? t() : requestAnimationFrame(a);
61
+ if (typeof o == "function") return t();
62
+ const i = () => {
63
+ typeof o == "function" ? t() : requestAnimationFrame(i);
44
64
  };
45
- a();
65
+ i();
46
66
  });
47
67
  }
48
68
  }
49
- customElements.get("mui-grid") || customElements.define("mui-grid", l);
69
+ customElements.get("mui-grid") || customElements.define("mui-grid", h);
@@ -1,7 +1,7 @@
1
1
  import { getPartMap as a } from "../../../utils/part-map/index.js";
2
2
  class h extends HTMLElement {
3
3
  static get observedAttributes() {
4
- return ["space", "aligny", "alignx", "height", "width", "viewport", "fill"];
4
+ return ["space", "aligny", "alignx", "padding", "height", "width", "viewport", "fill"];
5
5
  }
6
6
  constructor() {
7
7
  super(), this.attachShadow({ mode: "open" }), this.space = "var(--space-500)", this.alignY = "flex-start", this.alignX = "flex-start", this.styles = /*css*/
@@ -11,22 +11,25 @@ class h extends HTMLElement {
11
11
  height: var(--stack-height, auto);
12
12
  width: var(--stack-width, auto);
13
13
  }
14
- :host([fill]) {
15
- --stack-height: 100%;
16
- --stack-width: 100%;
17
- }
18
- :host([viewport]) {
19
- --stack-height: 100dvh;
20
- }
21
14
  slot {
22
15
  display: flex;
23
16
  box-sizing: border-box;
24
- height: 100%;
25
- width: 100%;
17
+ height: auto;
18
+ width: auto;
26
19
  gap: var(--space);
20
+ padding: var(--padding);
27
21
  align-items: var(--alignY);
28
22
  justify-content: var(--alignX);
29
23
  }
24
+ :host([height]) slot,
25
+ :host([viewport]) slot,
26
+ :host([fill]) slot {
27
+ height: 100%;
28
+ }
29
+ :host([width]) slot,
30
+ :host([fill]) slot {
31
+ width: 100%;
32
+ }
30
33
  `;
31
34
  }
32
35
  async connectedCallback() {
@@ -40,6 +43,7 @@ class h extends HTMLElement {
40
43
  part="${t}"
41
44
  style="
42
45
  --space: ${this.getAttribute("space") || this.space};
46
+ --padding: ${this.getAttribute("padding") || "var(--space-000)"};
43
47
  --alignY: ${this.getAttribute("aligny") || this.alignY};
44
48
  --alignX: ${this.getAttribute("alignx") || this.alignX};
45
49
  ">
@@ -47,13 +51,13 @@ class h extends HTMLElement {
47
51
  `;
48
52
  }
49
53
  attributeChangedCallback(t, i, s) {
50
- if (i === s || ((t === "height" || t === "width") && this.syncDimensions(), !this.shadowRoot)) return;
54
+ if (i === s || ((t === "height" || t === "width" || t === "viewport" || t === "fill") && this.syncDimensions(), !this.shadowRoot)) return;
51
55
  const e = this.shadowRoot.querySelector("slot");
52
- e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX));
56
+ e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "padding" && e.style.setProperty("--padding", s || "var(--space-000)"), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX));
53
57
  }
54
58
  syncDimensions() {
55
- const t = this.getAttribute("height"), i = this.getAttribute("width");
56
- t ? this.style.setProperty("--stack-height", t) : this.style.removeProperty("--stack-height"), i ? this.style.setProperty("--stack-width", i) : this.style.removeProperty("--stack-width");
59
+ const t = this.getAttribute("height") || (this.hasAttribute("viewport") ? "100dvh" : this.hasAttribute("fill") ? "100%" : "auto"), i = this.getAttribute("width") || (this.hasAttribute("fill") ? "100%" : "auto");
60
+ this.style.setProperty("--stack-height", t), this.style.setProperty("--stack-width", i);
57
61
  }
58
62
  waitForPartMap() {
59
63
  return new Promise((t) => {
@@ -1,7 +1,7 @@
1
1
  import { getPartMap as a } from "../../../utils/part-map/index.js";
2
2
  class h extends HTMLElement {
3
3
  static get observedAttributes() {
4
- return ["space", "alignx", "aligny", "height", "width", "viewport", "fill"];
4
+ return ["space", "alignx", "aligny", "padding", "height", "width", "viewport", "fill"];
5
5
  }
6
6
  constructor() {
7
7
  super(), this.attachShadow({ mode: "open" }), this.space = "var(--space-500)", this.alignX = "normal", this.alignY = "normal", this.styles = /*css*/
@@ -11,22 +11,25 @@ class h extends HTMLElement {
11
11
  height: var(--stack-height, auto);
12
12
  width: var(--stack-width, auto);
13
13
  }
14
- :host([fill]) {
15
- --stack-height: 100%;
16
- --stack-width: 100%;
17
- }
18
- :host([viewport]) {
19
- --stack-height: 100dvh;
20
- }
21
14
  slot {
22
15
  display: grid;
23
16
  box-sizing: border-box;
24
- height: 100%;
25
- width: 100%;
17
+ height: auto;
18
+ width: auto;
26
19
  gap: var(--space);
20
+ padding: var(--padding);
27
21
  justify-items: var(--alignX);
28
22
  align-items: var(--alignY);
29
23
  }
24
+ :host([height]) slot,
25
+ :host([viewport]) slot,
26
+ :host([fill]) slot {
27
+ height: 100%;
28
+ }
29
+ :host([width]) slot,
30
+ :host([fill]) slot {
31
+ width: 100%;
32
+ }
30
33
  `;
31
34
  }
32
35
  async connectedCallback() {
@@ -40,6 +43,7 @@ class h extends HTMLElement {
40
43
  part="${t}"
41
44
  style="
42
45
  --space: ${this.getAttribute("space") || this.space};
46
+ --padding: ${this.getAttribute("padding") || "var(--space-000)"};
43
47
  --alignX: ${this.getAttribute("alignx") || this.alignX};
44
48
  --alignY: ${this.getAttribute("aligny") || this.alignY};
45
49
  ">
@@ -47,13 +51,13 @@ class h extends HTMLElement {
47
51
  `;
48
52
  }
49
53
  attributeChangedCallback(t, i, s) {
50
- if (i === s || ((t === "height" || t === "width") && this.syncDimensions(), !this.shadowRoot)) return;
54
+ if (i === s || ((t === "height" || t === "width" || t === "viewport" || t === "fill") && this.syncDimensions(), !this.shadowRoot)) return;
51
55
  const e = this.shadowRoot.querySelector("slot");
52
- e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY));
56
+ e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "padding" && e.style.setProperty("--padding", s || "var(--space-000)"), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY));
53
57
  }
54
58
  syncDimensions() {
55
- const t = this.getAttribute("height"), i = this.getAttribute("width");
56
- t ? this.style.setProperty("--stack-height", t) : this.style.removeProperty("--stack-height"), i ? this.style.setProperty("--stack-width", i) : this.style.removeProperty("--stack-width");
59
+ const t = this.getAttribute("height") || (this.hasAttribute("viewport") ? "100dvh" : this.hasAttribute("fill") ? "100%" : "auto"), i = this.getAttribute("width") || (this.hasAttribute("fill") ? "100%" : "auto");
60
+ this.style.setProperty("--stack-height", t), this.style.setProperty("--stack-width", i);
57
61
  }
58
62
  waitForPartMap() {
59
63
  return new Promise((t) => {
@@ -1,6 +1,6 @@
1
1
 
2
2
  /* ================================================================================================== */
3
- /* Don't edit directly • Generated on Mon, 25 May 2026 10:00:49 GMT • muibook.com */
3
+ /* Don't edit directly • Generated on Tue, 26 May 2026 10:59:50 GMT • muibook.com */
4
4
  /* ================================================================================================== */
5
5
 
6
6
  /* ================================================================================================== */