@muibook/components 6.1.1 → 7.1.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.
Files changed (39) hide show
  1. package/dist/esm/agent/prompts/index.js +116 -662
  2. package/dist/esm/components/mui-alert/index.js +1 -1
  3. package/dist/esm/components/mui-button/index.js +299 -125
  4. package/dist/esm/components/mui-drawer/index.js +21 -7
  5. package/dist/esm/components/mui-icons/accessibility/index.js +3 -3
  6. package/dist/esm/components/mui-icons/add/index.js +3 -3
  7. package/dist/esm/components/mui-icons/attention/index.js +3 -3
  8. package/dist/esm/components/mui-icons/calendar/index.js +3 -3
  9. package/dist/esm/components/mui-icons/check/index.js +3 -3
  10. package/dist/esm/components/mui-icons/close/index.js +3 -3
  11. package/dist/esm/components/mui-icons/down-arrow-circle/index.js +3 -3
  12. package/dist/esm/components/mui-icons/down-chevron/index.js +3 -3
  13. package/dist/esm/components/mui-icons/ellipsis/index.js +3 -3
  14. package/dist/esm/components/mui-icons/gear/index.js +3 -3
  15. package/dist/esm/components/mui-icons/globe/index.js +3 -3
  16. package/dist/esm/components/mui-icons/grid/index.js +3 -3
  17. package/dist/esm/components/mui-icons/info/index.js +3 -3
  18. package/dist/esm/components/mui-icons/left-arrow/index.js +3 -3
  19. package/dist/esm/components/mui-icons/left-chevron/index.js +3 -3
  20. package/dist/esm/components/mui-icons/left-sidebar/index.js +3 -3
  21. package/dist/esm/components/mui-icons/menu/index.js +3 -3
  22. package/dist/esm/components/mui-icons/message/index.js +3 -3
  23. package/dist/esm/components/mui-icons/moon/index.js +3 -3
  24. package/dist/esm/components/mui-icons/notification/index.js +3 -3
  25. package/dist/esm/components/mui-icons/right-chevron/index.js +3 -3
  26. package/dist/esm/components/mui-icons/stop/index.js +3 -3
  27. package/dist/esm/components/mui-icons/subtract/index.js +3 -3
  28. package/dist/esm/components/mui-icons/sun/index.js +3 -3
  29. package/dist/esm/components/mui-icons/toggle/index.js +14 -14
  30. package/dist/esm/components/mui-icons/translate/index.js +3 -3
  31. package/dist/esm/components/mui-icons/up-arrow/index.js +3 -3
  32. package/dist/esm/components/mui-icons/up-chevron/index.js +3 -3
  33. package/dist/esm/components/mui-icons/warning/index.js +3 -3
  34. package/dist/esm/components/mui-input/index.js +51 -28
  35. package/dist/esm/components/mui-link/index.js +279 -40
  36. package/dist/esm/components/mui-message/index.js +6 -6
  37. package/dist/esm/css/mui-tokens.css +31 -9
  38. package/dist/types/agent/prompts/index.d.ts +7 -2
  39. package/package.json +1 -1
@@ -17,9 +17,9 @@ class c extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", o = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = o[e] ?? o.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class c extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, i = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class n extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, o = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class o extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[l] || l || "var(--icon-color-default)", e = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = e[c] ?? e.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class a extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", c = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, i = c[e] ?? c.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, o = i[c] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class c extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, o = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class n extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, o = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[e] || e || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, i = s[t] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class n extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class n extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", o = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = o[e] ?? o.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", o = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = o[e] ?? o.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class c extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, i = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, o = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, i = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -7,18 +7,18 @@ class r extends HTMLElement {
7
7
  }
