@ctrliq/quantic-components 1.67.1 → 1.67.3

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 (74) hide show
  1. package/dist/alert/alert.d.ts +1 -1
  2. package/dist/alert/alert.js +4 -12
  3. package/dist/card/card-title.component.d.ts +1 -1
  4. package/dist/card/card-title.component.js +4 -12
  5. package/dist/card/card.component.d.ts +2 -1
  6. package/dist/card/card.component.js +9 -10
  7. package/dist/dialog/dialog-title.d.ts +1 -1
  8. package/dist/dialog/dialog-title.js +3 -11
  9. package/dist/dialog/dialog.d.ts +1 -1
  10. package/dist/dialog/dialog.js +4 -13
  11. package/dist/dropdown-menu/group.component.d.ts +2 -1
  12. package/dist/dropdown-menu/group.component.js +9 -3
  13. package/dist/field/field.component.d.ts +4 -3
  14. package/dist/field/field.component.js +59 -35
  15. package/dist/field/render-as-field.hoc.d.ts +1 -1
  16. package/dist/field/render-as-field.hoc.js +21 -8
  17. package/dist/index.js.map +1 -1
  18. package/dist/inline-edit/index.d.ts +2 -3
  19. package/dist/inline-edit/index.js +16 -8
  20. package/dist/layout/layout.component.d.ts +5 -4
  21. package/dist/layout/layout.component.js +37 -24
  22. package/dist/layout/sidebar.component.d.ts +1 -1
  23. package/dist/layout/sidebar.component.js +5 -5
  24. package/dist/meta/index.js.map +1 -1
  25. package/dist/option-card/option-card.component.d.ts +1 -1
  26. package/dist/option-card/option-card.component.js +4 -12
  27. package/dist/panel/panel-header.component.d.ts +1 -1
  28. package/dist/panel/panel-header.component.js +4 -16
  29. package/dist/panel/panel.component.d.ts +1 -1
  30. package/dist/panel/panel.component.js +4 -12
  31. package/dist/popover/popover-popup.d.ts +1 -1
  32. package/dist/popover/popover-popup.js +3 -3
  33. package/dist/popover/popover.d.ts +2 -2
  34. package/dist/quantic-components.js +260 -316
  35. package/dist/quantic-components.js.map +1 -1
  36. package/dist/quantic-components.min.js +1918 -1983
  37. package/dist/quantic-components.min.js.map +1 -1
  38. package/dist/shared/auto-hide-empty-slots.mixin.d.ts +19 -20
  39. package/dist/shared/auto-hide-empty-slots.mixin.js +43 -43
  40. package/dist/shared/quantic-element.d.ts +11 -1
  41. package/dist/shared/slot-utils.d.ts +24 -0
  42. package/dist/shared/slot-utils.js +38 -0
  43. package/dist/table/index.stories.d.ts +1 -0
  44. package/dist/table/index.stories.js +19 -0
  45. package/dist/table/table.component.d.ts +1 -1
  46. package/dist/table/table.component.js +3 -11
  47. package/dist/toast/toast.d.ts +1 -1
  48. package/dist/toast/toast.js +4 -12
  49. package/dist/toggle/index.d.ts +1 -1
  50. package/dist/toggle/index.js +1 -2
  51. package/dist/types/alert/alert.d.ts +1 -1
  52. package/dist/types/card/card-title.component.d.ts +1 -1
  53. package/dist/types/card/card.component.d.ts +2 -1
  54. package/dist/types/dialog/dialog-title.d.ts +1 -1
  55. package/dist/types/dialog/dialog.d.ts +1 -1
  56. package/dist/types/dropdown-menu/group.component.d.ts +2 -1
  57. package/dist/types/field/field.component.d.ts +4 -3
  58. package/dist/types/field/render-as-field.hoc.d.ts +1 -1
  59. package/dist/types/inline-edit/index.d.ts +2 -3
  60. package/dist/types/layout/layout.component.d.ts +5 -4
  61. package/dist/types/layout/sidebar.component.d.ts +1 -1
  62. package/dist/types/option-card/option-card.component.d.ts +1 -1
  63. package/dist/types/panel/panel-header.component.d.ts +1 -1
  64. package/dist/types/panel/panel.component.d.ts +1 -1
  65. package/dist/types/popover/popover-popup.d.ts +1 -1
  66. package/dist/types/popover/popover.d.ts +2 -2
  67. package/dist/types/shared/auto-hide-empty-slots.mixin.d.ts +19 -20
  68. package/dist/types/shared/quantic-element.d.ts +11 -1
  69. package/dist/types/shared/slot-utils.d.ts +24 -0
  70. package/dist/types/table/index.stories.d.ts +1 -0
  71. package/dist/types/table/table.component.d.ts +1 -1
  72. package/dist/types/toast/toast.d.ts +1 -1
  73. package/dist/types/toggle/index.d.ts +1 -1
  74. package/package.json +1 -1
@@ -195,125 +195,52 @@
195
195
  }
196
196
 
