@mk-kit/ui 0.52.1 → 0.53.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/fesm2022/mk-kit-ui-data.mjs +5 -417
- package/fesm2022/mk-kit-ui-data.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-feedback.mjs +1 -1
- package/fesm2022/mk-kit-ui-feedback.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-kanban.mjs +133 -0
- package/fesm2022/mk-kit-ui-kanban.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-status.mjs +318 -0
- package/fesm2022/mk-kit-ui-status.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-table.mjs +49 -1
- package/fesm2022/mk-kit-ui-table.mjs.map +1 -1
- package/fesm2022/mk-kit-ui.mjs +2 -0
- package/fesm2022/mk-kit-ui.mjs.map +1 -1
- package/package.json +9 -1
- package/types/mk-kit-ui-data.d.ts +3 -247
- package/types/mk-kit-ui-kanban.d.ts +98 -0
- package/types/mk-kit-ui-status.d.ts +158 -0
- package/types/mk-kit-ui-table.d.ts +26 -2
- package/types/mk-kit-ui.d.ts +2 -0
package/fesm2022/mk-kit-ui.mjs
CHANGED
|
@@ -11,7 +11,9 @@ export * from '@mk-kit/ui/navigation';
|
|
|
11
11
|
export * from '@mk-kit/ui/forms';
|
|
12
12
|
export * from '@mk-kit/ui/datetime';
|
|
13
13
|
export * from '@mk-kit/ui/table';
|
|
14
|
+
export * from '@mk-kit/ui/status';
|
|
14
15
|
export * from '@mk-kit/ui/data';
|
|
16
|
+
export * from '@mk-kit/ui/kanban';
|
|
15
17
|
export * from '@mk-kit/ui/feedback';
|
|
16
18
|
export * from '@mk-kit/ui/rich-text';
|
|
17
19
|
export * from '@mk-kit/ui/block-editor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mk-kit-ui.mjs","sources":["../../../projects/mk-kit/src/public-api.ts","../../../projects/mk-kit/src/mk-kit-ui.ts"],"sourcesContent":["/*\n * Public API Surface of @mk-kit/ui.\n *\n * The library ships Material-style secondary entry points — import from the\n * group entries (`@mk-kit/ui/forms`, `@mk-kit/ui/table`, …) so a code-split\n * app only carries the groups each chunk uses. This root entry re-exports\n * everything for convenience; importing it eagerly pulls all groups into the\n * importing chunk.\n */\nexport * from '@mk-kit/ui/core';\nexport * from '@mk-kit/ui/core/signal-forms';\nexport * from '@mk-kit/ui/icon';\nexport * from '@mk-kit/ui/icon/extended';\nexport * from '@mk-kit/ui/chip';\nexport * from '@mk-kit/ui/checkbox';\nexport * from '@mk-kit/ui/button';\nexport * from '@mk-kit/ui/directives';\nexport * from '@mk-kit/ui/dnd';\nexport * from '@mk-kit/ui/navigation';\nexport * from '@mk-kit/ui/forms';\nexport * from '@mk-kit/ui/datetime';\nexport * from '@mk-kit/ui/table';\nexport * from '@mk-kit/ui/data';\nexport * from '@mk-kit/ui/feedback';\nexport * from '@mk-kit/ui/rich-text';\nexport * from '@mk-kit/ui/block-editor';\nexport * from '@mk-kit/ui/context-menu';\nexport * from '@mk-kit/ui/layout';\nexport * from '@mk-kit/ui/chat';\nexport * from '@mk-kit/ui/query-builder';\nexport * from '@mk-kit/ui/dynamic-form';\nexport * from '@mk-kit/ui/media';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mk-kit-ui.mjs","sources":["../../../projects/mk-kit/src/public-api.ts","../../../projects/mk-kit/src/mk-kit-ui.ts"],"sourcesContent":["/*\n * Public API Surface of @mk-kit/ui.\n *\n * The library ships Material-style secondary entry points — import from the\n * group entries (`@mk-kit/ui/forms`, `@mk-kit/ui/table`, …) so a code-split\n * app only carries the groups each chunk uses. This root entry re-exports\n * everything for convenience; importing it eagerly pulls all groups into the\n * importing chunk.\n */\nexport * from '@mk-kit/ui/core';\nexport * from '@mk-kit/ui/core/signal-forms';\nexport * from '@mk-kit/ui/icon';\nexport * from '@mk-kit/ui/icon/extended';\nexport * from '@mk-kit/ui/chip';\nexport * from '@mk-kit/ui/checkbox';\nexport * from '@mk-kit/ui/button';\nexport * from '@mk-kit/ui/directives';\nexport * from '@mk-kit/ui/dnd';\nexport * from '@mk-kit/ui/navigation';\nexport * from '@mk-kit/ui/forms';\nexport * from '@mk-kit/ui/datetime';\nexport * from '@mk-kit/ui/table';\nexport * from '@mk-kit/ui/status';\nexport * from '@mk-kit/ui/data';\nexport * from '@mk-kit/ui/kanban';\nexport * from '@mk-kit/ui/feedback';\nexport * from '@mk-kit/ui/rich-text';\nexport * from '@mk-kit/ui/block-editor';\nexport * from '@mk-kit/ui/context-menu';\nexport * from '@mk-kit/ui/layout';\nexport * from '@mk-kit/ui/chat';\nexport * from '@mk-kit/ui/query-builder';\nexport * from '@mk-kit/ui/dynamic-form';\nexport * from '@mk-kit/ui/media';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQG;;ACRH;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mk-kit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -129,6 +129,10 @@
|
|
|
129
129
|
"types": "./types/mk-kit-ui-icon-extended.d.ts",
|
|
130
130
|
"default": "./fesm2022/mk-kit-ui-icon-extended.mjs"
|
|
131
131
|
},
|
|
132
|
+
"./kanban": {
|
|
133
|
+
"types": "./types/mk-kit-ui-kanban.d.ts",
|
|
134
|
+
"default": "./fesm2022/mk-kit-ui-kanban.mjs"
|
|
135
|
+
},
|
|
132
136
|
"./layout": {
|
|
133
137
|
"types": "./types/mk-kit-ui-layout.d.ts",
|
|
134
138
|
"default": "./fesm2022/mk-kit-ui-layout.mjs"
|
|
@@ -169,6 +173,10 @@
|
|
|
169
173
|
"types": "./types/mk-kit-ui-rich-text.d.ts",
|
|
170
174
|
"default": "./fesm2022/mk-kit-ui-rich-text.mjs"
|
|
171
175
|
},
|
|
176
|
+
"./status": {
|
|
177
|
+
"types": "./types/mk-kit-ui-status.d.ts",
|
|
178
|
+
"default": "./fesm2022/mk-kit-ui-status.mjs"
|
|
179
|
+
},
|
|
172
180
|
"./table": {
|
|
173
181
|
"types": "./types/mk-kit-ui-table.d.ts",
|
|
174
182
|
"default": "./fesm2022/mk-kit-ui-table.mjs"
|
|
@@ -6,7 +6,7 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
|
6
6
|
import * as _mk_kit_core from '@mk-kit/core';
|
|
7
7
|
import { MkDiffRow } from '@mk-kit/core';
|
|
8
8
|
export { MkAnsiSpan, MkDiffOp, MkDiffOptions, MkDiffRow, MkDiffSegment, MkDiffStats, MkMarkdownAlign, MkMarkdownBlock, MkMarkdownInline, MkMarkdownList, MkMarkdownListItem, MkMarkdownParseOptions, MkMarkdownRenderOptions, mkComputeDiff, mkDiffStats, mkParseAnsi, mkParseMarkdown, mkRenderMarkdown, mkStripAnsi } from '@mk-kit/core';
|
|
9
|
-
|
|
9
|
+
export * from '@mk-kit/ui/status';
|
|
10
10
|
|
|
11
11
|
/** Surface treatment for a {@link MkCard}. */
|
|
12
12
|
type MkCardVariant = 'elevated' | 'outlined' | 'filled';
|
|
@@ -84,106 +84,6 @@ declare class MkDivider {
|
|
|
84
84
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDivider, "mk-divider", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/** Visual treatment for a {@link MkBadge}. */
|
|
88
|
-
type MkBadgeVariant = 'solid' | 'soft' | 'outline';
|
|
89
|
-
/**
|
|
90
|
-
* Badge — a compact status pill, typically for counts or short state labels.
|
|
91
|
-
* Set `dot` for a minimal notification indicator with no text.
|
|
92
|
-
*
|
|
93
|
-
* ```html
|
|
94
|
-
* <mk-badge tone="success">Active</mk-badge>
|
|
95
|
-
* <mk-badge tone="danger" variant="solid">3</mk-badge>
|
|
96
|
-
* <mk-badge tone="danger" dot aria-label="Unread messages" />
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
declare class MkBadge {
|
|
100
|
-
/** Semantic color tone. */
|
|
101
|
-
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
102
|
-
/** Visual treatment. */
|
|
103
|
-
readonly variant: _angular_core.InputSignal<MkBadgeVariant>;
|
|
104
|
-
/** Size scale. */
|
|
105
|
-
readonly size: _angular_core.InputSignal<MkSize>;
|
|
106
|
-
/** Render as a tiny dot (no text) for notification indicators. */
|
|
107
|
-
readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
108
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBadge, never>;
|
|
109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkBadge, "mk-badge", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** Corner of the host an {@link MkBadgeOverlay} is anchored to. */
|
|
113
|
-
type MkBadgeOverlayPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start';
|
|
114
|
-
/**
|
|
115
|
-
* Badge overlay — anchors a small badge (count, dot or short text) to a corner
|
|
116
|
-
* of ANY element: an icon button, an avatar, a tab label. The host stays a
|
|
117
|
-
* single tab stop; the badge is a decorative, non-focusable child.
|
|
118
|
-
*
|
|
119
|
-
* - Numbers above `mkBadgeOverlayMax` (default 99) collapse to `99+`.
|
|
120
|
-
* - `mkBadgeOverlayDot` renders a textless dot ("something is new").
|
|
121
|
-
* - `mkBadgeOverlayAriaLabel` is the screen-reader text ("3 unread"). It is
|
|
122
|
-
* rendered in a visually hidden span and wired to the host with
|
|
123
|
-
* `aria-describedby`, so it is announced after the host's own name even
|
|
124
|
-
* when the host has an `aria-label`. When it is given, the visible badge is
|
|
125
|
-
* `aria-hidden` so the count is not read twice.
|
|
126
|
-
* - Positions use logical insets, so `top-end` sits at the top-right in LTR
|
|
127
|
-
* and the top-left in RTL.
|
|
128
|
-
*
|
|
129
|
-
* The badge is painted with the global `.mk-badge-overlay` styles from
|
|
130
|
-
* `@mk-kit/ui/styles.css` and follows the `--mk-*` tone tokens.
|
|
131
|
-
*
|
|
132
|
-
* ```html
|
|
133
|
-
* <button mkButton iconOnly aria-label="Notifications"
|
|
134
|
-
* [mkBadgeOverlay]="unread()" mkBadgeOverlayTone="danger"
|
|
135
|
-
* [mkBadgeOverlayAriaLabel]="unread() + ' unread'">
|
|
136
|
-
* <mk-icon name="bell" />
|
|
137
|
-
* </button>
|
|
138
|
-
*
|
|
139
|
-
* <mk-avatar name="Ada Lovelace" mkBadgeOverlay mkBadgeOverlayDot
|
|
140
|
-
* mkBadgeOverlayTone="success" mkBadgeOverlayPosition="bottom-end" />
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
143
|
-
declare class MkBadgeOverlay {
|
|
144
|
-
private readonly host;
|
|
145
|
-
private readonly renderer;
|
|
146
|
-
private readonly document;
|
|
147
|
-
private readonly isBrowser;
|
|
148
|
-
/**
|
|
149
|
-
* Badge content — a count or a short label. `null` / empty hides the badge
|
|
150
|
-
* unless `mkBadgeOverlayDot` is set. Numeric strings are treated as numbers
|
|
151
|
-
* so `mkBadgeOverlay="120"` also collapses to `99+`.
|
|
152
|
-
*/
|
|
153
|
-
readonly content: _angular_core.InputSignal<string | number | null | undefined>;
|
|
154
|
-
/** Corner the badge is anchored to (logical: `end` flips in RTL). */
|
|
155
|
-
readonly position: _angular_core.InputSignal<MkBadgeOverlayPosition>;
|
|
156
|
-
/** Semantic color tone (same scale as `mk-badge`). */
|
|
157
|
-
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
158
|
-
/** Render a textless dot instead of the content. */
|
|
159
|
-
readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
160
|
-
/** Numbers above this render as `<max>+`. `0` disables the cap. */
|
|
161
|
-
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
162
|
-
/** Hide the badge while keeping the directive (and its aria wiring) in place. */
|
|
163
|
-
readonly hidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
164
|
-
/**
|
|
165
|
-
* Screen-reader text for the badge, e.g. `"3 unread"`. Announced as the
|
|
166
|
-
* host's description; the visible badge becomes `aria-hidden`.
|
|
167
|
-
*/
|
|
168
|
-
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
169
|
-
/** The text painted in the badge (`''` in dot mode). */
|
|
170
|
-
readonly label: _angular_core.Signal<string>;
|
|
171
|
-
/** Whether the badge is currently rendered. */
|
|
172
|
-
readonly visible: _angular_core.Signal<boolean>;
|
|
173
|
-
private readonly srId;
|
|
174
|
-
private badge;
|
|
175
|
-
private sr;
|
|
176
|
-
/** Set when WE made the host positioned, so we can undo it on removal. */
|
|
177
|
-
private positionedHost;
|
|
178
|
-
constructor();
|
|
179
|
-
private attach;
|
|
180
|
-
private detach;
|
|
181
|
-
/** Create / update / remove the hidden description and its aria-describedby link. */
|
|
182
|
-
private syncSr;
|
|
183
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBadgeOverlay, never>;
|
|
184
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MkBadgeOverlay, "[mkBadgeOverlay]", never, { "content": { "alias": "mkBadgeOverlay"; "required": false; "isSignal": true; }; "position": { "alias": "mkBadgeOverlayPosition"; "required": false; "isSignal": true; }; "tone": { "alias": "mkBadgeOverlayTone"; "required": false; "isSignal": true; }; "dot": { "alias": "mkBadgeOverlayDot"; "required": false; "isSignal": true; }; "max": { "alias": "mkBadgeOverlayMax"; "required": false; "isSignal": true; }; "hidden": { "alias": "mkBadgeOverlayHidden"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "mkBadgeOverlayAriaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
87
|
/** Visual treatment for a {@link MkTag}. */
|
|
188
88
|
type MkTagVariant = 'solid' | 'soft' | 'outline';
|
|
189
89
|
/**
|
|
@@ -315,36 +215,6 @@ declare class MkListItem {
|
|
|
315
215
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkListItem, "mk-list-item", never, { "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[mkListLeading]", "*", "[mkListTrailing]"], true, never>;
|
|
316
216
|
}
|
|
317
217
|
|
|
318
|
-
/**
|
|
319
|
-
* EmptyState — a centered placeholder for "nothing here yet" situations: empty
|
|
320
|
-
* tables, no search results, a fresh dashboard, a cleared inbox. Provide a
|
|
321
|
-
* `title` (and usually a `description`), an `icon` or projected media, and
|
|
322
|
-
* call-to-action buttons via the actions slot.
|
|
323
|
-
*
|
|
324
|
-
* Slots: `[mkEmptyStateMedia]` (custom illustration, overrides `icon`), default
|
|
325
|
-
* content (extra body), `[mkEmptyStateActions]` (buttons).
|
|
326
|
-
*
|
|
327
|
-
* ```html
|
|
328
|
-
* <mk-empty-state icon="search" title="No results"
|
|
329
|
-
* description="Try adjusting your filters.">
|
|
330
|
-
* <button mkButton mkEmptyStateActions variant="outline">Clear filters</button>
|
|
331
|
-
* </mk-empty-state>
|
|
332
|
-
* ```
|
|
333
|
-
*/
|
|
334
|
-
declare class MkEmptyState {
|
|
335
|
-
/** Name of a registered icon shown above the title (ignored if media is projected). */
|
|
336
|
-
readonly icon: _angular_core.InputSignal<string>;
|
|
337
|
-
/** Main heading, e.g. "No invoices yet". */
|
|
338
|
-
readonly title: _angular_core.InputSignal<string>;
|
|
339
|
-
/** Supporting sentence under the title. */
|
|
340
|
-
readonly description: _angular_core.InputSignal<string>;
|
|
341
|
-
/** Overall scale of the block. */
|
|
342
|
-
readonly size: _angular_core.InputSignal<MkSize>;
|
|
343
|
-
protected readonly iconSize: () => 28 | 48 | 36;
|
|
344
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkEmptyState, never>;
|
|
345
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkEmptyState, "mk-empty-state", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["[mkEmptyStateMedia]", "*", "[mkEmptyStateActions]"], true, never>;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
218
|
/**
|
|
349
219
|
* Timeline — a vertical sequence of chronological events (activity feeds, order
|
|
350
220
|
* status, audit logs). A container for `<mk-timeline-item>`s that draws the
|
|
@@ -796,28 +666,6 @@ declare class MkProgressRing {
|
|
|
796
666
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkProgressRing, "mk-progress-ring", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
797
667
|
}
|
|
798
668
|
|
|
799
|
-
/**
|
|
800
|
-
* Spinner — a circular indeterminate loading indicator. Exposes `role="status"`
|
|
801
|
-
* with a visually-hidden label so assistive tech announces the loading state.
|
|
802
|
-
* The animation slows under `prefers-reduced-motion`.
|
|
803
|
-
*
|
|
804
|
-
* ```html
|
|
805
|
-
* <mk-spinner />
|
|
806
|
-
* <mk-spinner size="lg" tone="neutral" label="Fetching results" />
|
|
807
|
-
* ```
|
|
808
|
-
*/
|
|
809
|
-
declare class MkSpinner {
|
|
810
|
-
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
811
|
-
/** Size scale. */
|
|
812
|
-
readonly size: _angular_core.InputSignal<MkSize>;
|
|
813
|
-
/** Semantic color tone. */
|
|
814
|
-
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
815
|
-
/** Visually-hidden status label announced to screen readers. */
|
|
816
|
-
readonly label: _angular_core.InputSignal<string>;
|
|
817
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkSpinner, never>;
|
|
818
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkSpinner, "mk-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
669
|
/**
|
|
822
670
|
* Shared, framework-agnostic helpers for the mk-kit SVG charts. Pure functions
|
|
823
671
|
* only — no Angular, no DOM — so they stay trivially testable and reusable.
|
|
@@ -2442,98 +2290,6 @@ declare class MkDiff {
|
|
|
2442
2290
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDiff, "mk-diff", never, { "before": { "alias": "before"; "required": false; "isSignal": true; }; "after": { "alias": "after"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "wordHighlight": { "alias": "wordHighlight"; "required": false; "isSignal": true; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "ignoreTrailingWhitespace": { "alias": "ignoreTrailingWhitespace"; "required": false; "isSignal": true; }; "showStats": { "alias": "showStats"; "required": false; "isSignal": true; }; "beforeLabel": { "alias": "beforeLabel"; "required": false; "isSignal": true; }; "afterLabel": { "alias": "afterLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2443
2291
|
}
|
|
2444
2292
|
|
|
2445
|
-
/** A single draggable card on a {@link MkKanban} board. */
|
|
2446
|
-
interface MkKanbanCard {
|
|
2447
|
-
/** Stable identity used for tracking and move events. */
|
|
2448
|
-
id: unknown;
|
|
2449
|
-
/** Text shown by the default card renderer. */
|
|
2450
|
-
title: string;
|
|
2451
|
-
/** Arbitrary extra fields for custom card templates. */
|
|
2452
|
-
[key: string]: unknown;
|
|
2453
|
-
}
|
|
2454
|
-
/** A column (bucket) of {@link MkKanbanCard}s on a {@link MkKanban} board. */
|
|
2455
|
-
interface MkKanbanColumn {
|
|
2456
|
-
/** Stable identity used for tracking and move events. */
|
|
2457
|
-
id: unknown;
|
|
2458
|
-
/** Heading shown in the column header and used as its aria-label. */
|
|
2459
|
-
title: string;
|
|
2460
|
-
/** The ordered cards contained in this column. */
|
|
2461
|
-
cards: MkKanbanCard[];
|
|
2462
|
-
}
|
|
2463
|
-
/**
|
|
2464
|
-
* Emitted by {@link MkKanban} after a card has been moved (between or within
|
|
2465
|
-
* columns) and the two-way `columns` model has been updated.
|
|
2466
|
-
*/
|
|
2467
|
-
interface MkKanbanCardMovedEvent {
|
|
2468
|
-
/** The card that was moved. */
|
|
2469
|
-
card: MkKanbanCard;
|
|
2470
|
-
/** `id` of the column the card came from. */
|
|
2471
|
-
from: unknown;
|
|
2472
|
-
/** `id` of the column the card was dropped into. */
|
|
2473
|
-
to: unknown;
|
|
2474
|
-
/** The card's index within the source column before the move. */
|
|
2475
|
-
fromIndex: number;
|
|
2476
|
-
/** The card's index within the destination column after the move. */
|
|
2477
|
-
toIndex: number;
|
|
2478
|
-
}
|
|
2479
|
-
/**
|
|
2480
|
-
* Kanban board — a horizontal row of columns whose cards can be dragged and
|
|
2481
|
-
* reordered within a column or transferred between columns. Built on the dnd
|
|
2482
|
-
* group's connected `[mkDropList]` / `[mkDrag]` directives, so it inherits both
|
|
2483
|
-
* pointer and keyboard dragging (WCAG 2.1.1) for free.
|
|
2484
|
-
*
|
|
2485
|
-
* Bind `columns` two-way; the model is updated immutably on each drop. Project
|
|
2486
|
-
* an `<ng-template>` to render custom card content — it receives the card as
|
|
2487
|
-
* `$implicit` and the owning column as `column`:
|
|
2488
|
-
*
|
|
2489
|
-
* ```html
|
|
2490
|
-
* <mk-kanban [(columns)]="board" (cardMoved)="onMoved($event)">
|
|
2491
|
-
* <ng-template #cardTemplate let-card let-column="column">
|
|
2492
|
-
* <strong>{{ card.title }}</strong>
|
|
2493
|
-
* </ng-template>
|
|
2494
|
-
* </mk-kanban>
|
|
2495
|
-
* ```
|
|
2496
|
-
*/
|
|
2497
|
-
declare class MkKanban {
|
|
2498
|
-
/** The board's columns and their cards (two-way). Updated on every drop. */
|
|
2499
|
-
readonly columns: _angular_core.ModelSignal<MkKanbanColumn[]>;
|
|
2500
|
-
/** Disable all dragging on the board. */
|
|
2501
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2502
|
-
/** Emitted after the model is updated when a card is moved. */
|
|
2503
|
-
readonly cardMoved: _angular_core.OutputEmitterRef<MkKanbanCardMovedEvent>;
|
|
2504
|
-
/** Optional consumer-projected card renderer (`$implicit` = card). */
|
|
2505
|
-
protected readonly cardTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
2506
|
-
/** Board-scoped prefix so this board's drop-list ids never collide. */
|
|
2507
|
-
private readonly boardId;
|
|
2508
|
-
/** Column count as its own computed so id arrays survive card-only updates. */
|
|
2509
|
-
private readonly columnCount;
|
|
2510
|
-
/** Stable drop-list id per column, positionally matched to `columns()`. */
|
|
2511
|
-
protected readonly listIds: _angular_core.Signal<string[]>;
|
|
2512
|
-
/**
|
|
2513
|
-
* Per-column connected-target ids (every other column's list). One stable
|
|
2514
|
-
* array per column, recomputed only when the column count changes — a fresh
|
|
2515
|
-
* array per change-detection pass would dirty each `MkDropList`'s
|
|
2516
|
-
* `connectedTo` input identity on every cycle.
|
|
2517
|
-
*/
|
|
2518
|
-
private readonly connections;
|
|
2519
|
-
/** Ids of every other column's list — the connected transfer targets for `i`. */
|
|
2520
|
-
protected connectedTo(index: number): string[];
|
|
2521
|
-
/**
|
|
2522
|
-
* Apply a drop from the dnd module. Reads the source/target columns from the
|
|
2523
|
-
* event's containers (matched by their drop-list ids), updates the two-way
|
|
2524
|
-
* `columns` model immutably, then emits {@link cardMoved}.
|
|
2525
|
-
*/
|
|
2526
|
-
protected onDrop(event: MkDropEvent<MkKanbanCard>): void;
|
|
2527
|
-
/**
|
|
2528
|
-
* Immutably move the card at `fromIndex` of column `fromCol` to `toIndex` of
|
|
2529
|
-
* column `toCol`, updating the model and emitting {@link cardMoved}. Column
|
|
2530
|
-
* indices refer to positions in `columns()`.
|
|
2531
|
-
*/
|
|
2532
|
-
private moveCard;
|
|
2533
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkKanban, never>;
|
|
2534
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkKanban, "mk-kanban", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "columns": "columnsChange"; "cardMoved": "cardMoved"; }, ["cardTemplate"], never, true, never>;
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
2293
|
/**
|
|
2538
2294
|
* Dependency-free QR Code encoder.
|
|
2539
2295
|
*
|
|
@@ -2811,5 +2567,5 @@ declare class MkMarkdown {
|
|
|
2811
2567
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkMarkdown, "mk-markdown", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "autolink": { "alias": "autolink"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2812
2568
|
}
|
|
2813
2569
|
|
|
2814
|
-
export { MK_CHART_PALETTE_SIZE, MK_HEATMAP_MIN_CONTRAST, MkAvatar, MkAvatarGroup,
|
|
2815
|
-
export type { MkAvatarShape, MkAvatarStatus,
|
|
2570
|
+
export { MK_CHART_PALETTE_SIZE, MK_HEATMAP_MIN_CONTRAST, MkAvatar, MkAvatarGroup, MkBarChart, MkCalendarHeatmap, MkCard, MkCardFooter, MkCardHeader, MkCardTitle, MkCarousel, MkCarouselSlide, MkCode, MkCountdown, MkDescItem, MkDescriptionList, MkDiff, MkDivider, MkDonutChart, MkFunnelChart, MkGauge, MkHeatmap, MkInlineEdit, MkJsonViewer, MkLineChart, MkList, MkListItem, MkLogViewer, MkMarkdown, MkOrgChart, MkOrgChartNodeDef, MkProfileActions, MkProfileCard, MkProfileMeta, MkProgressBar, MkProgressRing, MkQrCode, MkRadarChart, MkScatterChart, MkSkeleton, MkSkeletonPreset, MkSparkline, MkStatCard, MkTag, MkTimeline, MkTimelineItem, MkTreemap, MkVirtualScroll, mkArcPath, mkAreaPath, mkBuildJsonTree, mkChartColor, mkContrastRatio, mkEncodeQr, mkFormatCompact, mkHeatmapCellColors, mkLinePath, mkLinearScale, mkMixRgb, mkNiceTicks, mkOrgChartFromFlat, mkParseRgb, mkRelativeLuminance, mkSplitDuration, mkSquarify };
|
|
2571
|
+
export type { MkAvatarShape, MkAvatarStatus, MkBarOrientation, MkCalendarHeatmapCell, MkCalendarHeatmapEntry, MkCardPadding, MkCardVariant, MkChartSeries, MkChartSlice, MkDescriptionLayout, MkDiffMode, MkDividerOrientation, MkDurationParts, MkFunnelSegment, MkHeatmapCellColors, MkHeatmapPalette, MkJsonNode, MkLogToken, MkOrgChartFlatNode, MkOrgChartNode, MkOrgChartNodeContext, MkOrgChartOrientation, MkOrgChartTemplateData, MkOrgChartToggleEvent, MkPoint, MkProfileCardOrientation, MkQrEcc, MkRgb, MkScatterPoint, MkScatterSeries, MkSkeletonPresetKind, MkSkeletonShape, MkSparklineType, MkStatTrend, MkTagVariant, MkTreemapItem, MkTreemapRect };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { MkDropEvent } from '@mk-kit/ui/dnd';
|
|
4
|
+
|
|
5
|
+
/** A single draggable card on a {@link MkKanban} board. */
|
|
6
|
+
interface MkKanbanCard {
|
|
7
|
+
/** Stable identity used for tracking and move events. */
|
|
8
|
+
id: unknown;
|
|
9
|
+
/** Text shown by the default card renderer. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Arbitrary extra fields for custom card templates. */
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/** A column (bucket) of {@link MkKanbanCard}s on a {@link MkKanban} board. */
|
|
15
|
+
interface MkKanbanColumn {
|
|
16
|
+
/** Stable identity used for tracking and move events. */
|
|
17
|
+
id: unknown;
|
|
18
|
+
/** Heading shown in the column header and used as its aria-label. */
|
|
19
|
+
title: string;
|
|
20
|
+
/** The ordered cards contained in this column. */
|
|
21
|
+
cards: MkKanbanCard[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Emitted by {@link MkKanban} after a card has been moved (between or within
|
|
25
|
+
* columns) and the two-way `columns` model has been updated.
|
|
26
|
+
*/
|
|
27
|
+
interface MkKanbanCardMovedEvent {
|
|
28
|
+
/** The card that was moved. */
|
|
29
|
+
card: MkKanbanCard;
|
|
30
|
+
/** `id` of the column the card came from. */
|
|
31
|
+
from: unknown;
|
|
32
|
+
/** `id` of the column the card was dropped into. */
|
|
33
|
+
to: unknown;
|
|
34
|
+
/** The card's index within the source column before the move. */
|
|
35
|
+
fromIndex: number;
|
|
36
|
+
/** The card's index within the destination column after the move. */
|
|
37
|
+
toIndex: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Kanban board — a horizontal row of columns whose cards can be dragged and
|
|
41
|
+
* reordered within a column or transferred between columns. Built on the dnd
|
|
42
|
+
* group's connected `[mkDropList]` / `[mkDrag]` directives, so it inherits both
|
|
43
|
+
* pointer and keyboard dragging (WCAG 2.1.1) for free.
|
|
44
|
+
*
|
|
45
|
+
* Bind `columns` two-way; the model is updated immutably on each drop. Project
|
|
46
|
+
* an `<ng-template>` to render custom card content — it receives the card as
|
|
47
|
+
* `$implicit` and the owning column as `column`:
|
|
48
|
+
*
|
|
49
|
+
* ```html
|
|
50
|
+
* <mk-kanban [(columns)]="board" (cardMoved)="onMoved($event)">
|
|
51
|
+
* <ng-template #cardTemplate let-card let-column="column">
|
|
52
|
+
* <strong>{{ card.title }}</strong>
|
|
53
|
+
* </ng-template>
|
|
54
|
+
* </mk-kanban>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare class MkKanban {
|
|
58
|
+
/** The board's columns and their cards (two-way). Updated on every drop. */
|
|
59
|
+
readonly columns: _angular_core.ModelSignal<MkKanbanColumn[]>;
|
|
60
|
+
/** Disable all dragging on the board. */
|
|
61
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
62
|
+
/** Emitted after the model is updated when a card is moved. */
|
|
63
|
+
readonly cardMoved: _angular_core.OutputEmitterRef<MkKanbanCardMovedEvent>;
|
|
64
|
+
/** Optional consumer-projected card renderer (`$implicit` = card). */
|
|
65
|
+
protected readonly cardTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
66
|
+
/** Board-scoped prefix so this board's drop-list ids never collide. */
|
|
67
|
+
private readonly boardId;
|
|
68
|
+
/** Column count as its own computed so id arrays survive card-only updates. */
|
|
69
|
+
private readonly columnCount;
|
|
70
|
+
/** Stable drop-list id per column, positionally matched to `columns()`. */
|
|
71
|
+
protected readonly listIds: _angular_core.Signal<string[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Per-column connected-target ids (every other column's list). One stable
|
|
74
|
+
* array per column, recomputed only when the column count changes — a fresh
|
|
75
|
+
* array per change-detection pass would dirty each `MkDropList`'s
|
|
76
|
+
* `connectedTo` input identity on every cycle.
|
|
77
|
+
*/
|
|
78
|
+
private readonly connections;
|
|
79
|
+
/** Ids of every other column's list — the connected transfer targets for `i`. */
|
|
80
|
+
protected connectedTo(index: number): string[];
|
|
81
|
+
/**
|
|
82
|
+
* Apply a drop from the dnd module. Reads the source/target columns from the
|
|
83
|
+
* event's containers (matched by their drop-list ids), updates the two-way
|
|
84
|
+
* `columns` model immutably, then emits {@link cardMoved}.
|
|
85
|
+
*/
|
|
86
|
+
protected onDrop(event: MkDropEvent<MkKanbanCard>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Immutably move the card at `fromIndex` of column `fromCol` to `toIndex` of
|
|
89
|
+
* column `toCol`, updating the model and emitting {@link cardMoved}. Column
|
|
90
|
+
* indices refer to positions in `columns()`.
|
|
91
|
+
*/
|
|
92
|
+
private moveCard;
|
|
93
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkKanban, never>;
|
|
94
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkKanban, "mk-kanban", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "columns": "columnsChange"; "cardMoved": "cardMoved"; }, ["cardTemplate"], never, true, never>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { MkKanban };
|
|
98
|
+
export type { MkKanbanCard, MkKanbanCardMovedEvent, MkKanbanColumn };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _mk_kit_ui_core from '@mk-kit/ui/core';
|
|
3
|
+
import { MkSize, MkTone } from '@mk-kit/ui/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Spinner — a circular indeterminate loading indicator. Exposes `role="status"`
|
|
7
|
+
* with a visually-hidden label so assistive tech announces the loading state.
|
|
8
|
+
* The animation slows under `prefers-reduced-motion`.
|
|
9
|
+
*
|
|
10
|
+
* ```html
|
|
11
|
+
* <mk-spinner />
|
|
12
|
+
* <mk-spinner size="lg" tone="neutral" label="Fetching results" />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare class MkSpinner {
|
|
16
|
+
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
17
|
+
/** Size scale. */
|
|
18
|
+
readonly size: _angular_core.InputSignal<MkSize>;
|
|
19
|
+
/** Semantic color tone. */
|
|
20
|
+
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
21
|
+
/** Visually-hidden status label announced to screen readers. */
|
|
22
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkSpinner, never>;
|
|
24
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkSpinner, "mk-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Visual treatment for a {@link MkBadge}. */
|
|
28
|
+
type MkBadgeVariant = 'solid' | 'soft' | 'outline';
|
|
29
|
+
/**
|
|
30
|
+
* Badge — a compact status pill, typically for counts or short state labels.
|
|
31
|
+
* Set `dot` for a minimal notification indicator with no text.
|
|
32
|
+
*
|
|
33
|
+
* ```html
|
|
34
|
+
* <mk-badge tone="success">Active</mk-badge>
|
|
35
|
+
* <mk-badge tone="danger" variant="solid">3</mk-badge>
|
|
36
|
+
* <mk-badge tone="danger" dot aria-label="Unread messages" />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare class MkBadge {
|
|
40
|
+
/** Semantic color tone. */
|
|
41
|
+
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
42
|
+
/** Visual treatment. */
|
|
43
|
+
readonly variant: _angular_core.InputSignal<MkBadgeVariant>;
|
|
44
|
+
/** Size scale. */
|
|
45
|
+
readonly size: _angular_core.InputSignal<MkSize>;
|
|
46
|
+
/** Render as a tiny dot (no text) for notification indicators. */
|
|
47
|
+
readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
48
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBadge, never>;
|
|
49
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkBadge, "mk-badge", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Corner of the host an {@link MkBadgeOverlay} is anchored to. */
|
|
53
|
+
type MkBadgeOverlayPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start';
|
|
54
|
+
/**
|
|
55
|
+
* Badge overlay — anchors a small badge (count, dot or short text) to a corner
|
|
56
|
+
* of ANY element: an icon button, an avatar, a tab label. The host stays a
|
|
57
|
+
* single tab stop; the badge is a decorative, non-focusable child.
|
|
58
|
+
*
|
|
59
|
+
* - Numbers above `mkBadgeOverlayMax` (default 99) collapse to `99+`.
|
|
60
|
+
* - `mkBadgeOverlayDot` renders a textless dot ("something is new").
|
|
61
|
+
* - `mkBadgeOverlayAriaLabel` is the screen-reader text ("3 unread"). It is
|
|
62
|
+
* rendered in a visually hidden span and wired to the host with
|
|
63
|
+
* `aria-describedby`, so it is announced after the host's own name even
|
|
64
|
+
* when the host has an `aria-label`. When it is given, the visible badge is
|
|
65
|
+
* `aria-hidden` so the count is not read twice.
|
|
66
|
+
* - Positions use logical insets, so `top-end` sits at the top-right in LTR
|
|
67
|
+
* and the top-left in RTL.
|
|
68
|
+
*
|
|
69
|
+
* The badge is painted with the global `.mk-badge-overlay` styles from
|
|
70
|
+
* `@mk-kit/ui/styles.css` and follows the `--mk-*` tone tokens.
|
|
71
|
+
*
|
|
72
|
+
* ```html
|
|
73
|
+
* <button mkButton iconOnly aria-label="Notifications"
|
|
74
|
+
* [mkBadgeOverlay]="unread()" mkBadgeOverlayTone="danger"
|
|
75
|
+
* [mkBadgeOverlayAriaLabel]="unread() + ' unread'">
|
|
76
|
+
* <mk-icon name="bell" />
|
|
77
|
+
* </button>
|
|
78
|
+
*
|
|
79
|
+
* <mk-avatar name="Ada Lovelace" mkBadgeOverlay mkBadgeOverlayDot
|
|
80
|
+
* mkBadgeOverlayTone="success" mkBadgeOverlayPosition="bottom-end" />
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare class MkBadgeOverlay {
|
|
84
|
+
private readonly host;
|
|
85
|
+
private readonly renderer;
|
|
86
|
+
private readonly document;
|
|
87
|
+
private readonly isBrowser;
|
|
88
|
+
/**
|
|
89
|
+
* Badge content — a count or a short label. `null` / empty hides the badge
|
|
90
|
+
* unless `mkBadgeOverlayDot` is set. Numeric strings are treated as numbers
|
|
91
|
+
* so `mkBadgeOverlay="120"` also collapses to `99+`.
|
|
92
|
+
*/
|
|
93
|
+
readonly content: _angular_core.InputSignal<string | number | null | undefined>;
|
|
94
|
+
/** Corner the badge is anchored to (logical: `end` flips in RTL). */
|
|
95
|
+
readonly position: _angular_core.InputSignal<MkBadgeOverlayPosition>;
|
|
96
|
+
/** Semantic color tone (same scale as `mk-badge`). */
|
|
97
|
+
readonly tone: _angular_core.InputSignal<MkTone>;
|
|
98
|
+
/** Render a textless dot instead of the content. */
|
|
99
|
+
readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
100
|
+
/** Numbers above this render as `<max>+`. `0` disables the cap. */
|
|
101
|
+
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
102
|
+
/** Hide the badge while keeping the directive (and its aria wiring) in place. */
|
|
103
|
+
readonly hidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
104
|
+
/**
|
|
105
|
+
* Screen-reader text for the badge, e.g. `"3 unread"`. Announced as the
|
|
106
|
+
* host's description; the visible badge becomes `aria-hidden`.
|
|
107
|
+
*/
|
|
108
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
109
|
+
/** The text painted in the badge (`''` in dot mode). */
|
|
110
|
+
readonly label: _angular_core.Signal<string>;
|
|
111
|
+
/** Whether the badge is currently rendered. */
|
|
112
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
113
|
+
private readonly srId;
|
|
114
|
+
private badge;
|
|
115
|
+
private sr;
|
|
116
|
+
/** Set when WE made the host positioned, so we can undo it on removal. */
|
|
117
|
+
private positionedHost;
|
|
118
|
+
constructor();
|
|
119
|
+
private attach;
|
|
120
|
+
private detach;
|
|
121
|
+
/** Create / update / remove the hidden description and its aria-describedby link. */
|
|
122
|
+
private syncSr;
|
|
123
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkBadgeOverlay, never>;
|
|
124
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MkBadgeOverlay, "[mkBadgeOverlay]", never, { "content": { "alias": "mkBadgeOverlay"; "required": false; "isSignal": true; }; "position": { "alias": "mkBadgeOverlayPosition"; "required": false; "isSignal": true; }; "tone": { "alias": "mkBadgeOverlayTone"; "required": false; "isSignal": true; }; "dot": { "alias": "mkBadgeOverlayDot"; "required": false; "isSignal": true; }; "max": { "alias": "mkBadgeOverlayMax"; "required": false; "isSignal": true; }; "hidden": { "alias": "mkBadgeOverlayHidden"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "mkBadgeOverlayAriaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* EmptyState — a centered placeholder for "nothing here yet" situations: empty
|
|
129
|
+
* tables, no search results, a fresh dashboard, a cleared inbox. Provide a
|
|
130
|
+
* `title` (and usually a `description`), an `icon` or projected media, and
|
|
131
|
+
* call-to-action buttons via the actions slot.
|
|
132
|
+
*
|
|
133
|
+
* Slots: `[mkEmptyStateMedia]` (custom illustration, overrides `icon`), default
|
|
134
|
+
* content (extra body), `[mkEmptyStateActions]` (buttons).
|
|
135
|
+
*
|
|
136
|
+
* ```html
|
|
137
|
+
* <mk-empty-state icon="search" title="No results"
|
|
138
|
+
* description="Try adjusting your filters.">
|
|
139
|
+
* <button mkButton mkEmptyStateActions variant="outline">Clear filters</button>
|
|
140
|
+
* </mk-empty-state>
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
declare class MkEmptyState {
|
|
144
|
+
/** Name of a registered icon shown above the title (ignored if media is projected). */
|
|
145
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
146
|
+
/** Main heading, e.g. "No invoices yet". */
|
|
147
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
148
|
+
/** Supporting sentence under the title. */
|
|
149
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
150
|
+
/** Overall scale of the block. */
|
|
151
|
+
readonly size: _angular_core.InputSignal<MkSize>;
|
|
152
|
+
protected readonly iconSize: () => 28 | 48 | 36;
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkEmptyState, never>;
|
|
154
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkEmptyState, "mk-empty-state", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["[mkEmptyStateMedia]", "*", "[mkEmptyStateActions]"], true, never>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export { MkBadge, MkBadgeOverlay, MkEmptyState, MkSpinner };
|
|
158
|
+
export type { MkBadgeOverlayPosition, MkBadgeVariant };
|
|
@@ -1094,6 +1094,12 @@ declare class MkTableDataSource<T> {
|
|
|
1094
1094
|
* pending debounced filter, since the request reads the live filter value.
|
|
1095
1095
|
*/
|
|
1096
1096
|
refresh(): void;
|
|
1097
|
+
/**
|
|
1098
|
+
* Back to page 1 and load — the "filters changed outside the search box"
|
|
1099
|
+
* case. Unlike {@link setPage}, this loads even when already on page 1, so
|
|
1100
|
+
* callers no longer need `page() === 1 ? refresh() : setPage(1)`.
|
|
1101
|
+
*/
|
|
1102
|
+
reload(): void;
|
|
1097
1103
|
/**
|
|
1098
1104
|
* Pipe an `mkSort` directive's changes into {@link setSort}. Idempotent per
|
|
1099
1105
|
* directive instance; all subscriptions are released by {@link destroy}.
|
|
@@ -1117,6 +1123,24 @@ declare class MkTableDataSource<T> {
|
|
|
1117
1123
|
private unsubscribeActive;
|
|
1118
1124
|
private clearSub;
|
|
1119
1125
|
}
|
|
1126
|
+
/** Options for {@link mkClientFetcher}. */
|
|
1127
|
+
interface MkClientFetcherOptions<T> {
|
|
1128
|
+
/** Row matcher for `setFilter` text; default: case-insensitive substring over every string/number field. */
|
|
1129
|
+
match?: (row: T, query: string) => boolean;
|
|
1130
|
+
/** Comparator for an active sort; default: locale compare on `row[sort.active]`. */
|
|
1131
|
+
compare?: (a: T, b: T, sort: MkSortState) => number;
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* In-memory {@link MkDataFetcher}: filter, sort and slice a full row set that
|
|
1135
|
+
* the app already holds (an API that returns everything). Lets a client-side
|
|
1136
|
+
* list use {@link MkTableDataSource} — same pager, footer and API as a
|
|
1137
|
+
* server-paged one — without hand-rolling `filtered/sorted/paged` computeds.
|
|
1138
|
+
*
|
|
1139
|
+
* ```ts
|
|
1140
|
+
* ds = new MkTableDataSource(mkClientFetcher(() => this.rows()));
|
|
1141
|
+
* ```
|
|
1142
|
+
*/
|
|
1143
|
+
declare function mkClientFetcher<T>(rows: () => readonly T[], opts?: MkClientFetcherOptions<T>): (req: MkDataRequest) => Promise<MkDataPage<T>>;
|
|
1120
1144
|
|
|
1121
|
-
export { MkSort, MkSortHeader, MkTable, MkTableCell, MkTableDataSource, MkTableRowDetail, mkCompactFilters, mkDownloadText, mkExportCsv, mkToCsv };
|
|
1122
|
-
export type { MkCellEdit, MkColumnResize, MkCsvColumn, MkCsvExportOptions, MkCsvOptions, MkDataFetcher, MkDataPage, MkDataRequest, MkGroupToggle, MkSortChange, MkSortDirection, MkSortState, MkSortable, MkTableAlign, MkTableCellContext, MkTableColumn, MkTableDataSourceOptions, MkTableDensity, MkTableExportOptions, MkTableExportRows, MkTableExportRowsOptions, MkTableFilterKind, MkTableFilterOption, MkTableFilterRange, MkTableFilters, MkTableGroup, MkTreeToggle };
|
|
1145
|
+
export { MkSort, MkSortHeader, MkTable, MkTableCell, MkTableDataSource, MkTableRowDetail, mkClientFetcher, mkCompactFilters, mkDownloadText, mkExportCsv, mkToCsv };
|
|
1146
|
+
export type { MkCellEdit, MkClientFetcherOptions, MkColumnResize, MkCsvColumn, MkCsvExportOptions, MkCsvOptions, MkDataFetcher, MkDataPage, MkDataRequest, MkGroupToggle, MkSortChange, MkSortDirection, MkSortState, MkSortable, MkTableAlign, MkTableCellContext, MkTableColumn, MkTableDataSourceOptions, MkTableDensity, MkTableExportOptions, MkTableExportRows, MkTableExportRowsOptions, MkTableFilterKind, MkTableFilterOption, MkTableFilterRange, MkTableFilters, MkTableGroup, MkTreeToggle };
|