@nanahoshi/mona-ui 0.48.0 → 0.50.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/docs/api/breadcrumb.json +1 -1
- package/docs/api/breadcrumb.md +5 -1
- package/docs/api/index.json +1 -1
- package/docs/api/tabs.json +1 -1
- package/docs/api/tabs.md +53 -6
- package/docs/breadcrumb.md +58 -4
- package/docs/manifest.json +1 -1
- package/docs/tabs.md +185 -12
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +116 -32
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +653 -107
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +18 -4
- package/types/nanahoshi-mona-ui-tabs.d.ts +217 -16
package/llms.txt
CHANGED
|
@@ -249,7 +249,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
|
|
|
249
249
|
- [`@nanahoshi/mona-ui/splitter`](docs/api/splitter.md): 3 exports, in full.
|
|
250
250
|
- [`@nanahoshi/mona-ui/stepper`](docs/api/stepper.md): 9 exports, in full.
|
|
251
251
|
- [`@nanahoshi/mona-ui/switch`](docs/api/switch.md): 5 exports, in full.
|
|
252
|
-
- [`@nanahoshi/mona-ui/tabs`](docs/api/tabs.md):
|
|
252
|
+
- [`@nanahoshi/mona-ui/tabs`](docs/api/tabs.md): 11 exports, in full.
|
|
253
253
|
- [`@nanahoshi/mona-ui/text-area`](docs/api/text-area.md): 1 export, in full.
|
|
254
254
|
- [`@nanahoshi/mona-ui/text-box`](docs/api/text-box.md): 6 exports, in full.
|
|
255
255
|
- [`@nanahoshi/mona-ui/theme`](docs/api/theme.md): 54 exports, in full.
|
package/package.json
CHANGED
|
@@ -43,12 +43,24 @@ export declare class BreadcrumbItemComponent {
|
|
|
43
43
|
"itemClick": "itemClick";
|
|
44
44
|
}, ["link"], ["*"], true, never>;
|
|
45
45
|
}
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* An item, and whether it and the separator after it are folded. Every item and separator stays in the list, folded or
|
|
48
|
+
* not, so the breadcrumb can measure the whole trail.
|
|
49
|
+
*/
|
|
47
50
|
interface BreadcrumbEntry {
|
|
51
|
+
/** Whether the button that stands for the folded items comes before this item: the second of three or more. */
|
|
52
|
+
readonly foldButtonBefore: boolean;
|
|
53
|
+
readonly folded: boolean;
|
|
54
|
+
/** What the separator after the item reports. */
|
|
48
55
|
readonly index: number;
|
|
49
|
-
readonly item: BreadcrumbItemComponent
|
|
50
|
-
readonly
|
|
56
|
+
readonly item: BreadcrumbItemComponent;
|
|
57
|
+
readonly separatorFolded: boolean;
|
|
51
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* A trail of `mona-breadcrumb-item`s that leads to the current page. When the trail is wider than its box, its middle
|
|
61
|
+
* folds behind a button that shows it again, the items nearest the start first, so the first item and the current page
|
|
62
|
+
* stay readable.
|
|
63
|
+
*/
|
|
52
64
|
export declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
53
65
|
#private;
|
|
54
66
|
protected readonly currentItemClass: import("@angular/core").Signal<string>;
|
|
@@ -81,7 +93,8 @@ export declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
|
81
93
|
readonly lastItemCurrent: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
82
94
|
/**
|
|
83
95
|
* @description The most items to show before the middle of the trail collapses behind a button that shows it again.
|
|
84
|
-
* The
|
|
96
|
+
* The trail also folds whatever doesn't fit its width, with or without it. The first and last items always stay, so
|
|
97
|
+
* anything below 2 counts as 2. `null` sets no count.
|
|
85
98
|
* @default null
|
|
86
99
|
*/
|
|
87
100
|
readonly maxItems: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
|
|
@@ -90,6 +103,7 @@ export declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
|
90
103
|
* @default ""
|
|
91
104
|
*/
|
|
92
105
|
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
106
|
+
constructor();
|
|
93
107
|
/**
|
|
94
108
|
* Shows the whole trail. The button that was just activated goes away, so focus moves to the first item it revealed.
|
|
95
109
|
*/
|
|
@@ -4,7 +4,6 @@ import { ElementRef, TemplateRef } from "@angular/core";
|
|
|
4
4
|
import { PreventableEvent } from "@nanahoshi/mona-ui/common";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
7
|
-
import { ImmutableSet } from "@mirei/ts-collections";
|
|
8
7
|
import { SortableMoveEvent } from "@nanahoshi/mona-ui/sortable";
|
|
9
8
|
export declare class TabCloseEvent extends PreventableEvent {
|
|
10
9
|
#private;
|
|
@@ -35,6 +34,11 @@ export declare class TabSelectEvent extends PreventableEvent {
|
|
|
35
34
|
/** Index of the tab being selected. */
|
|
36
35
|
get index(): number;
|
|
37
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* How a tab strip marks the selected tab. `"line"` draws an indicator line along the strip's edge. `"pill"` raises the
|
|
39
|
+
* selected tab on a rounded background, as the tabs in a browser's or a file manager's titlebar do.
|
|
40
|
+
*/
|
|
41
|
+
export type TabsLook = "line" | "pill";
|
|
38
42
|
export type TabsPosition = "top" | "bottom" | "left" | "right";
|
|
39
43
|
export declare class TabContentTemplateDirective {
|
|
40
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabContentTemplateDirective, never>;
|
|
@@ -48,23 +52,40 @@ interface TabItem {
|
|
|
48
52
|
closable: boolean;
|
|
49
53
|
contentTemplate?: TemplateRef<unknown>;
|
|
50
54
|
disabled: boolean;
|
|
55
|
+
/** The key the tab is tracked by. It never changes, unlike the ids the consumer may set. */
|
|
51
56
|
readonly id: string;
|
|
52
57
|
index: number;
|
|
58
|
+
/** The id of the panel the tab controls when the consumer names one. */
|
|
59
|
+
readonly panelId: string | null;
|
|
53
60
|
readonly selected: boolean;
|
|
61
|
+
/** The id of the tab element. */
|
|
62
|
+
readonly tabId: string;
|
|
54
63
|
title: string;
|
|
55
64
|
titleTemplate?: TemplateRef<unknown>;
|
|
56
65
|
}
|
|
66
|
+
/** A line strip is ruled off from the content beside it. A pill strip stands on its own, as in a titlebar. */
|
|
57
67
|
declare const tabListBaseThemeVariants: (props?: ({
|
|
68
|
+
look?: "line" | "pill" | null | undefined;
|
|
58
69
|
position?: "top" | "left" | "right" | "bottom" | null | undefined;
|
|
59
70
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
60
71
|
declare const tabListListWrapperThemeVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
72
|
+
/** Pills are spaced apart, and inset so the strip, which clips, doesn't cut off the selected one's shadow. */
|
|
61
73
|
declare const tabListListThemeVariants: (props?: ({
|
|
74
|
+
look?: "line" | "pill" | null | undefined;
|
|
62
75
|
position?: "top" | "left" | "right" | "bottom" | null | undefined;
|
|
63
76
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
64
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* A tab being dragged to a new place floats as a raised copy of itself.
|
|
79
|
+
*
|
|
80
|
+
* A line tab marks the selection with an indicator along the strip's edge. A pill tab raises the selected tab on a
|
|
81
|
+
* background: `--mona-tab-pill-background` when it's set, else the raised surface. Shadows and backgrounds don't paint
|
|
82
|
+
* in forced colors, so there the selected pill is ringed in the highlight color, and in the text color when the user
|
|
83
|
+
* asks for more contrast. Pill tabs keep one weight, so selecting one doesn't shift the strip.
|
|
84
|
+
*/
|
|
65
85
|
declare const tabListListItemThemeVariants: (props?: ({
|
|
66
86
|
active?: boolean | null | undefined;
|
|
67
87
|
disabled?: boolean | null | undefined;
|
|
88
|
+
look?: "line" | "pill" | null | undefined;
|
|
68
89
|
position?: "top" | "left" | "right" | "bottom" | null | undefined;
|
|
69
90
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
70
91
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -89,6 +110,7 @@ type TabsBaseVariantProps = VariantProps<typeof tabsBaseThemeVariants>;
|
|
|
89
110
|
type TabsBaseVariantInput = VariantInputs<TabsBaseVariantProps>;
|
|
90
111
|
type TabListVariantInput = TabListBaseVariantInput & TabListListWrapperVariantInput & TabListListVariantInput & Omit<TabListListItemVariantInput, "active" | "disabled"> & TabListScrollButtonVariantInput;
|
|
91
112
|
type TabsVariantInput = TabsBaseVariantInput & TabListVariantInput & TabContentVariantInput;
|
|
113
|
+
type TabStripVariantInput = Omit<TabListVariantInput, "position">;
|
|
92
114
|
type TabOrientation = "horizontal" | "vertical";
|
|
93
115
|
type TabScrollDirection = "previous" | "next";
|
|
94
116
|
declare class TabListComponent implements TabListVariantInput {
|
|
@@ -111,11 +133,14 @@ declare class TabListComponent implements TabListVariantInput {
|
|
|
111
133
|
readonly ariaLabelledBy: import("@angular/core").InputSignal<string>;
|
|
112
134
|
readonly closable: import("@angular/core").InputSignal<boolean>;
|
|
113
135
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
136
|
+
readonly look: import("@angular/core").InputSignal<"line" | "pill" | null | undefined>;
|
|
114
137
|
/**
|
|
115
138
|
* @description Placement of the tab list relative to the tab content.
|
|
116
139
|
* @default "top"
|
|
117
140
|
*/
|
|
118
141
|
readonly position: import("@angular/core").InputSignal<"top" | "left" | "right" | "bottom" | null | undefined>;
|
|
142
|
+
/** Whether the parent renders each tab's panel, as `mona-tabs` does. Tab then goes to the selected one. */
|
|
143
|
+
readonly rendersPanels: import("@angular/core").InputSignal<boolean>;
|
|
119
144
|
readonly selectedTabId: import("@angular/core").ModelSignal<string | null>;
|
|
120
145
|
/**
|
|
121
146
|
* @description Size preset controlling the tabs' dimensions.
|
|
@@ -132,9 +157,15 @@ declare class TabListComponent implements TabListVariantInput {
|
|
|
132
157
|
protected onFocusIn(event: FocusEvent): void;
|
|
133
158
|
protected onFocusOut(event: FocusEvent): void;
|
|
134
159
|
protected onKeydown(event: KeyboardEvent): void;
|
|
160
|
+
/** A middle-click closes a tab that can close, as it does a browser's tab. */
|
|
161
|
+
protected onTabAuxClick(tab: TabItem, event: MouseEvent): void;
|
|
135
162
|
protected onTabClick(tab: TabItem, event: MouseEvent): void;
|
|
136
163
|
protected onTabClose(tab: TabItem, event: MouseEvent): void;
|
|
164
|
+
/** Keeps the middle button from starting to autoscroll, or to paste on Linux, over a tab it's closing. */
|
|
165
|
+
protected onTabMouseDown(tab: TabItem, event: MouseEvent): void;
|
|
137
166
|
protected onTabMove(event: SortableMoveEvent<TabItem>): void;
|
|
167
|
+
/** The panel a tab controls: the one the parent renders, else the one the consumer named, if any. */
|
|
168
|
+
protected panelIdOf(tab: TabItem): string | null;
|
|
138
169
|
protected startContinuousScroll(event: PointerEvent, element: HTMLElement, direction: TabScrollDirection): void;
|
|
139
170
|
protected startScrolling(element: HTMLElement, direction: TabScrollDirection, type: "single" | "continuous"): void;
|
|
140
171
|
protected stopScrolling(): void;
|
|
@@ -150,8 +181,10 @@ declare class TabListComponent implements TabListVariantInput {
|
|
|
150
181
|
private emitTabSelect;
|
|
151
182
|
private focusTab;
|
|
152
183
|
private getNavigationDirection;
|
|
184
|
+
/** Moves into the selected tab's panel. A panel the consumer renders may be anywhere, so Tab is left alone there. */
|
|
153
185
|
private handleTabKey;
|
|
154
186
|
private handleTabStripKey;
|
|
187
|
+
private isTabClosable;
|
|
155
188
|
private isTabEnabled;
|
|
156
189
|
private performScroll;
|
|
157
190
|
private restoreFocus;
|
|
@@ -163,6 +196,7 @@ declare class TabListComponent implements TabListVariantInput {
|
|
|
163
196
|
private selectTab;
|
|
164
197
|
private setupResizeObserver;
|
|
165
198
|
private setupScrolling;
|
|
199
|
+
/** The tab element of the tab with this key. Its id is the consumer's to set, so it's found by its list item. */
|
|
166
200
|
private tabElementOf;
|
|
167
201
|
/**
|
|
168
202
|
* The tab a key press applies to: the one focus is in, which may not be the selected one after a vetoed selection.
|
|
@@ -192,11 +226,21 @@ declare class TabListComponent implements TabListVariantInput {
|
|
|
192
226
|
"required": false;
|
|
193
227
|
"isSignal": true;
|
|
194
228
|
};
|
|
229
|
+
"look": {
|
|
230
|
+
"alias": "look";
|
|
231
|
+
"required": false;
|
|
232
|
+
"isSignal": true;
|
|
233
|
+
};
|
|
195
234
|
"position": {
|
|
196
235
|
"alias": "position";
|
|
197
236
|
"required": true;
|
|
198
237
|
"isSignal": true;
|
|
199
238
|
};
|
|
239
|
+
"rendersPanels": {
|
|
240
|
+
"alias": "rendersPanels";
|
|
241
|
+
"required": false;
|
|
242
|
+
"isSignal": true;
|
|
243
|
+
};
|
|
200
244
|
"selectedTabId": {
|
|
201
245
|
"alias": "selectedTabId";
|
|
202
246
|
"required": false;
|
|
@@ -230,16 +274,23 @@ export declare class TabComponent {
|
|
|
230
274
|
protected readonly titleTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
231
275
|
/**
|
|
232
276
|
* @description Displays a close button on this tab. Turning it on here shows the button even when the parent
|
|
233
|
-
* `mona-tabs` has `closable` off; turning it off here doesn't hide a button the parent asked for.
|
|
277
|
+
* `mona-tabs` or `mona-tab-strip` has `closable` off; turning it off here doesn't hide a button the parent asked for.
|
|
234
278
|
* @default false
|
|
235
279
|
*/
|
|
236
280
|
readonly closable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
237
281
|
/**
|
|
238
282
|
* @description Renders this tab with reduced visual emphasis and removes pointer and keyboard interaction. A tab is
|
|
239
|
-
* disabled when this or the parent
|
|
283
|
+
* disabled when this or the parent's `disabled` input is on.
|
|
240
284
|
* @default false
|
|
241
285
|
*/
|
|
242
286
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
287
|
+
/**
|
|
288
|
+
* @description The id of the panel this tab controls, which the tab names in `aria-controls`. In a `mona-tab-strip`,
|
|
289
|
+
* it's the panel you render: give it `role="tabpanel"` and label it with the tab's `tabId`. Without it, a strip's tab
|
|
290
|
+
* controls nothing. In `mona-tabs`, the component renders the panel with this id, and generates one when it's empty.
|
|
291
|
+
* @default ""
|
|
292
|
+
*/
|
|
293
|
+
readonly panelId: import("@angular/core").InputSignal<string>;
|
|
243
294
|
/**
|
|
244
295
|
* @description Whether the tab is selected. Setting it to `true` selects the tab unless it's disabled, and it
|
|
245
296
|
* follows the selection, so `[(selected)]` stays current. Setting it to `false` doesn't clear the selection, because
|
|
@@ -247,6 +298,12 @@ export declare class TabComponent {
|
|
|
247
298
|
* @default false
|
|
248
299
|
*/
|
|
249
300
|
readonly selected: import("@angular/core").ModelSignal<boolean>;
|
|
301
|
+
/**
|
|
302
|
+
* @description The id of the tab element, the one with `role="tab"`. Point a panel's `aria-labelledby` at it. A unique
|
|
303
|
+
* id is generated when it isn't set, and reading the input gives it back.
|
|
304
|
+
* @default generated
|
|
305
|
+
*/
|
|
306
|
+
readonly tabId: import("@angular/core").InputSignal<string>;
|
|
250
307
|
/**
|
|
251
308
|
* @description Title text displayed on the tab.
|
|
252
309
|
* @default ""
|
|
@@ -264,11 +321,21 @@ export declare class TabComponent {
|
|
|
264
321
|
"required": false;
|
|
265
322
|
"isSignal": true;
|
|
266
323
|
};
|
|
324
|
+
"panelId": {
|
|
325
|
+
"alias": "panelId";
|
|
326
|
+
"required": false;
|
|
327
|
+
"isSignal": true;
|
|
328
|
+
};
|
|
267
329
|
"selected": {
|
|
268
330
|
"alias": "selected";
|
|
269
331
|
"required": false;
|
|
270
332
|
"isSignal": true;
|
|
271
333
|
};
|
|
334
|
+
"tabId": {
|
|
335
|
+
"alias": "tabId";
|
|
336
|
+
"required": false;
|
|
337
|
+
"isSignal": true;
|
|
338
|
+
};
|
|
272
339
|
"title": {
|
|
273
340
|
"alias": "title";
|
|
274
341
|
"required": false;
|
|
@@ -283,7 +350,7 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
283
350
|
protected readonly baseClass: import("@angular/core").Signal<string>;
|
|
284
351
|
protected readonly contentClass: import("@angular/core").Signal<string>;
|
|
285
352
|
protected readonly selectedTabId: import("@angular/core").WritableSignal<string | null>;
|
|
286
|
-
protected readonly tabList: import("@angular/core").Signal<ImmutableSet<TabItem>>;
|
|
353
|
+
protected readonly tabList: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableSet<TabItem>>;
|
|
287
354
|
protected readonly tabListComponent: import("@angular/core").Signal<TabListComponent>;
|
|
288
355
|
protected readonly tabs: import("@angular/core").Signal<readonly TabComponent[]>;
|
|
289
356
|
/**
|
|
@@ -311,6 +378,12 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
311
378
|
* @default true
|
|
312
379
|
*/
|
|
313
380
|
readonly keepTabContent: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
381
|
+
/**
|
|
382
|
+
* @description How the selected tab is marked: `"line"` draws an indicator along the strip's edge, and `"pill"`
|
|
383
|
+
* raises the tab on a rounded background, `--mona-tab-pill-background` when it's set.
|
|
384
|
+
* @default "line"
|
|
385
|
+
*/
|
|
386
|
+
readonly look: import("@angular/core").InputSignal<"line" | "pill" | null | undefined>;
|
|
314
387
|
/**
|
|
315
388
|
* @description Placement of the tab list relative to the tab content.
|
|
316
389
|
* @default "top"
|
|
@@ -335,8 +408,9 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
335
408
|
*/
|
|
336
409
|
readonly sortable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
337
410
|
/**
|
|
338
|
-
* @description Emitted with a {@link TabCloseEvent} when a close is requested
|
|
339
|
-
* remove it from whatever renders the
|
|
411
|
+
* @description Emitted with a {@link TabCloseEvent} when a close is requested: by the close button, Delete or
|
|
412
|
+
* Backspace, or a middle-click on the tab. The component doesn't remove the tab: remove it from whatever renders the
|
|
413
|
+
* `mona-tab` elements.
|
|
340
414
|
*/
|
|
341
415
|
readonly tabClose: import("@angular/core").OutputEmitterRef<TabCloseEvent>;
|
|
342
416
|
/**
|
|
@@ -354,16 +428,8 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
354
428
|
* @default ""
|
|
355
429
|
*/
|
|
356
430
|
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
357
|
-
constructor();
|
|
358
431
|
protected handlePanelKeyDown(event: KeyboardEvent): void;
|
|
359
|
-
|
|
360
|
-
private reportIndex;
|
|
361
|
-
/**
|
|
362
|
-
* Brings the three views of the selection together. A tab newly flagged `selected` from outside wins, and the first
|
|
363
|
-
* one wins when there are several. Every tab's `selected` and the index are then written to match, so a flag that was
|
|
364
|
-
* already seen, or one this method wrote, can't take the selection back.
|
|
365
|
-
*/
|
|
366
|
-
private syncSelection;
|
|
432
|
+
protected panelIdOf(tab: TabItem): string;
|
|
367
433
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
|
|
368
434
|
static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "mona-tabs", never, {
|
|
369
435
|
"ariaLabel": {
|
|
@@ -391,6 +457,11 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
391
457
|
"required": false;
|
|
392
458
|
"isSignal": true;
|
|
393
459
|
};
|
|
460
|
+
"look": {
|
|
461
|
+
"alias": "look";
|
|
462
|
+
"required": false;
|
|
463
|
+
"isSignal": true;
|
|
464
|
+
};
|
|
394
465
|
"position": {
|
|
395
466
|
"alias": "position";
|
|
396
467
|
"required": false;
|
|
@@ -423,5 +494,135 @@ export declare class TabsComponent implements TabsVariantInput {
|
|
|
423
494
|
"tabSelect": "tabSelect";
|
|
424
495
|
}, ["tabs"], never, true, never>;
|
|
425
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* Only the tab list of a set of tabs, for when each tab's panel is somewhere else on the page, as with the tabs in a
|
|
499
|
+
* window's titlebar. You render the panel: give it `role="tabpanel"`, name its id in the tab's `panelId`, and point its
|
|
500
|
+
* `aria-labelledby` at the tab's `tabId`.
|
|
501
|
+
*/
|
|
502
|
+
export declare class TabStripComponent implements TabStripVariantInput {
|
|
503
|
+
#private;
|
|
504
|
+
protected readonly baseClass: import("@angular/core").Signal<string>;
|
|
505
|
+
protected readonly selectedTabId: import("@angular/core").WritableSignal<string | null>;
|
|
506
|
+
protected readonly tabList: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableSet<TabItem>>;
|
|
507
|
+
protected readonly tabs: import("@angular/core").Signal<readonly TabComponent[]>;
|
|
508
|
+
/**
|
|
509
|
+
* @description Accessible name for the tab list.
|
|
510
|
+
* @default ""
|
|
511
|
+
*/
|
|
512
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
513
|
+
/**
|
|
514
|
+
* @description The id of an element that names the tab list. Takes precedence over `aria-label`.
|
|
515
|
+
* @default ""
|
|
516
|
+
*/
|
|
517
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string>;
|
|
518
|
+
/**
|
|
519
|
+
* @description Displays a close button on each tab. A tab's own `closable` can add a button, not remove this one.
|
|
520
|
+
* @default false
|
|
521
|
+
*/
|
|
522
|
+
readonly closable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
523
|
+
/**
|
|
524
|
+
* @description Renders every tab with reduced visual emphasis and removes pointer and keyboard interaction.
|
|
525
|
+
* @default false
|
|
526
|
+
*/
|
|
527
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
528
|
+
/**
|
|
529
|
+
* @description How the selected tab is marked: `"line"` draws an indicator under it, and `"pill"` raises it on a
|
|
530
|
+
* rounded background, `--mona-tab-pill-background` when it's set.
|
|
531
|
+
* @default "line"
|
|
532
|
+
*/
|
|
533
|
+
readonly look: import("@angular/core").InputSignal<"line" | "pill" | null | undefined>;
|
|
534
|
+
/**
|
|
535
|
+
* @description The zero-based index of the selected tab. Writing it selects that tab, unless it's disabled or out of
|
|
536
|
+
* range, in which case the value goes back to the selected tab's index. It also changes when the component moves the
|
|
537
|
+
* selection itself, such as when the selected tab is removed.
|
|
538
|
+
* @default 0
|
|
539
|
+
*/
|
|
540
|
+
readonly selectedIndex: import("@angular/core").ModelSignal<number>;
|
|
541
|
+
/**
|
|
542
|
+
* @description Size preset controlling the tabs' dimensions.
|
|
543
|
+
* @default "medium"
|
|
544
|
+
*/
|
|
545
|
+
readonly size: import("@angular/core").InputSignal<"small" | "large" | "medium" | null | undefined>;
|
|
546
|
+
/**
|
|
547
|
+
* @description Lets the user reorder the tabs: by dragging them, or with Control+Shift and the arrow keys, Home or
|
|
548
|
+
* End (Command+Shift on macOS). The component emits `tabReorder` and doesn't move the tabs itself.
|
|
549
|
+
* @default false
|
|
550
|
+
*/
|
|
551
|
+
readonly sortable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
552
|
+
/**
|
|
553
|
+
* @description Emitted with a {@link TabCloseEvent} when a close is requested: by the close button, Delete or
|
|
554
|
+
* Backspace, or a middle-click on the tab. The component doesn't remove the tab: remove it from whatever renders the
|
|
555
|
+
* `mona-tab` elements.
|
|
556
|
+
*/
|
|
557
|
+
readonly tabClose: import("@angular/core").OutputEmitterRef<TabCloseEvent>;
|
|
558
|
+
/**
|
|
559
|
+
* @description Emitted with a {@link TabReorderEvent} when a tab of a `sortable` strip is moved. The component doesn't
|
|
560
|
+
* reorder the tabs: move the tab in whatever renders the `mona-tab` elements. The selected tab stays selected.
|
|
561
|
+
*/
|
|
562
|
+
readonly tabReorder: import("@angular/core").OutputEmitterRef<TabReorderEvent>;
|
|
563
|
+
/**
|
|
564
|
+
* @description Emitted with a {@link TabSelectEvent} before a click or key selects a tab. This event is preventable.
|
|
565
|
+
* It doesn't fire for selections made through `selectedIndex` or `selected`, or when the selected tab is removed.
|
|
566
|
+
*/
|
|
567
|
+
readonly tabSelect: import("@angular/core").OutputEmitterRef<TabSelectEvent>;
|
|
568
|
+
/**
|
|
569
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
570
|
+
* @default ""
|
|
571
|
+
*/
|
|
572
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
573
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TabStripComponent, never>;
|
|
574
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabStripComponent, "mona-tab-strip", never, {
|
|
575
|
+
"ariaLabel": {
|
|
576
|
+
"alias": "aria-label";
|
|
577
|
+
"required": false;
|
|
578
|
+
"isSignal": true;
|
|
579
|
+
};
|
|
580
|
+
"ariaLabelledBy": {
|
|
581
|
+
"alias": "aria-labelledby";
|
|
582
|
+
"required": false;
|
|
583
|
+
"isSignal": true;
|
|
584
|
+
};
|
|
585
|
+
"closable": {
|
|
586
|
+
"alias": "closable";
|
|
587
|
+
"required": false;
|
|
588
|
+
"isSignal": true;
|
|
589
|
+
};
|
|
590
|
+
"disabled": {
|
|
591
|
+
"alias": "disabled";
|
|
592
|
+
"required": false;
|
|
593
|
+
"isSignal": true;
|
|
594
|
+
};
|
|
595
|
+
"look": {
|
|
596
|
+
"alias": "look";
|
|
597
|
+
"required": false;
|
|
598
|
+
"isSignal": true;
|
|
599
|
+
};
|
|
600
|
+
"selectedIndex": {
|
|
601
|
+
"alias": "selectedIndex";
|
|
602
|
+
"required": false;
|
|
603
|
+
"isSignal": true;
|
|
604
|
+
};
|
|
605
|
+
"size": {
|
|
606
|
+
"alias": "size";
|
|
607
|
+
"required": false;
|
|
608
|
+
"isSignal": true;
|
|
609
|
+
};
|
|
610
|
+
"sortable": {
|
|
611
|
+
"alias": "sortable";
|
|
612
|
+
"required": false;
|
|
613
|
+
"isSignal": true;
|
|
614
|
+
};
|
|
615
|
+
"userClass": {
|
|
616
|
+
"alias": "class";
|
|
617
|
+
"required": false;
|
|
618
|
+
"isSignal": true;
|
|
619
|
+
};
|
|
620
|
+
}, {
|
|
621
|
+
"selectedIndex": "selectedIndexChange";
|
|
622
|
+
"tabClose": "tabClose";
|
|
623
|
+
"tabReorder": "tabReorder";
|
|
624
|
+
"tabSelect": "tabSelect";
|
|
625
|
+
}, ["tabs"], never, true, never>;
|
|
626
|
+
}
|
|
426
627
|
export declare const TABS_DEFAULT_MESSAGES: MonaTabsMessages;
|
|
427
628
|
export {};
|