197
197
  /**
198
- * Base mixin that provides utilities for checking slot content.
199
- * This is the foundation for other slot-related patterns like:
200
- * - Slot-wins-over-attribute pattern
201
- * - Auto-hiding empty slots
202
- * - Conditional rendering based on slot content
198
+ * Mixin that automatically hides empty named slots using CSS only.
203
199
  *
204
- * @example
205
- * ```typescript
206
- * class MyComponent extends SlotContentMixin(LitElement) {
207
- * @property() label = '';
200
+ * Each named slot is hidden by default and revealed when the host has a light
201
+ * DOM child with a matching `slot` attribute. Two rules cover all browsers:
208
202
  *
209
- * render() {
210
- * return html`
211
- * ${this.hasSlotContent('label') || this.label
212
- * ? html`<label><slot name="label">${this.label}</slot></label>`
213
- * : ''}
214
- * `;
215
- * }
216
- * }
217
- * ```
218
- */
219
- const SlotContentMixin = (superClass) => {
220
- class SlotContentClass extends superClass {
221
- /**
222
- * Checks if a slot is empty by examining its assigned nodes.
223
- * A slot is considered empty if it has no element nodes and no text nodes with non-whitespace content.
224
- * @param slot The slot element to check (or slot name as string)
225
- * @returns true if the slot is empty, false otherwise
226
- */
227
- isSlotEmpty(slot) {
228
- const slotElement = typeof slot === 'string' ? this.getSlotByName(slot) : slot;
229
- return !(slotElement
230
- ?.assignedNodes({ flatten: true })
231
- .some((n) => n.nodeType !== Node.TEXT_NODE || n.textContent?.trim()) ?? false);
232
- }
233
- /**
234
- * Gets a slot element by name from the shadow root.
235
- * @param name The name of the slot
236
- * @returns The slot element or null if not found
237
- */
238
- getSlotByName(name) {
239
- return this.renderRoot.querySelector(`slot[name="${name}"]`);
240
- }
241
- /**
242
- * Checks if a named slot has content by examining the light DOM.
243
- * @param name The name of the slot to check
244
- * @returns true if the slot has content, false otherwise
245
- */
246
- hasSlotContent(name) {
247
- return (
248
- // First check light DOM for elements with matching slot attribute
249
- !!this.querySelector(`[slot="${name}"]`) ||
250
- // Fallback: check if shadow root slot has assigned content
251
- !this.isSlotEmpty(this.getSlotByName(name)));
252
- }
253
- /**
254
- * Gets the text content of a named slot from the light DOM.
255
- * @param name The name of the slot
256
- * @returns The text content of the slot or an empty string
257
- */
258
- getSlotTextContent(name) {
259
- const selector = name ? `[slot="${name}"]` : ':not([slot])';
260
- const slotElements = this.querySelectorAll(selector);
261
- return Array.from(slotElements)
262
- .map((el) => el.textContent?.trim() ?? '')
263
- .filter(Boolean)
264
- .join(' ');
265
- }
266
- }
267
- return SlotContentClass;
268
- };
269
-
270
- /**
271
- * Mixin that automatically hides empty slots using the `hidden` attribute.
272
- * Extends SlotContentMixin to inherit slot checking functionality.
203
+ * - `:host(:has([slot="name"]))` — Safari and Firefox
204
+ * - `@scope { :scope:has([slot="name"]) }` — Chrome (@scope changes the
205
+ * evaluation context so :has() can see light DOM children)
206
+ *
207
+ * The reveal value is `display: revert-layer` rather than `display: block` so
208
+ * that the component's own display value is restored instead of overridden.
209
+ * Component styles are placed in `@layer quantic-component` and the
210
+ * hide/reveal rules in `@layer quantic-slot-visibility` (declared after, so
211
+ * higher priority). `revert-layer` then falls back to whatever the component
212
+ * set in `quantic-component`.
273
213
  *
274
- * This is useful for components with optional sections that should not
275
- * take up space or affect layout when empty.
214
+ * CSS is injected via `finalizeStyles` so it lands in Lit SSR's Declarative
215
+ * Shadow DOM output no JS, no layout shift.
276
216
  *
277
217
  * @example
278
- * ```typescript
279
- * class MyComponent extends AutoHideEmptySlotsMixin(QuanticElement) {
280
- * render() {
281
- * return html`
282
- * <slot name="header" @slotchange=${this.handleAutoHide}></slot>
283
- * <slot></slot>
284
- * <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
285
- * `;
286
- * }
287
- * }
288
- * ```
218
+ * class MyElement extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {}
289
219
  */
