@ctrliq/quantic-components 1.67.5 → 1.67.6

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.
@@ -28,6 +28,12 @@
28
28
  return c > 3 && r && Object.defineProperty(target, key, r), r;
29
29
  }
30
30
 
31
+ function __classPrivateFieldGet(receiver, state, kind, f) {
32
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
33
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
34
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
35
+ }
36
+
31
37
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
32
38
  var e = new Error(message);
33
39
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -259,10 +265,10 @@
259
265
  }
260
266
 
261
267
  /**
262
- * Mixin that automatically hides empty named slots using CSS only.
268
+ * Mixin that automatically hides empty named slots.
263
269
  *
264
270
  * Each named slot is hidden by default and revealed when the host has a light
265
- * DOM child with a matching `slot` attribute. Two rules cover all browsers:
271
+ * DOM child with a matching `slot` attribute. Two CSS rules cover all browsers:
266
272
  *
267
273
  * - `:host(:has([slot="name"]))` — Safari and Firefox
268
274
  * - `@scope { :scope:has([slot="name"]) }` — Chrome (@scope changes the
@@ -276,12 +282,18 @@
276
282
  * set in `quantic-component`.
277
283
  *
278
284
  * CSS is injected via `finalizeStyles` so it lands in Lit SSR's Declarative
279
- * Shadow DOM output — no JS, no layout shift.
285
+ * Shadow DOM output — no JS, no layout shift for SSR.
286
+ *
287
+ * Chrome doesn't re-evaluate :has() in shadow DOM when light-DOM children
288
+ * arrive asynchronously (e.g. React CSR). A capture listener on the shadow
289
+ * root intercepts all slotchange events internally and sets inline styles to
290
+ * override the CSS — no wiring required in component templates.
280
291
  *
281
292
  * @example
282
293
  * class MyElement extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {}
283
294
  */
284
295
  const AutoHideEmptySlotsMixin = (superClass, namedSlots = []) => {
296
+ var _AutoHideEmptySlotsClass_onSlotChange;
285
297
  if (namedSlots.length === 0)
286
298
  return superClass;
287
299
  // A component may declare a native CSSStyleSheet, which Lit passes through
@@ -299,6 +311,18 @@
299
311
  })
300
312
  .join(' ');
301
313
  class AutoHideEmptySlotsClass extends superClass {
314
+ constructor() {
315
+ super(...arguments);
316
+ // slotchange doesn't bubble, but capture intercepts it on the way down
317
+ // to the slot element — one listener covers all named slots.
318
+ _AutoHideEmptySlotsClass_onSlotChange.set(this, (e) => {
319
+ const slot = e.target;
320
+ if (!namedSlots.includes(slot.name))
321
+ return;
322
+ const hasContent = slot.assignedNodes({ flatten: true }).length > 0;
323
+ slot.style.display = hasContent ? 'block' : '';
324
+ });
325
+ }
302
326
  static finalizeStyles(styles) {
303
327
  const base = superClass.finalizeStyles?.call(this, styles) ?? [];
304
328
  const baseCSS = base.map(toCssText).join('\n');
@@ -308,7 +332,30 @@
308
332
  ` @layer quantic-slot-visibility { ${slotRulesCSS} }`),
309
333
  ];
310
334
  }
335
+ connectedCallback() {
336
+ super.connectedCallback();
337
+ this.renderRoot.addEventListener('slotchange', __classPrivateFieldGet(this, _AutoHideEmptySlotsClass_onSlotChange, "f"), {
338
+ capture: true,
339
+ });
340
+ }
341
+ disconnectedCallback() {
342
+ super.disconnectedCallback();
343
+ this.renderRoot.removeEventListener('slotchange', __classPrivateFieldGet(this, _AutoHideEmptySlotsClass_onSlotChange, "f"), {
344
+ capture: true,
345
+ });
346
+ }
347
+ // Sync initial state for slots that already have content on first render
348
+ // (e.g. synchronous React CSR or SSR hydration with light DOM present).
349
+ firstUpdated(changed) {
350
+ super.firstUpdated?.(changed);
351
+ for (const name of namedSlots) {
352
+ const slot = this.renderRoot.querySelector(`slot[name="${CSS.escape(name)}"]`);
353
+ if (slot)
354
+ __classPrivateFieldGet(this, _AutoHideEmptySlotsClass_onSlotChange, "f").call(this, { target: slot });
355
+ }
356
+ }
311
357
  }
358
+ _AutoHideEmptySlotsClass_onSlotChange = new WeakMap();
312
359
  return AutoHideEmptySlotsClass;
313
360
  };
314
361
 
@@ -2594,7 +2641,10 @@
2594
2641
  exports.LucideIconInfo.ensureDefined();
2595
2642
  exports.LucideIconTriangleAlert.ensureDefined();
2596
2643
  exports.LucideIconX.ensureDefined();
