mn-angular-lib 1.0.148 → 1.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "1.0.148",
3
+ "version": "1.0.149",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3",
@@ -0,0 +1,58 @@
1
+ /* Each alert is wrapped in a grid so its row can collapse from 1fr → 0fr, letting the
2
+ siblings glide up smoothly instead of jumping when one leaves. The card's transform and
3
+ opacity are driven from the component (swipe drag, fling, drag-fade); the exit fade and
4
+ height-collapse are owned here so every dismissal path — swipe, close button, auto-timeout
5
+ — animates out rather than vanishing instantly. */
6
+
7
+ :host {
8
+ --mn-alert-exit: 320ms;
9
+ }
10
+
11
+ .mn-alert-item {
12
+ display: grid;
13
+ grid-template-rows: 1fr;
14
+ margin-bottom: 0.75rem;
15
+ /* `touch-action` is set from the component per platform (pan-y for the horizontal swipe
16
+ axis, pan-x for the vertical one); this is only the pre-hydration fallback. */
17
+ touch-action: pan-y;
18
+ cursor: grab;
19
+ transition:
20
+ transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
21
+ opacity var(--mn-alert-exit) ease,
22
+ grid-template-rows var(--mn-alert-exit) cubic-bezier(0.4, 0, 0.2, 1),
23
+ margin-bottom var(--mn-alert-exit) cubic-bezier(0.4, 0, 0.2, 1);
24
+ }
25
+
26
+ .mn-alert-item:last-child {
27
+ margin-bottom: 0;
28
+ }
29
+
30
+ .mn-alert-item.dragging {
31
+ /* Track the finger 1:1 — no easing while a drag is live. */
32
+ transition: none;
33
+ cursor: grabbing;
34
+ user-select: none;
35
+ }
36
+
37
+ .mn-alert-inner {
38
+ /* Required for the grid row to actually shrink its content on collapse. */
39
+ min-height: 0;
40
+ }
41
+
42
+ .mn-alert-item.leaving {
43
+ grid-template-rows: 0fr;
44
+ opacity: 0;
45
+ margin-bottom: 0;
46
+ pointer-events: none;
47
+ }
48
+
49
+ .mn-alert-item.leaving .mn-alert-inner {
50
+ /* Clip the card as its row collapses; kept visible otherwise so the card's shadow shows. */
51
+ overflow: hidden;
52
+ }
53
+
54
+ @media (prefers-reduced-motion: reduce) {
55
+ .mn-alert-item {
56
+ transition: none;
57
+ }
58
+ }
@@ -4,7 +4,7 @@ export { TemplateRef, Type } from '@angular/core';
4
4
  import * as tailwind_variants from 'tailwind-variants';
5
5
  import { VariantProps } from 'tailwind-variants';
6
6
  import * as rxjs from 'rxjs';
7
- import { Observable, BehaviorSubject, Subject } from 'rxjs';
7
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
8
8
  import * as mn_angular_lib from 'mn-angular-lib';
9
9
  import * as _angular_forms from '@angular/forms';
10
10
  import { ValidationErrors, NgControl, AbstractControl, ValidatorFn, AsyncValidatorFn, FormGroup } from '@angular/forms';
@@ -128,8 +128,57 @@ type MnAlertTemplateContext = {
128
128
  alert: MnAlert;
129
129
  dismiss: () => void;
130
130
  };
