@akcelik/strct 4.13.0 → 4.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17439,6 +17439,14 @@ class StrctDonut {
17439
17439
  ...(ngDevMode ? [{ debugName: "centerLabel" }] : /* istanbul ignore next */ []));
17440
17440
  /** Show a legend (color · label · value · %) beside the ring. */
17441
17441
  legend = input(false, { ...(ngDevMode ? { debugName: "legend" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
17442
+ /** Where the legend sits: beside the ring, or under it. */
17443
+ legendPosition = input('side', /* @ts-ignore */
17444
+ ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
17445
+ /**
17446
+ * A zero-value category keeps its legend row, muted — "0 failed" is
17447
+ * information. Set it false to drop those rows instead.
17448
+ */
17449
+ keepEmpty = input(true, { ...(ngDevMode ? { debugName: "keepEmpty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
17442
17450
  /** Gap between slices, in degrees. */
17443
17451
  gap = input(3, /* @ts-ignore */
17444
17452
  ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
@@ -17477,6 +17485,12 @@ class StrctDonut {
17477
17485
  });
17478
17486
  }, /* @ts-ignore */
17479
17487
  ...(ngDevMode ? [{ debugName: "arcs" }] : /* istanbul ignore next */ []));
17488
+ /** The rows the legend shows — every arc, or only the non-empty ones. */
17489
+ legendArcs = computed(() => {
17490
+ const rows = this.arcs().map((arc, index) => ({ ...arc, index }));
17491
+ return this.keepEmpty() ? rows : rows.filter((r) => r.value !== 0);
17492
+ }, /* @ts-ignore */
17493
+ ...(ngDevMode ? [{ debugName: "legendArcs" }] : /* istanbul ignore next */ []));
17480
17494
  centerMain = computed(() => {
17481
17495
  const h = this.hovered();
17482
17496
  if (h !== null)
@@ -17512,7 +17526,7 @@ class StrctDonut {
17512
17526
  this.hovered.set(null);
17513
17527
  }
17514
17528
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDonut, deps: [], target: i0.ɵɵFactoryTarget.Component });
17515
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctDonut, isStandalone: true, selector: "strct-donut", inputs: { segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "strct-donut" }, ngImport: i0, template: `
17529
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctDonut, isStandalone: true, selector: "strct-donut", inputs: { segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, keepEmpty: { classPropertyName: "keepEmpty", publicName: "keepEmpty", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-donut--legend-below": "legendPosition() === 'below'" }, classAttribute: "strct-donut" }, ngImport: i0, template: `
17516
17530
  <div class="strct-donut__layout">
17517
17531
  <div class="strct-donut__wrap" [style.width.px]="size()" [style.height.px]="size()">
17518
17532
  <svg
@@ -17561,12 +17575,13 @@ class StrctDonut {
17561
17575
 
17562
17576
  @if (legend()) {
17563
17577
  <ul class="strct-donut__legend">
17564
- @for (arc of arcs(); track $index) {
17578
+ @for (arc of legendArcs(); track arc.index) {
17565
17579
  <li
17566
17580
  class="strct-donut__leg"
17567
- [class.is-active]="hovered() === $index"
17568
- [class.is-dim]="hovered() !== null && hovered() !== $index"
17569
- (pointerenter)="enter($index)"
17581
+ [class.is-active]="hovered() === arc.index"
17582
+ [class.is-dim]="hovered() !== null && hovered() !== arc.index"
17583
+ [class.is-empty]="arc.value === 0"
17584
+ (pointerenter)="enter(arc.index)"
17570
17585
  (pointerleave)="leave()"
17571
17586
  >
17572
17587
  <span class="strct-donut__swatch" [style.background]="arc.color"></span>
@@ -17578,7 +17593,7 @@ class StrctDonut {
17578
17593
  </ul>
17579
17594
  }
17580
17595
  </div>
17581
- `, isInline: true, styles: [".strct-donut{display:inline-block}.strct-donut__layout{display:inline-flex;align-items:center;gap:20px}.strct-donut__wrap{position:relative;flex-shrink:0}.strct-donut__track{stroke:var(--bg-3)}.strct-donut__arc{cursor:pointer;transition:stroke-width .16s ease,opacity .16s ease}.strct-donut__arc.is-dim{opacity:.32}.strct-donut__center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.strct-donut__value{font-size:var(--text-2xl);font-weight:650;color:var(--t1);line-height:1;font-variant-numeric:tabular-nums;transition:color .16s ease}.strct-donut__label{font-size:12px;color:var(--t2);margin-top:3px}.strct-donut__legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;min-width:0}.strct-donut__leg{display:flex;align-items:center;gap:8px;padding:3px 6px;border-radius:var(--radius-sm);font-size:12px;color:var(--t2);transition:background .14s ease,opacity .14s ease}.strct-donut__leg.is-active{background:var(--bg-2);color:var(--t1)}.strct-donut__leg.is-dim{opacity:.45}.strct-donut__swatch{width:9px;height:9px;border-radius:2px;flex-shrink:0}.strct-donut__leg-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-donut__leg-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--t1)}.strct-donut__leg-pct{font-variant-numeric:tabular-nums;color:var(--t3);min-width:34px;text-align:end}@media(prefers-reduced-motion:no-preference){.strct-donut__svg{transform-origin:center;animation:strct-donut-in .6s cubic-bezier(.22,1,.36,1) both}}@keyframes strct-donut-in{0%{opacity:0;transform:rotate(-16deg) scale(.94)}to{opacity:1;transform:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
17596
+ `, isInline: true, styles: [".strct-donut{display:inline-block}.strct-donut__layout{display:inline-flex;align-items:center;gap:20px}.strct-donut--legend-below .strct-donut__layout{flex-direction:column;align-items:center;gap:12px}.strct-donut__leg.is-empty{opacity:.55}.strct-donut__wrap{position:relative;flex-shrink:0}.strct-donut__track{stroke:var(--bg-3)}.strct-donut__arc{cursor:pointer;transition:stroke-width .16s ease,opacity .16s ease}.strct-donut__arc.is-dim{opacity:.32}.strct-donut__center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.strct-donut__value{font-size:var(--text-2xl);font-weight:650;color:var(--t1);line-height:1;font-variant-numeric:tabular-nums;transition:color .16s ease}.strct-donut__label{font-size:12px;color:var(--t2);margin-top:3px}.strct-donut__legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;min-width:0}.strct-donut__leg{display:flex;align-items:center;gap:8px;padding:3px 6px;border-radius:var(--radius-sm);font-size:12px;color:var(--t2);transition:background .14s ease,opacity .14s ease}.strct-donut__leg.is-active{background:var(--bg-2);color:var(--t1)}.strct-donut__leg.is-dim{opacity:.45}.strct-donut__swatch{width:9px;height:9px;border-radius:2px;flex-shrink:0}.strct-donut__leg-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-donut__leg-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--t1)}.strct-donut__leg-pct{font-variant-numeric:tabular-nums;color:var(--t3);min-width:34px;text-align:end}@media(prefers-reduced-motion:no-preference){.strct-donut__svg{transform-origin:center;animation:strct-donut-in .6s cubic-bezier(.22,1,.36,1) both}}@keyframes strct-donut-in{0%{opacity:0;transform:rotate(-16deg) scale(.94)}to{opacity:1;transform:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
17582
17597
  }
17583
17598
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDonut, decorators: [{
17584
17599
  type: Component,
@@ -17631,12 +17646,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
17631
17646
 
17632
17647
  @if (legend()) {
17633
17648
  <ul class="strct-donut__legend">
17634
- @for (arc of arcs(); track $index) {
17649
+ @for (arc of legendArcs(); track arc.index) {
17635
17650
  <li
17636
17651
  class="strct-donut__leg"
17637
- [class.is-active]="hovered() === $index"
17638
- [class.is-dim]="hovered() !== null && hovered() !== $index"
17639
- (pointerenter)="enter($index)"
17652
+ [class.is-active]="hovered() === arc.index"
17653
+ [class.is-dim]="hovered() !== null && hovered() !== arc.index"
17654
+ [class.is-empty]="arc.value === 0"
17655
+ (pointerenter)="enter(arc.index)"
17640
17656
  (pointerleave)="leave()"
17641
17657
  >
17642
17658
  <span class="strct-donut__swatch" [style.background]="arc.color"></span>
@@ -17648,8 +17664,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
17648
17664
  </ul>
17649
17665
  }
17650
17666
  </div>
17651
- `, host: { class: 'strct-donut' }, styles: [".strct-donut{display:inline-block}.strct-donut__layout{display:inline-flex;align-items:center;gap:20px}.strct-donut__wrap{position:relative;flex-shrink:0}.strct-donut__track{stroke:var(--bg-3)}.strct-donut__arc{cursor:pointer;transition:stroke-width .16s ease,opacity .16s ease}.strct-donut__arc.is-dim{opacity:.32}.strct-donut__center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.strct-donut__value{font-size:var(--text-2xl);font-weight:650;color:var(--t1);line-height:1;font-variant-numeric:tabular-nums;transition:color .16s ease}.strct-donut__label{font-size:12px;color:var(--t2);margin-top:3px}.strct-donut__legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;min-width:0}.strct-donut__leg{display:flex;align-items:center;gap:8px;padding:3px 6px;border-radius:var(--radius-sm);font-size:12px;color:var(--t2);transition:background .14s ease,opacity .14s ease}.strct-donut__leg.is-active{background:var(--bg-2);color:var(--t1)}.strct-donut__leg.is-dim{opacity:.45}.strct-donut__swatch{width:9px;height:9px;border-radius:2px;flex-shrink:0}.strct-donut__leg-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-donut__leg-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--t1)}.strct-donut__leg-pct{font-variant-numeric:tabular-nums;color:var(--t3);min-width:34px;text-align:end}@media(prefers-reduced-motion:no-preference){.strct-donut__svg{transform-origin:center;animation:strct-donut-in .6s cubic-bezier(.22,1,.36,1) both}}@keyframes strct-donut-in{0%{opacity:0;transform:rotate(-16deg) scale(.94)}to{opacity:1;transform:none}}\n"] }]
17652
- }], propDecorators: { segments: [{ type: i0.Input, args: [{ isSignal: true, alias: "segments", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], centerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerValue", required: false }] }], centerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerLabel", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }] } });
17667
+ `, host: {
17668
+ class: 'strct-donut',
17669
+ '[class.strct-donut--legend-below]': "legendPosition() === 'below'",
17670
+ }, styles: [".strct-donut{display:inline-block}.strct-donut__layout{display:inline-flex;align-items:center;gap:20px}.strct-donut--legend-below .strct-donut__layout{flex-direction:column;align-items:center;gap:12px}.strct-donut__leg.is-empty{opacity:.55}.strct-donut__wrap{position:relative;flex-shrink:0}.strct-donut__track{stroke:var(--bg-3)}.strct-donut__arc{cursor:pointer;transition:stroke-width .16s ease,opacity .16s ease}.strct-donut__arc.is-dim{opacity:.32}.strct-donut__center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.strct-donut__value{font-size:var(--text-2xl);font-weight:650;color:var(--t1);line-height:1;font-variant-numeric:tabular-nums;transition:color .16s ease}.strct-donut__label{font-size:12px;color:var(--t2);margin-top:3px}.strct-donut__legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;min-width:0}.strct-donut__leg{display:flex;align-items:center;gap:8px;padding:3px 6px;border-radius:var(--radius-sm);font-size:12px;color:var(--t2);transition:background .14s ease,opacity .14s ease}.strct-donut__leg.is-active{background:var(--bg-2);color:var(--t1)}.strct-donut__leg.is-dim{opacity:.45}.strct-donut__swatch{width:9px;height:9px;border-radius:2px;flex-shrink:0}.strct-donut__leg-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-donut__leg-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--t1)}.strct-donut__leg-pct{font-variant-numeric:tabular-nums;color:var(--t3);min-width:34px;text-align:end}@media(prefers-reduced-motion:no-preference){.strct-donut__svg{transform-origin:center;animation:strct-donut-in .6s cubic-bezier(.22,1,.36,1) both}}@keyframes strct-donut-in{0%{opacity:0;transform:rotate(-16deg) scale(.94)}to{opacity:1;transform:none}}\n"] }]
17671
+ }], propDecorators: { segments: [{ type: i0.Input, args: [{ isSignal: true, alias: "segments", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], centerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerValue", required: false }] }], centerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerLabel", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], keepEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepEmpty", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }] } });
17653
17672
 
17654
17673
  const COLOR$1 = {
17655
17674
  accent: 'var(--acc)',
@@ -18021,6 +18040,22 @@ class StrctMetricTile {
18021
18040
  /** Tints the value (defaults to neutral primary text). */
18022
18041
  status = input('neutral', /* @ts-ignore */
18023
18042
  ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
18043
+ /**
18044
+ * Tints the caption instead of the value — "2 down" is the warning, and the
18045
+ * 14 nodes above it are not. `null` keeps the caption muted.
18046
+ */
18047
+ captionStatus = input(null, /* @ts-ignore */
18048
+ ...(ngDevMode ? [{ debugName: "captionStatus" }] : /* istanbul ignore next */ []));
18049
+ /** Renders the tile as a link: the whole tile is the target. */
18050
+ href = input(null, /* @ts-ignore */
18051
+ ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
18052
+ /** Makes the whole tile a control that emits `activated`. */
18053
+ interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
18054
+ /** Emitted when an `interactive` tile is activated. */
18055
+ activated = output();
18056
+ /** The link / button's name: the KPI and its value, since the tile is the target. */
18057
+ hitLabel = computed(() => [this.label(), `${this.value()}${this.unit()}`].filter(Boolean).join(': '), /* @ts-ignore */
18058
+ ...(ngDevMode ? [{ debugName: "hitLabel" }] : /* istanbul ignore next */ []));
18024
18059
  /** Change indicator; sign drives the arrow + colour. Null hides it. */
18025
18060
  delta = input(null, /* @ts-ignore */
18026
18061
  ...(ngDevMode ? [{ debugName: "delta" }] : /* istanbul ignore next */ []));
@@ -18072,7 +18107,7 @@ class StrctMetricTile {
18072
18107
  }, /* @ts-ignore */
18073
18108
  ...(ngDevMode ? [{ debugName: "sparkStatus" }] : /* istanbul ignore next */ []));
18074
18109
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctMetricTile, deps: [], target: i0.ɵɵFactoryTarget.Component });
18075
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctMetricTile, isStandalone: true, selector: "strct-metric-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaSuffix: { classPropertyName: "deltaSuffix", publicName: "deltaSuffix", isSignal: true, isRequired: false, transformFunction: null }, deltaAriaLabel: { classPropertyName: "deltaAriaLabel", publicName: "deltaAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, invertDelta: { classPropertyName: "invertDelta", publicName: "invertDelta", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-mt--loading": "loading()", "attr.aria-busy": "loading() ? \"true\" : null" }, classAttribute: "strct-mt" }, ngImport: i0, template: `
18110
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctMetricTile, isStandalone: true, selector: "strct-metric-tile", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, captionStatus: { classPropertyName: "captionStatus", publicName: "captionStatus", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaSuffix: { classPropertyName: "deltaSuffix", publicName: "deltaSuffix", isSignal: true, isRequired: false, transformFunction: null }, deltaAriaLabel: { classPropertyName: "deltaAriaLabel", publicName: "deltaAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, invertDelta: { classPropertyName: "invertDelta", publicName: "invertDelta", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activated: "activated" }, host: { properties: { "class.strct-mt--actionable": "href() || interactive()", "class.strct-mt--loading": "loading()", "attr.aria-busy": "loading() ? \"true\" : null" }, classAttribute: "strct-mt" }, ngImport: i0, template: `
18076
18111
  @if (loading()) {
18077
18112
  <strct-skeleton width="45%" height="12px" />
18078
18113
  <strct-skeleton width="65%" height="28px" />
@@ -18098,8 +18133,14 @@ class StrctMetricTile {
18098
18133
  }
18099
18134
  </div>
18100
18135
 
18136
+ <!-- A number over its bar: the meter sits under the value and above the
18137
+ caption, so "62 %" and "of 80 GB" read as one thing. -->
18138
+ <div class="strct-mt__meter"><ng-content select="[strctMetricMeter]" /></div>
18139
+
18101
18140
  @if (caption()) {
18102
- <div class="strct-mt__caption">{{ caption() }}</div>
18141
+ <div class="strct-mt__caption strct-mt__caption--{{ captionStatus() ?? 'none' }}">
18142
+ {{ caption() }}
18143
+ </div>
18103
18144
  }
18104
18145
 
18105
18146
  @if (data().length) {
@@ -18108,7 +18149,19 @@ class StrctMetricTile {
18108
18149
  </div>
18109
18150
  }
18110
18151
  }
18111
- `, isInline: true, styles: [".strct-mt{display:flex;flex-direction:column;gap:6px;padding:var(--space-3) var(--space-4);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-1);min-width:0}.strct-mt__top{display:flex;align-items:center;gap:7px}.strct-mt__icon{display:inline-flex;color:var(--t3);flex-shrink:0}.strct-mt__label{font-size:12px;font-weight:500;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-mt__delta{display:inline-flex;align-items:center;gap:2px;margin-inline-start:auto;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;flex-shrink:0}.strct-mt__delta--up{color:var(--success)}.strct-mt__delta--down{color:var(--critical)}.strct-mt__delta--flat{color:var(--t3)}.strct-mt__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-mt__value{display:flex;align-items:baseline;gap:4px;font-size:var(--text-3xl);font-weight:650;letter-spacing:-.01em;color:var(--t1);line-height:1.1}.strct-mt__value--accent{color:var(--acc)}.strct-mt__value--success{color:var(--success)}.strct-mt__value--warning{color:var(--warning)}.strct-mt__value--critical{color:var(--critical)}.strct-mt__unit{font-size:14px;font-weight:500;color:var(--t3);letter-spacing:0}.strct-mt__caption{font-size:12px;color:var(--t3)}.strct-mt__spark{margin-top:2px;line-height:0}.strct-mt__spark strct-sparkline,.strct-mt__spark .strct-spark__svg{width:100%}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }, { kind: "component", type: StrctSkeleton, selector: "strct-skeleton", inputs: ["width", "height", "circle"] }, { kind: "component", type: StrctSparkline, selector: "strct-sparkline", inputs: ["data", "status", "area", "width", "height", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18152
+ <!-- A KPI you can drill into is a link. The hit area covers the tile, so
18153
+ the whole tile is the target and the focus ring is the tile's own. -->
18154
+ @if (href()) {
18155
+ <a class="strct-mt__hit" [href]="href()" [attr.aria-label]="hitLabel()"></a>
18156
+ } @else if (interactive()) {
18157
+ <button
18158
+ type="button"
18159
+ class="strct-mt__hit"
18160
+ [attr.aria-label]="hitLabel()"
18161
+ (click)="activated.emit()"
18162
+ ></button>
18163
+ }
18164
+ `, isInline: true, styles: [".strct-mt{position:relative;display:flex;flex-direction:column;gap:6px;padding:var(--space-3) var(--space-4);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-1);min-width:0}.strct-mt__top{display:flex;align-items:center;gap:7px}.strct-mt__icon{display:inline-flex;color:var(--t3);flex-shrink:0}.strct-mt__label{font-size:12px;font-weight:500;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-mt__delta{display:inline-flex;align-items:center;gap:2px;margin-inline-start:auto;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;flex-shrink:0}.strct-mt__delta--up{color:var(--success)}.strct-mt__delta--down{color:var(--critical)}.strct-mt__delta--flat{color:var(--t3)}.strct-mt__meter:empty{display:none}.strct-mt__hit{position:absolute;inset:-1px;padding:0;border:0;background:none;border-radius:inherit;cursor:pointer}.strct-mt__hit:focus-visible{outline:2px solid var(--acc50);outline-offset:2px}.strct-mt--actionable:hover{border-color:var(--b3);background:var(--bg-2)}.strct-mt__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-mt__value{display:flex;align-items:baseline;gap:4px;font-size:var(--text-3xl);font-weight:650;letter-spacing:-.01em;color:var(--t1);line-height:1.1}.strct-mt__value--accent{color:var(--acc)}.strct-mt__value--success{color:var(--success)}.strct-mt__value--warning{color:var(--warning)}.strct-mt__value--critical{color:var(--critical)}.strct-mt__unit{font-size:14px;font-weight:500;color:var(--t3);letter-spacing:0}.strct-mt__caption{font-size:12px;color:var(--t3)}.strct-mt__caption--accent{color:var(--acc)}.strct-mt__caption--success{color:var(--success)}.strct-mt__caption--warning{color:var(--warning)}.strct-mt__caption--critical{color:var(--critical)}.strct-mt__spark{margin-top:2px;line-height:0}.strct-mt__spark strct-sparkline,.strct-mt__spark .strct-spark__svg{width:100%}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }, { kind: "component", type: StrctSkeleton, selector: "strct-skeleton", inputs: ["width", "height", "circle"] }, { kind: "component", type: StrctSparkline, selector: "strct-sparkline", inputs: ["data", "status", "area", "width", "height", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18112
18165
  }
18113
18166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctMetricTile, decorators: [{
18114
18167
  type: Component,
@@ -18138,8 +18191,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
18138
18191
  }
18139
18192
  </div>
18140
18193
 
18194
+ <!-- A number over its bar: the meter sits under the value and above the
18195
+ caption, so "62 %" and "of 80 GB" read as one thing. -->
18196
+ <div class="strct-mt__meter"><ng-content select="[strctMetricMeter]" /></div>
18197
+
18141
18198
  @if (caption()) {
18142
- <div class="strct-mt__caption">{{ caption() }}</div>
18199
+ <div class="strct-mt__caption strct-mt__caption--{{ captionStatus() ?? 'none' }}">
18200
+ {{ caption() }}
18201
+ </div>
18143
18202
  }
18144
18203
 
18145
18204
  @if (data().length) {
@@ -18148,12 +18207,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
18148
18207
  </div>
18149
18208
  }
18150
18209
  }
18210
+ <!-- A KPI you can drill into is a link. The hit area covers the tile, so
18211
+ the whole tile is the target and the focus ring is the tile's own. -->
18212
+ @if (href()) {
18213
+ <a class="strct-mt__hit" [href]="href()" [attr.aria-label]="hitLabel()"></a>
18214
+ } @else if (interactive()) {
18215
+ <button
18216
+ type="button"
18217
+ class="strct-mt__hit"
18218
+ [attr.aria-label]="hitLabel()"
18219
+ (click)="activated.emit()"
18220
+ ></button>
18221
+ }
18151
18222
  `, host: {
18152
18223
  class: 'strct-mt',
18224
+ '[class.strct-mt--actionable]': 'href() || interactive()',
18153
18225
  '[class.strct-mt--loading]': 'loading()',
18154
18226
  '[attr.aria-busy]': 'loading() ? "true" : null',
18155
- }, styles: [".strct-mt{display:flex;flex-direction:column;gap:6px;padding:var(--space-3) var(--space-4);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-1);min-width:0}.strct-mt__top{display:flex;align-items:center;gap:7px}.strct-mt__icon{display:inline-flex;color:var(--t3);flex-shrink:0}.strct-mt__label{font-size:12px;font-weight:500;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-mt__delta{display:inline-flex;align-items:center;gap:2px;margin-inline-start:auto;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;flex-shrink:0}.strct-mt__delta--up{color:var(--success)}.strct-mt__delta--down{color:var(--critical)}.strct-mt__delta--flat{color:var(--t3)}.strct-mt__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-mt__value{display:flex;align-items:baseline;gap:4px;font-size:var(--text-3xl);font-weight:650;letter-spacing:-.01em;color:var(--t1);line-height:1.1}.strct-mt__value--accent{color:var(--acc)}.strct-mt__value--success{color:var(--success)}.strct-mt__value--warning{color:var(--warning)}.strct-mt__value--critical{color:var(--critical)}.strct-mt__unit{font-size:14px;font-weight:500;color:var(--t3);letter-spacing:0}.strct-mt__caption{font-size:12px;color:var(--t3)}.strct-mt__spark{margin-top:2px;line-height:0}.strct-mt__spark strct-sparkline,.strct-mt__spark .strct-spark__svg{width:100%}\n"] }]
18156
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaSuffix", required: false }] }], deltaAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaAriaLabel", required: false }] }], invertDelta: [{ type: i0.Input, args: [{ isSignal: true, alias: "invertDelta", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
18227
+ }, styles: [".strct-mt{position:relative;display:flex;flex-direction:column;gap:6px;padding:var(--space-3) var(--space-4);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-1);min-width:0}.strct-mt__top{display:flex;align-items:center;gap:7px}.strct-mt__icon{display:inline-flex;color:var(--t3);flex-shrink:0}.strct-mt__label{font-size:12px;font-weight:500;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-mt__delta{display:inline-flex;align-items:center;gap:2px;margin-inline-start:auto;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;flex-shrink:0}.strct-mt__delta--up{color:var(--success)}.strct-mt__delta--down{color:var(--critical)}.strct-mt__delta--flat{color:var(--t3)}.strct-mt__meter:empty{display:none}.strct-mt__hit{position:absolute;inset:-1px;padding:0;border:0;background:none;border-radius:inherit;cursor:pointer}.strct-mt__hit:focus-visible{outline:2px solid var(--acc50);outline-offset:2px}.strct-mt--actionable:hover{border-color:var(--b3);background:var(--bg-2)}.strct-mt__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-mt__value{display:flex;align-items:baseline;gap:4px;font-size:var(--text-3xl);font-weight:650;letter-spacing:-.01em;color:var(--t1);line-height:1.1}.strct-mt__value--accent{color:var(--acc)}.strct-mt__value--success{color:var(--success)}.strct-mt__value--warning{color:var(--warning)}.strct-mt__value--critical{color:var(--critical)}.strct-mt__unit{font-size:14px;font-weight:500;color:var(--t3);letter-spacing:0}.strct-mt__caption{font-size:12px;color:var(--t3)}.strct-mt__caption--accent{color:var(--acc)}.strct-mt__caption--success{color:var(--success)}.strct-mt__caption--warning{color:var(--warning)}.strct-mt__caption--critical{color:var(--critical)}.strct-mt__spark{margin-top:2px;line-height:0}.strct-mt__spark strct-sparkline,.strct-mt__spark .strct-spark__svg{width:100%}\n"] }]
18228
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], captionStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionStatus", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], activated: [{ type: i0.Output, args: ["activated"] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaSuffix", required: false }] }], deltaAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaAriaLabel", required: false }] }], invertDelta: [{ type: i0.Input, args: [{ isSignal: true, alias: "invertDelta", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
18157
18229
 
18158
18230
  let heroCounter = 0;
18159
18231
  /** Default leading icon per status, when `icon` is not supplied. */
@@ -18256,9 +18328,18 @@ class StrctAlert {
18256
18328
  /** Accessible label of the dismiss button (localizable). */
18257
18329
  dismissLabel = input('Dismiss', /* @ts-ignore */
18258
18330
  ...(ngDevMode ? [{ debugName: "dismissLabel" }] : /* istanbul ignore next */ []));
18331
+ /**
18332
+ * Overrides the icon derived from `type` — a lock for a locked setting, a
18333
+ * shield for a security note, when the tone alone does not say what kind of
18334
+ * note this is. `null` keeps the derived one.
18335
+ */
18336
+ icon = input(null, /* @ts-ignore */
18337
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
18259
18338
  /** Emitted when the alert is dismissed. */
18260
18339
  closed = output();
18261
- icon = computed(() => {
18340
+ iconName = computed(() => this.icon() ?? this.derivedIcon(), /* @ts-ignore */
18341
+ ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
18342
+ derivedIcon = computed(() => {
18262
18343
  switch (this.type()) {
18263
18344
  case 'success':
18264
18345
  return 'success';
@@ -18270,38 +18351,46 @@ class StrctAlert {
18270
18351
  return 'info';
18271
18352
  }
18272
18353
  }, /* @ts-ignore */
18273
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
18354
+ ...(ngDevMode ? [{ debugName: "derivedIcon" }] : /* istanbul ignore next */ []));
18274
18355
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
18275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctAlert, isStandalone: true, selector: "strct-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "type() === 'critical' ? 'alert' : 'status'", "class.strct-alert--success": "type() === 'success'", "class.strct-alert--warning": "type() === 'warning'", "class.strct-alert--critical": "type() === 'critical'" }, classAttribute: "strct-alert" }, ngImport: i0, template: `
18276
- <strct-icon [name]="icon()" [size]="16" />
18277
- <div class="strct-alert__body"><ng-content /></div>
18278
- @if (closable()) {
18279
- <button
18280
- type="button"
18281
- class="strct-alert__close"
18282
- [attr.aria-label]="dismissLabel()"
18283
- (click)="closed.emit()"
18284
- >
18285
- <strct-icon name="close" [size]="13" />
18286
- </button>
18287
- }
18288
- `, isInline: true, styles: [".strct-alert{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);font-size:13px;color:var(--t1);background:var(--bg-1);border:1px solid var(--b2);border-inline-start:3px solid var(--acc)}.strct-alert strct-icon{color:var(--acc);margin-top:1px;flex-shrink:0}.strct-alert__body{flex:1;color:var(--t1)}.strct-alert__close{flex-shrink:0;display:inline-flex;padding:2px;margin-block-start:-2px;margin-inline-end:-2px;border:0;background:transparent;color:var(--t3);cursor:pointer;border-radius:var(--radius-sm)}.strct-alert__close:hover{color:var(--t1);background:var(--bg-3)}.strct-alert--success{border-inline-start-color:var(--success)}.strct-alert--success strct-icon{color:var(--success)}.strct-alert--warning{border-inline-start-color:var(--warning)}.strct-alert--warning strct-icon{color:var(--warning)}.strct-alert--critical{border-inline-start-color:var(--critical)}.strct-alert--critical strct-icon{color:var(--critical)}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18356
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctAlert, isStandalone: true, selector: "strct-alert", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "type() === 'critical' ? 'alert' : 'status'", "class.strct-alert--success": "type() === 'success'", "class.strct-alert--warning": "type() === 'warning'", "class.strct-alert--critical": "type() === 'critical'" }, classAttribute: "strct-alert" }, ngImport: i0, template: `
18357
+ <!-- The row carries the layout, not the host: a consumer setting
18358
+ display:block for spacing must not put the icon on its own line. -->
18359
+ <div class="strct-alert__row">
18360
+ <strct-icon class="strct-alert__icon" [name]="iconName()" [size]="16" />
18361
+ <div class="strct-alert__body"><ng-content /></div>
18362
+ @if (closable()) {
18363
+ <button
18364
+ type="button"
18365
+ class="strct-alert__close"
18366
+ [attr.aria-label]="dismissLabel()"
18367
+ (click)="closed.emit()"
18368
+ >
18369
+ <strct-icon name="close" [size]="13" />
18370
+ </button>
18371
+ }
18372
+ </div>
18373
+ `, isInline: true, styles: [".strct-alert{display:block;padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);font-size:13px;color:var(--t1);background:var(--bg-1);border:1px solid var(--b2);border-inline-start:3px solid var(--acc)}.strct-alert__row{display:flex;align-items:flex-start;gap:var(--space-2)}.strct-alert strct-icon{color:var(--acc);margin-top:1px;flex-shrink:0}.strct-alert__body{flex:1;color:var(--t1)}.strct-alert__close{flex-shrink:0;display:inline-flex;padding:2px;margin-block-start:-2px;margin-inline-end:-2px;border:0;background:transparent;color:var(--t3);cursor:pointer;border-radius:var(--radius-sm)}.strct-alert__close:hover{color:var(--t1);background:var(--bg-3)}.strct-alert--success{border-inline-start-color:var(--success)}.strct-alert--success strct-icon{color:var(--success)}.strct-alert--warning{border-inline-start-color:var(--warning)}.strct-alert--warning strct-icon{color:var(--warning)}.strct-alert--critical{border-inline-start-color:var(--critical)}.strct-alert--critical strct-icon{color:var(--critical)}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18289
18374
  }
18290
18375
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctAlert, decorators: [{
18291
18376
  type: Component,
18292
18377
  args: [{ selector: 'strct-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctIcon], template: `
18293
- <strct-icon [name]="icon()" [size]="16" />
18294
- <div class="strct-alert__body"><ng-content /></div>
18295
- @if (closable()) {
18296
- <button
18297
- type="button"
18298
- class="strct-alert__close"
18299
- [attr.aria-label]="dismissLabel()"
18300
- (click)="closed.emit()"
18301
- >
18302
- <strct-icon name="close" [size]="13" />
18303
- </button>
18304
- }
18378
+ <!-- The row carries the layout, not the host: a consumer setting
18379
+ display:block for spacing must not put the icon on its own line. -->
18380
+ <div class="strct-alert__row">
18381
+ <strct-icon class="strct-alert__icon" [name]="iconName()" [size]="16" />
18382
+ <div class="strct-alert__body"><ng-content /></div>
18383
+ @if (closable()) {
18384
+ <button
18385
+ type="button"
18386
+ class="strct-alert__close"
18387
+ [attr.aria-label]="dismissLabel()"
18388
+ (click)="closed.emit()"
18389
+ >
18390
+ <strct-icon name="close" [size]="13" />
18391
+ </button>
18392
+ }
18393
+ </div>
18305
18394
  `, host: {
18306
18395
  class: 'strct-alert',
18307
18396
  // role="alert" implies aria-live="assertive" for critical alerts.
@@ -18309,8 +18398,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
18309
18398
  '[class.strct-alert--success]': "type() === 'success'",
18310
18399
  '[class.strct-alert--warning]': "type() === 'warning'",
18311
18400
  '[class.strct-alert--critical]': "type() === 'critical'",
18312
- }, styles: [".strct-alert{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);font-size:13px;color:var(--t1);background:var(--bg-1);border:1px solid var(--b2);border-inline-start:3px solid var(--acc)}.strct-alert strct-icon{color:var(--acc);margin-top:1px;flex-shrink:0}.strct-alert__body{flex:1;color:var(--t1)}.strct-alert__close{flex-shrink:0;display:inline-flex;padding:2px;margin-block-start:-2px;margin-inline-end:-2px;border:0;background:transparent;color:var(--t3);cursor:pointer;border-radius:var(--radius-sm)}.strct-alert__close:hover{color:var(--t1);background:var(--bg-3)}.strct-alert--success{border-inline-start-color:var(--success)}.strct-alert--success strct-icon{color:var(--success)}.strct-alert--warning{border-inline-start-color:var(--warning)}.strct-alert--warning strct-icon{color:var(--warning)}.strct-alert--critical{border-inline-start-color:var(--critical)}.strct-alert--critical strct-icon{color:var(--critical)}\n"] }]
18313
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
18401
+ }, styles: [".strct-alert{display:block;padding:var(--space-2) var(--space-3);border-radius:var(--radius-lg);font-size:13px;color:var(--t1);background:var(--bg-1);border:1px solid var(--b2);border-inline-start:3px solid var(--acc)}.strct-alert__row{display:flex;align-items:flex-start;gap:var(--space-2)}.strct-alert strct-icon{color:var(--acc);margin-top:1px;flex-shrink:0}.strct-alert__body{flex:1;color:var(--t1)}.strct-alert__close{flex-shrink:0;display:inline-flex;padding:2px;margin-block-start:-2px;margin-inline-end:-2px;border:0;background:transparent;color:var(--t3);cursor:pointer;border-radius:var(--radius-sm)}.strct-alert__close:hover{color:var(--t1);background:var(--bg-3)}.strct-alert--success{border-inline-start-color:var(--success)}.strct-alert--success strct-icon{color:var(--success)}.strct-alert--warning{border-inline-start-color:var(--warning)}.strct-alert--warning strct-icon{color:var(--warning)}.strct-alert--critical{border-inline-start-color:var(--critical)}.strct-alert--critical strct-icon{color:var(--critical)}\n"] }]
18402
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
18314
18403
 
18315
18404
  let tooltipCounter = 0;
18316
18405
  /**
@@ -21858,13 +21947,19 @@ class StrctStatusDot {
21858
21947
  /** Dot size: `sm` for dense rows, `md` standalone. */
21859
21948
  size = input('md', /* @ts-ignore */
21860
21949
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
21950
+ /**
21951
+ * Something happening *now* — a task running, a live chart. The halo pulses
21952
+ * once a second; the dot itself never changes size, so a column of dots does
21953
+ * not jitter. Under `prefers-reduced-motion` the halo is a static ring.
21954
+ */
21955
+ pulse = input(false, { ...(ngDevMode ? { debugName: "pulse" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
21861
21956
  text = computed(() => this.label() || DEFAULT_LABEL[this.status()], /* @ts-ignore */
21862
21957
  ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
21863
21958
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, deps: [], target: i0.ɵɵFactoryTarget.Component });
21864
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: StrctStatusDot, isStandalone: true, selector: "strct-status-dot", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-dot--accent": "status() === 'accent'", "class.strct-dot--success": "status() === 'success'", "class.strct-dot--warning": "status() === 'warning'", "class.strct-dot--critical": "status() === 'critical'", "class.strct-dot--sm": "size() === 'sm'" }, classAttribute: "strct-dot" }, ngImport: i0, template: `
21959
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: StrctStatusDot, isStandalone: true, selector: "strct-status-dot", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, pulse: { classPropertyName: "pulse", publicName: "pulse", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-dot--accent": "status() === 'accent'", "class.strct-dot--success": "status() === 'success'", "class.strct-dot--warning": "status() === 'warning'", "class.strct-dot--critical": "status() === 'critical'", "class.strct-dot--sm": "size() === 'sm'", "class.strct-dot--pulse": "pulse()" }, classAttribute: "strct-dot" }, ngImport: i0, template: `
21865
21960
  <span class="strct-dot__dot" aria-hidden="true"></span>
21866
21961
  <span class="strct-dot__sr">{{ text() }}</span>
21867
- `, isInline: true, styles: [".strct-dot{display:inline-flex;align-items:center;flex:none;line-height:0}.strct-dot__dot{width:10px;height:10px;border-radius:50%;background:var(--t3)}.strct-dot--sm .strct-dot__dot{width:8px;height:8px}.strct-dot--accent .strct-dot__dot{background:var(--acc)}.strct-dot--success .strct-dot__dot{background:var(--success)}.strct-dot--warning .strct-dot__dot{background:var(--warning)}.strct-dot--critical .strct-dot__dot{background:var(--critical)}.strct-dot__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
21962
+ `, isInline: true, styles: [".strct-dot{display:inline-flex;align-items:center;flex:none;line-height:0}.strct-dot__dot{width:10px;height:10px;border-radius:50%;background:var(--t3)}.strct-dot--sm .strct-dot__dot{width:8px;height:8px}.strct-dot--accent .strct-dot__dot{background:var(--acc)}.strct-dot--success .strct-dot__dot{background:var(--success)}.strct-dot--warning .strct-dot__dot{background:var(--warning)}.strct-dot--critical .strct-dot__dot{background:var(--critical)}.strct-dot--pulse .strct-dot__dot{position:relative}.strct-dot--pulse .strct-dot__dot:after{content:\"\";position:absolute;inset:0;border-radius:50%;background:inherit;animation:strct-dot-pulse 1s ease-out infinite}@keyframes strct-dot-pulse{0%{box-shadow:0 0 0 0 currentColor;opacity:.55}to{box-shadow:0 0 0 5px transparent;opacity:0}}.strct-dot--pulse .strct-dot__dot{color:var(--t3)}.strct-dot--pulse.strct-dot--accent .strct-dot__dot{color:var(--acc)}.strct-dot--pulse.strct-dot--success .strct-dot__dot{color:var(--success)}.strct-dot--pulse.strct-dot--warning .strct-dot__dot{color:var(--warning)}.strct-dot--pulse.strct-dot--critical .strct-dot__dot{color:var(--critical)}@media(prefers-reduced-motion:reduce){.strct-dot--pulse .strct-dot__dot:after{animation:none;box-shadow:0 0 0 3px currentColor;opacity:.25}}.strct-dot__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
21868
21963
  }
21869
21964
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, decorators: [{
21870
21965
  type: Component,
@@ -21878,8 +21973,229 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
21878
21973
  '[class.strct-dot--warning]': "status() === 'warning'",
21879
21974
  '[class.strct-dot--critical]': "status() === 'critical'",
21880
21975
  '[class.strct-dot--sm]': "size() === 'sm'",
21881
- }, styles: [".strct-dot{display:inline-flex;align-items:center;flex:none;line-height:0}.strct-dot__dot{width:10px;height:10px;border-radius:50%;background:var(--t3)}.strct-dot--sm .strct-dot__dot{width:8px;height:8px}.strct-dot--accent .strct-dot__dot{background:var(--acc)}.strct-dot--success .strct-dot__dot{background:var(--success)}.strct-dot--warning .strct-dot__dot{background:var(--warning)}.strct-dot--critical .strct-dot__dot{background:var(--critical)}.strct-dot__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
21882
- }], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
21976
+ '[class.strct-dot--pulse]': 'pulse()',
21977
+ }, styles: [".strct-dot{display:inline-flex;align-items:center;flex:none;line-height:0}.strct-dot__dot{width:10px;height:10px;border-radius:50%;background:var(--t3)}.strct-dot--sm .strct-dot__dot{width:8px;height:8px}.strct-dot--accent .strct-dot__dot{background:var(--acc)}.strct-dot--success .strct-dot__dot{background:var(--success)}.strct-dot--warning .strct-dot__dot{background:var(--warning)}.strct-dot--critical .strct-dot__dot{background:var(--critical)}.strct-dot--pulse .strct-dot__dot{position:relative}.strct-dot--pulse .strct-dot__dot:after{content:\"\";position:absolute;inset:0;border-radius:50%;background:inherit;animation:strct-dot-pulse 1s ease-out infinite}@keyframes strct-dot-pulse{0%{box-shadow:0 0 0 0 currentColor;opacity:.55}to{box-shadow:0 0 0 5px transparent;opacity:0}}.strct-dot--pulse .strct-dot__dot{color:var(--t3)}.strct-dot--pulse.strct-dot--accent .strct-dot__dot{color:var(--acc)}.strct-dot--pulse.strct-dot--success .strct-dot__dot{color:var(--success)}.strct-dot--pulse.strct-dot--warning .strct-dot__dot{color:var(--warning)}.strct-dot--pulse.strct-dot--critical .strct-dot__dot{color:var(--critical)}@media(prefers-reduced-motion:reduce){.strct-dot--pulse .strct-dot__dot:after{animation:none;box-shadow:0 0 0 3px currentColor;opacity:.25}}.strct-dot__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
21978
+ }], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], pulse: [{ type: i0.Input, args: [{ isSignal: true, alias: "pulse", required: false }] }] } });
21979
+
21980
+ const DEFAULT_LABELS = {
21981
+ live: 'Live',
21982
+ liveEvery: (s) => `Live · updates every ${s} s`,
21983
+ connecting: 'Connecting…',
21984
+ reconnecting: 'Reconnecting…',
21985
+ paused: 'Paused',
21986
+ stale: (relative) => `Last updated ${relative}`,
21987
+ justNow: 'just now',
21988
+ minutesAgo: (n) => `${n} min ago`,
21989
+ hoursAgo: (n) => `${n} h ago`,
21990
+ };
21991
+ const TONE = {
21992
+ live: 'success',
21993
+ connecting: 'accent',
21994
+ reconnecting: 'warning',
21995
+ paused: 'neutral',
21996
+ stale: 'warning',
21997
+ };
21998
+ /**
21999
+ * "Live · updates every 5 s" and "Reconnecting…" are states of one indicator,
22000
+ * not three captions written by hand next to three hand-rolled dots. A dot that
22001
+ * is live and a dot that is merely green are different facts.
22002
+ *
22003
+ * <strct-live-indicator state="live" [interval]="5000" />
22004
+ * <strct-live-indicator state="stale" [updatedAt]="lastRead" />
22005
+ *
22006
+ * It is a `role="status"`, so a change of state is announced politely — and the
22007
+ * relative time re-renders on its own every 30 s without announcing each tick.
22008
+ */
22009
+ class StrctLiveIndicator {
22010
+ /** What the view is doing. */
22011
+ state = input('live', /* @ts-ignore */
22012
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
22013
+ /** Refresh period in ms — turns "Live" into "Live · updates every 5 s". */
22014
+ interval = input(null, /* @ts-ignore */
22015
+ ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
22016
+ /** When the data last arrived; drives the relative time of `stale`. */
22017
+ updatedAt = input(null, /* @ts-ignore */
22018
+ ...(ngDevMode ? [{ debugName: "updatedAt" }] : /* istanbul ignore next */ []));
22019
+ /** Every string, for localisation. */
22020
+ labels = input({}, /* @ts-ignore */
22021
+ ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
22022
+ tone = computed(() => TONE[this.state()], /* @ts-ignore */
22023
+ ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
22024
+ /** Only a view that is actually receiving data pulses. */
22025
+ pulsing = computed(() => this.state() === 'live', /* @ts-ignore */
22026
+ ...(ngDevMode ? [{ debugName: "pulsing" }] : /* istanbul ignore next */ []));
22027
+ L = computed(() => ({ ...DEFAULT_LABELS, ...this.labels() }), /* @ts-ignore */
22028
+ ...(ngDevMode ? [{ debugName: "L" }] : /* istanbul ignore next */ []));
22029
+ /** Re-read every 30 s, so "3 min ago" does not go stale on screen. */
22030
+ now = signal(Date.now(), /* @ts-ignore */
22031
+ ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
22032
+ constructor() {
22033
+ const timer = setInterval(() => this.now.set(Date.now()), 30_000);
22034
+ inject(DestroyRef).onDestroy(() => clearInterval(timer));
22035
+ }
22036
+ relative = computed(() => {
22037
+ const at = this.updatedAt();
22038
+ if (at == null)
22039
+ return '';
22040
+ const ms = this.now() - (at instanceof Date ? at.getTime() : at);
22041
+ const mins = Math.floor(ms / 60_000);
22042
+ if (mins < 1)
22043
+ return this.L().justNow;
22044
+ if (mins < 60)
22045
+ return this.L().minutesAgo(mins);
22046
+ return this.L().hoursAgo(Math.floor(mins / 60));
22047
+ }, /* @ts-ignore */
22048
+ ...(ngDevMode ? [{ debugName: "relative" }] : /* istanbul ignore next */ []));
22049
+ text = computed(() => {
22050
+ const l = this.L();
22051
+ switch (this.state()) {
22052
+ case 'live': {
22053
+ const ms = this.interval();
22054
+ return ms ? l.liveEvery(Math.round(ms / 1000)) : l.live;
22055
+ }
22056
+ case 'connecting':
22057
+ return l.connecting;
22058
+ case 'reconnecting':
22059
+ return l.reconnecting;
22060
+ case 'paused':
22061
+ return l.paused;
22062
+ case 'stale':
22063
+ return this.relative() ? l.stale(this.relative()) : l.stale('');
22064
+ }
22065
+ }, /* @ts-ignore */
22066
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
22067
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctLiveIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
22068
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: StrctLiveIndicator, isStandalone: true, selector: "strct-live-indicator", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, updatedAt: { classPropertyName: "updatedAt", publicName: "updatedAt", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status", "aria-live": "polite" }, properties: { "attr.data-state": "state()" }, classAttribute: "strct-live" }, ngImport: i0, template: `
22069
+ <strct-status-dot size="sm" [status]="tone()" [pulse]="pulsing()" [label]="text()" />
22070
+ <span class="strct-live__text">{{ text() }}</span>
22071
+ `, isInline: true, styles: [".strct-live{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-sm);color:var(--t3)}.strct-live[data-state=reconnecting] .strct-live__text,.strct-live[data-state=stale] .strct-live__text{color:var(--warning)}.strct-live .strct-dot__sr{display:none}\n"], dependencies: [{ kind: "component", type: StrctStatusDot, selector: "strct-status-dot", inputs: ["status", "label", "size", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
22072
+ }
22073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctLiveIndicator, decorators: [{
22074
+ type: Component,
22075
+ args: [{ selector: 'strct-live-indicator', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctStatusDot], template: `
22076
+ <strct-status-dot size="sm" [status]="tone()" [pulse]="pulsing()" [label]="text()" />
22077
+ <span class="strct-live__text">{{ text() }}</span>
22078
+ `, host: {
22079
+ class: 'strct-live',
22080
+ role: 'status',
22081
+ 'aria-live': 'polite',
22082
+ '[attr.data-state]': 'state()',
22083
+ }, styles: [".strct-live{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-sm);color:var(--t3)}.strct-live[data-state=reconnecting] .strct-live__text,.strct-live[data-state=stale] .strct-live__text{color:var(--warning)}.strct-live .strct-dot__sr{display:none}\n"] }]
22084
+ }], ctorParameters: () => [], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], updatedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "updatedAt", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }] } });
22085
+
22086
+ /**
22087
+ * A chart's key is a component. The same swatch · label · value rows serve a
22088
+ * line chart's series picker, a diagram's edge styles and a donut's categories
22089
+ * — instead of 9px squares with inline backgrounds written per screen.
22090
+ *
22091
+ * <strct-legend [items]="series" orientation="vertical" />
22092
+ * <strct-legend [items]="edges" interactive (itemToggle)="toggle($event)" />
22093
+ *
22094
+ * A category with zero items still belongs in the key: pass it `muted`, because
22095
+ * "0 failed" is information.
22096
+ */
22097
+ class StrctLegend {
22098
+ /** The rows of the key. */
22099
+ items = input.required(/* @ts-ignore */
22100
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
22101
+ /** `vertical` stacks the rows and aligns their values. */
22102
+ orientation = input('horizontal', /* @ts-ignore */
22103
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
22104
+ /** Rows become toggle buttons carrying `aria-pressed`. */
22105
+ interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
22106
+ /** The label of the row that was toggled. */
22107
+ itemToggle = output();
22108
+ /** The status vocabulary's own tokens — 'accent' is `--acc`, not `--accent`. */
22109
+ static TONE = {
22110
+ neutral: 'var(--t3)',
22111
+ accent: 'var(--acc)',
22112
+ success: 'var(--success)',
22113
+ warning: 'var(--warning)',
22114
+ critical: 'var(--critical)',
22115
+ };
22116
+ swatchColor(item) {
22117
+ return item.color ?? StrctLegend.TONE[item.status ?? 'accent'];
22118
+ }
22119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
22120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctLegend, isStandalone: true, selector: "strct-legend", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemToggle: "itemToggle" }, host: { properties: { "class.strct-legend--vertical": "orientation() === 'vertical'" }, classAttribute: "strct-legend" }, ngImport: i0, template: `
22121
+ <ul class="strct-legend__list" role="list">
22122
+ @for (item of items(); track item.label) {
22123
+ <li class="strct-legend__row" [class.strct-legend__row--muted]="item.muted">
22124
+ @if (interactive()) {
22125
+ <button
22126
+ type="button"
22127
+ class="strct-legend__hit"
22128
+ [attr.aria-pressed]="!item.off"
22129
+ (click)="itemToggle.emit(item.label)"
22130
+ >
22131
+ <span
22132
+ class="strct-legend__swatch strct-legend__swatch--{{ item.shape ?? 'square' }}"
22133
+ [style.--strct-legend-color]="swatchColor(item)"
22134
+ aria-hidden="true"
22135
+ ></span>
22136
+ <span class="strct-legend__label">{{ item.label }}</span>
22137
+ @if (item.value !== undefined) {
22138
+ <span class="strct-legend__value">{{ item.value }}</span>
22139
+ }
22140
+ </button>
22141
+ } @else {
22142
+ <span
22143
+ class="strct-legend__swatch strct-legend__swatch--{{ item.shape ?? 'square' }}"
22144
+ [style.--strct-legend-color]="swatchColor(item)"
22145
+ aria-hidden="true"
22146
+ ></span>
22147
+ <span class="strct-legend__label">{{ item.label }}</span>
22148
+ @if (item.value !== undefined) {
22149
+ <span class="strct-legend__value">{{ item.value }}</span>
22150
+ }
22151
+ }
22152
+ </li>
22153
+ }
22154
+ </ul>
22155
+ `, isInline: true, styles: [".strct-legend{display:block;font-size:var(--text-sm);color:var(--t2)}.strct-legend__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px}.strct-legend--vertical .strct-legend__list{flex-direction:column;flex-wrap:nowrap;gap:2px}.strct-legend__row{display:flex;align-items:center;gap:7px;min-width:0}.strct-legend__row--muted{opacity:.55}.strct-legend__hit{display:flex;align-items:center;gap:7px;min-width:0;padding:2px 4px;margin:-2px -4px;border:0;border-radius:var(--radius-sm);background:none;font:inherit;color:inherit;cursor:pointer}.strct-legend__hit:hover{background:var(--bg-3)}.strct-legend__hit:focus-visible{outline:2px solid var(--acc50);outline-offset:1px}.strct-legend__hit[aria-pressed=false]{opacity:.45}.strct-legend__hit[aria-pressed=false] .strct-legend__label{text-decoration:line-through}.strct-legend__swatch{flex:none;background:var(--strct-legend-color, var(--t3))}.strct-legend__swatch--square{width:9px;height:9px;border-radius:2px}.strct-legend__swatch--dot{width:9px;height:9px;border-radius:50%}.strct-legend__swatch--line{width:14px;height:2px;border-radius:1px}.strct-legend__swatch--dash{width:14px;height:2px;background:repeating-linear-gradient(to right,var(--strct-legend-color, var(--t3)) 0 4px,transparent 4px 7px)}.strct-legend__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.strct-legend__value{margin-inline-start:auto;padding-inline-start:8px;color:var(--t3);font-variant-numeric:tabular-nums}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
22156
+ }
22157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctLegend, decorators: [{
22158
+ type: Component,
22159
+ args: [{ selector: 'strct-legend', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
22160
+ <ul class="strct-legend__list" role="list">
22161
+ @for (item of items(); track item.label) {
22162
+ <li class="strct-legend__row" [class.strct-legend__row--muted]="item.muted">
22163
+ @if (interactive()) {
22164
+ <button
22165
+ type="button"
22166
+ class="strct-legend__hit"
22167
+ [attr.aria-pressed]="!item.off"
22168
+ (click)="itemToggle.emit(item.label)"
22169
+ >
22170
+ <span
22171
+ class="strct-legend__swatch strct-legend__swatch--{{ item.shape ?? 'square' }}"
22172
+ [style.--strct-legend-color]="swatchColor(item)"
22173
+ aria-hidden="true"
22174
+ ></span>
22175
+ <span class="strct-legend__label">{{ item.label }}</span>
22176
+ @if (item.value !== undefined) {
22177
+ <span class="strct-legend__value">{{ item.value }}</span>
22178
+ }
22179
+ </button>
22180
+ } @else {
22181
+ <span
22182
+ class="strct-legend__swatch strct-legend__swatch--{{ item.shape ?? 'square' }}"
22183
+ [style.--strct-legend-color]="swatchColor(item)"
22184
+ aria-hidden="true"
22185
+ ></span>
22186
+ <span class="strct-legend__label">{{ item.label }}</span>
22187
+ @if (item.value !== undefined) {
22188
+ <span class="strct-legend__value">{{ item.value }}</span>
22189
+ }
22190
+ }
22191
+ </li>
22192
+ }
22193
+ </ul>
22194
+ `, host: {
22195
+ class: 'strct-legend',
22196
+ '[class.strct-legend--vertical]': "orientation() === 'vertical'",
22197
+ }, styles: [".strct-legend{display:block;font-size:var(--text-sm);color:var(--t2)}.strct-legend__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px}.strct-legend--vertical .strct-legend__list{flex-direction:column;flex-wrap:nowrap;gap:2px}.strct-legend__row{display:flex;align-items:center;gap:7px;min-width:0}.strct-legend__row--muted{opacity:.55}.strct-legend__hit{display:flex;align-items:center;gap:7px;min-width:0;padding:2px 4px;margin:-2px -4px;border:0;border-radius:var(--radius-sm);background:none;font:inherit;color:inherit;cursor:pointer}.strct-legend__hit:hover{background:var(--bg-3)}.strct-legend__hit:focus-visible{outline:2px solid var(--acc50);outline-offset:1px}.strct-legend__hit[aria-pressed=false]{opacity:.45}.strct-legend__hit[aria-pressed=false] .strct-legend__label{text-decoration:line-through}.strct-legend__swatch{flex:none;background:var(--strct-legend-color, var(--t3))}.strct-legend__swatch--square{width:9px;height:9px;border-radius:2px}.strct-legend__swatch--dot{width:9px;height:9px;border-radius:50%}.strct-legend__swatch--line{width:14px;height:2px;border-radius:1px}.strct-legend__swatch--dash{width:14px;height:2px;background:repeating-linear-gradient(to right,var(--strct-legend-color, var(--t3)) 0 4px,transparent 4px 7px)}.strct-legend__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.strct-legend__value{margin-inline-start:auto;padding-inline-start:8px;color:var(--t3);font-variant-numeric:tabular-nums}\n"] }]
22198
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }] } });
21883
22199
 
21884
22200
  /**
21885
22201
  * A generic anchored overlay panel for arbitrary projected content — the
@@ -23747,5 +24063,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
23747
24063
  * Generated bundle index. Do not edit.
23748
24064
  */
23749
24065
 
23750
- export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
24066
+ export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLegend, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLiveIndicator, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
23751
24067
  //# sourceMappingURL=akcelik-strct.mjs.map