@memberjunction/ng-ui-components 5.51.0 → 6.1.0-edge.1

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.
Files changed (46) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +51 -2
  3. package/dist/lib/bottom-sheet/bottom-sheet.component.d.ts +96 -0
  4. package/dist/lib/bottom-sheet/bottom-sheet.component.d.ts.map +1 -0
  5. package/dist/lib/bottom-sheet/bottom-sheet.component.js +300 -0
  6. package/dist/lib/bottom-sheet/bottom-sheet.component.js.map +1 -0
  7. package/dist/lib/left-nav/left-nav.component.d.ts +142 -3
  8. package/dist/lib/left-nav/left-nav.component.d.ts.map +1 -1
  9. package/dist/lib/left-nav/left-nav.component.js +391 -117
  10. package/dist/lib/left-nav/left-nav.component.js.map +1 -1
  11. package/dist/lib/slide-panel/slide-panel.component.js +6 -6
  12. package/dist/lib/slide-panel/slide-panel.component.js.map +1 -1
  13. package/dist/lib/tabs/tab-chrome-guard.d.ts +14 -0
  14. package/dist/lib/tabs/tab-chrome-guard.d.ts.map +1 -0
  15. package/dist/lib/tabs/tab-chrome-guard.js +36 -0
  16. package/dist/lib/tabs/tab-chrome-guard.js.map +1 -0
  17. package/dist/lib/tabs/tab-list.directive.d.ts +93 -0
  18. package/dist/lib/tabs/tab-list.directive.d.ts.map +1 -0
  19. package/dist/lib/tabs/tab-list.directive.js +202 -0
  20. package/dist/lib/tabs/tab-list.directive.js.map +1 -0
  21. package/dist/lib/tabs/tabs.scss +242 -0
  22. package/dist/lib/workspace-tabs/workspace-card.component.d.ts +63 -0
  23. package/dist/lib/workspace-tabs/workspace-card.component.d.ts.map +1 -0
  24. package/dist/lib/workspace-tabs/workspace-card.component.js +256 -0
  25. package/dist/lib/workspace-tabs/workspace-card.component.js.map +1 -0
  26. package/dist/lib/workspace-tabs/workspace-tab-store.d.ts +47 -0
  27. package/dist/lib/workspace-tabs/workspace-tab-store.d.ts.map +1 -0
  28. package/dist/lib/workspace-tabs/workspace-tab-store.js +112 -0
  29. package/dist/lib/workspace-tabs/workspace-tab-store.js.map +1 -0
  30. package/dist/lib/workspace-tabs/workspace-tab-strip.component.d.ts +75 -0
  31. package/dist/lib/workspace-tabs/workspace-tab-strip.component.d.ts.map +1 -0
  32. package/dist/lib/workspace-tabs/workspace-tab-strip.component.js +252 -0
  33. package/dist/lib/workspace-tabs/workspace-tab-strip.component.js.map +1 -0
  34. package/dist/lib/workspace-tabs/workspace-tabs.types.d.ts +40 -0
  35. package/dist/lib/workspace-tabs/workspace-tabs.types.d.ts.map +1 -0
  36. package/dist/lib/workspace-tabs/workspace-tabs.types.js +13 -0
  37. package/dist/lib/workspace-tabs/workspace-tabs.types.js.map +1 -0
  38. package/dist/lib/workspace-tabs/workspace-tip.directive.d.ts +34 -0
  39. package/dist/lib/workspace-tabs/workspace-tip.directive.d.ts.map +1 -0
  40. package/dist/lib/workspace-tabs/workspace-tip.directive.js +123 -0
  41. package/dist/lib/workspace-tabs/workspace-tip.directive.js.map +1 -0
  42. package/dist/public-api.d.ts +8 -0
  43. package/dist/public-api.d.ts.map +1 -1
  44. package/dist/public-api.js +8 -0
  45. package/dist/public-api.js.map +1 -1
  46. package/package.json +14 -12
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * A single item in an `<mj-left-nav>`.
@@ -86,7 +86,12 @@ export interface MJLeftNavSection {
86
86
  * a `@media` override) so the in-flow section switcher stacks above the content
