@akcelik/strct 0.22.0 → 0.25.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 +225 -33
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +68 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.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
|
@@ -450,20 +450,51 @@ declare class StrctSpeedDial {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* Surface container. Compose with the header / block / footer pieces:
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* <strct-card-
|
|
453
|
+
*
|
|
454
|
+
* <strct-card status="warning" collapsible [(collapsed)]="hidden">
|
|
455
|
+
* <strct-card-header icon="host">Host hv-02</strct-card-header>
|
|
456
|
+
* <strct-card-block>…</strct-card-block>
|
|
456
457
|
* <strct-card-footer><button strct-button>OK</button></strct-card-footer>
|
|
457
458
|
* </strct-card>
|
|
459
|
+
*
|
|
460
|
+
* Rich options (all opt-in; defaults preserve the plain card):
|
|
461
|
+
* - `status` — tone rail on the leading edge (same language as alert / hero).
|
|
462
|
+
* - `interactive` — hover lift + accent border for clickable cards.
|
|
463
|
+
* - `selected` — accent ring for picker layouts.
|
|
464
|
+
* - `dense` — tighter paddings for dashboards.
|
|
465
|
+
* - `loading` — indeterminate top bar + `aria-busy` (reduced-motion safe).
|
|
466
|
+
* - `collapsible` + two-way `collapsed` — the header gains a chevron toggle;
|
|
467
|
+
* block and footer hide while collapsed.
|
|
458
468
|
*/
|
|
459
469
|
declare class StrctCard {
|
|
470
|
+
/** Tone rail on the leading edge. */
|
|
471
|
+
readonly status: _angular_core.InputSignal<StrctStatus>;
|
|
472
|
+
/** Hover lift + accent border for clickable cards (style-only affordance). */
|
|
473
|
+
readonly interactive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
474
|
+
/** Accent ring — for picker / multi-select card layouts. */
|
|
475
|
+
readonly selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
476
|
+
/** Tighter paddings for dense dashboards. */
|
|
477
|
+
readonly dense: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
478
|
+
/** Indeterminate top bar + aria-busy; body/footer dim and ignore input. */
|
|
479
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
480
|
+
/** Allow collapsing to just the header (a chevron appears in the header). */
|
|
481
|
+
readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
482
|
+
/** Collapsed state (two-way; only meaningful with `collapsible`). */
|
|
483
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
484
|
+
toggle(): void;
|
|
460
485
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCard, never>;
|
|
461
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCard, "strct-card", never, {}, {}, never, ["*"], true, never>;
|
|
486
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCard, "strct-card", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["*"], true, never>;
|
|
462
487
|
}
|
|
463
488
|
/** Header section of a {@link StrctCard}. */
|
|
464
489
|
declare class StrctCardHeader {
|
|
490
|
+
/** Optional leading icon (StrctIcon set). */
|
|
491
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
492
|
+
/** Accessible labels for the collapse toggle (localizable). */
|
|
493
|
+
readonly collapseLabel: _angular_core.InputSignal<string>;
|
|
494
|
+
readonly expandLabel: _angular_core.InputSignal<string>;
|
|
495
|
+
protected readonly card: StrctCard | null;
|
|
465
496
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCardHeader, never>;
|
|
466
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCardHeader, "strct-card-header", never, {}, {}, never, ["*"], true, never>;
|
|
497
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCardHeader, "strct-card-header", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; "isSignal": true; }; "expandLabel": { "alias": "expandLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
467
498
|
}
|
|
468
499
|
/** Body section of a {@link StrctCard}. */
|
|
469
500
|
declare class StrctCardBlock {
|
|
@@ -687,6 +718,8 @@ declare class StrctTreeNode {
|
|
|
687
718
|
protected readonly menuItems: _angular_core.Signal<StrctMenuItem[]>;
|
|
688
719
|
/** The owning `<strct-tree>` (null only for standalone nodes outside a tree). */
|
|
689
720
|
protected readonly tree: StrctTree | null;
|
|
721
|
+
/** Node icon scales with the owning tree's density (16 native → 18 comfortable). */
|
|
722
|
+
protected readonly iconSize: _angular_core.Signal<16 | 18>;
|
|
690
723
|
/** Parent tree node (element-injector ancestor); drives aria-level + ArrowLeft. */
|
|
691
724
|
readonly parent: StrctTreeNode | null;
|
|
692
725
|
/** 1-based depth, exposed as aria-level. */
|
|
@@ -722,6 +755,12 @@ declare class StrctTreeNode {
|
|
|
722
755
|
declare class StrctTree {
|
|
723
756
|
/** Data-driven node list; when set, projected content is ignored. */
|
|
724
757
|
readonly nodes: _angular_core.InputSignal<StrctTreeNodeData[] | null>;
|
|
758
|
+
/**
|
|
759
|
+
* Row density. `compact` (default) is the dense inventory layout —
|
|
760
|
+
* 13px text / 16px icons; `comfortable` relaxes to 14px text / 18px icons
|
|
761
|
+
* with taller rows for touch-friendly or low-density consoles.
|
|
762
|
+
*/
|
|
763
|
+
readonly density: _angular_core.InputSignal<"compact" | "comfortable">;
|
|
725
764
|
/** Per-node right-click menu resolver. */
|
|
726
765
|
readonly nodeMenu: _angular_core.InputSignal<StrctTreeNodeMenuFn | null>;
|
|
727
766
|
/** Emitted when any data-driven node is clicked. */
|
|
@@ -768,7 +807,7 @@ declare class StrctTree {
|
|
|
768
807
|
/** Toggle a node's expansion, updating state and emitting outputs. */
|
|
769
808
|
toggleNode(node: StrctTreeNodeData): void;
|
|
770
809
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctTree, never>;
|
|
771
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTree, "strct-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "nodeMenu": { "alias": "nodeMenu"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; }, { "nodeActivated": "nodeActivated"; "nodeMenuSelect": "nodeMenuSelect"; "expandedIds": "expandedIdsChange"; "expandedChange": "expandedChange"; "nodeToggled": "nodeToggled"; }, never, ["*"], true, never>;
|
|
810
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTree, "strct-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "nodeMenu": { "alias": "nodeMenu"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; }, { "nodeActivated": "nodeActivated"; "nodeMenuSelect": "nodeMenuSelect"; "expandedIds": "expandedIdsChange"; "expandedChange": "expandedChange"; "nodeToggled": "nodeToggled"; }, never, ["*"], true, never>;
|
|
772
811
|
}
|
|
773
812
|
|
|
774
813
|
/** Fixed modal width presets: sm 480 · md 640 · lg 860 · xl 1080 (px). */
|
|
@@ -802,6 +841,14 @@ declare class StrctModal {
|
|
|
802
841
|
* `dismissible` for lightweight, transient dialogs where quick dismissal is fine.
|
|
803
842
|
*/
|
|
804
843
|
readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
844
|
+
/** Allow repositioning the dialog by dragging its header (mouse + touch). */
|
|
845
|
+
readonly draggable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
846
|
+
/** Extra class(es) added to the dialog panel — style it from app-global CSS. */
|
|
847
|
+
readonly panelClass: _angular_core.InputSignal<string>;
|
|
848
|
+
/** Extra class(es) added to the backdrop / overlay. */
|
|
849
|
+
readonly backdropClass: _angular_core.InputSignal<string>;
|
|
850
|
+
/** Built-in look: `glass` is a theme-aware frosted preset (translucent panel + blurred backdrop). */
|
|
851
|
+
readonly variant: _angular_core.InputSignal<"solid" | "glass">;
|
|
805
852
|
/** Emitted when the alert is dismissed. */
|
|
806
853
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
807
854
|
protected readonly titleId: string;
|
|
@@ -815,11 +862,19 @@ declare class StrctModal {
|
|
|
815
862
|
protected onEscape(): void;
|
|
816
863
|
/** Wrap Tab focus within the dialog. */
|
|
817
864
|
protected onTab(event: Event): void;
|
|
865
|
+
/** Dialog translation from its centered position; reset on every open. */
|
|
866
|
+
private readonly dragOffset;
|
|
867
|
+
/** Pointer + clamp bounds captured at drag start; null while not dragging. */
|
|
868
|
+
private dragStart;
|
|
869
|
+
protected readonly dragTransform: _angular_core.Signal<string | null>;
|
|
870
|
+
protected onHeadPointerDown(event: PointerEvent): void;
|
|
871
|
+
protected onHeadPointerMove(event: PointerEvent): void;
|
|
872
|
+
protected onHeadPointerEnd(): void;
|
|
818
873
|
private dialog;
|
|
819
874
|
private focusable;
|
|
820
875
|
private focusInitial;
|
|
821
876
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctModal, never>;
|
|
822
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctModal, "strct-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hideFooter": { "alias": "hideFooter"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, never, ["*", "[strctModalFooter]"], true, never>;
|
|
877
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctModal, "strct-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hideFooter": { "alias": "hideFooter"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, never, ["*", "[strctModalFooter]"], true, never>;
|
|
823
878
|
}
|
|
824
879
|
|
|
825
880
|
/** Marks the drawer's footer action area: `<ng-container strctDrawerFooter>…`. */
|
|
@@ -1990,6 +2045,11 @@ declare class StrctDatagrid {
|
|
|
1990
2045
|
readonly detailPane: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1991
2046
|
/** Compact density mode. */
|
|
1992
2047
|
readonly compact: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2048
|
+
/**
|
|
2049
|
+
* Keep every row exactly one line tall: cell content never wraps — long values
|
|
2050
|
+
* truncate with an ellipsis instead — so tall content can't distort the grid.
|
|
2051
|
+
*/
|
|
2052
|
+
readonly singleLine: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1993
2053
|
/** Message shown when there are no rows. */
|
|
1994
2054
|
readonly emptyText: _angular_core.InputSignal<string>;
|
|
1995
2055
|
/** Show skeleton rows while data is loading. */
|
|
@@ -2109,7 +2169,7 @@ declare class StrctDatagrid {
|
|
|
2109
2169
|
private commitSelection;
|
|
2110
2170
|
private compare;
|
|
2111
2171
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDatagrid, never>;
|
|
2112
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDatagrid, "strct-datagrid", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "detailPane": { "alias": "detailPane"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "columnChooser": { "alias": "columnChooser"; "required": false; "isSignal": true; }; "sync": { "alias": "sync"; "required": false; "isSignal": true; }; "footerActionsDisabled": { "alias": "footerActionsDisabled"; "required": false; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "syncChange": "syncChange"; "rowAction": "rowAction"; }, ["detailDef", "actionBarDef", "cellDefs"], ["[strctDatagridActionBar]"], true, never>;
|
|
2172
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDatagrid, "strct-datagrid", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "detailPane": { "alias": "detailPane"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "singleLine": { "alias": "singleLine"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "columnChooser": { "alias": "columnChooser"; "required": false; "isSignal": true; }; "sync": { "alias": "sync"; "required": false; "isSignal": true; }; "footerActionsDisabled": { "alias": "footerActionsDisabled"; "required": false; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "syncChange": "syncChange"; "rowAction": "rowAction"; }, ["detailDef", "actionBarDef", "cellDefs"], ["[strctDatagridActionBar]"], true, never>;
|
|
2113
2173
|
}
|
|
2114
2174
|
|
|
2115
2175
|
/** Timeline node state colors. */
|