@muibook/components 2.0.0 → 3.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.
Files changed (94) hide show
  1. package/dist/esm/agent/keywords/index.js +104 -4
  2. package/dist/esm/agent/prompts/index.js +392 -37
  3. package/dist/esm/components/mui-accordion/block/index.js +2 -6
  4. package/dist/esm/components/mui-accordion/group/index.js +1 -1
  5. package/dist/esm/components/mui-accordion/inline/index.js +2 -6
  6. package/dist/esm/components/mui-addon/index.js +1 -1
  7. package/dist/esm/components/mui-alert/index.js +10 -5
  8. package/dist/esm/components/mui-badge/index.js +4 -4
  9. package/dist/esm/components/mui-body/index.js +4 -4
  10. package/dist/esm/components/mui-button/index.js +5 -7
  11. package/dist/esm/components/mui-button-group/index.js +1 -1
  12. package/dist/esm/components/mui-card/body/index.js +22 -18
  13. package/dist/esm/components/mui-card/card/index.js +1 -1
  14. package/dist/esm/components/mui-card/footer/index.js +1 -1
  15. package/dist/esm/components/mui-card/header/index.js +1 -1
  16. package/dist/esm/components/mui-carousel/controller/index.js +1 -1
  17. package/dist/esm/components/mui-carousel/panel/index.js +2 -2
  18. package/dist/esm/components/mui-code/index.js +9 -6
  19. package/dist/esm/components/mui-container/index.js +1 -1
  20. package/dist/esm/components/mui-field/index.js +10 -7
  21. package/dist/esm/components/mui-file-upload/index.js +5 -4
  22. package/dist/esm/components/mui-grid/index.js +1 -1
  23. package/dist/esm/components/mui-heading/index.js +1 -1
  24. package/dist/esm/components/mui-icons/accessibility/index.js +4 -4
  25. package/dist/esm/components/mui-icons/add/index.js +5 -5
  26. package/dist/esm/components/mui-icons/attention/index.js +5 -5
  27. package/dist/esm/components/mui-icons/check/index.js +6 -6
  28. package/dist/esm/components/mui-icons/close/index.js +2 -2
  29. package/dist/esm/components/mui-icons/down-arrow-circle/index.js +55 -0
  30. package/dist/esm/components/mui-icons/down-chevron/index.js +2 -2
  31. package/dist/esm/components/mui-icons/ellipsis/index.js +55 -0
  32. package/dist/esm/components/mui-icons/globe/index.js +5 -5
  33. package/dist/esm/components/mui-icons/grid/index.js +1 -1
  34. package/dist/esm/components/mui-icons/index.js +2 -0
  35. package/dist/esm/components/mui-icons/info/index.js +2 -2
  36. package/dist/esm/components/mui-icons/left-arrow/index.js +1 -1
  37. package/dist/esm/components/mui-icons/left-chevron/index.js +1 -1
  38. package/dist/esm/components/mui-icons/left-sidebar/index.js +6 -6
  39. package/dist/esm/components/mui-icons/menu/index.js +6 -6
  40. package/dist/esm/components/mui-icons/message/index.js +6 -6
  41. package/dist/esm/components/mui-icons/moon/index.js +2 -2
  42. package/dist/esm/components/mui-icons/notification/index.js +2 -2
  43. package/dist/esm/components/mui-icons/right-chevron/index.js +5 -5
  44. package/dist/esm/components/mui-icons/stop/index.js +2 -2
  45. package/dist/esm/components/mui-icons/subtract/index.js +7 -7
  46. package/dist/esm/components/mui-icons/sun/index.js +6 -6
  47. package/dist/esm/components/mui-icons/toggle/index.js +1 -1
  48. package/dist/esm/components/mui-icons/up-arrow/index.js +4 -4
  49. package/dist/esm/components/mui-icons/up-chevron/index.js +1 -1
  50. package/dist/esm/components/mui-icons/warning/index.js +2 -2
  51. package/dist/esm/components/mui-image/index.js +1 -1
  52. package/dist/esm/components/mui-input/index.js +21 -27
  53. package/dist/esm/components/mui-link/index.js +13 -17
  54. package/dist/esm/components/mui-list/item/index.js +1 -1
  55. package/dist/esm/components/mui-list/list/index.js +1 -1
  56. package/dist/esm/components/mui-message/index.js +14 -9
  57. package/dist/esm/components/mui-quote/index.js +1 -1
  58. package/dist/esm/components/mui-responsive/index.js +1 -1
  59. package/dist/esm/components/mui-rule/index.js +5 -5
  60. package/dist/esm/components/mui-select/index.js +28 -27
  61. package/dist/esm/components/mui-slat/accessory/index.js +29 -0
  62. package/dist/esm/components/mui-slat/index.js +2 -21
  63. package/dist/esm/components/mui-slat/slat/index.js +139 -0
  64. package/dist/esm/components/mui-smart-card/index.js +14 -15
  65. package/dist/esm/components/mui-stack/hstack/index.js +1 -1
  66. package/dist/esm/components/mui-stack/vstack/index.js +1 -1
  67. package/dist/esm/components/mui-switch/index.js +3 -9
  68. package/dist/esm/components/mui-table/cell/index.js +1 -1
  69. package/dist/esm/components/mui-table/row/index.js +1 -1
  70. package/dist/esm/components/mui-table/row-group/index.js +1 -1
  71. package/dist/esm/components/mui-table/table/index.js +1 -1
  72. package/dist/esm/components/mui-tabs/controller/index.js +1 -1
  73. package/dist/esm/components/mui-tabs/item/index.js +2 -2
  74. package/dist/esm/components/mui-tabs/panel/index.js +1 -1
  75. package/dist/esm/components/mui-tabs/tab-bar/index.js +1 -1
  76. package/dist/esm/css/mui-tokens.css +19 -1
  77. package/dist/esm/index.js +8 -5
  78. package/dist/types/components/mui-accordion/block/index.d.ts +1 -1
  79. package/dist/types/components/mui-accordion/inline/index.d.ts +1 -1
  80. package/dist/types/components/mui-alert/index.d.ts +5 -1
  81. package/dist/types/components/mui-field/index.d.ts +3 -1
  82. package/dist/types/components/mui-file-upload/index.d.ts +1 -1
  83. package/dist/types/components/mui-icons/down-arrow-circle.d.ts +1 -0
  84. package/dist/types/components/mui-icons/ellipsis.d.ts +1 -0
  85. package/dist/types/components/mui-icons/index.d.ts +2 -0
  86. package/dist/types/components/mui-message/index.d.ts +6 -1
  87. package/dist/types/components/mui-select/index.d.ts +1 -1
  88. package/dist/types/components/mui-slat/accessory/index.d.ts +1 -0
  89. package/dist/types/components/mui-slat/index.d.ts +2 -1
  90. package/dist/types/components/mui-slat/slat/index.d.ts +3 -0
  91. package/dist/types/components/mui-smart-card/index.d.ts +2 -1
  92. package/dist/types/index.d.ts +4 -1
  93. package/package.json +17 -1
  94. package/readme.md +19 -0
