mn-angular-lib 1.0.145 → 1.0.146

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.145",
3
+ "version": "1.0.146",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3",
@@ -2848,9 +2848,9 @@ declare class MnMultiSelect implements OnInit {
2848
2848
  }
2849
2849
 
2850
2850
  /**
2851
- * Layout variants for the trigger button. Kept deliberately small: the trigger is
2852
- * an icon affordance, so it only exposes the knobs a consumer realistically retunes
2853
- * (size and border radius). Colour/hover come from the underlying mn-button.
2851
+ * Layout variants for the trigger button. An icon-only trigger (the default ⋯) is a
2852
+ * square affordance; a trigger with a text label grows to fit its content with
2853
+ * horizontal padding instead. The `labeled` axis switches between the two.
2854
2854
  */
2855
2855
  declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
2856
2856
  size: {
@@ -2858,6 +2858,10 @@ declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
2858
2858
  md: string;
2859
2859
  lg: string;
2860
2860
  };
2861
+ labeled: {
2862
+ true: string;
2863
+ false: string;
2864
+ };
2861
2865
  borderRadius: {
2862
2866
  none: string;
2863
2867
  xs: string;
@@ -2867,12 +2871,16 @@ declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
2867
2871
  xl: string;
2868
2872
  full: string;
2869
2873
  };
2870
- }, undefined, "inline-flex items-center justify-center text-base-content/70 cursor-pointer", {
2874
+ }, undefined, "inline-flex items-center justify-center gap-x-1.5 text-base-content/80 cursor-pointer", {
2871
2875
  size: {
2872
2876
  sm: string;
2873
2877
  md: string;
2874
2878
  lg: string;
2875
2879
  };
2880
+ labeled: {
2881
+ true: string;
2882
+ false: string;
2883
+ };
2876
2884
  borderRadius: {
2877
2885
  none: string;
2878
2886
  xs: string;
@@ -2888,6 +2896,10 @@ declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
2888
2896
  md: string;
2889
2897
  lg: string;
2890
2898
  };
2899
+ labeled: {
2900
+ true: string;
2901
+ false: string;
2902
+ };
2891
2903
  borderRadius: {
2892
2904
  none: string;
2893
2905
  xs: string;
@@ -2897,9 +2909,11 @@ declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
2897
2909
  xl: string;
2898
2910
  full: string;
2899
2911
  };
2900
- }, undefined, "inline-flex items-center justify-center text-base-content/70 cursor-pointer", unknown, unknown, undefined>>;
2912
+ }, undefined, "inline-flex items-center justify-center gap-x-1.5 text-base-content/80 cursor-pointer", unknown, unknown, undefined>>;
2901
2913
  type MnDropdownTriggerVariants = VariantProps<typeof mnDropdownTriggerVariants>;
2902
2914
 
2915
+ /** Theme colour tokens an action item can be tinted with, mirroring mn-button's palette. */
2916
+ type MnDropdownActionColor = 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'accent' | 'gray';
2903
2917
  /**
2904
2918
  * A single command in a {@link MnDropdownProps} menu. Unlike a select option it holds
2905
2919
  * no value — choosing it fires {@link run} and closes the menu. This is a *command*
@@ -2922,7 +2936,14 @@ type MnDropdownAction = {
2922
2936
  run: () => void;
2923
2937
  /** When true the item is shown dimmed and cannot be chosen. */
2924
2938
  disabled?: boolean;
2925
- /** Renders the item in a destructive style (e.g. a "Delete" action). */
2939
+ /**
2940
+ * Tints the item's label and icon. When omitted the item uses the default foreground
2941
+ * ({@link danger} still forces the destructive red). Lets a host carry a per-item
2942
+ * colour — e.g. an mn-table actions column keeps the same colours it shows inline.
2943
+ */
2944
+ color?: MnDropdownActionColor;
2945
+ /** Renders the item in a destructive style (e.g. a "Delete" action). Shorthand for
2946
+ * the red foreground; equivalent to `color: 'danger'`. */
2926
2947
  danger?: boolean;
2927
2948
  };
2928
2949
  /**
@@ -2934,7 +2955,22 @@ type MnDropdownProps = {
2934
2955
  id: string;
2935
2956
  /** The commands rendered in the menu, in order. */
2936
2957
  actions: MnDropdownAction[];
2937
- /** Accessible label for the ⋯ trigger button. Falls back to a translated default. */
2958
+ /**
2959
+ * Text shown inside the trigger button, turning the ⋯ icon into a labelled control
2960
+ * (e.g. "Actions"). When set, {@link triggerIcon} defaults to a trailing chevron
2961
+ * instead of the dots. Omit for the icon-only ⋯ trigger.
2962
+ */
2963
+ triggerLabel?: string;
2964
+ /** Translation key for {@link triggerLabel}. Resolved via MnLanguageService. */
2965
+ triggerLabelKey?: string;
2966
+ /**
2967
+ * Which glyph the trigger shows. Defaults to `'dots-vertical'` (⋮) for an icon-only
2968
+ * trigger, or `'chevron'` (▾) when a {@link triggerLabel} is set. Use `'none'` for a
2969
+ * text-only trigger, or `'dots-horizontal'` (⋯) for the horizontal ellipsis.
2970
+ */
2971
+ triggerIcon?: 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
2972
+ /** Accessible label for the trigger button. Falls back to a translated default.
2973
+ * Ignored for name purposes when {@link triggerLabel} provides visible text. */
2938
2974
  ariaLabel?: string;