290
- const AutoHideEmptySlotsMixin = (superClass) => {
291
- // First apply SlotContentMixin to get slot checking functionality
292
- const SlotContentBase = SlotContentMixin(superClass);
293
- class AutoHideEmptySlotsClass extends SlotContentBase {
294
- /**
295
- * Updates the visibility of a slot based on whether it has content.
296
- * @param slot The slot element to update
297
- */
298
- updateSlotVisibility(slot) {
299
- slot.toggleAttribute('hidden', this.isSlotEmpty(slot));
300
- }
301
- /**
302
- * Event handler for slotchange events.
303
- * Call this from your template to auto-hide slots on change.
304
- * @example `<slot name="header" @slotchange=${this.handleAutoHide}></slot>`
305
- */
306
- handleAutoHide(e) {
307
- this.updateSlotVisibility(e.target);
308
- }
309
- /**
310
- * Initialize slot visibility on first render.
311
- */
312
- firstUpdated(changedProperties) {
313
- super.firstUpdated(changedProperties);
314
- this.renderRoot
315
- .querySelectorAll('slot')
316
- .forEach((e) => this.updateSlotVisibility(e));
220
+ const AutoHideEmptySlotsMixin = (superClass, namedSlots = []) => {
221
+ if (namedSlots.length === 0)
222
+ return superClass;
223
+ // A component may declare a native CSSStyleSheet, which Lit passes through
224
+ // untouched wherever adoptedStyleSheets is supported.
225
+ const toCssText = (style) => 'cssText' in style
226
+ ? style.cssText
227
+ : Array.from(style.cssRules, (rule) => rule.cssText).join('\n');
228
+ const slotRulesCSS = namedSlots
229
+ .map((name) => [
230
+ `slot[name="${name}"] { display: none; }`,
231
+ `:host(:has([slot="${name}"])) slot[name="${name}"] { display: revert-layer; }`,
232
+ `@scope { :scope:has([slot="${name}"]) slot[name="${name}"] { display: revert-layer; } }`,
233
+ ].join(' '))
234
+ .join(' ');
235
+ class AutoHideEmptySlotsClass extends superClass {
236
+ static finalizeStyles(styles) {
237
+ const base = superClass.finalizeStyles?.call(this, styles) ?? [];
238
+ const baseCSS = base.map(toCssText).join('\n');
239
+ return [
240
+ r$6(`@layer quantic-component, quantic-slot-visibility;` +
241
+ ` @layer quantic-component { ${baseCSS} }` +
242
+ ` @layer quantic-slot-visibility { ${slotRulesCSS} }`),
243
+ ];
317
244
  }
318
245
  }
319
246
  return AutoHideEmptySlotsClass;
@@ -2601,7 +2528,7 @@
2601
2528
  exports.LucideIconInfo.ensureDefined();
2602
2529
  exports.LucideIconTriangleAlert.ensureDefined();
2603
2530
  exports.LucideIconX.ensureDefined();
2604
- exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement) {
2531
+ exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
2605
2532
  constructor() {
2606
2533
  super(...arguments);
2607
2534
  this.type = AlertType.Info;
@@ -2646,17 +2573,9 @@
2646
2573
  <slot name="icon">${this.renderDefaultIcon()}</slot>
2647
2574
  </span>
2648
2575
  <div class="content">
2649
- <slot
2650
- name="title"
2651
- class="title"
2652
- @slotchange=${this.handleAutoHide}
2653
- ></slot>
2654
- <slot class="body" @slotchange=${this.handleAutoHide}></slot>
2655
- <slot
2656
- name="action"
2657
- class="action"
2658
- @slotchange=${this.handleAutoHide}
2659
- ></slot>
2576
+ <slot name="title" class="title"></slot>
2577
+ <slot class="body"></slot>
2578
+ <slot name="action" class="action"></slot>
2660
2579
  </div>
2661
2580
  ${this.showCloseButton
2662
2581
  ? b `<quantic-button
@@ -6109,6 +6028,45 @@
6109
6028
  quanticElement('quantic-button-group-item')
6110
6029
  ], exports.ButtonGroupItem);
6111
6030
 
6031
+ /**
6032
+ * Returns true if a slot has at least one non-whitespace node assigned.
6033
+ */
6034
+ function slotHasContent(slot) {
6035
+ return slot
6036
+ .assignedNodes({ flatten: true })
6037
+ .some((n) => n.nodeType !== Node.TEXT_NODE || (n.textContent?.trim() ?? '') !== '');
6038
+ }
6039
+ /**
6040
+ * Returns the concatenated trimmed text content of all assigned nodes.
6041
+ */
6042
+ function slotTextContent(slot) {
6043
+ return slot
6044
+ .assignedNodes({ flatten: true })
6045
+ .map((n) => n.textContent?.trim() ?? '')
6046
+ .filter(Boolean)
6047
+ .join(' ');
6048
+ }
6049
+ /**
6050
+ * Returns a slotchange event handler that calls `setter` with whether the slot
6051
+ * has non-empty content.
6052
+ *
6053
+ * @example
6054
+ * html`<slot @slotchange=${onSlotChange((has) => (this._hasLabel = has))}></slot>`
6055
+ */
6056
+ function onSlotChange(setter) {
6057
+ return (e) => setter(slotHasContent(e.target));
6058
+ }
6059
+ /**
6060
+ * Returns a slotchange event handler that calls `setter` with the slot's text
6061
+ * content, falling back to `''` when empty.
6062
+ *
6063
+ * @example
6064
+ * html`<slot @slotchange=${onSlotTextChange((t) => (this._labelText = t))}></slot>`
6065
+ */
6066
+ function onSlotTextChange(setter) {
6067
+ return (e) => setter(slotTextContent(e.target));
6068
+ }
6069
+
6112
6070
  exports.GridDensity = void 0;
6113
6071
  (function (GridDensity) {
6114
6072
  GridDensity["Dense"] = "dense";
@@ -6135,7 +6093,7 @@
6135
6093
  */
6136
6094
  const CardGroupDensity = exports.GridDensity;
6137
6095
 
6138
- exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement) {
6096
+ exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer', 'action-icon']) {
6139
6097
  constructor() {
6140
6098
  super(...arguments);
6141
6099
  this.as = 'div';
@@ -6143,6 +6101,7 @@
6143
6101
  this.size = exports.CardSize.Medium;
6144
6102
  this.type = 'button';
6145
6103
  this.disabled = false;
6104
+ this.hasActionIconSlot = false;
6146
6105
  }
6147
6106
  render() {
6148
6107
  const classes = e$3({
@@ -6151,35 +6110,28 @@
6151
6110
  [`size--${this.size}`]: true,
6152
6111
  ['is-interactive']: this.as === 'button' || this.as === 'a',
6153
6112
  ['is-disabled']: this.disabled,
6154
- [`has-action-icon`]: this.hasSlotContent('action-icon'),
6113
+ [`has-action-icon`]: this.hasActionIconSlot,
6155
6114
  });
6156
- const handleSlotChange = (e) => {
6157
- this.handleAutoHide(e);
6158
- this.requestUpdate();
6159
- };
6160
6115
  const slots = u$2 `
6161
6116
  <slot
6162
6117
  name="header"
6163
6118
  class="header"
6164
6119
  data-description="Header area — place quantic-card-title and quantic-card-meta here."
6165
- @slotchange=${handleSlotChange}
6166
6120
  ></slot>
6167
6121
  <slot
6168
6122
  class="body"
6169
6123
  data-description="Main body content."
6170
- @slotchange=${handleSlotChange}
6171
6124
  ></slot>
6172
6125
  <slot
6173
6126
  name="footer"
6174
6127
  class="footer"
6175
6128
  data-description="Footer content, pinned to the bottom of the card."
6176
- @slotchange=${handleSlotChange}
6177
6129
  ></slot>
6178
6130
  <slot
6179
6131
  name="action-icon"
6180
6132
  class="action-icon"
6181
6133
  data-description="Icon in the top-right corner; only visible on interactive cards."
6182
- @slotchange=${handleSlotChange}
6134
+ @slotchange=${onSlotChange((has) => (this.hasActionIconSlot = has))}
6183
6135
  ></slot>
6184
6136
  `;
6185
6137
  if (this.as === 'button') {
@@ -6446,6 +6398,9 @@
6446
6398
  __decorate([
6447
6399
  prop({ type: 'string', description: 'Download filename (as="a" only).' })
6448
6400
  ], exports.Card.prototype, "download", void 0);
6401
+ __decorate([
6402
+ r$2()
6403
+ ], exports.Card.prototype, "hasActionIconSlot", void 0);
6449
6404
  exports.Card = __decorate([
6450
6405
  quanticElement('quantic-card')
6451
6406
  ], exports.Card);
@@ -7252,21 +7207,13 @@
7252
7207
  quanticElement('quantic-card-meta')
7253
7208
  ], exports.CardMeta);
7254
7209
 
7255
- exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement) {
7210
+ exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle']) {
7256
7211
  render() {
7257
7212
  return u$2 `
7258
7213
  <hgroup>
7259
- <slot
7260
- name="pretitle"
7261
- class="pretitle"
7262
- @slotchange=${this.handleAutoHide}
7263
- ></slot>
7264
- <slot class="title" @slotchange=${this.handleAutoHide}></slot>
7265
- <slot
7266
- name="subtitle"
7267
- class="subtitle"
7268
- @slotchange=${this.handleAutoHide}
7269
- ></slot>
7214
+ <slot name="pretitle" class="pretitle"></slot>
7215
+ <slot class="title"></slot>
7216
+ <slot name="subtitle" class="subtitle"></slot>
7270
7217
  </hgroup>
7271
7218
  `;
7272
7219
  }
@@ -8150,7 +8097,7 @@
8150
8097
  quanticElement('quantic-dialog-backdrop')
8151
8098
  ], exports.DialogBackdropElement);
8152
8099
 
8153
- exports.DialogTitle = class DialogTitle extends AutoHideEmptySlotsMixin(QuanticElement) {
8100
+ exports.DialogTitle = class DialogTitle extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle']) {
8154
8101
  constructor() {
8155
8102
  super(...arguments);
8156
8103
  this.level = '2';
@@ -8159,19 +8106,11 @@
8159
8106
  return b `
8160
8107
  <div class="main">
8161
8108
  <hgroup>
8162
- <slot
8163
- name="pretitle"
8164
- class="pretitle"
8165
- @slotchange=${this.handleAutoHide}
8166
- ></slot>
8109
+ <slot name="pretitle" class="pretitle"></slot>
8167
8110
  <div class="title" role="heading" aria-level=${this.level}>
8168
8111
  <slot></slot>
8169
8112
  </div>
8170
- <slot
8171
- name="subtitle"
8172
- class="subtitle"
8173
- @slotchange=${this.handleAutoHide}
8174
- ></slot>
8113
+ <slot name="subtitle" class="subtitle"></slot>
8175
8114
  </hgroup>
8176
8115
  </div>
8177
8116
  `;
@@ -10077,7 +10016,7 @@
10077
10016
  exports.DialogBackdropElement.ensureDefined();
10078
10017
  exports.Button.ensureDefined();
10079
10018
  exports.LucideIconX.ensureDefined();
10080
- exports.Dialog = class Dialog extends AutoHideEmptySlotsMixin(QuanticElement) {
10019
+ exports.Dialog = class Dialog extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
10081
10020
  constructor() {
10082
10021
  super(...arguments);
10083
10022
  this.open = false;
@@ -10336,20 +10275,11 @@
10336
10275
  </quantic-button>`
10337
10276
  : ''}
10338
10277
 
10339
- <slot
10340
- class="header"
10341
- name="header"
10342
- id=${this.headerId}
10343
- @slotchange=${this.handleAutoHide}
10344
- ></slot>
10278
+ <slot class="header" name="header" id=${this.headerId}></slot>
10345
10279
 
10346
- <slot class="body" @slotchange=${this.handleAutoHide}></slot>
10280
+ <slot class="body"></slot>
10347
10281
 
10348
- <slot
10349
- class="footer"
10350
- name="footer"
10351
- @slotchange=${this.handleAutoHide}
10352
- ></slot>
10282
+ <slot class="footer" name="footer"></slot>
10353
10283
  </div>
10354
10284
  </div>
10355
10285
  `;
@@ -10818,7 +10748,7 @@
10818
10748
  Manual: 'manual',
10819
10749
  };
10820
10750
 
10821
- exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement) {
10751
+ exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
10822
10752
  constructor() {
10823
10753
  super(...arguments);
10824
10754
  this.visible = false;
@@ -10826,9 +10756,9 @@
10826
10756
  render() {
10827
10757
  return b `
10828
10758
  <div class="main">
10829
- <slot name="header" @slotchange=${this.handleAutoHide}></slot>
10759
+ <slot name="header"></slot>
10830
10760
  <slot></slot>
10831
- <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
10761
+ <slot name="footer"></slot>
10832
10762
  </div>
10833
10763
  `;
10834
10764
  }
@@ -11829,16 +11759,17 @@
11829
11759
  quanticElement('quantic-dropdown-menu-item')
11830
11760
  ], exports.DropdownMenuItem);
11831
11761
 
11832
- exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement) {
11762
+ exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement, ['label']) {
11833
11763
  constructor() {
11834
11764
  super(...arguments);
11835
11765
  this.label = '';
11766
+ this.hasLabelSlot = false;
11836
11767
  }
11837
11768
  render() {
11838
- const hasLabel = this.label || this.hasSlotContent('label');
11769
+ const hasLabel = this.label || this.hasLabelSlot;
11839
11770
  return b `
11840
11771
  <div class="label" id="group-label" ?hidden=${!hasLabel}>
11841
- <slot name="label">${this.label}</slot>
11772
+ <slot name="label" @slotchange=${onSlotChange((has) => (this.hasLabelSlot = has))}>${this.label}</slot>
11842
11773
  </div>
11843
11774
  <div
11844
11775
  class="items"
@@ -11907,6 +11838,9 @@
11907
11838
  description: 'Section heading displayed above the group items.',
11908
11839
  })
11909
11840
  ], exports.DropdownMenuGroup.prototype, "label", void 0);
11841
+ __decorate([
11842
+ r$2()
11843
+ ], exports.DropdownMenuGroup.prototype, "hasLabelSlot", void 0);
11910
11844
  exports.DropdownMenuGroup = __decorate([
11911
11845
  quanticElement('quantic-dropdown-menu-group')
11912
11846
  ], exports.DropdownMenuGroup);
@@ -11937,7 +11871,7 @@
11937
11871
  Large: 'lg',
11938
11872
  };
