fold-ng 0.2.1 → 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/CHANGELOG.md +125 -1
- package/README.md +127 -49
- package/fesm2022/fold-ng.mjs +561 -124
- package/fesm2022/fold-ng.mjs.map +1 -1
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/tokens/primitives.css +19 -0
- package/tokens/scales.css +19 -0
- package/tokens/semantic.css +238 -0
- package/types/fold-ng.d.ts +401 -91
- package/types/fold-ng.d.ts.map +1 -1
package/types/fold-ng.d.ts
CHANGED
|
@@ -238,11 +238,17 @@ type FoldAvatarRingStyle = "solid" | "dotted";
|
|
|
238
238
|
* (so the same seed is the same colour everywhere, and one `registry.use(...)`
|
|
239
239
|
* recolours every avatar).
|
|
240
240
|
*
|
|
241
|
+
* A broken `imageUrl` falls back to the initials rather than the browser's
|
|
242
|
+
* broken-image glyph (and retries when the URL changes).
|
|
243
|
+
*
|
|
241
244
|
* Three orthogonal state axes compose: `variant` (fill), `muted` (presence —
|
|
242
245
|
* dim for an absence/inactive person), and `ring` + `ringStyle` (a status
|
|
243
246
|
* outline). The component stays domain-agnostic: a screen maps its own states
|
|
244
247
|
* (e.g. absent → `[muted]`, a scheduled arrival → `ring="accent"`
|
|
245
|
-
* `ringStyle="dotted"`), the avatar just draws the primitives.
|
|
248
|
+
* `ringStyle="dotted"`), the avatar just draws the primitives. The ring is a
|
|
249
|
+
* redundant emphasis cue — never the sole carrier of a state — because on a
|
|
250
|
+
* light page a soft status hue (amber/green) can't clear WCAG 3:1 as a thin
|
|
251
|
+
* line (status-ring-contrast.spec.ts).
|
|
246
252
|
*
|
|
247
253
|
* ## Inputs
|
|
248
254
|
*
|
|
@@ -253,12 +259,19 @@ type FoldAvatarRingStyle = "solid" | "dotted";
|
|
|
253
259
|
* | `colorSeed` | `string` | `name` | String used to pick the deterministic colour. |
|
|
254
260
|
* | `variant` | `'solid' \| 'ghost'` | `'solid'` | `'ghost'` renders a dashed border (for guests). |
|
|
255
261
|
* | `square` | `boolean` | `false` | Square shape with a small radius (for orgs). |
|
|
256
|
-
* | `imageUrl` | `string` | — | Image/logo URL. Replaces initials when set.
|
|
262
|
+
* | `imageUrl` | `string` | — | Image/logo URL. Replaces initials when set; falls back to initials if it fails to load. |
|
|
257
263
|
* | `muted` | `boolean` | `false` | Dim the avatar (same hue, less intense) — absence / inactive. |
|
|
258
264
|
* | `ring` | `FoldAvatarRing` | `'none'` | A status outline (`accent`/`info`/`warning`/`alert`/`success`). |
|
|
259
265
|
* | `ringStyle` | `'solid' \| 'dotted'` | `'solid'` | Ring line style — `dotted` for scheduled/tentative states. |
|
|
260
266
|
*
|
|
261
267
|
* @selector `fold-avatar`
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```html
|
|
271
|
+
* <fold-avatar name="Clément Aubry" size="lg" />
|
|
272
|
+
* <fold-avatar name="Léa Petit" ring="accent" ringStyle="dotted" />
|
|
273
|
+
* <fold-avatar name="Acme Corp" square imageUrl="/logo.svg" />
|
|
274
|
+
* ```
|
|
262
275
|
*/
|
|
263
276
|
declare class FoldAvatarComponent {
|
|
264
277
|
private readonly palette;
|
|
@@ -274,7 +287,14 @@ declare class FoldAvatarComponent {
|
|
|
274
287
|
readonly ring: _angular_core.InputSignal<FoldAvatarRing>;
|
|
275
288
|
/** Ring line style — `'dotted'` for scheduled / tentative states. */
|
|
276
289
|
readonly ringStyle: _angular_core.InputSignal<FoldAvatarRingStyle>;
|
|
277
|
-
/**
|
|
290
|
+
/** True once the `<img>` fails to load. Resets whenever `imageUrl` changes,
|
|
291
|
+
* so a corrected URL is retried rather than staying on the fallback. */
|
|
292
|
+
protected readonly imageFailed: _angular_core.WritableSignal<boolean>;
|
|
293
|
+
/** Show the image only when a URL is set AND it has not failed — a broken URL
|
|
294
|
+
* falls back to the initials instead of the browser's broken-image glyph. */
|
|
295
|
+
protected readonly showImage: _angular_core.Signal<boolean>;
|
|
296
|
+
/** Readable ink for the initials — the higher-contrast of dark/light ink on
|
|
297
|
+
* the fill, so a custom palette stays legible. */
|
|
278
298
|
protected readonly onColor: _angular_core.Signal<string>;
|
|
279
299
|
readonly initials: _angular_core.Signal<string>;
|
|
280
300
|
/** Deterministic fill from the active palette (via the shared registry). */
|
|
@@ -308,6 +328,12 @@ declare class FoldAvatarComponent {
|
|
|
308
328
|
* | `ringStyle` | `'solid' \| 'dotted'` | `'solid'` | Ring line style (`dotted` = scheduled). |
|
|
309
329
|
*
|
|
310
330
|
* @selector `fold-avatar-detail`
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```html
|
|
334
|
+
* <fold-avatar-detail primary="Alex Rivers" secondary="alex@sh3pherd.dev" />
|
|
335
|
+
* <fold-avatar-detail primary="Acme Corp" secondary="Organisation" square />
|
|
336
|
+
* ```
|
|
311
337
|
*/
|
|
312
338
|
declare class FoldAvatarDetailComponent {
|
|
313
339
|
readonly primary: _angular_core.InputSignal<string>;
|
|
@@ -821,6 +847,9 @@ declare class FoldToggleIconComponent {
|
|
|
821
847
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldToggleIconComponent, "fold-toggle-icon", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; "toggled": "toggled"; }, never, never, true, never>;
|
|
822
848
|
}
|
|
823
849
|
|
|
850
|
+
/** Which band(s) carry a chrome treatment (a separator hairline or a raised
|
|
851
|
+
* tint): neither, just the header, just the footer, or both. */
|
|
852
|
+
type FoldCardBandChrome = "none" | "header" | "footer" | "both";
|
|
824
853
|
/**
|
|
825
854
|
* `<fold-card>` — the canonical raised content surface: a solid
|
|
826
855
|
* `surface-card` background, a hairline border and a consistent radius. Use it
|
|
@@ -829,14 +858,19 @@ declare class FoldToggleIconComponent {
|
|
|
829
858
|
*
|
|
830
859
|
* - `surface` — `card` (the raised card tint, default) · `sunken` (a deeper
|
|
831
860
|
* surface for large containers, below the card — the ref's second card tint;
|
|
832
|
-
* pairs with a fainter `border-subtle` hairline)
|
|
861
|
+
* pairs with a fainter `border-subtle` hairline) · `accent` (an accent-filled
|
|
862
|
+
* card whose content sub-tree auto-inverts to a compatible on-accent palette).
|
|
833
863
|
* - `radius` — `lg` (14px, default) · `md` · `sm`.
|
|
834
864
|
* - `padding` — `md` (16px, default) · `none` · `sm` · `lg`. Sets the *body*
|
|
835
865
|
* padding; override with a custom value via `--fold-card-padding`.
|
|
836
|
-
* - `interactive` —
|
|
837
|
-
* - `separators` —
|
|
838
|
-
*
|
|
839
|
-
*
|
|
866
|
+
* - `interactive` — makes the whole card a clickable control (see below).
|
|
867
|
+
* - `separators` — which bands get a hairline against the body:
|
|
868
|
+
* `none` (default) · `header` · `footer` · `both`.
|
|
869
|
+
* - `raisedBands` — which bands are tinted a step above the surface (fainter on
|
|
870
|
+
* `sunken`): `none` (default) · `header` · `footer` · `both`.
|
|
871
|
+
*
|
|
872
|
+
* `separators` and `raisedBands` are per-band and independent axes, so a card can
|
|
873
|
+
* have (say) a raised, un-separated header over a flush footer.
|
|
840
874
|
*
|
|
841
875
|
* Content projection:
|
|
842
876
|
* - default slot → the card body.
|
|
@@ -848,10 +882,18 @@ declare class FoldToggleIconComponent {
|
|
|
848
882
|
* never pads. So the content padding is identical whether or not the bands show —
|
|
849
883
|
* toggling a header/footer never shifts the body.
|
|
850
884
|
*
|
|
885
|
+
* **Interactive cards.** `interactive` turns the whole card into a real control:
|
|
886
|
+
* the host gains `role="button"`, `tabindex="0"`, a focus ring and a hover lift,
|
|
887
|
+
* and Enter / Space (or a click) emit `(activated)`. Give it an accessible name
|
|
888
|
+
* with `ariaLabel` when the card's text isn't a sufficient label.
|
|
889
|
+
* A `role="button"` must not wrap other interactive controls — so an interactive
|
|
890
|
+
* card must NOT contain buttons/links. For a card with its own inner actions,
|
|
891
|
+
* keep it non-interactive and put a single primary `<a>`/`<button>` inside.
|
|
892
|
+
*
|
|
851
893
|
* ```html
|
|
852
894
|
* <fold-card>Static content</fold-card>
|
|
853
895
|
* <fold-card surface="sunken" padding="lg">Deep container</fold-card>
|
|
854
|
-
* <fold-card separators>
|
|
896
|
+
* <fold-card separators="both">
|
|
855
897
|
* <h3 cardHeader>Title</h3>
|
|
856
898
|
* Body content
|
|
857
899
|
* <div cardFooter>Actions</div>
|
|
@@ -863,24 +905,49 @@ declare class FoldToggleIconComponent {
|
|
|
863
905
|
* (default `clip`) lets content escape the rounded corners.
|
|
864
906
|
*
|
|
865
907
|
* @selector `fold-card`
|
|
908
|
+
*
|
|
909
|
+
* @example
|
|
910
|
+
* ```html
|
|
911
|
+
* <fold-card interactive ariaLabel="Open Acme Records" (activated)="open()">
|
|
912
|
+
* <h3>Acme Records</h3>
|
|
913
|
+
* <p>128 contracts · 96 active</p>
|
|
914
|
+
* </fold-card>
|
|
915
|
+
* ```
|
|
866
916
|
*/
|
|
867
917
|
declare class FoldCardComponent {
|
|
868
|
-
/** Surface tint — `card` (raised, default)
|
|
869
|
-
|
|
918
|
+
/** Surface tint — `card` (raised, default), `sunken` (deeper container), or
|
|
919
|
+
* `accent` (an **accent-filled** card: the accent colour as ground, with the
|
|
920
|
+
* whole content sub-tree auto-inverted to a compatible on-accent role-set —
|
|
921
|
+
* text, borders, band gradation, and even nested buttons/links/icon-tiles
|
|
922
|
+
* convert automatically). Use it to make a card in a grid stand out. */
|
|
923
|
+
readonly surface: _angular_core.InputSignal<"accent" | "card" | "sunken">;
|
|
870
924
|
/** Corner radius — `lg` (default), `md`, or `sm`. */
|
|
871
925
|
readonly radius: _angular_core.InputSignal<"sm" | "md" | "lg">;
|
|
872
926
|
/** Body padding — `md` (default), `none`, `sm`, or `lg`; a custom value can be
|
|
873
927
|
* set with the `--fold-card-padding` CSS variable. */
|
|
874
928
|
readonly padding: _angular_core.InputSignal<"none" | "sm" | "md" | "lg">;
|
|
875
|
-
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
readonly
|
|
879
|
-
/**
|
|
880
|
-
|
|
881
|
-
|
|
929
|
+
/** Make the whole card a clickable control: `role="button"` + `tabindex`, a
|
|
930
|
+
* focus ring, a hover lift, and Enter/Space/click → `(activated)`. Must not
|
|
931
|
+
* wrap other interactive controls (see the class docs). */
|
|
932
|
+
readonly interactive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
933
|
+
/** Accessible name for the interactive card, when its content isn't enough. */
|
|
934
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
935
|
+
/** Which bands get a hairline against the body — `none` (default), `header`,
|
|
936
|
+
* `footer`, or `both`. */
|
|
937
|
+
readonly separators: _angular_core.InputSignal<FoldCardBandChrome>;
|
|
938
|
+
/** Which bands are lifted with a subtle raised tint over the card surface
|
|
939
|
+
* (fainter on `sunken`) — `none` (default), `header`, `footer`, or `both`. */
|
|
940
|
+
readonly raisedBands: _angular_core.InputSignal<FoldCardBandChrome>;
|
|
941
|
+
/** Fires when an `interactive` card is activated (click, Enter, or Space). */
|
|
942
|
+
readonly activated: _angular_core.OutputEmitterRef<Event>;
|
|
943
|
+
/** Whether a per-band chrome value applies to the given band. */
|
|
944
|
+
protected hasBand(value: FoldCardBandChrome, band: "header" | "footer"): boolean;
|
|
945
|
+
protected onActivate(event: Event): void;
|
|
946
|
+
/** Enter/Space activate the card, matching the native button keyboard contract
|
|
947
|
+
* (Space is prevented from scrolling the page). */
|
|
948
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
882
949
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCardComponent, never>;
|
|
883
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCardComponent, "fold-card", never, { "surface": { "alias": "surface"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "raisedBands": { "alias": "raisedBands"; "required": false; "isSignal": true; }; }, {}, never, ["[cardHeader]", "*", "[cardFooter]"], true, never>;
|
|
950
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCardComponent, "fold-card", never, { "surface": { "alias": "surface"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "raisedBands": { "alias": "raisedBands"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[cardHeader]", "*", "[cardFooter]"], true, never>;
|
|
884
951
|
}
|
|
885
952
|
|
|
886
953
|
/**
|
|
@@ -1117,6 +1184,9 @@ declare class FoldFieldComponent {
|
|
|
1117
1184
|
* - `tone` — `accent` (default, brand link) · `muted` (secondary).
|
|
1118
1185
|
* - `icon` / `trailingIcon` — optional glyphs around the label.
|
|
1119
1186
|
* - `disabled` — button mode only.
|
|
1187
|
+
* - `target` / `rel` — anchor mode only. Setting `target="_blank"` auto-applies
|
|
1188
|
+
* `rel="noopener noreferrer"` (safe by default); override with an explicit
|
|
1189
|
+
* `rel`.
|
|
1120
1190
|
*
|
|
1121
1191
|
* @selector `fold-link`
|
|
1122
1192
|
*
|
|
@@ -1125,7 +1195,9 @@ declare class FoldFieldComponent {
|
|
|
1125
1195
|
* <fold-link icon="company" trailingIcon="chevron-right" (clicked)="openOrg()">
|
|
1126
1196
|
* Voir l'organigramme
|
|
1127
1197
|
* </fold-link>
|
|
1128
|
-
* <fold-link href="https://sh3pherd.dev/docs" tone="muted">
|
|
1198
|
+
* <fold-link href="https://sh3pherd.dev/docs" target="_blank" tone="muted">
|
|
1199
|
+
* Documentation
|
|
1200
|
+
* </fold-link>
|
|
1129
1201
|
* ```
|
|
1130
1202
|
*/
|
|
1131
1203
|
declare class FoldLinkComponent {
|
|
@@ -1137,12 +1209,19 @@ declare class FoldLinkComponent {
|
|
|
1137
1209
|
readonly tone: _angular_core.InputSignal<"accent" | "muted">;
|
|
1138
1210
|
/** When set, the link renders as an `<a href>` instead of a button. */
|
|
1139
1211
|
readonly href: _angular_core.InputSignal<string | undefined>;
|
|
1212
|
+
/** Anchor target (e.g. `_blank`). Anchor mode only. */
|
|
1213
|
+
readonly target: _angular_core.InputSignal<string | undefined>;
|
|
1214
|
+
/** Anchor `rel`. Anchor mode only. Defaults to `noopener noreferrer` when
|
|
1215
|
+
* `target="_blank"`; set explicitly to override. */
|
|
1216
|
+
readonly rel: _angular_core.InputSignal<string | undefined>;
|
|
1140
1217
|
/** Disable the button form (no effect on the `href` form). */
|
|
1141
1218
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1142
|
-
/** Fires on click in the button form
|
|
1143
|
-
readonly clicked: _angular_core.OutputEmitterRef<
|
|
1219
|
+
/** Fires on click in the button form; carries the `MouseEvent`. */
|
|
1220
|
+
readonly clicked: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
1221
|
+
/** Resolved `rel` — the explicit value, or a safe default for a new tab. */
|
|
1222
|
+
protected readonly resolvedRel: _angular_core.Signal<string | null>;
|
|
1144
1223
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldLinkComponent, never>;
|
|
1145
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldLinkComponent, "fold-link", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
1224
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldLinkComponent, "fold-link", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
1146
1225
|
}
|
|
1147
1226
|
|
|
1148
1227
|
/**
|
|
@@ -1918,10 +1997,12 @@ declare function observeElementWidth(element?: ElementRef<HTMLElement> | HTMLEle
|
|
|
1918
1997
|
|
|
1919
1998
|
/**
|
|
1920
1999
|
* A named surface — the ground a subtree paints itself on. `page` is the
|
|
1921
|
-
* document body; `chrome` is application furniture (rails, header) that a
|
|
1922
|
-
*
|
|
2000
|
+
* document body; `chrome` is application furniture (rails, header) that a theme
|
|
2001
|
+
* may colour differently from the page; `accent` is an **auto-inverting** region
|
|
2002
|
+
* filled with the brand accent, whose content re-points to a compatible
|
|
2003
|
+
* on-accent palette (see the `[data-surface="accent"]` block in `semantic.css`).
|
|
1923
2004
|
*/
|
|
1924
|
-
type FoldSurfaceName = "page" | "chrome";
|
|
2005
|
+
type FoldSurfaceName = "page" | "chrome" | "accent";
|
|
1925
2006
|
/**
|
|
1926
2007
|
* `[foldSurface]` — declares the element a **named surface**, so a theme can
|
|
1927
2008
|
* re-colour it without knowing anything about the component it lives in.
|
|
@@ -2954,7 +3035,21 @@ declare class FoldAsideLayoutComponent {
|
|
|
2954
3035
|
}
|
|
2955
3036
|
|
|
2956
3037
|
/**
|
|
2957
|
-
*
|
|
3038
|
+
* The slice of a {@link FoldNavLayoutComponent} that a projected bar reads to
|
|
3039
|
+
* follow the layout — exposed through DI so a `fold-view-nav` / `fold-tabs` with
|
|
3040
|
+
* `direction="auto"` orients itself without the consumer wiring `tl.stacked()`.
|
|
3041
|
+
*/
|
|
3042
|
+
interface FoldNavLayoutContext {
|
|
3043
|
+
/**
|
|
3044
|
+
* True when the layout currently stacks the bar **above** the content (a `top`
|
|
3045
|
+
* placement, or a `side` rail that has folded) — i.e. the bar should be
|
|
3046
|
+
* horizontal. False when it sits as a vertical rail beside the content.
|
|
3047
|
+
*/
|
|
3048
|
+
readonly stacked: Signal<boolean>;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* `<fold-nav-layout>` — pairs a tab bar with the content it drives, and owns the
|
|
2958
3053
|
* one thing every tabbed page hand-rolls: where the nav sits.
|
|
2959
3054
|
*
|
|
2960
3055
|
* - `placement="top"` (default) — the nav above the content.
|
|
@@ -2962,39 +3057,62 @@ declare class FoldAsideLayoutComponent {
|
|
|
2962
3057
|
* top when the layout gets narrower than {@link foldAt} (so the menu always
|
|
2963
3058
|
* precedes the content it drives, never below it).
|
|
2964
3059
|
*
|
|
2965
|
-
* Content projection — the
|
|
2966
|
-
* - `[tabNav]` → the
|
|
2967
|
-
*
|
|
3060
|
+
* Content projection — the bar stays yours (tabs, active key, events):
|
|
3061
|
+
* - `[tabNav]` → the bar. Project a {@link FoldViewNavComponent} if the tabs
|
|
3062
|
+
* **navigate** (route between views) or a {@link FoldTabsComponent} if they
|
|
3063
|
+
* **switch panels in place** — this layout is agnostic, it only places the bar.
|
|
3064
|
+
* - default slot → the content (routed views, or the tabs' `fold-tab-panel`s).
|
|
2968
3065
|
*
|
|
2969
|
-
* **A11y
|
|
2970
|
-
*
|
|
2971
|
-
*
|
|
2972
|
-
*
|
|
2973
|
-
* roles (the tabs pattern is for panel-switching, not navigation).
|
|
3066
|
+
* **A11y lives in the bar, not here.** `fold-view-nav` brings `<nav>` +
|
|
3067
|
+
* `aria-current`; `fold-tabs` brings the full `role="tablist"` widget with its
|
|
3068
|
+
* `fold-tab-panel`s. This component adds no tab semantics — it only decides where
|
|
3069
|
+
* the bar sits and folds it responsively.
|
|
2974
3070
|
*
|
|
2975
|
-
* A side rail needs a *vertical* bar, a folded one a *horizontal* bar.
|
|
2976
|
-
*
|
|
2977
|
-
*
|
|
3071
|
+
* A side rail needs a *vertical* bar, a folded one a *horizontal* bar. The
|
|
3072
|
+
* projected bar handles that itself with `direction="auto"` (its default) — it
|
|
3073
|
+
* reads this layout through DI ({@link FoldNavLayoutContext}), no wiring:
|
|
2978
3074
|
*
|
|
2979
3075
|
* ```html
|
|
2980
|
-
* <fold-
|
|
2981
|
-
* <fold-
|
|
2982
|
-
*
|
|
2983
|
-
*
|
|
2984
|
-
*
|
|
2985
|
-
*
|
|
2986
|
-
*
|
|
2987
|
-
*
|
|
2988
|
-
*
|
|
2989
|
-
*
|
|
3076
|
+
* <fold-nav-layout placement="side">
|
|
3077
|
+
* <fold-view-nav tabNav [items]="items" />
|
|
3078
|
+
* <router-outlet />
|
|
3079
|
+
* </fold-nav-layout>
|
|
3080
|
+
* ```
|
|
3081
|
+
*
|
|
3082
|
+
* The layout also exposes {@link stacked} via `exportAs` for consumers that want
|
|
3083
|
+
* to read the folded state themselves.
|
|
3084
|
+
*
|
|
3085
|
+
* **Two roles — same component, composed differently.**
|
|
3086
|
+
* - **Page scaffold** — the tab rail *is* the page's primary structure: use it
|
|
3087
|
+
* directly (usually `placement="side"`), the folded bar leading the content.
|
|
3088
|
+
* - **Tabbed section** — a tabbed block *inside* a page, among other sections.
|
|
3089
|
+
* Don't reach for a new mode — wrap it in a {@link FoldPageSectionComponent}.
|
|
3090
|
+
* The section owns the title, the `<section>` + heading semantics, the vertical
|
|
3091
|
+
* rhythm and the optional `bleed`; tab-layout stays pure placement. It paints
|
|
3092
|
+
* nothing (no card), so it sits **flat** — add `bleed` on the section for an
|
|
3093
|
+
* edge-to-edge band. The rail folds on the **section's** width (it measures
|
|
3094
|
+
* itself), not the viewport, so nested tabs collapse on their own.
|
|
3095
|
+
*
|
|
3096
|
+
* ```html
|
|
3097
|
+
* <!-- a tabbed section: flat structure (page-section) + tab placement -->
|
|
3098
|
+
* <fold-page-section title="Settings" bleed>
|
|
3099
|
+
* <fold-nav-layout placement="side">
|
|
3100
|
+
* <fold-view-nav tabNav [items]="items" />
|
|
3101
|
+
* <app-settings-panel />
|
|
3102
|
+
* </fold-nav-layout>
|
|
3103
|
+
* </fold-page-section>
|
|
2990
3104
|
* ```
|
|
2991
3105
|
*
|
|
2992
|
-
* Sizing is CSS custom properties: `--fold-
|
|
2993
|
-
* `--fold-
|
|
3106
|
+
* Sizing is CSS custom properties: `--fold-nav-layout-gap` (16px) and
|
|
3107
|
+
* `--fold-nav-layout-rail-width` — the side-rail track, defaulting to the shared
|
|
3108
|
+
* `--fold-rail-tertiary` (200px). That's the **tertiary** step of the rail
|
|
3109
|
+
* hierarchy — the same level the `--fold-color-bg-rail-tertiary` colour names
|
|
3110
|
+
* (app menu → workspace → in-page nav) — so every rail in the app stays on one
|
|
3111
|
+
* scale. Override the local var per instance.
|
|
2994
3112
|
*
|
|
2995
|
-
* @selector `fold-
|
|
3113
|
+
* @selector `fold-nav-layout`
|
|
2996
3114
|
*/
|
|
2997
|
-
declare class
|
|
3115
|
+
declare class FoldNavLayoutComponent implements FoldNavLayoutContext {
|
|
2998
3116
|
/** Where the nav sits: above the content, or as a rail beside it. */
|
|
2999
3117
|
readonly placement: _angular_core.InputSignal<"top" | "side">;
|
|
3000
3118
|
/** Width (px) at or below which a `side` nav folds back on top. */
|
|
@@ -3018,10 +3136,28 @@ declare class FoldTabLayoutComponent {
|
|
|
3018
3136
|
* forever. A dead band wider than any scrollbar breaks that loop.
|
|
3019
3137
|
*/
|
|
3020
3138
|
private measure;
|
|
3021
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
3022
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
3139
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldNavLayoutComponent, never>;
|
|
3140
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldNavLayoutComponent, "fold-nav-layout", ["foldNavLayout"], { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "foldAt": { "alias": "foldAt"; "required": false; "isSignal": true; }; }, {}, never, ["[tabNav]", "*"], true, never>;
|
|
3023
3141
|
}
|
|
3024
3142
|
|
|
3143
|
+
/**
|
|
3144
|
+
* Marks a custom page title projected into {@link FoldPageLayoutComponent} — put
|
|
3145
|
+
* it on inline heading content when the plain `icon` + `title` inputs aren't
|
|
3146
|
+
* enough (an avatar, a two-tone title, a live status). It renders inside the
|
|
3147
|
+
* page's `<h1>`, so keep it inline and text-like. Its presence switches the
|
|
3148
|
+
* header on in place of the input-driven title.
|
|
3149
|
+
*
|
|
3150
|
+
* @example
|
|
3151
|
+
* ```html
|
|
3152
|
+
* <fold-page-layout>
|
|
3153
|
+
* <span pageTitle><fold-avatar … /> Acme Records</span>
|
|
3154
|
+
* </fold-page-layout>
|
|
3155
|
+
* ```
|
|
3156
|
+
*/
|
|
3157
|
+
declare class FoldPageTitleDirective {
|
|
3158
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldPageTitleDirective, never>;
|
|
3159
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldPageTitleDirective, "[pageTitle]", never, {}, {}, never, never, true, never>;
|
|
3160
|
+
}
|
|
3025
3161
|
/**
|
|
3026
3162
|
* `<fold-page-layout>` — the vertical scaffold for a settings/admin-style page:
|
|
3027
3163
|
* an optional `icon` + `title` header with a description slot, an optional
|
|
@@ -3043,6 +3179,10 @@ declare class FoldTabLayoutComponent {
|
|
|
3043
3179
|
*
|
|
3044
3180
|
* Content projection:
|
|
3045
3181
|
* - default slot → the page body (sections, cards, banners…).
|
|
3182
|
+
* - `[pageTitle]` ({@link FoldPageTitleDirective}) → a custom title, rendered
|
|
3183
|
+
* inside the `<h1>` in place of the `icon` + `title` inputs, for when a plain
|
|
3184
|
+
* string won't do (an avatar, a two-tone title). Its presence alone switches
|
|
3185
|
+
* the header on.
|
|
3046
3186
|
* - `[titleBadge]` → an inline pill beside the title (e.g. a status/kind badge).
|
|
3047
3187
|
* - `p[description]` → the intro under the title. A **slot**, not a string
|
|
3048
3188
|
* input: a description that needs a `<code>`, a link or a second sentence is
|
|
@@ -3071,8 +3211,11 @@ declare class FoldPageLayoutComponent {
|
|
|
3071
3211
|
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
3072
3212
|
/** An optional leading icon shown beside the title. */
|
|
3073
3213
|
readonly icon: _angular_core.InputSignal<FoldIconName | undefined>;
|
|
3214
|
+
/** A projected `[pageTitle]`, if any — switches the header on for a custom
|
|
3215
|
+
* title even without the `title` input. */
|
|
3216
|
+
protected readonly customTitle: _angular_core.Signal<FoldPageTitleDirective | undefined>;
|
|
3074
3217
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldPageLayoutComponent, never>;
|
|
3075
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldPageLayoutComponent, "fold-page-layout", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {},
|
|
3218
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldPageLayoutComponent, "fold-page-layout", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, ["customTitle"], ["[pageTitle]", "[titleBadge]", "p[description]", "[pageActions]", "*"], true, never>;
|
|
3076
3219
|
}
|
|
3077
3220
|
|
|
3078
3221
|
/**
|
|
@@ -3251,8 +3394,8 @@ declare class FoldPaginatorComponent {
|
|
|
3251
3394
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldPaginatorComponent, "fold-paginator", never, { "currentPage": { "alias": "currentPage"; "required": true; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": true; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
|
|
3252
3395
|
}
|
|
3253
3396
|
|
|
3254
|
-
type
|
|
3255
|
-
/** Unique key — identifies the
|
|
3397
|
+
type FoldViewNavItem = {
|
|
3398
|
+
/** Unique key — identifies the item and is emitted by `activeChange`. */
|
|
3256
3399
|
key: string;
|
|
3257
3400
|
/** Display label. */
|
|
3258
3401
|
label: string;
|
|
@@ -3260,55 +3403,222 @@ type FoldTabNavItem = {
|
|
|
3260
3403
|
icon?: FoldIconName;
|
|
3261
3404
|
/** Optional trailing badge (e.g. a count). `undefined`/`null` hides it. */
|
|
3262
3405
|
badge?: string | number | null;
|
|
3406
|
+
/**
|
|
3407
|
+
* Router target — makes this item a real `routerLink` `<a>`: cmd/middle-click
|
|
3408
|
+
* opens a new tab, the URL is a deep link, and the active state is driven
|
|
3409
|
+
* automatically by `routerLinkActive` (no `activeKey` needed). Accepts the
|
|
3410
|
+
* same value as `[routerLink]` — a path string or a commands array.
|
|
3411
|
+
*/
|
|
3412
|
+
link?: string | unknown[];
|
|
3413
|
+
/** External URL — renders a plain `<a href>` (no router). */
|
|
3414
|
+
href?: string;
|
|
3415
|
+
/** Disable the item: non-interactive + dimmed. */
|
|
3416
|
+
disabled?: boolean;
|
|
3263
3417
|
};
|
|
3264
3418
|
/**
|
|
3265
|
-
* `<fold-
|
|
3266
|
-
*
|
|
3419
|
+
* `<fold-view-nav>` — a **navigation** bar styled as tabs: a `<nav>` whose items
|
|
3420
|
+
* *go somewhere*. Give each item a `link` (or `href`) and it renders a real
|
|
3421
|
+
* `<a>` — so cmd/middle-click opens a new tab, the URL is a deep link, and the
|
|
3422
|
+
* active item is driven automatically by `routerLinkActive` +
|
|
3423
|
+
* `aria-current="page"`. Without a link an item is a `<button>` that emits
|
|
3424
|
+
* `activeChange` and reads its active state from `activeKey` (view switching
|
|
3425
|
+
* with no route).
|
|
3267
3426
|
*
|
|
3268
|
-
*
|
|
3269
|
-
*
|
|
3270
|
-
*
|
|
3271
|
-
*
|
|
3427
|
+
* **Navigation, not the tabs widget.** Reach for this when a tab routes / switches
|
|
3428
|
+
* views. When tabs toggle **layered panels in place** (same URL), use
|
|
3429
|
+
* {@link FoldTabsComponent} — same look, but the ARIA Tabs pattern
|
|
3430
|
+
* (`role="tablist"`, arrow keys, `tabpanel`).
|
|
3272
3431
|
*
|
|
3273
|
-
*
|
|
3432
|
+
* - `activeStyle` — `underline` (accent border) or `fill` (accent pill).
|
|
3433
|
+
* - `direction` — `auto` (default: follows a wrapping `fold-nav-layout`, else
|
|
3434
|
+
* vertical), `vertical`, or `horizontal`.
|
|
3435
|
+
*
|
|
3436
|
+
* @selector `fold-view-nav`
|
|
3274
3437
|
*
|
|
3275
3438
|
* @example
|
|
3276
3439
|
* ```html
|
|
3277
|
-
*
|
|
3278
|
-
*
|
|
3279
|
-
*
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3282
|
-
*
|
|
3283
|
-
* />
|
|
3440
|
+
* <!-- real navigation: link items, active state automatic -->
|
|
3441
|
+
* <fold-view-nav [items]="[
|
|
3442
|
+
* { key: 'members', label: 'Members', link: 'members', badge: 3 },
|
|
3443
|
+
* { key: 'settings', label: 'Settings', link: 'settings' },
|
|
3444
|
+
* ]" />
|
|
3445
|
+
* <router-outlet />
|
|
3284
3446
|
* ```
|
|
3285
3447
|
*/
|
|
3286
|
-
declare class
|
|
3287
|
-
/** The
|
|
3288
|
-
readonly
|
|
3289
|
-
/**
|
|
3448
|
+
declare class FoldViewNavComponent {
|
|
3449
|
+
/** The items to render, in order. */
|
|
3450
|
+
readonly items: _angular_core.InputSignal<FoldViewNavItem[]>;
|
|
3451
|
+
/**
|
|
3452
|
+
* The active item's `key` — for **button** items (no `link`). Link items ignore
|
|
3453
|
+
* it: their active state comes from the URL via `routerLinkActive`.
|
|
3454
|
+
*/
|
|
3290
3455
|
readonly activeKey: _angular_core.InputSignal<string>;
|
|
3291
|
-
/** How the active
|
|
3456
|
+
/** How the active item reads: accent underline, or accent fill. */
|
|
3292
3457
|
readonly activeStyle: _angular_core.InputSignal<"fill" | "underline">;
|
|
3293
|
-
/** Bar orientation (vertical auto-collapses to horizontal on mobile). */
|
|
3294
|
-
readonly direction: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
3295
3458
|
/**
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
3298
|
-
*
|
|
3299
|
-
*
|
|
3300
|
-
*
|
|
3301
|
-
|
|
3459
|
+
* Bar orientation. Defaults to `auto`: inside a `fold-nav-layout` it follows
|
|
3460
|
+
* the layout (vertical rail, horizontal once folded) with no wiring; on its
|
|
3461
|
+
* own it is `vertical` — the readable-first shape, reading as the app's
|
|
3462
|
+
* **third navigation rail** (app menu → workspace → in-page views, the
|
|
3463
|
+
* `--fold-rail-tertiary` level). Force `horizontal` for a page-level top bar.
|
|
3464
|
+
*/
|
|
3465
|
+
readonly direction: _angular_core.InputSignal<"auto" | "vertical" | "horizontal">;
|
|
3466
|
+
/**
|
|
3467
|
+
* Density — pure padding/typography:
|
|
3302
3468
|
* - `compact` (default) — inline / popover bars.
|
|
3303
3469
|
* - `comfortable` — a prominent, page-level bar.
|
|
3304
3470
|
*/
|
|
3305
|
-
readonly size: _angular_core.InputSignal<"
|
|
3306
|
-
/**
|
|
3471
|
+
readonly size: _angular_core.InputSignal<"compact" | "comfortable">;
|
|
3472
|
+
/**
|
|
3473
|
+
* Collapse the bar to icons (independent of {@link size}). **Horizontal**, an
|
|
3474
|
+
* icon accordion: every item but the active one drops to its icon, the active
|
|
3475
|
+
* one keeps its label. **Vertical**, a collapsed icon rail (like a folded
|
|
3476
|
+
* menu): every item shows just its icon, its label a hover/focus tooltip and
|
|
3477
|
+
* its count a corner bubble — narrow the layout's `--fold-nav-layout-rail-width`
|
|
3478
|
+
* to match. An item with no icon falls back to a square glyph of its label's
|
|
3479
|
+
* initial, so the rail stays icon-width whether or not items carry icons.
|
|
3480
|
+
* Toggle it from your own breakpoint when the bar is too tight.
|
|
3481
|
+
*/
|
|
3482
|
+
readonly collapsed: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
3483
|
+
/**
|
|
3484
|
+
* `transparent` (default — blends with the app, so the items read directly) or
|
|
3485
|
+
* `surface` (a filled bar that carries its own rail background).
|
|
3486
|
+
*/
|
|
3307
3487
|
readonly background: _angular_core.InputSignal<"transparent" | "surface">;
|
|
3308
|
-
/** Emits the `key` of
|
|
3488
|
+
/** Emits the `key` of a clicked **button** item (link items just navigate). */
|
|
3489
|
+
readonly activeChange: _angular_core.OutputEmitterRef<string>;
|
|
3490
|
+
/** The nearest layout, if any — lets `direction="auto"` follow it. */
|
|
3491
|
+
private readonly layout;
|
|
3492
|
+
/** `direction` with `auto` resolved against the wrapping layout. */
|
|
3493
|
+
protected readonly resolvedDirection: _angular_core.Signal<"vertical" | "horizontal">;
|
|
3494
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldViewNavComponent, never>;
|
|
3495
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldViewNavComponent, "fold-view-nav", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "activeKey": { "alias": "activeKey"; "required": false; "isSignal": true; }; "activeStyle": { "alias": "activeStyle"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
/** A tab in a {@link FoldTabsComponent} bar. */
|
|
3499
|
+
type FoldTabItem = {
|
|
3500
|
+
/** Unique key — identifies the tab / its panel, emitted on change. */
|
|
3501
|
+
key: string;
|
|
3502
|
+
/** Display label. */
|
|
3503
|
+
label: string;
|
|
3504
|
+
/** Optional leading icon. */
|
|
3505
|
+
icon?: FoldIconName;
|
|
3506
|
+
/** Optional trailing count badge. `undefined`/`null` hides it. */
|
|
3507
|
+
badge?: string | number | null;
|
|
3508
|
+
};
|
|
3509
|
+
/**
|
|
3510
|
+
* The read side a {@link FoldTabPanelComponent} needs to wire itself to a tab —
|
|
3511
|
+
* exposed by `fold-tabs` via `exportAs="foldTabs"`. Decouples the panel from the
|
|
3512
|
+
* concrete component.
|
|
3513
|
+
*/
|
|
3514
|
+
interface FoldTabsContext {
|
|
3515
|
+
/** The active tab's key. */
|
|
3516
|
+
activeKey(): string;
|
|
3517
|
+
/** The DOM id of the tab for `key` (a panel's `aria-labelledby`). */
|
|
3518
|
+
tabId(key: string): string;
|
|
3519
|
+
/** The DOM id of the panel for `key` (a tab's `aria-controls`). */
|
|
3520
|
+
panelId(key: string): string;
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* `<fold-tabs>` — the **in-page tabs widget** (the ARIA Tabs pattern): a
|
|
3524
|
+
* `role="tablist"` of `role="tab"` buttons that switch layered panels **without
|
|
3525
|
+
* navigating**. Arrow keys move between tabs (roving tabindex — only the active
|
|
3526
|
+
* tab is in the Tab order), `Home`/`End` jump to the ends, and each tab is wired
|
|
3527
|
+
* to its panel via `aria-controls` ↔ `aria-labelledby`.
|
|
3528
|
+
*
|
|
3529
|
+
* Pair it with one {@link FoldTabPanelComponent} per key, handed the bar via a
|
|
3530
|
+
* template ref so the two coordinate across slots (e.g. inside a
|
|
3531
|
+
* `fold-nav-layout`). Same visual as {@link FoldViewNavComponent}; the
|
|
3532
|
+
* difference is **semantics** — use `fold-tabs` for in-page panel switching, and
|
|
3533
|
+
* `fold-view-nav` when the tabs actually navigate (route) between views.
|
|
3534
|
+
*
|
|
3535
|
+
* ```html
|
|
3536
|
+
* <fold-nav-layout>
|
|
3537
|
+
* <fold-tabs
|
|
3538
|
+
* nav
|
|
3539
|
+
* #t="foldTabs"
|
|
3540
|
+
* [tabs]="tabs"
|
|
3541
|
+
* [activeKey]="tab()"
|
|
3542
|
+
* (tabChange)="tab.set($event)"
|
|
3543
|
+
* />
|
|
3544
|
+
* <fold-tab-panel [tabs]="t" key="overview">…</fold-tab-panel>
|
|
3545
|
+
* <fold-tab-panel [tabs]="t" key="settings">…</fold-tab-panel>
|
|
3546
|
+
* </fold-nav-layout>
|
|
3547
|
+
* ```
|
|
3548
|
+
*
|
|
3549
|
+
* Same visual knobs as `fold-view-nav` (`activeStyle` · `direction` · `size` ·
|
|
3550
|
+
* `background`). Sizing shares the tab-bar tokens.
|
|
3551
|
+
*
|
|
3552
|
+
* @selector `fold-tabs`
|
|
3553
|
+
*/
|
|
3554
|
+
declare class FoldTabsComponent implements FoldTabsContext {
|
|
3555
|
+
/** The tabs to render, in order. */
|
|
3556
|
+
readonly tabs: _angular_core.InputSignal<FoldTabItem[]>;
|
|
3557
|
+
/** The `key` of the active tab (the shown panel). */
|
|
3558
|
+
readonly activeKey: _angular_core.InputSignal<string>;
|
|
3559
|
+
/** How the active tab reads: accent underline, or accent fill. */
|
|
3560
|
+
readonly activeStyle: _angular_core.InputSignal<"fill" | "underline">;
|
|
3561
|
+
/**
|
|
3562
|
+
* Bar orientation (drives `aria-orientation`). Defaults to `auto`: follows a
|
|
3563
|
+
* wrapping `fold-nav-layout`, else `horizontal`.
|
|
3564
|
+
*/
|
|
3565
|
+
readonly direction: _angular_core.InputSignal<"auto" | "vertical" | "horizontal">;
|
|
3566
|
+
/** Density — see {@link FoldViewNavComponent} for the same scale. */
|
|
3567
|
+
readonly size: _angular_core.InputSignal<"compact" | "comfortable">;
|
|
3568
|
+
/** Collapse to icons — see {@link FoldViewNavComponent.collapsed}. */
|
|
3569
|
+
readonly collapsed: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
3570
|
+
/** `surface` (filled bar, default) or `transparent`. */
|
|
3571
|
+
readonly background: _angular_core.InputSignal<"transparent" | "surface">;
|
|
3572
|
+
/** Emits the newly-selected tab's `key`. */
|
|
3309
3573
|
readonly tabChange: _angular_core.OutputEmitterRef<string>;
|
|
3310
|
-
|
|
3311
|
-
|
|
3574
|
+
/** The nearest layout, if any — lets `direction="auto"` follow it. */
|
|
3575
|
+
private readonly layout;
|
|
3576
|
+
/** `direction` with `auto` resolved against the wrapping layout. */
|
|
3577
|
+
protected readonly resolvedDirection: _angular_core.Signal<"vertical" | "horizontal">;
|
|
3578
|
+
/** Per-instance id root, so ids are unique + stable across SSR. */
|
|
3579
|
+
private readonly uid;
|
|
3580
|
+
private readonly tabButtons;
|
|
3581
|
+
tabId(key: string): string;
|
|
3582
|
+
panelId(key: string): string;
|
|
3583
|
+
protected select(key: string): void;
|
|
3584
|
+
/**
|
|
3585
|
+
* Roving-tabindex keyboard model (APG Tabs, automatic activation): arrows move
|
|
3586
|
+
* — and select — the adjacent tab, `Home`/`End` the ends. Both axes work, so
|
|
3587
|
+
* it stays correct whether the bar is horizontal, vertical, or a
|
|
3588
|
+
* mobile-collapsed vertical.
|
|
3589
|
+
*/
|
|
3590
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
3591
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldTabsComponent, never>;
|
|
3592
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldTabsComponent, "fold-tabs", ["foldTabs"], { "tabs": { "alias": "tabs"; "required": true; "isSignal": true; }; "activeKey": { "alias": "activeKey"; "required": true; "isSignal": true; }; "activeStyle": { "alias": "activeStyle"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; }, { "tabChange": "tabChange"; }, never, never, true, never>;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
/**
|
|
3596
|
+
* `<fold-tab-panel>` — one panel of a {@link FoldTabsComponent}. Handed the bar
|
|
3597
|
+
* via a template ref (`[tabs]="t"`, where `#t="foldTabs"`) plus its `key`, it
|
|
3598
|
+
* becomes a `role="tabpanel"` named by its tab (`aria-labelledby`), reachable by
|
|
3599
|
+
* `aria-controls` from that tab, focusable while active, and `hidden` otherwise.
|
|
3600
|
+
*
|
|
3601
|
+
* The ref pairing is what lets the tabs bar and its panels sit in **different**
|
|
3602
|
+
* slots (e.g. the bar in a `fold-nav-layout`'s nav slot, the panels in its
|
|
3603
|
+
* content) and still coordinate.
|
|
3604
|
+
*
|
|
3605
|
+
* ```html
|
|
3606
|
+
* <fold-tabs #t="foldTabs" [tabs]="tabs" [activeKey]="tab()" (tabChange)="tab.set($event)" />
|
|
3607
|
+
* <fold-tab-panel [tabs]="t" key="overview">…</fold-tab-panel>
|
|
3608
|
+
* ```
|
|
3609
|
+
*
|
|
3610
|
+
* @selector `fold-tab-panel`
|
|
3611
|
+
*/
|
|
3612
|
+
declare class FoldTabPanelComponent {
|
|
3613
|
+
/** The owning `fold-tabs`, read via its template ref (`#t="foldTabs"`). */
|
|
3614
|
+
readonly tabs: _angular_core.InputSignal<FoldTabsContext>;
|
|
3615
|
+
/** This panel's tab key — must match one tab in the bar. */
|
|
3616
|
+
readonly key: _angular_core.InputSignal<string>;
|
|
3617
|
+
protected readonly isActive: _angular_core.Signal<boolean>;
|
|
3618
|
+
protected readonly panelId: _angular_core.Signal<string>;
|
|
3619
|
+
protected readonly labelledBy: _angular_core.Signal<string>;
|
|
3620
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldTabPanelComponent, never>;
|
|
3621
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldTabPanelComponent, "fold-tab-panel", never, { "tabs": { "alias": "tabs"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3312
3622
|
}
|
|
3313
3623
|
|
|
3314
3624
|
/** The tone of a toast — drives its accent color + icon. */
|
|
@@ -3835,6 +4145,6 @@ declare class FoldPaletteRegistry {
|
|
|
3835
4145
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FoldPaletteRegistry>;
|
|
3836
4146
|
}
|
|
3837
4147
|
|
|
3838
|
-
export { FOLD_AUTO_PALETTES, FOLD_BLUR_TOKENS, FOLD_BUILTIN_ICONS, FOLD_MOTION_TOKENS, FOLD_PALETTE_DEFAULT, FOLD_PANEL_CLOSE_LABEL, FOLD_RADIUS_TOKENS, FOLD_SEMANTIC_COLOR_TOKENS, FOLD_SHADOW_TOKENS, FOLD_SPACE_TOKENS, FOLD_TEXT_TOKENS, FOLD_TOAST_CONFIG, FoldAppShellComponent, FoldAsideLayoutComponent, FoldAvatarComponent, FoldAvatarDetailComponent, FoldAvatarListComponent, FoldBadgeComponent, FoldButtonComponent, FoldButtonIconComponent, FoldCalloutComponent, FoldCardComponent, FoldChoiceRowComponent, FoldContextCardComponent, FoldDataTableCellDirective, FoldDataTableComponent, FoldDisclosureComponent, FoldElementTitleComponent, FoldElevatedDirective, FoldEmptyStateComponent, FoldFieldComponent, FoldFieldIdDirective, FoldFieldListComponent, FoldFileDropzoneComponent, FoldHeroCardComponent, FoldHeroSectionComponent, FoldIconComponent, FoldIconRegistry, FoldIdService, FoldInputComponent, FoldLinkComponent, FoldLoadingStateComponent, FoldMenuComponent, FoldMenuItemComponent, FoldMenuSectionComponent, FoldMenuSeparatorComponent, FoldNavLauncherComponent, FoldNavTileComponent, FoldNumberInputComponent, FoldPageLayoutComponent, FoldPageSectionComponent, FoldPaginatorComponent, FoldPaletteRegistry, FoldPanelComponentOutletDirective, FoldPanelHeaderComponent, FoldPanelHostComponent, FoldPanelHostService, FoldPanelRef, FoldPanelToggle, FoldRangeSliderComponent, FoldRepeatPressDirective, FoldSearchComponent, FoldSelectComponent, FoldSliderComponent, FoldSpinnerComponent, FoldStatusBadgeComponent, FoldStickyColumnDirective, FoldSurfaceDirective,
|
|
3839
|
-
export type { FoldAutoPaletteName, FoldAvatarListItem, FoldAvatarRing, FoldAvatarRingStyle, FoldAvatarVariant, FoldBadgeVariant, FoldBlurToken, FoldBuiltinIconName, FoldButtonEmphasis, FoldButtonIconShape, FoldButtonIconSize, FoldButtonIconTone, FoldButtonIntent, FoldButtonShape, FoldButtonSize, FoldCalloutAppearance, FoldCalloutVariant, FoldChoiceOption, FoldComponentPanelDescriptor, FoldIconName, FoldIconSet, FoldIconSize, FoldMenuItemBadgeTone, FoldMenuLevel, FoldMenuTint, FoldMenuTogglePlacement, FoldMotionToken, FoldNumberControls, FoldNumberSpinner, FoldPageItem, FoldPaletteInput, FoldPanelConfig, FoldPanelContent, FoldPanelDescriptor, FoldPanelHandle, FoldPanelLabels, FoldPanelSide, FoldRadiusToken, FoldRangeValue, FoldSemanticColorToken, FoldShadowToken, FoldSpaceToken, FoldSpinnerSize, FoldStickyColumnAnchor, FoldSurfaceName,
|
|
4148
|
+
export { FOLD_AUTO_PALETTES, FOLD_BLUR_TOKENS, FOLD_BUILTIN_ICONS, FOLD_MOTION_TOKENS, FOLD_PALETTE_DEFAULT, FOLD_PANEL_CLOSE_LABEL, FOLD_RADIUS_TOKENS, FOLD_SEMANTIC_COLOR_TOKENS, FOLD_SHADOW_TOKENS, FOLD_SPACE_TOKENS, FOLD_TEXT_TOKENS, FOLD_TOAST_CONFIG, FoldAppShellComponent, FoldAsideLayoutComponent, FoldAvatarComponent, FoldAvatarDetailComponent, FoldAvatarListComponent, FoldBadgeComponent, FoldButtonComponent, FoldButtonIconComponent, FoldCalloutComponent, FoldCardComponent, FoldChoiceRowComponent, FoldContextCardComponent, FoldDataTableCellDirective, FoldDataTableComponent, FoldDisclosureComponent, FoldElementTitleComponent, FoldElevatedDirective, FoldEmptyStateComponent, FoldFieldComponent, FoldFieldIdDirective, FoldFieldListComponent, FoldFileDropzoneComponent, FoldHeroCardComponent, FoldHeroSectionComponent, FoldIconComponent, FoldIconRegistry, FoldIdService, FoldInputComponent, FoldLinkComponent, FoldLoadingStateComponent, FoldMenuComponent, FoldMenuItemComponent, FoldMenuSectionComponent, FoldMenuSeparatorComponent, FoldNavLauncherComponent, FoldNavLayoutComponent, FoldNavTileComponent, FoldNumberInputComponent, FoldPageLayoutComponent, FoldPageSectionComponent, FoldPageTitleDirective, FoldPaginatorComponent, FoldPaletteRegistry, FoldPanelComponentOutletDirective, FoldPanelHeaderComponent, FoldPanelHostComponent, FoldPanelHostService, FoldPanelRef, FoldPanelToggle, FoldRangeSliderComponent, FoldRepeatPressDirective, FoldSearchComponent, FoldSelectComponent, FoldSliderComponent, FoldSpinnerComponent, FoldStatusBadgeComponent, FoldStickyColumnDirective, FoldSurfaceDirective, FoldTabPanelComponent, FoldTabsComponent, FoldTimelineComponent, FoldToastComponent, FoldToastContainerComponent, FoldToastService, FoldToggleIconComponent, FoldViewNavComponent, foldBlurVar, foldColorProperty, foldColorVar, foldHashSeed, foldMotionVar, foldRadiusVar, foldResolvePalette, foldShadowVar, foldSpaceVar, foldTextVar, observeElementWidth, provideFoldIcons, provideFoldPalette, provideFoldPanelLabels, provideFoldToasts };
|
|
4149
|
+
export type { FoldAutoPaletteName, FoldAvatarListItem, FoldAvatarRing, FoldAvatarRingStyle, FoldAvatarVariant, FoldBadgeVariant, FoldBlurToken, FoldBuiltinIconName, FoldButtonEmphasis, FoldButtonIconShape, FoldButtonIconSize, FoldButtonIconTone, FoldButtonIntent, FoldButtonShape, FoldButtonSize, FoldCalloutAppearance, FoldCalloutVariant, FoldCardBandChrome, FoldChoiceOption, FoldComponentPanelDescriptor, FoldIconName, FoldIconSet, FoldIconSize, FoldMenuItemBadgeTone, FoldMenuLevel, FoldMenuTint, FoldMenuTogglePlacement, FoldMotionToken, FoldNumberControls, FoldNumberSpinner, FoldPageItem, FoldPaletteInput, FoldPanelConfig, FoldPanelContent, FoldPanelDescriptor, FoldPanelHandle, FoldPanelLabels, FoldPanelSide, FoldRadiusToken, FoldRangeValue, FoldSemanticColorToken, FoldShadowToken, FoldSpaceToken, FoldSpinnerSize, FoldStickyColumnAnchor, FoldSurfaceName, FoldTabItem, FoldTableColumn, FoldTableEmpty, FoldTableSort, FoldTableSortDir, FoldTableTone, FoldTabsContext, FoldTemplatePanelDescriptor, FoldTextToken, FoldTimelineDatePlacement, FoldTimelineNode, FoldToast, FoldToastConfig, FoldToastVariant, FoldViewNavItem };
|
|
3840
4150
|
//# sourceMappingURL=fold-ng.d.ts.map
|