# @mk-kit/ui 0.60.2 — full API reference
Generated from the library sources. Browsable version: https://mk-kit.dev/api · JSON: https://mk-kit.dev/api.json · Guides: https://mk-kit.dev/llms.txt
## Usage
```bash
ng add @mk-kit/ui
```
Every component and directive below is standalone — import the class from its entry point and list it in `imports`. Attribute selectors like `button[mkButton]` enhance native elements; element selectors render their own template. Inputs marked two-way are `model()` signals and accept `[(name)]`. Inputs are signal inputs: read them as `comp.name()` in TypeScript.
## @mk-kit/ui/core
87 exports. `import { … } from '@mk-kit/ui/core';`
### MkAnchoredPanel (directive)
Selector: `[mkAnchoredPanel]` · exportAs: `mkAnchoredPanel`
Docs: https://mk-kit.dev/core-services
Import: `import { MkAnchoredPanel } from '@mk-kit/ui/core';`
Anchored-overlay directive. Apply it to a floating panel element (a dropdown
list, calendar, menu, …) that is rendered inside its component's own template
— typically inside an `@if (open()) { … }` block. On init the directive
**teleports the panel to `document.body` and into the browser top layer** via
the native Popover API (`popover="manual"` + `showPopover()`), then positions
it against the anchor with `position: fixed`. Because the element stays part
of the component's Angular view, all bindings, `@for` content, events and
projected content keep working after the move.
The top layer is immune to ancestor `overflow`, `transform` and `z-index`
stacking contexts, so the panel can never be clipped by a container or hidden
behind sibling content. Where the Popover API is unavailable the panel still
renders in a `document.body` portal with a `z-index` fallback.
```html
…
```
Inputs:
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `mkAnchoredPanelFor` | `HTMLElement \| ElementRef \| undefined` | `undefined` | The trigger element to position against. |
| `anchorRect` | `{ x: number; y: number; } \| undefined` | `undefined` | Viewport-point anchor (e.g. a right-click position) — takes precedence. |
| `placement` | `MkPlacement` | `'bottom-start'` | Preferred placement relative to the anchor. |
| `gap` | `number` | `4` | Distance in px between the anchor and the panel. |
| `matchWidth` | `boolean` | `false` | Set the panel's `min-width` to the anchor's width (dropdowns). |
| `flip` | `boolean` | `true` | Flip to the opposite side when the preferred side would overflow. |
| `clamp` | `boolean` | `true` | Clamp the panel inside the viewport. |
| `keepOpenWhen` | `((target: Node) => boolean) \| null` | `null` | Predicate consulted before an outside pointerdown dismisses the panel. Return `true` for targets that must keep it open — e.g. a nested panel (a submenu) that lives in the top layer outside this element. |
Outputs:
| Name | Type | Description |
| --- | --- | --- |
| `dismiss` | `void` | Emitted on an outside pointerdown or when the window loses focus. |
Methods:
| Signature | Description |
| --- | --- |
| `position(track?: boolean): void` | Recompute and apply the panel position. Safe to call at any time. With `track` (scroll-driven), the panel follows the anchor unclamped and dismisses once the anchor leaves the viewport (matching the CDK's reposition-with-auto-close scroll behaviour). |
### MkAccentService (service)
Import: `import { MkAccentService } from '@mk-kit/ui/core';`
Runtime accent — the user picks one of `MK_ACCENTS` and every kit
control recolours: the service writes the `--mk-primary` family
(`primary`, `-hover`, `-active`, `-subtle`, `-subtle-hover`,
`-subtle-text`), `--mk-focus-ring`, `--mk-selected-bg` / `-text` and three
accent tokens of its own — `--mk-accent`, `--mk-accent-ink`,
`--mk-accent-glow` — onto ``, and mirrors the key as
`data-mk-accent`. Hover / active are a touch darker in light and a touch
lighter in dark (it follows `MkThemeService`). The choice persists
in `localStorage` (`mk-kit-accent`); nothing is written until `set()` is
called, so an app that never picks keeps the preset's own primary.
```ts
readonly accent = inject(MkAccentService);
accent.set('coral'); // every button, ring and chip turns coral
accent.key(); // 'coral'
mkAccentSwatch(accent.key()); // for the picker
```
Methods:
| Signature | Description |
| --- | --- |
| `set(key: MkAccentKey): void` | Pick an accent; persisted. |
| `reset(): void` | Back to the preset's own primary; the stored choice is cleared. |
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `key` | `Signal` | The chosen accent, or `null` while the preset's own primary is in use. |
| `accent` | `Signal` | The chosen accent's definition (indigo when none is chosen). |
### MkBreakpointService (service)
Docs: https://mk-kit.dev/core-services
Import: `import { MkBreakpointService } from '@mk-kit/ui/core';`
Reactive viewport breakpoints, one `matchMedia` listener per step.
```ts
private readonly bp = inject(MkBreakpointService);
readonly compact = this.bp.down('md'); // Signal
readonly columns = computed(() => this.bp.resolve({ xs: 1, md: 2, xl: 4 }));
```
On the server (no `window`) everything reports `xs`.
Methods:
| Signature | Description |
| --- | --- |
| `up(bp: MkBreakpoint): Signal` | True while the viewport is at least `bp` wide (`up('md')` = md, lg, xl, 2xl). |
| `down(bp: MkBreakpoint): Signal` | True while the viewport is narrower than `bp` (`down('md')` = xs, sm). |
| `between(from: MkBreakpoint, to: MkBreakpoint): Signal` | True while the viewport is at least `from` and narrower than `to`. |
| `observe(query: string): Signal` | Any media query as a signal, e.g. `observe('(orientation: portrait)')`. |
| `resolve(value: MkResponsive): T \| undefined` | Pick the entry of a responsive value for the current viewport — mobile-first, so `{ xs: 1, md: 2 }` gives 1 on `sm` and 2 on `xl`. A plain value is returned as is. Read inside a `computed` to track it. |
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `breakpoints` | `MkBreakpoints` | The breakpoint scale in effect (see `MK_BREAKPOINTS`). |
| `current` | `Signal` | The widest breakpoint the viewport currently satisfies. |
### MkLiveAnnouncer (service)
Docs: https://mk-kit.dev/core-services
Import: `import { MkLiveAnnouncer } from '@mk-kit/ui/core';`
Announces messages to assistive technology via a visually-hidden
`aria-live` region. Used by toasts, form validation, sort changes, etc.
so state changes are perceivable without sight. WCAG 4.1.3 (Status Messages).
Methods:
| Signature | Description |
| --- | --- |
| `announce(message: string, politeness?: MkAriaLivePoliteness): void` | Announce `message`. `politeness` controls interruption behavior. |
### MkOverlayService (service)
Docs: https://mk-kit.dev/core-services
Import: `import { MkOverlayService } from '@mk-kit/ui/core';`
Lightweight, dependency-free overlay renderer. Instantiates a standalone
component into a body-level host, manages the backdrop, focus trapping,
Escape handling, and scroll locking. Powers Dialog, Menu, and others.
Methods:
| Signature | Description |
| --- | --- |
| `closeAll(): void` | Close every open overlay, newest first. Each is closed with no result, so `afterClosed` resolves undefined exactly as a backdrop click or Escape would. Safe to call when nothing is open. |
| `open(component: Type, config?: MkOverlayConfig): MkOverlayRef` | |
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `openCount` | `number` | How many overlays are currently open. |
### MkThemeService (service)
Docs: https://mk-kit.dev/core-services
Import: `import { MkThemeService } from '@mk-kit/ui/core';`
Reactive theme controller for mk-kit.
- `preference()` is the user's choice: `light`, `dark`, or `system`.
- `resolvedTheme()` is the concrete theme currently applied.
- Writes `data-mk-theme` on `` and persists the choice to
`localStorage`. When set to `system`, it live-tracks the OS setting and
removes the attribute so pure-CSS `prefers-color-scheme` takes over.
Provided in root — inject it anywhere and bind to the signals.
Methods:
| Signature | Description |
| --- | --- |
| `setDensity(density: MkDensity): void` | Set the global density mode. |
| `toggleDensity(): void` | Toggle between comfortable and compact — the two modes a density switch in a UI offers. `touch` is a deliberate choice for a specific screen, not something to land on by toggling, so from `touch` this returns to comfortable rather than cycling. |
| `setContrast(contrast: MkContrastPreference): void` | Set the contrast preference explicitly. |
| `toggleContrast(): void` | Toggle between normal and high contrast (resolving `system` first). |
| `setTheme(preference: MkThemePreference): void` | Set the theme preference explicitly. |
| `toggle(): void` | Toggle between light and dark (resolving `system` first). |
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `preference` | `Signal` | The user's theme preference. |
| `resolvedTheme` | `Signal` | The concrete theme in effect (`light` or `dark`). |
| `isDark` | `Signal` | Convenience boolean for template bindings. |
| `density` | `Signal` | The global density mode. `compact` tightens control heights and the core spacing steps via the `data-mk-density` attribute, `touch` enlarges them — every component follows automatically because they read the same tokens. This signal is the GLOBAL mode only. To make one screen or dialog touch- sized inside an otherwise comfortable app, put `data-mk-density="touch"` on that element instead; the tokens inherit and this service stays out of it. |
| `contrast` | `Signal` | The user's contrast preference: `normal`, `high` or `system` (follow the OS `prefers-contrast` setting — the default). Written as `data-mk-contrast` on `` and persisted; `system` removes the attribute so the pure-CSS `prefers-contrast: more` mapping takes over. Like density, the attribute also works per subtree: put `data-mk-contrast="high"` on any element to raise contrast there only. |
| `resolvedContrast` | `Signal` | The concrete contrast in effect (`normal` or `high`). |
| `isHighContrast` | `Signal` | Convenience boolean for template bindings. |
### MkFieldContext (class)
Import: `import { MkFieldContext } from '@mk-kit/ui/core';`
Field context — the contract a field wrapper (`mk-form-field`) exposes to
the control nested inside it. Controls inject it optionally
(`inject(MkFieldContext, { optional: true })`) to adopt the wrapper's
control id and to reflect its required/error state and `aria-describedby`
wiring — without depending on the `@mk-kit/ui/forms` entry point.
`MkFormField` provides itself under this token; standalone usage (no
wrapper) simply yields `null`.
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `controlId` | `string` | Id for the nested interactive control — adopt on your control element. |
| `labelId` | `string` | Id of the field's label element, for `aria-labelledby`. |
| `size` | `Signal` | The field's visual size, mirrored onto the nested control. |
| `isRequired` | `Signal` | Whether the field is required (explicitly or via the bound control). |
| `hasError` | `Signal` | Whether the field currently shows an error. |
| `describedBy` | `Signal` | Space-separated id list for the nested control's `aria-describedby`, or `null` when there is nothing to describe. |
### MkFocusTrap (class)
Docs: https://mk-kit.dev/core-services
Import: `import { MkFocusTrap } from '@mk-kit/ui/core';`
Traps keyboard focus within `root` (wrapping Tab / Shift+Tab), moves focus
inside on activation, and restores focus to the previously-focused element
on release. Essential for accessible modals/menus (WCAG 2.4.3, 2.1.2).
Methods:
| Signature | Description |
| --- | --- |
| `activate(initialFocus?: HTMLElement): void` | Activate the trap and move focus to the first focusable element (or root). |
| `release(): void` | Deactivate and restore focus to the trigger element. |
### MkOverlayRef (class)
Import: `import { MkOverlayRef } from '@mk-kit/ui/core';`
Handle to an open overlay. Injected into the rendered component and returned
from `MkOverlayService.open`. Resolve the overlay by calling `close`.
The close result is exposed three ways so the handle fits whatever style the
calling code already uses — they all settle together:
- `result` — a signal, for template binding and signal-based components.
- `closed$` — an Observable that emits once and completes, for RxJS
pipelines. A service that hands a dialog result back to its callers can
return this directly instead of wrapping the promise in `from(...)`.
- `afterClosed` — a Promise, for `await` / `.then()`.
Methods:
| Signature | Description |
| --- | --- |
| `close(result?: TResult): void` | Close the overlay, optionally returning a result. |
Properties:
| Name | Type | Description |
| --- | --- | --- |
| `componentRef` | `ComponentRef \| undefined` | The rendered component instance (set by the service after creation). |
| `closed` | `Signal` | Becomes `true` once the overlay has been dismissed. |
| `result` | `Signal` | The value passed to `close`, or `undefined` while open and for a dismissal (Escape / backdrop). Read `closed()` to tell "closed with no result" apart from "still open". |
| `afterClosed` | `Promise` | Resolves with the close result when the overlay is dismissed. |
| `closed$` | `Observable` | Emits the close result once, then completes. Subscribing after the overlay has already closed replays the result immediately, so a late subscriber never hangs. |
### mkAccentSwatch (function)
Import: `import { mkAccentSwatch } from '@mk-kit/ui/core';`
The swatch a picker shows for an accent (bumblebee is the black / yellow split).
```ts
function mkAccentSwatch(key: MkAccentKey): string
```
### mkBodyLevelAncestor (function)
Import: `import { mkBodyLevelAncestor } from '@mk-kit/ui/core';`
The direct child of `document.body` an overlay-root descendant lives under,
crossing shadow boundaries on the way up — `null` when the node is not under
`body` at all. The overlay service uses it to keep the overlay's own host
out of the elements it makes `inert` behind a modal.
```ts
function mkBodyLevelAncestor(node: Node, body: HTMLElement): Element | null
```
### mkComputeAnchoredPosition (function)
Import: `import { mkComputeAnchoredPosition } from '@mk-kit/ui/core';`
Pure viewport-positioning maths shared by every anchored overlay
(`MkAnchoredPanel` and the tooltip). Given the anchor rect, the panel
size and the viewport size, returns the top/left for a `position: fixed`
panel — flipping to the opposite side when it would overflow and clamping
back inside the viewport.
```ts
function mkComputeAnchoredPosition(anchor: MkRectLike, panel: MkDimensions, viewport: MkDimensions, opts: MkAnchoredPositionOptions): MkAnchoredPosition
```
### mkCreateQueryGroup (function)
Import: `import { mkCreateQueryGroup } from '@mk-kit/ui/core';`
A fresh empty group.
```ts
function mkCreateQueryGroup(init?: Partial>): MkQueryGroup
```
### mkCreateQueryRule (function)
Import: `import { mkCreateQueryRule } from '@mk-kit/ui/core';`
A fresh rule on `field`, using its first operator.
```ts
function mkCreateQueryRule(field: MkQueryField): MkQueryRule
```
### mkFirstErrorMessage (function)
Import: `import { mkFirstErrorMessage } from '@mk-kit/ui/core';`
Resolves the message for the first error on a control, mirroring how
`mat-error` shows one message at a time.
Lookup order per key: the field's `overrides`, then the i18n `validation`
table, then the error payload's own `message` string (so a custom validator
can carry its text), then the generic fallback. Keys are visited in the
order the validators put them on the control, so composing
`[Validators.required, Validators.email]` surfaces "required" while empty.
```ts
function mkFirstErrorMessage(errors: ValidationErrors | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null
```
### mkGetFocusable (function)
Import: `import { mkGetFocusable } from '@mk-kit/ui/core';`
Returns the tabbable elements inside `root`, in DOM order.
```ts
function mkGetFocusable(root: HTMLElement): HTMLElement[]
```
### mkHexAlpha (function)
Import: `import { mkHexAlpha } from '@mk-kit/ui/core';`
`#rrggbb` → `rgba(r,g,b,a)`.
```ts
function mkHexAlpha(hex: string, alpha: number): string
```
### mkHighlight (function)
Import: `import { mkHighlight } from '@mk-kit/ui/core';`
Highlight `src` for `language`, falling back to escaped plain text.
```ts
function mkHighlight(src: string, language: string): string
```
### mkHighlightJson (function)
Import: `import { mkHighlightJson } from '@mk-kit/ui/core';`
Highlight a JSON document. Recognises object keys, strings, numbers, the
`true`/`false`/`null` literals and structural punctuation. Invalid JSON is
still highlighted token-by-token (the editor validates separately).
```ts
function mkHighlightJson(src: string): string
```
### mkIsQueryGroup (function)
Import: `import { mkIsQueryGroup } from '@mk-kit/ui/core';`
True for a group node (as opposed to a rule).
```ts
function mkIsQueryGroup(node: MkQueryNode): node is MkQueryGroup
```
### mkIsResponsive (function)
Import: `import { mkIsResponsive } from '@mk-kit/ui/core';`
True when `value` is a per-breakpoint map rather than a plain value.
```ts
function mkIsResponsive(value: MkResponsive): value is Partial>
```
### mkMergeI18n (function)
Import: `import { mkMergeI18n } from '@mk-kit/ui/core';`
Merges `overrides` over a complete string map — shallow for the top level,
deep for the `dateNames`, `blockEditor` and `validation` groups. Exported
so locale packs and tests can build a map without providing it.
```ts
function mkMergeI18n(base: MkI18nStrings, overrides: MkI18nOverrides): MkI18nStrings
```
### mkQueryCompact (function)
Import: `import { mkQueryCompact } from '@mk-kit/ui/core';`
Drop empty groups and rules that still need a value, so the API gets only complete conditions.
```ts
function mkQueryCompact(group: MkQueryGroup): MkQueryGroup
```
### mkQueryIsEmpty (function)
Import: `import { mkQueryIsEmpty } from '@mk-kit/ui/core';`
True when the tree holds no rule at all (empty groups only).
```ts
function mkQueryIsEmpty(group: MkQueryGroup): boolean
```
### mkQueryOperatorLabel (function)
Import: `import { mkQueryOperatorLabel } from '@mk-kit/ui/core';`
Localised label of an operator.
```ts
function mkQueryOperatorLabel(op: MkQueryOperator, i18n?: MkQueryTextStrings): string
```
### mkQueryOperatorsFor (function)
Import: `import { mkQueryOperatorsFor } from '@mk-kit/ui/core';`
Operators a field offers (its own list, else the defaults for its type).
```ts
function mkQueryOperatorsFor(field: MkQueryField | undefined): readonly MkQueryOperator[]
```
### mkQueryRuleCount (function)
Import: `import { mkQueryRuleCount } from '@mk-kit/ui/core';`
Number of rules in the tree.
```ts
function mkQueryRuleCount(group: MkQueryGroup): number
```
### mkQueryRuleIsComplete (function)
Import: `import { mkQueryRuleIsComplete } from '@mk-kit/ui/core';`
A rule is complete when its operator needs no value or has one.
```ts
function mkQueryRuleIsComplete(rule: MkQueryRule): boolean
```
### mkQueryRuleMatches (function)
Import: `import { mkQueryRuleMatches } from '@mk-kit/ui/core';`
Evaluate one rule against a row.
```ts
function mkQueryRuleMatches(rule: MkQueryRule, row: Record, field?: MkQueryField): boolean
```
### mkQueryToPredicate (function)
Import: `import { mkQueryToPredicate } from '@mk-kit/ui/core';`
Compile a query into a row predicate for client-side filtering
(`rows.filter(mkQueryToPredicate(query, fields))`). Unfinished rules are
ignored, so a half-edited query never blanks the table.
```ts
function mkQueryToPredicate>(group: MkQueryGroup, fields?: readonly MkQueryField[]): (row: T) => boolean
```
### mkQueryToText (function)
Import: `import { mkQueryToText } from '@mk-kit/ui/core';`
Human-readable sentence for a query, e.g.
`(Name contains "ada" and Orders at least 10) or Status is any of Active, Invited`.
```ts
function mkQueryToText(group: MkQueryGroup, fields?: readonly MkQueryField[], i18n?: MkQueryTextStrings): string
```
### mkSignalErrorMessage (function)
Import: `import { mkSignalErrorMessage } from '@mk-kit/ui/core';`
Resolves the message for the first Signal Forms error on a field, the way
`mkFirstErrorMessage` does for reactive forms.
Lookup order: the field's `overrides` for that kind, then the `message` the
schema attached to the error (`required(p.email, { message: '…' })`), then
the i18n `validation` table, then the generic fallback.
```ts
function mkSignalErrorMessage(errors: readonly MkSignalValidationError[] | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null
```
### mkSignalErrorsToValidationErrors (function)
Import: `import { mkSignalErrorsToValidationErrors } from '@mk-kit/ui/core';`
Converts Signal Forms errors to the reactive-forms `ValidationErrors` shape
the `validation` i18n table is keyed by, so both form systems render the
same messages. The built-in kinds map to Angular's classic keys and payloads
(`minLength` → `minlength: { requiredLength }`, `minDate` → `mkMinDate`,
…); any other kind is kept as-is with its payload spread into the value.
```ts
function mkSignalErrorsToValidationErrors(errors: readonly MkSignalValidationError[] | null | undefined): ValidationErrors | null
```
### mkUniqueId (function)
Import: `import { mkUniqueId } from '@mk-kit/ui/core';`
Generates a stable, unique DOM id for wiring `aria-*` relationships
(labels, descriptions, controls). Prefer this over `Math.random()` so
ids are deterministic within a render and SSR-safe.
```ts
function mkUniqueId(prefix?: string): string
```
### mkValidatorChange (function)
Import: `import { mkValidatorChange } from '@mk-kit/ui/core';`
Re-validates the bound form control whenever a validator's inputs change.
A `Validator` whose constraints come from component inputs (`[min]`,
`[max]`, `[required]`, …) must tell Angular when those inputs change,
otherwise the control keeps the verdict computed under the old constraints.
`NgModel`/`FormControlName` pass a callback to `registerOnValidatorChange`
for exactly this; call it from an effect over the constraint signals.
Must be called from an injection context (i.e. as a field initialiser).
```ts
private readonly validatorChange = mkValidatorChange(() => {
this.min();
this.max();
});
registerOnValidatorChange(fn: () => void): void {
this.validatorChange.register(fn);
}
```
```ts
function mkValidatorChange(deps: () => void): MkValidatorChangeRef
```
### provideMkI18n (function)
Docs: https://mk-kit.dev/core-services
Import: `import { provideMkI18n } from '@mk-kit/ui/core';`
Provide localised strings — pass any subset, merged over `base` (the
English defaults unless given). The nested `dateNames`, `blockEditor` and
`validation` groups are merged deeply, so partial overrides of those work
too.
```ts
bootstrapApplication(App, {
providers: [provideMkI18n({ noResults: 'Brak wyników', close: 'Zamknij' })],
});
```
A locale pack is a complete map that serves as the base — either through
its own helper (`provideMkI18nPl(overrides)` from `@mk-kit/ui/locales/pl`)
or explicitly: `provideMkI18n(overrides, MK_PL_I18N)`.
```ts
function provideMkI18n(overrides: MkI18nOverrides, base?: MkI18nStrings): Provider
```
### MK_BREAKPOINTS (token)
Import: `import { MK_BREAKPOINTS } from '@mk-kit/ui/core';`
Override the breakpoint scale app-wide: `{ provide: MK_BREAKPOINTS, useValue: { …, lg: 1100 } }`.
```ts
const MK_BREAKPOINTS: InjectionToken;
```
### MK_I18N (token)
Import: `import { MK_I18N } from '@mk-kit/ui/core';`
The active string map. Defaults to `MK_DEFAULT_I18N`; override with
`provideMkI18n`. Inject it (`inject(MK_I18N)`) wherever a built-in
string is rendered.
```ts
const MK_I18N: InjectionToken;
```
### MK_OVERLAY_DATA (token)
Import: `import { MK_OVERLAY_DATA } from '@mk-kit/ui/core';`
Injection token exposing the data passed to an overlay component.
```ts
const MK_OVERLAY_DATA: InjectionToken;
```
### MK_OVERLAY_ROOT (token)
Import: `import { MK_OVERLAY_ROOT } from '@mk-kit/ui/core';`
Where mk-kit mounts everything that leaves the component tree: overlay
containers (dialogs), anchored panels (selects, menus, tooltips), toast /
snackbar containers and the tour surfaces. Defaults to `document.body`.
Override it to confine those surfaces to another element — `@mk-kit/ui/embed`
points it at a themed shadow-DOM host so overlays opened by embedded custom
elements stay isolated from the host page's stylesheet:
```ts
{ provide: MK_OVERLAY_ROOT, useValue: () => myOverlayHost }
```
```ts
const MK_OVERLAY_ROOT: InjectionToken;
```
### MK_ACCENT_ORDER (const)
Import: `import { MK_ACCENT_ORDER } from '@mk-kit/ui/core';`
Picker order.
```ts
const MK_ACCENT_ORDER: readonly MkAccentKey[];
```
### MK_ACCENTS (const)
Import: `import { MK_ACCENTS } from '@mk-kit/ui/core';`
High-saturation, distinct, energising accents — the set the `momentum` preset was designed around.
```ts
const MK_ACCENTS: Record;
```
### MK_DEFAULT_BREAKPOINTS (const)
Import: `import { MK_DEFAULT_BREAKPOINTS } from '@mk-kit/ui/core';`
The default scale (same numbers as Tailwind, so mental models transfer).
```ts
const MK_DEFAULT_BREAKPOINTS: MkBreakpoints;
```
### MK_DEFAULT_DATE_NAMES (const)
Import: `import { MK_DEFAULT_DATE_NAMES } from '@mk-kit/ui/core';`
The built-in English date names.
```ts
const MK_DEFAULT_DATE_NAMES: MkDateNames;
```
### MK_DEFAULT_I18N (const)
Import: `import { MK_DEFAULT_I18N } from '@mk-kit/ui/core';`
The built-in English strings.
```ts
const MK_DEFAULT_I18N: MkI18nStrings;
```
### MK_DEFAULT_VALIDATION (const)
Import: `import { MK_DEFAULT_VALIDATION } from '@mk-kit/ui/core';`
The built-in English validation messages.
```ts
const MK_DEFAULT_VALIDATION: MkValidationStrings;
```
### MK_QUERY_OPERATORS (const)
Import: `import { MK_QUERY_OPERATORS } from '@mk-kit/ui/core';`
Operators offered per field type, in menu order.
```ts
const MK_QUERY_OPERATORS: Readonly>;
```
### MK_QUERY_TEXT_EN (const)
Import: `import { MK_QUERY_TEXT_EN } from '@mk-kit/ui/core';`
English defaults for `MkQueryTextStrings`.
```ts
const MK_QUERY_TEXT_EN: MkQueryTextStrings;
```
### MK_QUERY_UNARY (const)
Import: `import { MK_QUERY_UNARY } from '@mk-kit/ui/core';`
Operators that take no value.
```ts
const MK_QUERY_UNARY: ReadonlySet;
```
### MkAccent (interface)
Import: `import { MkAccent } from '@mk-kit/ui/core';`
`fill` = bars, rings and buttons · `ink` = small accent text on a light ground.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `fill` | `string` | |
| `ink` | `string` | |
| `name` | `string` | |
### MkAnchoredPosition (interface)
Import: `import { MkAnchoredPosition } from '@mk-kit/ui/core';`
Resolved coordinates (viewport-relative, for `position: fixed`).
Members:
| Name | Type | Description |
| --- | --- | --- |
| `top` | `number` | |
| `left` | `number` | |
| `placement` | `MkPlacement` | The placement actually used after any flip. |
### MkAnchoredPositionOptions (interface)
Import: `import { MkAnchoredPositionOptions } from '@mk-kit/ui/core';`
Options controlling `mkComputeAnchoredPosition`.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `placement` | `MkPlacement` | |
| `gap` | `number` | |
| `flip` | `boolean` | |
| `clamp` | `boolean` | |
| `rtl`? | `boolean \| undefined` | Resolve `-start`/`-end` alignment against a right-to-left anchor. |
### MkBlockEditorStrings (interface)
Import: `import { MkBlockEditorStrings } from '@mk-kit/ui/core';`
Strings used by the block editor's chrome.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `addBlock` | `string` | |
| `addFirstBlock` | `string` | |
| `insertBlockHere` | `string` | |
| `blockInserter` | `string` | |
| `searchBlocks` | `string` | |
| `blocks` | `string` | |
| `moveBlockUp` | `string` | |
| `moveBlockDown` | `string` | |
| `blockOptions` | `string` | |
| `duplicate` | `string` | |
| `remove` | `string` | |
| `textFormatting` | `string` | |
| `altText` | `string` | |
| `caption` | `string` | |
| `alignment` | `string` | |
| `replaceImage` | `string` | |
| `imageUrl` | `string` | |
| `externalContent` | `string` | |
| `embedUrl` | `string` | |
| `columnSettings` | `string` | |
| `columns` | `string` | |
| `ratio` | `string` | |
| `gap` | `string` | |
| `align` | `string` | |
| `justify` | `string` | |
| `headingLevel` | `(level: number) => string` | |
| `editorLabel` | `string` | Editor region label + empty-block placeholder defaults. |
| `emptyBlockPlaceholder` | `string` | |
| `dragHandle` | `string` | Drag handle tooltip. |
| `turnInto` | `(label: string) => string` | "Turn into …" transform menu item; receives the target block's label. |
| `unknownBlock` | `(type: string) => string` | Shown for a block whose type has no registered definition. |
| `blockAdded` | `(label: string) => string` | Structural-change screen-reader announcements. |
| `blockDuplicated` | `string` | |
| `blockDeleted` | `(label: string) => string` | |
| `blockMovedUp` | `string` | |
| `blockMovedDown` | `string` | |
| `turnedInto` | `(label: string) => string` | |
| `noBlocksMatch` | `(query: string) => string` | Inserter empty state; receives the search query. |
| `groupText` | `string` | Built-in palette group headings. |
| `groupMedia` | `string` | |
| `groupLayout` | `string` | |
| `blockParagraph` | `string` | Built-in block labels + inserter descriptions. |
| `blockParagraphDesc` | `string` | |
| `blockHeading` | `string` | |
| `blockHeadingDesc` | `string` | |
| `blockList` | `string` | |
| `blockListDesc` | `string` | |
| `blockQuote` | `string` | |
| `blockQuoteDesc` | `string` | |
| `blockCode` | `string` | |
| `blockCodeDesc` | `string` | |
| `blockImage` | `string` | |
| `blockImageDesc` | `string` | |
| `blockEmbed` | `string` | |
| `blockEmbedDesc` | `string` | |
| `blockButton` | `string` | |
| `blockButtonDesc` | `string` | |
| `blockDivider` | `string` | |
| `blockDividerDesc` | `string` | |
| `blockColumns` | `string` | |
| `blockColumnsDesc` | `string` | |
| `bold` | `string` | Rich-text inline toolbar. |
| `italic` | `string` | |
| `underline` | `string` | |
| `strikethrough` | `string` | |
| `inlineCode` | `string` | |
| `link` | `string` | |
| `clearFormatting` | `string` | |
| `linkUrlPrompt` | `string` | Prompt asking for a link URL. |
| `editableText` | `string` | Default label of the editable rich-text region. |
| `headingPlaceholder` | `(level: number) => string` | Heading block. |
| `headingLevelGroup` | `string` | |
| `listStyle` | `string` | List block. |
| `bulleted` | `string` | |
| `numbered` | `string` | |
| `listItem` | `string` | |
| `quoteText` | `string` | Quote block. |
| `citation` | `string` | |
| `addCitation` | `string` | |
| `codeLanguage` | `string` | Code block. |
| `codeLanguagePlaceholder` | `string` | |
| `enterCode` | `string` | |
| `imageWidth` | `(percent: number) => string` | Image block. |
| `uploading` | `string` | |
| `dropImagePrompt` | `string` | |
| `chooseFile` | `string` | |
| `pasteImageUrl` | `string` | |
| `notAnImage` | `string` | |
| `uploadFailed` | `string` | |
| `imageAdded` | `string` | |
| `pasteEmbedUrl` | `string` | Embed block. |
| `embedFallbackNote` | `string` | |
| `embedTitle` | `(provider: string) => string` | |
| `embedAdded` | `(provider: string) => string` | |
| `embeddedContent` | `string` | |
| `buttonLabel` | `string` | Button block settings. |
| `buttonLink` | `string` | |
| `buttonTone` | `string` | |
| `buttonVariant` | `string` | |
| `buttonDefaultLabel` | `string` | Label a freshly inserted Button block starts with. |
| `alignLeft` | `string` | Alignment option captions (image + button blocks). |
| `alignCenter` | `string` | |
| `alignRight` | `string` | |
| `tonePrimary` | `string` | Tone option captions (button block swatches). |
| `toneNeutral` | `string` | |
| `toneSuccess` | `string` | |
| `toneWarning` | `string` | |
| `toneDanger` | `string` | |
| `toneInfo` | `string` | |
| `variantSolid` | `string` | Variant option captions (button block). |
| `variantSoft` | `string` | |
| `variantOutline` | `string` | |
| `ratioEqual` | `string` | Columns settings option captions. |
| `alignStretch` | `string` | |
| `alignTop` | `string` | |
| `alignMiddle` | `string` | |
| `alignBottom` | `string` | |
| `justifyStart` | `string` | |
| `justifyCenter` | `string` | |
| `justifyEnd` | `string` | |
| `justifyBetween` | `string` | |
### MkDateNames (interface)
Import: `import { MkDateNames } from '@mk-kit/ui/core';`
Localised month and weekday name tables (the shape `MK_I18N` carries).
Members:
| Name | Type | Description |
| --- | --- | --- |
| `months` | `readonly string[]` | Full month names, January-first (12). |
| `monthsShort` | `readonly string[]` | Abbreviated month names (12). |
| `weekdays` | `readonly string[]` | Full weekday names, Sunday-first (7). |
| `weekdaysShort` | `readonly string[]` | Abbreviated weekday names (7). |
| `weekdaysNarrow` | `readonly string[]` | One/two-letter weekday names for calendar headers (7). |
### MkI18nStrings (interface)
Import: `import { MkI18nStrings } from '@mk-kit/ui/core';`
All user-facing strings the library renders itself (aria-labels, empty-state
text, control captions and screen-reader announcements). Consumers localise
the library by overriding any subset via `provideMkI18n`. Interpolated
strings are functions so translators control word order.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `locale`? | `string \| undefined` | BCP 47 locale tag (`'pl-PL'`, `'de'`) used by the formatting pipes (`mkCurrency`, `mkRelativeTime`, `mkFileSize`, `mkPluralize`) and any other `Intl`-based formatting that has no explicit locale of its own. Unset → the runtime (browser / Node) default locale. |
| `currency`? | `string \| undefined` | ISO 4217 currency code the `mkCurrency` pipe falls back to when the template passes none. Unset → `'USD'`. |
| `validation` | `MkValidationStrings` | Validation messages (deep-merged by provideMkI18n). |
| `close` | `string` | Generic "Close" control (dialog, drawer, bottom-sheet). |
| `dismiss` | `string` | Generic "Dismiss" control (alert, banner, toast, snackbar). |
| `clear` | `string` | Clear-input control (autocomplete, pickers, tag inputs). |
| `confirm` | `string` | Generic confirm action (confirm dialog, popconfirm). |
| `cancel` | `string` | Generic cancel action (dialogs, inline edit). |
| `ok` | `string` | Generic acknowledge action (alert/prompt dialogs). |
| `save` | `string` | Generic save action (inline edit). |
| `submit` | `string` | Default action-button caption (submit input). |
| `edit` | `string` | Generic edit affordance (inline edit trigger). |
| `remove` | `string` | Generic remove control (chip). |
| `removeItem` | `(name: string) => string` | Remove a named item (tag input chips, file upload rows). |
| `empty` | `string` | Placeholder shown for an empty editable value (inline edit, mini date). |
| `optional` | `string` | "Optional" marker (stepper). |
| `filter` | `string` | Filter/search field placeholder (transfer list). |
| `confirmMessage` | `string` | Default confirmation question (popconfirm). |
| `decrease` | `string` | Decrease control (number input). |
| `increase` | `string` | Increase control (number input). |
| `loading` | `string` | Async loading row (autocomplete, multi-select). |
| `noOptions` | `string` | Empty listbox with no options (select, time picker). |
| `noResults` | `string` | Empty async/filtered results (autocomplete, multi-select, command palette). |
| `noData` | `string` | Empty data table / list. |
| `translationEditorSearch` | `string` | Translation editor (`@mk-kit/ui/translate/editor`). |
| `translationEditorAll` | `string` | |
| `translationEditorOverridden` | `string` | |
| `translationEditorMissing` | `string` | |
| `translationEditorKey` | `string` | |
| `translationEditorReset` | `string` | |
| `translationEditorExport` | `string` | |
| `translationEditorKeys` | `string` | |
| `sessionExpiryTitle` | `string` | Session-expiry dialog (`@mk-kit/ui/attention`). |
| `sessionExpiryExtend` | `string` | |
| `sessionExpiryExtending` | `string` | |
| `sessionExpiryLogout` | `string` | |
| `sessionExpiryBody` | `(countdown: string) => string` | |
| `scannerTitle` | `string` | Barcode scanner (`@mk-kit/ui/media/scanner`). |
| `scannerHint` | `string` | |
| `scannerCameraError` | `string` | |
| `resultsCount` | `(count: number) => string` | Announced when a filterable list updates (autocomplete, multi-select, command palette). |
| `previousPage` | `string` | Pagination: previous page control. |
| `nextPage` | `string` | Pagination: next page control. |
| `goToPage` | `(page: number) => string` | Pagination: jump to a page. |
| `paginationLabel` | `string` | Pagination landmark label. |
| `previousSlide` | `string` | Carousel: previous slide control. |
| `nextSlide` | `string` | Carousel: next slide control. |
| `goToSlide` | `(slide: number) => string` | Carousel: jump to a slide. |
| `carouselLabel` | `string` | Carousel region label. |
| `pauseSlideshow` | `string` | Carousel: pause / resume automatic rotation. |
| `playSlideshow` | `string` | |
| `slideOf` | `(slide: number, total: number) => string` | Carousel: slide position (slide labels + live announcements). |
| `dateNames` | `MkDateNames` | Localised month/weekday name tables (deep-merged by provideMkI18n). |
| `previousMonth` | `string` | Calendar: previous month control. |
| `nextMonth` | `string` | Calendar: next month control. |
| `previousYear` | `string` | Month picker: previous/next year (month mode). |
| `nextYear` | `string` | |
| `previousYears` | `string` | Month picker: previous/next decade page (year mode). |
| `nextYears` | `string` | |
| `selectDate` | `string` | Field placeholders. |
| `selectRange` | `string` | |
| `selectTime` | `string` | |
| `selectMonth` | `string` | |
| `selectYear` | `string` | |
| `selectWeek` | `string` | |
| `selectPlaceholder` | `string` | |
| `chooseDate` | `string` | Popover dialog labels. |
| `chooseDateRange` | `string` | |
| `chooseMonth` | `string` | |
| `chooseYear` | `string` | |
| `chooseWeek` | `string` | |
| `openCalendar` | `string` | |
| `openTimeList` | `string` | |
| `moreActions` | `string` | Accessible name of the chevron segment of `mk-split-button`. |
| `selectDateTime` | `string` | Placeholder of `mk-datetime-picker`. |
| `chooseDateTime` | `string` | Dialog label of the `mk-datetime-picker` panel. |
| `chooseTime` | `string` | Listbox label of the time list inside `mk-datetime-picker`. |
| `openDateTimePicker` | `string` | Toggle-button label of `mk-datetime-picker`. |
| `daySegment` | `string` | Mini-date segment names. |
| `monthSegment` | `string` | |
| `yearSegment` | `string` | |
| `countdownDays` | `string` | Countdown unit captions. |
| `countdownHours` | `string` | |
| `countdownMinutes` | `string` | |
| `countdownSeconds` | `string` | |
| `countdownFinished` | `string` | Announced when a countdown reaches zero. |
| `dayEvents` | `(count: number, titles: string) => string` | Event-calendar day label suffix, e.g. `2 events: Standup, Demo`. |
| `moreEvents` | `(count: number) => string` | Event-calendar overflow pill for events beyond `maxPerDay`, e.g. `+2 more`. |
| `selectAllRows` | `string` | Select-all header checkbox. |
| `selectRow` | `(row: string) => string` | Per-row checkbox; receives the row's leading cell text. |
| `expandHeader` | `string` | Hidden expander column header. |
| `expandRow` | `string` | Row expander toggle labels. |
| `collapseRow` | `string` | |
| `expandTreeRow` | `string` | Tree-row toggle labels (`childrenKey`). |
| `collapseTreeRow` | `string` | |
| `expandGroup` | `string` | aria-label of a group header's toggle when the group is collapsed. |
| `collapseGroup` | `string` | aria-label of a group header's toggle when the group is expanded. |
| `groupCount` | `(count: number) => string` | Row count shown on a group header, e.g. "4 items". |
| `resizeColumn` | `string` | Column resize separator label. |
| `columnWidth` | `(column: string, width: number) => string` | Announced while a column is resized by keyboard. |
| `columnMoved` | `(column: string, position: number, total: number) => string` | Announced when a column is reordered. |
| `editCell` | `string` | Hint suffix + announcement for editable cells. |
| `cellSaved` | `(value: string) => string` | |
| `sortedBy` | `(column: string, direction: MkSortAnnounceDirection) => string` | Announced when a column is sorted. |
| `sortingCleared` | `(column: string) => string` | Announced when sorting is removed from a column. |
| `showPassword` | `string` | Password reveal toggle. |
| `hidePassword` | `string` | |
| `passwordRuleMinLength` | `(length: number) => string` | Password rule captions. |
| `passwordRuleUppercase` | `string` | |
| `passwordRuleNumber` | `string` | |
| `passwordRuleSymbol` | `string` | |
| `passwordStrength` | `(score: number) => string` | Password strength label for a 0–4 score. |
| `passwordStrengthLabel` | `string` | Visible prefix before the strength label. |
| `ruleMet` | `string` | Rule-state prefixes announced to screen readers. |
| `ruleNotMet` | `string` | |
| `oneTimeCode` | `string` | OTP field labels. |
| `otpDigit` | `(position: number) => string` | |
| `numericKeypadLabel` | `string` | Numeric keypad labels + masked-PIN progress announcement. |
| `keypadClear` | `string` | |
| `keypadBackspace` | `string` | |
| `keypadDigitsEntered` | `(count: number, length: number) => string` | |
| `onScreenKeyboardLabel` | `string` | On-screen keyboard label + action-key labels. |
| `keyboardShift` | `string` | |
| `keyboardSpace` | `string` | |
| `keyboardEnter` | `string` | |
| `keyboardAltLayer` | `string` | |
| `keyboardBaseLayer` | `string` | |
| `ratingLabel` | `string` | Rating slider label + value text. |
| `ratingValueText` | `(value: number, max: number) => string` | |
| `minimum` | `string` | Range slider thumb labels. |
| `maximum` | `string` | |
| `chooseColor` | `string` | Color picker labels. |
| `hexValue` | `string` | |
| `presetColors` | `string` | |
| `chooseCountry` | `string` | Phone input: country-prefix trigger label. |
| `searchCountries` | `string` | Phone input: search field placeholder inside the country list. |
| `phoneNumber` | `string` | Phone input: default accessible label of the national-number field. |
| `postalCode` | `string` | Postal-code input: default accessible label. |
| `amount` | `string` | Currency input: default accessible label. |
| `cardNumber` | `string` | Card-number input: default accessible label. |
| `cardBrand` | `(brand: string) => string` | Card-number input: announced/badge text for a detected brand. |
| `iban` | `string` | IBAN input: default accessible label. |
| `taxId` | `string` | Tax-ID input: default accessible label. |
| `signature` | `string` | Signature pad: default accessible label of the drawing surface. |
| `jsonLabel` | `string` | JSON viewer: default accessible label of the tree. |
| `logViewerLabel` | `string` | Log viewer: default accessible label of the log region. |
| `logFollow` | `string` | Log viewer: re-attach-to-tail button. |
| `logCopyAll` | `string` | Log viewer: copy-the-whole-buffer toolbar button. |
| `logWrapLines` | `string` | Log viewer: soft-wrap toolbar toggle. |
| `orgChartLabel` | `string` | Org chart: default accessible label of the tree. |
| `orgChartExpand` | `string` | Org chart: aria-label of a collapsed node's toggle (`{label}` = node label). |
| `orgChartCollapse` | `string` | Org chart: aria-label of an expanded node's toggle (`{label}` = node label). |
| `chatLabel` | `string` | Chat: accessible name of the message log. |
| `chatComposerLabel` | `string` | Chat: accessible name of the composer textarea. |
| `chatPlaceholder` | `string` | Chat: composer placeholder. |
| `chatSend` | `string` | Chat: send button. |
| `chatStop` | `string` | Chat: stop-generating button (replaces send while busy). |
| `chatAttach` | `string` | Chat: attach-files button. |
| `chatRemoveAttachment` | `string` | Chat: remove one pending attachment. |
| `chatAttachments` | `string` | Chat: group label of pending / shown attachments. |
| `chatSuggestions` | `string` | Chat: group label of quick-reply suggestions. |
| `chatCopy` | `string` | Chat: copy-message button. |
| `chatRetry` | `string` | Chat: retry a failed message. |
| `chatTyping` | `string` | Chat: typing indicator. |
| `chatStreaming` | `string` | Chat: screen-reader text while a reply streams in. |
| `chatJumpToLatest` | `string` | Chat: scroll-to-newest button. |
| `chatEmpty` | `string` | Chat: empty-state text. |
| `chatYou` | `string` | Chat: author fallback for the user's own messages. |
| `chatAssistant` | `string` | Chat: author fallback for assistant messages. |
| `chatToolRunning` | `string` | Chat: tool call in progress. |
| `chatToolDone` | `string` | Chat: tool call finished. |
| `chatToolError` | `string` | Chat: tool call failed. |
| `dynamicFormAdd` | `string` | Dynamic form: add an item to an array field. |
| `dynamicFormRemove` | `(index: number) => string` | Dynamic form: remove one item of an array field (index is 1-based). |
| `queryBuilderLabel` | `string` | Query builder: accessible name of the whole builder. |
| `queryAddRule` | `string` | |
| `queryAddGroup` | `string` | |
| `queryRemoveRule` | `string` | |
| `queryRemoveGroup` | `string` | |
| `queryAnd` | `string` | Combinator labels — also used by `mkQueryToText`. |
| `queryOr` | `string` | |
| `queryNot` | `string` | |
| `queryField` | `string` | |
| `queryOperator` | `string` | |
| `queryValue` | `string` | |
| `queryValueFrom` | `string` | |
| `queryValueTo` | `string` | |
| `queryEmptyGroup` | `string` | |
| `queryTrue` | `string` | |
| `queryFalse` | `string` | |
| `queryOpEq` | `string` | |
| `queryOpNeq` | `string` | |
| `queryOpContains` | `string` | |
| `queryOpNotContains` | `string` | |
| `queryOpStartsWith` | `string` | |
| `queryOpEndsWith` | `string` | |
| `queryOpGt` | `string` | |
| `queryOpGte` | `string` | |
| `queryOpLt` | `string` | |
| `queryOpLte` | `string` | |
| `queryOpBetween` | `string` | |
| `queryOpIn` | `string` | |
| `queryOpNotIn` | `string` | |
| `queryOpBefore` | `string` | |
| `queryOpAfter` | `string` | |
| `queryOpEmpty` | `string` | |
| `queryOpNotEmpty` | `string` | |
| `dialogMove` | `string` | Dialog: label of the move grip (arrow keys move, Home resets). |
| `dialogResize` | `string` | Dialog: label of the resize grip (arrow keys resize, Home resets). |
| `listboxFilter` | `string` | Listbox: filter box placeholder / label. |
| `listboxEmpty` | `string` | Listbox: shown when the filter matches nothing. |
| `eventCalendarGrabbed` | `(title: string, from: string, to: string) => string` | Announced when an event is picked up in keyboard move mode. |
| `eventCalendarPosition` | `(title: string, day: string, from: string, to: string) => string` | Announced after each keyboard step: current day + time range. |
| `eventCalendarMoved` | `(title: string, day: string, from: string, to: string) => string` | Announced when a move commits. |
| `eventCalendarResized` | `(title: string, to: string) => string` | Announced when a resize commits. |
| `eventCalendarEditCancelled` | `string` | Announced when an edit is aborted. |
| `eventCalendarMovableEvent` | `string` | `aria-roledescription` of an editable event pill. |
| `previousImage` | `string` | Lightbox / gallery: previous-image control. |
| `nextImage` | `string` | Lightbox / gallery: next-image control. |
| `imageOf` | `(index: number, total: number) => string` | Lightbox counter + per-image aria label, e.g. `Image 2 of 8`. |
| `viewImage` | `(alt: string) => string` | Gallery tile label; receives the image's alt text. |
| `imageFailed` | `string` | Shown in an image block whose source failed to load. |
| `zoom` | `string` | Cropper zoom controls. |
| `zoomIn` | `string` | |
| `zoomOut` | `string` | |
| `mediaLibrary` | `string` | Media gallery region label. |
| `dropzoneLabel` | `string` | File upload dropzone + states. |
| `uploadFailed` | `string` | |
| `retryUpload` | `string` | |
| `errorSummaryTitle` | `string` | Form error summary heading. |
| `available` | `string` | Default column titles. |
| `selected` | `string` | |
| `transferSelected` | `(target: string) => string` | Move-button labels; receive the target list's title. |
| `transferAll` | `(target: string) => string` | |
| `itemsMoved` | `(count: number, target: string) => string` | Announced after a move. |
| `notificationsTitle` | `string` | |
| `allCaughtUp` | `string` | |
| `markAllRead` | `string` | |
| `notificationsUnread` | `(count: number) => string` | |
| `unread` | `string` | Unread state announced per row. |
| `tourStepOf` | `(step: number, total: number) => string` | |
| `tourSkip` | `string` | |
| `tourPrevious` | `string` | |
| `tourNext` | `string` | |
| `tourDone` | `string` | |
| `commandPalettePlaceholder` | `string` | Command palette input placeholder. |
| `commandPaletteLabel` | `string` | Command palette dialog label. |
| `stepCompleted` | `string` | Stepper: step state, appended to the step's accessible name. |
| `stepError` | `string` | |
| `diffAddedLine` | `string` | Diff: screen-reader prefix for changed lines. |
| `diffRemovedLine` | `string` | |
| `itemAdded` | `(name: string) => string` | Chip collections (tag input, multi-select): announced on add/remove. |
| `itemRemoved` | `(name: string) => string` | |
| `resizePanes` | `string` | Splitter separator label. |
| `backToTop` | `string` | Back-to-top button label. |
| `breadcrumbLabel` | `string` | Breadcrumb nav landmark label. |
| `fabLabel` | `string` | FAB default label. |
| `appSwitcherLabel` | `string` | App switcher: trigger / panel label, and the note when the registry cannot be fetched. |
| `appSwitcherError` | `string` | |
| `diffBefore` | `string` | Diff view labels. |
| `diffAfter` | `string` | |
| `diffChanges` | `string` | |
| `skipToContent` | `string` | App shell. |
| `primaryNav` | `string` | |
| `dndPickedUp` | `(position: number, total: number) => string` | Announced when an item is lifted for keyboard dragging. |
| `dndMoved` | `(position: number, total: number) => string` | Announced as the item moves within its list. |
| `dndMovedToList` | `(list: string, position: number, total: number) => string` | Announced as the item moves into another list. |
| `dndDropped` | `(position: number) => string` | Announced when the item is dropped. |
| `dndMovedToZone` | `(zone: string) => string` | Announced as a lifted item reaches a drop zone (a target that is not a list). |
| `dndDroppedInZone` | `(zone: string) => string` | Announced when the item is dropped on a zone. |
| `dndCancelled` | `string` | Announced when the drag is cancelled. |
| `repeaterAddRow` | `string` | Repeater add-row button caption (default when no `addLabel` is given). |
| `repeaterRemoveRow` | `(index: number) => string` | Repeater per-row remove button label (1-based row number). |
| `repeaterReorderRow` | `(index: number) => string` | Repeater per-row drag-handle label (1-based row number). |
| `repeaterRowMoved` | `(from: number, to: number) => string` | Announced after a repeater row is reordered (1-based positions). |
| `fileRejectedType` | `(name: string) => string` | |
| `fileRejectedSize` | `(name: string, limit: string) => string` | |
| `fileRejectedCount` | `(name: string, max: number) => string` | |
| `chartCategory` | `string` | |
| `chartValue` | `string` | |
| `chartSeries` | `string` | |
| `chartSlice` | `string` | |
| `chartStage` | `string` | |
| `chartConversion` | `string` | |
| `chartAxis` | `string` | |
| `chartShare` | `string` | |
| `chartLabel` | `string` | |
| `qrCodeLabel` | `(text: string) => string` | Default accessible label of a QR code, carrying its encoded content. |
| `sortableListLabel` | `string` | Default accessible name of `mk-sortable-list` when no `label` is given. |
| `filterColumn` | `(column: string) => string` | Table filter row: accessible name of a column's filter control. |
| `clearFilter` | `(column: string) => string` | Table filter row: the per-control clear (×) button. |
| `filterAny` | `string` | Table filter row: the "no filter" option of a select filter. |
| `filterMin` | `string` | Table filter row: placeholder of a number / date filter (matches values ≥ the entry). |
| `blockEditor` | `MkBlockEditorStrings` | Block editor chrome (deep-merged by provideMkI18n). |
### MkOverlayConfig (interface)
Import: `import { MkOverlayConfig } from '@mk-kit/ui/core';`
Members:
| Name | Type | Description |
| --- | --- | --- |
| `data`? | `TData \| undefined` | Arbitrary data injected via `MK_OVERLAY_DATA`. |
| `hasBackdrop`? | `boolean \| undefined` | Render a dimmed scrim behind the panel. Default `true`. |
| `closeOnBackdropClick`? | `boolean \| undefined` | Close when the backdrop is clicked. Default `true`. |
| `closeOnEscape`? | `boolean \| undefined` | Close when Escape is pressed. Default `true`. |
| `trapFocus`? | `boolean \| undefined` | Trap focus within the panel and restore it on close. Default `true`. |
| `autoFocus`? | `boolean \| undefined` | Move focus to the panel's first focusable element on open. Default `true`. Set `false` to focus the panel itself instead — for content-led surfaces (a product sheet, a preview) where focusing the close button first reads as "dismiss me". Tab containment and focus restore are unaffected; turn `trapFocus` off only if you want neither. |
| `panelClass`? | `string \| string[] \| undefined` | Extra class(es) applied to the panel host element. |
| `role`? | `"dialog" \| "alertdialog" \| "menu" \| "listbox" \| undefined` | Accessible role for the panel. Default `dialog`. |
| `ariaLabel`? | `string \| undefined` | `aria-label` for the panel when no visible title is wired up. |
| `injector`? | `Injector \| undefined` | A custom injector to use as the parent for the rendered component. |
### MkQueryField (interface)
Import: `import { MkQueryField } from '@mk-kit/ui/core';`
A field the user can filter on.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `key` | `string` | Property key on the row objects / the API's filter name. |
| `label` | `string` | Label shown in the field picker. |
| `type`? | `MkQueryValueType \| undefined` | Default `string`. |
| `options`? | `readonly MkQueryFieldOption[] \| undefined` | Choices for `select` fields. |
| `operators`? | `readonly MkQueryOperator[] \| undefined` | Restrict / reorder the operators offered (default: all for the type). |
| `placeholder`? | `string \| undefined` | Placeholder of the value editor. |
### MkQueryFieldOption (interface)
Import: `import { MkQueryFieldOption } from '@mk-kit/ui/core';`
A choice for `select` fields.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `label` | `string` | |
| `value` | `unknown` | |
### MkQueryGroup (interface)
Import: `import { MkQueryGroup } from '@mk-kit/ui/core';`
A group of rules and nested groups joined by one combinator, optionally negated.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` | |
| `combinator` | `MkQueryCombinator` | |
| `not`? | `boolean \| undefined` | Negate the whole group. |
| `rules` | `MkQueryNode[]` | |
### MkQueryRule (interface)
Import: `import { MkQueryRule } from '@mk-kit/ui/core';`
A leaf condition. `value` is `[from, to]` for `between`, an array for `in` / `notIn`, absent for `empty` / `notEmpty`. Dates are ISO strings.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` | |
| `field` | `string` | |
| `operator` | `MkQueryOperator` | |
| `value`? | `unknown` | |
### MkQueryTextStrings (interface)
Import: `import { MkQueryTextStrings } from '@mk-kit/ui/core';`
The strings `mkQueryToText` and `mkQueryOperatorLabel` render
with. A structural subset of mk-kit's `MkI18nStrings`, so the UI's full
i18n map can be passed directly; defaults to `MK_QUERY_TEXT_EN`.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `queryTrue` | `string` | |
| `queryFalse` | `string` | |
| `queryAnd` | `string` | |
| `queryOr` | `string` | |
| `queryNot` | `string` | |
| `queryOpEq` | `string` | |
| `queryOpNeq` | `string` | |
| `queryOpContains` | `string` | |
| `queryOpNotContains` | `string` | |
| `queryOpStartsWith` | `string` | |
| `queryOpEndsWith` | `string` | |
| `queryOpGt` | `string` | |
| `queryOpGte` | `string` | |
| `queryOpLt` | `string` | |
| `queryOpLte` | `string` | |
| `queryOpBetween` | `string` | |
| `queryOpIn` | `string` | |
| `queryOpNotIn` | `string` | |
| `queryOpBefore` | `string` | |
| `queryOpAfter` | `string` | |
| `queryOpEmpty` | `string` | |
| `queryOpNotEmpty` | `string` | |
### MkSignalValidationError (interface)
Import: `import { MkSignalValidationError } from '@mk-kit/ui/core';`
The shape of a Signal Forms validation error as `mk-kit` reads it — the
`{ kind, message? }` contract of `ValidationError` from
`@angular/forms/signals`, plus whatever payload the error class carries
(`min`, `maxLength`, `pattern`, …). Declared structurally so `@mk-kit/ui/core`
stays free of a runtime dependency on the signals entry point.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `kind` | `string` | Identifies the kind of error (`'required'`, `'minLength'`, …). |
| `message`? | `string \| undefined` | Human-readable message, when the schema supplied one. |
### MkValidationStrings (interface)
Import: `import { MkValidationStrings } from '@mk-kit/ui/core';`
Messages rendered by `mk-form-field` for the validation errors the library's
own controls produce, plus the standard Angular `Validators` keys, so a
field wrapping any control shows something sensible without per-form wiring.
Keys match the `ValidationErrors` keys exactly and each entry receives that
key's error payload. Override any subset through
`provideMkI18n({ validation: … })`, or a whole map per field via
`mk-form-field`'s `errorMessages` input.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `required` | `string` | `Validators.required` — also emitted by checkbox and radio-group. |
| `email` | `string` | `Validators.email`. |
| `min` | `(err: { min: number; actual: number; }) => string` | `Validators.min`, and the numeric controls' `[min]`. |
| `max` | `(err: { max: number; actual: number; }) => string` | `Validators.max`, and the numeric controls' `[max]`. |
| `minlength` | `(err: { requiredLength: number; actualLength: number; }) => string` | `Validators.minLength` — also emitted by password-input and OTP. |
| `maxlength` | `(err: { requiredLength: number; actualLength: number; }) => string` | `Validators.maxLength`. |
| `pattern` | `string` | `Validators.pattern`. |
| `mkMinDate` | `(err: { min: Date; actual: Date; }) => string` | A date/month/week picker's `[min]`. |
| `mkMaxDate` | `(err: { max: Date; actual: Date; }) => string` | A date/month/week picker's `[max]`. |
| `mkDateFilter` | `string` | A date rejected by a calendar's `[disabledDate]` predicate. |
| `mkDateRangeIncomplete` | `string` | A range picker with only one end filled in. |
| `mkMinTime` | `(err: { min: string; actual: string; }) => string` | The time-picker's `[min]`. |
| `mkMaxTime` | `(err: { max: string; actual: string; }) => string` | The time-picker's `[max]`. |
| `mkMaxItems` | `(err: { max: number; actual: number; }) => string` | More items than a multi-select's, tag-input's or upload's `[max*]` allows. |
| `mkFileSize` | `(err: { max: number; maxLabel: string; name: string; }) => string` | A file larger than a file-upload's `[maxSize]`. |
| `mkFileType` | `(err: { accept: string; name: string; }) => string` | A file not matching a file-upload's `[accept]` filter. |
| `cardNumber` | `string` | A card number failing the Luhn checksum. |
| `iban` | `(err: { country: string; expectedLength: number \| null; }) => string` | An IBAN failing the mod-97 checksum. |
| `postalCode` | `(err: { country: string; example: string; }) => string` | A postal code not matching the country's format. |
| `taxId` | `(err: { country: string; label: string; example: string; }) => string` | A tax identifier not matching the country's format or checksum. |
| `unknown` | `string` | Fallback for an error key with no message of its own. |
### MkValidatorChangeRef (interface)
Import: `import { MkValidatorChangeRef } from '@mk-kit/ui/core';`
Handle returned by `mkValidatorChange`, wiring a component's
`registerOnValidatorChange` callback to a set of reactive dependencies.
Members:
| Name | Type | Description |
| --- | --- | --- |
| `register` | `(fn: () => void): void` | Store the callback Angular hands to `registerOnValidatorChange`. |
| `notify` | `(): void` | Ask the bound control to re-run `validate()` now. |
### MkAccentKey (type)
Import: `import { MkAccentKey } from '@mk-kit/ui/core';`
One of the eight kit accents (the Momentum palette).
```ts
type MkAccentKey = 'indigo' | 'blue' | 'teal' | 'violet' | 'coral' | 'lime' | 'pink' | 'bumblebee';
```
### MkAriaLivePoliteness (type)
Import: `import { MkAriaLivePoliteness } from '@mk-kit/ui/core';`
```ts
type MkAriaLivePoliteness = 'polite' | 'assertive';
```
### MkBreakpoint (type)
Import: `import { MkBreakpoint } from '@mk-kit/ui/core';`
Named viewport ranges, mobile-first: each starts at its min-width.
```ts
type MkBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
```
### MkBreakpoints (type)
Import: `import { MkBreakpoints } from '@mk-kit/ui/core';`
Min-widths (px) at which each named breakpoint begins; `xs` is everything below `sm`.
```ts
type MkBreakpoints = Record, number>;
```
### MkCodeLanguage (type)
Import: `import { MkCodeLanguage } from '@mk-kit/ui/core';`
Languages with built-in highlighting. Unknown values render plain text.
```ts
type MkCodeLanguage = 'json' | 'plaintext';
```
### MkContrastPreference (type)
Import: `import { MkContrastPreference } from '@mk-kit/ui/core';`
Contrast preference.
`high` applies the high-contrast token preset (`data-mk-contrast="high"`):
pure text colours, line-like borders, opaque interaction washes, a thicker
focus ring. `system` (the default) writes no attribute and lets the
stylesheet follow the OS `prefers-contrast: more` setting; `normal` opts
out of that even when the OS asks for more contrast.
```ts
type MkContrastPreference = 'normal' | 'high' | 'system';
```
### MkDensity (type)
Import: `import { MkDensity } from '@mk-kit/ui/core';`
Global control-density mode.
`touch` sizes controls for fingers (48px default) rather than a cursor —
tablets, kiosks, order screens. It is usually applied per-subtree with the
`data-mk-density` attribute rather than globally, since one app often has
both a mouse-driven admin and a touch-driven screen.
```ts
type MkDensity = 'comfortable' | 'compact' | 'touch';
```
### MkErrorMessages (type)
Import: `import { MkErrorMessages } from '@mk-kit/ui/core';`
A per-field override map: an error key mapped either to a fixed message or
to a function receiving that key's error payload.
```html
```
```ts
type MkErrorMessages = Readonly string)>>;
```
### MkI18nOverrides (type)
Import: `import { MkI18nOverrides } from '@mk-kit/ui/core';`
Any subset of `MkI18nStrings`; the nested `dateNames`, `blockEditor`
and `validation` groups may be partial too (they are merged deeply).
```ts
type MkI18nOverrides = Partial< Omit > & { dateNames?: Partial; blockEditor?: Partial; validation?: Partial; };
```
### MkOverlayRootFn (type)
Import: `import { MkOverlayRootFn } from '@mk-kit/ui/core';`
Resolves the element overlay surfaces are appended to. A function (not an
element) because the root may be created lazily, after DI is set up.
```ts
type MkOverlayRootFn = () => HTMLElement;
```
### MkPlacement (type)
Import: `import { MkPlacement } from '@mk-kit/ui/core';`
Common placement values for anchored overlays (menus, tooltips, popovers).
```ts
type MkPlacement = | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
```
### MkQueryCombinator (type)
Import: `import { MkQueryCombinator } from '@mk-kit/ui/core';`
```ts
type MkQueryCombinator = 'and' | 'or';
```
### MkQueryNode (type)
Import: `import { MkQueryNode } from '@mk-kit/ui/core';`
```ts
type MkQueryNode = MkQueryRule | MkQueryGroup;
```
### MkQueryOperator (type)
Import: `import { MkQueryOperator } from '@mk-kit/ui/core';`
Comparison operators. Which apply depends on the field type.
```ts
type MkQueryOperator = | 'eq' | 'neq' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'in' | 'notIn' | 'before' | 'after' | 'empty' | 'notEmpty';
```
### MkQueryValueType (type)
Import: `import { MkQueryValueType } from '@mk-kit/ui/core';`
Value kind of a filterable field; decides the editor and the operators offered.
```ts
type MkQueryValueType = 'string' | 'number' | 'boolean' | 'date' | 'select';
```
### MkResolvedContrast (type)
Import: `import { MkResolvedContrast } from '@mk-kit/ui/core';`
Concrete resolved contrast (never `system`).
```ts
type MkResolvedContrast = 'normal' | 'high';
```
### MkResolvedTheme (type)
Import: `import { MkResolvedTheme } from '@mk-kit/ui/core';`
Concrete resolved theme (never `system`).
```ts
type MkResolvedTheme = 'light' | 'dark';
```
### MkResponsive (type)
Import: `import { MkResponsive } from '@mk-kit/ui/core';`
A value that may differ per breakpoint: either the plain value or a
mobile-first map, `{ xs: 1, md: 2, xl: 4 }`, where each key applies from
that breakpoint up until the next key given.
```ts
type MkResponsive = T | Partial>;
```
### MkSize (type)
Import: `import { MkSize } from '@mk-kit/ui/core';`
Control size scale. Maps to `--mk-control-height-*` tokens.
```ts
type MkSize = 'sm' | 'md' | 'lg';
```
### MkSortAnnounceDirection (type)
Import: `import { MkSortAnnounceDirection } from '@mk-kit/ui/core';`
Direction passed to the sort announcer.
```ts
type MkSortAnnounceDirection = 'asc' | 'desc';
```
### MkThemePreference (type)
Import: `import { MkThemePreference } from '@mk-kit/ui/core';`
Theme selection. `system` follows the OS `prefers-color-scheme`.
```ts
type MkThemePreference = 'light' | 'dark' | 'system';
```
### MkTone (type)
Import: `import { MkTone } from '@mk-kit/ui/core';`
Semantic color tone. Each maps to a `--mk-*` token family.
```ts
type MkTone = | 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
```
### MkVariant (type)
Import: `import { MkVariant } from '@mk-kit/ui/core';`
Visual treatment for tinted/interactive surfaces.
```ts
type MkVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link';
```
## @mk-kit/ui/core/signal-forms
1 exports. `import { … } from '@mk-kit/ui/core/signal-forms';`
### mkInjectFieldTouched (function)
Import: `import { mkInjectFieldTouched } from '@mk-kit/ui/core/signal-forms';`
Touched-gate for a control's `invalid` input under Signal Forms.
When a control is bound with the `[formField]` directive, Angular writes the
field's `invalid()` state straight into the control's `invalid` input — from
the first render, before the user has reached the field. mk-kit controls
pass that input through this gate so the invalid visual (and `aria-invalid`)
only shows once the field is touched or dirty, matching how `mk-form-field`
reveals its message and how `submit()` (which marks every field touched)
surfaces the remaining problems.
Returns a signal that is always `true` for a control that is not bound with
`[formField]`, so a standalone `[invalid]="true"` keeps working as before.
Call it in a field initializer (an injection context):
```ts
private readonly fieldTouched = mkInjectFieldTouched();
protected readonly isInvalid = computed(
() => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
);
```
The binding is looked up lazily, on first read: the `FormField` directive
itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
created, so resolving it from the control's constructor would be circular.
```ts
function mkInjectFieldTouched(): Signal
```
## @mk-kit/ui/icon
8 exports. `import { … } from '@mk-kit/ui/icon';`
### MkIcon (component)
Selector: `mk-icon`
Docs: https://mk-kit.dev/components/icon
Import: `import { MkIcon } from '@mk-kit/ui/icon';`
Icon — renders a registered SVG by `name`, or your own projected `