8
8
  connectedCallback() {
9
9
  this.classList.add("mui-icon"), this.shadowRoot.innerHTML || this.render(), this.attributeChangedCallback("size", null, this.getAttribute("size"));
10
- const t = this.shadowRoot.querySelector('slot[name="start"]'), s = this.shadowRoot.querySelector('slot[name="end"]');
11
- t.addEventListener("slotchange", () => this.applySize()), s.addEventListener("slotchange", () => this.applySize());
10
+ const t = this.shadowRoot.querySelector('slot[name="start"]'), e = this.shadowRoot.querySelector('slot[name="end"]');
11
+ t.addEventListener("slotchange", () => this.applySize()), e.addEventListener("slotchange", () => this.applySize());
12
12
  }
13
- attributeChangedCallback(t, s, o) {
13
+ attributeChangedCallback(t, e, o) {
14
14
  if (t === "size") {
15
- const e = this.getAttribute("size") || "small", l = {
15
+ const s = this.getAttribute("size") || "medium", i = {
16
16
  "x-small": "1.6rem",
17
- small: "2.4rem",
18
- medium: "3.6rem",
19
- large: "4.8rem"
20
- }, i = l[e] ?? l.small;
21
- this.style.setProperty("--icon-toggle-size", i), this.applySize();
17
+ small: "2.1rem",
18
+ medium: "2.4rem",
19
+ large: "2.8rem"
20
+ }, l = i[s] ?? i.medium;
21
+ this.style.setProperty("--icon-toggle-size", l), this.applySize();
22
22
  }
23
23
  }
24
24
  get toggle() {
@@ -37,10 +37,10 @@ class r extends HTMLElement {
37
37
  /* PRIVATE: force size="small" on all assigned elements */
38
38
  /* ------------------------------------------------------------------ */
39
39
  applySize() {
40
- const t = this.getAttribute("size") || "small";
40
+ const t = this.getAttribute("size") || "medium";
41
41
  this.shadowRoot.querySelectorAll("slot").forEach((o) => {
42
- o.assignedElements({ flatten: !0 }).forEach((e) => {
43
- (!e.hasAttribute("size") || e.getAttribute("size") === "small") && e.setAttribute("size", t);
42
+ o.assignedElements({ flatten: !0 }).forEach((s) => {
43
+ s.setAttribute("size", t);
44
44
  });
45
45
  });
46
46
  }
@@ -51,8 +51,8 @@ class r extends HTMLElement {
51
51
  :host {
52
52
  display: inline-flex;
53
53
  position: relative;
54
- height: var(--icon-toggle-size, 2.4rem);
55
- width: var(--icon-toggle-size, 2.4rem);
54
+ height: var(--icon-toggle-size);
55
+ width: var(--icon-toggle-size);
56
56
  }
57
57
 
58
58
  ::slotted(*) {
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", e = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, a = e[c] ?? e.small, s = "M31.727 14.897c2.36 0 4.273 1.888 4.273 4.217v8.771l-.006.219c-.111 2.155-1.863 3.883-4.047 3.993l-.22.007-4.19-.001c-1.416 1.214-3.194 2.634-4.596 3.462-.246.145-.67.374-1.138.422-1.328.133-2.067-.772-2.067-1.937v-1.953h-.787c-2.257-.113-4.052-1.956-4.053-4.212v-8.77c0-2.33 1.914-4.218 4.273-4.218zm-6.279 4.158c-1.032 0-1.692.527-2.054 1.647l-1.747 5.163c-.253.747.044 1.802 1.186 1.802.68 0 1.088-.385 1.264-1.164l.197-.571h2.361l.197.571c.176.78.584 1.164 1.276 1.164 1.142 0 1.427-1.066 1.186-1.802l-1.758-5.163c-.352-1.097-1.043-1.647-2.108-1.647m.746 4.977h-1.438l.692-2.692h.055zM19.056.006c2.523.127 4.53 2.186 4.53 4.707v8.942h-2.98V4.714c0-.92-.767-1.733-1.796-1.733H4.775c-1.028 0-1.795.812-1.796 1.733v9.803l.008.166c.082.812.756 1.5 1.657 1.562h.764a2.98 2.98 0 0 1 2.98 2.98v.724c1.18-.81 2.57-1.924 3.802-2.98l.208-.163a3 3 0 0 1 1.73-.554h.038a4.64 4.64 0 0 0-.51 2.117v1.263c-1.493 1.258-3.25 2.634-4.665 3.469l-.241.135c-.274.143-.638.297-1.03.337l-.272.014c-1.313.007-2.04-.959-2.04-2.18v-2.181H4.53l-.235-.019c-2.334-.23-4.173-2.119-4.29-4.455L0 14.517V4.713C0 2.11 2.138.001 4.775 0H18.81zm-3.45 7.436c.593 0 1.031.406 1.032.955 0 .56-.45.988-1.032.988h-.737a7.4 7.4 0 0 1-1.494 2.746 7.9 7.9 0 0 0 2.373.957c.637.121.956.626.791 1.252-.143.549-.725.813-1.428.66a9 9 0 0 1-3.208-1.473 9.2 9.2 0 0 1-3.361 1.482c-.604.165-1.165-.13-1.32-.679a1.03 1.03 0 0 1 .804-1.242c.945-.241 1.724-.561 2.372-.957a8.2 8.2 0 0 1-1.493-2.746H8.17c-.582 0-1.033-.428-1.033-.988 0-.55.44-.955 1.033-.955zm-4.625 1.943c.22.527.538 1.044.922 1.505.384-.472.682-.978.89-1.505zm-.374-5.24c.495-.263 1.077-.054 1.352.506l.516 1.076c.241.505.043 1.088-.506 1.363-.494.219-1.065 0-1.318-.527l-.505-1.067a.99.99 0 0 1 .461-1.351", o = "M31.727 14.897c2.36 0 4.273 1.888 4.273 4.217v8.771l-.006.218c-.111 2.156-1.863 3.884-4.047 3.994l-.22.007-4.19-.001c-1.416 1.214-3.194 2.634-4.596 3.462-.246.145-.67.375-1.138.422-1.328.134-2.067-.773-2.067-1.937v-1.953h-.787c-2.257-.114-4.052-1.956-4.053-4.212v-8.77c0-2.33 1.913-4.218 4.273-4.218zm-9.84 5.891c-.592 0-1.032.407-1.032.956 0 .56.45.989 1.033.989h.736a8.2 8.2 0 0 0 1.493 2.746c-.648.395-1.428.715-2.372.956a1.03 1.03 0 0 0-.803 1.242c.154.549.715.844 1.32.68a9.2 9.2 0 0 0 3.36-1.483 9 9 0 0 0 3.209 1.472c.703.154 1.285-.11 1.428-.659.164-.626-.155-1.13-.792-1.252a7.9 7.9 0 0 1-2.372-.956 7.4 7.4 0 0 0 1.493-2.746h.737c.582 0 1.032-.43 1.032-.99 0-.548-.439-.954-1.032-.955zm4.626 1.945a5.7 5.7 0 0 1-.89 1.504 6 6 0 0 1-.923-1.504zM19.056.006c2.523.127 4.53 2.186 4.53 4.707v8.942h-2.98V4.713c0-.92-.767-1.733-1.796-1.733H4.775c-1.028 0-1.795.813-1.795 1.733v9.803l.007.166c.082.812.756 1.5 1.656 1.563h.765a2.98 2.98 0 0 1 2.98 2.98v.722c1.18-.809 2.57-1.922 3.802-2.979l.208-.163a2.98 2.98 0 0 1 1.731-.554h.037a4.64 4.64 0 0 0-.51 2.118v1.262c-1.494 1.258-3.25 2.634-4.665 3.47l-.24.134c-.275.143-.639.297-1.031.337l-.272.014c-1.314.007-2.04-.959-2.04-2.18v-2.181H4.53l-.235-.019c-2.334-.23-4.173-2.119-4.29-4.455L0 14.517V4.713C0 2.11 2.138 0 4.775 0H18.81zm6.621 17.992c-.274-.56-.857-.77-1.351-.506a.99.99 0 0 0-.46 1.352l.505 1.066c.252.526.823.746 1.317.527.55-.275.748-.857.506-1.363zM11.831 5.338c1.065 0 1.756.55 2.108 1.647l1.758 5.163c.241.736-.044 1.801-1.186 1.802-.692 0-1.1-.384-1.275-1.164l-.198-.57h-2.361l-.198.57c-.176.78-.583 1.164-1.263 1.164-1.143 0-1.44-1.055-1.187-1.802l1.747-5.163c.362-1.12 1.022-1.647 2.055-1.647m-.693 4.976h1.44l-.693-2.691h-.054z";
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class l extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class r extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -17,9 +17,9 @@ class n extends HTMLElement {
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", o = {
19
19
  "x-small": "1.6rem",
20
- small: "2.4rem",
21
- medium: "3.6rem",
22
- large: "4.8rem"
20
+ small: "2.1rem",
21
+ medium: "2.4rem",
22
+ large: "2.8rem"
23
23
  }, s = o[e] ?? o.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
@@ -8,18 +8,18 @@ class m extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render(), this.setupListener();
10
10
  }
11
- attributeChangedCallback(e, s, r) {
12
- var o;
13
- const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("input");
14
- t && (e === "value" && (t.value = r ?? ""), e === "disabled" && (r === null || r === "false" ? t.removeAttribute("disabled") : t.setAttribute("disabled", "")), (e === "type" || e === "placeholder" || e === "label" || e === "hide-label") && (this.render(), this.setupListener()));
11
+ attributeChangedCallback(e, s, o) {
12
+ var r;
13
+ const t = (r = this.shadowRoot) == null ? void 0 : r.querySelector("input");
14
+ t && (e === "value" && (t.value = o ?? ""), e === "disabled" && (o === null || o === "false" ? t.removeAttribute("disabled") : t.setAttribute("disabled", "")), (e === "type" || e === "placeholder" || e === "label" || e === "hide-label") && (this.render(), this.setupListener()));
15
15
  }
16
16
  setupListener() {
17
- var r, t;
18
- const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector("input");
17
+ var o, t;
18
+ const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector("input");
19
19
  if (!e) return;
20
20
  const s = e.cloneNode(!0);
21
- (t = e.parentNode) == null || t.replaceChild(s, e), s.addEventListener("input", (o) => {
22
- const a = o.target;
21
+ (t = e.parentNode) == null || t.replaceChild(s, e), s.addEventListener("input", (r) => {
22
+ const a = r.target;
23
23
  this.dispatchEvent(
24
24
  new CustomEvent("input", {
25
25
  detail: { value: a.value },
@@ -27,8 +27,8 @@ class m extends HTMLElement {
27
27
  composed: !0
28
28
  })
29
29
  );
30
- }), s.addEventListener("change", (o) => {
31
- const a = o.target;
30
+ }), s.addEventListener("change", (r) => {
31
+ const a = r.target;
32
32
  this.dispatchEvent(
33
33
  new CustomEvent("change", {
34
34
  detail: { value: a.value },
@@ -38,8 +38,23 @@ class m extends HTMLElement {
38
38
  );
39
39
  });
40
40
  }
41
+ updateSlottedButtons() {
42
+ requestAnimationFrame(() => {
43
+ var t, r;
44
+ const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector('slot[name="before"]'), s = (r = this.shadowRoot) == null ? void 0 : r.querySelector('slot[name="after"]'), o = (a) => {
45
+ if (!a) return;
46
+ a.assignedNodes({ flatten: !0 }).forEach((l) => {
47
+ if (l.nodeType === Node.ELEMENT_NODE) {
48
+ const i = l, n = i.tagName.toLowerCase();
49
+ (n === "mui-button" || n === "mui-link") && (i.setAttribute("usage", "input"), i.setAttribute("size", "medium"), i.removeAttribute("variant"), i.removeAttribute("weight"));
50
+ }
51
+ });
52
+ };
53
+ o(e), o(s);
54
+ });
55
+ }
41
56
  render() {
42
- const e = ["text", "password", "email", "number", "search", "tel", "url", "date", "time"], s = this.getAttribute("type") || "text", r = e.includes(s) ? s : "text", t = this.getAttribute("name") || "", o = this.getAttribute("value") || "", a = this.getAttribute("placeholder") || "", l = this.getAttribute("id") || `mui-input-${Math.random().toString(36).substr(2, 9)}`, i = this.getAttribute("label") || "", n = this.hasAttribute("hide-label"), c = this.hasAttribute("disabled"), u = n && i ? `aria-label="${i}"` : "", d = this.getAttribute("variant") || "", b = d || "", h = this.querySelector('[slot="before"]') !== null, p = this.querySelector('[slot="after"]') !== null, v = [b, h ? "before" : "", p ? "after" : ""].filter(Boolean).join(" "), f = (
57
+ const e = ["text", "password", "email", "number", "search", "tel", "url", "date", "time"], s = this.getAttribute("type") || "text", o = e.includes(s) ? s : "text", t = this.getAttribute("name") || "", r = this.getAttribute("value") || "", a = this.getAttribute("placeholder") || "", d = this.getAttribute("id") || `mui-input-${Math.random().toString(36).substr(2, 9)}`, l = this.getAttribute("label") || "", i = this.hasAttribute("hide-label"), n = this.hasAttribute("disabled"), c = i && l ? `aria-label="${l}"` : "", u = this.getAttribute("variant") || "", b = u || "", h = this.querySelector('[slot="before"]') !== null, p = this.querySelector('[slot="after"]') !== null, f = [b, h ? "before" : "", p ? "after" : ""].filter(Boolean).join(" "), v = (
43
58
  /*html*/
44
59
  `
45
60
  <style>
@@ -163,39 +178,47 @@ class m extends HTMLElement {
163
178
  /* is focusable will be addressed. */
164
179
  /* ========================================================================== */
165
180
 
166
- slot[name="before"]::slotted(*:focus),
167
- input:focus,
168
- slot[name="after"]::slotted(*:focus) { z-index: 1; }
181
+ slot[name="before"]::slotted(*:focus),
182
+ input:focus,
183
+ slot[name="after"]::slotted(*:focus),
184
+ slot[name="before"]::slotted(*:hover),
185
+ input:hover,
186
+ slot[name="after"]::slotted(*:hover) { z-index: 1; }
187
+
188
+ /* Ensure feedback styles appear above SELECT and focusable Items */
189
+ input.success,
190
+ input.warning,
191
+ input.error {
192
+ z-index: 1;
193
+ }
194
+
169
195
 
170
- /* Ensure feedback styles appear above SELECT and focusable Items */
171
- input.success,
172
- input.warning,
173
- input.error {
174
- z-index: 1;
175
- }
196
+ /* Slotted items */
197
+ slot[name="before"]::slotted(*),
198
+ slot[name="after"]::slotted(*) { flex: none; }
176
199
 
177
200
  /* ========================================================================== */
178
201
 
179
202
 
180
203
  </style>
181
- ${i ? `<label for="${l}" class="${n ? "vh" : ""}">${i}</label>` : ""}
204
+ ${l ? `<label for="${d}" class="${i ? "vh" : ""}">${l}</label>` : ""}
182
205
  <div class="input-wrapper">
183
206
  <slot name="before"></slot>
184
207
  <input
185
- class="${v}"
186
- type="${r}"
208
+ class="${f}"
209
+ type="${o}"
187
210
  name="${t}"
188
- id="${l}"
189
- value="${o}"
211
+ id="${d}"
212
+ value="${r}"
190
213
  placeholder="${a}"
191
- ${c ? 'disabled aria-disabled="true"' : ""}
192
- ${u}
214
+ ${n ? 'disabled aria-disabled="true"' : ""}
215
+ ${c}
193
216
  />
194
217
  <slot name="after"></slot>
195
218
  </div>
196
219
  `
197
220
  );
198
- this.shadowRoot && (this.shadowRoot.innerHTML = f);
221
+ this.shadowRoot && (this.shadowRoot.innerHTML = v, this.updateSlottedButtons());
199
222
  }
200
223
  }
201
224
  customElements.get("mui-input") || customElements.define("mui-input", m);