@akcelik/strct 0.29.0 → 0.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akcelik/strct",
3
- "version": "0.29.0",
3
+ "version": "0.30.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",
@@ -32,7 +32,8 @@
32
32
  "@angular/common": "^21.2.0",
33
33
  "@angular/core": "^21.2.0",
34
34
  "@angular/forms": "^21.2.0",
35
- "@angular/platform-browser": "^21.2.0"
35
+ "@angular/platform-browser": "^21.2.0",
36
+ "@angular/router": "^21.2.0"
36
37
  },
37
38
  "dependencies": {
38
39
  "tslib": "^2.3.0"
@@ -247,6 +247,22 @@ interface StrctRailItem {
247
247
  /** Badge colour (defaults to `accent`). When collapsed it renders as a dot. */
248
248
  badgeStatus?: StrctRailStatus;
249
249
  disabled?: boolean;
250
+ /** `'bottom'` pins the item to the foot of the rail (e.g. Administration). */
251
+ placement?: 'top' | 'bottom';
252
+ /**
253
+ * Render as a real router link (`<a routerLink>`): middle-click, ⌘/Ctrl-click
254
+ * and "open in new tab" work; `(select)` still fires on plain activation.
255
+ * When neither `routerLink` nor `href` is set the item stays a `<button>`.
256
+ */
257
+ routerLink?: string | unknown[];
258
+ /** Render as a plain `<a href>` (external or non-router destinations). */
259
+ href?: string;
260
+ /** Small trailing status dot with no text (e.g. "unsaved changes"). */
261
+ dot?: boolean;
262
+ /** Dot tone; defaults to `accent`. */
263
+ dotStatus?: StrctRailStatus;
264
+ /** Muted trailing icon (e.g. "restart required"), before any badge / dot. */
265
+ trailingIcon?: string;
250
266
  }
251
267
  /**
252
268
  * Collapsible, data-driven primary navigation rail for an application shell.
@@ -269,7 +285,16 @@ declare class StrctRail {
269
285
  readonly ariaLabel: _angular_core.InputSignal<string>;
270
286
  /** Emitted when an item is chosen. */
271
287
  readonly select: _angular_core.OutputEmitterRef<StrctRailItem>;
272
- protected pick(item: StrctRailItem): void;
288
+ protected readonly topItems: _angular_core.Signal<StrctRailItem[]>;
289
+ protected readonly bottomItems: _angular_core.Signal<StrctRailItem[]>;
290
+ /** Enabled item with a router destination → renders as `<a routerLink>`. */
291
+ protected isRouted(item: StrctRailItem): boolean;
292
+ /**
293
+ * Active state of a router-link item: an explicit `activeId` is authoritative;
294
+ * without one, the router's own active state drives it.
295
+ */
296
+ protected isActive(item: StrctRailItem, routerActive: boolean): boolean;
297
+ protected pick(item: StrctRailItem, event?: MouseEvent): void;
273
298
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctRail, never>;
274
299
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctRail, "strct-rail", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "activeId": { "alias": "activeId"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "activeId": "activeIdChange"; "collapsed": "collapsedChange"; "select": "select"; }, never, never, true, never>;
275
300
  }
@@ -1111,6 +1136,16 @@ interface StrctMenuLink {
1111
1136
  /** Optional leading icon name. */
1112
1137
  icon?: string;
1113
1138
  disabled?: boolean;
1139
+ /** Trailing count/label chip (e.g. a deviation count). */
1140
+ badge?: string | number;
1141
+ /** Badge tone; defaults to `accent` (shared vocabulary with {@link StrctRailItem}). */
1142
+ badgeStatus?: StrctRailStatus;
1143
+ /** Small trailing status dot with no text (e.g. "unsaved changes"). */
1144
+ dot?: boolean;
1145
+ /** Dot tone; defaults to `accent`. */
1146
+ dotStatus?: StrctRailStatus;
1147
+ /** Muted trailing icon (e.g. "restart required"), before any badge / dot. */
1148
+ trailingIcon?: string;
1114
1149
  }
1115
1150
  /** A category (level 1) that groups {@link StrctMenuLink} items (level 2). */
1116
1151
  interface StrctMenuSection {