@muibook/components 20.0.0 → 20.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 (153) hide show
  1. package/AGENTS.md +67 -0
  2. package/DESIGN.md +358 -0
  3. package/README.md +52 -1
  4. package/dist/esm/agent/keywords/index.js +2 -204
  5. package/dist/esm/agent/prompts/index.js +6 -434
  6. package/dist/esm/components/mui-accordion/core/index.js +25 -17
  7. package/dist/esm/components/mui-avatar/index.js +99 -42
  8. package/dist/esm/components/mui-avatar-chip/index.js +158 -0
  9. package/dist/esm/components/mui-avatar-group/index.js +88 -0
  10. package/dist/esm/components/mui-badge/index.js +2 -2
  11. package/dist/esm/components/mui-body/index.js +20 -11
  12. package/dist/esm/components/mui-button/index.js +117 -65
  13. package/dist/esm/components/mui-calendar/index.js +199 -0
  14. package/dist/esm/components/mui-card/body/index.js +32 -17
  15. package/dist/esm/components/mui-card/footer/index.js +11 -9
  16. package/dist/esm/components/mui-carousel/controller/index.js +1 -1
  17. package/dist/esm/components/mui-checkbox/index.js +23 -18
  18. package/dist/esm/components/mui-chip/index.js +184 -68
  19. package/dist/esm/components/mui-chip-input/index.js +146 -137
  20. package/dist/esm/components/mui-chip-rail/index.js +154 -51
  21. package/dist/esm/components/mui-code/index.js +27 -8
  22. package/dist/esm/components/mui-container/index.js +68 -45
  23. package/dist/esm/components/mui-date-picker/index.js +169 -0
  24. package/dist/esm/components/mui-drawer/index.js +968 -100
  25. package/dist/esm/components/mui-dropdown/index.js +250 -63
  26. package/dist/esm/components/mui-field/index.js +1 -1
  27. package/dist/esm/components/mui-file-upload/index.js +13 -4
  28. package/dist/esm/components/mui-form-group/index.js +1 -2
  29. package/dist/esm/components/mui-form-message/index.js +4 -9
  30. package/dist/esm/components/mui-hint/index.js +178 -72
  31. package/dist/esm/components/mui-icons/copy/index.js +54 -0
  32. package/dist/esm/components/mui-icons/fullscreen/index.js +5 -0
  33. package/dist/esm/components/mui-icons/icon-helper/index.js +56 -0
  34. package/dist/esm/components/mui-icons/index.js +14 -1
  35. package/dist/esm/components/mui-icons/moon/index.js +3 -1
  36. package/dist/esm/components/mui-icons/{rectangle-bottom-panel → panel}/index.js +6 -6
  37. package/dist/esm/components/mui-icons/pause/index.js +5 -0
  38. package/dist/esm/components/mui-icons/picture-in-picture/index.js +5 -0
  39. package/dist/esm/components/mui-icons/play-fill/index.js +5 -0
  40. package/dist/esm/components/mui-icons/rectangle-right-drawer/index.js +56 -0
  41. package/dist/esm/components/mui-icons/reload/index.js +5 -0
  42. package/dist/esm/components/mui-icons/speaker-mute/index.js +5 -0
  43. package/dist/esm/components/mui-icons/speaker-one-wave/index.js +5 -0
  44. package/dist/esm/components/mui-icons/speaker-two-wave/index.js +5 -0
  45. package/dist/esm/components/mui-icons/spinner/index.js +7 -5
  46. package/dist/esm/components/mui-icons/stop-fill/index.js +5 -0
  47. package/dist/esm/components/mui-icons/sun/index.js +5 -5
  48. package/dist/esm/components/mui-icons/timer/index.js +54 -0
  49. package/dist/esm/components/mui-icons/toggle/index.js +16 -6
  50. package/dist/esm/components/mui-icons/vertical-ellipsis/index.js +5 -0
  51. package/dist/esm/components/mui-illustrations/trash/index.js +6 -5
  52. package/dist/esm/components/mui-input/index.js +87 -62
  53. package/dist/esm/components/mui-link/index.js +195 -83
  54. package/dist/esm/components/mui-media-player/index.js +1577 -83
  55. package/dist/esm/components/mui-model-viewer/index.js +258 -0
  56. package/dist/esm/components/mui-progress-ring/index.js +349 -0
  57. package/dist/esm/components/mui-prompt/index.js +99 -71
  58. package/dist/esm/components/mui-prompt-preview/index.js +11 -23
  59. package/dist/esm/components/mui-radio/index.js +38 -17
  60. package/dist/esm/components/mui-range-input/index.js +9 -4
  61. package/dist/esm/components/mui-responsive/index.js +60 -27
  62. package/dist/esm/components/mui-search-input/index.js +300 -0
  63. package/dist/esm/components/mui-select/index.js +231 -42
  64. package/dist/esm/components/mui-slat/slat/index.js +40 -12
  65. package/dist/esm/components/mui-spinner/index.js +11 -9
  66. package/dist/esm/components/mui-switch/index.js +23 -20
  67. package/dist/esm/components/mui-table/row/index.js +2 -6
  68. package/dist/esm/components/mui-table/table/index.js +157 -14
  69. package/dist/esm/components/mui-textarea/index.js +43 -26
  70. package/dist/esm/components/mui-time/index/index.js +336 -0
  71. package/dist/esm/components/mui-time-picker/index.js +126 -0
  72. package/dist/esm/components/mui-video-thumbnail/index.js +5 -5
  73. package/dist/esm/css/mui-brand.css +12 -8
  74. package/dist/esm/css/mui-tokens.css +417 -305
  75. package/dist/esm/css/readme.md +2 -2
  76. package/dist/esm/custom-elements.json +3678 -1553
  77. package/dist/esm/dynamic-attrs.json +263 -66
  78. package/dist/esm/index.js +30 -6
  79. package/dist/esm/knowledge/compositions/index.js +1560 -0
  80. package/dist/esm/knowledge/index.js +28 -0
  81. package/dist/esm/knowledge/keywords/index.js +306 -0
  82. package/dist/esm/knowledge/rules/index.js +199 -0
  83. package/dist/esm/tokens/js/index.js +143 -139
  84. package/dist/types/agent/keywords/index.d.ts +1 -1
  85. package/dist/types/components/mui-avatar-chip/api.d.ts +28 -0
  86. package/dist/types/components/mui-avatar-chip/index.d.ts +18 -0
  87. package/dist/types/components/mui-avatar-group/api.d.ts +28 -0
  88. package/dist/types/components/mui-avatar-group/doc.d.ts +2 -0
  89. package/dist/types/components/mui-avatar-group/index.d.ts +1 -0
  90. package/dist/types/components/mui-button/api.d.ts +2 -2
  91. package/dist/types/components/mui-calendar/api.d.ts +41 -0
  92. package/dist/types/components/mui-calendar/doc.d.ts +2 -0
  93. package/dist/types/components/mui-calendar/index.d.ts +3 -0
  94. package/dist/types/components/mui-checkbox/api.d.ts +4 -0
  95. package/dist/types/components/mui-chip-input/api.d.ts +4 -0
  96. package/dist/types/components/mui-chip-rail/index.d.ts +1 -0
  97. package/dist/types/components/mui-date-picker/api.d.ts +38 -0
  98. package/dist/types/components/mui-date-picker/doc.d.ts +2 -0
  99. package/dist/types/components/mui-date-picker/index.d.ts +6 -0
  100. package/dist/types/components/mui-drawer/api.d.ts +4 -0
  101. package/dist/types/components/mui-drawer/index.d.ts +2 -0
  102. package/dist/types/components/mui-file-upload/api.d.ts +4 -0
  103. package/dist/types/components/mui-icons/fullscreen.d.ts +1 -0
  104. package/dist/types/components/mui-icons/icon-helper.d.ts +1 -0
  105. package/dist/types/components/mui-icons/index.d.ts +14 -1
  106. package/dist/types/components/mui-icons/panel.d.ts +1 -0
  107. package/dist/types/components/mui-icons/pause.d.ts +1 -0
  108. package/dist/types/components/mui-icons/picture-in-picture.d.ts +1 -0
  109. package/dist/types/components/mui-icons/play-fill.d.ts +1 -0
  110. package/dist/types/components/mui-icons/rectangle-right-drawer.d.ts +1 -0
  111. package/dist/types/components/mui-icons/reload.d.ts +1 -0
  112. package/dist/types/components/mui-icons/speaker-mute.d.ts +1 -0
  113. package/dist/types/components/mui-icons/speaker-one-wave.d.ts +1 -0
  114. package/dist/types/components/mui-icons/speaker-two-wave.d.ts +1 -0
  115. package/dist/types/components/mui-icons/stop-fill.d.ts +1 -0
  116. package/dist/types/components/mui-icons/timer.d.ts +1 -0
  117. package/dist/types/components/mui-icons/vertical-ellipsis.d.ts +1 -0
  118. package/dist/types/components/mui-input/api.d.ts +12 -0
  119. package/dist/types/components/mui-media-player/api.d.ts +4 -0
  120. package/dist/types/components/mui-media-player/index.d.ts +13 -4
  121. package/dist/types/components/mui-model-viewer/api.d.ts +28 -0
  122. package/dist/types/components/mui-model-viewer/doc.d.ts +2 -0
  123. package/dist/types/components/mui-model-viewer/index.d.ts +17 -0
  124. package/dist/types/components/mui-progress-ring/api.d.ts +24 -0
  125. package/dist/types/components/mui-progress-ring/doc.d.ts +2 -0
  126. package/dist/types/components/mui-progress-ring/index.d.ts +1 -0
  127. package/dist/types/components/mui-radio/api.d.ts +12 -0
  128. package/dist/types/components/mui-range-input/api.d.ts +4 -0
  129. package/dist/types/components/mui-responsive/api.d.ts +10 -2
  130. package/dist/types/components/mui-search-input/api.d.ts +40 -0
  131. package/dist/types/components/mui-search-input/doc.d.ts +2 -0
  132. package/dist/types/components/mui-search-input/index.d.ts +3 -0
  133. package/dist/types/components/mui-select/api.d.ts +12 -0
  134. package/dist/types/components/mui-switch/api.d.ts +4 -0
  135. package/dist/types/components/mui-table/api.d.ts +15 -0
  136. package/dist/types/components/mui-textarea/api.d.ts +12 -0
  137. package/dist/types/components/mui-time/api.d.ts +41 -0
  138. package/dist/types/components/mui-time/doc.d.ts +2 -0
  139. package/dist/types/components/mui-time/index.d.ts +1 -0
  140. package/dist/types/components/mui-time-picker/api.d.ts +38 -0
  141. package/dist/types/components/mui-time-picker/doc.d.ts +2 -0
  142. package/dist/types/components/mui-time-picker/index.d.ts +4 -0
  143. package/dist/types/index.d.ts +24 -2
  144. package/dist/types/knowledge/compositions.d.ts +4644 -0
  145. package/dist/types/knowledge/index.d.ts +4657 -0
  146. package/dist/types/knowledge/keywords.d.ts +4 -0
  147. package/dist/types/knowledge/rules.d.ts +1 -0
  148. package/dist/types/tokens/js/index.d.ts +11 -7
  149. package/package.json +119 -12
  150. package/dist/esm/components/mui-form-hint/index.js +0 -1
  151. package/dist/types/components/mui-form-hint/index.d.ts +0 -1
  152. /package/dist/types/components/{mui-form-hint → mui-avatar-chip}/doc.d.ts +0 -0
  153. /package/dist/types/components/mui-icons/{rectangle-bottom-panel.d.ts → copy.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { getPartMap as v } from "../../utils/part-map/index.js";
2
- class g extends HTMLElement {
1
+ import { getPartMap as f } from "../../utils/part-map/index.js";
2
+ class b extends HTMLElement {
3
3
  static get observedAttributes() {
4
4
  return [
5
5
  "target",
@@ -18,81 +18,112 @@ class g extends HTMLElement {
18
18
  constructor() {
19
19
  super(), this.attachShadow({ mode: "open" });
20
20
  }
21
+ focus(a) {
22
+ var r;
23
+ const o = (r = this.shadowRoot) == null ? void 0 : r.querySelector("a");
24
+ o ? o.focus(a) : super.focus(a);
25
+ }
21
26
  async connectedCallback() {
22
- this.hasAttribute("size") || this.setAttribute("size", "medium"), this.hasAttribute("weight") || this.setAttribute("weight", "regular"), this.hasAttribute("variant") || this.setAttribute("variant", "default"), this.syncRingSizeAttribute(), await this.waitForPartMap(), this.render(), requestAnimationFrame(() => this.updateSlotState());
27
+ this.hasAttribute("size") || this.setAttribute("size", "medium"), this.hasAttribute("weight") || this.setAttribute("weight", "regular"), this.hasAttribute("variant") || this.setAttribute("variant", "default"), this.syncRingSizeAttribute(), await this.waitForPartMap(), this.render();
28
+ const a = this.shadowRoot;
29
+ if (!a) return;
30
+ [
31
+ a.querySelector("slot:not([name])"),
32
+ a.querySelector('slot[name="before"]'),
33
+ a.querySelector('slot[name="after"]')
34
+ ].forEach((r) => r == null ? void 0 : r.addEventListener("slotchange", () => this.updateSlotState())), requestAnimationFrame(() => this.updateSlotState());
23
35
  }
24
- attributeChangedCallback(t, o, r) {
36
+ attributeChangedCallback(a, o, r) {
25
37
  if (this.shadowRoot) {
26
- if (t === "href") {
27
- const a = this.shadowRoot.querySelector("a");
28
- a && a.setAttribute("href", r || "#");
29
- }
30
- if (t === "target") {
31
- const a = this.shadowRoot.querySelector("a");
32
- a && a.setAttribute("target", r || "_self");
33
- }
34
- if (t === "disabled") {
35
- const a = this.shadowRoot.querySelector("a");
36
- a && (r !== null ? (a.setAttribute("aria-disabled", "true"), a.setAttribute("href", "javascript:void(0)")) : (a.setAttribute("aria-disabled", "false"), a.setAttribute("href", this.getAttribute("href") || "#")));
37
- }
38
- if (t === "download") {
39
- const a = this.shadowRoot.querySelector("a");
40
- if (!a) return;
41
- r !== null ? a.setAttribute("download", r === "" ? "" : r) : a.removeAttribute("download");
42
- }
43
- t === "size" && o !== r && this.shadowRoot && requestAnimationFrame(() => {
44
- const a = this.shadowRoot;
45
- if (!a) return;
46
- const n = [
47
- a.querySelector("slot:not([name])"),
48
- a.querySelector('slot[name="before"]'),
49
- a.querySelector('slot[name="after"]')
50
- ], s = this.hasAttribute("icon-only");
51
- n.forEach((i) => {
52
- if (i) {
53
- const e = i.assignedNodes({ flatten: !0 });
54
- this.updateIconSizes(e, s), this.updateAvatarSizes(e), this.updateBadgeSizes(e);
38
+ if (a === "href") {
39
+ const t = this.shadowRoot.querySelector("a");
40
+ t && t.setAttribute("href", r || "#");
41
+ }
42
+ if (a === "target") {
43
+ const t = this.shadowRoot.querySelector("a");
44
+ t && t.setAttribute("target", r || "_self");
45
+ }
46
+ if (a === "disabled") {
47
+ const t = this.shadowRoot.querySelector("a");
48
+ t && (r !== null ? (t.setAttribute("aria-disabled", "true"), t.setAttribute("href", "javascript:void(0)")) : (t.setAttribute("aria-disabled", "false"), t.setAttribute("href", this.getAttribute("href") || "#")));
49
+ }
50
+ if (a === "download") {
51
+ const t = this.shadowRoot.querySelector("a");
52
+ if (!t) return;
53
+ r !== null ? t.setAttribute("download", r === "" ? "" : r) : t.removeAttribute("download");
54
+ }
55
+ a === "size" && o !== r && this.shadowRoot && requestAnimationFrame(() => {
56
+ const t = this.shadowRoot;
57
+ if (!t) return;
58
+ const d = [
59
+ t.querySelector("slot:not([name])"),
60
+ t.querySelector('slot[name="before"]'),
61
+ t.querySelector('slot[name="after"]')
62
+ ], e = this.hasAttribute("icon-only"), i = this.hasAttribute("avatar-only");
63
+ d.forEach((n) => {
64
+ if (n) {
65
+ const c = n.assignedNodes({ flatten: !0 });
66
+ this.updateIconSizes(c, e), i || this.updateAvatarSizes(c), this.updateBadgeSizes(c);
55
67
  }
56
68
  });
57
- }), t === "stroke-ring-size" && o !== r && this.syncRingSizeAttribute();
69
+ }), a === "stroke-ring-size" && o !== r && this.syncRingSizeAttribute();
58
70
  }
59
71
  }
60
72
  syncRingSizeAttribute() {
61
- var a;
62
- const t = (a = this.getAttribute("stroke-ring-size")) == null ? void 0 : a.trim();
63
- if (!t) {
73
+ var t;
74
+ const a = (t = this.getAttribute("stroke-ring-size")) == null ? void 0 : t.trim();
75
+ if (!a) {
64
76
  this.style.removeProperty("--action-ring-size");
65
77
  return;
66
78
  }
67
- const o = t.startsWith("stroke-size-") ? t.replace("stroke-size-", "") : t, r = /^(100|200|300|400|500)$/.test(o);
68
- this.style.setProperty("--action-ring-size", r ? `var(--stroke-size-${o})` : t);
79
+ const o = a.startsWith("stroke-size-") ? a.replace("stroke-size-", "") : a, r = /^(100|200|300|400|500)$/.test(o);
80
+ this.style.setProperty("--action-ring-size", r ? `var(--stroke-size-${o})` : a);
81
+ }
82
+ isAvatarOnlyElement(a) {
83
+ const o = a.tagName.toLowerCase();
84
+ if (o === "mui-avatar") return !0;
85
+ if (o !== "mui-responsive") return !1;
86
+ const r = Array.from(a.childNodes), t = r.filter((e) => e.nodeType === Node.ELEMENT_NODE);
87
+ return r.every(
88
+ (e) => {
89
+ var i;
90
+ return e.nodeType === Node.TEXT_NODE ? !((i = e.textContent) != null && i.trim()) : e.nodeType === Node.ELEMENT_NODE;
91
+ }
92
+ ) && t.length > 0 && t.every((e) => e.tagName.toLowerCase() === "mui-avatar");
69
93
  }
70
94
  updateSlotState() {
71
- const t = this.shadowRoot, o = t.querySelector("slot:not([name])"), r = t.querySelector('slot[name="before"]'), a = t.querySelector('slot[name="after"]'), n = (l) => !!l && l.assignedNodes({ flatten: !0 }).some(
72
- (d) => {
73
- var c;
74
- return d.nodeType === Node.ELEMENT_NODE || d.nodeType === Node.TEXT_NODE && !!((c = d.textContent) != null && c.trim());
75
- }
76
- ), s = n(r), i = n(a);
77
- this.toggleAttribute("has-before", s), this.toggleAttribute("has-after", i);
78
- const e = (o == null ? void 0 : o.assignedNodes({ flatten: !0 })) ?? [], h = ((o == null ? void 0 : o.assignedElements({ flatten: !0 })) ?? []).some((l) => l.tagName.toLowerCase() === "mui-video-thumbnail");
79
- this.toggleAttribute("has-video", h);
80
- const f = !h && e.length > 0 && e.every(
95
+ const a = this.shadowRoot, o = a.querySelector("slot:not([name])"), r = a.querySelector('slot[name="before"]'), t = a.querySelector('slot[name="after"]'), d = (s) => !!s && s.assignedNodes({ flatten: !0 }).some(
81
96
  (l) => {
82
- var d;
83
- return l.nodeType === Node.ELEMENT_NODE ? l.classList.contains("mui-icon") || l.tagName.toLowerCase() === "svg" : !((d = l.textContent) != null && d.trim());
97
+ var v;
98
+ return l.nodeType === Node.ELEMENT_NODE || l.nodeType === Node.TEXT_NODE && !!((v = l.textContent) != null && v.trim());
99
+ }
100
+ ), e = d(r), i = d(t);
101
+ this.toggleAttribute("has-before", e), this.toggleAttribute("has-after", i);
102
+ const n = (o == null ? void 0 : o.assignedNodes({ flatten: !0 })) ?? [], c = (o == null ? void 0 : o.assignedElements({ flatten: !0 })) ?? [], h = c.some((s) => s.tagName.toLowerCase() === "mui-video-thumbnail");
103
+ this.toggleAttribute("has-video", h);
104
+ const u = !h && c.length === 1 && this.isAvatarOnlyElement(c[0]) && n.every(
105
+ (s) => {
106
+ var l;
107
+ return s.nodeType === Node.ELEMENT_NODE ? this.isAvatarOnlyElement(s) : !((l = s.textContent) != null && l.trim());
84
108
  }
85
109
  );
86
- this.toggleAttribute("icon-only", f), f ? this.updateIconSizes(e, !0) : [r, o, a].forEach((d) => {
87
- if (d) {
88
- const c = d.assignedNodes({ flatten: !0 });
89
- this.updateIconSizes(c, !1), this.updateAvatarSizes(c), this.updateBadgeSizes(c);
110
+ this.toggleAttribute("avatar-only", u);
111
+ const g = !u && !h && n.length > 0 && n.every(
112
+ (s) => {
113
+ var l;
114
+ return s.nodeType === Node.ELEMENT_NODE ? s.classList.contains("mui-icon") || s.tagName.toLowerCase() === "svg" : !((l = s.textContent) != null && l.trim());
115
+ }
116
+ );
117
+ this.toggleAttribute("icon-only", g), g ? this.updateIconSizes(n, !0) : [r, o, t].forEach((l) => {
118
+ if (l) {
119
+ const v = l.assignedNodes({ flatten: !0 });
120
+ this.updateIconSizes(v, !1), u || this.updateAvatarSizes(v), this.updateBadgeSizes(v);
90
121
  }
91
122
  });
92
123
  }
93
124
  render() {
94
125
  if (!this.shadowRoot) return;
95
- const t = v("text", "spacing", "layout", "visual");
126
+ const a = f("text", "spacing", "layout", "visual");
96
127
  this.shadowRoot.innerHTML = /*html*/
97
128
  `
98
129
  <style>
@@ -132,8 +163,8 @@ class g extends HTMLElement {
132
163
  }
133
164
 
134
165
  :host([size="xx-small"]) a {
135
- font-size: var(--font-size-15);
136
- line-height: var(--line-height-25);
166
+ font-size: var(--text-font-size-xxs);
167
+ line-height: var(--text-line-height-xxs);
137
168
  }
138
169
 
139
170
  :host([size="x-small"]) a {
@@ -183,7 +214,7 @@ class g extends HTMLElement {
183
214
  text-decoration: none;
184
215
  padding: var(--action-padding);
185
216
  min-height: var(--action-size-medium);
186
- border-radius: var(--action-radius);
217
+ border-radius: var(--action-radius-medium);
187
218
  font-size: var(--action-font-size);
188
219
  font-weight: var(--action-font-weight);
189
220
  line-height: var(--action-line-height);
@@ -441,6 +472,44 @@ class g extends HTMLElement {
441
472
  }
442
473
  /* ===================================== */
443
474
 
475
+ :host([avatar-only]) {
476
+ width: auto;
477
+ display: flex;
478
+ }
479
+
480
+ :host([avatar-only]) a,
481
+ :host([avatar-only]) a:hover,
482
+ :host([avatar-only]) a:focus,
483
+ :host([avatar-only]) a:focus-visible,
484
+ :host([avatar-only]) a[aria-disabled="true"] {
485
+ width: auto;
486
+ min-width: 0;
487
+ min-height: 0;
488
+ padding: var(--space-000);
489
+ background: transparent;
490
+ display: inline-flex;
491
+ align-items: center;
492
+ justify-content: center;
493
+ gap: var(--space-000);
494
+ line-height: 0;
495
+ border-radius: 999rem;
496
+ text-decoration: none;
497
+ text-decoration-color: transparent;
498
+ }
499
+
500
+ :host([avatar-only]) a ::slotted(mui-avatar) {
501
+ margin-right: var(--space-000);
502
+ margin-left: var(--space-000);
503
+ }
504
+ :host([avatar-only]) a ::slotted(mui-responsive) {
505
+ display: flex;
506
+ margin-right: var(--space-000);
507
+ margin-left: var(--space-000);
508
+ line-height: 0;
509
+ text-decoration: none;
510
+ }
511
+ /* ===================================== */
512
+
444
513
  :host([alert-positive-slot]) {
445
514
  --alert-text: var(--feedback-positive-text);
446
515
  --alert-icon: var(--feedback-positive-icon);
@@ -530,6 +599,15 @@ class g extends HTMLElement {
530
599
  --avatar-background-override: var(--action-avatar-background-hover);
531
600
  }
532
601
 
602
+ :host([avatar-only][variant][size]) a ::slotted(mui-avatar) {
603
+ margin-right: var(--space-000);
604
+ margin-left: var(--space-000);
605
+ }
606
+ :host([avatar-only][variant][size]) a ::slotted(mui-responsive) {
607
+ margin-right: var(--space-000);
608
+ margin-left: var(--space-000);
609
+ }
610
+
533
611
  /* Badge Spacing */
534
612
  :host([has-before]) a ::slotted(mui-badge[slot="before"]) {
535
613
  margin-right: var(--space-025);
@@ -674,8 +752,8 @@ class g extends HTMLElement {
674
752
  :host([size="xx-small"][usage="input"]) a:hover,
675
753
  :host([size="xx-small"][usage="input"]) a:focus,
676
754
  :host([size="xx-small"][usage="input"]) a[aria-disabled="true"] {
677
- font-size: var(--font-size-15);
678
- line-height: var(--line-height-25);
755
+ font-size: var(--text-font-size-xxs);
756
+ line-height: var(--text-line-height-xxs);
679
757
  font-weight: var(--font-weight-semi-bold);
680
758
  min-height: var(--action-size-xx-small);
681
759
  padding: var(--space-025) var(--space-100);
@@ -727,6 +805,40 @@ class g extends HTMLElement {
727
805
  border-radius: var(--action-radius-large);
728
806
  }
729
807
 
808
+ :host([size][dropdown-slot]) a,
809
+ :host([size][dropdown-slot]) a:hover,
810
+ :host([size][dropdown-slot]) a:focus,
811
+ :host([size][dropdown-slot]) a[aria-disabled="true"],
812
+ :host([size][dropdown-slot][has-after]) a,
813
+ :host([size][dropdown-slot][has-before]) a,
814
+ :host([dropdown-slot]) a {
815
+ border-radius: var(--radius-000);
816
+ justify-content: flex-start;
817
+ white-space: nowrap;
818
+ }
819
+
820
+ :host([size][dropdown-slot-first]) a,
821
+ :host([size][dropdown-slot-first]) a:hover,
822
+ :host([size][dropdown-slot-first]) a:focus,
823
+ :host([size][dropdown-slot-first]) a[aria-disabled="true"],
824
+ :host([size][dropdown-slot-first][has-after]) a,
825
+ :host([size][dropdown-slot-first][has-before]) a,
826
+ :host([dropdown-slot-first]) a {
827
+ border-top-left-radius: calc(var(--radius-100) / 2);
828
+ border-top-right-radius: calc(var(--radius-100) / 2);
829
+ }
830
+
831
+ :host([size][dropdown-slot-last]) a,
832
+ :host([size][dropdown-slot-last]) a:hover,
833
+ :host([size][dropdown-slot-last]) a:focus,
834
+ :host([size][dropdown-slot-last]) a[aria-disabled="true"],
835
+ :host([size][dropdown-slot-last][has-after]) a,
836
+ :host([size][dropdown-slot-last][has-before]) a,
837
+ :host([dropdown-slot-last]) a {
838
+ border-bottom-left-radius: calc(var(--radius-100) / 2);
839
+ border-bottom-right-radius: calc(var(--radius-100) / 2);
840
+ }
841
+
730
842
  /* Keep input-composed links flush against the input edge after size radius applies. */
731
843
  :host([slot="before"][usage="input"]) a,
732
844
  :host([slot="before"][usage="input"]) a:hover,
@@ -908,7 +1020,7 @@ class g extends HTMLElement {
908
1020
  </style>
909
1021
 
910
1022
  <a
911
- part="${t}"
1023
+ part="${a}"
912
1024
  target="${this.getAttribute("target") || "_self"}"
913
1025
  href="${this.hasAttribute("disabled") ? "javascript:void(0)" : this.getAttribute("href") || "#"}"
914
1026
  aria-disabled="${this.hasAttribute("disabled") ? "true" : "false"}"
@@ -921,8 +1033,8 @@ class g extends HTMLElement {
921
1033
  `;
922
1034
  }
923
1035
  // Update avatar sizes based on button size
924
- updateAvatarSizes(t) {
925
- const o = this.getAttribute("size") || "medium", s = ((this.getAttribute("variant") || "default") === "default" ? {
1036
+ updateAvatarSizes(a) {
1037
+ const o = this.getAttribute("size") || "medium", e = ((this.getAttribute("variant") || "default") === "default" ? {
926
1038
  "xx-small": "xx-small",
927
1039
  "x-small": "xx-small",
928
1040
  small: "xx-small",
@@ -935,51 +1047,51 @@ class g extends HTMLElement {
935
1047
  medium: "small",
936
1048
  large: "medium"
937
1049
  })[o] || "small";
938
- t.forEach((i) => {
1050
+ a.forEach((i) => {
939
1051
  if (i.nodeType === Node.ELEMENT_NODE) {
940
- const e = i;
941
- e.tagName.toLowerCase() === "mui-avatar" && e.setAttribute("size", s);
1052
+ const n = i;
1053
+ n.tagName.toLowerCase() === "mui-avatar" && n.setAttribute("size", e);
942
1054
  }
943
1055
  });
944
1056
  }
945
- updateIconSizes(t, o) {
946
- const r = this.getAttribute("size") || "medium", n = {
1057
+ updateIconSizes(a, o) {
1058
+ const r = this.getAttribute("size") || "medium", d = {
947
1059
  "xx-small": "xx-small",
948
1060
  "x-small": "x-small",
949
1061
  small: "x-small",
950
1062
  medium: o ? "medium" : "small",
951
1063
  large: o ? "large" : "medium"
952
1064
  }[r] || "small";
953
- t.forEach((s) => {
954
- if (s.nodeType === Node.ELEMENT_NODE) {
955
- const i = s, e = i.tagName.toLowerCase();
956
- (e === "svg" || i.classList.contains("mui-icon") || e === "mui-icon") && !i.hasAttribute("size") && i.setAttribute("size", n);
1065
+ a.forEach((e) => {
1066
+ if (e.nodeType === Node.ELEMENT_NODE) {
1067
+ const i = e, n = i.tagName.toLowerCase();
1068
+ (n === "svg" || i.classList.contains("mui-icon") || n === "mui-icon") && !i.hasAttribute("size") && i.setAttribute("size", d);
957
1069
  }
958
1070
  });
959
1071
  }
960
- updateBadgeSizes(t) {
961
- const o = this.getAttribute("size") || "medium", a = {
1072
+ updateBadgeSizes(a) {
1073
+ const o = this.getAttribute("size") || "medium", t = {
962
1074
  "xx-small": "x-small",
963
1075
  "x-small": "x-small",
964
1076
  small: "small",
965
1077
  medium: "medium",
966
1078
  large: "large"
967
1079
  }[o] || "medium";
968
- t.forEach((n) => {
969
- if (n.nodeType === Node.ELEMENT_NODE) {
970
- const s = n;
971
- s.tagName.toLowerCase() === "mui-badge" && s.setAttribute("size", a);
1080
+ a.forEach((d) => {
1081
+ if (d.nodeType === Node.ELEMENT_NODE) {
1082
+ const e = d;
1083
+ e.tagName.toLowerCase() === "mui-badge" && e.setAttribute("size", t);
972
1084
  }
973
1085
  });
974
1086
  }
975
1087
  waitForPartMap() {
976
- return new Promise((t) => {
977
- if (typeof v == "function") return t();
1088
+ return new Promise((a) => {
1089
+ if (typeof f == "function") return a();
978
1090
  const o = () => {
979
- typeof v == "function" ? t() : requestAnimationFrame(o);
1091
+ typeof f == "function" ? a() : requestAnimationFrame(o);
980
1092
  };
981
1093
  o();
982
1094
  });
983
1095
  }
984
1096
  }
985
- customElements.get("mui-link") || customElements.define("mui-link", g);
1097
+ customElements.get("mui-link") || customElements.define("mui-link", b);