@mk-kit/ui 0.50.0 → 0.52.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.
@@ -1,4 +1,5 @@
1
1
  export * from '@mk-kit/ui/core';
2
+ export * from '@mk-kit/ui/core/signal-forms';
2
3
  export * from '@mk-kit/ui/icon';
3
4
  export * from '@mk-kit/ui/icon/extended';
4
5
  export * from '@mk-kit/ui/chip';
@@ -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/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":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQG;;ACRH;;AAEG"}
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":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQG;;ACRH;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mk-kit/ui",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -85,6 +85,10 @@
85
85
  "types": "./types/mk-kit-ui-core.d.ts",
86
86
  "default": "./fesm2022/mk-kit-ui-core.mjs"
87
87
  },
88
+ "./core/signal-forms": {
89
+ "types": "./types/mk-kit-ui-core-signal-forms.d.ts",
90
+ "default": "./fesm2022/mk-kit-ui-core-signal-forms.mjs"
91
+ },
88
92
  "./data": {
89
93
  "types": "./types/mk-kit-ui-data.d.ts",
90
94
  "default": "./fesm2022/mk-kit-ui-data.mjs"
@@ -0,0 +1,31 @@
1
+ import { Signal } from '@angular/core';
2
+
3
+ /**
4
+ * Touched-gate for a control's `invalid` input under Signal Forms.
5
+ *
6
+ * When a control is bound with the `[formField]` directive, Angular writes the
7
+ * field's `invalid()` state straight into the control's `invalid` input — from
8
+ * the first render, before the user has reached the field. mk-kit controls
9
+ * pass that input through this gate so the invalid visual (and `aria-invalid`)
10
+ * only shows once the field is touched or dirty, matching how `mk-form-field`
11
+ * reveals its message and how `submit()` (which marks every field touched)
12
+ * surfaces the remaining problems.
13
+ *
14
+ * Returns a signal that is always `true` for a control that is not bound with
15
+ * `[formField]`, so a standalone `[invalid]="true"` keeps working as before.
16
+ * Call it in a field initializer (an injection context):
17
+ *
18
+ * ```ts
19
+ * private readonly fieldTouched = mkInjectFieldTouched();
20
+ * protected readonly isInvalid = computed(
21
+ * () => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
22
+ * );
23
+ * ```
24
+ *
25
+ * The binding is looked up lazily, on first read: the `FormField` directive
26
+ * itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
27
+ * created, so resolving it from the control's constructor would be circular.
28
+ */
29
+ declare function mkInjectFieldTouched(): Signal<boolean>;
30
+
31
+ export { mkInjectFieldTouched };
@@ -1335,33 +1335,5 @@ declare function mkSignalErrorsToValidationErrors(errors: readonly MkSignalValid
1335
1335
  */
1336
1336
  declare function mkSignalErrorMessage(errors: readonly MkSignalValidationError[] | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null;
1337
1337
 
1338
- /**
1339
- * Touched-gate for a control's `invalid` input under Signal Forms.
1340
- *
1341
- * When a control is bound with the `[formField]` directive, Angular writes the
1342
- * field's `invalid()` state straight into the control's `invalid` input — from
1343
- * the first render, before the user has reached the field. mk-kit controls
1344
- * pass that input through this gate so the invalid visual (and `aria-invalid`)
1345
- * only shows once the field is touched or dirty, matching how `mk-form-field`
1346
- * reveals its message and how `submit()` (which marks every field touched)
1347
- * surfaces the remaining problems.
1348
- *
1349
- * Returns a signal that is always `true` for a control that is not bound with
1350
- * `[formField]`, so a standalone `[invalid]="true"` keeps working as before.
1351
- * Call it in a field initializer (an injection context):
1352
- *
1353
- * ```ts
1354
- * private readonly fieldTouched = mkInjectFieldTouched();
1355
- * protected readonly isInvalid = computed(
1356
- * () => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
1357
- * );
1358
- * ```
1359
- *
1360
- * The binding is looked up lazily, on first read: the `FormField` directive
1361
- * itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
1362
- * created, so resolving it from the control's constructor would be circular.
1363
- */
1364
- declare function mkInjectFieldTouched(): Signal<boolean>;
1365
-
1366
- export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_OVERLAY_ROOT, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkBodyLevelAncestor, mkFirstErrorMessage, mkGetFocusable, mkInjectFieldTouched, mkIsResponsive, mkMergeI18n, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkValidatorChange, provideMkI18n };
1338
+ export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_OVERLAY_ROOT, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkBodyLevelAncestor, mkFirstErrorMessage, mkGetFocusable, mkIsResponsive, mkMergeI18n, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkValidatorChange, provideMkI18n };
1367
1339
  export type { MkAriaLivePoliteness, MkBlockEditorStrings, MkBreakpoint, MkBreakpoints, MkContrastPreference, MkDensity, MkErrorMessages, MkI18nOverrides, MkI18nStrings, MkOverlayConfig, MkOverlayRootFn, MkResolvedContrast, MkResolvedTheme, MkResponsive, MkSignalValidationError, MkSize, MkSortAnnounceDirection, MkThemePreference, MkTone, MkValidationStrings, MkValidatorChangeRef, MkVariant };
@@ -654,27 +654,6 @@ interface MkPromptDialogData {
654
654
  /** Native input type (e.g. `text`, `email`, `number`, `password`). */
655
655
  inputType?: string;
656
656
  }
657
- /**
658
- * Internal component backing `MkDialogService.prompt`. Renders a single text
659
- * field and resolves the overlay ref with the entered string on confirm, or
660
- * `null` on cancel / Escape / backdrop. Submitting the form (Enter) confirms.
661
- */
662
- declare class MkPromptDialog {
663
- private readonly ref;
664
- protected readonly data: MkPromptDialogData;
665
- protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
666
- private readonly inputRef;
667
- protected readonly value: _angular_core.WritableSignal<string>;
668
- protected readonly confirmText: _angular_core.Signal<string>;
669
- protected readonly cancelText: _angular_core.Signal<string>;
670
- protected readonly canConfirm: _angular_core.Signal<boolean>;
671
- constructor();
672
- protected onInput(event: Event): void;
673
- protected submit(): void;
674
- protected cancel(): void;
675
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkPromptDialog, never>;
676
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkPromptDialog, "mk-prompt-dialog", never, {}, {}, never, never, true, never>;
677
- }
678
657
 
679
658
  /**
680
659
  * Panel width preset. The panel is always `min(target, 92vw)`, so it shrinks to
@@ -1379,5 +1358,5 @@ declare class MkBlockUiService {
1379
1358
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MkBlockUiService>;
1380
1359
  }
1381
1360
 
1382
- export { MK_TOUR_DATA, MkAlert, MkBanner, MkBlockUi, MkBlockUiOverlay, MkBlockUiService, MkBottomSheet, MkBottomSheetService, MkConfirmDialog, MkDialog, MkDialogService, MkDialogTitle, MkHovercard, MkHovercardTrigger, MkLoadingBar, MkLoadingBarService, MkNotificationCenter, MkPopconfirm, MkPopconfirmTrigger, MkPopover, MkPopoverTrigger, MkPromptDialog, MkResult, MkSnackbar, MkSnackbarContainer, MkSnackbarRef, MkSnackbarService, MkToast, MkToastContainer, MkToastService, MkTooltip, MkTooltipPanel, MkTourPopup, MkTourService };
1361
+ export { MK_TOUR_DATA, MkAlert, MkBanner, MkBlockUi, MkBlockUiOverlay, MkBlockUiService, MkBottomSheet, MkBottomSheetService, MkConfirmDialog, MkDialog, MkDialogService, MkDialogTitle, MkHovercard, MkHovercardTrigger, MkLoadingBar, MkLoadingBarService, MkNotificationCenter, MkPopconfirm, MkPopconfirmTrigger, MkPopover, MkPopoverTrigger, MkResult, MkSnackbar, MkSnackbarContainer, MkSnackbarRef, MkSnackbarService, MkToast, MkToastContainer, MkToastService, MkTooltip, MkTooltipPanel, MkTourPopup, MkTourService };
1383
1362
  export type { MkAlertTone, MkAlertVariant, MkBottomSheetConfig, MkConfirmDialogData, MkDialogConfig, MkDialogSize, MkNotification, MkPromptDialogData, MkResultIconVariant, MkResultStatus, MkResultTone, MkSnackbarConfig, MkSnackbarDismissReason, MkSnackbarItem, MkSnackbarTone, MkToastAction, MkToastConfig, MkToastItem, MkToastTone, MkTourController, MkTourData, MkTourStep };
@@ -91,7 +91,12 @@ declare class MkHarnessLoader {
91
91
  rootElement(): MkTestElement;
92
92
  element(selector: string): MkTestElement;
93
93
  elements(selector: string): MkTestElement[];
94
- /** First matching harness; throws when there is none. */
94
+ /**
95
+ * First matching harness; throws when there is none. Retries for a short
96
+ * while first: overlays such as `MkDialogService.prompt()` render after a
97
+ * lazy chunk resolves, so the host may appear a few ticks after the call.
98
+ * `has()` / `getOrNull()` stay immediate so absence can be asserted.
99
+ */
95
100
  get<T extends MkHarness>(type: MkHarnessType<T>, filters?: MkHarnessFilters): Promise<T>;
96
101
  getOrNull<T extends MkHarness>(type: MkHarnessType<T>, filters?: MkHarnessFilters): Promise<T | null>;
97
102
  has<T extends MkHarness>(type: MkHarnessType<T>, filters?: MkHarnessFilters): Promise<boolean>;
@@ -1,4 +1,5 @@
1
1
  export * from '@mk-kit/ui/core';
2
+ export * from '@mk-kit/ui/core/signal-forms';
2
3
  export * from '@mk-kit/ui/icon';
3
4
  export * from '@mk-kit/ui/icon/extended';
4
5
  export * from '@mk-kit/ui/chip';