@mk-kit/ui 0.35.0 → 0.37.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/README.md +10 -9
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/fesm2022/mk-kit-ui-chat.mjs +490 -0
- package/fesm2022/mk-kit-ui-chat.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-core.mjs +446 -1
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-feedback.mjs +400 -8
- package/fesm2022/mk-kit-ui-feedback.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-forms.mjs +816 -6
- package/fesm2022/mk-kit-ui-forms.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-icon.mjs +444 -117
- package/fesm2022/mk-kit-ui-icon.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-layout.mjs +401 -0
- package/fesm2022/mk-kit-ui-layout.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-navigation.mjs +2 -2
- package/fesm2022/mk-kit-ui-navigation.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-query-builder.mjs +276 -0
- package/fesm2022/mk-kit-ui-query-builder.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-table.mjs +291 -20
- package/fesm2022/mk-kit-ui-table.mjs.map +1 -1
- package/fesm2022/mk-kit-ui.mjs +3 -0
- package/fesm2022/mk-kit-ui.mjs.map +1 -1
- package/package.json +13 -1
- package/styles/mk-kit.css +16 -0
- package/types/mk-kit-ui-chat.d.ts +288 -0
- package/types/mk-kit-ui-core.d.ts +228 -3
- package/types/mk-kit-ui-feedback.d.ts +111 -2
- package/types/mk-kit-ui-forms.d.ts +264 -3
- package/types/mk-kit-ui-icon.d.ts +6 -2
- package/types/mk-kit-ui-layout.d.ts +236 -0
- package/types/mk-kit-ui-query-builder.d.ts +98 -0
- package/types/mk-kit-ui-table.d.ts +145 -5
- package/types/mk-kit-ui.d.ts +3 -0
|
@@ -543,13 +543,53 @@ declare class MkDialog {
|
|
|
543
543
|
readonly titleId: _angular_core.InputSignal<string>;
|
|
544
544
|
/** Hide the header close button. */
|
|
545
545
|
readonly hideClose: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
546
|
+
/**
|
|
547
|
+
* Let the user move the dialog by dragging its header (pointer / touch) or
|
|
548
|
+
* with the arrow keys on the grip that appears in the header. Double-click
|
|
549
|
+
* the header or press Home on the grip to snap back to the centre.
|
|
550
|
+
*/
|
|
551
|
+
readonly draggable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
552
|
+
/**
|
|
553
|
+
* Let the user resize the dialog from the corner grip (pointer / touch, or
|
|
554
|
+
* arrow keys on the grip; Home resets). The panel never grows past the
|
|
555
|
+
* viewport or shrinks below a usable minimum.
|
|
556
|
+
*/
|
|
557
|
+
readonly resizable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
558
|
+
private readonly destroyRef;
|
|
559
|
+
/** The body-level overlay panel this dialog lives in (`null` when inline). */
|
|
560
|
+
private panelEl;
|
|
561
|
+
/** Current drag offset from the centred position, px. */
|
|
562
|
+
private offset;
|
|
546
563
|
constructor();
|
|
547
564
|
/** Close the surrounding overlay, if any. */
|
|
548
565
|
protected close(): void;
|
|
566
|
+
/** Snap back to the centred, preset-sized panel. */
|
|
567
|
+
reset(): void;
|
|
568
|
+
protected onHeaderPointerDown(event: PointerEvent): void;
|
|
569
|
+
protected onGripPointerDown(event: PointerEvent): void;
|
|
570
|
+
protected onResizerPointerDown(event: PointerEvent): void;
|
|
571
|
+
protected onHeaderDoubleClick(event: MouseEvent): void;
|
|
572
|
+
protected onGripKeydown(event: KeyboardEvent): void;
|
|
573
|
+
protected onResizerKeydown(event: KeyboardEvent): void;
|
|
574
|
+
private static arrowDelta;
|
|
575
|
+
private startPointer;
|
|
576
|
+
/** Move the panel to `(x, y)` px from its centred spot, kept inside the viewport. */
|
|
577
|
+
private moveTo;
|
|
578
|
+
/** Resize the panel to `w × h` px within [minimum, viewport]. */
|
|
579
|
+
private resizeTo;
|
|
580
|
+
/**
|
|
581
|
+
* Once the user takes hold, the entrance animation must never run again —
|
|
582
|
+
* toggling `animation` back on (as a transient class would) restarts it,
|
|
583
|
+
* so the panel would blink after every drag. The class is never removed.
|
|
584
|
+
*/
|
|
585
|
+
private markMoved;
|
|
586
|
+
private clampIntoView;
|
|
587
|
+
private isRtl;
|
|
588
|
+
private panel;
|
|
549
589
|
/** Point the owning dialog panel's `aria-labelledby` at the title element. */
|
|
550
590
|
private wireLabelledBy;
|
|
551
591
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkDialog, never>;
|
|
552
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDialog, "mk-dialog", never, { "dialogTitle": { "alias": "dialogTitle"; "required": false; "isSignal": true; }; "titleId": { "alias": "titleId"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; }, {}, never, ["[mkDialogHeader], mk-dialog-title", "*", "[mkDialogFooter]"], true, never>;
|
|
592
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDialog, "mk-dialog", never, { "dialogTitle": { "alias": "dialogTitle"; "required": false; "isSignal": true; }; "titleId": { "alias": "titleId"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; }, {}, never, ["[mkDialogHeader], mk-dialog-title", "*", "[mkDialogFooter]"], true, never>;
|
|
553
593
|
}
|
|
554
594
|
|
|
555
595
|
/** Data contract for {@link MkConfirmDialog} / `MkDialogService.confirm`. */
|
|
@@ -1266,5 +1306,74 @@ declare class MkTourService {
|
|
|
1266
1306
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MkTourService>;
|
|
1267
1307
|
}
|
|
1268
1308
|
|
|
1269
|
-
|
|
1309
|
+
/**
|
|
1310
|
+
* The translucent panel with a spinner that `mkBlockUi` and
|
|
1311
|
+
* `MkBlockUiService` drop over a region or the page.
|
|
1312
|
+
*/
|
|
1313
|
+
declare class MkBlockUiOverlay {
|
|
1314
|
+
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
1315
|
+
readonly message: _angular_core.WritableSignal<string>;
|
|
1316
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBlockUiOverlay, never>;
|
|
1317
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkBlockUiOverlay, "mk-block-ui-overlay", never, {}, {}, never, never, true, never>;
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Block UI — cover the host element with a translucent panel and spinner
|
|
1321
|
+
* while something loads, so its contents can neither be read nor operated:
|
|
1322
|
+
* a card refreshing, a form submitting, a table re-fetching.
|
|
1323
|
+
*
|
|
1324
|
+
* Children get `inert` (no clicks, no Tab stops) and the host `aria-busy`.
|
|
1325
|
+
* `mkBlockUiDelay` (ms) holds the overlay back for quick operations so the
|
|
1326
|
+
* screen does not flash.
|
|
1327
|
+
*
|
|
1328
|
+
* ```html
|
|
1329
|
+
* <mk-card [mkBlockUi]="saving()" mkBlockUiMessage="Saving…">…</mk-card>
|
|
1330
|
+
* <form [mkBlockUi]="submitting()" [mkBlockUiDelay]="300">…</form>
|
|
1331
|
+
* ```
|
|
1332
|
+
*/
|
|
1333
|
+
declare class MkBlockUi {
|
|
1334
|
+
private readonly host;
|
|
1335
|
+
private readonly document;
|
|
1336
|
+
private readonly injector;
|
|
1337
|
+
private readonly appRef;
|
|
1338
|
+
/** Block while `true`. */
|
|
1339
|
+
readonly mkBlockUi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1340
|
+
/** Text under the spinner (also its accessible label). */
|
|
1341
|
+
readonly mkBlockUiMessage: _angular_core.InputSignal<string>;
|
|
1342
|
+
/** Wait this many ms before showing, to avoid a flash on fast operations. */
|
|
1343
|
+
readonly mkBlockUiDelay: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
1344
|
+
private mounted;
|
|
1345
|
+
private timer;
|
|
1346
|
+
constructor();
|
|
1347
|
+
private mount;
|
|
1348
|
+
private unmount;
|
|
1349
|
+
private cancelTimer;
|
|
1350
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBlockUi, never>;
|
|
1351
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MkBlockUi, "[mkBlockUi]", never, { "mkBlockUi": { "alias": "mkBlockUi"; "required": false; "isSignal": true; }; "mkBlockUiMessage": { "alias": "mkBlockUiMessage"; "required": false; "isSignal": true; }; "mkBlockUiDelay": { "alias": "mkBlockUiDelay"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Block the whole page. Reference-counted: every `block()` returns a release
|
|
1355
|
+
* function, and the overlay disappears once all of them have been called.
|
|
1356
|
+
*
|
|
1357
|
+
* ```ts
|
|
1358
|
+
* const release = this.blockUi.block('Exporting…');
|
|
1359
|
+
* try { await this.api.export(); } finally { release(); }
|
|
1360
|
+
* ```
|
|
1361
|
+
*/
|
|
1362
|
+
declare class MkBlockUiService {
|
|
1363
|
+
private readonly document;
|
|
1364
|
+
private readonly injector;
|
|
1365
|
+
private readonly appRef;
|
|
1366
|
+
private mounted;
|
|
1367
|
+
private readonly _count;
|
|
1368
|
+
/** Number of active blocks. */
|
|
1369
|
+
readonly count: _angular_core.Signal<number>;
|
|
1370
|
+
/** Show the page overlay (or update its message); call the returned function to release. */
|
|
1371
|
+
block(message?: string): () => void;
|
|
1372
|
+
/** True while the page is blocked. */
|
|
1373
|
+
isBlocked(): boolean;
|
|
1374
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBlockUiService, never>;
|
|
1375
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MkBlockUiService>;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
export { MK_TOUR_DATA, MkAlert, MkBanner, MkBlockUi, MkBlockUiOverlay, MkBlockUiService, MkBottomSheet, MkBottomSheetService, MkConfirmDialog, MkDialog, MkDialogService, MkDialogTitle, MkHovercard, MkHovercardTrigger, MkLoadingBar, MkLoadingBarService, MkNotificationCenter, MkPopconfirm, MkPopconfirmTrigger, MkPopover, MkPopoverTrigger, MkPromptDialog, MkResult, MkSnackbar, MkSnackbarContainer, MkSnackbarRef, MkSnackbarService, MkToast, MkToastContainer, MkToastService, MkTooltip, MkTooltipPanel, MkTourPopup, MkTourService };
|
|
1270
1379
|
export type { MkAlertTone, MkAlertVariant, MkBottomSheetConfig, MkConfirmDialogData, MkDialogConfig, MkDialogSize, MkNotification, MkPromptDialogData, MkResultIconVariant, MkResultStatus, MkResultTone, MkSnackbarConfig, MkSnackbarDismissReason, MkSnackbarItem, MkSnackbarTone, MkToastAction, MkToastConfig, MkToastItem, MkToastTone, MkTourController, MkTourData, MkTourStep };
|
|
@@ -83,8 +83,24 @@ declare class MkFormField implements MkFieldContext {
|
|
|
83
83
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
84
84
|
/** Control size; nested controls inherit it. */
|
|
85
85
|
readonly size: _angular_core.InputSignal<MkSize>;
|
|
86
|
+
/**
|
|
87
|
+
* Where the label sits: above the control (default), or `float` — inside
|
|
88
|
+
* the control, sliding up once it is focused or has a value. Floating works
|
|
89
|
+
* with `mkInput` / textarea and any control bound with `ngModel` or a
|
|
90
|
+
* `formControl`; the placeholder stays hidden until the label has moved.
|
|
91
|
+
*/
|
|
92
|
+
readonly labelPosition: _angular_core.InputSignal<"top" | "float">;
|
|
93
|
+
private readonly host;
|
|
86
94
|
/** The projected control's form binding, when it has one. */
|
|
87
95
|
private readonly ngControl;
|
|
96
|
+
/** A control inside the field has focus. */
|
|
97
|
+
protected readonly focused: _angular_core.WritableSignal<boolean>;
|
|
98
|
+
/** Last value read straight from a native control (fallback when no NgControl). */
|
|
99
|
+
private readonly domValue;
|
|
100
|
+
/** The field holds a non-empty value (drives the floating label). */
|
|
101
|
+
protected readonly hasValue: _angular_core.Signal<boolean>;
|
|
102
|
+
/** Track a native control's value for the floating label when nothing else reports it. */
|
|
103
|
+
protected readDomValue(target: EventTarget | null): void;
|
|
88
104
|
/**
|
|
89
105
|
* Bumped on every change of the bound control so the computed state below
|
|
90
106
|
* re-reads it. `AbstractControl` is not signal-based, so this bridges its
|
|
@@ -120,7 +136,7 @@ declare class MkFormField implements MkFieldContext {
|
|
|
120
136
|
*/
|
|
121
137
|
readonly describedBy: _angular_core.Signal<string | null>;
|
|
122
138
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkFormField, never>;
|
|
123
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkFormField, "mk-form-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "errorOn": { "alias": "errorOn"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, ["ngControl"], ["*"], true, never>;
|
|
139
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkFormField, "mk-form-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "errorOn": { "alias": "errorOn"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, {}, ["ngControl"], ["*"], true, never>;
|
|
124
140
|
}
|
|
125
141
|
|
|
126
142
|
/** One field-level error to surface in {@link MkFormErrorSummary}. */
|
|
@@ -602,6 +618,251 @@ declare class MkSelect implements ControlValueAccessor, OnDestroy {
|
|
|
602
618
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkSelect, "mk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
603
619
|
}
|
|
604
620
|
|
|
621
|
+
/** One row of an `mk-listbox`. */
|
|
622
|
+
interface MkListboxOption {
|
|
623
|
+
/** Text shown (and matched by typeahead / the filter). */
|
|
624
|
+
label: string;
|
|
625
|
+
/** Value committed to the model when selected. */
|
|
626
|
+
value: unknown;
|
|
627
|
+
/** Secondary line under the label. */
|
|
628
|
+
description?: string;
|
|
629
|
+
/** Skipped by keyboard, not selectable. */
|
|
630
|
+
disabled?: boolean;
|
|
631
|
+
/** Options sharing a `group` render under one heading (keep them adjacent). */
|
|
632
|
+
group?: string;
|
|
633
|
+
}
|
|
634
|
+
/** A rendered row: either a group heading or an option with its index in the visible list. */
|
|
635
|
+
type Row = {
|
|
636
|
+
kind: 'group';
|
|
637
|
+
label: string;
|
|
638
|
+
id: string;
|
|
639
|
+
} | {
|
|
640
|
+
kind: 'option';
|
|
641
|
+
option: MkListboxOption;
|
|
642
|
+
index: number;
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Listbox — a standalone, always-visible selection list (the ARIA `listbox`
|
|
646
|
+
* pattern) for one or many values: settings panes, "choose a template"
|
|
647
|
+
* pickers, side-by-side assignments, any place a dropdown would hide choices
|
|
648
|
+
* the user should see at once.
|
|
649
|
+
*
|
|
650
|
+
* Keyboard: Up / Down move, Home / End jump, PageUp / PageDown skip ten,
|
|
651
|
+
* type to jump to a label, Enter / Space select (toggle when `multiple`),
|
|
652
|
+
* Shift+Arrow / Shift+click extend a range, Ctrl/Cmd+A selects all. Focus
|
|
653
|
+
* stays on the list (`aria-activedescendant`). With `filterable`, a search
|
|
654
|
+
* box above the list narrows it by label or description.
|
|
655
|
+
*
|
|
656
|
+
* Implements `ControlValueAccessor` and a two-way `value` model — a single
|
|
657
|
+
* value, or an array when `multiple`.
|
|
658
|
+
*
|
|
659
|
+
* ```html
|
|
660
|
+
* <mk-listbox [options]="plans" [(value)]="plan" ariaLabel="Plan" />
|
|
661
|
+
* <mk-listbox multiple filterable [options]="people" [(ngModel)]="reviewers" />
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
declare class MkListbox implements ControlValueAccessor, OnDestroy {
|
|
665
|
+
private readonly field;
|
|
666
|
+
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
667
|
+
private readonly listRef;
|
|
668
|
+
/** The rows to choose from. */
|
|
669
|
+
readonly options: _angular_core.InputSignal<readonly MkListboxOption[]>;
|
|
670
|
+
/** Allow several values; the model becomes an array. */
|
|
671
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
672
|
+
/** Show a search box that narrows the list by label / description. */
|
|
673
|
+
readonly filterable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
674
|
+
readonly filterPlaceholder: _angular_core.InputSignal<string | undefined>;
|
|
675
|
+
/**
|
|
676
|
+
* Single-select only: moving with the arrow keys selects immediately
|
|
677
|
+
* (default `true`); `false` requires Enter / Space to commit.
|
|
678
|
+
*/
|
|
679
|
+
readonly selectionFollowsFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
680
|
+
/** Control size. Ignored when nested in an `mk-form-field`. */
|
|
681
|
+
readonly size: _angular_core.InputSignal<MkSize>;
|
|
682
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
683
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
684
|
+
/** Accessible name when there is no visible label / form field. */
|
|
685
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
686
|
+
readonly ariaLabelledby: _angular_core.InputSignal<string | undefined>;
|
|
687
|
+
/** Text shown when no option matches the filter. */
|
|
688
|
+
readonly emptyText: _angular_core.InputSignal<string | undefined>;
|
|
689
|
+
/** Two-way value: one value, or an array when `multiple`. */
|
|
690
|
+
readonly value: _angular_core.ModelSignal<unknown>;
|
|
691
|
+
/** Emitted after the user changes the selection (not on programmatic writes). */
|
|
692
|
+
readonly change: _angular_core.OutputEmitterRef<unknown>;
|
|
693
|
+
readonly listId: string;
|
|
694
|
+
protected readonly filterId: string;
|
|
695
|
+
protected readonly query: _angular_core.WritableSignal<string>;
|
|
696
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
697
|
+
private readonly cvaDisabled;
|
|
698
|
+
private onChange;
|
|
699
|
+
private onTouched;
|
|
700
|
+
private typeahead;
|
|
701
|
+
private typeaheadTimer?;
|
|
702
|
+
/** Range anchor for Shift selection (index in the visible list). */
|
|
703
|
+
private anchor;
|
|
704
|
+
protected readonly effectiveSize: _angular_core.Signal<MkSize>;
|
|
705
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
706
|
+
protected readonly isInvalid: _angular_core.Signal<boolean>;
|
|
707
|
+
protected readonly labelledBy: _angular_core.Signal<string | null>;
|
|
708
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
709
|
+
/** Options that match the filter, in source order. */
|
|
710
|
+
protected readonly visible: _angular_core.Signal<MkListboxOption[]>;
|
|
711
|
+
/** Visible options with group headings interleaved. */
|
|
712
|
+
protected readonly rows: _angular_core.Signal<Row[]>;
|
|
713
|
+
protected readonly selectedValues: _angular_core.Signal<unknown[]>;
|
|
714
|
+
protected readonly activeId: _angular_core.Signal<string | null>;
|
|
715
|
+
constructor();
|
|
716
|
+
protected optionId(index: number): string;
|
|
717
|
+
protected isSelected(option: MkListboxOption): boolean;
|
|
718
|
+
/** Focus the list. */
|
|
719
|
+
focus(): void;
|
|
720
|
+
protected onOptionClick(index: number, event: MouseEvent): void;
|
|
721
|
+
protected onFilterInput(event: Event): void;
|
|
722
|
+
protected onFilterKeydown(event: KeyboardEvent): void;
|
|
723
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
724
|
+
protected onBlur(): void;
|
|
725
|
+
/** Move the active row by `delta` (wrapping for ±1), extending the selection with Shift. */
|
|
726
|
+
private step;
|
|
727
|
+
private jump;
|
|
728
|
+
private firstEnabled;
|
|
729
|
+
private lastEnabled;
|
|
730
|
+
private typeaheadSearch;
|
|
731
|
+
private commit;
|
|
732
|
+
/** Select every enabled option between two visible indexes (replacing, or adding to, the selection). */
|
|
733
|
+
private selectRange;
|
|
734
|
+
private selectAll;
|
|
735
|
+
private emit;
|
|
736
|
+
ngOnDestroy(): void;
|
|
737
|
+
writeValue(value: unknown): void;
|
|
738
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
739
|
+
registerOnTouched(fn: () => void): void;
|
|
740
|
+
setDisabledState(isDisabled: boolean): void;
|
|
741
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkListbox, never>;
|
|
742
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkListbox, "mk-listbox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "selectionFollowsFocus": { "alias": "selectionFollowsFocus"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "change": "change"; }, never, never, true, never>;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/** One node of a cascader: a leaf, or a parent with `children`. */
|
|
746
|
+
interface MkCascaderOption {
|
|
747
|
+
label: string;
|
|
748
|
+
value: unknown;
|
|
749
|
+
children?: readonly MkCascaderOption[];
|
|
750
|
+
disabled?: boolean;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Cascader — a select whose choices are a hierarchy shown as side-by-side
|
|
754
|
+
* columns (region → country → city, category → subcategory, org unit → team).
|
|
755
|
+
* Each pick opens the next column; picking a leaf commits the whole path.
|
|
756
|
+
*
|
|
757
|
+
* The value is the **path** of option values (`['eu', 'pl', 'krk']`) by
|
|
758
|
+
* default, or just the leaf's value with `valueMode="leaf"`. Parents are only
|
|
759
|
+
* selectable with `selectParents` (a click on one then commits, and its
|
|
760
|
+
* children stay reachable).
|
|
761
|
+
*
|
|
762
|
+
* Keyboard: Up / Down move within a column, Right opens the children, Left
|
|
763
|
+
* goes back, Enter / Space selects, typing jumps to a label, Escape closes.
|
|
764
|
+
* `expandTrigger="hover"` opens columns on pointer hover as well as click.
|
|
765
|
+
*
|
|
766
|
+
* Implements `ControlValueAccessor` and a two-way `value` model.
|
|
767
|
+
*
|
|
768
|
+
* ```html
|
|
769
|
+
* <mk-cascader [options]="regions" [(value)]="location" placeholder="Where?" clearable />
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
declare class MkCascader implements ControlValueAccessor, OnDestroy {
|
|
773
|
+
private readonly field;
|
|
774
|
+
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
775
|
+
private readonly host;
|
|
776
|
+
private readonly injector;
|
|
777
|
+
private readonly triggerRef;
|
|
778
|
+
private readonly panelRef;
|
|
779
|
+
/** The hierarchy to choose from. */
|
|
780
|
+
readonly options: _angular_core.InputSignal<readonly MkCascaderOption[]>;
|
|
781
|
+
/** Two-way value: the path of values (default) or the leaf value (`valueMode="leaf"`). */
|
|
782
|
+
readonly value: _angular_core.ModelSignal<unknown>;
|
|
783
|
+
/** Bind the full path of values (default) or only the chosen option's value. */
|
|
784
|
+
readonly valueMode: _angular_core.InputSignal<"path" | "leaf">;
|
|
785
|
+
/** Allow committing a parent option (click / Enter on it) instead of leaves only. */
|
|
786
|
+
readonly selectParents: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
787
|
+
/** Open the next column on click (default) or also on pointer hover. */
|
|
788
|
+
readonly expandTrigger: _angular_core.InputSignal<"click" | "hover">;
|
|
789
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
790
|
+
/** Text between the labels of the chosen path. */
|
|
791
|
+
readonly separator: _angular_core.InputSignal<string>;
|
|
792
|
+
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
793
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
794
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
795
|
+
/** Control size. Ignored when nested in an `mk-form-field`. */
|
|
796
|
+
readonly size: _angular_core.InputSignal<MkSize>;
|
|
797
|
+
/** Emitted after the user commits or clears a value. */
|
|
798
|
+
readonly change: _angular_core.OutputEmitterRef<unknown>;
|
|
799
|
+
readonly triggerId: string;
|
|
800
|
+
readonly panelId: string;
|
|
801
|
+
readonly valueId: string;
|
|
802
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
803
|
+
/** Row index highlighted in each open column, left to right. */
|
|
804
|
+
protected readonly activePath: _angular_core.WritableSignal<number[]>;
|
|
805
|
+
private readonly cvaDisabled;
|
|
806
|
+
private onChange;
|
|
807
|
+
private onTouched;
|
|
808
|
+
private typeahead;
|
|
809
|
+
private typeaheadTimer?;
|
|
810
|
+
protected readonly effectiveSize: _angular_core.Signal<MkSize>;
|
|
811
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
812
|
+
protected readonly isInvalid: _angular_core.Signal<boolean>;
|
|
813
|
+
protected readonly isRequired: _angular_core.Signal<boolean>;
|
|
814
|
+
protected readonly labelledBy: _angular_core.Signal<string | null>;
|
|
815
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
816
|
+
/** The options along the committed value, or `[]`. */
|
|
817
|
+
protected readonly selectedPath: _angular_core.Signal<MkCascaderOption[]>;
|
|
818
|
+
protected readonly displayLabel: _angular_core.Signal<string>;
|
|
819
|
+
/**
|
|
820
|
+
* Columns rendered in the panel: the root list, then the children of every
|
|
821
|
+
* opened parent along the active path. The last entry of the path is the
|
|
822
|
+
* cursor — resting on a parent does not open it (click, hover or → does).
|
|
823
|
+
*/
|
|
824
|
+
protected readonly columns: _angular_core.Signal<readonly MkCascaderOption[][]>;
|
|
825
|
+
/** The column the keyboard cursor is in. */
|
|
826
|
+
private readonly cursorColumn;
|
|
827
|
+
protected readonly activeId: _angular_core.Signal<string | null>;
|
|
828
|
+
constructor();
|
|
829
|
+
protected optionId(column: number, row: number): string;
|
|
830
|
+
protected isOnPath(column: number, row: number): boolean;
|
|
831
|
+
protected isSelected(column: number, option: MkCascaderOption): boolean;
|
|
832
|
+
protected isCursor(column: number, row: number): boolean;
|
|
833
|
+
protected toggle(): void;
|
|
834
|
+
protected openPanel(): void;
|
|
835
|
+
protected close(restoreFocus?: boolean): void;
|
|
836
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
837
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
838
|
+
protected onPanelFocusout(event: FocusEvent): void;
|
|
839
|
+
protected onOptionClick(column: number, row: number): void;
|
|
840
|
+
protected onOptionHover(column: number, row: number): void;
|
|
841
|
+
protected clear(event: Event): void;
|
|
842
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
843
|
+
/** Point the cursor at `(column, row)`, trimming any deeper columns. */
|
|
844
|
+
private setCursor;
|
|
845
|
+
/** Open the children of `(column, row)` and move the cursor onto the first enabled one. */
|
|
846
|
+
private expand;
|
|
847
|
+
private stepRow;
|
|
848
|
+
private firstEnabled;
|
|
849
|
+
private lastEnabled;
|
|
850
|
+
private typeaheadSearch;
|
|
851
|
+
private commit;
|
|
852
|
+
private emit;
|
|
853
|
+
/** Row indexes of a path of options. */
|
|
854
|
+
private indexPath;
|
|
855
|
+
/** Depth-first search for the option whose value is `value` (leaf mode). */
|
|
856
|
+
private findPath;
|
|
857
|
+
ngOnDestroy(): void;
|
|
858
|
+
writeValue(value: unknown): void;
|
|
859
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
860
|
+
registerOnTouched(fn: () => void): void;
|
|
861
|
+
setDisabledState(isDisabled: boolean): void;
|
|
862
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkCascader, never>;
|
|
863
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkCascader, "mk-cascader", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueMode": { "alias": "valueMode"; "required": false; "isSignal": true; }; "selectParents": { "alias": "selectParents"; "required": false; "isSignal": true; }; "expandTrigger": { "alias": "expandTrigger"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "change": "change"; }, never, never, true, never>;
|
|
864
|
+
}
|
|
865
|
+
|
|
605
866
|
/** A single suggestion for {@link MkAutocomplete}. */
|
|
606
867
|
interface MkAutocompleteOption {
|
|
607
868
|
/** Text shown to the user and used as the input display value when chosen. */
|
|
@@ -3582,5 +3843,5 @@ declare class MkRangeSlider implements ControlValueAccessor, Validator, OnDestro
|
|
|
3582
3843
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkRangeSlider, "mk-range-slider", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
3583
3844
|
}
|
|
3584
3845
|
|
|
3585
|
-
export { MK_CARD_BRAND_NAMES, MK_IBAN_LENGTHS, MK_KEYBOARD_LAYOUT_QWERTY_PL, MK_PHONE_COUNTRIES, MK_POSTAL_FORMATS, MK_TAX_ID_FORMATS, MkAutocomplete, MkButtonToggle, MkButtonToggleGroup, MkCardNumberInput, MkCodeEditor, MkColorPicker, MkCurrencyInput, MkFileUpload, MkFormErrorSummary, MkFormField, MkI18nInput, MkIbanInput, MkInput, MkInputGroup, MkMention, MkMentionPanel, MkMultiSelect, MkNumberInput, MkNumericKeypad, MkOnScreenKeyboard, MkOnScreenKeyboardTrigger, MkOtp, MkPasswordInput, MkPhoneInput, MkPostalCodeInput, MkRadio, MkRadioGroup, MkRangeSlider, MkRating, MkRepeater, MkRepeaterEmpty, MkRepeaterRow, MkSelect, MkSignaturePad, MkSlider, MkSubmitInput, MkSwitch, MkTagInput, MkTaxIdInput, MkTransferList, MkTreeSelect, mkCountryFlag, mkDetectCardBrand, mkIbanChecksum, mkIbanIsValid, mkIbanValidator, mkLuhnCheck, mkNipChecksum, mkPostalCodeValidator, mkPostalFormat, mkTaxIdFormat, mkTaxIdIsValid, mkTaxIdValidator };
|
|
3586
|
-
export type { MkAutocompleteFilterMode, MkAutocompleteOption, MkCardBrand, MkCodeValidity, MkFormError, MkI18nLocale, MkI18nValue, MkKeyboardActionKey, MkKeyboardKey, MkKeyboardLayout, MkMentionFilterMode, MkMentionOption, MkMentionSearchEvent, MkMentionSelectEvent, MkMultiSelectFilterMode, MkMultiSelectOption, MkNumericKeypadMode, MkOnScreenKeyboardTarget, MkPasswordRule, MkPhoneCountry, MkPhoneValue, MkPostalFormat, MkRange, MkRepeaterRowContext, MkSelectOption, MkTaxIdFormat, MkTransferItem, MkUploadFile, MkUploadFn, MkUploadRejection, MkUploadStatus, MkUploadValueFormat };
|
|
3846
|
+
export { MK_CARD_BRAND_NAMES, MK_IBAN_LENGTHS, MK_KEYBOARD_LAYOUT_QWERTY_PL, MK_PHONE_COUNTRIES, MK_POSTAL_FORMATS, MK_TAX_ID_FORMATS, MkAutocomplete, MkButtonToggle, MkButtonToggleGroup, MkCardNumberInput, MkCascader, MkCodeEditor, MkColorPicker, MkCurrencyInput, MkFileUpload, MkFormErrorSummary, MkFormField, MkI18nInput, MkIbanInput, MkInput, MkInputGroup, MkListbox, MkMention, MkMentionPanel, MkMultiSelect, MkNumberInput, MkNumericKeypad, MkOnScreenKeyboard, MkOnScreenKeyboardTrigger, MkOtp, MkPasswordInput, MkPhoneInput, MkPostalCodeInput, MkRadio, MkRadioGroup, MkRangeSlider, MkRating, MkRepeater, MkRepeaterEmpty, MkRepeaterRow, MkSelect, MkSignaturePad, MkSlider, MkSubmitInput, MkSwitch, MkTagInput, MkTaxIdInput, MkTransferList, MkTreeSelect, mkCountryFlag, mkDetectCardBrand, mkIbanChecksum, mkIbanIsValid, mkIbanValidator, mkLuhnCheck, mkNipChecksum, mkPostalCodeValidator, mkPostalFormat, mkTaxIdFormat, mkTaxIdIsValid, mkTaxIdValidator };
|
|
3847
|
+
export type { MkAutocompleteFilterMode, MkAutocompleteOption, MkCardBrand, MkCascaderOption, MkCodeValidity, MkFormError, MkI18nLocale, MkI18nValue, MkKeyboardActionKey, MkKeyboardKey, MkKeyboardLayout, MkListboxOption, MkMentionFilterMode, MkMentionOption, MkMentionSearchEvent, MkMentionSelectEvent, MkMultiSelectFilterMode, MkMultiSelectOption, MkNumericKeypadMode, MkOnScreenKeyboardTarget, MkPasswordRule, MkPhoneCountry, MkPhoneValue, MkPostalFormat, MkRange, MkRepeaterRowContext, MkSelectOption, MkTaxIdFormat, MkTransferItem, MkUploadFile, MkUploadFn, MkUploadRejection, MkUploadStatus, MkUploadValueFormat };
|
|
@@ -37,7 +37,8 @@ declare class MkIcon {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* IconRegistry — the name → SVG store behind `<mk-icon name="…">`. The built-in
|
|
40
|
-
* {@link MK_DEFAULT_ICONS}
|
|
40
|
+
* sets — the hand-made {@link MK_DEFAULT_ICONS} and the Lucide-derived
|
|
41
|
+
* {@link MK_EXTENDED_ICONS} — are registered on construction; add your own SVGs
|
|
41
42
|
* (from a sprite, a design export, anything) with {@link register} /
|
|
42
43
|
* {@link registerIcons}.
|
|
43
44
|
*
|
|
@@ -105,4 +106,7 @@ declare const MK_MATERIAL_ICON_ALIASES: Readonly<Record<string, string>>;
|
|
|
105
106
|
*/
|
|
106
107
|
declare function provideMkMaterialIcons(): EnvironmentProviders;
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
/** Name → SVG markup map of the Lucide-derived icons registered by default. */
|
|
110
|
+
declare const MK_EXTENDED_ICONS: Readonly<Record<string, string>>;
|
|
111
|
+
|
|
112
|
+
export { MK_DEFAULT_ICONS, MK_EXTENDED_ICONS, MK_MATERIAL_ICON_ALIASES, MkIcon, MkIconRegistry, provideMkMaterialIcons };
|