87
87
  * pane rather than competing with it for horizontal space.
88
88
  */
89
- export declare class MJLeftNavComponent {
89
+ export declare class MJLeftNavComponent implements OnDestroy {
90
+ /**
91
+ * DOM id of the `<aside>`, so the collapse toggle's `aria-expanded` can name the region it
92
+ * expands via `aria-controls`. Per-instance because a page may host more than one rail.
93
+ */
94
+ readonly NavRegionId: string;
90
95
  /**
91
96
  * The sections + items that make up the rail. Sections render top-to-bottom
92
97
  * in array order; items inside each section render in array order.
@@ -103,6 +108,140 @@ export declare class MJLeftNavComponent {
103
108
  * the rail becomes a fixed-width off-canvas drawer.
104
109
  */
105
110
  Width: number;
111
+ /**
112
+ * Set by a consumer that has visually collapsed the rail to an icons-only strip (via `Width` plus
113
+ * its own CSS hiding the labels). When true, each item gains a native `title` tooltip AND an
114
+ * `aria-label` carrying its full text.
115
+ *
116
+ * Why it is opt-in rather than always-on:
117
+ * - **Tooltip**: with labels visible, a tooltip that just repeats the label is redundant noise on
118
+ * every hover. Icon-only rails everywhere (VS Code's activity bar, Slack, Linear, Jira, Figma)
119
+ * show one; expanded rails do not.
120
+ * - **aria-label**: when the label IS visible it already names the button, and adding an identical
121
+ * aria-label is at best a no-op. When the consumer's CSS hides `.mj-left-nav__text`, the button's
122
+ * accessible name goes EMPTY — a screen reader announces "button" with no destination. That is
123
+ * the hole this closes.
124
+ *
125
+ * Leaving it false reproduces the previous markup exactly, so existing consumers are unaffected.
126
+ */
127
+ IconOnly: boolean;
128
+ /**
129
+ * Opt-in desktop collapse: renders a compact double-angle toggle chip at the top of the rail and,
130
+ * when {@link Collapsed}, presents the rail as an icons-only strip ({@link CollapsedWidth} wide) —
131
+ * labels visually hidden but kept in the a11y tree, section labels folded to divider lines,
132
+ * badges docked on the icon corner, and per-item tooltips/aria auto-enabled.
133
+ *
134
+ * The component owns the PRESENTATION only — the consumer owns the STATE (bind `[(Collapsed)]`
135
+ * and persist it however the app persists preferences), the same split as `ExpandedIds`.
136
+ * Desktop-only: ≤700px the rail is the off-canvas drawer and the toggle hides.
137
+ *
138
+ * Two things to know when the rail's content is richer than a flat icon list:
139
+ * - **Tree sections fold to their top level while collapsed** (see {@link ShowTreeStructure});
140
+ * a top-level item stands in as active for an active descendant, and the tree returns intact
141
+ * on expand. Items with no `icon` render a monogram so they stay visible and hittable.
142
+ * - **The `[header]` / `[footer]` slots are yours.** The rail can't restyle projected content,
143
+ * so a wide header (logo lockup + wordmark, a filter box) will overflow a `CollapsedWidth`
144
+ * strip. Bind the same collapsed flag in the consumer and project a compact variant.
145
+ *
146
+ * Deliberately NOT included: hover-to-peek (auto-expand on pointer hover) — removed by ruling
147
+ * (2026-07-30): a rail that expands when the pointer grazes it moves the target the user was
148
+ * aiming at. Deliberate toggling beats clever hovering.
149
+ */
150
+ Collapsible: boolean;
151
+ /** Whether the rail is currently collapsed to icons. Two-way bindable via `[(Collapsed)]`. */
152
+ Collapsed: boolean;
153
+ /** Emitted when the user clicks the collapse toggle. Consumer updates + persists the state. */
154
+ CollapsedChange: EventEmitter<boolean>;
155
+ /**
156
+ * Width of the collapsed icons-only strip. The default 60 is derived from the rail's own
157
+ * numbers — 8+8 container padding, 12+12 item padding, 18px icon, 1px border — so icons stay
158
+ * centred; retune it if those change.
159
+ */
160
+ CollapsedWidth: number;
161
+ /**
162
+ * True below the 701px breakpoint, where the rail stops being a rail and becomes the off-canvas
163
+ * drawer. Tracked in TS — not just CSS — because collapse is more than styling: it also decides
164
+ * whether tree sections fold and whether items are named by tooltip. The collapsed STYLES are
165
+ * gated to ≥701px, so without this the drawer would keep the collapsed BEHAVIOR while showing
166
+ * full labels: a flattened tree, and a monogram beside the very label it stands in for.
167
+ *
168
+ * Mirrors the matchMedia pattern in `mj-filter-popover` (same package).
169
+ */
170
+ private isMobileViewport;
171
+ private readonly zone;
172
+ private readonly cdr;
173
+ private readonly mediaQuery;
174
+ private readonly onMediaChange;
175
+ constructor();
176
+ ngOnDestroy(): void;
177
+ /**
178
+ * Whether the rail is collapsed *and* in a viewport where collapse means anything. Below 701px
179
+ * the rail is the off-canvas drawer — already dismissable, already showing full labels — so a
180
+ * persisted `Collapsed = true` must not follow the user down there.
181
+ */
182
+ get IsNativelyCollapsed(): boolean;
183
+ /** The width the rail actually renders at, honoring the collapse state. */
184
+ get EffectiveWidth(): number;
185
+ /**
186
+ * Icon-only presentation is on when the consumer forces it OR the rail is natively collapsed.
187
+ *
188
+ * `IconOnly` is deliberately NOT viewport-gated: that flag means the CONSUMER's own CSS has
189
+ * narrowed the rail, and we can't know which breakpoints they gated it to. Withdrawing the
190
+ * accessible names on their behalf could leave a genuinely icons-only rail unnamed — the exact
191
+ * hole `IconOnly` exists to close. Native collapse is ours to gate; theirs is theirs.
192
+ */
193
+ get EffectiveIconOnly(): boolean;
194
+ /**
195
+ * Whether tree structure (chevrons, depth indentation, expanded children) renders at all.
196
+ *
197
+ * An icons-only rail is ~60px wide and shows nothing but a centred glyph per row, which leaves a
198
+ * tree with no way to express itself: the chevron would eat a third of the width and shove the
199
+ * icon off-centre, each depth level would push its icon 14px further right until the rail clipped
200
+ * it, and a child's icon (optional, and usually absent on tree leaves) would say nothing about
201
+ * which branch it belongs to. So while icons-only, each section renders its TOP-LEVEL items only —
202
+ * the same choice every icon rail makes (VS Code's activity bar shows one icon per container and
203
+ * defers the tree to the expanded pane).
204
+ *
205
+ * Nothing is lost on the way back: `ExpandedIds` is consumer-owned and untouched here, so the tree
206
+ * returns exactly as the user left it the moment the rail expands.
207
+ */
208
+ get ShowTreeStructure(): boolean;
209
+ /**
210
+ * Whether an item paints as active. Normally an exact {@link ActiveId} match — but while the tree
211
+ * is suppressed (see {@link ShowTreeStructure}) the active item may be a child that isn't rendered,
212
+ * which would leave the collapsed rail with NOTHING highlighted and no sense of place. In that
213
+ * state a top-level item stands in for its active descendant.
214
+ */
215
+ IsItemActive(item: MJLeftNavItem): boolean;
216
+ /**
217
+ * `'page'` for the active item itself; `'true'` for a stand-in ancestor, which is current in the
218
+ * set but is not the page the user is on. Distinguishing them keeps the announcement honest.
219
+ */
220
+ AriaCurrentFor(item: MJLeftNavItem): 'page' | 'true' | null;
221
+ private hasActiveDescendant;
222
+ /**
223
+ * Monogram for an icon-less item in an icons-only rail. `Array.from` rather than `charAt` so a
224
+ * label starting with an emoji or an astral character yields that whole character instead of half
225
+ * a surrogate pair. Falls back to a bullet for a blank label so the button is never empty.
226
+ */
227
+ ItemInitial(item: MJLeftNavItem): string;
228
+ /**
229
+ * Left margin that pins the toggle chip at the collapsed band's centre in BOTH modes, so the
230
+ * chip never relocates on toggle (the user never re-aims). Derived, not magic:
231
+ * (CollapsedWidth − 38px chip)/2 from the rail edge, minus the rail's 8px container padding.
232
+ * 38 = the 18px icon box + 2×10px chip padding.
233
+ */
234
+ get CollapseToggleMarginPx(): number;
235
+ /** Reflects the collapsed state onto the host so the collapsed CSS can scope to it. */
236
+ get isCollapsedHost(): boolean;
237
+ /** Flip + announce. The consumer receives the new value and persists it. */
238
+ ToggleCollapsed(): void;
239
+ /**
240
+ * The text surfaced as an icon-only item's tooltip / accessible name. Folds in the description and
241
+ * badge because collapsing the rail hides both: the badge survives as an unlabeled corner count,
242
+ * so "Batch approvals (2)" is the only place a hovering user learns what the 2 counts.
243
+ */
244
+ ItemTooltip(item: MJLeftNavItem): string;
106
245
  /**
107
246
  * Label shown on the mobile drawer header and used as the switcher fallback
108
247
  * label when no item is active. Defaults to `'Menu'`. Set to something
@@ -159,6 +298,6 @@ export declare class MJLeftNavComponent {
159
298
  */
160
299
  HasExpandableItems(items: MJLeftNavItem[]): boolean;
161
300
  static ɵfac: i0.ɵɵFactoryDeclaration<MJLeftNavComponent, never>;
162
- static ɵcmp: i0.ɵɵComponentDeclaration<MJLeftNavComponent, "mj-left-nav", never, { "Sections": { "alias": "Sections"; "required": false; }; "ActiveId": { "alias": "ActiveId"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "MobileTitle": { "alias": "MobileTitle"; "required": false; }; "ExpandedIds": { "alias": "ExpandedIds"; "required": false; }; }, { "ItemClicked": "ItemClicked"; "ItemToggled": "ItemToggled"; }, never, ["[header]", "[footer]"], true, never>;
301
+ static ɵcmp: i0.ɵɵComponentDeclaration<MJLeftNavComponent, "mj-left-nav", never, { "Sections": { "alias": "Sections"; "required": false; }; "ActiveId": { "alias": "ActiveId"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "IconOnly": { "alias": "IconOnly"; "required": false; }; "Collapsible": { "alias": "Collapsible"; "required": false; }; "Collapsed": { "alias": "Collapsed"; "required": false; }; "CollapsedWidth": { "alias": "CollapsedWidth"; "required": false; }; "MobileTitle": { "alias": "MobileTitle"; "required": false; }; "ExpandedIds": { "alias": "ExpandedIds"; "required": false; }; }, { "CollapsedChange": "CollapsedChange"; "ItemClicked": "ItemClicked"; "ItemToggled": "ItemToggled"; }, never, ["[header]", "[footer]"], true, never>;
163
302
  }
164
303
  //# sourceMappingURL=left-nav.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"left-nav.component.d.ts","sourceRoot":"","sources":["../../../src/lib/left-nav/left-nav.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAA4C,MAAM,eAAe,CAAC;;AAGlG;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBA8ba,kBAAkB;IAC7B;;;OAGG;IACM,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAE3C;;;OAGG;IACM,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC;;;;OAIG;IACM,KAAK,EAA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