@akcelik/strct 4.15.0 → 4.16.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 +162 -86
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +35 -6
|
@@ -2113,6 +2113,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
2113
2113
|
* <strct-avatar name="Ada Lovelace" status="online" />
|
|
2114
2114
|
*/
|
|
2115
2115
|
class StrctAvatar {
|
|
2116
|
+
/**
|
|
2117
|
+
* An icon instead of initials — a group, an assistant, a brand mark. An
|
|
2118
|
+
* `src` image still wins.
|
|
2119
|
+
*/
|
|
2120
|
+
icon = input('', /* @ts-ignore */
|
|
2121
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
2122
|
+
/** `square` for a thing rather than a person (a group, an app). */
|
|
2123
|
+
shape = input('circle', /* @ts-ignore */
|
|
2124
|
+
...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
|
|
2125
|
+
/** Surface tone. `neutral` keeps the default grey tile. */
|
|
2126
|
+
tone = input('neutral', /* @ts-ignore */
|
|
2127
|
+
...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
2128
|
+
/** The icon scales with the avatar. */
|
|
2129
|
+
iconSize = computed(() => this.size() === 'lg' ? 22 : this.size() === 'sm' ? 13 : 17, /* @ts-ignore */
|
|
2130
|
+
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
2116
2131
|
/** Image URL. */
|
|
2117
2132
|
src = input('', /* @ts-ignore */
|
|
2118
2133
|
...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
@@ -2135,22 +2150,30 @@ class StrctAvatar {
|
|
|
2135
2150
|
}, /* @ts-ignore */
|
|
2136
2151
|
...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
|
|
2137
2152
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctAvatar, isStandalone: true, selector: "strct-avatar", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-av--sm": "size() === 'sm'", "class.strct-av--lg": "size() === 'lg'", "class.strct-av--online": "status() === 'online'", "class.strct-av--busy": "status() === 'busy'", "class.strct-av--offline": "status() === 'offline'", "attr.title": "name() || null" }, classAttribute: "strct-av" }, ngImport: i0, template: `
|
|
2153
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctAvatar, isStandalone: true, selector: "strct-avatar", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-av--square": "shape() === 'square'", "attr.data-tone": "tone()", "class.strct-av--sm": "size() === 'sm'", "class.strct-av--lg": "size() === 'lg'", "class.strct-av--online": "status() === 'online'", "class.strct-av--busy": "status() === 'busy'", "class.strct-av--offline": "status() === 'offline'", "attr.title": "name() || null" }, classAttribute: "strct-av" }, ngImport: i0, template: `
|
|
2139
2154
|
@if (src()) {
|
|
2140
2155
|
<img class="strct-av__img" [src]="src()" [alt]="name()" />
|
|
2156
|
+
} @else if (icon()) {
|
|
2157
|
+
<!-- Not every avatar is a person with initials: a group, an assistant, a
|
|
2158
|
+
brand mark. -->
|
|
2159
|
+
<strct-icon class="strct-av__icon" [name]="icon()" [size]="iconSize()" />
|
|
2141
2160
|
} @else {
|
|
2142
2161
|
<span class="strct-av__initials">{{ initials() }}</span>
|
|
2143
2162
|
}
|
|
2144
2163
|
@if (status() !== 'none') {
|
|
2145
2164
|
<span class="strct-av__status"></span>
|
|
2146
2165
|
}
|
|
2147
|
-
`, isInline: true, styles: [".strct-av{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--bg-3);color:var(--t1);overflow:visible;font-size:13px;font-weight:600;-webkit-user-select:none;user-select:none;border:1px solid var(--b2)}.strct-av--sm{width:26px;height:26px;font-size:12px}.strct-av--lg{width:48px;height:48px;font-size:17px}.strct-av__img{width:100%;height:100%;border-radius:50%;object-fit:cover}.strct-av__initials{line-height:1}.strct-av__status{position:absolute;inset-inline-end:-1px;bottom:-1px;width:30%;height:30%;min-width:8px;min-height:8px;border-radius:50%;border:2px solid var(--bg-1);background:var(--t3)}.strct-av--online .strct-av__status{background:var(--success)}.strct-av--busy .strct-av__status{background:var(--critical)}.strct-av--offline .strct-av__status{background:var(--t3)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2166
|
+
`, isInline: true, styles: [".strct-av{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--bg-3);color:var(--t1);overflow:visible;font-size:13px;font-weight:600;-webkit-user-select:none;user-select:none;border:1px solid var(--b2)}.strct-av--square,.strct-av--square .strct-av__img{border-radius:var(--radius-md)}.strct-av__icon{line-height:0}.strct-av[data-tone=accent]{background:var(--acc);border-color:transparent;color:var(--inv)}.strct-av[data-tone=accent-soft]{background:var(--acc-m);border-color:var(--acc30);color:var(--acc)}.strct-av[data-tone=success]{background:var(--success);border-color:transparent;color:var(--inv)}.strct-av[data-tone=warning]{background:var(--warning);border-color:transparent;color:var(--inv)}.strct-av[data-tone=critical]{background:var(--critical);border-color:transparent;color:var(--inv)}.strct-av--sm{width:26px;height:26px;font-size:12px}.strct-av--lg{width:48px;height:48px;font-size:17px}.strct-av__img{width:100%;height:100%;border-radius:50%;object-fit:cover}.strct-av__initials{line-height:1}.strct-av__status{position:absolute;inset-inline-end:-1px;bottom:-1px;width:30%;height:30%;min-width:8px;min-height:8px;border-radius:50%;border:2px solid var(--bg-1);background:var(--t3)}.strct-av--online .strct-av__status{background:var(--success)}.strct-av--busy .strct-av__status{background:var(--critical)}.strct-av--offline .strct-av__status{background:var(--t3)}\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 });
|
|
2148
2167
|
}
|
|
2149
2168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctAvatar, decorators: [{
|
|
2150
2169
|
type: Component,
|
|
2151
|
-
args: [{ selector: 'strct-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
2170
|
+
args: [{ selector: 'strct-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctIcon], template: `
|
|
2152
2171
|
@if (src()) {
|
|
2153
2172
|
<img class="strct-av__img" [src]="src()" [alt]="name()" />
|
|
2173
|
+
} @else if (icon()) {
|
|
2174
|
+
<!-- Not every avatar is a person with initials: a group, an assistant, a
|
|
2175
|
+
brand mark. -->
|
|
2176
|
+
<strct-icon class="strct-av__icon" [name]="icon()" [size]="iconSize()" />
|
|
2154
2177
|
} @else {
|
|
2155
2178
|
<span class="strct-av__initials">{{ initials() }}</span>
|
|
2156
2179
|
}
|
|
@@ -2159,14 +2182,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
2159
2182
|
}
|
|
2160
2183
|
`, host: {
|
|
2161
2184
|
class: 'strct-av',
|
|
2185
|
+
'[class.strct-av--square]': "shape() === 'square'",
|
|
2186
|
+
'[attr.data-tone]': 'tone()',
|
|
2162
2187
|
'[class.strct-av--sm]': "size() === 'sm'",
|
|
2163
2188
|
'[class.strct-av--lg]': "size() === 'lg'",
|
|
2164
2189
|
'[class.strct-av--online]': "status() === 'online'",
|
|
2165
2190
|
'[class.strct-av--busy]': "status() === 'busy'",
|
|
2166
2191
|
'[class.strct-av--offline]': "status() === 'offline'",
|
|
2167
2192
|
'[attr.title]': 'name() || null',
|
|
2168
|
-
}, styles: [".strct-av{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--bg-3);color:var(--t1);overflow:visible;font-size:13px;font-weight:600;-webkit-user-select:none;user-select:none;border:1px solid var(--b2)}.strct-av--sm{width:26px;height:26px;font-size:12px}.strct-av--lg{width:48px;height:48px;font-size:17px}.strct-av__img{width:100%;height:100%;border-radius:50%;object-fit:cover}.strct-av__initials{line-height:1}.strct-av__status{position:absolute;inset-inline-end:-1px;bottom:-1px;width:30%;height:30%;min-width:8px;min-height:8px;border-radius:50%;border:2px solid var(--bg-1);background:var(--t3)}.strct-av--online .strct-av__status{background:var(--success)}.strct-av--busy .strct-av__status{background:var(--critical)}.strct-av--offline .strct-av__status{background:var(--t3)}\n"] }]
|
|
2169
|
-
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
2193
|
+
}, styles: [".strct-av{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--bg-3);color:var(--t1);overflow:visible;font-size:13px;font-weight:600;-webkit-user-select:none;user-select:none;border:1px solid var(--b2)}.strct-av--square,.strct-av--square .strct-av__img{border-radius:var(--radius-md)}.strct-av__icon{line-height:0}.strct-av[data-tone=accent]{background:var(--acc);border-color:transparent;color:var(--inv)}.strct-av[data-tone=accent-soft]{background:var(--acc-m);border-color:var(--acc30);color:var(--acc)}.strct-av[data-tone=success]{background:var(--success);border-color:transparent;color:var(--inv)}.strct-av[data-tone=warning]{background:var(--warning);border-color:transparent;color:var(--inv)}.strct-av[data-tone=critical]{background:var(--critical);border-color:transparent;color:var(--inv)}.strct-av--sm{width:26px;height:26px;font-size:12px}.strct-av--lg{width:48px;height:48px;font-size:17px}.strct-av__img{width:100%;height:100%;border-radius:50%;object-fit:cover}.strct-av__initials{line-height:1}.strct-av__status{position:absolute;inset-inline-end:-1px;bottom:-1px;width:30%;height:30%;min-width:8px;min-height:8px;border-radius:50%;border:2px solid var(--bg-1);background:var(--t3)}.strct-av--online .strct-av__status{background:var(--success)}.strct-av--busy .strct-av__status{background:var(--critical)}.strct-av--offline .strct-av__status{background:var(--t3)}\n"] }]
|
|
2194
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
2170
2195
|
|
|
2171
2196
|
/**
|
|
2172
2197
|
* Horizontal value/usage bar. `<strct-progress [value]="72" status="warning" />`.
|
|
@@ -3979,6 +4004,11 @@ class StrctTree {
|
|
|
3979
4004
|
*/
|
|
3980
4005
|
density = input('compact', /* @ts-ignore */
|
|
3981
4006
|
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
4007
|
+
/** A bordered surface around the tree — for a picker inside a dialog. */
|
|
4008
|
+
framed = input(false, { ...(ngDevMode ? { debugName: "framed" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4009
|
+
/** Caps the height in px; the tree scrolls inside its frame. */
|
|
4010
|
+
maxHeight = input(null, /* @ts-ignore */
|
|
4011
|
+
...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
3982
4012
|
/** Per-node right-click menu resolver. */
|
|
3983
4013
|
nodeMenu = input(null, /* @ts-ignore */
|
|
3984
4014
|
...(ngDevMode ? [{ debugName: "nodeMenu" }] : /* istanbul ignore next */ []));
|
|
@@ -4347,7 +4377,7 @@ class StrctTree {
|
|
|
4347
4377
|
this.expandedChange.emit([...this.currentSet()]);
|
|
4348
4378
|
}
|
|
4349
4379
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctTree, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4350
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctTree, isStandalone: true, selector: "strct-tree", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, nodeMenu: { classPropertyName: "nodeMenu", publicName: "nodeMenu", isSignal: true, isRequired: false, transformFunction: null }, canDrag: { classPropertyName: "canDrag", publicName: "canDrag", isSignal: true, isRequired: false, transformFunction: null }, canDrop: { classPropertyName: "canDrop", publicName: "canDrop", isSignal: true, isRequired: false, transformFunction: null }, dragExpandDelay: { classPropertyName: "dragExpandDelay", publicName: "dragExpandDelay", isSignal: true, isRequired: false, transformFunction: null }, chevronAriaLabel: { classPropertyName: "chevronAriaLabel", publicName: "chevronAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeDrop: "nodeDrop", nodeActivated: "nodeActivated", nodeMenuSelect: "nodeMenuSelect", expandedIds: "expandedIdsChange", expandedChange: "expandedChange", nodeToggled: "nodeToggled" }, host: { attributes: { "role": "tree" }, properties: { "class.strct-tree--comfortable": "density() === 'comfortable'" }, classAttribute: "strct-tree" }, queries: [{ propertyName: "projectedNodes", predicate: StrctTreeNode, isSignal: true }], ngImport: i0, template: `
|
|
4380
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctTree, isStandalone: true, selector: "strct-tree", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, framed: { classPropertyName: "framed", publicName: "framed", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, nodeMenu: { classPropertyName: "nodeMenu", publicName: "nodeMenu", isSignal: true, isRequired: false, transformFunction: null }, canDrag: { classPropertyName: "canDrag", publicName: "canDrag", isSignal: true, isRequired: false, transformFunction: null }, canDrop: { classPropertyName: "canDrop", publicName: "canDrop", isSignal: true, isRequired: false, transformFunction: null }, dragExpandDelay: { classPropertyName: "dragExpandDelay", publicName: "dragExpandDelay", isSignal: true, isRequired: false, transformFunction: null }, chevronAriaLabel: { classPropertyName: "chevronAriaLabel", publicName: "chevronAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeDrop: "nodeDrop", nodeActivated: "nodeActivated", nodeMenuSelect: "nodeMenuSelect", expandedIds: "expandedIdsChange", expandedChange: "expandedChange", nodeToggled: "nodeToggled" }, host: { attributes: { "role": "tree" }, properties: { "class.strct-tree--comfortable": "density() === 'comfortable'", "class.strct-tree--framed": "framed()", "style.max-height.px": "maxHeight()" }, classAttribute: "strct-tree" }, queries: [{ propertyName: "projectedNodes", predicate: StrctTreeNode, isSignal: true }], ngImport: i0, template: `
|
|
4351
4381
|
@if (nodes(); as ns) {
|
|
4352
4382
|
@for (n of ns; track n.id ?? n.label) {
|
|
4353
4383
|
<strct-tree-node
|
|
@@ -4360,7 +4390,7 @@ class StrctTree {
|
|
|
4360
4390
|
} @else {
|
|
4361
4391
|
<ng-content />
|
|
4362
4392
|
}
|
|
4363
|
-
`, isInline: true, styles: [".strct-tree{display:block}.strct-tree--comfortable .strct-tnode__row{gap:7px;padding:6px 10px;border-radius:6px;font-size:14px}.strct-tree--comfortable .strct-tnode__chevron{margin:-4px;margin-inline-end:-9px}.strct-tree--comfortable .strct-tnode__spacer{width:16px}.strct-tree--comfortable .strct-tnode__children{margin-inline-start:19px}\n"], dependencies: [{ kind: "component", type: StrctTreeNode, selector: "strct-tree-node", inputs: ["node", "label", "icon", "badge", "active", "expanded", "nodeMenu"], outputs: ["expandedChange", "activated", "nodeActivated", "nodeMenuSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4393
|
+
`, isInline: true, styles: [".strct-tree{display:block}.strct-tree--framed{border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);padding:var(--space-1)}.strct-tree[style*=max-height]{overflow:auto}.strct-tree--comfortable .strct-tnode__row{gap:7px;padding:6px 10px;border-radius:6px;font-size:14px}.strct-tree--comfortable .strct-tnode__chevron{margin:-4px;margin-inline-end:-9px}.strct-tree--comfortable .strct-tnode__spacer{width:16px}.strct-tree--comfortable .strct-tnode__children{margin-inline-start:19px}\n"], dependencies: [{ kind: "component", type: StrctTreeNode, selector: "strct-tree-node", inputs: ["node", "label", "icon", "badge", "active", "expanded", "nodeMenu"], outputs: ["expandedChange", "activated", "nodeActivated", "nodeMenuSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4364
4394
|
}
|
|
4365
4395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctTree, decorators: [{
|
|
4366
4396
|
type: Component,
|
|
@@ -4381,8 +4411,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
4381
4411
|
class: 'strct-tree',
|
|
4382
4412
|
role: 'tree',
|
|
4383
4413
|
'[class.strct-tree--comfortable]': "density() === 'comfortable'",
|
|
4384
|
-
|
|
4385
|
-
|
|
4414
|
+
'[class.strct-tree--framed]': 'framed()',
|
|
4415
|
+
'[style.max-height.px]': 'maxHeight()',
|
|
4416
|
+
}, styles: [".strct-tree{display:block}.strct-tree--framed{border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);padding:var(--space-1)}.strct-tree[style*=max-height]{overflow:auto}.strct-tree--comfortable .strct-tnode__row{gap:7px;padding:6px 10px;border-radius:6px;font-size:14px}.strct-tree--comfortable .strct-tnode__chevron{margin:-4px;margin-inline-end:-9px}.strct-tree--comfortable .strct-tnode__spacer{width:16px}.strct-tree--comfortable .strct-tnode__children{margin-inline-start:19px}\n"] }]
|
|
4417
|
+
}], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], framed: [{ type: i0.Input, args: [{ isSignal: true, alias: "framed", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], nodeMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeMenu", required: false }] }], canDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDrag", required: false }] }], canDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDrop", required: false }] }], dragExpandDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragExpandDelay", required: false }] }], nodeDrop: [{ type: i0.Output, args: ["nodeDrop"] }], chevronAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chevronAriaLabel", required: false }] }], nodeActivated: [{ type: i0.Output, args: ["nodeActivated"] }], nodeMenuSelect: [{ type: i0.Output, args: ["nodeMenuSelect"] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], nodeToggled: [{ type: i0.Output, args: ["nodeToggled"] }], projectedNodes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrctTreeNode), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
4386
4418
|
|
|
4387
4419
|
/**
|
|
4388
4420
|
* Dev-mode diagnostics for combinations a component accepts but cannot honour.
|
|
@@ -12073,6 +12105,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12073
12105
|
args: ['document:keydown.escape', ['$event']]
|
|
12074
12106
|
}] } });
|
|
12075
12107
|
|
|
12108
|
+
/**
|
|
12109
|
+
* Default accessible text per status, used when `label` is not given
|
|
12110
|
+
* (localizable — override via `label`). The canonical `StrctStatus` vocabulary
|
|
12111
|
+
* has no 'ok'/'info': OK maps to 'success', info to 'accent'.
|
|
12112
|
+
*/
|
|
12113
|
+
const DEFAULT_LABEL = {
|
|
12114
|
+
neutral: 'Neutral',
|
|
12115
|
+
accent: 'Info',
|
|
12116
|
+
success: 'OK',
|
|
12117
|
+
warning: 'Warning',
|
|
12118
|
+
critical: 'Critical',
|
|
12119
|
+
};
|
|
12120
|
+
/**
|
|
12121
|
+
* Presence/state dot that never relies on colour alone: the tone is painted by
|
|
12122
|
+
* a pure-CSS dot while the state is also rendered as visually-hidden text, so
|
|
12123
|
+
* screen readers (and colour-blind users copying text) get "Warning", not just
|
|
12124
|
+
* a yellow circle. Use it inside avatars, menu rows, metric tiles — anywhere a
|
|
12125
|
+
* bare coloured dot would otherwise carry meaning.
|
|
12126
|
+
*
|
|
12127
|
+
* <strct-status-dot status="success" />
|
|
12128
|
+
* <strct-status-dot status="critical" size="sm" label="Node unreachable" />
|
|
12129
|
+
*/
|
|
12130
|
+
class StrctStatusDot {
|
|
12131
|
+
/** Status tone (canonical vocabulary: OK = 'success', info = 'accent'). */
|
|
12132
|
+
status = input('neutral', /* @ts-ignore */
|
|
12133
|
+
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
12134
|
+
/**
|
|
12135
|
+
* Accessible text describing the state (localizable). Empty falls back to a
|
|
12136
|
+
* per-status default ("OK", "Warning", …) so the dot is never color-only.
|
|
12137
|
+
*/
|
|
12138
|
+
label = input('', /* @ts-ignore */
|
|
12139
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
12140
|
+
/** Dot size: `sm` for dense rows, `md` standalone. */
|
|
12141
|
+
size = input('md', /* @ts-ignore */
|
|
12142
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
12143
|
+
/**
|
|
12144
|
+
* Something happening *now* — a task running, a live chart. The halo pulses
|
|
12145
|
+
* once a second; the dot itself never changes size, so a column of dots does
|
|
12146
|
+
* not jitter. Under `prefers-reduced-motion` the halo is a static ring.
|
|
12147
|
+
*/
|
|
12148
|
+
pulse = input(false, { ...(ngDevMode ? { debugName: "pulse" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12149
|
+
text = computed(() => this.label() || DEFAULT_LABEL[this.status()], /* @ts-ignore */
|
|
12150
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
12151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12152
|
+
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: `
|
|
12153
|
+
<span class="strct-dot__dot" aria-hidden="true"></span>
|
|
12154
|
+
<span class="strct-dot__sr">{{ text() }}</span>
|
|
12155
|
+
`, 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 });
|
|
12156
|
+
}
|
|
12157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, decorators: [{
|
|
12158
|
+
type: Component,
|
|
12159
|
+
args: [{ selector: 'strct-status-dot', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
12160
|
+
<span class="strct-dot__dot" aria-hidden="true"></span>
|
|
12161
|
+
<span class="strct-dot__sr">{{ text() }}</span>
|
|
12162
|
+
`, host: {
|
|
12163
|
+
class: 'strct-dot',
|
|
12164
|
+
'[class.strct-dot--accent]': "status() === 'accent'",
|
|
12165
|
+
'[class.strct-dot--success]': "status() === 'success'",
|
|
12166
|
+
'[class.strct-dot--warning]': "status() === 'warning'",
|
|
12167
|
+
'[class.strct-dot--critical]': "status() === 'critical'",
|
|
12168
|
+
'[class.strct-dot--sm]': "size() === 'sm'",
|
|
12169
|
+
'[class.strct-dot--pulse]': 'pulse()',
|
|
12170
|
+
}, 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"] }]
|
|
12171
|
+
}], 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 }] }] } });
|
|
12172
|
+
|
|
12076
12173
|
/**
|
|
12077
12174
|
* Compact definition list: aligned `label : value` rows with an optional trailing
|
|
12078
12175
|
* slot. The `inline` variant is the horizontal "stat strip" (label-value pairs in
|
|
@@ -12097,8 +12194,11 @@ class StrctDescriptionList {
|
|
|
12097
12194
|
/** Value alignment in stacked mode. */
|
|
12098
12195
|
align = input('between', /* @ts-ignore */
|
|
12099
12196
|
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
12197
|
+
/** Fixes the label column of `align="grid"` (e.g. `'160px'`). */
|
|
12198
|
+
labelWidth = input(null, /* @ts-ignore */
|
|
12199
|
+
...(ngDevMode ? [{ debugName: "labelWidth" }] : /* istanbul ignore next */ []));
|
|
12100
12200
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDescriptionList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12101
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctDescriptionList, isStandalone: true, selector: "strct-description-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-dl--inline": "inline()", "class.strct-dl--start": "align() === 'start'" }, classAttribute: "strct-dl" }, ngImport: i0, template: `
|
|
12201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctDescriptionList, isStandalone: true, selector: "strct-description-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-dl--inline": "inline()", "class.strct-dl--start": "align() === 'start'", "class.strct-dl--grid": "align() === 'grid'", "style.--strct-dl-label-w": "labelWidth()" }, classAttribute: "strct-dl" }, ngImport: i0, template: `
|
|
12102
12202
|
<dl class="strct-dl__list">
|
|
12103
12203
|
@for (item of items(); track $index) {
|
|
12104
12204
|
<div
|
|
@@ -12112,7 +12212,7 @@ class StrctDescriptionList {
|
|
|
12112
12212
|
}
|
|
12113
12213
|
<ng-content />
|
|
12114
12214
|
</dl>
|
|
12115
|
-
`, isInline: true, styles: [".strct-dl{display:flex;flex-direction:column;min-width:0}.strct-dl__list{display:flex;flex-direction:column;margin:0;padding:0;min-width:0}.strct-dl--inline .strct-dl__list{flex-direction:row;flex-wrap:wrap;gap:var(--space-3) var(--space-5);align-items:flex-start}.strct-desc{display:flex;align-items:baseline;gap:var(--space-3);padding:6px 0;font-size:var(--text-md);min-width:0}.strct-dl:not(.strct-dl--inline) .strct-desc{justify-content:space-between}.strct-dl:not(.strct-dl--inline) .strct-desc+.strct-desc{border-top:1px solid var(--b1)}.strct-dl--start .strct-desc{justify-content:flex-start}.strct-dl--inline .strct-desc{flex-direction:column;align-items:flex-start;gap:3px;padding:0}.strct-desc__label{color:var(--t3);font-size:var(--text-sm);font-weight:500;flex-shrink:0;white-space:nowrap}.strct-desc__value{margin:0;color:var(--t1);min-width:0;text-align:end}.strct-dl--inline .strct-desc__value,.strct-dl--start .strct-desc__value{text-align:start}.strct-desc--mono .strct-desc__value{font-family:var(--mono);font-size:var(--text-sm)}.strct-desc--muted .strct-desc__value{color:var(--t3)}.strct-desc__value:empty{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12215
|
+
`, isInline: true, styles: [".strct-dl{display:flex;flex-direction:column;min-width:0}.strct-dl__list{display:flex;flex-direction:column;margin:0;padding:0;min-width:0}.strct-dl--inline .strct-dl__list{flex-direction:row;flex-wrap:wrap;gap:var(--space-3) var(--space-5);align-items:flex-start}.strct-desc{display:flex;align-items:baseline;gap:var(--space-3);padding:6px 0;font-size:var(--text-md);min-width:0}.strct-dl:not(.strct-dl--inline) .strct-desc{justify-content:space-between}.strct-dl:not(.strct-dl--inline) .strct-desc+.strct-desc{border-top:1px solid var(--b1)}.strct-dl--start .strct-desc{justify-content:flex-start}.strct-dl--inline .strct-desc{flex-direction:column;align-items:flex-start;gap:3px;padding:0}.strct-desc__label{color:var(--t3);font-size:var(--text-sm);font-weight:500;flex-shrink:0;white-space:nowrap}.strct-desc__value{margin:0;color:var(--t1);min-width:0;text-align:end}.strct-dl--inline .strct-desc__value,.strct-dl--start .strct-desc__value{text-align:start}.strct-desc--mono .strct-desc__value{font-family:var(--mono);font-size:var(--text-sm)}.strct-desc--muted .strct-desc__value{color:var(--t3)}.strct-desc__value:empty{display:none}.strct-dl--grid .strct-dl__list{display:grid;grid-template-columns:var(--strct-dl-label-w, max-content) minmax(0,1fr);column-gap:var(--space-4)}.strct-dl--grid .strct-desc{display:contents}.strct-dl--grid .strct-desc__label,.strct-dl--grid .strct-desc__value{padding:6px 0;text-align:start}.strct-dl--grid .strct-desc+.strct-desc>.strct-desc__label,.strct-dl--grid .strct-desc+.strct-desc>.strct-desc__value{border-top:1px solid var(--b1)}.strct-desc__label{display:inline-flex;align-items:center;gap:6px}.strct-desc__note{display:block;margin-top:1px;font-size:var(--text-sm);color:var(--t3)}.strct-desc__note:empty{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12116
12216
|
}
|
|
12117
12217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDescriptionList, decorators: [{
|
|
12118
12218
|
type: Component,
|
|
@@ -12134,8 +12234,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12134
12234
|
class: 'strct-dl',
|
|
12135
12235
|
'[class.strct-dl--inline]': 'inline()',
|
|
12136
12236
|
'[class.strct-dl--start]': "align() === 'start'",
|
|
12137
|
-
|
|
12138
|
-
|
|
12237
|
+
'[class.strct-dl--grid]': "align() === 'grid'",
|
|
12238
|
+
'[style.--strct-dl-label-w]': 'labelWidth()',
|
|
12239
|
+
}, styles: [".strct-dl{display:flex;flex-direction:column;min-width:0}.strct-dl__list{display:flex;flex-direction:column;margin:0;padding:0;min-width:0}.strct-dl--inline .strct-dl__list{flex-direction:row;flex-wrap:wrap;gap:var(--space-3) var(--space-5);align-items:flex-start}.strct-desc{display:flex;align-items:baseline;gap:var(--space-3);padding:6px 0;font-size:var(--text-md);min-width:0}.strct-dl:not(.strct-dl--inline) .strct-desc{justify-content:space-between}.strct-dl:not(.strct-dl--inline) .strct-desc+.strct-desc{border-top:1px solid var(--b1)}.strct-dl--start .strct-desc{justify-content:flex-start}.strct-dl--inline .strct-desc{flex-direction:column;align-items:flex-start;gap:3px;padding:0}.strct-desc__label{color:var(--t3);font-size:var(--text-sm);font-weight:500;flex-shrink:0;white-space:nowrap}.strct-desc__value{margin:0;color:var(--t1);min-width:0;text-align:end}.strct-dl--inline .strct-desc__value,.strct-dl--start .strct-desc__value{text-align:start}.strct-desc--mono .strct-desc__value{font-family:var(--mono);font-size:var(--text-sm)}.strct-desc--muted .strct-desc__value{color:var(--t3)}.strct-desc__value:empty{display:none}.strct-dl--grid .strct-dl__list{display:grid;grid-template-columns:var(--strct-dl-label-w, max-content) minmax(0,1fr);column-gap:var(--space-4)}.strct-dl--grid .strct-desc{display:contents}.strct-dl--grid .strct-desc__label,.strct-dl--grid .strct-desc__value{padding:6px 0;text-align:start}.strct-dl--grid .strct-desc+.strct-desc>.strct-desc__label,.strct-dl--grid .strct-desc+.strct-desc>.strct-desc__value{border-top:1px solid var(--b1)}.strct-desc__label{display:inline-flex;align-items:center;gap:6px}.strct-desc__note{display:block;margin-top:1px;font-size:var(--text-sm);color:var(--t3)}.strct-desc__note:empty{display:none}\n"] }]
|
|
12240
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }] } });
|
|
12139
12241
|
/**
|
|
12140
12242
|
* One projected `label → value` row inside a `<strct-description-list>`. The
|
|
12141
12243
|
* value is whatever you project, so it can host a badge, icon or formatted text.
|
|
@@ -12148,11 +12250,36 @@ class StrctDesc {
|
|
|
12148
12250
|
mono = input(false, { ...(ngDevMode ? { debugName: "mono" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12149
12251
|
/** Dim the projected value. */
|
|
12150
12252
|
muted = input(false, { ...(ngDevMode ? { debugName: "muted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12253
|
+
/** A status dot before the label — "Agent · connected". */
|
|
12254
|
+
status = input(null, /* @ts-ignore */
|
|
12255
|
+
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
12256
|
+
/** Accessible text for that dot; empty falls back to the per-status default. */
|
|
12257
|
+
statusLabel = input('', /* @ts-ignore */
|
|
12258
|
+
...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
|
|
12259
|
+
/** A leading icon before the label. */
|
|
12260
|
+
icon = input('', /* @ts-ignore */
|
|
12261
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
12262
|
+
/** A quiet second line under the value — "last seen 12 s ago". */
|
|
12263
|
+
note = input('', /* @ts-ignore */
|
|
12264
|
+
...(ngDevMode ? [{ debugName: "note" }] : /* istanbul ignore next */ []));
|
|
12151
12265
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDesc, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12152
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
12153
|
-
<dt class="strct-desc__label">
|
|
12154
|
-
|
|
12155
|
-
|
|
12266
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctDesc, isStandalone: true, selector: "strct-desc", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, mono: { classPropertyName: "mono", publicName: "mono", isSignal: true, isRequired: false, transformFunction: null }, muted: { classPropertyName: "muted", publicName: "muted", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusLabel: { classPropertyName: "statusLabel", publicName: "statusLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, note: { classPropertyName: "note", publicName: "note", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-desc--mono": "mono()", "class.strct-desc--muted": "muted()" }, classAttribute: "strct-desc" }, ngImport: i0, template: `
|
|
12267
|
+
<dt class="strct-desc__label">
|
|
12268
|
+
@if (status()) {
|
|
12269
|
+
<strct-status-dot size="sm" [status]="status()!" [label]="statusLabel()" />
|
|
12270
|
+
}
|
|
12271
|
+
@if (icon()) {
|
|
12272
|
+
<strct-icon [name]="icon()" [size]="14" />
|
|
12273
|
+
}
|
|
12274
|
+
{{ label() }}
|
|
12275
|
+
</dt>
|
|
12276
|
+
<dd class="strct-desc__value">
|
|
12277
|
+
<ng-content />
|
|
12278
|
+
@if (note()) {
|
|
12279
|
+
<span class="strct-desc__note">{{ note() }}</span>
|
|
12280
|
+
}
|
|
12281
|
+
</dd>
|
|
12282
|
+
`, isInline: true, dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }, { kind: "component", type: StrctStatusDot, selector: "strct-status-dot", inputs: ["status", "label", "size", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12156
12283
|
}
|
|
12157
12284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctDesc, decorators: [{
|
|
12158
12285
|
type: Component,
|
|
@@ -12160,9 +12287,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12160
12287
|
selector: 'strct-desc',
|
|
12161
12288
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12162
12289
|
encapsulation: ViewEncapsulation.None,
|
|
12290
|
+
imports: [StrctIcon, StrctStatusDot],
|
|
12163
12291
|
template: `
|
|
12164
|
-
<dt class="strct-desc__label">
|
|
12165
|
-
|
|
12292
|
+
<dt class="strct-desc__label">
|
|
12293
|
+
@if (status()) {
|
|
12294
|
+
<strct-status-dot size="sm" [status]="status()!" [label]="statusLabel()" />
|
|
12295
|
+
}
|
|
12296
|
+
@if (icon()) {
|
|
12297
|
+
<strct-icon [name]="icon()" [size]="14" />
|
|
12298
|
+
}
|
|
12299
|
+
{{ label() }}
|
|
12300
|
+
</dt>
|
|
12301
|
+
<dd class="strct-desc__value">
|
|
12302
|
+
<ng-content />
|
|
12303
|
+
@if (note()) {
|
|
12304
|
+
<span class="strct-desc__note">{{ note() }}</span>
|
|
12305
|
+
}
|
|
12306
|
+
</dd>
|
|
12166
12307
|
`,
|
|
12167
12308
|
host: {
|
|
12168
12309
|
class: 'strct-desc',
|
|
@@ -12170,7 +12311,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
12170
12311
|
'[class.strct-desc--muted]': 'muted()',
|
|
12171
12312
|
},
|
|
12172
12313
|
}]
|
|
12173
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], mono: [{ type: i0.Input, args: [{ isSignal: true, alias: "mono", required: false }] }], muted: [{ type: i0.Input, args: [{ isSignal: true, alias: "muted", required: false }] }] } });
|
|
12314
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], mono: [{ type: i0.Input, args: [{ isSignal: true, alias: "mono", required: false }] }], muted: [{ type: i0.Input, args: [{ isSignal: true, alias: "muted", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], statusLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], note: [{ type: i0.Input, args: [{ isSignal: true, alias: "note", required: false }] }] } });
|
|
12174
12315
|
|
|
12175
12316
|
/**
|
|
12176
12317
|
* Per-column cell template for `strct-table` / `strct-datagrid`. The column key
|
|
@@ -21912,71 +22053,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
21912
22053
|
args: ['keydown', ['$event']]
|
|
21913
22054
|
}] } });
|
|
21914
22055
|
|
|
21915
|
-
/**
|
|
21916
|
-
* Default accessible text per status, used when `label` is not given
|
|
21917
|
-
* (localizable — override via `label`). The canonical `StrctStatus` vocabulary
|
|
21918
|
-
* has no 'ok'/'info': OK maps to 'success', info to 'accent'.
|
|
21919
|
-
*/
|
|
21920
|
-
const DEFAULT_LABEL = {
|
|
21921
|
-
neutral: 'Neutral',
|
|
21922
|
-
accent: 'Info',
|
|
21923
|
-
success: 'OK',
|
|
21924
|
-
warning: 'Warning',
|
|
21925
|
-
critical: 'Critical',
|
|
21926
|
-
};
|
|
21927
|
-
/**
|
|
21928
|
-
* Presence/state dot that never relies on colour alone: the tone is painted by
|
|
21929
|
-
* a pure-CSS dot while the state is also rendered as visually-hidden text, so
|
|
21930
|
-
* screen readers (and colour-blind users copying text) get "Warning", not just
|
|
21931
|
-
* a yellow circle. Use it inside avatars, menu rows, metric tiles — anywhere a
|
|
21932
|
-
* bare coloured dot would otherwise carry meaning.
|
|
21933
|
-
*
|
|
21934
|
-
* <strct-status-dot status="success" />
|
|
21935
|
-
* <strct-status-dot status="critical" size="sm" label="Node unreachable" />
|
|
21936
|
-
*/
|
|
21937
|
-
class StrctStatusDot {
|
|
21938
|
-
/** Status tone (canonical vocabulary: OK = 'success', info = 'accent'). */
|
|
21939
|
-
status = input('neutral', /* @ts-ignore */
|
|
21940
|
-
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
21941
|
-
/**
|
|
21942
|
-
* Accessible text describing the state (localizable). Empty falls back to a
|
|
21943
|
-
* per-status default ("OK", "Warning", …) so the dot is never color-only.
|
|
21944
|
-
*/
|
|
21945
|
-
label = input('', /* @ts-ignore */
|
|
21946
|
-
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
21947
|
-
/** Dot size: `sm` for dense rows, `md` standalone. */
|
|
21948
|
-
size = input('md', /* @ts-ignore */
|
|
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 });
|
|
21956
|
-
text = computed(() => this.label() || DEFAULT_LABEL[this.status()], /* @ts-ignore */
|
|
21957
|
-
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
21958
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
21960
|
-
<span class="strct-dot__dot" aria-hidden="true"></span>
|
|
21961
|
-
<span class="strct-dot__sr">{{ text() }}</span>
|
|
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 });
|
|
21963
|
-
}
|
|
21964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStatusDot, decorators: [{
|
|
21965
|
-
type: Component,
|
|
21966
|
-
args: [{ selector: 'strct-status-dot', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
21967
|
-
<span class="strct-dot__dot" aria-hidden="true"></span>
|
|
21968
|
-
<span class="strct-dot__sr">{{ text() }}</span>
|
|
21969
|
-
`, host: {
|
|
21970
|
-
class: 'strct-dot',
|
|
21971
|
-
'[class.strct-dot--accent]': "status() === 'accent'",
|
|
21972
|
-
'[class.strct-dot--success]': "status() === 'success'",
|
|
21973
|
-
'[class.strct-dot--warning]': "status() === 'warning'",
|
|
21974
|
-
'[class.strct-dot--critical]': "status() === 'critical'",
|
|
21975
|
-
'[class.strct-dot--sm]': "size() === 'sm'",
|
|
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
22056
|
const DEFAULT_LABELS = {
|
|
21981
22057
|
live: 'Live',
|
|
21982
22058
|
liveEvery: (s) => `Live · updates every ${s} s`,
|
|
@@ -22757,7 +22833,7 @@ class StrctTreeSelect {
|
|
|
22757
22833
|
}
|
|
22758
22834
|
</div>
|
|
22759
22835
|
}
|
|
22760
|
-
`, isInline: true, styles: [".strct-tsel{position:relative;display:block;width:100%}.strct-tsel__field{position:relative}.strct-tsel__trigger{display:flex;align-items:center;gap:8px;padding-inline-end:30px;text-align:start;cursor:pointer}.strct-tsel__trigger--clearable{padding-inline-end:48px}.strct-tsel__trigger:disabled{cursor:not-allowed}.strct-tsel__value{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-tsel__value--empty{color:var(--t3)}.strct-tsel__caret{position:absolute;inset-inline-end:9px;top:50%;transform:translateY(-50%);color:var(--t3);pointer-events:none}.strct-tsel__clear{position:absolute;inset-inline-end:26px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;padding:2px;color:var(--t3);background:none;border:none;border-radius:var(--radius-sm);cursor:pointer}.strct-tsel__clear:hover{color:var(--t1)}.strct-tsel__panel{z-index:var(--z-dropdown);max-height:260px;overflow-y:auto;padding:var(--space-1);background:var(--bg-1);border:1px solid var(--b2);border-radius:var(--radius-lg);box-shadow:var(--shh)}.strct-tsel__empty{padding:9px 10px;font-size:13px;color:var(--t3)}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }, { kind: "directive", type: StrctOverlay, selector: "[strctOverlay]", inputs: ["strctOverlay", "strctOverlayPlacement", "strctOverlayMatchWidth", "strctOverlayGap"] }, { kind: "component", type: StrctTree, selector: "strct-tree", inputs: ["nodes", "density", "nodeMenu", "canDrag", "canDrop", "dragExpandDelay", "chevronAriaLabel", "expandedIds"], outputs: ["nodeDrop", "nodeActivated", "nodeMenuSelect", "expandedIdsChange", "expandedChange", "nodeToggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22836
|
+
`, isInline: true, styles: [".strct-tsel{position:relative;display:block;width:100%}.strct-tsel__field{position:relative}.strct-tsel__trigger{display:flex;align-items:center;gap:8px;padding-inline-end:30px;text-align:start;cursor:pointer}.strct-tsel__trigger--clearable{padding-inline-end:48px}.strct-tsel__trigger:disabled{cursor:not-allowed}.strct-tsel__value{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strct-tsel__value--empty{color:var(--t3)}.strct-tsel__caret{position:absolute;inset-inline-end:9px;top:50%;transform:translateY(-50%);color:var(--t3);pointer-events:none}.strct-tsel__clear{position:absolute;inset-inline-end:26px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;padding:2px;color:var(--t3);background:none;border:none;border-radius:var(--radius-sm);cursor:pointer}.strct-tsel__clear:hover{color:var(--t1)}.strct-tsel__panel{z-index:var(--z-dropdown);max-height:260px;overflow-y:auto;padding:var(--space-1);background:var(--bg-1);border:1px solid var(--b2);border-radius:var(--radius-lg);box-shadow:var(--shh)}.strct-tsel__empty{padding:9px 10px;font-size:13px;color:var(--t3)}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }, { kind: "directive", type: StrctOverlay, selector: "[strctOverlay]", inputs: ["strctOverlay", "strctOverlayPlacement", "strctOverlayMatchWidth", "strctOverlayGap"] }, { kind: "component", type: StrctTree, selector: "strct-tree", inputs: ["nodes", "density", "framed", "maxHeight", "nodeMenu", "canDrag", "canDrop", "dragExpandDelay", "chevronAriaLabel", "expandedIds"], outputs: ["nodeDrop", "nodeActivated", "nodeMenuSelect", "expandedIdsChange", "expandedChange", "nodeToggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22761
22837
|
}
|
|
22762
22838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctTreeSelect, decorators: [{
|
|
22763
22839
|
type: Component,
|