131
+ /**
132
+ * A view-owned wrapper around a single {@link MnAlert}. The store's list is the source
133
+ * of truth for which alerts *exist*; this outlet mirrors it into `views` so a removed
134
+ * alert can play a leave animation (swipe-fling or fade + height-collapse) before its
135
+ * node is actually dropped, rather than vanishing instantly.
136
+ */
137
+ type MnAlertView = {
138
+ alert: MnAlert;
139
+ /** True once the alert has left the store — the node is animating out and will be removed. */
140
+ leaving: boolean;
141
+ /** True while the user is actively dragging this card (disables the snap transition). */
142
+ dragging: boolean;
143
+ /** Live drag offset (px) along the active swipe axis while swiping. */
144
+ drag: number;
145
+ /** Final offset (px) along the swipe axis the card flings to when a swipe dismisses it. */
146
+ fling: number;
147
+ };
131
148
  declare class MnAlertOutletComponent {
132
149
  private readonly lang;
150
+ private readonly store;
151
+ private readonly destroyRef;
152
+ /** Drag distance (px) past which a release dismisses regardless of speed. */
153
+ private static readonly SWIPE_DISMISS_THRESHOLD;
154
+ /** Release speed (px/ms) above which a short drag still dismisses — a "flick". */
155
+ private static readonly FLICK_VELOCITY;
156
+ /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */
157
+ private static readonly FLICK_MIN_DISTANCE;
158
+ /** Upper bound for the leave wait; kept a touch longer than the CSS exit so removal never
159
+ * preempts the animation. Mirrored by the `--mn-alert-exit` duration in the stylesheet. */
160
+ private static readonly EXIT_MS;
161
+ /** Opacity floor a card fades to at the dismiss threshold, for drag feedback. */
162
+ private static readonly DRAG_OPACITY_FLOOR;
163
+ /**
164
+ * How the dismiss swipe is oriented:
165
+ * - `'auto'` (default) matches the host platform's convention — Apple platforms
166
+ * (iOS/iPadOS/macOS) flick a top banner *upward*, so we swipe vertically; Android (and
167
+ * every other platform) dismisses toasts *to the right*, so we swipe horizontally.
168
+ *
169
+ * Either axis is one-directional: only an upward (vertical) or rightward (horizontal)
170
+ * drag dismisses; dragging the opposite way springs the card back.
171
+ * - `'vertical'` / `'horizontal'` force the axis regardless of platform. Useful when the
172
+ * host can't be sniffed reliably (e.g. Chrome DevTools *Responsive* mode does not spoof
173
+ * the user agent, so `'auto'` there resolves to the desktop/Android horizontal axis).
174
+ */
175
+ swipeAxis: 'auto' | 'vertical' | 'horizontal';
176
+ /** Whether the running device is an Apple platform. Sniffed once from `navigator` at
177
+ * construction (the UA is read at page load and does not change mid-session). */
178
+ private readonly isApple;
179
+ /** The resolved swipe axis: the explicit {@link swipeAxis} override, or the platform
180
+ * default when left on `'auto'`. */
181
+ private get vertical();
133
182
  /**
134
183
  * Accessible name for this control. Resolved through the conventional
135
184
  * `mnAlert.close` key so an app can translate it, falling back to English when the
@@ -137,19 +186,62 @@ declare class MnAlertOutletComponent {
137
186
  */
138
187
  get closeLabel(): string;
139
188
  template?: TemplateRef<MnAlertTemplateContext>;
140
- private store;
141
- alerts$: Observable<MnAlert[]>;
189
+ /** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so
190
+ * writes from the (external) store subscription and leave timers schedule change
191
+ * detection in a zoneless app. */
192
+ readonly views: i0.WritableSignal<MnAlertView[]>;
193
+ /**
194
+ * `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while
195
+ * leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis
196
+ * (`pan-x`); horizontal swipe (Android/other) claims the X axis (`pan-y`).
197
+ */
198
+ get touchAction(): string;
199
+ /** In-flight leave-removal timers, keyed by alert id, cleared on destroy so a fired
200
+ * timer never touches a torn-down view. */
201
+ private readonly exitTimers;
202
+ /** The single active swipe, or null. Only one card is dragged at a time. `startCoord`
203
+ * and the samples are taken along the active axis (Y when vertical, else X). */
204
+ private activeDrag;
142
205
  constructor();
143
- dismissAlert(id: string): void;
144
- trackById: (_: number, a: MnAlert) => string;
206
+ trackById: (_: number, v: MnAlertView) => string;
145
207
  getAlertClasses(a: MnAlert): string;
146
208
  contextFor(a: MnAlert): {
147
209
  readonly $implicit: MnAlert;
148
210
  readonly alert: MnAlert;
149
211
  readonly dismiss: () => void;
150
212
  };
213
+ /** Dismisses via the store; the store's removal is turned into a leave animation by
214
+ * {@link sync}. Used by the close button and the custom-template `dismiss` context. */
215
+ dismissAlert(id: MnAlertId): void;
216
+ /** Reconciles the view list against the store: appends new alerts, updates the alert
217
+ * reference for still-present ones, and marks vanished ones as leaving (they stay in the
218
+ * list, animating out, until their removal timer fires). */
219
+ private sync;
220
+ /** Flags a view as leaving and schedules its removal once the exit animation has run.
221
+ * Idempotent: a card already leaving (e.g. flung by a swipe) is left untouched, so a
222
+ * synchronous store re-emit cannot overwrite the swipe direction with the default fade. */
223
+ private beginLeave;
224
+ private removeView;
225
+ onPointerDown(event: PointerEvent, v: MnAlertView): void;
226
+ onPointerMove(event: PointerEvent, v: MnAlertView): void;
227
+ onPointerUp(event: PointerEvent, v: MnAlertView): void;
228
+ private shouldDismiss;
229
+ /** Offset transform for a card: the fling target while leaving via swipe, otherwise the
230
+ * live drag offset, translated along the active axis. Returns null when neither applies,
231
+ * letting the stylesheet own the default (fade-in-place) leave. */
232
+ itemTransform(v: MnAlertView): string | null;
233
+ /** Fades a card toward a floor as it is dragged toward the dismiss threshold. Null (CSS
234
+ * owns opacity) when at rest or leaving. */
235
+ itemOpacity(v: MnAlertView): number | null;
236
+ private translate;
237
+ private axisCoord;
238
+ private viewportExtent;
239
+ /** Whether the current device runs an Apple OS (iOS/iPadOS/macOS). iPadOS 13+ masquerades
240
+ * as a Mac, so it is caught by the touch-capable-Mac branch. */
241
+ private detectApple;
242
+ private prefersReducedMotion;
151
243
  static ɵfac: i0.ɵɵFactoryDeclaration<MnAlertOutletComponent, never>;
152
- static ɵcmp: i0.ɵɵComponentDeclaration<MnAlertOutletComponent, "mn-alert-outlet", never, { "template": { "alias": "template"; "required": false; }; }, {}, never, never, true, never>;
244
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnAlertOutletComponent, "mn-alert-outlet", never, { "swipeAxis": { "alias": "swipeAxis"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, never, true, never>;
153
245
  }
154
246
 
155
247
  declare const mnBadgeVariants: tailwind_variants.TVReturnType<{
@@ -2958,16 +3050,40 @@ type MnDropdownAction = {
2958
3050
  /** Renders the item in a destructive style (e.g. a "Delete" action). Shorthand for
2959
3051
  * the red foreground; equivalent to `color: 'danger'`. */
2960
3052
  danger?: boolean;
3053
+ /**
3054
+ * Extra text the search filter matches against, beyond the visible label — a summary,
3055
+ * synonyms, a category. Only consulted when the menu is {@link MnDropdownProps.searchable}.
3056
+ * Lets search find a command by more than its label, e.g. a help search that matches a
3057
+ * topic's title *and* its summary.
3058
+ */
3059
+ keywords?: string;
3060
+ };
3061
+ /**
3062
+ * A divider between commands, rendered as an `<hr>`. Group related actions — e.g. a
3063
+ * destructive "Logout" set off from a profile menu's navigation, or a name header above
3064
+ * its items. Non-interactive: it is skipped by keyboard nav and hidden while a
3065
+ * {@link MnDropdownProps.searchable} filter is active (a divider stranded between hidden
3066
+ * results is meaningless).
3067
+ */
3068
+ type MnDropdownSeparator = {
3069
+ separator: true;
2961
3070
  };
3071
+ /** An entry in a {@link MnDropdownProps.actions} list: a command or a {@link MnDropdownSeparator}. */
3072
+ type MnDropdownItem = MnDropdownAction | MnDropdownSeparator;
2962
3073
  /**
2963
- * Configuration for {@link MnDropdown}. Everything is passed through the single
2964
- * `props` input, mirroring mn-select / mn-multi-select.
3074
+ * Configuration for {@link MnDropdown}, passed through its single `datasource` input.
3075
+ * (The type keeps the `Props` name; only the input binding is `datasource`.)
2965
3076
  */
2966
3077
  type MnDropdownProps = {
2967
- /** Unique identifier, required for the trigger/menu accessibility wiring. */
2968
- id: string;
2969
- /** The commands rendered in the menu, in order. */
2970
- actions: MnDropdownAction[];
3078
+ /**
3079
+ * Unique identifier for the trigger/menu accessibility wiring. Optional — a stable one is
3080
+ * generated when omitted, so the leanest dropdown is just `{ actions: [...] }`. Set it
3081
+ * explicitly only to target this instance from {@link MnConfigService} `#id` overrides.
3082
+ */
3083
+ id?: string;
3084
+ /** The commands rendered in the menu, in order. May include {@link MnDropdownSeparator}
3085
+ * entries (`{ separator: true }`) to divide the list into groups. */
3086
+ actions: MnDropdownItem[];
2971
3087
  /**
2972
3088
  * Text shown inside the trigger button, turning the ⋯ icon into a labelled control
2973
3089
  * (e.g. "Actions"). When set, {@link triggerIcon} defaults to a trailing chevron
@@ -2979,9 +3095,29 @@ type MnDropdownProps = {
2979
3095
  /**
2980
3096
  * Which glyph the trigger shows. Defaults to `'dots-vertical'` (⋮) for an icon-only
2981
3097
  * trigger, or `'chevron'` (▾) when a {@link triggerLabel} is set. Use `'none'` for a
2982
- * text-only trigger, or `'dots-horizontal'` (⋯) for the horizontal ellipsis.
2983
- */
2984
- triggerIcon?: 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
3098
+ * text-only trigger.
3099
+ *
3100
+ * Beyond the three built-in glyphs, this also accepts a custom {@link MnActionIcon} — a
3101
+ * `TemplateRef` (full control: an `<mn-icon>`, an emoji, a bespoke `<svg>`) or lucide
3102
+ * icon *data* such as `LucideFilter.icon`, rendered by the component at trigger size.
3103
+ * The same convention the per-item {@link MnDropdownAction.icon} uses. (For a horizontal
3104
+ * ellipsis ⋯, pass `LucideEllipsis.icon` here.)
3105
+ */
3106
+ triggerIcon?: 'dots-vertical' | 'chevron' | 'none' | MnActionIcon;
3107
+ /**
3108
+ * Styles the trigger as a full {@link MnButtonTypes} button instead of the default ghost
3109
+ * ⋯ affordance — `variant`, `color`, `size`, `borderRadius`, `shape`, etc. Merged over
3110
+ * the default `{ size: 'sm', variant: 'text', color: 'gray' }`, so a partial config only
3111
+ * changes what you name (e.g. `{ variant: 'fill', color: 'primary' }` for a solid button).
3112
+ *
3113
+ * When set, mn-button owns the trigger's look entirely: the trigger's own {@link size}
3114
+ * and {@link borderRadius} props no longer apply (use this config's), and mn-button's
3115
+ * `borderRadius` default (`lg`) takes over. Composes with {@link triggerIcon} and
3116
+ * {@link triggerLabel} — the glyph/label render inside the styled button. For a square
3117
+ * icon-only button, set `shape: 'square'` (or `'circle'`) here; otherwise a filled
3118
+ * icon-only trigger is a small padded box rather than a fixed square.
3119
+ */
3120
+ triggerButton?: Partial<MnButtonTypes>;
2985
3121
  /** Accessible label for the trigger button. Falls back to a translated default.
2986
3122
  * Ignored for name purposes when {@link triggerLabel} provides visible text. */
2987
3123
  ariaLabel?: string;
@@ -2999,6 +3135,23 @@ type MnDropdownProps = {
2999
3135
  * to true; set false to keep the trigger-anchored popover on mobile too.
3000
3136
  */
3001
3137
  mobileSheet?: boolean;
3138
+ /**
3139
+ * Shows a filter input at the top of the menu (and the mobile sheet), narrowing the
3140
+ * actions as the user types. Each action matches on its resolved label and its
3141
+ * {@link MnDropdownAction.keywords}, case-insensitively. On desktop the input is
3142
+ * focused on open; pressing Enter runs the first still-visible, enabled action —
3143
+ * mirroring a help search that opens the top hit. Defaults to false.
3144
+ */
3145
+ searchable?: boolean;
3146
+ /** Placeholder for the search input. Falls back to a translated default ("Search..."). */
3147
+ searchPlaceholder?: string;
3148
+ /** Translation key for {@link searchPlaceholder}. Resolved via MnLanguageService. */
3149
+ searchPlaceholderKey?: string;
3150
+ /** Text shown in place of the list when the filter matches no actions. Falls back to
3151
+ * a translated default ("No results"). */
3152
+ searchEmptyLabel?: string;
3153
+ /** Translation key for {@link searchEmptyLabel}. Resolved via MnLanguageService. */
3154
+ searchEmptyLabelKey?: string;
3002
3155
  /** Size variant of the ⋯ trigger (default: 'md'). */
3003
3156
  size?: MnDropdownTriggerVariants['size'];
3004
3157
  /** Border-radius variant of the ⋯ trigger (default: 'md'). */
@@ -3015,6 +3168,10 @@ type MnDropdownUIConfig = {
3015
3168
  menuLabel?: string;
3016
3169
  /** Accessible label for the mobile sheet's close button (falls back to "Close"). */
3017
3170
  closeLabel?: string;
3171
+ /** Default placeholder for the search input (falls back to "Search..."). */
3172
+ searchPlaceholder?: string;
3173
+ /** Default empty-state text when the filter matches nothing (falls back to "No results"). */
3174
+ searchEmptyLabel?: string;
3018
3175
  };
3019
3176
 
3020
3177
  declare const MN_DROPDOWN_CONFIG: InjectionToken<MnDropdownUIConfig>;
@@ -3030,7 +3187,7 @@ declare const MN_DROPDOWN_CONFIG: InjectionToken<MnDropdownUIConfig>;
3030
3187
  * the multi-select applies.
3031
3188
  */
3032
3189
  declare class MnDropdown implements OnInit {
3033
- props: MnDropdownProps;
3190
+ datasource: MnDropdownProps;
3034
3191
  protected uiConfig: MnDropdownUIConfig;
3035
3192
  private readonly configService;
3036
3193
  private readonly sectionPath;
@@ -3044,9 +3201,14 @@ declare class MnDropdown implements OnInit {
3044
3201
  * `ElementRef` because `button[mnButton]` is a component — the default query would
3045
3202
  * otherwise return the MnButton instance, which has no `nativeElement`. */
3046
3203
  triggerRef: ElementRef<HTMLElement>;
3047
- /** Layout classes for the anchored popover panel. The mobile sheet is rendered by
3048
- * mn-bottom-sheet instead, so it needs no branch here. */
3049
- readonly panelClasses = "fixed z-9999 min-w-48 max-w-[min(20rem,90vw)] bg-base-100 border border-base-300 rounded-md shadow-lg py-1 max-h-[60vh] overflow-auto -translate-x-full";
3204
+ /**
3205
+ * Layout classes for the anchored popover panel. Searchable menus become a flex column
3206
+ * so the search box can be pinned (`shrink-0`) above a single scrolling list region
3207
+ * paired with {@link panelFloorPx}, that keeps the popover a fixed height while the
3208
+ * filter runs, instead of the panel resizing on every keystroke. The mobile sheet is
3209
+ * rendered by mn-bottom-sheet instead, so it needs no branch here.
3210
+ */
3211
+ get panelClasses(): string;
3050
3212
  /** Tailwind's `sm` breakpoint — below this the menu renders as a bottom sheet.
3051
3213
  * Kept in step with the same constant in mn-bottom-sheet / mn-multi-select. */
3052
3214
  private static readonly SHEET_MAX_WIDTH;
@@ -3062,11 +3224,30 @@ declare class MnDropdown implements OnInit {
3062
3224
  private sheetMediaListener;
3063
3225
  /** `document.body`'s inline `overflow` before the sheet locked it, restored on close. */
3064
3226
  private previousBodyOverflow;
3227
+ /**
3228
+ * The anchored popover's opened height, locked so a shorter filtered list cannot resize
3229
+ * it mid-type. Captured on the frame after the panel appears (with the full, unfiltered
3230
+ * list), so applying it is jump-free — it only stops a later shrink. Null while closed
3231
+ * or when the menu is not searchable, leaving the plain content-height popover untouched.
3232
+ */
3233
+ panelFloorPx: number | null;
3234
+ /**
3235
+ * The mobile sheet's opened height, applied as a `min-height` floor for the same reason
3236
+ * as {@link panelFloorPx} — mirroring mn-multi-select's sheet floor. Null while anchored,
3237
+ * closed, or non-searchable.
3238
+ */
3239
+ sheetFloorPx: number | null;
3065
3240
  /** Watches the trigger while open, so the panel closes if the trigger is hidden. */
3066
3241
  private visibilityObserver;
3067
3242
  /** Capture-phase scroll listener installed while open, closing on any ancestor scroll. */
3068
3243
  private scrollCapture;
3069
3244
  isOpen: boolean;
3245
+ /** Stable fallback id, used when {@link MnDropdownProps.id} is omitted. Generated once per
3246
+ * instance so the a11y wiring (menu id, `aria-controls`, the search input) stays valid. */
3247
+ private readonly autoId;
3248
+ /** Current text in the search input, cleared on close. Only meaningful when the menu
3249
+ * is {@link MnDropdownProps.searchable}. */
3250
+ searchTerm: string;
3070
3251
  /** Popover position computed from the trigger's bounding rect. */
3071
3252
  dropdownStyle: {
3072
3253
  top: string;
@@ -3093,6 +3274,26 @@ declare class MnDropdown implements OnInit {
3093
3274
  get isSheet(): boolean;
3094
3275
  /** Fires an action and closes. Ignores disabled items defensively. */
3095
3276
  select(action: MnDropdownAction): void;
3277
+ /** Whether the filter input is shown — the explicit `searchable` prop, off by default. */
3278
+ get isSearchable(): boolean;
3279
+ /**
3280
+ * Records the current filter text as the search input changes. The input's
3281
+ * ControlValueAccessor emits `null` for an empty field (its text adapter maps `''` to
3282
+ * `null`), so coerce to `''` — otherwise clearing or backspacing the box would leave
3283
+ * `searchTerm` null and {@link filteredActions}'s `.trim()` would throw, freezing the menu.
3284
+ */
3285
+ onSearch(term: string | null): void;
3286
+ /**
3287
+ * The actions currently passing the filter, in their declared order. Every action when
3288
+ * the menu is not searchable or the box is empty; otherwise those whose resolved label
3289
+ * or {@link MnDropdownAction.keywords} contain the (case-insensitive) query.
3290
+ */
3291
+ get filteredActions(): MnDropdownItem[];
3292
+ /**
3293
+ * Runs the first still-visible, enabled action — the Enter key's target, matching a
3294
+ * help search where Enter opens the top hit. Skips separators. No-op when nothing matches.
3295
+ */
3296
+ selectFirstVisible(): void;
3096
3297
  private updateDropdownPosition;
3097
3298
  private startWatchingTrigger;
3098
3299
  private stopWatchingTrigger;
@@ -3101,6 +3302,20 @@ declare class MnDropdown implements OnInit {
3101
3302
  onWindowScrollOrResize(): void;
3102
3303
  private lockBodyScroll;
3103
3304
  private unlockBodyScroll;
3305
+ /**
3306
+ * Records the anchored popover's opened height and locks it via {@link panelFloorPx}.
3307
+ * Measured on the next frame so the read reflects the fully-rendered, unfiltered list
3308
+ * (the search box is empty on open) and never forces a reflow mid change-detection. The
3309
+ * value equals the current height, so applying it is jump-free — it only stops a later,
3310
+ * shorter filtered list from shrinking the panel.
3311
+ */
3312
+ private capturePanelFloor;
3313
+ /**
3314
+ * Records the sheet's opened height as its `min-height` floor, on the same next-frame
3315
+ * basis as {@link capturePanelFloor}. `hostEl` is the portalled mn-bottom-sheet host
3316
+ * (`display: contents`), so the height is read from its `.mn-sheet-container` child.
3317
+ */
3318
+ private captureSheetFloor;
3104
3319
  private portal;
3105
3320
  /** The label shown for an action, preferring a resolved translation key. */
3106
3321
  actionLabel(action: MnDropdownAction): string;
@@ -3112,6 +3327,16 @@ declare class MnDropdown implements OnInit {
3112
3327
  * @returns True when the icon is a template the caller owns.
3113
3328
  */
3114
3329
  isTemplateRef(value: unknown): value is TemplateRef<unknown>;
3330
+ /** Whether a list entry is a {@link MnDropdownSeparator} rather than a command. */
3331
+ isSeparator(item: MnDropdownItem): item is MnDropdownSeparator;
3332
+ /**
3333
+ * Narrows a list entry to a command, or null for a separator. Used as `@if (asAction(item);
3334
+ * as action)` in the template so the item loop gets a reliably-typed {@link MnDropdownAction}
3335
+ * without depending on template narrowing of the {@link isSeparator} guard.
3336
+ * @param item The list entry to narrow.
3337
+ * @returns The command, or null when the entry is a separator.
3338
+ */
3339
+ asAction(item: MnDropdownItem): MnDropdownAction | null;
3115
3340
  /**
3116
3341
  * Foreground class for an item: an explicit {@link MnDropdownAction.color}, else the
3117
3342
  * destructive red for a {@link MnDropdownAction.danger} item, else the default text.
@@ -3121,17 +3346,43 @@ declare class MnDropdown implements OnInit {
3121
3346
  get triggerAriaLabel(): string;
3122
3347
  /** The visible text on the trigger, or null for an icon-only ⋯ trigger. */
3123
3348
  get triggerLabelText(): string | null;
3124
- /** Which glyph the trigger renders: an explicit choice, else a chevron when the
3125
- * trigger is labelled and the vertical dots when it is icon-only. */
3126
- get resolvedTriggerIcon(): 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
3349
+ /**
3350
+ * The trigger's glyph, normalised to a single representation so the template renders it
3351
+ * one way the same template-or-lucide-data path the menu items use — with no per-preset
3352
+ * switch. Resolves, in order: an explicit `'none'` (no glyph); a caller's custom template
3353
+ * or lucide data ({@link MnActionIcon}); otherwise a built-in preset mapped to its own
3354
+ * lucide data (a labelled trigger defaults to the chevron, an icon-only one to the dots).
3355
+ * @returns A template glyph, an icon-data glyph with its render size, or null for none.
3356
+ */
3357
+ private resolveTriggerGlyph;
3358
+ /** The trigger glyph when it is a caller's template, else null. Split from
3359
+ * {@link triggerIconData} so the template narrows without a discriminated union. */
3360
+ get triggerIconTemplate(): TemplateRef<unknown> | null;
3361
+ /** The trigger glyph when it is lucide data (a preset or caller data), with its render
3362
+ * size and dim flag, else null. */
3363
+ get triggerIconData(): {
3364
+ data: LucideIconData;
3365
+ size: number;
3366
+ dim: boolean;
3367
+ } | null;
3127
3368
  /** Heading shown above the menu/sheet, or null when none is configured. */
3128
3369
  get menuLabel(): string | null;
3129
3370
  /** Accessible label for the sheet's close button. */
3130
3371
  get closeLabel(): string;
3372
+ /** Placeholder shown in the search input, preferring a resolved translation key. */
3373
+ get searchPlaceholder(): string;
3374
+ /** Text shown in place of the list when the filter matches no actions. */
3375
+ get searchEmptyLabel(): string;
3376
+ /** The ghost look the trigger has always used; a bare or partial `triggerButton` merges
3377
+ * over this, so opting in without overriding anything keeps the current appearance. */
3378
+ private static readonly DEFAULT_TRIGGER_BUTTON;
3379
+ /** mn-button config for the trigger: the ghost default, overlaid with any
3380
+ * {@link MnDropdownProps.triggerButton} the caller supplied. */
3381
+ get triggerData(): Partial<MnButtonTypes>;
3131
3382
  get triggerClasses(): string;
3132
3383
  get resolvedId(): string;
3133
3384
  static ɵfac: i0.ɵɵFactoryDeclaration<MnDropdown, never>;
3134
- static ɵcmp: i0.ɵɵComponentDeclaration<MnDropdown, "mn-lib-dropdown", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
3385
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnDropdown, "mn-lib-dropdown", never, { "datasource": { "alias": "datasource"; "required": true; }; }, {}, never, never, true, never>;
3135
3386
  }
3136
3387
 
3137
3388
  /**
@@ -4280,8 +4531,7 @@ type MnRowValue<T, V> = V | ((row: T) => V);
4280
4531
  /**
4281
4532
  * A per-row command rendered in an actions column (see {@link ColumnBase.actions}).
4282
4533
  * Unlike a cell it carries no display value — choosing it invokes {@link run} with the
4283
- * row. The table renders actions inline as buttons and, when there are
4284
- * {@link ColumnBase.actionsCollapseThreshold} or more, collapses them into a ⋯ menu
4534
+ * row. The table renders actions inline as buttons and collapses them into a ⋯ menu
4285
4535
  * (mn-dropdown) once the table is narrower than 450px.
4286
4536
  */
4287
4537
  type MnTableRowAction<T> = {
@@ -4332,16 +4582,9 @@ type ColumnBase<T> = {
4332
4582
  /**
4333
4583
  * Turns this column into an actions column: per-row command buttons rendered inline,
4334
4584
  * automatically collapsing into a ⋯ menu (mn-dropdown) once the table is narrower than
4335
- * 450px **and** there are at least {@link actionsCollapseThreshold} actions. When set,
4336
- * {@link cell} is ignored.
4585
+ * 450px. When set, {@link cell} is ignored.
4337
4586
  */
4338
4587
  actions?: MnTableRowAction<T>[];
4339
- /**
4340
- * Number of {@link actions} at or above which the inline buttons collapse to a ⋯ menu
4341
- * on a narrow table. Defaults to 3 — one or two buttons still fit on a phone, a longer
4342
- * list does not.
4343
- */
4344
- actionsCollapseThreshold?: number;
4345
4588
  /**
4346
4589
  * How each inline action button is presented on a wide table:
4347
4590
  * - `'both'` (default) — icon (when provided) followed by the label;
@@ -4709,14 +4952,6 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
4709
4952
  visibleRowActions(column: ColumnDefinition<T>, row: T): MnTableRowAction<T>[];
4710
4953
  /** Whether a row has any visible actions at all; when false its cell is left empty. */
4711
4954
  hasRowActions(column: ColumnDefinition<T>, row: T): boolean;
4712
- /**
4713
- * Whether a row's actions should offer the collapsing ⋯ variant: only when it has at
4714
- * least its threshold's worth of *visible* actions (default 3). Below that, the inline
4715
- * buttons stay put at every width — one or two fit on a phone. The width switch itself
4716
- * is a pure container query in the template; this only decides whether to render the ⋯
4717
- * path at all, per row.
4718
- */
4719
- shouldCollapseActions(column: ColumnDefinition<T>, row: T): boolean;
4720
4955
  /**
4721
4956
  * Resolves a {@link MnRowValue}: either the fixed value, or the accessor applied to
4722
4957
  * the row. Every per-row presentation field goes through here so the fixed and derived
@@ -8494,4 +8729,4 @@ type MnPreviewMessage = {
8494
8729
  declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
8495
8730
 
8496
8731
  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_DROPDOWN_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, MnDropdown, 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, mnDropdownTriggerVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
8497
- 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, MnActionIcon, 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, MnDropdownAction, MnDropdownActionColor, MnDropdownProps, MnDropdownTriggerVariants, MnDropdownUIConfig, 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, MnRowValue, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTableFilterLabels, MnTableRowAction, 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 };
8732
+ 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, MnActionIcon, 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, MnDropdownAction, MnDropdownActionColor, MnDropdownItem, MnDropdownProps, MnDropdownSeparator, MnDropdownTriggerVariants, MnDropdownUIConfig, 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, MnRowValue, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTableFilterLabels, MnTableRowAction, 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 };