@mk-kit/ui 0.52.1 → 0.54.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 +205 -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 +153 -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.54.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,153 @@
|
|
|
1
|
+
import * as i0 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
|
+
/** Context handed to the column header / footer templates. */
|
|
40
|
+
interface MkKanbanColumnContext {
|
|
41
|
+
/** The column being rendered. */
|
|
42
|
+
$implicit: MkKanbanColumn;
|
|
43
|
+
/** Its position in `columns`. */
|
|
44
|
+
index: number;
|
|
45
|
+
/** `column.cards.length`, for a count badge. */
|
|
46
|
+
count: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Marks the projected card renderer explicitly:
|
|
50
|
+
* `<ng-template mkKanbanCard let-card let-column="column">`. Without it the
|
|
51
|
+
* first plain `<ng-template>` inside `<mk-kanban>` is used, as before 0.54.
|
|
52
|
+
*/
|
|
53
|
+
declare class MkKanbanCardDef {
|
|
54
|
+
readonly template: TemplateRef<unknown>;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MkKanbanCardDef, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MkKanbanCardDef, "ng-template[mkKanbanCard]", never, {}, {}, never, never, true, never>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Replaces the default column header (title + count):
|
|
60
|
+
* `<ng-template mkKanbanColumnHeader let-column let-count="count">`.
|
|
61
|
+
*/
|
|
62
|
+
declare class MkKanbanColumnHeaderDef {
|
|
63
|
+
readonly template: TemplateRef<MkKanbanColumnContext>;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MkKanbanColumnHeaderDef, never>;
|
|
65
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MkKanbanColumnHeaderDef, "ng-template[mkKanbanColumnHeader]", never, {}, {}, never, never, true, never>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Rendered under each column's card list — a "quick add" input, say:
|
|
69
|
+
* `<ng-template mkKanbanColumnFooter let-column>`.
|
|
70
|
+
*/
|
|
71
|
+
declare class MkKanbanColumnFooterDef {
|
|
72
|
+
readonly template: TemplateRef<MkKanbanColumnContext>;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MkKanbanColumnFooterDef, never>;
|
|
74
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MkKanbanColumnFooterDef, "ng-template[mkKanbanColumnFooter]", never, {}, {}, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Kanban board — a horizontal row of columns whose cards can be dragged and
|
|
78
|
+
* reordered within a column or transferred between columns. Built on the dnd
|
|
79
|
+
* group's connected `[mkDropList]` / `[mkDrag]` directives, so it inherits both
|
|
80
|
+
* pointer and keyboard dragging (WCAG 2.1.1) for free.
|
|
81
|
+
*
|
|
82
|
+
* Bind `columns` two-way; the model is updated immutably on each drop. Project
|
|
83
|
+
* an `<ng-template>` to render custom card content — it receives the card as
|
|
84
|
+
* `$implicit` and the owning column as `column`. Column headers and footers
|
|
85
|
+
* take their own templates (`mkKanbanColumnHeader` / `mkKanbanColumnFooter`,
|
|
86
|
+
* context `{ $implicit: column, index, count }`):
|
|
87
|
+
*
|
|
88
|
+
* ```html
|
|
89
|
+
* <mk-kanban [(columns)]="board" (cardMoved)="onMoved($event)">
|
|
90
|
+
* <ng-template mkKanbanColumnHeader let-column let-count="count">
|
|
91
|
+
* <strong>{{ column.title }}</strong> {{ count }}
|
|
92
|
+
* <button (click)="rename(column)">Rename</button>
|
|
93
|
+
* </ng-template>
|
|
94
|
+
* <ng-template mkKanbanCard let-card let-column="column">
|
|
95
|
+
* <strong>{{ card.title }}</strong>
|
|
96
|
+
* </ng-template>
|
|
97
|
+
* <ng-template mkKanbanColumnFooter let-column>
|
|
98
|
+
* <button (click)="add(column)">+ Card</button>
|
|
99
|
+
* </ng-template>
|
|
100
|
+
* </mk-kanban>
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare class MkKanban {
|
|
104
|
+
/** The board's columns and their cards (two-way). Updated on every drop. */
|
|
105
|
+
readonly columns: i0.ModelSignal<MkKanbanColumn[]>;
|
|
106
|
+
/** Disable all dragging on the board. */
|
|
107
|
+
readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
108
|
+
/** Emitted after the model is updated when a card is moved. */
|
|
109
|
+
readonly cardMoved: i0.OutputEmitterRef<MkKanbanCardMovedEvent>;
|
|
110
|
+
private readonly cardDef;
|
|
111
|
+
private readonly headerDef;
|
|
112
|
+
private readonly footerDef;
|
|
113
|
+
/** Every projected template, for the pre-0.54 "first plain template is the card" rule. */
|
|
114
|
+
private readonly templates;
|
|
115
|
+
/** Consumer-projected card renderer: `[mkKanbanCard]`, else the first template that is not a header/footer. */
|
|
116
|
+
protected readonly cardTemplate: i0.Signal<TemplateRef<unknown> | undefined>;
|
|
117
|
+
/** Optional column header renderer (replaces title + count). */
|
|
118
|
+
protected readonly headerTemplate: i0.Signal<TemplateRef<MkKanbanColumnContext> | undefined>;
|
|
119
|
+
/** Optional column footer renderer (under the card list). */
|
|
120
|
+
protected readonly footerTemplate: i0.Signal<TemplateRef<MkKanbanColumnContext> | undefined>;
|
|
121
|
+
/** Board-scoped prefix so this board's drop-list ids never collide. */
|
|
122
|
+
private readonly boardId;
|
|
123
|
+
/** Column count as its own computed so id arrays survive card-only updates. */
|
|
124
|
+
private readonly columnCount;
|
|
125
|
+
/** Stable drop-list id per column, positionally matched to `columns()`. */
|
|
126
|
+
protected readonly listIds: i0.Signal<string[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Per-column connected-target ids (every other column's list). One stable
|
|
129
|
+
* array per column, recomputed only when the column count changes — a fresh
|
|
130
|
+
* array per change-detection pass would dirty each `MkDropList`'s
|
|
131
|
+
* `connectedTo` input identity on every cycle.
|
|
132
|
+
*/
|
|
133
|
+
private readonly connections;
|
|
134
|
+
/** Ids of every other column's list — the connected transfer targets for `i`. */
|
|
135
|
+
protected connectedTo(index: number): string[];
|
|
136
|
+
/**
|
|
137
|
+
* Apply a drop from the dnd module. Reads the source/target columns from the
|
|
138
|
+
* event's containers (matched by their drop-list ids), updates the two-way
|
|
139
|
+
* `columns` model immutably, then emits {@link cardMoved}.
|
|
140
|
+
*/
|
|
141
|
+
protected onDrop(event: MkDropEvent<MkKanbanCard>): void;
|
|
142
|
+
/**
|
|
143
|
+
* Immutably move the card at `fromIndex` of column `fromCol` to `toIndex` of
|
|
144
|
+
* column `toCol`, updating the model and emitting {@link cardMoved}. Column
|
|
145
|
+
* indices refer to positions in `columns()`.
|
|
146
|
+
*/
|
|
147
|
+
private moveCard;
|
|
148
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MkKanban, never>;
|
|
149
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MkKanban, "mk-kanban", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "columns": "columnsChange"; "cardMoved": "cardMoved"; }, ["cardDef", "headerDef", "footerDef", "templates"], never, true, never>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export { MkKanban, MkKanbanCardDef, MkKanbanColumnFooterDef, MkKanbanColumnHeaderDef };
|
|
153
|
+
export type { MkKanbanCard, MkKanbanCardMovedEvent, MkKanbanColumn, MkKanbanColumnContext };
|