@akcelik/strct 1.3.0 → 1.6.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 +707 -36
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +439 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
|
|
5
5
|
"author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
3
3
|
import { SafeHtml } from '@angular/platform-browser';
|
|
4
|
-
import * as _akcelik_strct from '@akcelik/strct';
|
|
5
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import * as _akcelik_strct from '@akcelik/strct';
|
|
6
6
|
|
|
7
7
|
/** Available color palettes. */
|
|
8
8
|
type StrctPalette = 'arctic' | 'ember' | 'sage';
|
|
@@ -93,11 +93,213 @@ interface StrctThresholds {
|
|
|
93
93
|
* storage, VMs …). Object state — running / stopped / maintenance — is layered
|
|
94
94
|
* on with the `badge` input rather than a separate icon per state.
|
|
95
95
|
*/
|
|
96
|
+
declare const STRCT_ICON_DEFS: {
|
|
97
|
+
hexagon: string;
|
|
98
|
+
chevronRight: string;
|
|
99
|
+
chevronLeft: string;
|
|
100
|
+
chevronDoubleRight: string;
|
|
101
|
+
chevronDown: string;
|
|
102
|
+
compass: string;
|
|
103
|
+
close: string;
|
|
104
|
+
check: string;
|
|
105
|
+
menu: string;
|
|
106
|
+
dots: string;
|
|
107
|
+
ellipsis: string;
|
|
108
|
+
search: string;
|
|
109
|
+
calendar: string;
|
|
110
|
+
eye: string;
|
|
111
|
+
upload: string;
|
|
112
|
+
download: string;
|
|
113
|
+
droplet: string;
|
|
114
|
+
sortAsc: string;
|
|
115
|
+
sortDesc: string;
|
|
116
|
+
sortNone: string;
|
|
117
|
+
sun: string;
|
|
118
|
+
moon: string;
|
|
119
|
+
info: string;
|
|
120
|
+
warning: string;
|
|
121
|
+
critical: string;
|
|
122
|
+
success: string;
|
|
123
|
+
bell: string;
|
|
124
|
+
heart: string;
|
|
125
|
+
layers: string;
|
|
126
|
+
grid: string;
|
|
127
|
+
form: string;
|
|
128
|
+
chart: string;
|
|
129
|
+
bars: string;
|
|
130
|
+
sidebar: string;
|
|
131
|
+
palette: string;
|
|
132
|
+
gauge: string;
|
|
133
|
+
copy: string;
|
|
134
|
+
code: string;
|
|
135
|
+
book: string;
|
|
136
|
+
terminal: string;
|
|
137
|
+
folder: string;
|
|
138
|
+
template: string;
|
|
139
|
+
file: string;
|
|
140
|
+
clipboard: string;
|
|
141
|
+
tag: string;
|
|
142
|
+
plus: string;
|
|
143
|
+
minus: string;
|
|
144
|
+
pencil: string;
|
|
145
|
+
trash: string;
|
|
146
|
+
refresh: string;
|
|
147
|
+
filter: string;
|
|
148
|
+
settings: string;
|
|
149
|
+
user: string;
|
|
150
|
+
logout: string;
|
|
151
|
+
undo: string;
|
|
152
|
+
redo: string;
|
|
153
|
+
arrowUp: string;
|
|
154
|
+
arrowDown: string;
|
|
155
|
+
arrowLeft: string;
|
|
156
|
+
arrowRight: string;
|
|
157
|
+
externalLink: string;
|
|
158
|
+
datacenter: string;
|
|
159
|
+
rack: string;
|
|
160
|
+
cluster: string;
|
|
161
|
+
host: string;
|
|
162
|
+
vm: string;
|
|
163
|
+
switch: string;
|
|
164
|
+
storage: string;
|
|
165
|
+
network: string;
|
|
166
|
+
cpu: string;
|
|
167
|
+
memory: string;
|
|
168
|
+
disk: string;
|
|
169
|
+
port: string;
|
|
170
|
+
power: string;
|
|
171
|
+
nic: string;
|
|
172
|
+
hba: string;
|
|
173
|
+
ethernet: string;
|
|
174
|
+
resourcePool: string;
|
|
175
|
+
portGroup: string;
|
|
176
|
+
pod: string;
|
|
177
|
+
deployment: string;
|
|
178
|
+
service: string;
|
|
179
|
+
node: string;
|
|
180
|
+
ingress: string;
|
|
181
|
+
cloud: string;
|
|
182
|
+
container: string;
|
|
183
|
+
firewall: string;
|
|
184
|
+
shield: string;
|
|
185
|
+
certificate: string;
|
|
186
|
+
key: string;
|
|
187
|
+
metrics: string;
|
|
188
|
+
logs: string;
|
|
189
|
+
trace: string;
|
|
190
|
+
universalAccess: string;
|
|
191
|
+
wheelchair: string;
|
|
192
|
+
hearing: string;
|
|
193
|
+
lowVision: string;
|
|
194
|
+
braille: string;
|
|
195
|
+
signLanguage: string;
|
|
196
|
+
siren: string;
|
|
197
|
+
alarm: string;
|
|
198
|
+
megaphone: string;
|
|
199
|
+
flag: string;
|
|
200
|
+
shieldAlert: string;
|
|
201
|
+
shieldCheck: string;
|
|
202
|
+
running: string;
|
|
203
|
+
stopped: string;
|
|
204
|
+
paused: string;
|
|
205
|
+
maintenance: string;
|
|
206
|
+
sync: string;
|
|
207
|
+
snapshot: string;
|
|
208
|
+
lock: string;
|
|
209
|
+
clock: string;
|
|
210
|
+
history: string;
|
|
211
|
+
timer: string;
|
|
212
|
+
hourglass: string;
|
|
213
|
+
mail: string;
|
|
214
|
+
chat: string;
|
|
215
|
+
help: string;
|
|
216
|
+
home: string;
|
|
217
|
+
link: string;
|
|
218
|
+
globe: string;
|
|
219
|
+
star: string;
|
|
220
|
+
pin: string;
|
|
221
|
+
share: string;
|
|
222
|
+
archive: string;
|
|
223
|
+
zoomIn: string;
|
|
224
|
+
zoomOut: string;
|
|
225
|
+
fullscreen: string;
|
|
226
|
+
exitFullscreen: string;
|
|
227
|
+
listView: string;
|
|
228
|
+
dragHandle: string;
|
|
229
|
+
chevronUp: string;
|
|
230
|
+
chevronDoubleLeft: string;
|
|
231
|
+
chevronDoubleUp: string;
|
|
232
|
+
chevronDoubleDown: string;
|
|
233
|
+
dns: string;
|
|
234
|
+
vpn: string;
|
|
235
|
+
api: string;
|
|
236
|
+
bolt: string;
|
|
237
|
+
queue: string;
|
|
238
|
+
users: string;
|
|
239
|
+
login: string;
|
|
240
|
+
unlock: string;
|
|
241
|
+
ban: string;
|
|
242
|
+
vendorVmware: string;
|
|
243
|
+
vendorCisco: string;
|
|
244
|
+
vendorHpe: string;
|
|
245
|
+
vendorDell: string;
|
|
246
|
+
vendorKaytus: string;
|
|
247
|
+
opticalDisc: string;
|
|
248
|
+
ssd: string;
|
|
249
|
+
usb: string;
|
|
250
|
+
sdCard: string;
|
|
251
|
+
tape: string;
|
|
252
|
+
gpu: string;
|
|
253
|
+
psu: string;
|
|
254
|
+
fan: string;
|
|
255
|
+
battery: string;
|
|
256
|
+
ups: string;
|
|
257
|
+
motherboard: string;
|
|
258
|
+
sensor: string;
|
|
259
|
+
thermometer: string;
|
|
260
|
+
sparkles: string;
|
|
261
|
+
brain: string;
|
|
262
|
+
robot: string;
|
|
263
|
+
neuralNetwork: string;
|
|
264
|
+
aiChip: string;
|
|
265
|
+
wand: string;
|
|
266
|
+
model: string;
|
|
267
|
+
router: string;
|
|
268
|
+
loadBalancer: string;
|
|
269
|
+
wifi: string;
|
|
270
|
+
bluetooth: string;
|
|
271
|
+
monitor: string;
|
|
272
|
+
keyboard: string;
|
|
273
|
+
printer: string;
|
|
274
|
+
};
|
|
275
|
+
declare const STRCT_ICON_DERIVED_DEFS: {
|
|
276
|
+
eyeOff: string;
|
|
277
|
+
bellOff: string;
|
|
278
|
+
wifiOff: string;
|
|
279
|
+
cloudOff: string;
|
|
280
|
+
linkOff: string;
|
|
281
|
+
unlink: string;
|
|
282
|
+
webhook: string;
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Every built-in icon name, as a compile-time union — a mistyped name is a
|
|
286
|
+
* build error instead of a silently empty box:
|
|
287
|
+
*
|
|
288
|
+
* const icon: StrctIconName = 'shieldCheck'; // ✓
|
|
289
|
+
* const icon: StrctIconName = 'sheildCheck'; // ✗ compile error
|
|
290
|
+
*/
|
|
291
|
+
type StrctIconName = keyof typeof STRCT_ICON_DEFS | keyof typeof STRCT_ICON_DERIVED_DEFS;
|
|
292
|
+
/**
|
|
293
|
+
* Icon name → glyph markup. Open (`Record<string, string>`) on purpose so
|
|
294
|
+
* `registerStrctIcon` can add app-specific names at runtime.
|
|
295
|
+
*/
|
|
96
296
|
declare const STRCT_ICONS: Record<string, string>;
|
|
297
|
+
/** All built-in icon names — greppable, iterable (galleries, docs, tests). */
|
|
298
|
+
declare const STRCT_ICON_NAMES: readonly StrctIconName[];
|
|
97
299
|
/** Icon names grouped for galleries / documentation. */
|
|
98
300
|
declare const STRCT_ICON_GROUPS: {
|
|
99
301
|
label: string;
|
|
100
|
-
names:
|
|
302
|
+
names: StrctIconName[];
|
|
101
303
|
}[];
|
|
102
304
|
/**
|
|
103
305
|
* Full-SVG icons that keep their own viewBox and colors (no stroke wrapper).
|
|
@@ -123,15 +325,13 @@ declare function registerStrctIcon(name: string, content: string, options?: {
|
|
|
123
325
|
* green disc ▶ running · amber disc ⏸ paused · grey disc ■ off.
|
|
124
326
|
*/
|
|
125
327
|
type StrctIconBadge = 'none' | 'success' | 'warning' | 'critical' | 'running' | 'paused' | 'off' | 'info' | 'maintenance';
|
|
126
|
-
/**
|
|
127
|
-
* Inline stroke icon. `<strct-icon name="host" badge="success" />` renders the host
|
|
128
|
-
* glyph with a green status dot (a "running host"). Unknown names render
|
|
129
|
-
* nothing rather than throwing.
|
|
130
|
-
*/
|
|
131
328
|
declare class StrctIcon {
|
|
132
329
|
private readonly sanitizer;
|
|
133
|
-
/**
|
|
134
|
-
|
|
330
|
+
/**
|
|
331
|
+
* Icon name. Typed to autocomplete the built-in set while still accepting
|
|
332
|
+
* any string, since `registerStrctIcon` can add names at runtime.
|
|
333
|
+
*/
|
|
334
|
+
readonly name: _angular_core.InputSignal<StrctIconName | (string & {})>;
|
|
135
335
|
/** Icon size in pixels. */
|
|
136
336
|
readonly size: _angular_core.InputSignal<number>;
|
|
137
337
|
/** Stroke width for outline icons. */
|
|
@@ -319,6 +519,37 @@ declare class StrctLogin {
|
|
|
319
519
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctLogin, "strct-login", never, { "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "split": { "alias": "split"; "required": false; "isSignal": true; }; }, {}, never, ["[strctLoginAside]", "[strctLoginMain]", "*"], true, never>;
|
|
320
520
|
}
|
|
321
521
|
|
|
522
|
+
/** Marks the breadcrumb row projected above the title. */
|
|
523
|
+
declare class StrctPageHeaderCrumbs {
|
|
524
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctPageHeaderCrumbs, never>;
|
|
525
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctPageHeaderCrumbs, "[strctPageHeaderCrumbs]", never, {}, {}, never, never, true, never>;
|
|
526
|
+
}
|
|
527
|
+
/** Marks the action buttons aligned to the end of the title row. */
|
|
528
|
+
declare class StrctPageHeaderActions {
|
|
529
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctPageHeaderActions, never>;
|
|
530
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctPageHeaderActions, "[strctPageHeaderActions]", never, {}, {}, never, never, true, never>;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Page header — the top of every console object page: an optional breadcrumb
|
|
534
|
+
* row, a title + subtitle, and actions aligned to the end. Default content
|
|
535
|
+
* projects below the title row (status badges, meta strips).
|
|
536
|
+
*
|
|
537
|
+
* <strct-page-header title="hv-02" subtitle="Hypervisor · cluster-01">
|
|
538
|
+
* <strct-breadcrumb strctPageHeaderCrumbs>…</strct-breadcrumb>
|
|
539
|
+
* <button strct-button strctPageHeaderActions variant="primary">Migrate</button>
|
|
540
|
+
* </strct-page-header>
|
|
541
|
+
*/
|
|
542
|
+
declare class StrctPageHeader {
|
|
543
|
+
/** Page title (an h1). */
|
|
544
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
545
|
+
/** One-line description under the title. */
|
|
546
|
+
readonly subtitle: _angular_core.InputSignal<string>;
|
|
547
|
+
/** Draw a hairline divider under the header. */
|
|
548
|
+
readonly divider: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
549
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctPageHeader, never>;
|
|
550
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctPageHeader, "strct-page-header", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "divider": { "alias": "divider"; "required": false; "isSignal": true; }; }, {}, never, ["[strctPageHeaderCrumbs]", "[strctPageHeaderActions]", "*"], true, never>;
|
|
551
|
+
}
|
|
552
|
+
|
|
322
553
|
/** Button visual variants. */
|
|
323
554
|
type StrctButtonVariant = 'primary' | 'critical' | 'outline' | 'flat' | 'neutral';
|
|
324
555
|
/** Button size variants. */
|
|
@@ -957,18 +1188,38 @@ declare class StrctDrawer {
|
|
|
957
1188
|
* <strct-dropdown-item>Rename</strct-dropdown-item>
|
|
958
1189
|
* <strct-dropdown-item critical>Delete</strct-dropdown-item>
|
|
959
1190
|
* </strct-dropdown>
|
|
1191
|
+
*
|
|
1192
|
+
* With `popover`, the panel holds *form controls* instead of menu items: an
|
|
1193
|
+
* inner click no longer closes it (only outside click / Escape do), and the
|
|
1194
|
+
* semantics switch from `role="menu"` to a labeled `role="dialog"` — a panel
|
|
1195
|
+
* of selects is not a menu to a screen reader either:
|
|
1196
|
+
*
|
|
1197
|
+
* <strct-dropdown popover popoverLabel="Filters">
|
|
1198
|
+
* <button strct-button strctDropdownTrigger>Filters</button>
|
|
1199
|
+
* <strct-field label="Severity">…</strct-field>
|
|
1200
|
+
* </strct-dropdown>
|
|
960
1201
|
*/
|
|
961
1202
|
declare class StrctDropdown {
|
|
962
1203
|
private readonly host;
|
|
963
1204
|
/** Horizontal alignment of the menu. */
|
|
964
1205
|
readonly align: _angular_core.InputSignal<"end" | "start">;
|
|
1206
|
+
/**
|
|
1207
|
+
* Popover mode for panels holding form controls (filter/settings panels):
|
|
1208
|
+
* inner clicks never close the panel — only outside click / Escape do —
|
|
1209
|
+
* and it renders as a labeled `role="dialog"` instead of a menu.
|
|
1210
|
+
*/
|
|
1211
|
+
readonly popover: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1212
|
+
/** Accessible name of the popover dialog (localizable). */
|
|
1213
|
+
readonly popoverLabel: _angular_core.InputSignal<string>;
|
|
965
1214
|
readonly open: _angular_core.WritableSignal<boolean>;
|
|
966
1215
|
toggle(): void;
|
|
967
1216
|
close(): void;
|
|
1217
|
+
/** Menu items close on activation; popover form controls never do. */
|
|
1218
|
+
protected onInnerActivate(): void;
|
|
968
1219
|
protected onDocClick(event: MouseEvent): void;
|
|
969
1220
|
protected onEscape(): void;
|
|
970
1221
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDropdown, never>;
|
|
971
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDropdown, "strct-dropdown", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, ["[strctDropdownTrigger]", "*"], true, never>;
|
|
1222
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDropdown, "strct-dropdown", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; "popover": { "alias": "popover"; "required": false; "isSignal": true; }; "popoverLabel": { "alias": "popoverLabel"; "required": false; "isSignal": true; }; }, {}, never, ["[strctDropdownTrigger]", "*"], true, never>;
|
|
972
1223
|
}
|
|
973
1224
|
/** A selectable row inside a `<strct-dropdown>`. */
|
|
974
1225
|
declare class StrctDropdownItem {
|
|
@@ -1230,9 +1481,24 @@ declare class StrctCommandPalette {
|
|
|
1230
1481
|
readonly emptyText: _angular_core.InputSignal<string>;
|
|
1231
1482
|
/** Maximum rendered results. */
|
|
1232
1483
|
readonly maxResults: _angular_core.InputSignal<number>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Internal ranked filtering. Set `false` for a **server-backed** palette:
|
|
1486
|
+
* items render in the order given (you already filtered them) and the query
|
|
1487
|
+
* reaches you through the two-way `query` model. `maxResults` still caps
|
|
1488
|
+
* rendering.
|
|
1489
|
+
*/
|
|
1490
|
+
readonly filter: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1491
|
+
/** Show a "searching" row while server results are in flight. */
|
|
1492
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1493
|
+
/** Localizable text of the loading row. */
|
|
1494
|
+
readonly loadingText: _angular_core.InputSignal<string>;
|
|
1233
1495
|
/** Emitted when a command is chosen (Enter or click); the palette closes. */
|
|
1234
1496
|
readonly picked: _angular_core.OutputEmitterRef<StrctCommandItem>;
|
|
1235
|
-
|
|
1497
|
+
/**
|
|
1498
|
+
* The typed query (two-way). The palette still owns typing and keyboard
|
|
1499
|
+
* behaviour; consumers observe it to serve results asynchronously.
|
|
1500
|
+
*/
|
|
1501
|
+
readonly query: _angular_core.ModelSignal<string>;
|
|
1236
1502
|
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
1237
1503
|
protected readonly listId: string;
|
|
1238
1504
|
private previousActive;
|
|
@@ -1248,7 +1514,7 @@ declare class StrctCommandPalette {
|
|
|
1248
1514
|
protected pick(item: StrctCommandItem): void;
|
|
1249
1515
|
protected close(): void;
|
|
1250
1516
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCommandPalette, never>;
|
|
1251
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCommandPalette, "strct-command-palette", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "hotkey": { "alias": "hotkey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "maxResults": { "alias": "maxResults"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "picked": "picked"; }, never, never, true, never>;
|
|
1517
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCommandPalette, "strct-command-palette", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "hotkey": { "alias": "hotkey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "maxResults": { "alias": "maxResults"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "picked": "picked"; "query": "queryChange"; }, never, never, true, never>;
|
|
1252
1518
|
}
|
|
1253
1519
|
|
|
1254
1520
|
/**
|
|
@@ -1260,6 +1526,165 @@ declare class StrctKbd {
|
|
|
1260
1526
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctKbd, "strct-kbd", never, {}, {}, never, ["*"], true, never>;
|
|
1261
1527
|
}
|
|
1262
1528
|
|
|
1529
|
+
/**
|
|
1530
|
+
* Compact search pill — the pattern from the docs header: a leading search
|
|
1531
|
+
* icon, a label / input and an optional keyboard-hint chip. Two modes:
|
|
1532
|
+
*
|
|
1533
|
+
* - **input** (default): a real search field. Two-way `value` (also
|
|
1534
|
+
* CVA-compatible), `(search)` emits on Enter, Escape / the × clears.
|
|
1535
|
+
*
|
|
1536
|
+
* <strct-searchbox [(value)]="q" (search)="run($event)" />
|
|
1537
|
+
*
|
|
1538
|
+
* - **`trigger`**: a button that only announces activation — the classic
|
|
1539
|
+
* "fake search that opens the command palette" header pattern:
|
|
1540
|
+
*
|
|
1541
|
+
* <strct-searchbox trigger hint="⌘K" (activated)="palette.open.set(true)" />
|
|
1542
|
+
*/
|
|
1543
|
+
declare class StrctSearchbox implements ControlValueAccessor {
|
|
1544
|
+
private readonly host;
|
|
1545
|
+
/** Placeholder text (and the trigger mode's label). */
|
|
1546
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1547
|
+
/** Keyboard-hint chip (e.g. "⌘K"); hidden while typing. */
|
|
1548
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
1549
|
+
/** Render as an activation button instead of a real input (palette opener). */
|
|
1550
|
+
readonly trigger: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1551
|
+
/** Show the × clear button when there is a value. */
|
|
1552
|
+
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1553
|
+
/** Accessible label; falls back to `placeholder`. */
|
|
1554
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1555
|
+
/** Accessible label of the clear button (localizable). */
|
|
1556
|
+
readonly clearLabel: _angular_core.InputSignal<string>;
|
|
1557
|
+
/** Current text (two-way; also drives the CVA value). */
|
|
1558
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
1559
|
+
/** Enter pressed in input mode — run the search with the current text. */
|
|
1560
|
+
readonly search: _angular_core.OutputEmitterRef<string>;
|
|
1561
|
+
/** Trigger mode clicked (open your command palette / search surface). */
|
|
1562
|
+
readonly activated: _angular_core.OutputEmitterRef<void>;
|
|
1563
|
+
protected readonly focused: _angular_core.WritableSignal<boolean>;
|
|
1564
|
+
readonly isDisabled: _angular_core.WritableSignal<boolean>;
|
|
1565
|
+
private onChange;
|
|
1566
|
+
protected onTouched: () => void;
|
|
1567
|
+
protected onInput(event: Event): void;
|
|
1568
|
+
/** Clear the text (Escape / the × button). */
|
|
1569
|
+
clear(): void;
|
|
1570
|
+
/** Focus the input programmatically (e.g. from a global shortcut). */
|
|
1571
|
+
focus(): void;
|
|
1572
|
+
writeValue(value: string): void;
|
|
1573
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1574
|
+
registerOnTouched(fn: () => void): void;
|
|
1575
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1576
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSearchbox, never>;
|
|
1577
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSearchbox, "strct-searchbox", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "clearLabel": { "alias": "clearLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "search": "search"; "activated": "activated"; }, never, never, true, never>;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* Click-to-copy chip with built-in feedback: an icon (or icon + label) button
|
|
1582
|
+
* that writes `text` to the clipboard and flips to a ✓ "Copied" state for a
|
|
1583
|
+
* moment. The console workhorse for UUIDs, IPs, serials and snippets:
|
|
1584
|
+
*
|
|
1585
|
+
* <strct-copy text="172.16.75.100" />
|
|
1586
|
+
* <strct-copy [text]="host.id" label="Copy ID" />
|
|
1587
|
+
*/
|
|
1588
|
+
declare class StrctCopy {
|
|
1589
|
+
private readonly destroyRef;
|
|
1590
|
+
/** The text written to the clipboard. */
|
|
1591
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
1592
|
+
/** Optional visible label next to the icon (icon-only by default). */
|
|
1593
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1594
|
+
/** Accessible label; falls back to `copyLabel`. */
|
|
1595
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1596
|
+
/** Localizable strings. */
|
|
1597
|
+
readonly copyLabel: _angular_core.InputSignal<string>;
|
|
1598
|
+
readonly copiedLabel: _angular_core.InputSignal<string>;
|
|
1599
|
+
/** Emitted after a successful copy, with the copied text. */
|
|
1600
|
+
readonly copied: _angular_core.OutputEmitterRef<string>;
|
|
1601
|
+
protected readonly done: _angular_core.WritableSignal<boolean>;
|
|
1602
|
+
private timer;
|
|
1603
|
+
constructor();
|
|
1604
|
+
/** Write `text` to the clipboard and show the ✓ feedback. */
|
|
1605
|
+
copy(): void;
|
|
1606
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCopy, never>;
|
|
1607
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCopy, "strct-copy", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "copyLabel": { "alias": "copyLabel"; "required": false; "isSignal": true; }; "copiedLabel": { "alias": "copiedLabel"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, never, true, never>;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Copyable mono code / rendered-config block — the component form of the
|
|
1612
|
+
* `<details><pre>` pattern consoles keep hand-rolling. A header row carries an
|
|
1613
|
+
* optional title, a language tag, a copy button and (when `collapsible`) a
|
|
1614
|
+
* chevron; the body is a scrollable, keyboard-focusable `<pre>`.
|
|
1615
|
+
*
|
|
1616
|
+
* <strct-code [code]="yaml" language="yaml" title="cloud-init" collapsible />
|
|
1617
|
+
*/
|
|
1618
|
+
declare class StrctCode {
|
|
1619
|
+
/** The code / rendered config text (copied verbatim). */
|
|
1620
|
+
readonly code: _angular_core.InputSignal<string>;
|
|
1621
|
+
/** Header title (e.g. a filename). */
|
|
1622
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
1623
|
+
/** Small uppercase language tag (yaml, json, bash …). */
|
|
1624
|
+
readonly language: _angular_core.InputSignal<string>;
|
|
1625
|
+
/** Show the copy button. */
|
|
1626
|
+
readonly copyable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1627
|
+
/** Collapse to just the header (the `<details><pre>` pattern, done right). */
|
|
1628
|
+
readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1629
|
+
/** Collapsed state (two-way; only meaningful with `collapsible`). */
|
|
1630
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
1631
|
+
/** Show a line-number gutter (numbers are never copied — `code` is). */
|
|
1632
|
+
readonly lineNumbers: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Soft-wrap long unbroken text (PEM/CSR blocks, base64, long commands) so a
|
|
1635
|
+
* dialog never scrolls horizontally. Wrapping breaks the gutter's visual
|
|
1636
|
+
* alignment, so `wrap` takes precedence and hides `lineNumbers`.
|
|
1637
|
+
*/
|
|
1638
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1639
|
+
/** Scroll the body past this height (px); null grows freely. */
|
|
1640
|
+
readonly maxHeight: _angular_core.InputSignal<number | null>;
|
|
1641
|
+
/** Localizable labels for the collapse toggle. */
|
|
1642
|
+
readonly collapseLabel: _angular_core.InputSignal<string>;
|
|
1643
|
+
readonly expandLabel: _angular_core.InputSignal<string>;
|
|
1644
|
+
protected readonly lineNos: _angular_core.Signal<number[]>;
|
|
1645
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCode, never>;
|
|
1646
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCode, "strct-code", never, { "code": { "alias": "code"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; "isSignal": true; }; "expandLabel": { "alias": "expandLabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, never, true, never>;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/** One active filter chip in a {@link StrctFilterBar}. */
|
|
1650
|
+
interface StrctFilterChip {
|
|
1651
|
+
/** Stable identity, returned with (removed). */
|
|
1652
|
+
id: string;
|
|
1653
|
+
/** Chip text, e.g. "state: running". */
|
|
1654
|
+
label: string;
|
|
1655
|
+
/** Arbitrary payload carried back with (removed). */
|
|
1656
|
+
data?: unknown;
|
|
1657
|
+
}
|
|
1658
|
+
/**
|
|
1659
|
+
* The standard strip above a data grid: a search field, the active filter
|
|
1660
|
+
* chips (each removable), a result count and a clear-all action. The bar owns
|
|
1661
|
+
* no filtering logic — it renders state and announces intent:
|
|
1662
|
+
*
|
|
1663
|
+
* <strct-filter-bar [(query)]="q" [filters]="chips" [count]="rows.length"
|
|
1664
|
+
* (removed)="drop($event)" (cleared)="reset()" />
|
|
1665
|
+
*/
|
|
1666
|
+
declare class StrctFilterBar {
|
|
1667
|
+
/** Search text (two-way; forwards to the embedded searchbox). */
|
|
1668
|
+
readonly query: _angular_core.ModelSignal<string>;
|
|
1669
|
+
/** Active filter chips. */
|
|
1670
|
+
readonly filters: _angular_core.InputSignal<StrctFilterChip[]>;
|
|
1671
|
+
/** Result count shown at the end; null hides it. */
|
|
1672
|
+
readonly count: _angular_core.InputSignal<number | null>;
|
|
1673
|
+
/** Localizable strings. */
|
|
1674
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1675
|
+
readonly countLabel: _angular_core.InputSignal<string>;
|
|
1676
|
+
readonly clearLabel: _angular_core.InputSignal<string>;
|
|
1677
|
+
readonly removeLabel: _angular_core.InputSignal<string>;
|
|
1678
|
+
/** Enter pressed in the search field. */
|
|
1679
|
+
readonly search: _angular_core.OutputEmitterRef<string>;
|
|
1680
|
+
/** A chip's × was clicked. */
|
|
1681
|
+
readonly removed: _angular_core.OutputEmitterRef<StrctFilterChip>;
|
|
1682
|
+
/** "Clear filters" was clicked. */
|
|
1683
|
+
readonly cleared: _angular_core.OutputEmitterRef<void>;
|
|
1684
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctFilterBar, never>;
|
|
1685
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctFilterBar, "strct-filter-bar", never, { "query": { "alias": "query"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "countLabel": { "alias": "countLabel"; "required": false; "isSignal": true; }; "clearLabel": { "alias": "clearLabel"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; }, { "query": "queryChange"; "search": "search"; "removed": "removed"; "cleared": "cleared"; }, never, ["*"], true, never>;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1263
1688
|
/** Lifecycle of an async (or deferred) validation check. */
|
|
1264
1689
|
type StrctValidationStatus = 'idle' | 'checking' | 'ok' | 'warning' | 'error';
|
|
1265
1690
|
/**
|
|
@@ -3140,5 +3565,5 @@ declare class StrctEmptyState {
|
|
|
3140
3565
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctEmptyState, "strct-empty-state", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3141
3566
|
}
|
|
3142
3567
|
|
|
3143
|
-
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctEmptyState, StrctField, StrctFile, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRating, StrctRowDetailDef, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon, strctValidationIcon, strctValidationTone };
|
|
3144
|
-
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus };
|
|
3568
|
+
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRating, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon, strctValidationIcon, strctValidationTone };
|
|
3569
|
+
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus };
|