@muibook/components 9.1.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +3 -7
  2. package/dist/esm/components/mui-accordion/block/index.js +6 -6
  3. package/dist/esm/components/mui-alert/index.js +43 -40
  4. package/dist/esm/components/mui-badge/index.js +15 -7
  5. package/dist/esm/components/mui-button/index.js +41 -42
  6. package/dist/esm/components/mui-card/body/index.js +31 -31
  7. package/dist/esm/components/mui-card/card/index.js +6 -6
  8. package/dist/esm/components/mui-card/footer/index.js +10 -10
  9. package/dist/esm/components/mui-carousel/controller/index.js +75 -9
  10. package/dist/esm/components/mui-chip/index.js +40 -31
  11. package/dist/esm/components/mui-dropdown/index.js +45 -44
  12. package/dist/esm/components/mui-icons/ai/index.js +52 -0
  13. package/dist/esm/components/mui-icons/index.js +8 -0
  14. package/dist/esm/components/mui-icons/pin/index.js +53 -0
  15. package/dist/esm/components/mui-icons/pin-slash/index.js +53 -0
  16. package/dist/esm/components/mui-icons/rectangle/index.js +55 -0
  17. package/dist/esm/components/mui-icons/rectangle-bottom-panel/index.js +58 -0
  18. package/dist/esm/components/mui-icons/rectangle-dashed/index.js +55 -0
  19. package/dist/esm/components/mui-icons/rectangle-left-drawer/index.js +55 -0
  20. package/dist/esm/components/mui-icons/rectangle-media-text/index.js +55 -0
  21. package/dist/esm/components/mui-link/index.js +44 -44
  22. package/dist/esm/components/mui-slat/slat/index.js +6 -6
  23. package/dist/esm/components/mui-switch/index.js +19 -19
  24. package/dist/esm/components/mui-table/cell/index.js +4 -4
  25. package/dist/esm/components/mui-tabs/item/index.js +9 -9
  26. package/dist/esm/components/mui-tabs/tab-bar/index.js +17 -16
  27. package/dist/esm/css/mui-brand.css +1 -1
  28. package/dist/esm/css/mui-tokens.css +4 -0
  29. package/dist/esm/custom-elements.json +839 -409
  30. package/dist/esm/index.js +12 -4
  31. package/dist/types/components/mui-icons/ai.d.ts +1 -0
  32. package/dist/types/components/mui-icons/index.d.ts +8 -0
  33. package/dist/types/components/mui-icons/pin-slash.d.ts +1 -0
  34. package/dist/types/components/mui-icons/pin.d.ts +1 -0
  35. package/dist/types/components/mui-icons/rectangle-bottom-panel.d.ts +1 -0
  36. package/dist/types/components/mui-icons/rectangle-dashed.d.ts +1 -0
  37. package/dist/types/components/mui-icons/rectangle-left-drawer.d.ts +1 -0
  38. package/dist/types/components/mui-icons/rectangle-media-text.d.ts +1 -0
  39. package/dist/types/components/mui-icons/rectangle.d.ts +1 -0
  40. package/dist/types/index.d.ts +8 -0
  41. package/package.json +29 -1
package/README.md CHANGED
@@ -183,19 +183,15 @@ npm publish
183
183
 
184
184
  - npm run token-build
185
185
 
186
- ---
187
-
188
186
  ## NPM Token REFRESH
189
187
 
190
- Refreshing Your npm Access Token (90-Day Expiry)
191
-
192
- ### Description:
188
+ I have to login everytime it seems.
193
189
 
194
- npm login tokens expire every 90 days. When they do, you must log in again before publishing packages. No other setup needs to be repeated.
190
+ npm login tokens expire every 90 days When they do, you must log in again before publishing packages. No other setup needs to be repeated.
195
191
 
196
192
  ### Steps:
197
193
 
198
- 1. Run npm login to refresh your token.
194
+ 1. Run `npm login` to refresh your token.
199
195
  2. Publish normally with `npm publish --access public`
200
196
  3. Repeat npm login every 90 days when prompted.
201
197
 