2597
- exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
2644
+ exports.Alert = class Alert extends AutoHideEmptySlotsMixin(QuanticElement, [
2645
+ 'title',
2646
+ 'action',
2647
+ ]) {
2598
2648
  constructor() {
2599
2649
  super(...arguments);
2600
2650
  this.type = AlertType.Info;
@@ -2645,18 +2695,18 @@
2645
2695
  </div>
2646
2696
  ${this.showCloseButton
2647
2697
  ? b `<quantic-button
2648
- class="close-button"
2649
- variant="ghost"
2650
- size="sm"
2651
- icon
2652
- aria-label="Close"
2653
- @click=${this.handleCloseClick}
2654
- >
2655
- <quantic-icon-lucide-x
2698
+ class="close-button"
2699
+ variant="ghost"
2656
2700
  size="sm"
2657
- class="close-icon"
2658
- ></quantic-icon-lucide-x>
2659
- </quantic-button>`
2701
+ icon
2702
+ aria-label="Close"
2703
+ @click=${this.handleCloseClick}
2704
+ >
2705
+ <quantic-icon-lucide-x
2706
+ size="sm"
2707
+ class="close-icon"
2708
+ ></quantic-icon-lucide-x>
2709
+ </quantic-button>`
2660
2710
  : A}
2661
2711
  </div>
2662
2712
  `;
@@ -6120,7 +6170,11 @@
6120
6170
  */
6121
6171
  const CardGroupDensity = exports.GridDensity;
6122
6172
 
6123
- exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer', 'action-icon']) {
6173
+ exports.Card = class Card extends AutoHideEmptySlotsMixin(QuanticElement, [
6174
+ 'header',
6175
+ 'footer',
6176
+ 'action-icon',
6177
+ ]) {
6124
6178
  constructor() {
6125
6179
  super(...arguments);
6126
6180
  this.as = 'div';
@@ -6143,10 +6197,7 @@
6143
6197
  class="header"
6144
6198
  data-description="Header area — place quantic-card-title and quantic-card-meta here."
6145
6199
  ></slot>
6146
- <slot
6147
- class="body"
6148
- data-description="Main body content."
6149
- ></slot>
6200
+ <slot class="body" data-description="Main body content."></slot>
6150
6201
  <slot
6151
6202
  name="footer"
6152
6203
  class="footer"
@@ -6197,182 +6248,193 @@
6197
6248
  ],
6198
6249
  relatedTo: ['quantic-card-group', 'quantic-panel'],
6199
6250
  };
6200
- exports.Card.styles = [i$7 `
6201
- :host {
6202
- display: flex;
6203
- flex-direction: column;
6204
- width: 100%;
6205
- container-name: box-container;
6206
- container-type: inline-size;
6207
- font-family: var(--quantic-font-family-body);
6208
- color: var(--quantic-text-secondary);
6209
- position: relative;
6210
-
6211
- --quantic-component-card-padding: var(--quantic-spacing-6);
6212
- --quantic-component-card-font-size: var(--quantic-font-size-body-md);
6213
- --quantic-component-card-line-height: var(--quantic-line-height-body-md);
6214
- --quantic-component-card-radius: var(--quantic-radius-md);
6215
- --quantic-component-card-spacing: var(--quantic-spacing-4);
6216
- }
6217
-
6218
- button.main,
6219
- a.main {
6220
- outline: 2px solid transparent;
6221
- outline-offset: 2px;
6222
- }
6223
-
6224
- button.main:focus-visible,
6225
- a.main:focus-visible {
6226
- outline-color: var(--quantic-focus-ring);
6227
- }
6228
-
6229
- :host([disabled]) {
6230
- pointer-events: none;
6231
- }
6251
+ exports.Card.styles = [
6252
+ i$7 `
6253
+ :host {
6254
+ display: flex;
6255
+ flex-direction: column;
6256
+ width: 100%;
6257
+ container-name: box-container;
6258
+ container-type: inline-size;
6259
+ font-family: var(--quantic-font-family-body);
6260
+ color: var(--quantic-text-secondary);
6261
+ position: relative;
6232
6262
 
6233
- .main {
6234
- display: flex;
6235
- flex-direction: column;
6236
- gap: var(--quantic-component-card-spacing);
6237
- padding: var(--quantic-component-card-padding);
6238
- border-radius: var(--quantic-component-card-radius);
6239
- border: 1px solid var(--quantic-border-primary);
6240
- overflow: hidden;
6241
- font-size: var(--quantic-component-card-font-size);
6242
- line-height: var(--quantic-component-card-line-height);
6243
- flex: 1 1 auto;
6244
- box-sizing: border-box;
6245
- }
6263
+ --quantic-component-card-padding: var(--quantic-spacing-6);
6264
+ --quantic-component-card-font-size: var(--quantic-font-size-body-md);
6265
+ --quantic-component-card-line-height: var(
6266
+ --quantic-line-height-body-md
6267
+ );
6268
+ --quantic-component-card-radius: var(--quantic-radius-md);
6269
+ --quantic-component-card-spacing: var(--quantic-spacing-4);
6270
+ }
6246
6271
 
6247
- button.main,
6248
- a.main {
6249
- position: relative;
6250
- }
6272
+ button.main,
6273
+ a.main {
6274
+ outline: 2px solid transparent;
6275
+ outline-offset: 2px;
6276
+ }
6251
6277
 
6252
- .variant--solid {
6253
- background-color: var(--quantic-bg-secondary);
6254
- border: 1px solid var(--quantic-border-primary);
6255
- }
6278
+ button.main:focus-visible,
6279
+ a.main:focus-visible {
6280
+ outline-color: var(--quantic-focus-ring);
6281
+ }
6256
6282
 
6257
- .variant--outline {
6258
- background-color: transparent;
6259
- border: 1px solid var(--quantic-border-primary);
6260
- }
6283
+ :host([disabled]) {
6284
+ pointer-events: none;
6285
+ }
6261
6286
 
6262
- .size--xs {
6263
- --quantic-component-card-padding: var(--quantic-spacing-3);
6264
- --quantic-component-card-spacing: var(--quantic-spacing-1);
6265
- --quantic-component-card-radius: var(--quantic-radius-sm);
6266
- --quantic-component-card-font-size: var(--quantic-font-size-body-xs);
6267
- --quantic-component-card-line-height: var(--quantic-line-height-body-sm);
6268
- }
6287
+ .main {
6288
+ display: flex;
6289
+ flex-direction: column;
6290
+ gap: var(--quantic-component-card-spacing);
6291
+ padding: var(--quantic-component-card-padding);
6292
+ border-radius: var(--quantic-component-card-radius);
6293
+ border: 1px solid var(--quantic-border-primary);
6294
+ overflow: hidden;
6295
+ font-size: var(--quantic-component-card-font-size);
6296
+ line-height: var(--quantic-component-card-line-height);
6297
+ flex: 1 1 auto;
6298
+ box-sizing: border-box;
6299
+ }
6269
6300
 
6270
- .size--sm {
6271
- --quantic-component-card-padding: var(--quantic-spacing-4);
6272
- --quantic-component-card-spacing: var(--quantic-spacing-1-5);
6273
- --quantic-component-card-radius: var(--quantic-radius-sm);
6274
- --quantic-component-card-font-size: var(--quantic-font-size-body-sm);
6275
- --quantic-component-card-line-height: var(--quantic-line-height-body-sm);
6276
- }
6301
+ button.main,
6302
+ a.main {
6303
+ position: relative;
6304
+ }
6277
6305
 
6278
- .size--md {
6279
- --quantic-component-card-padding: var(--quantic-spacing-5);
6280
- --quantic-component-card-spacing: var(--quantic-spacing-2);
6281
- --quantic-component-card-radius: var(--quantic-radius-md);
6282
- --quantic-component-card-font-size: var(--quantic-font-size-body-md);
6283
- --quantic-component-card-line-height: var(--quantic-line-height-body-md);
6284
- }
6306
+ .variant--solid {
6307
+ background-color: var(--quantic-bg-secondary);
6308
+ border: 1px solid var(--quantic-border-primary);
6309
+ }
6285
6310
 
6286
- .size--lg {
6287
- --quantic-component-card-padding: var(--quantic-spacing-6);
6288
- --quantic-component-card-spacing: var(--quantic-spacing-3);
6289
- --quantic-component-card-radius: var(--quantic-radius-lg);
6290
- --quantic-component-card-font-size: var(--quantic-font-size-body-lg);
6291
- --quantic-component-card-line-height: var(--quantic-line-height-body-lg);
6292
- }
6311
+ .variant--outline {
6312
+ background-color: transparent;
6313
+ border: 1px solid var(--quantic-border-primary);
6314
+ }
6293
6315
 
6294
- @container (min-width: 40rem) {
6295
6316
  .size--xs {
6296
6317
  --quantic-component-card-padding: var(--quantic-spacing-3);
6318
+ --quantic-component-card-spacing: var(--quantic-spacing-1);
6319
+ --quantic-component-card-radius: var(--quantic-radius-sm);
6320
+ --quantic-component-card-font-size: var(--quantic-font-size-body-xs);
6321
+ --quantic-component-card-line-height: var(
6322
+ --quantic-line-height-body-sm
6323
+ );
6297
6324
  }
6298
6325
 
6299
6326
  .size--sm {
6300
6327
  --quantic-component-card-padding: var(--quantic-spacing-4);
6328
+ --quantic-component-card-spacing: var(--quantic-spacing-1-5);
6329
+ --quantic-component-card-radius: var(--quantic-radius-sm);
6330
+ --quantic-component-card-font-size: var(--quantic-font-size-body-sm);
6331
+ --quantic-component-card-line-height: var(
6332
+ --quantic-line-height-body-sm
6333
+ );
6301
6334
  }
6302
6335
 
6303
6336
  .size--md {
6304
- --quantic-component-card-padding: var(--quantic-spacing-6);
6337
+ --quantic-component-card-padding: var(--quantic-spacing-5);
6338
+ --quantic-component-card-spacing: var(--quantic-spacing-2);
6339
+ --quantic-component-card-radius: var(--quantic-radius-md);
6340
+ --quantic-component-card-font-size: var(--quantic-font-size-body-md);
6341
+ --quantic-component-card-line-height: var(
6342
+ --quantic-line-height-body-md
6343
+ );
6305
6344
  }
6306
6345
 
6307
6346
  .size--lg {
6308
- --quantic-component-card-padding: var(--quantic-spacing-8);
6347
+ --quantic-component-card-padding: var(--quantic-spacing-6);
6348
+ --quantic-component-card-spacing: var(--quantic-spacing-3);
6349
+ --quantic-component-card-radius: var(--quantic-radius-lg);
6350
+ --quantic-component-card-font-size: var(--quantic-font-size-body-lg);
6351
+ --quantic-component-card-line-height: var(
6352
+ --quantic-line-height-body-lg
6353
+ );
6309
6354
  }
6310
- }
6311
6355
 
6312
- .header,
6313
- .body,
6314
- .footer {
6315
- display: block;
6316
- }
6356
+ @container (min-width: 40rem) {
6357
+ .size--xs {
6358
+ --quantic-component-card-padding: var(--quantic-spacing-3);
6359
+ }
6317
6360
 
6318
- .footer {
6319
- padding-top: var(--quantic-component-card-spacing);
6320
- margin-top: auto;
6321
- }
6361
+ .size--sm {
6362
+ --quantic-component-card-padding: var(--quantic-spacing-4);
6363
+ }
6322
6364
 
6323
- .action-icon {
6324
- position: absolute;
6325
- inset: calc(var(--quantic-component-card-padding) / 2);
6326
- left: auto;
6327
- display: flex;
6328
- align-items: center;
6329
- justify-content: flex-end;
6330
- pointer-events: none;
6331
- transition:
6332
- color 0.2s ease-in-out,
6333
- opacity 0.2s ease-in-out;
6334
- color: var(--quantic-text-tertiary);
6335
- opacity: 0.6;
6336
- }
6365
+ .size--md {
6366
+ --quantic-component-card-padding: var(--quantic-spacing-6);
6367
+ }
6337
6368
 
6338
- .is-interactive {
6339
- appearance: none;
6340
- font-family: var(--quantic-font-family-body);
6341
- color: var(--quantic-text-secondary);
6342
- text-decoration: none;
6343
- text-align: left;
6344
- cursor: pointer;
6345
- outline: none;
6346
- width: 100%;
6347
- transition:
6348
- border-color 0.2s ease-in-out,
6349
- background-color 0.2s ease-in-out,
6350
- box-shadow 0.2s ease-in-out;
6351
- }
6369
+ .size--lg {
6370
+ --quantic-component-card-padding: var(--quantic-spacing-8);
6371
+ }
6372
+ }
6352
6373
 
6353
- .is-interactive:hover:not(.is-disabled) {
6354
- border-color: var(--quantic-focus-ring);
6355
- }
6374
+ .header,
6375
+ .body,
6376
+ .footer {
6377
+ display: block;
6378
+ }
6356
6379
 
6357
- .is-interactive:hover:not(.is-disabled) .action-icon {
6358
- color: var(--quantic-focus-ring);
6359
- opacity: 1;
6360
- }
6380
+ .footer {
6381
+ padding-top: var(--quantic-component-card-spacing);
6382
+ margin-top: auto;
6383
+ }
6361
6384
 
6362
- .is-interactive.is-disabled {
6363
- cursor: not-allowed;
6364
- opacity: 0.6;
6365
- }
6385
+ .action-icon {
6386
+ position: absolute;
6387
+ inset: calc(var(--quantic-component-card-padding) / 2);
6388
+ left: auto;
6389
+ display: flex;
6390
+ align-items: center;
6391
+ justify-content: flex-end;
6392
+ pointer-events: none;
6393
+ transition:
6394
+ color 0.2s ease-in-out,
6395
+ opacity 0.2s ease-in-out;
6396
+ color: var(--quantic-text-tertiary);
6397
+ opacity: 0.6;
6398
+ }
6366
6399
 
6367
- [hidden] {
6368
- display: none;
6369
- }
6370
- `,
6400
+ .is-interactive {
6401
+ appearance: none;
6402
+ font-family: var(--quantic-font-family-body);
6403
+ color: var(--quantic-text-secondary);
6404
+ text-decoration: none;
6405
+ text-align: left;
6406
+ cursor: pointer;
6407
+ outline: none;
6408
+ width: 100%;
6409
+ transition:
6410
+ border-color 0.2s ease-in-out,
6411
+ background-color 0.2s ease-in-out,
6412
+ box-shadow 0.2s ease-in-out;
6413
+ }
6414
+
6415
+ .is-interactive:hover:not(.is-disabled) {
6416
+ border-color: var(--quantic-focus-ring);
6417
+ }
6418
+
6419
+ .is-interactive:hover:not(.is-disabled) .action-icon {
6420
+ color: var(--quantic-focus-ring);
6421
+ opacity: 1;
6422
+ }
6423
+
6424
+ .is-interactive.is-disabled {
6425
+ cursor: not-allowed;
6426
+ opacity: 0.6;
6427
+ }
6428
+
6429
+ [hidden] {
6430
+ display: none;
6431
+ }
6432
+ `,
6371
6433
  whenSlotPresent('action-icon', i$7 `
6372
- .main {
6373
- padding-right: calc(var(--quantic-component-card-padding) * 2);
6374
- }
6375
- `),
6434
+ .main {
6435
+ padding-right: calc(var(--quantic-component-card-padding) * 2);
6436
+ }
6437
+ `),
6376
6438
  ];
6377
6439
  __decorate([
6378
6440
  prop({
@@ -7230,7 +7292,10 @@
7230
7292
  quanticElement('quantic-card-meta')
7231
7293
  ], exports.CardMeta);
7232
7294
 
7233
- exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle']) {
7295
+ exports.CardTitle = class CardTitle extends AutoHideEmptySlotsMixin(QuanticElement, [
7296
+ 'pretitle',
7297
+ 'subtitle',
7298
+ ]) {
7234
7299
  render() {
7235
7300
  return u$2 `
7236
7301
  <hgroup>
@@ -10771,7 +10836,10 @@
10771
10836
  Manual: 'manual',
10772
10837
  };
10773
10838
 
10774
- exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
10839
+ exports.PopoverPopup = class PopoverPopup extends AutoHideEmptySlotsMixin(QuanticElement, [
10840
+ 'header',
10841
+ 'footer',
10842
+ ]) {
10775
10843
  constructor() {
10776
10844
  super(...arguments);
10777
10845
  this.visible = false;
@@ -10887,7 +10955,12 @@
10887
10955
  }
10888
10956
  `;
10889
10957
  __decorate([
10890
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Controls visibility and pointer-events. Managed by quantic-popover.' })
10958
+ prop({
10959
+ type: 'boolean',
10960
+ default: 'false',
10961
+ reflect: true,
10962
+ description: 'Controls visibility and pointer-events. Managed by quantic-popover.',
10963
+ })
10891
10964
  ], exports.PopoverPopup.prototype, "visible", void 0);
10892
10965
  exports.PopoverPopup = __decorate([
10893
10966
  quanticElement('quantic-popover-popup')
@@ -11782,7 +11855,9 @@
11782
11855
  quanticElement('quantic-dropdown-menu-item')
11783
11856
  ], exports.DropdownMenuItem);
11784
11857
 
11785
- exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement, ['label']) {
11858
+ exports.DropdownMenuGroup = class DropdownMenuGroup extends AutoHideEmptySlotsMixin(QuanticElement, [
11859
+ 'label',
11860
+ ]) {
11786
11861
  constructor() {
11787
11862
  super(...arguments);
11788
11863
  this.label = '';
@@ -11819,45 +11894,46 @@
11819
11894
  },
11820
11895
  relatedTo: ['quantic-dropdown-menu', 'quantic-dropdown-menu-item'],
11821
11896
  };
11822
- exports.DropdownMenuGroup.styles = [i$7 `
11823
- :host {
11824
- display: block;
11825
- padding: var(--quantic-spacing-4) 0 var(--quantic-spacing-2);
11826
- border-top: 1px solid var(--quantic-border-tertiary);
11827
- }
11897
+ exports.DropdownMenuGroup.styles = [
11898
+ i$7 `
11899
+ :host {
11900
+ display: block;
11901
+ padding: var(--quantic-spacing-4) 0 var(--quantic-spacing-2);
11902
+ border-top: 1px solid var(--quantic-border-tertiary);
11903
+ }
11828
11904
 
11829
- :host(:first-of-type) {
11830
- border-top: none;
11831
- padding-top: var(--quantic-spacing-2);
11832
- }
11905
+ :host(:first-of-type) {
11906
+ border-top: none;
11907
+ padding-top: var(--quantic-spacing-2);
11908
+ }
11833
11909
 
11834
- .label {
11835
- padding: var(--quantic-spacing-1-5) var(--quantic-spacing-3);
11836
- font-family: var(--quantic-font-family-body);
11837
- font-size: var(--quantic-font-size-body-xs);
11838
- font-weight: var(--quantic-font-weight-semibold);
11839
- line-height: var(--quantic-line-height-body-xs);
11840
- color: var(--quantic-text-tertiary);
11841
- text-transform: uppercase;
11842
- letter-spacing: 0.05em;
11843
- user-select: none;
11844
- }
11910
+ .label {
11911
+ padding: var(--quantic-spacing-1-5) var(--quantic-spacing-3);
11912
+ font-family: var(--quantic-font-family-body);
11913
+ font-size: var(--quantic-font-size-body-xs);
11914
+ font-weight: var(--quantic-font-weight-semibold);
11915
+ line-height: var(--quantic-line-height-body-xs);
11916
+ color: var(--quantic-text-tertiary);
11917
+ text-transform: uppercase;
11918
+ letter-spacing: 0.05em;
11919
+ user-select: none;
11920
+ }
11845
11921
 
11846
- .label[hidden] {
11847
- display: none;
11848
- }
11922
+ .label[hidden] {
11923
+ display: none;
11924
+ }
11849
11925
 
11850
- .items {
11851
- display: flex;
11852
- flex-direction: column;
11853
- gap: var(--quantic-spacing-0-5);
11854
- }
11855
- `,
11926
+ .items {
11927
+ display: flex;
11928
+ flex-direction: column;
11929
+ gap: var(--quantic-spacing-0-5);
11930
+ }
11931
+ `,
11856
11932
  whenSlotPresent('label', i$7 `
11857
- .label {
11858
- display: block;
11859
- }
11860
- `),
11933
+ .label {
11934
+ display: block;
11935
+ }
11936
+ `),
11861
11937
  ];
11862
11938
  __decorate([
11863
11939
  prop({
@@ -64744,7 +64820,10 @@
64744
64820
  exports.SidebarMenuItem.ensureDefined();
64745
64821
  exports.LucideIconPanelLeftClose.ensureDefined();
64746
64822
  exports.LucideIconPanelLeft.ensureDefined();
64747
- exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
64823
+ exports.Sidebar = class Sidebar extends AutoHideEmptySlotsMixin(QuanticElement, [
64824
+ 'header',
64825
+ 'footer',
64826
+ ]) {
64748
64827
  constructor() {
64749
64828
  super(...arguments);
64750
64829
  this.ariaLabel = 'Sidebar navigation';
@@ -64780,25 +64859,23 @@
64780
64859
 
64781
64860
  ${this.isDesktopViewport && this.collapsible
64782
64861
  ? u$2 `<div class="toggle-container">
64783
- <quantic-sidebar-menu-item
64784
- @click=${this.handleToggle}
64785
- title=${this.isAsideExpanded
64786
- ? 'Collapse sidebar'
64787
- : 'Expand sidebar'}
64788
- label=${this.isAsideExpanded ? 'Collapse' : 'Expand sidebar'}
64789
- variant=${SidebarMenuItemVariant.Secondary}
64790
- >
64791
- ${this.isAsideExpanded
64862
+ <quantic-sidebar-menu-item
64863
+ @click=${this.handleToggle}
64864
+ title=${this.isAsideExpanded ? 'Collapse sidebar' : 'Expand sidebar'}
64865
+ label=${this.isAsideExpanded ? 'Collapse' : 'Expand sidebar'}
64866
+ variant=${SidebarMenuItemVariant.Secondary}
64867
+ >
64868
+ ${this.isAsideExpanded
64792
64869
  ? u$2 `<quantic-icon-lucide-panel-left-close
64793
- slot="icon"
64794
- size="sm"
64795
- ></quantic-icon-lucide-panel-left-close>`
64870
+ slot="icon"
64871
+ size="sm"
64872
+ ></quantic-icon-lucide-panel-left-close>`
64796
64873
  : u$2 `<quantic-icon-lucide-panel-left
64797
- slot="icon"
64798
- size="sm"
64799
- ></quantic-icon-lucide-panel-left>`}
64800
- </quantic-sidebar-menu-item>
64801
- </div>`
64874
+ slot="icon"
64875
+ size="sm"
64876
+ ></quantic-icon-lucide-panel-left>`}
64877
+ </quantic-sidebar-menu-item>
64878
+ </div>`
64802
64879
  : null}
64803
64880
  </div>
64804
64881
  </nav>
@@ -64810,11 +64887,20 @@
64810
64887
  description: 'Collapsible side navigation panel placed in the sidebar slot of quantic-layout. ' +
64811
64888
  'On desktop it can collapse to an icon rail; on mobile it is controlled by the layout as a drawer.',
64812
64889
  category: 'navigation',
64813
- subComponents: ['quantic-sidebar-menu-item', 'quantic-sidebar-menu-item-group'],
64890
+ subComponents: [
64891
+ 'quantic-sidebar-menu-item',
64892
+ 'quantic-sidebar-menu-item-group',
64893
+ ],
64814
64894
  slots: {
64815
- header: { description: 'Optional sticky header rendered above the scrollable content.' },
64816
- '': { description: 'Primary nav items (quantic-sidebar-menu-item or quantic-sidebar-menu-item-group).' },
64817
- footer: { description: 'Footer nav items pinned to the bottom of the sidebar.' },
64895
+ header: {
64896
+ description: 'Optional sticky header rendered above the scrollable content.',
64897
+ },
64898
+ '': {
64899
+ description: 'Primary nav items (quantic-sidebar-menu-item or quantic-sidebar-menu-item-group).',
64900
+ },
64901
+ footer: {
64902
+ description: 'Footer nav items pinned to the bottom of the sidebar.',
64903
+ },
64818
64904
  },
64819
64905
  relatedTo: ['quantic-layout', 'quantic-sidebar-menu-item'],
64820
64906
  };
@@ -64838,7 +64924,7 @@
64838
64924
  flex-shrink: 0;
64839
64925
  }
64840
64926
 
64841
- :host(:not(:has([slot="header"]))) .header {
64927
+ :host(:not(:has([slot='header']))) .header {
64842
64928
  display: none;
64843
64929
  }
64844
64930
 
@@ -64905,10 +64991,19 @@
64905
64991
  c({ context: asideExpandedContext, subscribe: true })
64906
64992
  ], exports.Sidebar.prototype, "isAsideExpanded", void 0);
64907
64993
  __decorate([
64908
- prop({ type: 'string', default: 'Sidebar navigation', description: 'Accessible label for the nav landmark.' })
64994
+ prop({
64995
+ type: 'string',
64996
+ default: 'Sidebar navigation',
64997
+ description: 'Accessible label for the nav landmark.',
64998
+ })
64909
64999
  ], exports.Sidebar.prototype, "ariaLabel", void 0);
64910
65000
  __decorate([
64911
- prop({ type: 'boolean', default: 'false', attribute: 'collapsible', description: 'When true, shows a toggle button at the bottom of the sidebar on desktop viewports.' })
65001
+ prop({
65002
+ type: 'boolean',
65003
+ default: 'false',
65004
+ attribute: 'collapsible',
65005
+ description: 'When true, shows a toggle button at the bottom of the sidebar on desktop viewports.',
65006
+ })
64912
65007
  ], exports.Sidebar.prototype, "collapsible", void 0);
64913
65008
  __decorate([
64914
65009
  respond(Breakpoint.above(1024))
@@ -64995,7 +65090,10 @@
64995
65090
 
64996
65091
  const optionCardGroupContext = n$1('option-card-group.context');
64997
65092
 
64998
- exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement, ['icon', 'description']) {
65093
+ exports.OptionCard = class OptionCard extends AutoHideEmptySlotsMixin(QuanticElement, [
65094
+ 'icon',
65095
+ 'description',
65096
+ ]) {
64999
65097
  constructor() {
65000
65098
  super();
65001
65099
  this.checked = false;
@@ -65128,21 +65226,21 @@
65128
65226
  ${isRadio
65129
65227
  ? b `<div class="visual-radio"></div>`
65130
65228
  : b `<div class="visual-checkbox">
65131
- <svg
65132
- class="visual-checkmark"
65133
- viewBox="0 0 12 12"
65134
- fill="none"
65135
- xmlns="http://www.w3.org/2000/svg"
65136
- >
65137
- <path
65138
- d="M10 3L4.5 8.5L2 6"
65139
- stroke="currentColor"
65140
- stroke-width="1.6666"
65141
- stroke-linecap="round"
65142
- stroke-linejoin="round"
65143
- />
65144
- </svg>
65145
- </div>`}
65229
+ <svg
65230
+ class="visual-checkmark"
65231
+ viewBox="0 0 12 12"
65232
+ fill="none"
65233
+ xmlns="http://www.w3.org/2000/svg"
65234
+ >
65235
+ <path
65236
+ d="M10 3L4.5 8.5L2 6"
65237
+ stroke="currentColor"
65238
+ stroke-width="1.6666"
65239
+ stroke-linecap="round"
65240
+ stroke-linejoin="round"
65241
+ />
65242
+ </svg>
65243
+ </div>`}
65146
65244
  </div>
65147
65245
  </div>
65148
65246
  <slot name="description" class="description"></slot>
@@ -65159,7 +65257,9 @@
65159
65257
  slots: {
65160
65258
  '': { description: 'Main label content of the card.' },
65161
65259
  icon: { description: 'Optional leading icon.' },
65162
- description: { description: 'Optional secondary description below the label.' },
65260
+ description: {
65261
+ description: 'Optional secondary description below the label.',
65262
+ },
65163
65263
  },
65164
65264
  relatedTo: ['quantic-option-card-group', 'quantic-field'],
65165
65265
  };
@@ -65436,28 +65536,65 @@
65436
65536
  }
65437
65537
  `;
65438
65538
  __decorate([
65439
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Whether the card is currently selected.' })
65539
+ prop({
65540
+ type: 'boolean',
65541
+ default: 'false',
65542
+ reflect: true,
65543
+ description: 'Whether the card is currently selected.',
65544
+ })
65440
65545
  ], exports.OptionCard.prototype, "checked", void 0);
65441
65546
  __decorate([
65442
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Marks the card as required for form validation.' })
65547
+ prop({
65548
+ type: 'boolean',
65549
+ default: 'false',
65550
+ reflect: true,
65551
+ description: 'Marks the card as required for form validation.',
65552
+ })
65443
65553
  ], exports.OptionCard.prototype, "required", void 0);
65444
65554
  __decorate([
65445
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Prevents interaction.' })
65555
+ prop({
65556
+ type: 'boolean',
65557
+ default: 'false',
65558
+ reflect: true,
65559
+ description: 'Prevents interaction.',
65560
+ })
65446
65561
  ], exports.OptionCard.prototype, "disabled", void 0);
65447
65562
  __decorate([
65448
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Applies error styling.' })
65563
+ prop({
65564
+ type: 'boolean',
65565
+ default: 'false',
65566
+ reflect: true,
65567
+ description: 'Applies error styling.',
65568
+ })
65449
65569
  ], exports.OptionCard.prototype, "invalid", void 0);
65450
65570
  __decorate([
65451
- prop({ type: 'string', reflect: true, description: 'Form value submitted when this card is selected.' })
65571
+ prop({
65572
+ type: 'string',
65573
+ reflect: true,
65574
+ description: 'Form value submitted when this card is selected.',
65575
+ })
65452
65576
  ], exports.OptionCard.prototype, "value", void 0);
65453
65577
  __decorate([
65454
- prop({ type: 'string', description: 'Name attribute passed to the underlying input for form association.' })
65578
+ prop({
65579
+ type: 'string',
65580
+ description: 'Name attribute passed to the underlying input for form association.',
65581
+ })
65455
65582
  ], exports.OptionCard.prototype, "name", void 0);
65456
65583
  __decorate([
65457
- prop({ type: 'OptionCardVariant', options: Object.values(exports.OptionCardVariant), default: exports.OptionCardVariant.Ghost, description: 'Visual style of the card.' })
65584
+ prop({
65585
+ type: 'OptionCardVariant',
65586
+ options: Object.values(exports.OptionCardVariant),
65587
+ default: exports.OptionCardVariant.Ghost,
65588
+ description: 'Visual style of the card.',
65589
+ })
65458
65590
  ], exports.OptionCard.prototype, "variant", void 0);
65459
65591
  __decorate([
65460
- prop({ type: 'OptionCardSize', options: Object.values(exports.OptionCardSize), default: exports.OptionCardSize.Medium, description: 'Controls padding and font size.' })
65592
+ prop({
65593
+ type: 'OptionCardSize',
65594
+ options: Object.values(exports.OptionCardSize),
65595
+ default: exports.OptionCardSize.Medium,
65596
+ description: 'Controls padding and font size.',
65597
+ })
65461
65598
  ], exports.OptionCard.prototype, "size", void 0);
65462
65599
  __decorate([
65463
65600
  c({ context: optionCardGroupContext, subscribe: true })
@@ -65892,7 +66029,10 @@
65892
66029
  PanelHeaderSize["Large"] = "lg";
65893
66030
  })(exports.PanelHeaderSize || (exports.PanelHeaderSize = {}));
65894
66031
 
65895
- exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement, ['header', 'footer']) {
66032
+ exports.Panel = class Panel extends AutoHideEmptySlotsMixin(QuanticElement, [
66033
+ 'header',
66034
+ 'footer',
66035
+ ]) {
65896
66036
  constructor() {
65897
66037
  super(...arguments);
65898
66038
  this.variant = exports.PanelVariant.Outline;
@@ -65919,7 +66059,9 @@
65919
66059
  'Use for grouping content sections. Prefer quantic-card when the surface needs to be clickable.',
65920
66060
  category: 'display',
65921
66061
  slots: {
65922
- header: { description: 'Panel header — place quantic-panel-header here.' },
66062
+ header: {
66063
+ description: 'Panel header — place quantic-panel-header here.',
66064
+ },
65923
66065
  '': { description: 'Main body content.' },
65924
66066
  footer: { description: 'Footer content.' },
65925
66067
  },
@@ -65988,16 +66130,29 @@
65988
66130
  }
65989
66131
  `;
65990
66132
  __decorate([
65991
- prop({ type: 'PanelVariant', options: Object.values(exports.PanelVariant), default: exports.PanelVariant.Outline, description: 'Visual style of the panel.' })
66133
+ prop({
66134
+ type: 'PanelVariant',
66135
+ options: Object.values(exports.PanelVariant),
66136
+ default: exports.PanelVariant.Outline,
66137
+ description: 'Visual style of the panel.',
66138
+ })
65992
66139
  ], exports.Panel.prototype, "variant", void 0);
65993
66140
  __decorate([
65994
- prop({ type: 'boolean', default: 'false', description: 'Applies brand-color border and title highlight.' })
66141
+ prop({
66142
+ type: 'boolean',
66143
+ default: 'false',
66144
+ description: 'Applies brand-color border and title highlight.',
66145
+ })
65995
66146
  ], exports.Panel.prototype, "highlighted", void 0);
65996
66147
  exports.Panel = __decorate([
65997
66148
  quanticElement('quantic-panel')
65998
66149
  ], exports.Panel);
65999
66150
 
66000
- exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement, ['pretitle', 'subtitle', 'meta']) {
66151
+ exports.PanelHeader = class PanelHeader extends AutoHideEmptySlotsMixin(QuanticElement, [
66152
+ 'pretitle',
66153
+ 'subtitle',
66154
+ 'meta',
66155
+ ]) {
66001
66156
  constructor() {
66002
66157
  super(...arguments);
66003
66158
  this.size = exports.PanelHeaderSize.Medium;
@@ -66090,7 +66245,12 @@
66090
66245
  }
66091
66246
  `;
66092
66247
  __decorate([
66093
- prop({ type: 'PanelHeaderSize', options: Object.values(exports.PanelHeaderSize), default: exports.PanelHeaderSize.Medium, description: 'Controls the title font size.' })
66248
+ prop({
66249
+ type: 'PanelHeaderSize',
66250
+ options: Object.values(exports.PanelHeaderSize),
66251
+ default: exports.PanelHeaderSize.Medium,
66252
+ description: 'Controls the title font size.',
66253
+ })
66094
66254
  ], exports.PanelHeader.prototype, "size", void 0);
66095
66255
  exports.PanelHeader = __decorate([
66096
66256
  quanticElement('quantic-panel-header')
@@ -69160,7 +69320,10 @@
69160
69320
  exports.LucideIconInfo.ensureDefined();
69161
69321
  exports.LucideIconTriangleAlert.ensureDefined();
69162
69322
  exports.LucideIconX.ensureDefined();
69163
- exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement, ['title', 'action']) {
69323
+ exports.Toast = class Toast extends AutoHideEmptySlotsMixin(QuanticElement, [
69324
+ 'title',
69325
+ 'action',
69326
+ ]) {
69164
69327
  constructor() {
69165
69328
  super(...arguments);
69166
69329
  this.open = false;
@@ -69223,18 +69386,18 @@
69223
69386
  </div>
69224
69387
  ${this.showCloseButton
69225
69388
  ? b `<quantic-button
69226
- class="close-button"
69227
- variant="ghost"
69228
- size="sm"
69229
- icon
69230
- aria-label="Close"
69231
- @click=${this.handleCloseClick}
69232
- >
69233
- <quantic-icon-lucide-x
69389
+ class="close-button"
69390
+ variant="ghost"
69234
69391
  size="sm"
69235
- class="close-icon"
69236
- ></quantic-icon-lucide-x>
69237
- </quantic-button>`
69392
+ icon
69393
+ aria-label="Close"
69394
+ @click=${this.handleCloseClick}
69395
+ >
69396
+ <quantic-icon-lucide-x
69397
+ size="sm"
69398
+ class="close-icon"
69399
+ ></quantic-icon-lucide-x>
69400
+ </quantic-button>`
69238
69401
  : A}
69239
69402
  </div>
69240
69403
  `;