mn-angular-lib 1.0.162 → 1.0.164
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/fesm2022/mn-angular-lib.mjs +294 -16
- package/fesm2022/mn-angular-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mn-angular-lib.d.ts +487 -5
package/package.json
CHANGED
|
@@ -2826,6 +2826,8 @@ type MnMultiSelectUIConfig = {
|
|
|
2826
2826
|
errorMessages?: Record<string, string>;
|
|
2827
2827
|
/** Text shown when no options match the search filter */
|
|
2828
2828
|
noOptionsFound?: string;
|
|
2829
|
+
/** Placeholder and accessible name for the dropdown's search input */
|
|
2830
|
+
searchPlaceholder?: string;
|
|
2829
2831
|
};
|
|
2830
2832
|
|
|
2831
2833
|
declare const MN_MULTI_SELECT_CONFIG: InjectionToken<MnMultiSelectUIConfig>;
|
|
@@ -3047,6 +3049,34 @@ declare class MnMultiSelect implements OnInit {
|
|
|
3047
3049
|
* is selected, then `collapsePlaceholder`, then `"{count} selected"`.
|
|
3048
3050
|
*/
|
|
3049
3051
|
get collapseSummaryText(): string;
|
|
3052
|
+
/** Trigger text shown while nothing is selected. */
|
|
3053
|
+
get placeholderLabel(): string;
|
|
3054
|
+
/**
|
|
3055
|
+
* Placeholder and accessible name of the dropdown's search input.
|
|
3056
|
+
*
|
|
3057
|
+
* Search auto-enables at `searchThreshold` options, so this box appears without any
|
|
3058
|
+
* call site opting in — which is exactly why it must be translatable without one.
|
|
3059
|
+
*/
|
|
3060
|
+
get searchPlaceholderLabel(): string;
|
|
3061
|
+
/** Empty text shown when the search filters every option away. */
|
|
3062
|
+
get noOptionsLabel(): string;
|
|
3063
|
+
/**
|
|
3064
|
+
* Resolves one of the component's own labels, preferring what the caller gave it
|
|
3065
|
+
* and falling back through the config layer, a conventional translation key and
|
|
3066
|
+
* finally a readable English default.
|
|
3067
|
+
*
|
|
3068
|
+
* Mirrors `MnCollectionBase.resolveLabel`. Every string this component puts on
|
|
3069
|
+
* screen that is not caller data goes through here: without the key step a
|
|
3070
|
+
* consumer could only translate these by repeating the same literal at every call
|
|
3071
|
+
* site, which is how "Search..." ends up in English on an otherwise Dutch page.
|
|
3072
|
+
*
|
|
3073
|
+
* @param explicit The label the caller passed through `props`, if any.
|
|
3074
|
+
* @param key The conventional translation key to try next.
|
|
3075
|
+
* @param fallback The English text used when neither resolves.
|
|
3076
|
+
* @param configured The value the config layer resolved, if any.
|
|
3077
|
+
* @returns The resolved label.
|
|
3078
|
+
*/
|
|
3079
|
+
private resolveLabel;
|
|
3050
3080
|
handleBlur(): void;
|
|
3051
3081
|
get control(): _angular_forms.AbstractControl<any, any, any> | null;
|
|
3052
3082
|
get showError(): boolean;
|
|
@@ -3964,6 +3994,8 @@ type MnSelectUIConfig = {
|
|
|
3964
3994
|
errorMessages?: Record<string, string>;
|
|
3965
3995
|
/** Text shown when no options match the search filter */
|
|
3966
3996
|
noOptionsFound?: string;
|
|
3997
|
+
/** Placeholder and accessible name for the dropdown's search input */
|
|
3998
|
+
searchPlaceholder?: string;
|
|
3967
3999
|
};
|
|
3968
4000
|
|
|
3969
4001
|
declare const MN_SELECT_CONFIG: InjectionToken<MnSelectUIConfig>;
|
|
@@ -4077,6 +4109,30 @@ declare class MnSelect implements OnInit {
|
|
|
4077
4109
|
get selectedOption(): MnSelectOption | undefined;
|
|
4078
4110
|
/** The label shown in the trigger: the selected option, else the placeholder. */
|
|
4079
4111
|
get displayText(): string;
|
|
4112
|
+
/** Trigger text shown while no option is selected. */
|
|
4113
|
+
get placeholderLabel(): string;
|
|
4114
|
+
/** Placeholder and accessible name of the dropdown's search input. */
|
|
4115
|
+
get searchPlaceholderLabel(): string;
|
|
4116
|
+
/** Empty text shown when the search filters every option away. */
|
|
4117
|
+
get noOptionsLabel(): string;
|
|
4118
|
+
/**
|
|
4119
|
+
* Resolves one of the component's own labels, preferring what the caller gave it
|
|
4120
|
+
* and falling back through the config layer, a conventional translation key and
|
|
4121
|
+
* finally a readable English default.
|
|
4122
|
+
*
|
|
4123
|
+
* Mirrors `MnCollectionBase.resolveLabel` and its twin in `MnMultiSelect`. Without
|
|
4124
|
+
* the key step a consumer could only translate these by repeating the same literal
|
|
4125
|
+
* at every call site, and the search box in particular auto-enables on option
|
|
4126
|
+
* count — it appears without anyone asking for it, so it must be translatable
|
|
4127
|
+
* without anyone asking either.
|
|
4128
|
+
*
|
|
4129
|
+
* @param explicit The label the caller passed through `props`, if any.
|
|
4130
|
+
* @param key The conventional translation key to try next.
|
|
4131
|
+
* @param fallback The English text used when neither resolves.
|
|
4132
|
+
* @param configured The value the config layer resolved, if any.
|
|
4133
|
+
* @returns The resolved label.
|
|
4134
|
+
*/
|
|
4135
|
+
private resolveLabel;
|
|
4080
4136
|
get showError(): boolean;
|
|
4081
4137
|
get errorMessages(): string[];
|
|
4082
4138
|
get errorMessage(): string | null;
|
|
@@ -7362,6 +7418,8 @@ declare class MnList<T = unknown> extends MnSelectableCollectionBase<T, ListData
|
|
|
7362
7418
|
protected applyFilter(searchForItems: boolean): void;
|
|
7363
7419
|
/** Accessible name for the scrollable list region. */
|
|
7364
7420
|
get listRegionLabel(): string;
|
|
7421
|
+
/** Label on the header checkbox that selects or clears every visible row. */
|
|
7422
|
+
get selectAllLabel(): string;
|
|
7365
7423
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnList<any>, never>;
|
|
7366
7424
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnList<any>, "mn-list", never, {}, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
7367
7425
|
}
|
|
@@ -8804,8 +8862,12 @@ declare class MnBreadcrumbs {
|
|
|
8804
8862
|
crumbClick: EventEmitter<MnBreadcrumbItem>;
|
|
8805
8863
|
/** Emits when the fallback "Back" control is activated. */
|
|
8806
8864
|
back: EventEmitter<void>;
|
|
8807
|
-
/**
|
|
8808
|
-
private static readonly
|
|
8865
|
+
/** Conventional key an app defines to translate the Back control's label. */
|
|
8866
|
+
private static readonly BACK_LABEL_KEY;
|
|
8867
|
+
/** Conventional key an app defines to name the navigation landmark. */
|
|
8868
|
+
private static readonly NAV_LABEL_KEY;
|
|
8869
|
+
/** Resolves this component's own labels against the app's bundle. */
|
|
8870
|
+
private readonly lang;
|
|
8809
8871
|
/** Resolved tailwind-variants slot functions for the current size. */
|
|
8810
8872
|
get styles(): {
|
|
8811
8873
|
root: (slotProps?: ({
|
|
@@ -8846,9 +8908,25 @@ declare class MnBreadcrumbs {
|
|
|
8846
8908
|
size?: "sm" | "md" | undefined;
|
|
8847
8909
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
8848
8910
|
} & {};
|
|
8911
|
+
/**
|
|
8912
|
+
* Accessible name of the `<nav>` landmark.
|
|
8913
|
+
*
|
|
8914
|
+
* A landmark's name is announced verbatim, so leaving it as a hardcoded English
|
|
8915
|
+
* "Breadcrumb" put one English word into every page of a translated app — in the
|
|
8916
|
+
* one place only screen-reader users hear.
|
|
8917
|
+
*/
|
|
8918
|
+
get navLabel(): string;
|
|
8849
8919
|
/** Whether a linkable trail should render (vs the Back fallback). */
|
|
8850
8920
|
get hasTrail(): boolean;
|
|
8851
|
-
/**
|
|
8921
|
+
/**
|
|
8922
|
+
* Text of the Back control, already translated.
|
|
8923
|
+
*
|
|
8924
|
+
* `data.backLabel` is a key (or a literal, which `translate` passes through
|
|
8925
|
+
* unchanged). Without one this falls back to the conventional key and then to
|
|
8926
|
+
* English — never to a raw key: the old default was the bare key `'back'`, which
|
|
8927
|
+
* the template's translate pipe echoed as lowercase "back" in every app that had
|
|
8928
|
+
* not happened to define it.
|
|
8929
|
+
*/
|
|
8852
8930
|
get backLabel(): string;
|
|
8853
8931
|
/** The last crumb is the current page and is rendered as plain text. */
|
|
8854
8932
|
isCurrent(index: number): boolean;
|
|
@@ -8926,6 +9004,410 @@ declare const mnBreadcrumbsVariants: tailwind_variants.TVReturnType<{
|
|
|
8926
9004
|
}, undefined, unknown, unknown, undefined>>;
|
|
8927
9005
|
type MnBreadcrumbsVariants = VariantProps<typeof mnBreadcrumbsVariants>;
|
|
8928
9006
|
|
|
9007
|
+
/**
|
|
9008
|
+
* Styling for {@link MnSegmented}, expressed as tailwind-variants slots so the
|
|
9009
|
+
* template pulls one class string per role.
|
|
9010
|
+
*
|
|
9011
|
+
* The control is a track with the active choice raised out of it, rather than a
|
|
9012
|
+
* row of loose buttons: the segments share one bordered surface, so they read as
|
|
9013
|
+
* one control with one answer instead of several independent actions. Theme
|
|
9014
|
+
* tokens only, so it holds up in both light and dark.
|
|
9015
|
+
*/
|
|
9016
|
+
declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
9017
|
+
/**
|
|
9018
|
+
* Corner rounding of the track, with the segments rounded one step tighter so
|
|
9019
|
+
* a filled segment nests inside the track's own corner instead of poking out
|
|
9020
|
+
* of it. Token names match mn-button's; `full` makes a pill, where track and
|
|
9021
|
+
* segment share the same fully-rounded ends.
|
|
9022
|
+
*/
|
|
9023
|
+
borderRadius: {
|
|
9024
|
+
none: {
|
|
9025
|
+
root: string;
|
|
9026
|
+
segment: string;
|
|
9027
|
+
};
|
|
9028
|
+
xs: {
|
|
9029
|
+
root: string;
|
|
9030
|
+
segment: string;
|
|
9031
|
+
};
|
|
9032
|
+
sm: {
|
|
9033
|
+
root: string;
|
|
9034
|
+
segment: string;
|
|
9035
|
+
};
|
|
9036
|
+
md: {
|
|
9037
|
+
root: string;
|
|
9038
|
+
segment: string;
|
|
9039
|
+
};
|
|
9040
|
+
lg: {
|
|
9041
|
+
root: string;
|
|
9042
|
+
segment: string;
|
|
9043
|
+
};
|
|
9044
|
+
xl: {
|
|
9045
|
+
root: string;
|
|
9046
|
+
segment: string;
|
|
9047
|
+
};
|
|
9048
|
+
two_xl: {
|
|
9049
|
+
root: string;
|
|
9050
|
+
segment: string;
|
|
9051
|
+
};
|
|
9052
|
+
three_xl: {
|
|
9053
|
+
root: string;
|
|
9054
|
+
segment: string;
|
|
9055
|
+
};
|
|
9056
|
+
four_xl: {
|
|
9057
|
+
root: string;
|
|
9058
|
+
segment: string;
|
|
9059
|
+
};
|
|
9060
|
+
full: {
|
|
9061
|
+
root: string;
|
|
9062
|
+
segment: string;
|
|
9063
|
+
};
|
|
9064
|
+
};
|
|
9065
|
+
size: {
|
|
9066
|
+
sm: {
|
|
9067
|
+
segment: string;
|
|
9068
|
+
};
|
|
9069
|
+
md: {
|
|
9070
|
+
segment: string;
|
|
9071
|
+
};
|
|
9072
|
+
};
|
|
9073
|
+
/** Stretch the track and share its width evenly between the segments. */
|
|
9074
|
+
justified: {
|
|
9075
|
+
true: {
|
|
9076
|
+
root: string;
|
|
9077
|
+
segment: string;
|
|
9078
|
+
};
|
|
9079
|
+
false: {};
|
|
9080
|
+
};
|
|
9081
|
+
/**
|
|
9082
|
+
* The picked segment. Filled rather than merely tinted: the control is often
|
|
9083
|
+
* the only thing on its row, so the answer has to be readable at a glance
|
|
9084
|
+
* without comparing two subtle shades.
|
|
9085
|
+
*/
|
|
9086
|
+
active: {
|
|
9087
|
+
true: {
|
|
9088
|
+
segment: string;
|
|
9089
|
+
};
|
|
9090
|
+
false: {
|
|
9091
|
+
segment: string;
|
|
9092
|
+
};
|
|
9093
|
+
};
|
|
9094
|
+
}, {
|
|
9095
|
+
root: string;
|
|
9096
|
+
segment: string;
|
|
9097
|
+
}, undefined, {
|
|
9098
|
+
/**
|
|
9099
|
+
* Corner rounding of the track, with the segments rounded one step tighter so
|
|
9100
|
+
* a filled segment nests inside the track's own corner instead of poking out
|
|
9101
|
+
* of it. Token names match mn-button's; `full` makes a pill, where track and
|
|
9102
|
+
* segment share the same fully-rounded ends.
|
|
9103
|
+
*/
|
|
9104
|
+
borderRadius: {
|
|
9105
|
+
none: {
|
|
9106
|
+
root: string;
|
|
9107
|
+
segment: string;
|
|
9108
|
+
};
|
|
9109
|
+
xs: {
|
|
9110
|
+
root: string;
|
|
9111
|
+
segment: string;
|
|
9112
|
+
};
|
|
9113
|
+
sm: {
|
|
9114
|
+
root: string;
|
|
9115
|
+
segment: string;
|
|
9116
|
+
};
|
|
9117
|
+
md: {
|
|
9118
|
+
root: string;
|
|
9119
|
+
segment: string;
|
|
9120
|
+
};
|
|
9121
|
+
lg: {
|
|
9122
|
+
root: string;
|
|
9123
|
+
segment: string;
|
|
9124
|
+
};
|
|
9125
|
+
xl: {
|
|
9126
|
+
root: string;
|
|
9127
|
+
segment: string;
|
|
9128
|
+
};
|
|
9129
|
+
two_xl: {
|
|
9130
|
+
root: string;
|
|
9131
|
+
segment: string;
|
|
9132
|
+
};
|
|
9133
|
+
three_xl: {
|
|
9134
|
+
root: string;
|
|
9135
|
+
segment: string;
|
|
9136
|
+
};
|
|
9137
|
+
four_xl: {
|
|
9138
|
+
root: string;
|
|
9139
|
+
segment: string;
|
|
9140
|
+
};
|
|
9141
|
+
full: {
|
|
9142
|
+
root: string;
|
|
9143
|
+
segment: string;
|
|
9144
|
+
};
|
|
9145
|
+
};
|
|
9146
|
+
size: {
|
|
9147
|
+
sm: {
|
|
9148
|
+
segment: string;
|
|
9149
|
+
};
|
|
9150
|
+
md: {
|
|
9151
|
+
segment: string;
|
|
9152
|
+
};
|
|
9153
|
+
};
|
|
9154
|
+
/** Stretch the track and share its width evenly between the segments. */
|
|
9155
|
+
justified: {
|
|
9156
|
+
true: {
|
|
9157
|
+
root: string;
|
|
9158
|
+
segment: string;
|
|
9159
|
+
};
|
|
9160
|
+
false: {};
|
|
9161
|
+
};
|
|
9162
|
+
/**
|
|
9163
|
+
* The picked segment. Filled rather than merely tinted: the control is often
|
|
9164
|
+
* the only thing on its row, so the answer has to be readable at a glance
|
|
9165
|
+
* without comparing two subtle shades.
|
|
9166
|
+
*/
|
|
9167
|
+
active: {
|
|
9168
|
+
true: {
|
|
9169
|
+
segment: string;
|
|
9170
|
+
};
|
|
9171
|
+
false: {
|
|
9172
|
+
segment: string;
|
|
9173
|
+
};
|
|
9174
|
+
};
|
|
9175
|
+
}, {
|
|
9176
|
+
root: string;
|
|
9177
|
+
segment: string;
|
|
9178
|
+
}, tailwind_variants.TVReturnType<{
|
|
9179
|
+
/**
|
|
9180
|
+
* Corner rounding of the track, with the segments rounded one step tighter so
|
|
9181
|
+
* a filled segment nests inside the track's own corner instead of poking out
|
|
9182
|
+
* of it. Token names match mn-button's; `full` makes a pill, where track and
|
|
9183
|
+
* segment share the same fully-rounded ends.
|
|
9184
|
+
*/
|
|
9185
|
+
borderRadius: {
|
|
9186
|
+
none: {
|
|
9187
|
+
root: string;
|
|
9188
|
+
segment: string;
|
|
9189
|
+
};
|
|
9190
|
+
xs: {
|
|
9191
|
+
root: string;
|
|
9192
|
+
segment: string;
|
|
9193
|
+
};
|
|
9194
|
+
sm: {
|
|
9195
|
+
root: string;
|
|
9196
|
+
segment: string;
|
|
9197
|
+
};
|
|
9198
|
+
md: {
|
|
9199
|
+
root: string;
|
|
9200
|
+
segment: string;
|
|
9201
|
+
};
|
|
9202
|
+
lg: {
|
|
9203
|
+
root: string;
|
|
9204
|
+
segment: string;
|
|
9205
|
+
};
|
|
9206
|
+
xl: {
|
|
9207
|
+
root: string;
|
|
9208
|
+
segment: string;
|
|
9209
|
+
};
|
|
9210
|
+
two_xl: {
|
|
9211
|
+
root: string;
|
|
9212
|
+
segment: string;
|
|
9213
|
+
};
|
|
9214
|
+
three_xl: {
|
|
9215
|
+
root: string;
|
|
9216
|
+
segment: string;
|
|
9217
|
+
};
|
|
9218
|
+
four_xl: {
|
|
9219
|
+
root: string;
|
|
9220
|
+
segment: string;
|
|
9221
|
+
};
|
|
9222
|
+
full: {
|
|
9223
|
+
root: string;
|
|
9224
|
+
segment: string;
|
|
9225
|
+
};
|
|
9226
|
+
};
|
|
9227
|
+
size: {
|
|
9228
|
+
sm: {
|
|
9229
|
+
segment: string;
|
|
9230
|
+
};
|
|
9231
|
+
md: {
|
|
9232
|
+
segment: string;
|
|
9233
|
+
};
|
|
9234
|
+
};
|
|
9235
|
+
/** Stretch the track and share its width evenly between the segments. */
|
|
9236
|
+
justified: {
|
|
9237
|
+
true: {
|
|
9238
|
+
root: string;
|
|
9239
|
+
segment: string;
|
|
9240
|
+
};
|
|
9241
|
+
false: {};
|
|
9242
|
+
};
|
|
9243
|
+
/**
|
|
9244
|
+
* The picked segment. Filled rather than merely tinted: the control is often
|
|
9245
|
+
* the only thing on its row, so the answer has to be readable at a glance
|
|
9246
|
+
* without comparing two subtle shades.
|
|
9247
|
+
*/
|
|
9248
|
+
active: {
|
|
9249
|
+
true: {
|
|
9250
|
+
segment: string;
|
|
9251
|
+
};
|
|
9252
|
+
false: {
|
|
9253
|
+
segment: string;
|
|
9254
|
+
};
|
|
9255
|
+
};
|
|
9256
|
+
}, {
|
|
9257
|
+
root: string;
|
|
9258
|
+
segment: string;
|
|
9259
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
9260
|
+
type MnSegmentedVariants = VariantProps<typeof mnSegmentedVariants>;
|
|
9261
|
+
|
|
9262
|
+
/**
|
|
9263
|
+
* One choice in a {@link MnSegmented} control.
|
|
9264
|
+
*
|
|
9265
|
+
* A segment is a label, an icon, or both. Icon-only segments carry no visible
|
|
9266
|
+
* text, so they need an {@link ariaLabel} to stay reachable by name.
|
|
9267
|
+
*/
|
|
9268
|
+
type MnSegmentedItem = {
|
|
9269
|
+
/** Value emitted when this segment is picked; also identifies the active one. */
|
|
9270
|
+
value: string;
|
|
9271
|
+
/** Translation key or literal label. Omit for an icon-only segment. */
|
|
9272
|
+
label?: string;
|
|
9273
|
+
/**
|
|
9274
|
+
* Optional leading icon: a `TemplateRef` (full control over the icon set — an
|
|
9275
|
+
* `<mn-icon>`, an emoji, a bespoke `<svg>`) or lucide icon *data* such as
|
|
9276
|
+
* `LucideList.icon`. The same convention the dropdown's actions use; see
|
|
9277
|
+
* {@link MnActionIcon}.
|
|
9278
|
+
*/
|
|
9279
|
+
icon?: MnActionIcon;
|
|
9280
|
+
/**
|
|
9281
|
+
* Accessible name of the segment. Required when {@link label} is omitted,
|
|
9282
|
+
* since an icon alone names nothing; ignored otherwise — the label is the name.
|
|
9283
|
+
*/
|
|
9284
|
+
ariaLabel?: string;
|
|
9285
|
+
/** Whether this choice cannot be picked. Defaults to false. */
|
|
9286
|
+
disabled?: boolean;
|
|
9287
|
+
};
|
|
9288
|
+
/**
|
|
9289
|
+
* Data source for {@link MnSegmented}.
|
|
9290
|
+
*
|
|
9291
|
+
* The control is a single-choice switch: exactly one of {@link items} is active
|
|
9292
|
+
* at a time, and which one is decided by the consumer through
|
|
9293
|
+
* {@link MnSegmented.value} rather than by the control itself.
|
|
9294
|
+
*/
|
|
9295
|
+
type MnSegmentedDataSource = {
|
|
9296
|
+
/** The choices, in the order they are shown. Two or three read best. */
|
|
9297
|
+
items: MnSegmentedItem[];
|
|
9298
|
+
/** Visual scale. Defaults to `'md'`. */
|
|
9299
|
+
size?: 'sm' | 'md';
|
|
9300
|
+
/**
|
|
9301
|
+
* Corner rounding, in mn-button's radius tokens plus `'full'` for a pill.
|
|
9302
|
+
* Defaults to `'lg'`. The segments follow the track one step tighter, so the
|
|
9303
|
+
* active segment stays nested inside the track's corner.
|
|
9304
|
+
*/
|
|
9305
|
+
borderRadius?: MnSegmentedVariants['borderRadius'];
|
|
9306
|
+
/**
|
|
9307
|
+
* Translation key or literal naming what the group switches, e.g. "View".
|
|
9308
|
+
* Without it the group is an unnamed set of buttons to a screen reader.
|
|
9309
|
+
*/
|
|
9310
|
+
ariaLabel?: string;
|
|
9311
|
+
};
|
|
9312
|
+
|
|
9313
|
+
/**
|
|
9314
|
+
* A segmented control: two or three mutually exclusive choices sharing one
|
|
9315
|
+
* track, of which exactly one is active — a view switch (list ⇄ calendar), a
|
|
9316
|
+
* scope switch (mine ⇄ everyone), a range switch (week ⇄ month).
|
|
9317
|
+
*
|
|
9318
|
+
* The selection is **controlled**: the component renders whatever
|
|
9319
|
+
* {@link value} says and emits {@link valueChange} on a click, so the consumer's
|
|
9320
|
+
* own state stays the single source of truth for what is on screen. It keeps no
|
|
9321
|
+
* copy of the selection, and — unlike `mn-tab` — it does not mirror one into the
|
|
9322
|
+
* URL, so it can sit on a page that already has a tab bar without the two
|
|
9323
|
+
* fighting over the query string.
|
|
9324
|
+
*
|
|
9325
|
+
* For switching between panes of a page, reach for `mn-tab`; this is for
|
|
9326
|
+
* switching how one pane is rendered.
|
|
9327
|
+
*/
|
|
9328
|
+
declare class MnSegmented {
|
|
9329
|
+
/** The choices and how the group is labelled and scaled. */
|
|
9330
|
+
dataSource: MnSegmentedDataSource;
|
|
9331
|
+
/**
|
|
9332
|
+
* Value of the active segment. No value (or one naming no segment) leaves the
|
|
9333
|
+
* control with nothing active, which is what an unresolved selection should
|
|
9334
|
+
* look like — the component never picks one on the consumer's behalf.
|
|
9335
|
+
*/
|
|
9336
|
+
value?: string;
|
|
9337
|
+
/**
|
|
9338
|
+
* Whether the segments stretch to fill the available width. Defaults to false,
|
|
9339
|
+
* so the control hugs its content and can be parked at the end of a row; turn
|
|
9340
|
+
* it on where it should span its container, typically on a narrow screen.
|
|
9341
|
+
*/
|
|
9342
|
+
justified: boolean;
|
|
9343
|
+
/** Emits the picked segment's value. The consumer decides what to do with it. */
|
|
9344
|
+
valueChange: EventEmitter<string>;
|
|
9345
|
+
/** Resolves this control's own accessible names against the app's bundle. */
|
|
9346
|
+
private readonly lang;
|
|
9347
|
+
/** Resolved slot classes for the current size and layout. */
|
|
9348
|
+
get styles(): {
|
|
9349
|
+
root: (slotProps?: ({
|
|
9350
|
+
size?: "sm" | "md" | undefined;
|
|
9351
|
+
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9352
|
+
active?: boolean | undefined;
|
|
9353
|
+
justified?: boolean | undefined;
|
|
9354
|
+
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9355
|
+
segment: (slotProps?: ({
|
|
9356
|
+
size?: "sm" | "md" | undefined;
|
|
9357
|
+
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9358
|
+
active?: boolean | undefined;
|
|
9359
|
+
justified?: boolean | undefined;
|
|
9360
|
+
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9361
|
+
} & {
|
|
9362
|
+
root: (slotProps?: ({
|
|
9363
|
+
size?: "sm" | "md" | undefined;
|
|
9364
|
+
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9365
|
+
active?: boolean | undefined;
|
|
9366
|
+
justified?: boolean | undefined;
|
|
9367
|
+
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9368
|
+
segment: (slotProps?: ({
|
|
9369
|
+
size?: "sm" | "md" | undefined;
|
|
9370
|
+
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9371
|
+
active?: boolean | undefined;
|
|
9372
|
+
justified?: boolean | undefined;
|
|
9373
|
+
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9374
|
+
} & {};
|
|
9375
|
+
/** Icon edge length matching the control's text size. */
|
|
9376
|
+
get iconSize(): number;
|
|
9377
|
+
/** Accessible name of the group, or null when the consumer named nothing. */
|
|
9378
|
+
get groupLabel(): string | null;
|
|
9379
|
+
/**
|
|
9380
|
+
* Whether `item` is the active choice.
|
|
9381
|
+
* @param item - The segment to test.
|
|
9382
|
+
*/
|
|
9383
|
+
isActive(item: MnSegmentedItem): boolean;
|
|
9384
|
+
/**
|
|
9385
|
+
* Classes for one segment, which differ only in whether it is the active one.
|
|
9386
|
+
* @param item - The segment to style.
|
|
9387
|
+
*/
|
|
9388
|
+
segmentClass(item: MnSegmentedItem): string;
|
|
9389
|
+
/**
|
|
9390
|
+
* Accessible name for an icon-only segment, or null when the segment shows a
|
|
9391
|
+
* label — that label already names it, and a second name would only compete.
|
|
9392
|
+
* @param item - The segment to name.
|
|
9393
|
+
*/
|
|
9394
|
+
segmentLabel(item: MnSegmentedItem): string | null;
|
|
9395
|
+
/**
|
|
9396
|
+
* Whether an icon was supplied as a `TemplateRef` rather than lucide icon data.
|
|
9397
|
+
* @param value - The icon to test.
|
|
9398
|
+
*/
|
|
9399
|
+
isTemplateRef(value: unknown): value is TemplateRef<unknown>;
|
|
9400
|
+
/**
|
|
9401
|
+
* Announces a click. Re-picking the active segment is silent: it is not a
|
|
9402
|
+
* change, and a consumer that reloads on every emission would refetch for
|
|
9403
|
+
* nothing.
|
|
9404
|
+
* @param item - The segment that was clicked.
|
|
9405
|
+
*/
|
|
9406
|
+
select(item: MnSegmentedItem): void;
|
|
9407
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnSegmented, never>;
|
|
9408
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MnSegmented, "mn-segmented", never, { "dataSource": { "alias": "dataSource"; "required": true; }; "value": { "alias": "value"; "required": false; }; "justified": { "alias": "justified"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
9409
|
+
}
|
|
9410
|
+
|
|
8929
9411
|
/**
|
|
8930
9412
|
* Types for mn-lib configuration.
|
|
8931
9413
|
*/
|
|
@@ -9419,5 +9901,5 @@ type MnPreviewMessage = {
|
|
|
9419
9901
|
*/
|
|
9420
9902
|
declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
|
|
9421
9903
|
|
|
9422
|
-
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, MnKeyboard, 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 };
|
|
9423
|
-
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, MnKeyboardLabels, MnKeyboardLayout, MnKeyboardPresentation, 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 };
|
|
9904
|
+
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, MnKeyboard, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnRichTextEditor, MnSectionDirective, MnSegmented, 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, mnSegmentedVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
|
|
9905
|
+
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, MnKeyboardLabels, MnKeyboardLayout, MnKeyboardPresentation, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPageSlot, MnPreviewMessage, MnQueryParams, MnRichTextEditorControl, MnRichTextEditorLabels, MnRichTextEditorToolbar, MnRowValue, MnSegmentedDataSource, MnSegmentedItem, MnSegmentedVariants, 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 };
|