@@ -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, 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.4rem",
21
+ medium: "3.6rem",
22
+ large: "4.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
47
+ d="M6.916 21.5c-1.987 0-3.615-1.559-3.615-3.493S4.929 14.5 6.916 14.5c2.002 0 3.63 1.573 3.63 3.507S8.919 21.5 6.917 21.5m11.385 0c-2.002 0-3.616-1.559-3.616-3.493S16.3 14.5 18.301 14.5s3.63 1.573 3.63 3.507-1.628 3.493-3.63 3.493m11.384 0c-2.002 0-3.63-1.559-3.63-3.493s1.628-3.507 3.63-3.507c1.987 0 3.616 1.573 3.616 3.507S31.672 21.5 29.685 21.5"
48
+ ></path>
49
+ </svg>
50
+
51
+
52
+ `);
53
+ }
54
+ }
55
+ customElements.get("mui-icon-ellipsis") || customElements.define("mui-icon-ellipsis", r);
@@ -8,19 +8,19 @@ class a extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render();
10
10
  }
11
- attributeChangedCallback(e, t, c) {
12
- (e === "size" || e === "color") && t !== c && this.render();
11
+ attributeChangedCallback(e, t, o) {
12
+ (e === "size" || e === "color") && t !== o && this.render();
13
13
  }
14
14
  render() {
15
15
  const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), s = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
- }[t] || t || "var(--icon-color-default)", o = {
18
+ }[t] || t || "var(--icon-color-default)", c = {
19
19
  "x-small": "1.6rem",
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, i = o[e] ?? o.small;
23
+ }, i = c[e] ?? c.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
@@ -52,4 +52,4 @@ class a extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-globe", a);
55
+ customElements.get("mui-icon-globe") || customElements.define("mui-icon-globe", a);
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-grid", r);
55
+ customElements.get("mui-icon-grid") || customElements.define("mui-icon-grid", r);
@@ -22,3 +22,5 @@ import "./toggle/index.js";
22
22
  import "./up-arrow/index.js";
23
23
  import "./up-chevron/index.js";
24
24
  import "./warning/index.js";
25
+ import "./down-arrow-circle/index.js";
26
+ import "./ellipsis/index.js";
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class c extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-info", r);
55
+ customElements.get("mui-icon-info") || customElements.define("mui-icon-info", c);
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-left-arrow", r);
55
+ customElements.get("mui-icon-left-arrow") || customElements.define("mui-icon-left-arrow", r);
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-left-chevron", r);
55
+ customElements.get("mui-icon-left-chevron") || customElements.define("mui-icon-left-chevron", r);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class l extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -15,18 +15,18 @@ class r extends HTMLElement {
15
15
  const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), c = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
- }[t] || t || "var(--icon-color-default)", o = {
18
+ }[t] || t || "var(--icon-color-default)", s = {
19
19
  "x-small": "1.6rem",
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, s = o[e] ?? o.small;
23
+ }, o = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
27
27
  :host {
28
- width: ${s};
29
- height: ${s};
28
+ width: ${o};
29
+ height: ${o};
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-left-sidebar", r);
55
+ customElements.get("mui-icon-left-sidebar") || customElements.define("mui-icon-left-sidebar", l);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class n extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -15,18 +15,18 @@ class r extends HTMLElement {
15
15
  const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), l = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
- }[t] || t || "var(--icon-color-default)", o = {
18
+ }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, i = o[e] ?? o.small;
23
+ }, o = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
27
27
  :host {
28
- width: ${i};
29
- height: ${i};
28
+ width: ${o};
29
+ height: ${o};
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-menu", r);
55
+ customElements.get("mui-icon-menu") || customElements.define("mui-icon-menu", n);
@@ -12,7 +12,7 @@ class l extends HTMLElement {
12
12
  (t === "size" || t === "color") && e !== c && this.render();
13
13
  }
14
14
  render() {
15
- const t = this.getAttribute("size") || "small", e = this.getAttribute("color"), i = e && {
15
+ const t = this.getAttribute("size") || "small", e = this.getAttribute("color"), o = e && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[e] || e || "var(--icon-color-default)", s = {
@@ -20,17 +20,17 @@ class l extends HTMLElement {
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, o = s[t] ?? s.small;
23
+ }, i = s[t] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
27
27
  :host {
28
- width: ${o};
29
- height: ${o};
28
+ width: ${i};
29
+ height: ${i};
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- fill: ${i};
33
+ fill: ${o};
34
34
  }
35
35
  svg {
36
36
  width: 100%;
@@ -52,4 +52,4 @@ class l extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-message", l);
55
+ customElements.get("mui-icon-message") || customElements.define("mui-icon-message", l);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class n extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-moon", r);
55
+ customElements.get("mui-icon-moon") || customElements.define("mui-icon-moon", n);
@@ -1,4 +1,4 @@
1
- class l extends HTMLElement {
1
+ class n extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -52,4 +52,4 @@ class l extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-notification", l);
55
+ customElements.get("mui-icon-notification") || customElements.define("mui-icon-notification", n);
@@ -8,19 +8,19 @@ class l extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render();
10
10
  }
11
- attributeChangedCallback(e, t, o) {
12
- (e === "size" || e === "color") && t !== o && this.render();
11
+ attributeChangedCallback(e, t, i) {
12
+ (e === "size" || e === "color") && t !== i && this.render();
13
13
  }
14
14
  render() {
15
15
  const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), r = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
- }[t] || t || "var(--icon-color-default)", i = {
18
+ }[t] || t || "var(--icon-color-default)", o = {
19
19
  "x-small": "1.6rem",
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, s = i[e] ?? i.small;
23
+ }, s = o[e] ?? o.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
@@ -52,4 +52,4 @@ class l extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-right-chevron", l);
55
+ customElements.get("mui-icon-right-chevron") || customElements.define("mui-icon-right-chevron", l);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class c extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-stop", r);
55
+ customElements.get("mui-icon-stop") || customElements.define("mui-icon-stop", c);
@@ -8,25 +8,25 @@ class l extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render();
10
10
  }
11
- attributeChangedCallback(e, t, o) {
12
- (e === "size" || e === "color") && t !== o && this.render();
11
+ attributeChangedCallback(e, t, s) {
12
+ (e === "size" || e === "color") && t !== s && this.render();
13
13
  }
14
14
  render() {
15
15
  const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), r = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
- }[t] || t || "var(--icon-color-default)", s = {
18
+ }[t] || t || "var(--icon-color-default)", i = {
19
19
  "x-small": "1.6rem",
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, i = s[e] ?? s.small;
23
+ }, o = i[e] ?? i.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
27
27
  :host {
28
- width: ${i};
29
- height: ${i};
28
+ width: ${o};
29
+ height: ${o};
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
@@ -52,4 +52,4 @@ class l extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-subtract", l);
55
+ customElements.get("mui-icon-subtract") || customElements.define("mui-icon-subtract", l);
@@ -12,7 +12,7 @@ class l extends HTMLElement {
12
12
  (e === "size" || e === "color") && t !== c && this.render();
13
13
  }
14
14
  render() {
15
- const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), i = t && {
15
+ const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), o = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
@@ -20,17 +20,17 @@ class l extends HTMLElement {
20
20
  small: "2.4rem",
21
21
  medium: "3.6rem",
22
22
  large: "4.8rem"
23
- }, o = s[e] ?? s.small;
23
+ }, i = s[e] ?? s.small;
24
24
  this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
25
  `
