@akcelik/strct 0.2.0 → 0.4.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/README.md +11 -1
- package/fesm2022/akcelik-strct.mjs +746 -530
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_fonts.scss +49 -0
- package/styles/fonts/dm-sans-400.woff2 +0 -0
- package/styles/fonts/dm-sans-500.woff2 +0 -0
- package/styles/fonts/dm-sans-600.woff2 +0 -0
- package/styles/fonts/dm-sans-700.woff2 +0 -0
- package/styles/fonts/jetbrains-mono-400.woff2 +0 -0
- package/styles/fonts/jetbrains-mono-500.woff2 +0 -0
- package/styles/theme.scss +1 -0
- package/types/akcelik-strct.d.ts +137 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Self-hosted fonts bundled with the library so it renders in its intended
|
|
2
|
+
// typography without any external request. Both are OFL-licensed:
|
|
3
|
+
// DM Sans — https://fonts.google.com/specimen/DM+Sans (OFL)
|
|
4
|
+
// JetBrains Mono — https://www.jetbrains.com/lp/mono/ (OFL)
|
|
5
|
+
// Imported by theme.scss; the woff2 files ship under `styles/fonts/`.
|
|
6
|
+
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: 'DM Sans';
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
src: url('./fonts/dm-sans-400.woff2') format('woff2');
|
|
13
|
+
}
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: 'DM Sans';
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
src: url('./fonts/dm-sans-500.woff2') format('woff2');
|
|
20
|
+
}
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: 'DM Sans';
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
src: url('./fonts/dm-sans-600.woff2') format('woff2');
|
|
27
|
+
}
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: 'DM Sans';
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
src: url('./fonts/dm-sans-700.woff2') format('woff2');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'JetBrains Mono';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
src: url('./fonts/jetbrains-mono-400.woff2') format('woff2');
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'JetBrains Mono';
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
src: url('./fonts/jetbrains-mono-500.woff2') format('woff2');
|
|
49
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/styles/theme.scss
CHANGED
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -366,6 +366,83 @@ declare class StrctTabs {
|
|
|
366
366
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTabs, "strct-tabs", never, {}, {}, ["tabs"], ["*"], true, never>;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
/** A single entry in a data-driven menu. */
|
|
370
|
+
interface StrctMenuItem {
|
|
371
|
+
/** Entry text. Optional — omit it for a `divider`, where a label is meaningless. */
|
|
372
|
+
label?: string;
|
|
373
|
+
icon?: string;
|
|
374
|
+
/** Destructive styling. */
|
|
375
|
+
danger?: boolean;
|
|
376
|
+
disabled?: boolean;
|
|
377
|
+
/** Render a separator instead of an entry (label is ignored). */
|
|
378
|
+
divider?: boolean;
|
|
379
|
+
/** Nested submenu. */
|
|
380
|
+
children?: StrctMenuItem[];
|
|
381
|
+
/** Invoked on selection, with the trigger's `strctContextMenuData`. */
|
|
382
|
+
action?: (data?: unknown) => void;
|
|
383
|
+
/** Arbitrary payload. */
|
|
384
|
+
data?: unknown;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Floating menu panel — portaled into `<body>` (so it escapes overflow /
|
|
388
|
+
* transform clipping), positioned by its real measured size, with full keyboard
|
|
389
|
+
* navigation and recursive submenus. Usually created by `[strctContextMenu]`,
|
|
390
|
+
* but can be embedded directly with `submenu`.
|
|
391
|
+
*/
|
|
392
|
+
declare class StrctMenuPanel {
|
|
393
|
+
private readonly host;
|
|
394
|
+
readonly items: _angular_core.InputSignal<StrctMenuItem[]>;
|
|
395
|
+
readonly data: _angular_core.InputSignal<unknown>;
|
|
396
|
+
readonly x: _angular_core.InputSignal<number>;
|
|
397
|
+
readonly y: _angular_core.InputSignal<number>;
|
|
398
|
+
readonly submenu: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
399
|
+
readonly select: _angular_core.OutputEmitterRef<StrctMenuItem>;
|
|
400
|
+
readonly close: _angular_core.OutputEmitterRef<void>;
|
|
401
|
+
/** ArrowLeft inside a submenu — asks the parent to close it. */
|
|
402
|
+
readonly back: _angular_core.OutputEmitterRef<void>;
|
|
403
|
+
protected readonly posX: _angular_core.WritableSignal<number>;
|
|
404
|
+
protected readonly posY: _angular_core.WritableSignal<number>;
|
|
405
|
+
protected readonly flipLeft: _angular_core.WritableSignal<boolean>;
|
|
406
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
407
|
+
protected readonly openSubIndex: _angular_core.WritableSignal<number | null>;
|
|
408
|
+
private readonly navIndices;
|
|
409
|
+
constructor();
|
|
410
|
+
private clampToViewport;
|
|
411
|
+
protected focusItem(i: number): void;
|
|
412
|
+
private move;
|
|
413
|
+
protected onHover(i: number): void;
|
|
414
|
+
protected onLeave(i: number): void;
|
|
415
|
+
protected onItemClick(item: StrctMenuItem, i: number, event: Event): void;
|
|
416
|
+
protected closeSub(): void;
|
|
417
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
418
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctMenuPanel, never>;
|
|
419
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctMenuPanel, "strct-menu-panel", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": false; "isSignal": true; }; "y": { "alias": "y"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "select": "select"; "close": "close"; "back": "back"; }, never, never, true, never>;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Right-click (context) menu driven by a data array. Attach to any trigger; the
|
|
423
|
+
* menu portals into `<body>` and runs each item's `action` on selection.
|
|
424
|
+
* <div [strctContextMenu]="menuFor(host)" [strctContextMenuData]="host"
|
|
425
|
+
* (menuSelect)="onPick($event)">…</div>
|
|
426
|
+
*/
|
|
427
|
+
declare class StrctContextMenuTrigger implements OnDestroy {
|
|
428
|
+
private readonly appRef;
|
|
429
|
+
private readonly envInjector;
|
|
430
|
+
private readonly zone;
|
|
431
|
+
private readonly doc;
|
|
432
|
+
readonly items: _angular_core.InputSignal<StrctMenuItem[]>;
|
|
433
|
+
readonly data: _angular_core.InputSignal<unknown>;
|
|
434
|
+
readonly menuSelect: _angular_core.OutputEmitterRef<StrctMenuItem>;
|
|
435
|
+
private ref;
|
|
436
|
+
private readonly onClose;
|
|
437
|
+
protected onContextMenu(event: MouseEvent): void;
|
|
438
|
+
private openAt;
|
|
439
|
+
private readonly onOutside;
|
|
440
|
+
private closeMenu;
|
|
441
|
+
ngOnDestroy(): void;
|
|
442
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctContextMenuTrigger, never>;
|
|
443
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctContextMenuTrigger, "[strctContextMenu]", never, { "items": { "alias": "strctContextMenu"; "required": true; "isSignal": true; }; "data": { "alias": "strctContextMenuData"; "required": false; "isSignal": true; }; }, { "menuSelect": "menuSelect"; }, never, never, true, never>;
|
|
444
|
+
}
|
|
445
|
+
|
|
369
446
|
/** A node in the data-driven tree (`<strct-tree [nodes]="...">`). */
|
|
370
447
|
interface StrctTreeNodeData {
|
|
371
448
|
label: string;
|
|
@@ -381,6 +458,13 @@ interface StrctTreeNodeData {
|
|
|
381
458
|
/** Arbitrary payload returned with (nodeActivated). */
|
|
382
459
|
data?: unknown;
|
|
383
460
|
}
|
|
461
|
+
/** Per-node menu resolver for the data-driven tree — returns the items for one node. */
|
|
462
|
+
type StrctTreeNodeMenuFn = (node: StrctTreeNodeData) => StrctMenuItem[];
|
|
463
|
+
/** Payload of (nodeMenuSelect). */
|
|
464
|
+
interface StrctTreeMenuEvent {
|
|
465
|
+
node: StrctTreeNodeData;
|
|
466
|
+
item: StrctMenuItem;
|
|
467
|
+
}
|
|
384
468
|
/**
|
|
385
469
|
* Tree node. Two modes:
|
|
386
470
|
* - **Content:** nest `<strct-tree-node>` children manually.
|
|
@@ -399,10 +483,16 @@ declare class StrctTreeNode {
|
|
|
399
483
|
readonly badge: _angular_core.InputSignal<StrctIconBadge>;
|
|
400
484
|
readonly active: _angular_core.InputSignal<boolean>;
|
|
401
485
|
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
486
|
+
/** Per-node menu resolver (data mode); bubbles down the recursion. */
|
|
487
|
+
readonly nodeMenu: _angular_core.InputSignal<StrctTreeNodeMenuFn | null>;
|
|
402
488
|
/** Content-mode click. */
|
|
403
489
|
readonly activated: _angular_core.OutputEmitterRef<void>;
|
|
404
490
|
/** Data-mode click — carries the activated node (bubbles to the tree). */
|
|
405
491
|
readonly nodeActivated: _angular_core.OutputEmitterRef<StrctTreeNodeData>;
|
|
492
|
+
/** Data-mode right-click menu selection (bubbles to the tree). */
|
|
493
|
+
readonly nodeMenuSelect: _angular_core.OutputEmitterRef<StrctTreeMenuEvent>;
|
|
494
|
+
/** Right-click menu items for this node ([] when no resolver / not data mode). */
|
|
495
|
+
protected readonly menuItems: _angular_core.Signal<StrctMenuItem[]>;
|
|
406
496
|
private readonly childNodes;
|
|
407
497
|
/** Data-mode expansion (seeded from node.expanded on first toggle). */
|
|
408
498
|
private readonly dataExpanded;
|
|
@@ -414,8 +504,9 @@ declare class StrctTreeNode {
|
|
|
414
504
|
protected readonly isOpen: _angular_core.Signal<boolean>;
|
|
415
505
|
toggle(): void;
|
|
416
506
|
protected onActivate(): void;
|
|
507
|
+
protected onMenuSelect(item: StrctMenuItem): void;
|
|
417
508
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctTreeNode, never>;
|
|
418
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTreeNode, "strct-tree-node", never, { "node": { "alias": "node"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "activated": "activated"; "nodeActivated": "nodeActivated"; }, ["childNodes"], ["[strctTreeTrailing]", "*"], true, never>;
|
|
509
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTreeNode, "strct-tree-node", never, { "node": { "alias": "node"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "nodeMenu": { "alias": "nodeMenu"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "activated": "activated"; "nodeActivated": "nodeActivated"; "nodeMenuSelect": "nodeMenuSelect"; }, ["childNodes"], ["[strctTreeTrailing]", "*"], true, never>;
|
|
419
510
|
}
|
|
420
511
|
/**
|
|
421
512
|
* Root container for a tree. Either project `<strct-tree-node>` children, or
|
|
@@ -425,10 +516,14 @@ declare class StrctTreeNode {
|
|
|
425
516
|
declare class StrctTree {
|
|
426
517
|
/** Data-driven node list; when set, projected content is ignored. */
|
|
427
518
|
readonly nodes: _angular_core.InputSignal<StrctTreeNodeData[] | null>;
|
|
519
|
+
/** Per-node right-click menu resolver. */
|
|
520
|
+
readonly nodeMenu: _angular_core.InputSignal<StrctTreeNodeMenuFn | null>;
|
|
428
521
|
/** Emitted when any data-driven node is clicked. */
|
|
429
522
|
readonly nodeActivated: _angular_core.OutputEmitterRef<StrctTreeNodeData>;
|
|
523
|
+
/** Emitted when a data-driven node's right-click menu item is chosen. */
|
|
524
|
+
readonly nodeMenuSelect: _angular_core.OutputEmitterRef<StrctTreeMenuEvent>;
|
|
430
525
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctTree, never>;
|
|
431
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTree, "strct-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; }, { "nodeActivated": "nodeActivated"; }, never, ["*"], true, never>;
|
|
526
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTree, "strct-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "nodeMenu": { "alias": "nodeMenu"; "required": false; "isSignal": true; }; }, { "nodeActivated": "nodeActivated"; "nodeMenuSelect": "nodeMenuSelect"; }, never, ["*"], true, never>;
|
|
432
527
|
}
|
|
433
528
|
|
|
434
529
|
type StrctModalSize = 'sm' | 'md' | 'lg';
|
|
@@ -454,6 +549,8 @@ declare class StrctModal {
|
|
|
454
549
|
protected readonly titleId: string;
|
|
455
550
|
/** Element that had focus before the dialog opened, restored on close. */
|
|
456
551
|
private previousActive;
|
|
552
|
+
/** Whether this instance currently holds a scroll lock. */
|
|
553
|
+
private locked;
|
|
457
554
|
constructor();
|
|
458
555
|
close(): void;
|
|
459
556
|
protected onBackdrop(): void;
|
|
@@ -527,99 +624,28 @@ declare class StrctContextMenu {
|
|
|
527
624
|
}
|
|
528
625
|
|
|
529
626
|
/**
|
|
530
|
-
* A nested fly-out inside a `strct-context-menu` or `strct-dropdown`.
|
|
531
|
-
*
|
|
627
|
+
* A nested fly-out inside a `strct-context-menu` or `strct-dropdown`. Opens on
|
|
628
|
+
* hover, click/tap, or the keyboard (Enter / Space / →), and flips to the left
|
|
629
|
+
* near the right edge of the viewport. Reuse `strct-dropdown-item` for entries.
|
|
532
630
|
* <strct-submenu label="Power">
|
|
533
631
|
* <strct-dropdown-item>Power on</strct-dropdown-item>
|
|
534
632
|
* <strct-dropdown-item>Power off</strct-dropdown-item>
|
|
535
633
|
* </strct-submenu>
|
|
536
634
|
*/
|
|
537
635
|
declare class StrctSubmenu {
|
|
636
|
+
private readonly host;
|
|
538
637
|
readonly label: _angular_core.InputSignal<string>;
|
|
539
638
|
/** Optional leading icon; when omitted the icon column is still reserved so
|
|
540
639
|
* the label stays aligned with sibling items that do have icons. */
|
|
541
640
|
readonly icon: _angular_core.InputSignal<string>;
|
|
542
641
|
readonly open: _angular_core.WritableSignal<boolean>;
|
|
642
|
+
/** Open to the left when the fly-out would overflow the right edge. */
|
|
643
|
+
protected readonly flip: _angular_core.WritableSignal<boolean>;
|
|
644
|
+
protected setOpen(value: boolean): void;
|
|
543
645
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSubmenu, never>;
|
|
544
646
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSubmenu, "strct-submenu", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, ["[strctSubmenuLabel]", "*"], true, never>;
|
|
545
647
|
}
|
|
546
648
|
|
|
547
|
-
/** A single entry in a data-driven menu. */
|
|
548
|
-
interface StrctMenuItem {
|
|
549
|
-
label: string;
|
|
550
|
-
icon?: string;
|
|
551
|
-
/** Destructive styling. */
|
|
552
|
-
danger?: boolean;
|
|
553
|
-
disabled?: boolean;
|
|
554
|
-
/** Render a separator instead of an entry (label is ignored). */
|
|
555
|
-
divider?: boolean;
|
|
556
|
-
/** Nested submenu. */
|
|
557
|
-
children?: StrctMenuItem[];
|
|
558
|
-
/** Invoked on selection, with the trigger's `strctContextMenuData`. */
|
|
559
|
-
action?: (data?: unknown) => void;
|
|
560
|
-
/** Arbitrary payload. */
|
|
561
|
-
data?: unknown;
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Floating menu panel — portaled into `<body>` (so it escapes overflow /
|
|
565
|
-
* transform clipping), positioned by its real measured size, with full keyboard
|
|
566
|
-
* navigation and recursive submenus. Usually created by `[strctContextMenu]`,
|
|
567
|
-
* but can be embedded directly with `submenu`.
|
|
568
|
-
*/
|
|
569
|
-
declare class StrctMenuPanel {
|
|
570
|
-
private readonly host;
|
|
571
|
-
readonly items: _angular_core.InputSignal<StrctMenuItem[]>;
|
|
572
|
-
readonly data: _angular_core.InputSignal<unknown>;
|
|
573
|
-
readonly x: _angular_core.InputSignal<number>;
|
|
574
|
-
readonly y: _angular_core.InputSignal<number>;
|
|
575
|
-
readonly submenu: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
576
|
-
readonly select: _angular_core.OutputEmitterRef<StrctMenuItem>;
|
|
577
|
-
readonly close: _angular_core.OutputEmitterRef<void>;
|
|
578
|
-
/** ArrowLeft inside a submenu — asks the parent to close it. */
|
|
579
|
-
readonly back: _angular_core.OutputEmitterRef<void>;
|
|
580
|
-
protected readonly posX: _angular_core.WritableSignal<number>;
|
|
581
|
-
protected readonly posY: _angular_core.WritableSignal<number>;
|
|
582
|
-
protected readonly flipLeft: _angular_core.WritableSignal<boolean>;
|
|
583
|
-
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
584
|
-
protected readonly openSubIndex: _angular_core.WritableSignal<number | null>;
|
|
585
|
-
private readonly navIndices;
|
|
586
|
-
constructor();
|
|
587
|
-
private clampToViewport;
|
|
588
|
-
protected focusItem(i: number): void;
|
|
589
|
-
private move;
|
|
590
|
-
protected onHover(i: number): void;
|
|
591
|
-
protected onLeave(i: number): void;
|
|
592
|
-
protected onItemClick(item: StrctMenuItem, i: number, event: Event): void;
|
|
593
|
-
protected closeSub(): void;
|
|
594
|
-
protected onKeydown(event: KeyboardEvent): void;
|
|
595
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctMenuPanel, never>;
|
|
596
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctMenuPanel, "strct-menu-panel", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "x": { "alias": "x"; "required": false; "isSignal": true; }; "y": { "alias": "y"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "select": "select"; "close": "close"; "back": "back"; }, never, never, true, never>;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Right-click (context) menu driven by a data array. Attach to any trigger; the
|
|
600
|
-
* menu portals into `<body>` and runs each item's `action` on selection.
|
|
601
|
-
* <div [strctContextMenu]="menuFor(host)" [strctContextMenuData]="host"
|
|
602
|
-
* (menuSelect)="onPick($event)">…</div>
|
|
603
|
-
*/
|
|
604
|
-
declare class StrctContextMenuTrigger implements OnDestroy {
|
|
605
|
-
private readonly appRef;
|
|
606
|
-
private readonly envInjector;
|
|
607
|
-
private readonly zone;
|
|
608
|
-
private readonly doc;
|
|
609
|
-
readonly items: _angular_core.InputSignal<StrctMenuItem[]>;
|
|
610
|
-
readonly data: _angular_core.InputSignal<unknown>;
|
|
611
|
-
readonly menuSelect: _angular_core.OutputEmitterRef<StrctMenuItem>;
|
|
612
|
-
private ref;
|
|
613
|
-
private readonly onClose;
|
|
614
|
-
protected onContextMenu(event: MouseEvent): void;
|
|
615
|
-
private openAt;
|
|
616
|
-
private readonly onOutside;
|
|
617
|
-
private closeMenu;
|
|
618
|
-
ngOnDestroy(): void;
|
|
619
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctContextMenuTrigger, never>;
|
|
620
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctContextMenuTrigger, "[strctContextMenu]", never, { "items": { "alias": "strctContextMenu"; "required": true; "isSignal": true; }; "data": { "alias": "strctContextMenuData"; "required": false; "isSignal": true; }; }, { "menuSelect": "menuSelect"; }, never, never, true, never>;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
649
|
/** A single wizard step. `label` names it in the step header. */
|
|
624
650
|
declare class StrctStep {
|
|
625
651
|
readonly label: _angular_core.InputSignal<string>;
|
|
@@ -697,6 +723,35 @@ declare class StrctPagination {
|
|
|
697
723
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctPagination, "strct-pagination", never, { "total": { "alias": "total"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
|
|
698
724
|
}
|
|
699
725
|
|
|
726
|
+
/**
|
|
727
|
+
* Form-field wrapper: a label (with optional required marker), the projected
|
|
728
|
+
* control, and a hint or error message. It auto-links the control via
|
|
729
|
+
* `aria-describedby` and sets `aria-invalid` when an error is present.
|
|
730
|
+
*
|
|
731
|
+
* <strct-field label="Email" required hint="We never share it." [error]="emailError()">
|
|
732
|
+
* <input strctInput type="email" [(ngModel)]="email" />
|
|
733
|
+
* </strct-field>
|
|
734
|
+
*/
|
|
735
|
+
declare class StrctField {
|
|
736
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
737
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
738
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
739
|
+
/** Error message (string or first-of array); falsy clears the error state. */
|
|
740
|
+
readonly error: _angular_core.InputSignal<string | string[] | null | undefined>;
|
|
741
|
+
private readonly host;
|
|
742
|
+
private readonly n;
|
|
743
|
+
protected readonly hintId: string;
|
|
744
|
+
protected readonly errorId: string;
|
|
745
|
+
protected readonly controlId: _angular_core.WritableSignal<string>;
|
|
746
|
+
protected readonly errorText: _angular_core.Signal<string>;
|
|
747
|
+
constructor();
|
|
748
|
+
private control;
|
|
749
|
+
private link;
|
|
750
|
+
private applyAria;
|
|
751
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctField, never>;
|
|
752
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctField, "strct-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
753
|
+
}
|
|
754
|
+
|
|
700
755
|
/**
|
|
701
756
|
* Applies the shared `.strct-control` look to a native input / textarea / select.
|
|
702
757
|
* <input strctInput placeholder="Name" />
|
|
@@ -1546,5 +1601,5 @@ declare class StrctToastOutlet {
|
|
|
1546
1601
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctToastOutlet, "strct-toast-outlet", never, {}, {}, never, never, true, never>;
|
|
1547
1602
|
}
|
|
1548
1603
|
|
|
1549
|
-
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, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRange, StrctRating, StrctRowDetailDef, StrctShell, 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 };
|
|
1550
|
-
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartStatus, StrctChartType, StrctColumn, StrctDatagridColumn, StrctDonutSegment, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRow, StrctRowId, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctTagStatus, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeNodeData };
|
|
1604
|
+
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, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctField, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRange, StrctRating, StrctRowDetailDef, StrctShell, 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 };
|
|
1605
|
+
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartStatus, StrctChartType, StrctColumn, StrctDatagridColumn, StrctDonutSegment, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRow, StrctRowId, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctTagStatus, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn };
|