11939
11873
 
11940
- exports.Field = class Field extends SlotContentMixin(QuanticElement) {
11874
+ exports.Field = class Field extends QuanticElement {
11941
11875
  constructor() {
11942
11876
  super(...arguments);
11943
11877
  this.fieldId = '';
@@ -11947,48 +11881,57 @@
11947
11881
  this.required = false;
11948
11882
  this.size = FieldSize.Medium;
11949
11883
  this.hintPosition = FieldHintPosition.Below;
11884
+ this.hasLabelSlot = false;
11885
+ this.hasHintSlot = false;
11886
+ this.hasMessageSlot = false;
11950
11887
  }
11951
11888
  render() {
11952
- const hasLabel = !!this.getSlotTextContent('label') || this.label;
11953
- const hasHint = !!this.getSlotTextContent('hint') || this.hint;
11954
- const hasMessage = !!this.getSlotTextContent('message') || this.message;
11955
- const hintTemplate = hasHint
11956
- ? b `
11957
- <div id="hint-${this.fieldId}" class="hint">
11958
- <slot name="hint">${this.hint}</slot>
11959
- </div>
11960
- `
11961
- : '';
11889
+ const hasLabel = this.hasLabelSlot || !!this.label;
11890
+ const hasHint = this.hasHintSlot || !!this.hint;
11891
+ const hasMessage = this.hasMessageSlot || !!this.message;
11892
+ const hintTemplate = b `
11893
+ <div
11894
+ id="hint-${this.fieldId}"
11895
+ class=${e$3({ hint: true, 'is-empty': !hasHint })}
11896
+ >
11897
+ <slot
11898
+ name="hint"
11899
+ @slotchange=${onSlotChange((v) => (this.hasHintSlot = v))}
11900
+ >${this.hint}</slot>
11901
+ </div>
11902
+ `;
11962
11903
  return b `
11963
11904
  <div class=${e$3({ main: true, [`size--${this.size}`]: true })}>
11964
- ${hasLabel
11965
- ? b `
11966
- <label id=${this.fieldId} class="label">
11967
- <slot name="label">${this.label}</slot>
11968
- ${this.required
11969
- ? b `<span class="required-indicator">*</span>`
11970
- : ''}
11971
- </label>
11972
- `
11905
+ <label
11906
+ id=${this.fieldId}
11907
+ class=${e$3({ label: true, 'is-empty': !hasLabel })}
11908
+ >
11909
+ <slot
11910
+ name="label"
11911
+ @slotchange=${onSlotChange((v) => (this.hasLabelSlot = v))}
11912
+ >${this.label}</slot>
11913
+ ${this.required
11914
+ ? b `<span class="required-indicator">*</span>`
11973
11915
  : ''}
11916
+ </label>
11974
11917
  ${this.hintPosition === 'above' ? hintTemplate : ''}
11975
11918
  <div class="control">
11976
11919
  <slot></slot>
11977
11920
  ${this.hintPosition === 'below' ? hintTemplate : ''}
11978
- ${hasMessage
11979
- ? b `
11980
- <div
11981
- id="message-${this.fieldId}"
11982
- class=${e$3({
11983
- message: true,
11984
- [`message--state-${this.status}`]: !!this.status,
11985
- })}
11986
- role="alert"
11987
- >
11988
- <slot name="message">${this.message}</slot>
11989
- </div>
11990
- `
11991
- : ''}
11921
+ <div
11922
+ id="message-${this.fieldId}"
11923
+ class=${e$3({
11924
+ message: true,
11925
+ 'is-empty': !hasMessage,
11926
+ [`message--state-${this.status}`]: !!this.status,
11927
+ })}
11928
+ role="alert"
11929
+ >
11930
+ <slot
11931
+ name="message"
11932
+ @slotchange=${onSlotChange((v) => (this.hasMessageSlot = v))}
11933
+ >${this.message}</slot>
11934
+ </div>
11992
11935
  </div>
11993
11936
  </div>
11994
11937
  `;
@@ -12054,6 +11997,11 @@
12054
11997
  color: var(--quantic-text-secondary);
12055
11998
  }
12056
11999
 
12000
+ /* Sections render unconditionally so their slots exist to fire slotchange. */
12001
+ .is-empty {
12002
+ display: none;
12003
+ }
12004
+
12057
12005
  .size--xs {
12058
12006
  --quantic-component-field-label-font-size: var(
12059
12007
  --quantic-font-size-body-xs
@@ -12162,6 +12110,15 @@
12162
12110
  __decorate([
12163
12111
  prop({ type: 'FieldHintPosition', options: Object.values(FieldHintPosition), default: FieldHintPosition.Below, attribute: 'hint-position', description: 'Position of the hint relative to the control.' })
12164
12112
  ], exports.Field.prototype, "hintPosition", void 0);
12113
+ __decorate([
12114
+ r$2()
12115
+ ], exports.Field.prototype, "hasLabelSlot", void 0);
12116
+ __decorate([
12117
+ r$2()
12118
+ ], exports.Field.prototype, "hasHintSlot", void 0);
12119
+ __decorate([
12120
+ r$2()
12121
+ ], exports.Field.prototype, "hasMessageSlot", void 0);
12165
12122
  exports.Field = __decorate([
12166
12123
  quanticElement(`quantic-field`)
12167
12124
  ], exports.Field);
@@ -12274,7 +12231,7 @@
12274
12231
  // to focus on its own rendering logic.
12275
12232
  // @see: https://nolanlawson.com/2022/11/28/shadow-dom-and-accessibility-the-trouble-with-aria/
12276
12233
  function renderAsField(name, InputComponent, renderInput) {
12277
- let FieldWrapper = class FieldWrapper extends SlotContentMixin(InputComponent) {
12234
+ let FieldWrapper = class FieldWrapper extends InputComponent {
12278
12235
  constructor() {
12279
12236
  super(...arguments);
12280
12237
  this.label = '';
@@ -12282,15 +12239,18 @@
12282
12239
  this.message = '';
12283
12240
  this.required = false;
12284
12241
  this.fieldId = generateId('field');
12242
+ this.labelSlotText = '';
12243
+ this.hintSlotText = '';
12244
+ this.messageSlotText = '';
12285
12245
  }
12286
12246
  get computedLabel() {
12287
- return this.getSlotTextContent('label') || this.label;
12247
+ return this.labelSlotText || this.label;
12288
12248
  }
12289
12249
  get computedHint() {
12290
- return this.getSlotTextContent('hint') || this.hint;
12250
+ return this.hintSlotText || this.hint;
12291
12251
  }
12292
12252
  get computedMessage() {
12293
- return this.getSlotTextContent('message') || this.message;
12253
+ return this.messageSlotText || this.message;
12294
12254
  }
12295
12255
  getFieldA11yContext() {
12296
12256
  const description = compact([
@@ -12314,10 +12274,10 @@
12314
12274
  .status=${this.status}
12315
12275
  .size=${this.size ?? E}
12316
12276
  >
12317
- <slot name="label" slot="label">${this.label}</slot>
12318
- <slot name="hint" slot="hint">${this.hint}</slot>
12277
+ <slot name="label" slot="label" @slotchange=${onSlotTextChange((v) => (this.labelSlotText = v))}>${this.label}</slot>
12278
+ <slot name="hint" slot="hint" @slotchange=${onSlotTextChange((v) => (this.hintSlotText = v))}>${this.hint}</slot>
12319
12279
  ${renderInput.call(this, a11yContext)}
12320
- <slot name="message" slot="message">${this.message}</slot>
12280
+ <slot name="message" slot="message" @slotchange=${onSlotTextChange((v) => (this.messageSlotText = v))}>${this.message}</slot>
12321
12281
  </quantic-field>
12322
12282
  `;
12323
12283
  }
@@ -12357,6 +12317,15 @@
12357
12317
  description: 'Validation state controlling message color.',
12358
12318
  })
12359
12319
  ], FieldWrapper.prototype, "status", void 0);
12320
+ __decorate([
12321
+ r$2()
12322
+ ], FieldWrapper.prototype, "labelSlotText", void 0);
12323
+ __decorate([
12324
+ r$2()
12325
+ ], FieldWrapper.prototype, "hintSlotText", void 0);
12326
+ __decorate([
12327
+ r$2()
12328
+ ], FieldWrapper.prototype, "messageSlotText", void 0);
12360
12329
  FieldWrapper = __decorate([
12361
12330
  quanticElement(`quantic-${name}-field`)
12362
12331
  ], FieldWrapper);
@@ -13751,7 +13720,7 @@
13751
13720
  Large: 'lg',
13752
13721
  };
13753
13722
 
13754
- exports.Toggle = class Toggle extends A11yAttributesMixin(SlotContentMixin(QuanticElement)) {
13723
+ exports.Toggle = class Toggle extends A11yAttributesMixin(QuanticElement) {
13755
13724
  constructor() {
13756
13725
  super();
13757
13726
  this.checked = false;
@@ -62164,12 +62133,13 @@
62164
62133
  ], exports.IconLabel);
62165
62134
 
62166
62135
  exports.LucideIconPencil.ensureDefined();
62167
- exports.InlineEdit = class InlineEdit extends SlotContentMixin(QuanticElement) {
62136
+ exports.InlineEdit = class InlineEdit extends QuanticElement {
62168
62137
  constructor() {
62169
62138
  super(...arguments);
62170
62139
  this.label = '';
62171
62140
  this.active = false;
62172
62141
  this.invalid = false;
62142
+ this.hasLabelSlot = false;
62173
62143
  this.handleActivateClick = () => {
62174
62144
  if (!this.active)
62175
62145
  this.activate();
@@ -62227,7 +62197,7 @@
62227
62197
  }
62228
62198
  }
62229
62199
  render() {
62230
- const hasLabel = this.hasSlotContent('label') || !!this.label;
62200
+ const hasLabel = this.hasLabelSlot || !!this.label;
62231
62201
  return b `
62232
62202
  <div
62233
62203
  class="${e$3({
@@ -62239,11 +62209,9 @@
62239
62209
  @click=${this.handleActivateClick}
62240
62210
  @keydown=${this.handleTriggerKey}
62241
62211
  >
62242
- ${hasLabel
62243
- ? b `<span class="label"
62244
- ><slot name="label">${this.label}</slot></span
62245
- >`
62246
- : ''}
62212
+ <span class=${e$3({ label: true, 'is-empty': !hasLabel })}
62213
+ ><slot name="label" @slotchange=${onSlotChange((has) => (this.hasLabelSlot = has))}>${this.label}</slot></span
62214
+ >
62247
62215
  <span class="value">
62248
62216
  <span class="display">
62249
62217
  <slot name="display"><span>—</span></slot>
@@ -62316,6 +62284,11 @@
62316
62284
  );
62317
62285
  }
62318
62286
 
62287
+ /* The label renders unconditionally so its slot exists to fire slotchange. */
62288
+ .label.is-empty {
62289
+ display: none;
62290
+ }
62291
+
62319
62292
  .value {
62320
62293
  min-width: 0;
62321
62294
  display: flex;
@@ -62391,6 +62364,9 @@
62391
62364
  __decorate([
62392
62365
  prop({ type: 'boolean', default: 'false', description: 'When true, focusout does not close the editor. The editor stays open until the value is valid or the user cancels.' })
62393
62366
  ], exports.InlineEdit.prototype, "invalid", void 0);
62367
+ __decorate([
62368
+ r$2()
62369
+ ], exports.InlineEdit.prototype, "hasLabelSlot", void 0);
62394
62370
  exports.InlineEdit = __decorate([
62395
62371
  event('cancel', { description: 'Fired on Escape. Consumer should revert optimistic state.' }),
62396
62372
  quanticElement('quantic-inline-edit')
@@ -63510,10 +63486,12 @@
63510
63486
 
63511
63487
  exports.Button.ensureDefined();
63512
63488
  exports.LucideIconMenu.ensureDefined();
63513
- exports.Layout = class Layout extends AutoHideEmptySlotsMixin(QuanticElement) {
63489
+ exports.Layout = class Layout extends AutoHideEmptySlotsMixin(QuanticElement, ['logo', 'titlebar', 'toolbar', 'navbar', 'sidebar']) {
63514
63490
  constructor() {
63515
63491
  super(...arguments);
63516
63492
  this.variant = LayoutVariant.Default;
63493
+ this.hasSidebarSlot = false;
63494
+ this.hasTitlebarSlot = false;
63517
63495
  this._isAsideExpanded = true;
63518
63496
  this.handleAsideExpand = (event) => {
63519
63497
  this.isAsideExpanded = event.detail.expanded;
@@ -63523,10 +63501,6 @@
63523
63501
  this.isAsideExpanded = false;
63524
63502
  }
63525
63503
  };
63526
- this.handleSlotChange = (event) => {
63527
- this.handleAutoHide(event);
63528
- this.requestUpdate();
63529
- };
63530
63504
  }
63531
63505
  get isAsideExpanded() {
63532
63506
  return this._isAsideExpanded;
@@ -63605,18 +63579,32 @@
63605
63579
  }
63606
63580
  this.previousIsSmallViewport = this.isSmallViewport;
63607
63581
  }
63582
+ static finalizeStyles(styles) {
63583
+ const base = super.finalizeStyles(styles) ?? [];
63584
+ return [
63585
+ ...base,
63586
+ r$6(`@layer quantic-header-visibility {
63587
+ .header { display: none; }
63588
+ .header.collapsible,
63589
+ :host(:has([slot="navbar"])) .header,
63590
+ :host(:has([slot="titlebar"])) .header,
63591
+ :host(:has([slot="logo"])) .header { display: revert-layer; }
63592
+ @scope {
63593
+ :scope:has([slot="navbar"]) .header,
63594
+ :scope:has([slot="titlebar"]) .header,
63595
+ :scope:has([slot="logo"]) .header { display: revert-layer; }
63596
+ }
63597
+ }`),
63598
+ ];
63599
+ }
63608
63600
  get isAsideCollapsible() {
63609
63601
  return this.isSmallViewport && this.hasSidebar;
63610
63602
  }
63611
63603
  get hasSidebar() {
63612
- return !this.isSlotEmpty('sidebar');
63604
+ return this.hasSidebarSlot;
63613
63605
  }
63614
63606
  get hasTitlebar() {
63615
- return !this.isSlotEmpty('titlebar');
63616
- }
63617
- get hasHeader() {
63618
- return (this.isAsideCollapsible ||
63619
- ['titlebar', 'navbar', 'logo'].some((slot) => !this.isSlotEmpty(slot)));
63607
+ return this.hasTitlebarSlot;
63620
63608
  }
63621
63609
  render() {
63622
63610
  const toggleButton = u$2 `<quantic-button
@@ -63633,12 +63621,11 @@
63633
63621
  const logo = u$2 `<slot
63634
63622
  name="logo"
63635
63623
  class="logo"
63636
- @slotchange=${this.handleSlotChange}
63637
63624
  ></slot>`;
63638
63625
  const titlebar = u$2 `<slot
63639
63626
  class="titlebar"
63640
63627
  name="titlebar"
63641
- @slotchange=${this.handleSlotChange}
63628
+ @slotchange=${onSlotChange((has) => (this.hasTitlebarSlot = has))}
63642
63629
  ></slot> `;
63643
63630
  return u$2 `
63644
63631
  <div
@@ -63650,14 +63637,13 @@
63650
63637
  })}
63651
63638
  @expanded-changed=${this.handleAsideExpand}
63652
63639
  >
63653
- <header class="header" ?hidden=${!this.hasHeader}>
63640
+ <header class=${e$3({ header: true, collapsible: this.isAsideCollapsible })}>
63654
63641
  ${!this.hasSidebar ? logo : null}
63655
63642
  ${this.isAsideCollapsible ? toggleButton : null}
63656
63643
  ${this.isSmallViewport ? null : titlebar}
63657
63644
  <slot
63658
63645
  class="navbar"
63659
63646
  name="navbar"
63660
- @slotchange=${this.handleSlotChange}
63661
63647
  ></slot>
63662
63648
  </header>
63663
63649
 
@@ -63666,12 +63652,10 @@
63666
63652
  <slot
63667
63653
  name="toolbar"
63668
63654
  class="toolbar"
63669
- @slotchange=${this.handleSlotChange}
63670
63655
  ></slot>
63671
63656
 
63672
63657
  <div
63673
63658
  class="aside-backdrop"
63674
- ?hidden=${!this.hasSidebar}
63675
63659
  aria-hidden="true"
63676
63660
  @click=${this.toggleAsideExpanded}
63677
63661
  ></div>
@@ -63686,7 +63670,7 @@
63686
63670
  <slot
63687
63671
  class="sidebar"
63688
63672
  name="sidebar"
63689
- @slotchange=${this.handleSlotChange}
63673
+ @slotchange=${onSlotChange((has) => (this.hasSidebarSlot = has))}
63690
63674
  ></slot>
63691
63675
  </aside>
63692
63676
 
@@ -63862,7 +63846,7 @@
63862
63846
  opacity: 0;
63863
63847
  }
63864
63848
 
63865
- .is-aside-expanded .aside-backdrop {
63849
+ .has-sidebar.is-aside-expanded .aside-backdrop {
63866
63850
  display: block;
63867
63851
  pointer-events: auto;
63868
63852
  opacity: var(--quantic-component-layout-aside-backdrop-opacity);
@@ -63887,8 +63871,6 @@
63887
63871
 
63888
63872
  .header {
63889
63873
  grid-area: header;
63890
- display: flex;
63891
- align-items: center;
63892
63874
  }
63893
63875
 
63894
63876
  .logo {
@@ -63915,7 +63897,7 @@
63915
63897
  pointer-events: auto;
63916
63898
  }
63917
63899
 
63918
- .is-aside-expanded .aside-backdrop {
63900
+ .has-sidebar.is-aside-expanded .aside-backdrop {
63919
63901
  display: none;
63920
63902
  }
63921
63903
 
@@ -63972,6 +63954,12 @@
63972
63954
  __decorate([
63973
63955
  respond(Breakpoint.below(1024))
63974
63956
  ], exports.Layout.prototype, "isSmallViewport", void 0);
63957
+ __decorate([
63958
+ r$2()
63959
+ ], exports.Layout.prototype, "hasSidebarSlot", void 0);
63960
+ __decorate([
63961
+ r$2()
63962
+ ], exports.Layout.prototype, "hasTitlebarSlot", void 0);
63975
63963
  __decorate([
63976
63964
  e$5('.aside')
63977
63965
  ], exports.Layout.prototype, "asideElement", void 0);
@@ -64683,7 +64671,7 @@
64683
64671
  exports.SidebarMenuItem.ensureDefined();
64684
64672
  exports.LucideIconPanelLeftClose.ensureDefined();
64685
64673
  exports.LucideIconPanelLeft.ensureDefined();
64686
- exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement) {
64674
+ exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
64687
64675
  constructor() {
64688
64676
  super(...arguments);
64689
64677
  this.ariaLabel = 'Sidebar navigation';
@@ -64705,16 +64693,16 @@
64705
64693
  aria-expanded=${this.isAsideExpanded !== false ? 'true' : 'false'}
64706
64694
  >
64707
64695
  <div class="header">
64708
- <slot name="header" @slotchange=${this.handleAutoHide}></slot>
64696
+ <slot name="header"></slot>
64709
64697
  </div>
64710
64698
 
64711
64699
  <div class="scroll-area">
64712
64700
  <div class="body">
64713
- <slot @slotchange=${this.handleAutoHide}></slot>
64701
+ <slot></slot>
64714
64702
  </div>
64715
64703
 
64716
64704
  <div class="footer">
64717
- <slot name="footer" @slotchange=${this.handleAutoHide}></slot>
64705
+ <slot name="footer"></slot>
64718
64706
  </div>
64719
64707
 
64720
64708
  ${this.isDesktopViewport && this.collapsible
@@ -64777,7 +64765,7 @@
64777
64765
  flex-shrink: 0;
64778
64766
  }
64779
64767
 
64780
- .header:has(slot[hidden]) {
64768
+ :host(:not(:has([slot="header"]))) .header {
64781
64769
  display: none;
64782
64770
  }
64783
64771
 
@@ -64934,7 +64922,7 @@
64934
64922
 
64935
64923
  const optionCardGroupContext = n$1('option-card-group.context');
64936
64924
 
64937
- exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement) {
64925
+ exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement, ['icon', 'description']) {
64938
64926
  constructor() {
64939
64927
  super();
64940
64928
  this.checked = false;
@@ -65060,13 +65048,9 @@
65060
65048
  />
65061
65049
  <label for=${inputId} class=${labelClasses}>
65062
65050
  <div class="content">
65063
- <slot
65064
- name="icon"
65065
- class="icon"
65066
- @slotchange=${this.handleAutoHide}
65067
- ></slot>
65051
+ <slot name="icon" class="icon"></slot>
65068
65052
  <!-- main slot -->
65069
- <slot class="body" @slotchange=${this.handleAutoHide}></slot>
65053
+ <slot class="body"></slot>
65070
65054
  <div class="indicator" aria-hidden="true">
65071
65055
  ${isRadio
65072
65056
  ? b `<div class="visual-radio"></div>`
@@ -65088,11 +65072,7 @@
65088
65072
  </div>`}
65089
65073
  </div>
65090
65074
  </div>
65091
- <slot
65092
- name="description"
65093
- class="description"
65094
- @slotchange=${this.handleAutoHide}
65095
- ></slot>
65075
+ <slot name="description" class="description"></slot>
65096
65076
  </label>
65097
65077
  `;
65098
65078
  }
@@ -65839,7 +65819,7 @@
65839
65819
  PanelHeaderSize["Large"] = "lg";
65840
65820
  })(exports.PanelHeaderSize || (exports.PanelHeaderSize = {}));
65841
65821
 
65842
- exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement) {
65822
+ exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
65843
65823
  constructor() {
65844
65824
  super(...arguments);
65845
65825
  this.variant = exports.PanelVariant.Outline;
@@ -65853,17 +65833,9 @@
65853
65833
  });
65854
65834
  return u$2 `
65855
65835
  <div class=${classes}>
65856
- <slot
65857
- name="header"
65858
- class="header"
65859
- @slotchange=${this.handleAutoHide}
65860
- ></slot>
65861
- <slot class="body" @slotchange=${this.handleAutoHide}></slot>
65862
- <slot
65863
- name="footer"
65864
- class="footer"
65865
- @slotchange=${this.handleAutoHide}
65866
- ></slot>
65836
+ <slot name="header" class="header"></slot>
65837
+ <slot class="body"></slot>
65838
+ <slot name="footer" class="footer"></slot>
65867
65839
  </div>
65868
65840
  `;
65869
65841
  }
@@ -65952,7 +65924,7 @@
65952
65924
  quanticElement('quantic-panel')
65953
65925
  ], exports.Panel);
65954
65926
 
65955
- exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement) {
65927
+ exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle', 'meta']) {
65956
65928
  constructor() {
65957
65929
  super(...arguments);
65958
65930
  this.size = exports.PanelHeaderSize.Medium;
@@ -65965,23 +65937,11 @@
65965
65937
  return u$2 `
65966
65938
  <div class=${classes}>
65967
65939
  <hgroup>
65968
- <slot
65969
- name="pretitle"
65970
- class="pretitle"
65971
- @slotchange=${this.handleAutoHide}
65972
- ></slot>
65940
+ <slot name="pretitle" class="pretitle"></slot>
65973
65941
  <slot class="title"></slot>
65974
- <slot
65975
- name="subtitle"
65976
- class="subtitle"
65977
- @slotchange=${this.handleAutoHide}
65978
- ></slot>
65942
+ <slot name="subtitle" class="subtitle"></slot>
65979
65943
  </hgroup>
65980
- <slot
65981
- name="meta"
65982
- class="meta"
65983
- @slotchange=${this.handleAutoHide}
65984
- ></slot>
65944
+ <slot name="meta" class="meta"></slot>
65985
65945
  </div>
65986
65946
  `;
65987
65947
  }
@@ -67209,7 +67169,7 @@
67209
67169
 
67210
67170
  const tableVariantContext = n$1('table.variant');
67211
67171
 
67212
- exports.Table = class Table extends AutoHideEmptySlotsMixin(QuanticElement) {
67172
+ exports.Table = class Table extends AutoHideEmptySlotsMixin(QuanticElement, ['toolbar', 'header', 'footer', 'controls']) {
67213
67173
  constructor() {
67214
67174
  super(...arguments);
67215
67175
  this.size = exports.TableSize.Medium;
@@ -67219,11 +67179,7 @@
67219
67179
  }
67220
67180
  render() {
67221
67181
  return b `
67222
- <slot
67223
- name="toolbar"
67224
- class="toolbar"
67225
- @slotchange=${this.handleAutoHide}
67226
- ></slot>
67182
+ <slot name="toolbar" class="toolbar"></slot>
67227
67183
  <div
67228
67184
  role="table"
67229
67185
  class="table"
@@ -67234,11 +67190,7 @@
67234
67190
  <slot></slot>
67235
67191
  <slot name="footer"></slot>
67236
67192
  </div>
67237
- <slot
67238
- name="controls"
67239
- class="controls"
67240
- @slotchange=${this.handleAutoHide}
67241
- ></slot>
67193
+ <slot name="controls" class="controls"></slot>
67242
67194
  `;
67243
67195
  }
67244
67196
  };
@@ -69135,7 +69087,7 @@
69135
69087
  exports.LucideIconInfo.ensureDefined();
69136
69088
  exports.LucideIconTriangleAlert.ensureDefined();
69137
69089
  exports.LucideIconX.ensureDefined();
69138
- exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement) {
69090
+ exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
69139
69091
  constructor() {
69140
69092
  super(...arguments);
69141
69093
  this.open = false;
@@ -69192,17 +69144,9 @@
69192
69144
  <slot name="icon">${this.renderDefaultIcon()}</slot>
69193
69145
  </span>
69194
69146
  <div class="content">
69195
- <slot
69196
- name="title"
69197
- class="title"
69198
- @slotchange=${this.handleAutoHide}
69199
- ></slot>
69200
- <slot class="body" @slotchange=${this.handleAutoHide}></slot>
69201
- <slot
69202
- name="action"
69203
- class="action"
69204
- @slotchange=${this.handleAutoHide}
69205
- ></slot>
69147
+ <slot name="title" class="title"></slot>
69148
+ <slot class="body"></slot>
69149
+ <slot name="action" class="action"></slot>
69206
69150
  </div>
69207
69151
  ${this.showCloseButton
69208
69152
  ? b `<quantic-button