26
26
  <style>
27
27
  :host {
28
- width: ${o};
29
- height: ${o};
28
+ width: ${i};
29
+ height: ${i};
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- fill: ${i};
33
+ fill: ${o};
34
34
  }
35
35
  svg {
36
36
  width: 100%;
@@ -52,4 +52,4 @@ class l extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-sun", l);
55
+ customElements.get("mui-icon-sun") || customElements.define("mui-icon-sun", l);
@@ -78,4 +78,4 @@ class o extends HTMLElement {
78
78
  `;
79
79
  }
80
80
  }
81
- customElements.define("mui-icon-toggle", o);
81
+ customElements.get("mui-icon-toggle") || customElements.define("mui-icon-toggle", o);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class l extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -12,7 +12,7 @@ class r extends HTMLElement {
12
12
  (e === "size" || e === "color") && t !== o && this.render();
13
13
  }
14
14
  render() {
15
- const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), l = t && {
15
+ const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), r = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", i = {
@@ -30,7 +30,7 @@ class r extends HTMLElement {
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- fill: ${l};
33
+ fill: ${r};
34
34
  }
35
35
  svg {
36
36
  width: 100%;
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-up-arrow", r);
55
+ customElements.get("mui-icon-up-arrow") || customElements.define("mui-icon-up-arrow", l);
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-up-chevron", r);
55
+ customElements.get("mui-icon-up-chevron") || customElements.define("mui-icon-up-chevron", r);
@@ -1,4 +1,4 @@
1
- class r extends HTMLElement {
1
+ class n extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -52,4 +52,4 @@ class r extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-warning", r);
55
+ customElements.get("mui-icon-warning") || customElements.define("mui-icon-warning", n);
@@ -46,4 +46,4 @@ class t extends HTMLElement {
46
46
  this.shadowRoot.innerHTML = e;
47
47
  }
48
48
  }
49
- customElements.define("mui-image", t);
49
+ customElements.get("mui-image") || customElements.define("mui-image", t);
@@ -8,30 +8,30 @@ class m extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render(), this.setupListener();
10
10
  }
11
- attributeChangedCallback(e, a, t) {
11
+ attributeChangedCallback(e, s, r) {
12
12
  var o;
13
- const r = (o = this.shadowRoot) == null ? void 0 : o.querySelector("input");
14
- r && (e === "value" && (r.value = t ?? ""), e === "disabled" && (t === null || t === "false" ? r.removeAttribute("disabled") : r.setAttribute("disabled", "")), (e === "type" || e === "placeholder" || e === "label" || e === "hide-label") && (this.render(), this.setupListener()));
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()));
15
15
  }
16
16
  setupListener() {
17
- var t, r;
18
- const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("input");
17
+ var r, t;
18
+ const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector("input");
19
19
  if (!e) return;
20
- const a = e.cloneNode(!0);
21
- (r = e.parentNode) == null || r.replaceChild(a, e), a.addEventListener("input", (o) => {
22
- const s = o.target;
20
+ const s = e.cloneNode(!0);
21
+ (t = e.parentNode) == null || t.replaceChild(s, e), s.addEventListener("input", (o) => {
22
+ const a = o.target;
23
23
  this.dispatchEvent(
24
24
  new CustomEvent("input", {
25
- detail: { value: s.value },
25
+ detail: { value: a.value },
26
26
  bubbles: !0,
27
27
  composed: !0
28
28
  })
29
29
  );
30
- }), a.addEventListener("change", (o) => {
31
- const s = o.target;
30
+ }), s.addEventListener("change", (o) => {
31
+ const a = o.target;
32
32
  this.dispatchEvent(
33
33
  new CustomEvent("change", {
34
- detail: { value: s.value },
34
+ detail: { value: a.value },
35
35
  bubbles: !0,
36
36
  composed: !0
37
37
  })
@@ -39,13 +39,7 @@ class m extends HTMLElement {
39
39
  });
40
40
  }
41
41
  render() {
42
- const e = ["text", "password", "email", "number", "search", "tel", "url", "date", "time"], a = this.getAttribute("type") || "text", t = e.includes(a) ? a : "text", r = this.getAttribute("name") || "", o = this.getAttribute("value") || "", s = this.getAttribute("placeholder") || "", n = this.getAttribute("id") || `mui-input-${Math.random().toString(36).substr(2, 9)}`, i = this.getAttribute("label") || "", l = this.hasAttribute("hide-label"), u = this.hasAttribute("disabled"), d = l && i ? `aria-label="${i}"` : "", c = this.getAttribute("variant") || "", b = c || "", h = this.querySelector('[slot="before"]') !== null, p = this.querySelector('[slot="after"]') !== null, v = [b, h ? "before" : "", p ? "after" : ""].filter(Boolean).join(" ");
43
- l && !i && console.warn(
44
- "mui-input Accessibility warning: When using 'hide-label', please provide a 'label' attribute so an 'aria-label' can be generated for screen reader support."
45
- ), !i && !d && console.warn(
46
- "mui-input Accessibility warning: A 'label' or 'aria-label' attribute is required for screen reader accessibility."
47
- );
48
- const f = (
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 = (
49
43
  /*html*/
50
44
  `
51
45
  <style>
@@ -184,18 +178,18 @@ class m extends HTMLElement {
184
178
 
185
179
 
186
180
  </style>
187
- ${i ? `<label for="${n}" class="${l ? "vh" : ""}">${i}</label>` : ""}
181
+ ${i ? `<label for="${l}" class="${n ? "vh" : ""}">${i}</label>` : ""}
188
182
  <div class="input-wrapper">
189
183
  <slot name="before"></slot>
190
184
  <input
191
185
  class="${v}"
192
- type="${t}"
193
- name="${r}"
194
- id="${n}"
186
+ type="${r}"
187
+ name="${t}"
188
+ id="${l}"
195
189
  value="${o}"
196
- placeholder="${s}"
197
- ${u ? 'disabled aria-disabled="true"' : ""}
198
- ${d}
190
+ placeholder="${a}"
191
+ ${c ? 'disabled aria-disabled="true"' : ""}
192
+ ${u}
199
193
  />
200
194
  <slot name="after"></slot>
201
195
  </div>
@@ -204,4 +198,4 @@ class m extends HTMLElement {
204
198
  this.shadowRoot && (this.shadowRoot.innerHTML = f);
205
199
  }
206
200
  }
207
- customElements.define("mui-input", m);
201
+ customElements.get("mui-input") || customElements.define("mui-input", m);
@@ -10,17 +10,17 @@ class u extends HTMLElement {
10
10
  this.hasAttribute("size") || this.setAttribute("size", "medium"), this.hasAttribute("weight") || this.setAttribute("weight", "regular"), this.hasAttribute("variant") || this.setAttribute("variant", "default"), await this.waitForPartMap(), this.render(), requestAnimationFrame(() => this.updateSlotState());
11
11
  }
12
12
  updateSlotState() {
13
- const t = this.shadowRoot, o = t.querySelector("slot:not([name])"), c = t.querySelector('slot[name="before"]'), l = t.querySelector('slot[name="after"]'), i = (a) => !!a && a.assignedNodes({ flatten: !0 }).some(
13
+ const t = this.shadowRoot, a = t.querySelector("slot:not([name])"), c = t.querySelector('slot[name="before"]'), l = t.querySelector('slot[name="after"]'), i = (o) => !!o && o.assignedNodes({ flatten: !0 }).some(
14
14
  (r) => {
15
15
  var s;
16
16
  return r.nodeType === Node.ELEMENT_NODE || r.nodeType === Node.TEXT_NODE && !!((s = r.textContent) != null && s.trim());
17
17
  }
18
18
  ), d = i(c), v = i(l);
19
19
  this.classList.toggle("has-before", d), this.classList.toggle("has-after", v);
20
- const n = (o == null ? void 0 : o.assignedNodes({ flatten: !0 })) ?? [], h = n.length > 0 && n.every(
21
- (a) => {
20
+ const n = (a == null ? void 0 : a.assignedNodes({ flatten: !0 })) ?? [], h = n.length > 0 && n.every(
21
+ (o) => {
22
22
  var r;
23
- return a.nodeType === Node.ELEMENT_NODE ? a.classList.contains("mui-icon") || a.tagName.toLowerCase() === "svg" : !((r = a.textContent) != null && r.trim());
23
+ return o.nodeType === Node.ELEMENT_NODE ? o.classList.contains("mui-icon") || o.tagName.toLowerCase() === "svg" : !((r = o.textContent) != null && r.trim());
24
24
  }
25
25
  );
26
26
  this.toggleAttribute("icon-only", h);
@@ -96,7 +96,7 @@ class u extends HTMLElement {
96
96
  text-align: inherit;
97
97
  width: 100%;
98
98
  text-decoration: none;
99
- padding: var(--space-200) var(--space-500);
99
+ padding: var(--action-padding);
100
100
  border-radius: var(--action-radius);
101
101
  font-size: var(--action-font-size);
102
102
  font-weight: var(--action-font-weight);
@@ -310,22 +310,18 @@ class u extends HTMLElement {
310
310
  }
311
311
 
312
312
  :host(.has-after.has-before[variant]) a {
313
- padding-right: var(--space-300);
314
- padding-left: var(--space-300);
313
+ padding-right: var(--action-after-slot-padding);
314
+ padding-left: var(--action-before-slot-padding);
315
315
  }
316
316
 
317
317
  :host(.has-after[variant]) a {
318
- padding-right: var(--space-300);
319
- padding-left: var(--space-400);
318
+ padding-right: var(--action-after-slot-padding);
320
319
  }
321
320
 
322
321
  :host(.has-before[variant]) a {
323
- padding-right: var(--space-400);
324
- padding-left: var(--space-300);
322
+ padding-left: var(--action-before-slot-padding);
325
323
  }
326
324
 
327
-
328
-
329
325
  </style>
330
326
 
331
327
  <a
@@ -342,11 +338,11 @@ class u extends HTMLElement {
342
338
  waitForPartMap() {
343
339
  return new Promise((t) => {
344
340
  if (typeof e == "function") return t();
345
- const o = () => {
346
- typeof e == "function" ? t() : requestAnimationFrame(o);
341
+ const a = () => {
342
+ typeof e == "function" ? t() : requestAnimationFrame(a);
347
343
  };
348
- o();
344
+ a();
349
345
  });
350
346
  }
351
347
  }
352
- customElements.define("mui-link", u);
348
+ customElements.get("mui-link") || customElements.define("mui-link", u);
@@ -65,4 +65,4 @@ class e extends HTMLElement {
65
65
  `);
66
66
  }
67
67
  }
68
- customElements.define("mui-list-item", e);
68
+ customElements.get("mui-list-item") || customElements.define("mui-list-item", e);
@@ -28,4 +28,4 @@ class t extends HTMLElement {
28
28
  `);
29
29
  }
30
30
  }
31
- customElements.define("mui-list", t);
31
+ customElements.get("mui-list") || customElements.define("mui-list", t);