@muibook/components 1.6.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 +10 -7
  9. package/dist/esm/components/mui-body/index.js +4 -4
  10. package/dist/esm/components/mui-button/index.js +23 -25
  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 +14 -11
  17. package/dist/esm/components/mui-carousel/panel/index.js +2 -2
  18. package/dist/esm/components/mui-code/index.js +20 -10
  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 +39 -30
  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 +52 -57
  54. package/dist/esm/components/mui-list/item/index.js +5 -2
  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 +16 -14
  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 +74 -38
  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 +25 -6
@@ -6,11 +6,7 @@ class a extends HTMLElement {
6
6
  }
7
7
  connectedCallback() {
8
8
  var o, n;
9
- if (customElements.get("mui-icon-right-chevron") || console.warn(
10
- "mui-accordion-block requires <mui-icon-right-chevron> to be defined. Please ensure it is imported and registered."
11
- ), customElements.get("mui-heading") || console.warn(
12
- "[mui-accordion-block] Warning: <mui-heading> is not registered. Please import it to ensure proper functionality."
13
- ), !this.shadowRoot) return;
9
+ if (!this.shadowRoot) return;
14
10
  const e = this.getAttribute("heading") || "Heading...";
15
11
  let r = (
16
12
  /*html*/
@@ -93,4 +89,4 @@ class a extends HTMLElement {
93
89
  i && (e ? i.setAttribute("inert", "") : i.removeAttribute("inert"));
94
90
  }
95
91
  }
96
- customElements.define("mui-accordion-inline", a);
92
+ customElements.get("mui-accordion-inline") || customElements.define("mui-accordion-inline", a);
@@ -43,4 +43,4 @@ class o extends HTMLElement {
43
43
  `);
44
44
  }
45
45
  }
46
- customElements.define("mui-addon", o);
46
+ customElements.get("mui-addon") || customElements.define("mui-addon", o);
@@ -1,3 +1,8 @@
1
+ import "../mui-body/index.js";
2
+ import "../mui-icons/check/index.js";
3
+ import "../mui-icons/info/index.js";
4
+ import "../mui-icons/warning/index.js";
5
+ import "../mui-icons/attention/index.js";
1
6
  function A(n) {
2
7
  return ["positive", "info", "warning", "attention"].includes(n);
3
8
  }
@@ -37,14 +42,14 @@ class x extends HTMLElement {
37
42
  info: "--feedback-info-text",
38
43
  warning: "--feedback-warning-text",
39
44
  attention: "--feedback-attention-text"
40
- }, v = {
45
+ }, m = {
41
46
  positive: "Success!",
42
47
  info: "Info:",
43
48
  warning: "Warning!",
44
49
  attention: "Error!"
45
50
  };
46
51
  this.setAttribute("aria-live", s[t]);
47
- const r = g[t], h = u[t], m = b[t], f = v[t], w = (
52
+ const r = g[t], v = u[t], h = b[t], f = m[t], w = (
48
53
  /*css*/
49
54
  `
50
55
  :host {
@@ -83,7 +88,7 @@ class x extends HTMLElement {
83
88
  }
84
89
 
85
90
  .label {
86
- color: var(${m});
91
+ color: var(${h});
87
92
  font-weight: var(--font-weight-bold);
88
93
  }
89
94
 
@@ -112,7 +117,7 @@ class x extends HTMLElement {
112
117
  this.shadowRoot.innerHTML = /*html*/
113
118
  `
114
119
  <style>${w}</style>
115
- <${r} size="small" color="var(${h})" class="icon"></${r}>
120
+ <${r} size="small" color="var(${v})" class="icon"></${r}>
116
121
  <mui-body>
117
122
  <span class="label">${f}</span>
118
123
  <slot></slot>
@@ -133,4 +138,4 @@ class x extends HTMLElement {
133
138
  }
134
139
  }
135
140
  }
136
- customElements.define("mui-alert", x);
141
+ customElements.get("mui-alert") || customElements.define("mui-alert", x);
@@ -1,25 +1,28 @@
1
- class s extends HTMLElement {
1
+ class n extends HTMLElement {
2
2
  constructor() {
3
- super(), this.attachShadow({ mode: "open" }), this.render();
3
+ super(), this.attachShadow({ mode: "open" });
4
4
  }
5
5
  static get observedAttributes() {
6
6
  return ["variant"];
7
7
  }
8
+ connectedCallback() {
9
+ this.hasAttribute("variant") || this.setAttribute("variant", "neutral"), this.setAttribute("role", "status"), this.render();
10
+ }
8
11
  attributeChangedCallback() {
9
12
  this.render();
10
13
  }
11
14
  render() {
12
- const t = this.getAttribute("variant") || "neutral", a = {
15
+ const t = this.getAttribute("variant") || "neutral", e = {
13
16
  neutral: "var(--badge-background-neutral)",
14
17
  positive: "var(--badge-background-positive)",
15
18
  warning: "var(--badge-background-warning)",
16
19
  attention: "var(--badge-background-attention)"
17
- }, e = {
20
+ }, a = {
18
21
  neutral: "off",
19
22
  positive: "polite",
20
23
  warning: "assertive",
21
24
  attention: "assertive"
22
- }, r = a[t], i = e[t], n = (
25
+ }, r = e[t], i = a[t], s = (
23
26
  /*css*/
24
27
  `
25
28
  :host {
@@ -35,9 +38,9 @@ class s extends HTMLElement {
35
38
  );
36
39
  this.setAttribute("role", "status"), this.setAttribute("aria-live", i), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
37
40
  `
38
- <style>${n}</style>
41
+ <style>${s}</style>
39
42
  <slot></slot>
40
43
  `);
41
44
  }
42
45
  }
43
- customElements.define("mui-badge", s);
46
+ customElements.get("mui-badge") || customElements.define("mui-badge", n);
@@ -1,5 +1,5 @@
1
1
  import { getPartMap as i } from "../../utils/part-map/index.js";
2
- class o extends HTMLElement {
2
+ class r extends HTMLElement {
3
3
  static get observedAttributes() {
4
4
  return ["size", "weight", "variant"];
5
5
  }
@@ -9,8 +9,8 @@ class o extends HTMLElement {
9
9
  async connectedCallback() {
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();
11
11
  }
12
- attributeChangedCallback(t, e, r) {
13
- e !== r && this.shadowRoot && this.render();
12
+ attributeChangedCallback(t, e, o) {
13
+ e !== o && this.shadowRoot && this.render();
14
14
  }
15
15
  render() {
16
16
  if (!this.shadowRoot) return;
@@ -93,4 +93,4 @@ class o extends HTMLElement {
93
93
  });
94
94
  }
95
95
  }
96
- customElements.define("mui-body", o);
96
+ customElements.get("mui-body") || customElements.define("mui-body", r);
@@ -37,7 +37,7 @@ class v extends HTMLElement {
37
37
  font-weight: var(--action-font-weight);
38
38
  background: var(--action-primary-background);
39
39
  color: var(--action-primary-text-color);
40
- border: var(--action-primary-stroke);
40
+ border: var(--action-primary-border);
41
41
  text-align: inherit;
42
42
  }
43
43
 
@@ -70,25 +70,25 @@ class v extends HTMLElement {
70
70
  :host([variant="primary"]) button {
71
71
  background: var(--action-primary-background);
72
72
  color: var(--action-primary-text-color);
73
- border: var(--action-primary-stroke);
73
+ border: var(--action-primary-border);
74
74
  }
75
75
 
76
76
  :host([variant="primary"]) button:hover {
77
77
  background: var(--action-primary-background-hover);
78
78
  color: var(--action-primary-text-color-hover);
79
- border: var(--action-primary-stroke-hover);
79
+ border: var(--action-primary-border-hover);
80
80
  }
81
81
 
82
82
  :host([variant="primary"]) button:focus-visible {
83
83
  background: var(--action-primary-background-focus);
84
84
  color: var(--action-primary-text-color-focus);
85
- border: var(--action-primary-stroke-focus);
85
+ border: var(--action-primary-border-focus);
86
86
  }
87
87
 
88
88
  :host([variant="primary"]) button:disabled {
89
89
  background: var(--action-primary-background-disabled);
90
90
  color: var(--action-primary-text-color-disabled);
91
- border: var(--action-primary-stroke-disabled);
91
+ border: var(--action-primary-border-disabled);
92
92
  cursor: not-allowed;
93
93
  }
94
94
 
@@ -103,25 +103,25 @@ class v extends HTMLElement {
103
103
  :host([variant="secondary"]) button {
104
104
  background: var(--action-secondary-background);
105
105
  color: var(--action-secondary-text-color);
106
- border: var(--action-secondary-stroke);
106
+ border: var(--action-secondary-border);
107
107
  }
108
108
 
109
109
  :host([variant="secondary"]) button:hover {
110
110
  background: var(--action-secondary-background-hover);
111
111
  color: var(--action-secondary-text-color-hover);
112
- border: var(--action-secondary-stroke-hover);
112
+ border: var(--action-secondary-border-hover);
113
113
  }
114
114
 
115
115
  :host([variant="secondary"]) button:focus-visible {
116
116
  background: var(--action-secondary-background-focus);
117
117
  color: var(--action-secondary-text-color-focus);
118
- border: var(--action-secondary-stroke-focus);
118
+ border: var(--action-secondary-border-focus);
119
119
  }
120
120
 
121
121
  :host([variant="secondary"]) button:disabled {
122
122
  background: var(--action-secondary-background-disabled);
123
123
  color: var(--action-secondary-text-color-disabled);
124
- border: var(--action-secondary-stroke-disabled);
124
+ border: var(--action-secondary-border-disabled);
125
125
  cursor: not-allowed;
126
126
  }
127
127
 
@@ -136,25 +136,25 @@ class v extends HTMLElement {
136
136
  :host([variant="tertiary"]) button {
137
137
  background: var(--action-tertiary-background);
138
138
  color: var(--action-tertiary-text-color);
139
- border: var(--action-tertiary-stroke);
139
+ border: var(--action-tertiary-border);
140
140
  }
141
141
 
142
142
  :host([variant="tertiary"]) button:hover {
143
143
  background: var(--action-tertiary-background-hover);
144
144
  color: var(--action-tertiary-text-color-hover);
145
- border: var(--action-tertiary-stroke-hover);
145
+ border: var(--action-tertiary-border-hover);
146
146
  }
147
147
 
148
148
  :host([variant="tertiary"]) button:focus-visible {
149
149
  background: var(--action-tertiary-background-focus);
150
150
  color: var(--action-tertiary-text-color-focus);
151
- border: var(--action-tertiary-stroke-focus);
151
+ border: var(--action-tertiary-border-focus);
152
152
  }
153
153
 
154
154
  :host([variant="tertiary"]) button:disabled {
155
155
  background: var(--action-tertiary-background-disabled);
156
156
  color: var(--action-tertiary-text-color-disabled);
157
- border: var(--action-tertiary-stroke-disabled);
157
+ border: var(--action-tertiary-border-disabled);
158
158
  cursor: not-allowed;
159
159
  }
160
160
 
@@ -168,25 +168,25 @@ class v extends HTMLElement {
168
168
  :host([variant="attention"]) button {
169
169
  background: var(--action-attention-background);
170
170
  color: var(--action-attention-text-color);
171
- border: var(--action-attention-stroke);
171
+ border: var(--action-attention-border);
172
172
  }
173
173
 
174
174
  :host([variant="attention"]) button:hover {
175
175
  background: var(--action-attention-background-hover);
176
176
  color: var(--action-attention-text-color-hover);
177
- border: var(--action-attention-stroke-hover);
177
+ border: var(--action-attention-border-hover);
178
178
  }
179
179
 
180
180
  :host([variant="attention"]) button:focus-visible {
181
181
  background: var(--action-attention-background-focus);
182
182
  color: var(--action-attention-text-color-focus);
183
- border: var(--action-attention-stroke-focus);
183
+ border: var(--action-attention-border-focus);
184
184
  }
185
185
 
186
186
  :host([variant="attention"]) button:disabled {
187
187
  background: var(--action-attention-background-disabled);
188
188
  color: var(--action-attention-text-color-disabled);
189
- border: var(--action-attention-stroke-disabled);
189
+ border: var(--action-attention-border-disabled);
190
190
  cursor: not-allowed;
191
191
  }
192
192
 
@@ -313,20 +313,18 @@ class v extends HTMLElement {
313
313
 
314
314
  :host(.has-after.has-before) button {
315
315
  grid-template-columns: auto 1fr auto;
316
- padding-right: var(--space-300);
317
- padding-left: var(--space-300);
316
+ padding-right: var(--action-after-slot-padding);
317
+ padding-left: var(--action-before-slot-padding);
318
318
  }
319
319
 
320
320
  :host(.has-after) button {
321
321
  grid-template-columns: 1fr auto;
322
- padding-right: var(--space-300);
323
- padding-left: var(--space-400);
322
+ padding-right: var(--action-after-slot-padding);
324
323
  }
325
324
 
326
325
  :host(.has-before) button {
327
326
  grid-template-columns: auto 1fr;
328
- padding-right: var(--space-400);
329
- padding-left: var(--space-300);
327
+ padding-left: var(--action-before-slot-padding);
330
328
  }
331
329
 
332
330
  </style>
@@ -348,7 +346,7 @@ class v extends HTMLElement {
348
346
  this.shadowRoot.innerHTML = a, await customElements.whenDefined("mui-button"), requestAnimationFrame(() => {
349
347
  const e = this.shadowRoot;
350
348
  if (!e) return;
351
- const n = e.querySelector("slot:not([name]"), l = e.querySelector('slot[name="before"]'), d = e.querySelector('slot[name="after"]'), s = (t) => t ? t.assignedNodes({ flatten: !0 }).some((o) => {
349
+ const n = e.querySelector("slot:not([name])"), l = e.querySelector('slot[name="before"]'), d = e.querySelector('slot[name="after"]'), s = (t) => t ? t.assignedNodes({ flatten: !0 }).some((o) => {
352
350
  var r;
353
351
  return o.nodeType === Node.ELEMENT_NODE || o.nodeType === Node.TEXT_NODE && !!((r = o.textContent) != null && r.trim());
354
352
  }) : !1, b = s(l), u = s(d);
@@ -372,4 +370,4 @@ class v extends HTMLElement {
372
370
  });
373
371
  }
374
372
  }
375
- customElements.define("mui-button", v);
373
+ customElements.get("mui-button") || customElements.define("mui-button", v);
@@ -20,4 +20,4 @@ class e extends HTMLElement {
20
20
  this.shadowRoot && (this.shadowRoot.innerHTML = t);
21
21
  }
22
22
  }
23
- customElements.define("mui-button-group", e);
23
+ customElements.get("mui-button-group") || customElements.define("mui-button-group", e);
@@ -4,7 +4,7 @@ class d extends HTMLElement {
4
4
  }
5
5
  connectedCallback() {
6
6
  if (!this.shadowRoot) return;
7
- const i = (
7
+ const r = (
8
8
  /*html*/
9
9
  `
10
10
  <style>
@@ -12,6 +12,7 @@ class d extends HTMLElement {
12
12
  display: block;
13
13
  box-sizing: border-box;
14
14
  }
15
+
15
16
  :host(.inner-space) {
16
17
  padding: var(--space-500);
17
18
  }
@@ -24,25 +25,28 @@ class d extends HTMLElement {
24
25
  <slot></slot>
25
26
  `
26
27
  );
27
- this.shadowRoot.innerHTML = i, requestAnimationFrame(() => {
28
+ this.shadowRoot.innerHTML = r, requestAnimationFrame(() => {
28
29
  if (!this.shadowRoot) return;
29
- const s = this.shadowRoot.querySelector("slot");
30
- if (!s) return;
31
- const r = s.assignedNodes({ flatten: !0 });
32
- let o = !1;
33
- r.forEach((a) => {
34
- if (a.nodeType === Node.ELEMENT_NODE) {
35
- const e = a, c = e.tagName.toLowerCase() === "mui-accordion-group" ? e : e.querySelector("mui-accordion-group");
36
- c instanceof HTMLElement && (c.querySelectorAll("mui-accordion-block").forEach((t) => {
37
- t.classList.add("card-slot");
38
- }), o = !0);
39
- const n = e.tagName.toLowerCase() === "mui-table" ? e : e.querySelector("mui-table");
40
- n instanceof HTMLElement && (n.querySelectorAll("mui-cell").forEach((t) => {
41
- t.classList.add("card-slot");
42
- }), o = !0);
30
+ const a = this.shadowRoot.querySelector("slot");
31
+ if (!a) return;
32
+ const l = a.assignedNodes({ flatten: !0 });
33
+ let s = !1;
34
+ l.forEach((c) => {
35
+ if (c.nodeType === Node.ELEMENT_NODE) {
36
+ const t = c, i = t.tagName.toLowerCase() === "mui-accordion-group" ? t : t.querySelector("mui-accordion-group");
37
+ i instanceof HTMLElement && (i.querySelectorAll("mui-accordion-block").forEach((e) => {
38
+ e.classList.add("card-slot");
39
+ }), s = !0), (t.tagName.toLowerCase() === "mui-slat" ? [t] : Array.from(t.querySelectorAll("mui-slat"))).forEach((o) => {
40
+ const e = o.getAttribute("variant");
41
+ (e === "action" || e === "row") && (o.classList.add("card-slot"), this.hasAttribute("condensed") && o.classList.add("condensed-slot"));
42
+ });
43
+ const n = t.tagName.toLowerCase() === "mui-table" ? t : t.querySelector("mui-table");
44
+ n instanceof HTMLElement && (n.querySelectorAll("mui-cell").forEach((e) => {
45
+ e.classList.add("card-slot");
46
+ }), s = !0);
43
47
  }
44
- }), o || this.classList.add("inner-space");
48
+ }), !s && !this.hasAttribute("condensed") && this.classList.add("inner-space");
45
49
  });
46
50
  }
47
51
  }
48
- customElements.define("mui-card-body", d);
52
+ customElements.get("mui-card-body") || customElements.define("mui-card-body", d);
@@ -40,4 +40,4 @@ class n extends HTMLElement {
40
40
  });
41
41
  }
42
42
  }
43
- customElements.define("mui-card", n);
43
+ customElements.get("mui-card") || customElements.define("mui-card", n);
@@ -59,4 +59,4 @@ class d extends HTMLElement {
59
59
  });
60
60
  }
61
61
  }
62
- customElements.define("mui-card-footer", d);
62
+ customElements.get("mui-card-footer") || customElements.define("mui-card-footer", d);
@@ -26,4 +26,4 @@ class t extends HTMLElement {
26
26
  this.shadowRoot.innerHTML = e;
27
27
  }
28
28
  }
29
- customElements.define("mui-card-header", t);
29
+ customElements.get("mui-card-header") || customElements.define("mui-card-header", t);
@@ -1,6 +1,17 @@
1
- class l extends HTMLElement {
1
+ class r extends HTMLElement {
2
2
  constructor() {
3
- super(), this.hasAttribute("direction") || this.setAttribute("direction", "horizontal"), this.handleTabChange = this.handleTabChange.bind(this), this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = /*html*/
3
+ super(), this.shadow = this.attachShadow({ mode: "open" }), this.handleTabChange = this.handleTabChange.bind(this);
4
+ }
5
+ connectedCallback() {
6
+ this.hasAttribute("direction") || this.setAttribute("direction", "horizontal"), this.render(), this.addEventListener("tab-change", this.handleTabChange);
7
+ const t = this.querySelector("tab-bar");
8
+ if (t) {
9
+ const o = t.querySelector("tab-item[active]");
10
+ o && this.updatePanels(o.id);
11
+ }
12
+ }
13
+ render() {
14
+ this.shadow.innerHTML = /*html*/
4
15
  `
5
16
  <style>
6
17
  :host {
@@ -97,14 +108,6 @@ class l extends HTMLElement {
97
108
  </div>
98
109
  `;
99
110
  }
100
- connectedCallback() {
101
- this.addEventListener("tab-change", this.handleTabChange);
102
- const t = this.querySelector("tab-bar");
103
- if (t) {
104
- const o = t.querySelector("tab-item[active]");
105
- o && this.updatePanels(o.id);
106
- }
107
- }
108
111
  handleTabChange(t) {
109
112
  const o = t;
110
113
  this.updatePanels(o.detail.activeId);
@@ -114,4 +117,4 @@ class l extends HTMLElement {
114
117
  s !== -1 && (e.style.transform = `translateX(-${s * 100}%)`);
115
118
  }
116
119
  }
117
- customElements.define("mui-carousel-controller", l);
120
+ customElements.get("mui-carousel-controller") || customElements.define("mui-carousel-controller", r);
@@ -23,7 +23,7 @@ class t extends HTMLElement {
23
23
  set item(e) {
24
24
  e !== null && this.setAttribute("item", e);
25
25
  }
26
- attributeChangedCallback(e, i, o) {
26
+ attributeChangedCallback(e, i, l) {
27
27
  }
28
28
  }
29
- customElements.define("mui-carousel-panel", t);
29
+ customElements.get("mui-carousel-panel") || customElements.define("mui-carousel-panel", t);
@@ -1,16 +1,23 @@
1
- class i extends HTMLElement {
1
+ class s extends HTMLElement {
2
2
  static get observedAttributes() {
3
- return ["size"];
3
+ return ["size", "scrollable"];
4
4
  }
5
5
  constructor() {
6
- super();
7
- const e = this.attachShadow({ mode: "open" }), t = this.getAttribute("size") || "x-small";
8
- this.setAttribute("size", t);
9
- const s = (
6
+ super(), this.attachShadow({ mode: "open" });
7
+ }
8
+ connectedCallback() {
9
+ this.hasAttribute("size") || this.setAttribute("size", "x-small"), this.render();
10
+ }
11
+ attributeChangedCallback() {
12
+ this.render();
13
+ }
14
+ render() {
15
+ if (!this.shadowRoot) return;
16
+ const e = this.hasAttribute("scrollable"), t = (
10
17
  /*css*/
11
18
  `
12
19
  :host {
13
- display: block;
20
+ display: grid;
14
21
  }
15
22
  :host([size="x-small"]) code {
16
23
  font-size: var(--text-font-size-xs);
@@ -36,6 +43,9 @@ class i extends HTMLElement {
36
43
  background: var(--surface-elevated-200);
37
44
  padding: var(--space-400) var(--space-500);
38
45
  box-sizing: border-box;
46
+ width: 100%;
47
+ overflow-x: ${e ? "auto" : "visible"};
48
+ white-space: ${e ? "nowrap" : "wrap"};
39
49
  }
40
50
 
41
51
  @media (min-width: 600px) {
@@ -46,11 +56,11 @@ class i extends HTMLElement {
46
56
 
47
57
  `
48
58
  );
49
- e.innerHTML = /*html*/
59
+ this.shadowRoot.innerHTML = /*html*/
50
60
  `
51
- <style>${s}</style>
61
+ <style>${t}</style>
52
62
  <code><slot></slot></code>
53
63
  `;
54
64
  }
55
65
  }
56
- customElements.define("mui-code", i);
66
+ customElements.get("mui-code") || customElements.define("mui-code", s);
@@ -54,4 +54,4 @@ class e extends HTMLElement {
54
54
  this.shadowRoot && (this.shadowRoot.innerHTML = t);
55
55
  }
56
56
  }
57
- customElements.define("mui-container", e);
57
+ customElements.get("mui-container") || customElements.define("mui-container", e);
@@ -1,3 +1,6 @@
1
+ import "../mui-icons/check/index.js";
2
+ import "../mui-icons/warning/index.js";
3
+ import "../mui-icons/attention/index.js";
1
4
  class r extends HTMLElement {
2
5
  static get observedAttributes() {
3
6
  return ["variant", "message"];
@@ -10,7 +13,7 @@ class r extends HTMLElement {
10
13
  connectedCallback() {
11
14
  this.render(), this.passAttributesToChild();
12
15
  }
13
- attributeChangedCallback(t, e, s) {
16
+ attributeChangedCallback(t, e, i) {
14
17
  (t === "variant" || t === "message") && (this.render(), this.passAttributesToChild());
15
18
  }
16
19
  passAttributesToChild() {
@@ -18,15 +21,15 @@ class r extends HTMLElement {
18
21
  if (!this.shadowRoot) return;
19
22
  const t = this.shadowRoot.querySelector("slot"), e = (a = t == null ? void 0 : t.assignedElements) == null ? void 0 : a.call(t)[0];
20
23
  if (!e) return;
21
- ["variant", "label", "hide-label"].forEach((i) => {
22
- this.hasAttribute(i) ? e.setAttribute(i, this.getAttribute(i) || "") : e.removeAttribute(i);
24
+ ["variant", "label", "hide-label"].forEach((s) => {
25
+ this.hasAttribute(s) ? e.setAttribute(s, this.getAttribute(s) || "") : e.removeAttribute(s);
23
26
  });
24
27
  }
25
28
  render() {
26
29
  const t = this.getAttribute("message"), e = this.getAttribute("variant");
27
30
  if (!this.shadowRoot) return;
28
- let s = "";
29
- e === "success" ? s = "check" : e === "warning" ? s = "warning" : e === "error" && (s = "attention"), this.shadowRoot.innerHTML = /*html*/
31
+ let i = "";
32
+ e === "success" ? i = "check" : e === "warning" ? i = "warning" : e === "error" && (i = "attention"), this.shadowRoot.innerHTML = /*html*/
30
33
  `
31
34
  <style>
32
35
  :host {
@@ -50,10 +53,10 @@ class r extends HTMLElement {
50
53
  <slot></slot>
51
54
  ${t ? `
52
55
  <mui-body size="small" variant="${e}">
53
- ${s ? `<mui-icon-${s}></mui-icon-${s}>` : ""}
56
+ ${i ? `<mui-icon-${i}></mui-icon-${i}>` : ""}
54
57
  ${t}
55
58
  </mui-body>` : ""}
56
59
  `;
57
60
  }
58
61
  }
59
- customElements.define("mui-field", r);
62
+ customElements.get("mui-field") || customElements.define("mui-field", r);
@@ -1,3 +1,4 @@
1
+ import "../mui-button/index.js";
1
2
  class r extends HTMLElement {
2
3
  constructor() {
3
4
  super(), this.attachShadow({ mode: "open" }), this.acceptedFileTypes = this.getAttribute("acceptedFileTypes") || "", this.currentFileName = this.getAttribute("currentFileName") || "", this.selectedFileName = null, this.render(), this.cacheElements(), this.attachEvents();
@@ -23,7 +24,7 @@ class r extends HTMLElement {
23
24
  border-color: var(--form-default-border-color);
24
25
  color: var(--text-color);
25
26
  background: var(--input-background);
26
- min-height: 4.2rem;
27
+ min-height: 4.4rem;
27
28
  }
28
29
  .wrapper:hover {
29
30
  border-color: var(--form-default-border-color-hover);
@@ -50,12 +51,12 @@ class r extends HTMLElement {
50
51
  }
51
52
  }
52
53
 
53
- mui-button::part(height) {
54
+ mui-button {
54
55
  margin-right: 0.1rem;
55
56
  }
56
57
 
57
58
  mui-button::part(height) {
58
- height: calc(4.2rem - 0.4rem);
59
+ height: calc(4.2rem - 0.2rem);
59
60
  padding: var(--space-400);
60
61
  padding-top: var(--space-000);
61
62
  padding-bottom: var(--space-000);
@@ -97,4 +98,4 @@ class r extends HTMLElement {
97
98
  ));
98
99
  }
99
100
  }
100
- customElements.define("mui-file-upload", r);
101
+ customElements.get("mui-file-upload") || customElements.define("mui-file-upload", r);
@@ -39,4 +39,4 @@ class i extends HTMLElement {
39
39
  });
40
40
  }
41
41
  }
42
- customElements.define("mui-grid", i);
42
+ customElements.get("mui-grid") || customElements.define("mui-grid", i);
@@ -32,4 +32,4 @@ class t extends HTMLElement {
32
32
  `;
33
33
  }
34
34
  }
35
- customElements.define("mui-heading", t);
35
+ customElements.get("mui-heading") || customElements.define("mui-heading", t);
@@ -1,4 +1,4 @@
1
- class c extends HTMLElement {
1
+ class l extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["size", "color"];
4
4
  }
@@ -12,7 +12,7 @@ class c extends HTMLElement {
12
12
  (e === "size" || e === "color") && t !== i && 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"), c = t && {
16
16
  default: "var(--icon-color-default)",
17
17
  inverted: "var(--icon-color-inverted)"
18
18
  }[t] || t || "var(--icon-color-default)", s = {
@@ -30,7 +30,7 @@ class c extends HTMLElement {
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- fill: ${l};
33
+ fill: ${c};
34
34
  }
35
35
  svg {
36
36
  width: 100%;
@@ -52,4 +52,4 @@ class c extends HTMLElement {
52
52
  `);
53
53
  }
54
54
  }
55
- customElements.define("mui-icon-accessibility", c);
55
+ customElements.get("mui-icon-accessibility") || customElements.define("mui-icon-accessibility", l);