@@ -99,31 +99,31 @@ class u extends HTMLElement {
99
99
  }
100
100
 
101
101
  /* Card Slot (Supports: Table Cell, Accordion Block) */
102
- :host(.card-slot) .accordion-summary {
102
+ :host([card-slot]) .accordion-summary {
103
103
  padding-left: var(--space-500);
104
104
  padding-right: var(--space-500);
105
105
  }
106
106
  @media (min-width: 768px) {
107
- :host(.card-slot) .accordion-summary {
107
+ :host([card-slot]) .accordion-summary {
108
108
  padding-left: var(--space-600);
109
109
  padding-right: var(--space-600);
110
110
  }
111
111
  }
112
- :host(.card-slot) .accordion-detail-inner {
112
+ :host([card-slot]) .accordion-detail-inner {
113
113
  padding-left: var(--space-500);
114
114
  padding-right: var(--space-500);
115
115
  }
116
116
  @media (min-width: 768px) {
117
- :host(.card-slot) .accordion-detail-inner {
117
+ :host([card-slot]) .accordion-detail-inner {
118
118
  padding-left: var(--space-600);
119
119
  padding-right: var(--space-600);
120
120
  }
121
121
  }
122
- :host(.card-slot) .detail-space-none {
122
+ :host([card-slot]) .detail-space-none {
123
123
  padding: 0;
124
124
  }
125
125
  @media (min-width: 768px) {
126
- :host(.card-slot) .detail-space-none {
126
+ :host([card-slot]) .detail-space-none {
127
127
  padding: 0;
128
128
  }
129
129
  }
@@ -3,10 +3,10 @@ import "../mui-icons/check/index.js";
3
3
  import "../mui-icons/info/index.js";
4
4
  import "../mui-icons/warning/index.js";
5
5
  import "../mui-icons/attention/index.js";
6
- function b(d) {
6
+ function g(d) {
7
7
  return ["positive", "info", "warning", "attention"].includes(d);
8
8
  }
9
- class m extends HTMLElement {
9
+ class v extends HTMLElement {
10
10
  constructor() {
11
11
  super(), this.actionSlotListener = null, this.attachShadow({ mode: "open" });
12
12
  }
@@ -16,26 +16,26 @@ class m extends HTMLElement {
16
16
  connectedCallback() {
17
17
  this.render();
18
18
  }
19
- attributeChangedCallback(i, o, t) {
20
- i === "variant" && o !== t && this.shadowRoot && this.render();
19
+ attributeChangedCallback(e, o, t) {
20
+ e === "variant" && o !== t && this.shadowRoot && this.render();
21
21
  }
22
22
  render() {
23
- const i = this.getAttribute("variant") || "positive", o = {
23
+ const e = this.getAttribute("variant") || "positive", o = {
24
24
  success: "positive",
25
25
  error: "attention"
26
- }, t = b(i) ? i : o[i] || "positive";
27
- if (i !== t) {
26
+ }, t = g(e) ? e : o[e] || "positive";
27
+ if (e !== t) {
28
28
  this.setAttribute("variant", t);
29
29
  return;
30
30
  }
31
- const s = {
31
+ const c = {
32
32
  positive: "polite",
33
33
  info: "polite",
34
34
  warning: "assertive",
35
35
  attention: "assertive"
36
36
  };
37
- this.setAttribute("role", "alert"), this.setAttribute("aria-live", s[t] || "polite");
38
- const r = {
37
+ this.setAttribute("role", "alert"), this.setAttribute("aria-live", c[t] || "polite");
38
+ const l = {
39
39
  positive: "mui-icon-check",
40
40
  info: "mui-icon-info",
41
41
  warning: "mui-icon-warning",
@@ -45,20 +45,27 @@ class m extends HTMLElement {
45
45
  info: "--feedback-info-icon",
46
46
  warning: "--feedback-warning-icon",
47
47
  attention: "--feedback-attention-icon"
48
- }, e = {
48
+ }, n = {
49
49
  positive: "--feedback-positive-text",
50
50
  info: "--feedback-info-text",
51
51
  warning: "--feedback-warning-text",
52
52
  attention: "--feedback-attention-text"
53
- }, n = {
53
+ }, s = {
54
54
  positive: "Success!",
55
55
  info: "Info:",
56
56
  warning: "Warning!",
57
57
  attention: "Error!"
58
- }, c = r[t], p = a[t], g = e[t], u = n[t], h = (
58
+ }, i = l[t], r = a[t], p = n[t], u = s[t], b = (
59
59
  /*css*/
60
60
  `
61
+
61
62
  :host {
63
+ display: block;
64
+ width: 100%;
65
+ box-sizing: border-box;
66
+ }
67
+
68
+ section {
62
69
  border-radius: var(--alert-radius);
63
70
  padding-left: var(--alert-padding);
64
71
  padding-right: var(--alert-padding);
@@ -69,6 +76,8 @@ class m extends HTMLElement {
69
76
  align-items: start;
70
77
  gap: var(--alert-gap-horizontal-mobile);
71
78
  box-sizing: border-box;
79
+ border: var(--feedback-${t}-border);
80
+ background: var(--feedback-${t}-background);
72
81
  }
73
82
 
74
83
  .icon,
@@ -77,7 +86,7 @@ class m extends HTMLElement {
77
86
  padding-bottom: var(--alert-padding);
78
87
  }
79
88
 
80
- :host([has-action]) {
89
+ section[has-action] {
81
90
  padding-right: var(--space-100);
82
91
  grid-template-columns: auto 1fr auto;
83
92
  }
@@ -86,14 +95,14 @@ class m extends HTMLElement {
86
95
  ::slotted(mui-link[slot="action"]) { padding-top: var(--space-100); }
87
96
 
88
97
  @media (min-width: 600px) {
89
- :host { gap: var(--alert-gap-horizontal-desktop); }
90
- :host([has-action]) { padding-right: var(--space-100); }
98
+ :section { gap: var(--alert-gap-horizontal-desktop); }
99
+ :section([has-action]) { padding-right: var(--space-100); }
91
100
  ::slotted(mui-button[slot="action"]),
92
101
  ::slotted(mui-link[slot="action"]) { align-self: center; padding-top: var(--space-000); }
93
102
  }
94
103
 
95
104
  .label {
96
- color: var(${g});
105
+ color: var(${p});
97
106
  font-weight: var(--font-weight-bold);
98
107
  }
99
108
 
@@ -105,45 +114,39 @@ class m extends HTMLElement {
105
114
  gap: var(--space-000);
106
115
  }
107
116
 
108
- ${["positive", "info", "warning", "attention"].map(
109
- (l) => (
110
- /*css*/
111
- `
112
- :host([variant="${l}"]) {
113
- border: var(--feedback-${l}-border);
114
- background: var(--feedback-${l}-background);
115
- }
116
- `
117
- )
118
- ).join("")}
119
117
  `
120
118
  );
121
119
  this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
122
120
  `
123
- <style>${h}</style>
124
- <${c} size="medium" color="var(${p})" class="icon"></${c}>
121
+ <style>${b}</style>
122
+ <section>
123
+ <${i} size="medium" color="var(${r})" class="icon"></${i}>
125
124
  <mui-body>
126
125
  <span class="label">${u}</span>
127
126
  <slot></slot>
128
127
  </mui-body>
129
128
  <slot name="action"></slot>
129
+ </section>
130
130
  `, this.setupActionSlot());
131
131
  }
132
132
  setupActionSlot() {
133
133
  var o;
134
- const i = (o = this.shadowRoot) == null ? void 0 : o.querySelector('slot[name="action"]');
135
- if (i) {
136
- this.actionSlotListener && i.removeEventListener("slotchange", this.actionSlotListener);
134
+ const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector('slot[name="action"]');
135
+ if (e) {
136
+ this.actionSlotListener && e.removeEventListener("slotchange", this.actionSlotListener);
137
137
  const t = () => {
138
- const s = this.getAttribute("variant") || "positive", r = i.assignedElements();
138
+ var s;
139
+ const c = this.getAttribute("variant") || "positive", l = e.assignedElements();
139
140
  let a = !1;
140
- r.forEach((e) => {
141
- const n = e.tagName;
142
- (n === "MUI-BUTTON" || n === "MUI-LINK") && (a = !0, e.setAttribute("variant", "tertiary"), e.classList.add("alert-slot", `alert-${s}-slot`));
143
- }), a ? this.setAttribute("has-action", "") : this.removeAttribute("has-action");
141
+ l.forEach((i) => {
142
+ const r = i.tagName;
143
+ (r === "MUI-BUTTON" || r === "MUI-LINK") && (a = !0, i.setAttribute("variant", "tertiary"), i.removeAttribute("alert-slot"), i.removeAttribute("alert-positive-slot"), i.removeAttribute("alert-info-slot"), i.removeAttribute("alert-warning-slot"), i.removeAttribute("alert-attention-slot"), i.setAttribute("alert-slot", ""), i.setAttribute(`alert-${c}-slot`, ""));
144
+ });
145
+ const n = (s = this.shadowRoot) == null ? void 0 : s.querySelector("section");
146
+ n && (a ? n.setAttribute("has-action", "") : n.removeAttribute("has-action"));
144
147
  };
145
- this.actionSlotListener = t, i.addEventListener("slotchange", this.actionSlotListener), requestAnimationFrame(t);
148
+ this.actionSlotListener = t, e.addEventListener("slotchange", this.actionSlotListener), requestAnimationFrame(t);
146
149
  }
147
150
  }
148
151
  }
149
- customElements.get("mui-alert") || customElements.define("mui-alert", m);
152
+ customElements.get("mui-alert") || customElements.define("mui-alert", v);
@@ -12,23 +12,29 @@ class n extends HTMLElement {
12
12
  this.render();
13
13
  }
14
14
  render() {
15
- const t = this.getAttribute("variant") || "neutral", a = {
15
+ const t = this.getAttribute("variant") || "neutral", e = {
16
16
  neutral: "var(--badge-background-neutral)",
17
17
  positive: "var(--badge-background-positive)",
18
18
  warning: "var(--badge-background-warning)",
19
19
  attention: "var(--badge-background-attention)"
20
- }, e = {
20
+ }, a = {
21
21
  neutral: "off",
22
22
  positive: "polite",
23
23
  warning: "assertive",
24
24
  attention: "assertive"
25
- }, r = a[t], i = e[t], s = (
25
+ }, i = e[t], r = a[t], s = (
26
26
  /*css*/
27
27
  `
28
28
  :host {
29
- display: inline-block;
29
+ display: inline-flex;
30
+ box-sizing: border-box;
31
+ }
32
+
33
+ .badge {
34
+ display: inline-flex;
35
+ align-items: center;
30
36
  border-radius: var(--badge-radius);
31
- background: ${r};
37
+ background: ${i};
32
38
  font-size: var(--text-font-size-xs);
33
39
  font-weight: var(--badge-font-weight);
34
40
  color: var(--badge-text-color);
@@ -41,10 +47,12 @@ class n extends HTMLElement {
41
47
  }
42
48
  `
43
49
  );
44
- this.setAttribute("role", "status"), this.setAttribute("aria-live", i), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
50
+ this.setAttribute("role", "status"), this.setAttribute("aria-live", r), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
45
51
  `
46
52
  <style>${s}</style>
47
- <slot></slot>
53
+ <span class="badge">
54
+ <slot></slot>
55
+ </span>
48
56
  `);
49
57
  }
50
58
  }
@@ -295,63 +295,63 @@ class h extends HTMLElement {
295
295
  /* ========================================================================== */
296
296
 
297
297
 
298
- :host(.alert-positive-slot) {
298
+ :host([alert-positive-slot]) {
299
299
  --alert-text: var(--feedback-positive-text);
300
300
  --alert-icon: var(--feedback-positive-icon);
301
301
  --alert-bg-hover: var(--feedback-positive-action-background);
302
302
  }
303
303
 
304
- :host(.alert-info-slot) {
304
+ :host([alert-info-slot]) {
305
305
  --alert-text: var(--feedback-info-text);
306
306
  --alert-icon: var(--feedback-info-icon);
307
307
  --alert-bg-hover: var(--feedback-info-action-background);
308
308
  }
309
309
 
310
- :host(.alert-warning-slot) {
310
+ :host([alert-warning-slot]) {
311
311
  --alert-text: var(--feedback-warning-text);
312
312
  --alert-icon: var(--feedback-warning-icon);
313
313
  --alert-bg-hover: var(--feedback-warning-action-background);
314
314
  }
315
315
 
316
- :host(.alert-attention-slot) {
316
+ :host([alert-attention-slot]) {
317
317
  --alert-text: var(--feedback-attention-text);
318
318
  --alert-icon: var(--feedback-attention-icon);
319
319
  --alert-bg-hover: var(--feedback-attention-action-background);
320
320
  }
321
321
 
322
- :host(.alert-slot) button {
322
+ :host([alert-slot]) button {
323
323
  font-weight: var(--font-weight-semi-bold);
324
324
  color: var(--alert-text);
325
325
  }
326
326
 
327
- :host(.alert-slot) button:hover,
328
- :host(.alert-slot) button:focus-visible {
327
+ :host([alert-slot]) button:hover,
328
+ :host([alert-slot]) button:focus-visible {
329
329
  background: var(--alert-bg-hover);
330
330
  color: var(--alert-text);
331
331
  }
332
332
 
333
- :host(.alert-slot) ::slotted(.mui-icon),
334
- :host(.alert-slot):hover ::slotted(.mui-icon),
335
- :host(.alert-slot):focus-visible ::slotted(.mui-icon) {
333
+ :host([alert-slot]) ::slotted(.mui-icon),
334
+ :host([alert-slot]):hover ::slotted(.mui-icon),
335
+ :host([alert-slot]):focus-visible ::slotted(.mui-icon) {
336
336
  fill: var(--alert-icon);
337
337
  }
338
338
 
339
339
  /* Dropdown Slot */
340
- :host([size].dropdown-slot) button {
340
+ :host([size][dropdown-slot]) button {
341
341
  border-radius: var(--radius-000);
342
342
  }
343
343
 
344
- :host(.dropdown-slot) button:hover,
345
- :host(.dropdown-slot) button:focus {
344
+ :host([dropdown-slot]) button:hover,
345
+ :host([dropdown-slot]) button:focus {
346
346
  background: var(--dropdown-button-background-hover);
347
347
  }
348
348
 
349
- :host([size].dropdown-slot-first) button {
349
+ :host([size][dropdown-slot-first]) button {
350
350
  border-top-left-radius: calc(var(--radius-100) / 2);
351
351
  border-top-right-radius: calc(var(--radius-100) / 2);
352
352
  }
353
353
 
354
- :host([size].dropdown-slot-last) button {
354
+ :host([size][dropdown-slot-last]) button {
355
355
  border-bottom-left-radius: calc(var(--radius-100) / 2);
356
356
  border-bottom-right-radius: calc(var(--radius-100) / 2);
357
357
  }
@@ -383,31 +383,30 @@ class h extends HTMLElement {
383
383
 
384
384
  /* Before & After Icon
385
385
  ========================================= */
386
- :host(.has-after) button,
387
- :host(.has-before) button,
388
- :host(.has-after.has-before) button {
386
+ :host([has-after]) button,
387
+ :host([has-before]) button,
388
+ :host([has-after][has-before]) button {
389
389
  display: grid;
390
390
  align-items: center;
391
391
  gap: var(--space-100);
392
392
  }
393
-
394
- :host(.has-after.has-before) button {
393
+
394
+ :host([has-after][has-before]) button {
395
395
  grid-template-columns: auto 1fr auto;
396
396
  padding-right: var(--action-after-slot-padding);
397
397
  padding-left: var(--action-before-slot-padding);
398
398
  }
399
399
 
400
- :host(.has-after) button {
400
+ :host([has-after]) button {
401
401
  grid-template-columns: 1fr auto;
402
402
  padding-right: var(--action-after-slot-padding);
403
403
  }
404
404
 
405
- :host(.has-before) button {
405
+ :host([has-before]) button {
406
406
  grid-template-columns: auto 1fr;
407
407
  padding-left: var(--action-before-slot-padding);
408
408
  }
409
409
 
410
-
411
410
  /* Size Variants
412
411
  ========================================= */
413
412
  :host([size="x-small"]) button,
@@ -463,60 +462,60 @@ class h extends HTMLElement {
463
462
 
464
463
  /* Before & After Icon
465
464
  ========================================= */
466
- :host([size="x-small"].has-after) button,
467
- :host([size="x-small"].has-before) button,
468
- :host([size="x-small"].has-after.has-before) button {
465
+ :host([size="x-small"][has-after]) button,
466
+ :host([size="x-small"][has-before]) button,
467
+ :host([size="x-small"][has-after][has-before]) button {
469
468
  gap: var(--space-025);
470
469
  }
471
470
 
472
- :host([size="x-small"].has-after.has-before) button {
471
+ :host([size="x-small"][has-after][has-before]) button {
473
472
  padding-right: var(--action-after-slot-padding-x-small);
474
473
  padding-left: var(--action-before-slot-padding-x-small);
475
474
  }
476
475
 
477
- :host([size="x-small"].has-after) button {
476
+ :host([size="x-small"][has-after]) button {
478
477
  padding-right: var(--action-after-slot-padding-x-small);
479
478
  }
480
479
 
481
- :host([size="x-small"].has-before) button {
480
+ :host([size="x-small"][has-before]) button {
482
481
  padding-left: var(--action-before-slot-padding-x-small);
483
482
  }
484
483
 
485
- :host([size="small"].has-after) button,
486
- :host([size="small"].has-before) button,
487
- :host([size="small"].has-after.has-before) button {
484
+ :host([size="small"][has-after]) button,
485
+ :host([size="small"][has-before]) button,
486
+ :host([size="small"][has-after][has-before]) button {
488
487
  gap: var(--space-050);
489
488
  }
490
489
 
491
- :host([size="small"].has-after.has-before) button {
490
+ :host([size="small"][has-after][has-before]) button {
492
491
  padding-right: var(--action-after-slot-padding-small);
493
492
  padding-left: var(--action-before-slot-padding-small);
494
493
  }
495
494
 
496
- :host([size="small"].has-after) button {
495
+ :host([size="small"][has-after]) button {
497
496
  padding-right: var(--action-after-slot-padding-small);
498
497
  }
499
498
 
500
- :host([size="small"].has-before) button {
499
+ :host([size="small"][has-before]) button {
501
500
  padding-left: var(--action-before-slot-padding-small);
502
501
  }
503
502
 
504
- :host([size="large"].has-after) button,
505
- :host([size="large"].has-before) button,
506
- :host([size="large"].has-after.has-before) button {
503
+ :host([size="large"][has-after]) button,
504
+ :host([size="large"][has-before]) button,
505
+ :host([size="large"][has-after][has-before]) button {
507
506
  gap: var(--space-200);
508
507
  }
509
508
 
510
- :host([size="large"].has-after.has-before) button {
509
+ :host([size="large"][has-after][has-before]) button {
511
510
  padding-right: var(--action-after-slot-padding-large);
512
511
  padding-left: var(--action-before-slot-padding-large);
513
512
  }
514
513
 
515
- :host([size="large"].has-after) button {
514
+ :host([size="large"][has-after]) button {
516
515
  padding-right: var(--action-after-slot-padding-large);
517
516
  }
518
517
 
519
- :host([size="large"].has-before) button {
518
+ :host([size="large"][has-before]) button {
520
519
  padding-left: var(--action-before-slot-padding-large);
521
520
  }
522
521
 
@@ -544,7 +543,7 @@ class h extends HTMLElement {
544
543
  var c;
545
544
  return s.nodeType === Node.ELEMENT_NODE || s.nodeType === Node.TEXT_NODE && !!((c = s.textContent) != null && c.trim());
546
545
  }) : !1, d = a(t), u = a(i);
547
- this.classList.toggle("has-before", d), this.classList.toggle("has-after", u);
546
+ this.toggleAttribute("has-before", d), this.toggleAttribute("has-after", u);
548
547
  const v = (e == null ? void 0 : e.assignedNodes({ flatten: !0 })) ?? [];
549
548
  v.every((l) => {
550
549
  var s;
@@ -1,4 +1,4 @@
1
- class l extends HTMLElement {
1
+ class d extends HTMLElement {
2
2
  static get observedAttributes() {
3
3
  return ["condensed"];
4
4
  }
@@ -8,41 +8,41 @@ class l extends HTMLElement {
8
8
  connectedCallback() {
9
9
  this.render();
10
10
  }
11
- attributeChangedCallback(o, r, a) {
12
- o === "condensed" && this.updateSlottedContent();
11
+ attributeChangedCallback(s, a, r) {
12
+ s === "condensed" && this.updateSlottedContent();
13
13
  }
14
14
  updateSlottedContent() {
15
15
  requestAnimationFrame(() => {
16
16
  if (!this.shadowRoot) return;
17
- const o = this.shadowRoot.querySelector("slot");
18
- if (!o) return;
19
- const r = o.assignedNodes({ flatten: !0 });
20
- this.classList.remove("inner-space", "has-card-slat-group", "has-accordion-slat-group");
21
- let a = !1;
22
- r.forEach((c) => {
23
- if (c.nodeType === Node.ELEMENT_NODE) {
24
- const t = c, i = t.tagName.toLowerCase() === "mui-accordion-group" ? t : t.querySelector("mui-accordion-group");
25
- i instanceof HTMLElement && (i.querySelectorAll("mui-accordion-block").forEach((s) => {
26
- s.classList.add("card-slot");
27
- }), a = !0), (t.tagName.toLowerCase() === "mui-slat" ? [t] : Array.from(t.querySelectorAll("mui-slat"))).forEach((e) => {
28
- const s = e.getAttribute("variant");
29
- (s === "action" || s === "row") && (e.classList.add("card-slot"), this.hasAttribute("condensed") ? e.classList.add("condensed-slot") : e.classList.remove("condensed-slot"));
17
+ const s = this.shadowRoot.querySelector("slot");
18
+ if (!s) return;
19
+ const a = s.assignedNodes({ flatten: !0 });
20
+ this.removeAttribute("inner-space"), this.removeAttribute("has-card-slat-group"), this.removeAttribute("has-accordion-slat-group");
21
+ let r = !1;
22
+ a.forEach((i) => {
23
+ if (i.nodeType === Node.ELEMENT_NODE) {
24
+ const t = i, n = t.tagName.toLowerCase() === "mui-accordion-group" ? t : t.querySelector("mui-accordion-group");
25
+ n instanceof HTMLElement && (n.querySelectorAll("mui-accordion-block").forEach((o) => {
26
+ o.setAttribute("card-slot", "");
27
+ }), r = !0), (t.tagName.toLowerCase() === "mui-slat" ? [t] : Array.from(t.querySelectorAll("mui-slat"))).forEach((e) => {
28
+ const o = e.getAttribute("variant");
29
+ (o === "action" || o === "row") && (e.setAttribute("card-slot", ""), this.hasAttribute("condensed") ? e.setAttribute("condensed-slot", "") : e.removeAttribute("condensed-slot"));
30
30
  });
31
- const n = t.tagName.toLowerCase() === "mui-table" ? t : t.querySelector("mui-table");
32
- n instanceof HTMLElement && (n.querySelectorAll("mui-cell").forEach((s) => {
33
- s.classList.add("card-slot");
34
- }), a = !0);
35
- const d = t.tagName.toLowerCase() === "mui-slat-group" ? [t] : Array.from(t.querySelectorAll("mui-slat-group"));
36
- d.length && (a = !0, d.forEach((e) => {
37
- e.setAttribute("usage", "card"), e.closest("mui-accordion-block") ? this.classList.add("has-accordion-slat-group") : this.classList.add("inner-space", "has-card-slat-group");
31
+ const c = t.tagName.toLowerCase() === "mui-table" ? t : t.querySelector("mui-table");
32
+ c instanceof HTMLElement && (c.querySelectorAll("mui-cell").forEach((o) => {
33
+ o.setAttribute("card-slot", "");
34
+ }), r = !0);
35
+ const l = t.tagName.toLowerCase() === "mui-slat-group" ? [t] : Array.from(t.querySelectorAll("mui-slat-group"));
36
+ l.length && (r = !0, l.forEach((e) => {
37
+ e.setAttribute("usage", "card"), e.closest("mui-accordion-block") ? this.setAttribute("has-accordion-slat-group", "") : (this.setAttribute("inner-space", ""), this.setAttribute("has-card-slat-group", ""));
38
38
  }));
39
39
  }
40
- }), !a && !this.hasAttribute("condensed") && this.classList.add("inner-space");
40
+ }), !r && !this.hasAttribute("condensed") && this.setAttribute("inner-space", "");
41
41
  });
42
42
  }
43
43
  render() {
44
44
  if (!this.shadowRoot) return;
45
- const o = (
45
+ const s = (
46
46
  /*html*/
47
47
  `
48
48
  <style>
@@ -51,20 +51,20 @@ class l extends HTMLElement {
51
51
  box-sizing: border-box;
52
52
  }
53
53
 
54
- :host(.inner-space) {
54
+ :host([inner-space]) {
55
55
  padding: var(--space-500);
56
56
  }
57
57
  @media (min-width: 768px) {
58
- :host(.inner-space) {
58
+ :host([inner-space]) {
59
59
  padding: var(--space-600);
60
60
  }
61
61
  }
62
62
 
63
- :host(.has-card-slat-group) {
63
+ :host([has-card-slat-group]) {
64
64
  padding-bottom: var(--space-200);
65
65
  }
66
66
  @media (min-width: 768px) {
67
- :host(.has-card-slat-group) {
67
+ :host([has-card-slat-group]) {
68
68
  padding-bottom: var(--space-500);
69
69
  }
70
70
  }
@@ -73,7 +73,7 @@ class l extends HTMLElement {
73
73
  <slot></slot>
74
74
  `
75
75
  );
76
- this.shadowRoot.innerHTML = o, this.updateSlottedContent();
76
+ this.shadowRoot.innerHTML = s, this.updateSlottedContent();
77
77
  }
78
78
  }
79
- customElements.get("mui-card-body") || customElements.define("mui-card-body", l);
79
+ customElements.get("mui-card-body") || customElements.define("mui-card-body", d);
@@ -7,7 +7,7 @@ class n extends HTMLElement {
7
7
  }
8
8
  connectedCallback() {
9
9
  if (!this.shadowRoot) return;
10
- let d = (
10
+ let r = (
11
11
  /*html*/
12
12
  `
13
13
  <style>
@@ -19,24 +19,24 @@ class n extends HTMLElement {
19
19
  ::slotted(*:last-child) {
20
20
  margin-bottom: 0;
21
21
  }
22
- ::slotted(.inner-space-top) {
23
- padding-top: 0;
22
+ ::slotted([inner-space-top]) {
23
+ padding-top: 0;
24
24
  }
25
25
  </style>
26
26
  <slot></slot>
27
27
  `
28
28
  );
29
- this.shadowRoot.innerHTML = d;
29
+ this.shadowRoot.innerHTML = r;
30
30
  const t = this.shadowRoot.querySelector("slot");
31
31
  t && t.addEventListener("slotchange", () => {
32
- const a = t.assignedElements(), r = a.some((o) => {
32
+ const a = t.assignedElements(), d = a.some((o) => {
33
33
  var e;
34
34
  return ((e = o.tagName) == null ? void 0 : e.toLowerCase()) === "mui-card-header";
35
35
  }), s = a.find((o) => {
36
36
  var e;
37
37
  return ((e = o.tagName) == null ? void 0 : e.toLowerCase()) === "mui-card-body";
38
38
  });
39
- s && (r ? s.classList.add("inner-space-top") : s.classList.remove("inner-space-top"));
39
+ s && (d ? s.setAttribute("inner-space-top", "") : s.removeAttribute("inner-space-top"));
40
40
  });
41
41
  }
42
42
  }