2939
2975
  /** Translation key for {@link ariaLabel}. Resolved via MnLanguageService. */
2940
2976
  ariaLabelKey?: string;
@@ -3055,8 +3091,18 @@ declare class MnDropdown implements OnInit {
3055
3091
  private portal;
3056
3092
  /** The label shown for an action, preferring a resolved translation key. */
3057
3093
  actionLabel(action: MnDropdownAction): string;
3094
+ /**
3095
+ * Foreground class for an item: an explicit {@link MnDropdownAction.color}, else the
3096
+ * destructive red for a {@link MnDropdownAction.danger} item, else the default text.
3097
+ */
3098
+ actionColorClass(action: MnDropdownAction): string;
3058
3099
  /** Accessible name for the ⋯ trigger button. */
3059
3100
  get triggerAriaLabel(): string;
3101
+ /** The visible text on the trigger, or null for an icon-only ⋯ trigger. */
3102
+ get triggerLabelText(): string | null;
3103
+ /** Which glyph the trigger renders: an explicit choice, else a chevron when the
3104
+ * trigger is labelled and the vertical dots when it is icon-only. */
3105
+ get resolvedTriggerIcon(): 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
3060
3106
  /** Heading shown above the menu/sheet, or null when none is configured. */
3061
3107
  get menuLabel(): string | null;
3062
3108
  /** Accessible label for the sheet's close button. */
@@ -4217,7 +4263,14 @@ type MnTableRowAction<T> = {
4217
4263
  run: (row: T) => void;
4218
4264
  /** Predicate deciding whether the action is disabled for a given row. */
4219
4265
  disabled?: (row: T) => boolean;
4220
- /** Renders the action in a destructive style (e.g. "Delete"). */
4266
+ /**
4267
+ * Tints the action's button and its ⋯-menu item. Defaults to `'secondary'` (or
4268
+ * `'danger'` when {@link danger} is set), matching the built-in look. Whatever colour
4269
+ * an action shows inline is carried into the collapsed bottom-sheet item too.
4270
+ */
4271
+ color?: MnDropdownActionColor;
4272
+ /** Renders the action in a destructive style (e.g. "Delete"). Shorthand for
4273
+ * `color: 'danger'`. */
4221
4274
  danger?: boolean;
4222
4275
  };
4223
4276
  /** Everything about a column that is independent of filtering. */
@@ -4245,6 +4298,18 @@ type ColumnBase<T> = {
4245
4298
  * list does not.
4246
4299
  */
4247
4300
  actionsCollapseThreshold?: number;
4301
+ /**
4302
+ * How each inline action button is presented on a wide table:
4303
+ * - `'both'` (default) — icon (when provided) followed by the label;
4304
+ * - `'icon'` — icon only; the label becomes the button's accessible name and hover
4305
+ * tooltip. An action without an icon falls back to showing its label so it is never
4306
+ * blank;
4307
+ * - `'label'` — text only, no icon.
4308
+ *
4309
+ * The collapsed ⋯ menu always lists full labels regardless of this setting, so
4310
+ * `'icon'` still reads clearly once the actions move into the bottom sheet on mobile.
4311
+ */
4312
+ actionsInline?: 'icon' | 'label' | 'both';
4248
4313
  /** Alternative cell renderer shown below the given breakpoint. When set, `cell` is hidden below this breakpoint and `cellSm` is shown instead. */
4249
4314
  cellSm?: {
4250
4315
  below: 'sm' | 'md' | 'lg';
@@ -4606,8 +4671,22 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
4606
4671
  shouldCollapseActions(column: ColumnDefinition<T>): boolean;
4607
4672
  /** The resolved label for an inline action button (translation key wins once resolved). */
4608
4673
  rowActionLabel(action: MnTableRowAction<T>): string;
4674
+ /** Whether an inline action button should render its icon. */
4675
+ showActionIcon(column: ColumnDefinition<T>, action: MnTableRowAction<T>): boolean;
4676
+ /**
4677
+ * Whether an inline action button should render its text label. In `'icon'` mode the
4678
+ * label is hidden — unless the action has no icon, in which case it is shown anyway so
4679
+ * the button is never blank.
4680
+ */
4681
+ showActionLabel(column: ColumnDefinition<T>, action: MnTableRowAction<T>): boolean;
4609
4682
  /** Whether an action is disabled for the given row. */
4610
4683
  isRowActionDisabled(action: MnTableRowAction<T>, row: T): boolean;
4684
+ /**
4685
+ * The effective colour for an action, used identically by the inline button and the
4686
+ * collapsed ⋯-menu item so the two never diverge: an explicit `color`, else `'danger'`
4687
+ * for a destructive action, else the default `'secondary'`.
4688
+ */
4689
+ rowActionColor(action: MnTableRowAction<T>): MnDropdownActionColor;
4611
4690
  /** Invokes an action for a row. */
4612
4691
  runRowAction(action: MnTableRowAction<T>, row: T): void;
4613
4692
  /** A stable, unique element id for a row's actions dropdown (aria wiring). */
@@ -8359,4 +8438,4 @@ type MnPreviewMessage = {
8359
8438
  declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
8360
8439
 
8361
8440
  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 };
8362
- 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, MnDropdownAction, 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, 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 };
8441
+ 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, 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, 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 };