@akcelik/strct 4.14.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.
- package/fesm2022/akcelik-strct.mjs +146 -13
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +63 -3
|
@@ -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
|
|
17578
|
+
@for (arc of legendArcs(); track arc.index) {
|
|
17565
17579
|
<li
|
|
17566
17580
|
class="strct-donut__leg"
|
|
17567
|
-
[class.is-active]="hovered() ===
|
|
17568
|
-
[class.is-dim]="hovered() !== null && hovered() !==
|
|
17569
|
-
|
|
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
|
|
17649
|
+
@for (arc of legendArcs(); track arc.index) {
|
|
17635
17650
|
<li
|
|
17636
17651
|
class="strct-donut__leg"
|
|
17637
|
-
[class.is-active]="hovered() ===
|
|
17638
|
-
[class.is-dim]="hovered() !== null && hovered() !==
|
|
17639
|
-
|
|
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: {
|
|
17652
|
-
|
|
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)',
|
|
@@ -22064,6 +22083,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
22064
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"] }]
|
|
22065
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 }] }] } });
|
|
22066
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"] }] } });
|
|
22199
|
+
|
|
22067
22200
|
/**
|
|
22068
22201
|
* A generic anchored overlay panel for arbitrary projected content — the
|
|
22069
22202
|
* public primitive behind menus, signposts and rich pickers:
|
|
@@ -23930,5 +24063,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
23930
24063
|
* Generated bundle index. Do not edit.
|
|
23931
24064
|
*/
|
|
23932
24065
|
|
|
23933
|
-
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, 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 };
|
|
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 };
|
|
23934
24067
|
//# sourceMappingURL=akcelik-strct.mjs.map
|