mn-angular-lib 1.0.140 → 1.0.142

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.
@@ -11,6 +11,7 @@ import { ValidationErrors, NgControl, AbstractControl, ValidatorFn, AsyncValidat
11
11
  import { LucideIconData } from '@lucide/angular';
12
12
  export { LucideIconData } from '@lucide/angular';
13
13
  import { SafeHtml } from '@angular/platform-browser';
14
+ import * as tailwind_merge from 'tailwind-merge';
14
15
  import { HttpStatusCode, HttpHeaders, HttpErrorResponse, HttpClient, HttpResponse, HttpParams } from '@angular/common/http';
15
16
 
16
17
  declare const mnAlertVariants: tailwind_variants.TVReturnType<{
@@ -2651,10 +2652,11 @@ declare class MnMultiSelect implements OnInit {
2651
2652
  private readonly cdr;
2652
2653
  /** Reference to the trigger element for positioning the dropdown */
2653
2654
  triggerRef: ElementRef<HTMLElement>;
2654
- /** The panel element currently moved into `document.body`, if any. */
2655
+ /** Layout classes for the anchored popover panel. The mobile sheet is rendered by
2656
+ * mn-bottom-sheet instead, so it no longer needs a branch here. */
2657
+ readonly panelClasses = "fixed z-9999 bg-base-100 border border-base-300 rounded-md shadow-lg max-h-60 overflow-auto";
2658
+ /** The anchored popover panel currently moved into `document.body`, if any. */
2655
2659
  private movedPanel;
2656
- /** The sheet backdrop element currently moved into `document.body`, if any. */
2657
- private movedBackdrop;
2658
2660
  /** Option count at which the search input auto-enables when `searchable` is unset. */
2659
2661
  private static readonly DEFAULT_SEARCH_THRESHOLD;
2660
2662
  /** Tailwind's `sm` breakpoint — below this the panel renders as a bottom sheet.
@@ -2687,6 +2689,8 @@ declare class MnMultiSelect implements OnInit {
2687
2689
  * card) used to leave the portalled panel floating at its stale coordinates.
2688
2690
  */
2689
2691
  private scrollCapture;
2692
+ /** The bottom-sheet host currently moved into `document.body`, if any. */
2693
+ private movedSheet;
2690
2694
  /**
2691
2695
  * The dropdown panel element, queried while it is rendered by the `@if` block.
2692
2696
  * The setter relocates the panel to `document.body` so that its `position: fixed`
@@ -2696,12 +2700,6 @@ declare class MnMultiSelect implements OnInit {
2696
2700
  * broken on iOS). Cleanup is handled when the query clears on close/destroy.
2697
2701
  */
2698
2702
  set dropdownRef(ref: ElementRef<HTMLElement> | undefined);
2699
- /**
2700
- * The dimming backdrop rendered behind the mobile sheet. Portalled alongside the
2701
- * panel for the same reason — a `position: fixed` backdrop left inside a transformed
2702
- * ancestor would cover that ancestor rather than the viewport.
2703
- */
2704
- set sheetBackdropRef(ref: ElementRef<HTMLElement> | undefined);
2705
2703
  /** Currently selected values */
2706
2704
  selectedValues: unknown[];
2707
2705
  isOpen: boolean;
@@ -2717,7 +2715,13 @@ declare class MnMultiSelect implements OnInit {
2717
2715
  private onTouched;
2718
2716
  private readonly builtInErrorMessages;
2719
2717
  constructor();
2720
- ngOnInit(): void;
2718
+ /**
2719
+ * The bottom-sheet host, read as an `ElementRef` so it can be relocated to
2720
+ * `document.body` — its `position: fixed` children (backdrop + container) must anchor
2721
+ * to the viewport, not to any transformed/filtered ancestor of this component. On open
2722
+ * its container height is captured as the sheet's `min-height` floor.
2723
+ */
2724
+ set sheetRef(ref: ElementRef<HTMLElement> | undefined);
2721
2725
  /**
2722
2726
  * Tracks the sheet breakpoint through `matchMedia` rather than reading `innerWidth`
2723
2727
  * once, so rotating the device switches layout instead of leaving a panel positioned
@@ -2727,7 +2731,7 @@ declare class MnMultiSelect implements OnInit {
2727
2731
  private startWatchingViewport;
2728
2732
  /** Tears down the breakpoint listener. Idempotent. */
2729
2733
  private stopWatchingViewport;
2730
- onDocumentClick(event: Event): void;
2734
+ ngOnInit(): void;
2731
2735
  private resolveConfig;
2732
2736
  writeValue(val: unknown): void;
2733
2737
  registerOnChange(fn: (val: unknown) => void): void;
@@ -2741,14 +2745,16 @@ declare class MnMultiSelect implements OnInit {
2741
2745
  * otherwise auto-enabled once the option count reaches the threshold.
2742
2746
  */
2743
2747
  get isSearchable(): boolean;
2744
- /** Layout classes for the panel — a bottom-anchored sheet, or the trigger-anchored popover. */
2745
- get panelClasses(): string;
2748
+ onDocumentClick(event: Event): void;
2746
2749
  /**
2747
2750
  * Records the sheet's opened height as its `min-height` floor. Measured on the next
2748
2751
  * frame so the read reflects the fully-rendered, unfiltered list (the search box is
2749
2752
  * empty on open) and never forces a reflow mid change-detection. The floor equals the
2750
2753
  * content height at that instant, so applying it triggers no resize — it only stops a
2751
2754
  * later, shorter filtered list from pulling the sheet down.
2755
+ *
2756
+ * `hostEl` is the portalled mn-bottom-sheet host (`display: contents`), so the height
2757
+ * is read from its `.mn-sheet-container` child rather than the host itself.
2752
2758
  */
2753
2759
  private captureSheetFloor;
2754
2760
  /** Closes the dropdown on Escape for keyboard accessibility. */
@@ -2841,6 +2847,135 @@ declare class MnMultiSelect implements OnInit {
2841
2847
  static ɵcmp: i0.ɵɵComponentDeclaration<MnMultiSelect, "mn-lib-multi-select", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
2842
2848
  }
2843
2849
 
2850
+ /**
2851
+ * A viewport-anchored bottom sheet — the mobile presentation shared by the modal
2852
+ * shell and the multi-select dropdown.
2853
+ *
2854
+ * It owns only the sheet *chrome and gestures*: a bottom-anchored, full-width,
2855
+ * rounded-top surface with an optional dimming backdrop and drag grabber, a
2856
+ * slide-up entrance, swipe/flick-to-dismiss, and a promise-based slide-down exit.
2857
+ * It is deliberately presentational: the body is projected via `<ng-content>`, and
2858
+ * dismissal is reported through {@link dismiss} for the host to act on (run a close
2859
+ * guard, tear down its overlay, …) rather than being handled here.
2860
+ *
2861
+ * Positioning is `position: fixed` against the viewport, so a consumer whose sheet
2862
+ * lives inside a `transform`/`filter` ancestor (which would otherwise become the
2863
+ * containing block) must relocate this host to `document.body` — as the
2864
+ * multi-select does with its portal helper.
2865
+ */
2866
+ declare class MnBottomSheet {
2867
+ /** Tailwind's `sm` breakpoint — at or below this the swipe gesture is armed.
2868
+ * Kept in step with the same constant in the modal shell and multi-select. */
2869
+ private static readonly SHEET_MAX_WIDTH;
2870
+ /** Drag distance (px) past which a release dismisses regardless of speed. */
2871
+ private static readonly SWIPE_DISMISS_THRESHOLD;
2872
+ /** Downward release speed (px/ms) above which a short drag still dismisses — a "flick". */
2873
+ private static readonly FLICK_VELOCITY;
2874
+ /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */
2875
+ private static readonly FLICK_MIN_DISTANCE;
2876
+ /** Upper bound for the exit wait if no `transitionend` fires (e.g. animation suppressed). */
2877
+ private static readonly CLOSE_FALLBACK_MS;
2878
+ /** Whether to render the dimming backdrop behind the sheet (default: true).
2879
+ * A host that already paints its own backdrop (the modal shell) sets this false. */
2880
+ showBackdrop: boolean;
2881
+ /** Whether to render the drag grabber handle that arms swipe-to-dismiss (default: true). */
2882
+ showGrabber: boolean;
2883
+ /** Whether the sheet can be dismissed by the user via swipe/flick or backdrop tap
2884
+ * (default: true). When false the gestures are inert and the backdrop is non-closing. */
2885
+ dismissible: boolean;
2886
+ /** Optional `min-height` floor (px) for the container, so filtering its content
2887
+ * shorter cannot shrink the sheet mid-interaction. Null leaves it content-sized. */
2888
+ minHeightPx: number | null;
2889
+ /** Cap on the sheet height as a fraction of the viewport, in vh (default: 80). */
2890
+ maxHeightVh: number;
2891
+ /** Extra class(es) applied to the sheet container, so a host can attach the hooks
2892
+ * its own CSS depends on (e.g. the modal shell's `modal-container`). */
2893
+ containerClass: string;
2894
+ /** Accessible name for the sheet dialog. */
2895
+ ariaLabel?: string;
2896
+ /** Id of the element that labels this dialog (takes precedence over `ariaLabel`). */
2897
+ ariaLabelledby?: string;
2898
+ /**
2899
+ * When true, the sheet grows to its `maxHeightVh` while the host app marks the soft
2900
+ * keyboard open (a `.mn-keyboard-open` class on a document ancestor), guaranteeing
2901
+ * scroll room to lift a focused field above an overlaying keyboard. Off by default so
2902
+ * a keyboard opened over an unrelated sheet (a multi-select search) does not resize it.
2903
+ */
2904
+ growWithKeyboard: boolean;
2905
+ /**
2906
+ * Optional async gate consulted before a user-initiated dismissal (swipe/flick/backdrop
2907
+ * tap) is committed. Resolving false aborts the dismissal and springs the sheet back —
2908
+ * used by the modal to run its close guard (e.g. an unsaved-changes prompt). A
2909
+ * programmatic {@link startClosing} bypasses it.
2910
+ */
2911
+ dismissGuard?: () => boolean | Promise<boolean>;
2912
+ /**
2913
+ * Emitted once the user has dismissed the sheet — after the slide-down exit has
2914
+ * finished, so the host can remove the sheet from the DOM without cutting the
2915
+ * animation short. The host decides what dismissal means (close, run a guard, …).
2916
+ */
2917
+ dismiss: EventEmitter<void>;
2918
+ /** Current downward drag offset (px) applied to the sheet while swiping. */
2919
+ sheetDragY: number;
2920
+ /** True while the user is actively dragging the grabber (disables the snap transition). */
2921
+ isDraggingSheet: boolean;
2922
+ /** True once a dismissal has committed — the sheet glides off-screen via its transition. */
2923
+ isDismissing: boolean;
2924
+ private readonly cdr;
2925
+ private readonly el;
2926
+ /** The sheet container element, used to measure its height and drive the exit. */
2927
+ private readonly containerRef;
2928
+ private dragStartY;
2929
+ /** The two most recent (y, timestamp) pointer samples, for estimating flick velocity.
2930
+ * `t` uses the event timestamp (monotonic), so no wall-clock is read. */
2931
+ private lastSample;
2932
+ private prevSample;
2933
+ /** In-flight exit animation, so a swipe-dismiss and a follow-up programmatic
2934
+ * {@link startClosing} share one glide instead of re-triggering it. */
2935
+ private exitPromise;
2936
+ get hostClasses(): string;
2937
+ /** Whether the viewport is currently narrow enough for the sheet to accept a swipe. */
2938
+ private get isNarrow();
2939
+ onSheetPointerDown(event: PointerEvent): void;
2940
+ onSheetPointerMove(event: PointerEvent): void;
2941
+ onSheetPointerUp(): void;
2942
+ onBackdropClick(): void;
2943
+ /**
2944
+ * Plays the slide-down exit and resolves once it has finished. Exposed so a host that
2945
+ * dismisses the sheet programmatically (not via a gesture) can await the same exit
2946
+ * before tearing the sheet down. Idempotent: a swipe-dismiss already in flight and a
2947
+ * subsequent programmatic close share the one glide rather than restarting it.
2948
+ */
2949
+ startClosing(): Promise<void>;
2950
+ /**
2951
+ * Runs the optional {@link dismissGuard}, then either commits the dismissal (glide out
2952
+ * + emit) or springs the sheet back if the guard rejects. A non-dismissible sheet never
2953
+ * gets here from a gesture, but the guard is still short-circuited defensively.
2954
+ */
2955
+ private attemptDismiss;
2956
+ /** Whether the release should dismiss: a long-enough drag OR a fast downward flick. */
2957
+ private shouldDismiss;
2958
+ /** Downward release speed (px/ms) from the last two pointer samples; 0 when unusable. */
2959
+ private releaseVelocity;
2960
+ /** Springs the sheet back to its resting position after a drag that didn't dismiss. */
2961
+ private snapBack;
2962
+ /**
2963
+ * Commits a dismissal: glides the sheet the rest of the way off-screen, then emits
2964
+ * {@link dismiss} once the exit animation settles. Continuing the gesture (rather than
2965
+ * snapping back to 0 first) keeps a swipe feeling like one unbroken motion.
2966
+ */
2967
+ private commitDismiss;
2968
+ /** Commits the exit animation exactly once and returns the shared in-flight promise.
2969
+ * Short-circuits under reduced motion and falls back to a timeout if no event fires. */
2970
+ private playExit;
2971
+ /** Waits for the container's exit transition to end, with a reduced-motion short-circuit
2972
+ * and a fallback timeout so it always resolves. */
2973
+ private awaitExit;
2974
+ private prefersReducedMotion;
2975
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnBottomSheet, never>;
2976
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnBottomSheet, "mn-bottom-sheet", never, { "showBackdrop": { "alias": "showBackdrop"; "required": false; }; "showGrabber": { "alias": "showGrabber"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "minHeightPx": { "alias": "minHeightPx"; "required": false; }; "maxHeightVh": { "alias": "maxHeightVh"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "growWithKeyboard": { "alias": "growWithKeyboard"; "required": false; }; "dismissGuard": { "alias": "dismissGuard"; "required": false; }; }, { "dismiss": "dismiss"; }, never, ["*"], true, never>;
2977
+ }
2978
+
2844
2979
  declare const mnSelectVariants: tailwind_variants.TVReturnType<{
2845
2980
  shadow: {
2846
2981
  true: string;
@@ -5494,9 +5629,6 @@ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterV
5494
5629
  get closeModalLabel(): string;
5495
5630
  private el;
5496
5631
  private cdr;
5497
- /** Downward release speed (px/ms) above which a short drag still dismisses — a "flick".
5498
- * Native sheets dismiss on a quick flick regardless of distance, not just a long drag. */
5499
- private static readonly FLICK_VELOCITY;
5500
5632
  config: ModalConfig<TResult>;
5501
5633
  modalRef: MnModalRef<TResult>;
5502
5634
  isClosing: boolean;
@@ -5511,6 +5643,8 @@ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterV
5511
5643
  readonly ModalKind: typeof ModalKind;
5512
5644
  /** The rendered wizard body, when this modal is a wizard — used to read the active step title. */
5513
5645
  private readonly wizardBody;
5646
+ /** Tailwind's `sm` breakpoint — below this the modal presents as a bottom sheet. */
5647
+ private static readonly SHEET_MAX_WIDTH;
5514
5648
  /**
5515
5649
  * Title of the wizard's current step, or undefined for non-wizard modals.
5516
5650
  * The template appends it to the modal title on small screens, where the
@@ -5521,69 +5655,66 @@ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterV
5521
5655
  private focusTrapListener;
5522
5656
  private pollingTimer;
5523
5657
  private pollAttempts;
5524
- ngOnInit(): void;
5525
- /** Minimum drag distance (px) that must accompany a flick, so an incidental fast tap
5526
- * on the grabber never dismisses. Below the distance threshold, only a flick dismisses. */
5527
- private static readonly FLICK_MIN_DISTANCE;
5528
- ngOnDestroy(): void;
5658
+ /** Upper bound for the close wait if no animation/transition end event fires
5659
+ * (e.g. an animation was suppressed). Must stay longer than the slowest close
5660
+ * path so it never preempts. */
5661
+ private static readonly CLOSE_FALLBACK_MS;
5662
+ /** Live match of the sheet breakpoint, so the modal switches between the centered dialog
5663
+ * and the bottom sheet when the viewport crosses it (e.g. an orientation change). */
5664
+ readonly isNarrow: i0.WritableSignal<boolean>;
5665
+ /** The bottom sheet presenting this modal on mobile, absent on the desktop dialog path. */
5666
+ private readonly bottomSheet;
5667
+ /** Optional native haptic engine. Absent on the web — every call is null-guarded. */
5668
+ private haptics;
5669
+ private sheetMedia;
5670
+ private sheetMediaListener;
5671
+ /** Whether this modal is allowed to present as a bottom sheet on small screens (default: true). */
5672
+ get isMobileSheet(): boolean;
5673
+ /** Whether the modal should currently render as a bottom sheet (mobile) rather than the
5674
+ * centered dialog (desktop). */
5675
+ get showMobileSheet(): boolean;
5676
+ get hostClasses(): string;
5529
5677
  private setupFocusTrap;
5530
5678
  private removeFocusTrap;
5531
5679
  asWizard(config: ModalConfig<TResult>): WizardModalConfig;
5532
5680
  asForm(config: ModalConfig<TResult>): FormModalConfig;
5533
5681
  asConfirmation(config: ModalConfig<TResult>): ConfirmationModalConfig;
5534
5682
  asCustom(config: ModalConfig<TResult>): CustomModalConfig;
5535
- private static readonly SWIPE_DISMISS_THRESHOLD;
5536
- /** Optional native haptic engine. Absent on the web — every call is null-guarded. */
5537
- private haptics;
5538
- /** The two most recent (y, timestamp) pointer samples, used to estimate the release
5539
- * velocity for flick-to-dismiss. `t` uses the event timestamp (monotonic, no Date). */
5540
- private lastSample;
5541
- /** Upper bound for the close wait if no animation/transition end event fires
5542
- * (e.g. an animation was suppressed). Must stay longer than the slowest close
5543
- * path (mobile sheet slide-down 0.45s, swipe glide 0.3s) so it never preempts. */
5544
- private static readonly CLOSE_FALLBACK_MS;
5545
- /** Whether this modal renders as a bottom sheet on small screens (default: true). */
5546
- get isMobileSheet(): boolean;
5683
+ /** Whether the modal can be dismissed at all (drives the sheet's swipe/backdrop arming). */
5684
+ get canClose(): boolean;
5685
+ ngOnInit(): void;
5686
+ ngOnDestroy(): void;
5547
5687
  /**
5548
5688
  * Triggers the closing animation and resolves once it has actually finished.
5549
5689
  *
5550
- * Deferred via setTimeout to avoid NG0100 when called during a CD cycle.
5551
- * Rather than guess a fixed duration (the old hardcoded 150ms truncated the
5552
- * mobile slide-down, which runs 250ms and the swipe glide, 300ms), we wait
5553
- * for the container's `animationend`/`transitionend` and tear down then. A
5554
- * fallback timeout guarantees resolution if no such event fires, and we
5555
- * short-circuit entirely under reduced motion (the CSS collapses to instant).
5690
+ * Deferred via setTimeout to avoid NG0100 when called during a CD cycle. On mobile the
5691
+ * exit is owned by the bottom sheet, so we delegate to its `startClosing()` (idempotent
5692
+ * with a swipe-dismiss already in flight); on desktop we wait for the dialog container's
5693
+ * `animationend`/`transitionend`. A fallback timeout guarantees resolution if no event
5694
+ * fires, and we short-circuit under reduced motion (the CSS collapses to instant).
5556
5695
  */
5557
5696
  startClosing(): Promise<void>;
5558
5697
  private prefersReducedMotion;
5559
5698
  onEscapeKey(event: Event): void;
5560
5699
  onBackdropClick(): void;
5561
5700
  onCloseButtonClick(): void;
5562
- /** True once a swipe has crossed the dismiss threshold — slides the sheet off-screen
5563
- * via the transform transition instead of replaying the slide-up keyframe. */
5564
- swipeDismissing: boolean;
5565
- /** Current downward drag offset (px) applied to the sheet while swiping. */
5566
- sheetDragY: number;
5567
- /** True while the user is actively dragging the grabber (disables snap transition). */
5568
- isDraggingSheet: boolean;
5569
- private prevSample;
5570
- get hostClasses(): string;
5571
- private dragStartY;
5572
- /** Whether the sheet can be dismissed at all (drives whether the swipe is armed). */
5573
- private get canClose();
5574
- /** Tailwind's `sm` breakpoint — below this the modal renders as a bottom sheet. */
5575
- private static readonly SHEET_MAX_WIDTH;
5701
+ /**
5702
+ * Guard consulted by the bottom sheet before it commits a swipe/flick/backdrop dismissal.
5703
+ * Mirrors the DISABLED/GUARDED rules of {@link handleClose} so a swipe cannot escape a
5704
+ * modal that a button close could not. Bound as a field so the template passes it directly.
5705
+ */
5706
+ readonly sheetDismissGuard: () => Promise<boolean>;
5707
+ /**
5708
+ * Handles the sheet's `(dismiss)` — emitted only after its guard passed and its exit
5709
+ * animation finished. Dismisses the modal (no re-guard) with a confirming haptic.
5710
+ */
5711
+ onSheetDismiss(): void;
5576
5712
  ngAfterViewInit(): void;
5577
- onSheetPointerDown(event: PointerEvent): void;
5578
- onSheetPointerMove(event: PointerEvent): void;
5579
- onSheetPointerUp(): Promise<void>;
5580
- /** Whether the release should dismiss: a long-enough drag OR a fast downward flick. */
5581
- private shouldDismissSheet;
5582
- /** Downward release speed (px/ms) from the last two pointer samples. Positive means
5583
- * moving down. Returns 0 when there is no usable sample window. */
5584
- private releaseVelocity;
5585
- /** Springs the sheet back to its resting position after a drag that didn't dismiss. */
5586
- private snapBack;
5713
+ /** Tracks the sheet breakpoint through `matchMedia` so the dialog/sheet fork re-renders
5714
+ * when the viewport crosses it. */
5715
+ private startWatchingViewport;
5716
+ /** Tears down the breakpoint listener. Idempotent. */
5717
+ private stopWatchingViewport;
5587
5718
  /** Attempts to dismiss the modal. Resolves true if it was actually dismissed,
5588
5719
  * false if blocked by a DISABLED close mode or a rejected close guard. */
5589
5720
  private handleClose;
@@ -7279,6 +7410,184 @@ declare class MnIconAttributes {
7279
7410
  static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol]", never, {}, {}, never, never, true, never>;
7280
7411
  }
7281
7412
 
7413
+ /**
7414
+ * A single crumb in the breadcrumb trail.
7415
+ *
7416
+ * A crumb becomes a link when it carries an {@link href}; otherwise it renders
7417
+ * as a button that only emits {@link MnBreadcrumbs.crumbClick} / runs
7418
+ * {@link onClick}. The library stays router-agnostic — an app wires SPA
7419
+ * navigation through `onClick`/`crumbClick`, or lets the `href` anchor navigate.
7420
+ */
7421
+ type MnBreadcrumbItem = {
7422
+ /** Translation key or literal label for the crumb. */
7423
+ label: string;
7424
+ /** Optional link target; when set the crumb renders as an `<a href>`. */
7425
+ href?: string;
7426
+ /** Optional callback invoked on click (fires alongside `crumbClick`). */
7427
+ onClick?: () => void;
7428
+ };
7429
+ /**
7430
+ * Data source for {@link MnBreadcrumbs}.
7431
+ *
7432
+ * When {@link items} holds crumbs the component renders a linkable trail whose
7433
+ * **last** item is the current page (never a link). When `items` is empty the
7434
+ * component degrades to a single "Back" control: it navigates to
7435
+ * {@link backHref} when given, otherwise steps back through browser history.
7436
+ */
7437
+ type MnBreadcrumbsData = {
7438
+ /** Ordered crumbs root → current. Empty ⇒ the "Back" fallback renders instead. */
7439
+ items: MnBreadcrumbItem[];
7440
+ /** Fallback "Back" target. Set ⇒ renders `<a href>`; unset ⇒ `history.back()`. */
7441
+ backHref?: string;
7442
+ /** Translation key or literal for the "Back" label. Defaults to `'back'`. */
7443
+ backLabel?: string;
7444
+ /** Visual scale. Defaults to `'md'`. */
7445
+ size?: 'sm' | 'md';
7446
+ };
7447
+
7448
+ /**
7449
+ * A flexible breadcrumb trail.
7450
+ *
7451
+ * Given crumbs it renders a linkable trail (`root › … › current`) where the last
7452
+ * crumb is the current page and is never a link. Given no crumbs it degrades to
7453
+ * a single "Back" control — the two are mutually exclusive. "Flexible" here is
7454
+ * input-driven, not viewport-driven: there is deliberately no responsive
7455
+ * collapse, no scroll machinery — it is a list of links plus a fallback.
7456
+ *
7457
+ * Navigation stays router- and history-agnostic where possible: a crumb (or the
7458
+ * Back control) with an `href` renders a plain `<a>` and navigates natively;
7459
+ * otherwise clicks emit outputs for the app to handle. Only the Back fallback
7460
+ * with no `href` reaches for `history.back()`.
7461
+ */
7462
+ declare class MnBreadcrumbs {
7463
+ /** Trail crumbs and Back-fallback configuration. */
7464
+ data: MnBreadcrumbsData;
7465
+ /** Emits the crumb that was clicked (non-current crumbs only). */
7466
+ crumbClick: EventEmitter<MnBreadcrumbItem>;
7467
+ /** Emits when the fallback "Back" control is activated. */
7468
+ back: EventEmitter<void>;
7469
+ /** Default translation key / literal for the Back control's label. */
7470
+ private static readonly DEFAULT_BACK_LABEL;
7471
+ /** Resolved tailwind-variants slot functions for the current size. */
7472
+ get styles(): {
7473
+ root: (slotProps?: ({
7474
+ size?: "sm" | "md" | undefined;
7475
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7476
+ list: (slotProps?: ({
7477
+ size?: "sm" | "md" | undefined;
7478
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7479
+ link: (slotProps?: ({
7480
+ size?: "sm" | "md" | undefined;
7481
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7482
+ current: (slotProps?: ({
7483
+ size?: "sm" | "md" | undefined;
7484
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7485
+ separator: (slotProps?: ({
7486
+ size?: "sm" | "md" | undefined;
7487
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7488
+ back: (slotProps?: ({
7489
+ size?: "sm" | "md" | undefined;
7490
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7491
+ } & {
7492
+ root: (slotProps?: ({
7493
+ size?: "sm" | "md" | undefined;
7494
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7495
+ list: (slotProps?: ({
7496
+ size?: "sm" | "md" | undefined;
7497
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7498
+ link: (slotProps?: ({
7499
+ size?: "sm" | "md" | undefined;
7500
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7501
+ current: (slotProps?: ({
7502
+ size?: "sm" | "md" | undefined;
7503
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7504
+ separator: (slotProps?: ({
7505
+ size?: "sm" | "md" | undefined;
7506
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7507
+ back: (slotProps?: ({
7508
+ size?: "sm" | "md" | undefined;
7509
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
7510
+ } & {};
7511
+ /** Whether a linkable trail should render (vs the Back fallback). */
7512
+ get hasTrail(): boolean;
7513
+ /** Label for the Back control — the configured key/literal, or the default. */
7514
+ get backLabel(): string;
7515
+ /** The last crumb is the current page and is rendered as plain text. */
7516
+ isCurrent(index: number): boolean;
7517
+ /** Runs a crumb's own callback and notifies listeners of the click. */
7518
+ onCrumb(item: MnBreadcrumbItem): void;
7519
+ /**
7520
+ * Fallback Back action. Always emits `back` for listeners; when no `backHref`
7521
+ * anchor is carrying the navigation, steps back through browser history.
7522
+ */
7523
+ onBack(): void;
7524
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnBreadcrumbs, never>;
7525
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnBreadcrumbs, "mn-breadcrumbs", never, { "data": { "alias": "data"; "required": false; }; }, { "crumbClick": "crumbClick"; "back": "back"; }, never, never, true, never>;
7526
+ }
7527
+
7528
+ /**
7529
+ * Styling for {@link MnBreadcrumbs}, expressed as tailwind-variants slots so the
7530
+ * template can pull one class string per role. Theme tokens only, so the trail
7531
+ * reads correctly in both light and dark. Links and the Back control are native
7532
+ * `<button>`/`<a>` elements reset to look like plain text with a hover accent.
7533
+ */
7534
+ declare const mnBreadcrumbsVariants: tailwind_variants.TVReturnType<{
7535
+ size: {
7536
+ sm: {
7537
+ root: string;
7538
+ list: string;
7539
+ };
7540
+ md: {
7541
+ root: string;
7542
+ list: string;
7543
+ };
7544
+ };
7545
+ }, {
7546
+ root: string;
7547
+ list: string;
7548
+ link: string;
7549
+ current: string;
7550
+ separator: string;
7551
+ back: string;
7552
+ }, undefined, {
7553
+ size: {
7554
+ sm: {
7555
+ root: string;
7556
+ list: string;
7557
+ };
7558
+ md: {
7559
+ root: string;
7560
+ list: string;
7561
+ };
7562
+ };
7563
+ }, {
7564
+ root: string;
7565
+ list: string;
7566
+ link: string;
7567
+ current: string;
7568
+ separator: string;
7569
+ back: string;
7570
+ }, tailwind_variants.TVReturnType<{
7571
+ size: {
7572
+ sm: {
7573
+ root: string;
7574
+ list: string;
7575
+ };
7576
+ md: {
7577
+ root: string;
7578
+ list: string;
7579
+ };
7580
+ };
7581
+ }, {
7582
+ root: string;
7583
+ list: string;
7584
+ link: string;
7585
+ current: string;
7586
+ separator: string;
7587
+ back: string;
7588
+ }, undefined, unknown, unknown, undefined>>;
7589
+ type MnBreadcrumbsVariants = VariantProps<typeof mnBreadcrumbsVariants>;
7590
+
7282
7591
  /**
7283
7592
  * Types for mn-lib configuration.
7284
7593
  */
@@ -7772,5 +8081,5 @@ type MnPreviewMessage = {
7772
8081
  */
7773
8082
  declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
7774
8083
 
7775
- export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_HAPTICS, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MODAL_ACTION_ICONS, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MODAL_ACTION_ICON_SIZE, MODAL_ACTION_ICON_SIZE_SM, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDateSelectorBar, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnRichTextEditor, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultFilterPredicate, defaultIconForStyle, defaultTextAdapter, emptyFilterValue, enableMnPreviewMode, isFilterValueActive, isTranslatable, matchesColumnFilter, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
7776
- export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnBase, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnFilterValue, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DateSelectorBarLayout, DatetimeFieldConfig, DayTile, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, GridDataSource, GridLayout, GridSkeleton, HourRow, ListAppearance, ListDataSource, ListLabels, ListSkeleton, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnColumnFilter, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnFileDisplayItem, MnFileInputDisplayMode, MnFileInputErrorMessageData, MnFileInputErrorMessagesData, MnFileInputProps, MnFileInputUIConfig, MnFileInputVariants, MnHapticStyle, MnHapticsHandler, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPageSlot, MnPreviewMessage, MnQueryParams, MnRichTextEditorControl, MnRichTextEditorLabels, MnRichTextEditorToolbar, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTableFilterLabels, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationMode, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };
8084
+ export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_HAPTICS, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MODAL_ACTION_ICONS, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MODAL_ACTION_ICON_SIZE, MODAL_ACTION_ICON_SIZE_SM, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnBottomSheet, MnBreadcrumbs, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDateSelectorBar, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnRichTextEditor, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultFilterPredicate, defaultIconForStyle, defaultTextAdapter, emptyFilterValue, enableMnPreviewMode, isFilterValueActive, isTranslatable, matchesColumnFilter, mnAlertVariants, mnBadgeVariants, mnBreadcrumbsVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
8085
+ export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnBase, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnFilterValue, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DateSelectorBarLayout, DatetimeFieldConfig, DayTile, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, GridDataSource, GridLayout, GridSkeleton, HourRow, ListAppearance, ListDataSource, ListLabels, ListSkeleton, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnBreadcrumbItem, MnBreadcrumbsData, MnBreadcrumbsVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnColumnFilter, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnFileDisplayItem, MnFileInputDisplayMode, MnFileInputErrorMessageData, MnFileInputErrorMessagesData, MnFileInputProps, MnFileInputUIConfig, MnFileInputVariants, MnHapticStyle, MnHapticsHandler, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPageSlot, MnPreviewMessage, MnQueryParams, MnRichTextEditorControl, MnRichTextEditorLabels, MnRichTextEditorToolbar, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTableFilterLabels, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationMode, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };