mn-angular-lib 1.0.167 → 1.0.169
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 +153 -49
- package/fesm2022/mn-angular-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mn-angular-lib.d.ts +74 -92
package/package.json
CHANGED
|
@@ -385,6 +385,7 @@ declare const mnButtonVariants: tailwind_variants.TVReturnType<{
|
|
|
385
385
|
two_xl: string;
|
|
386
386
|
three_xl: string;
|
|
387
387
|
four_xl: string;
|
|
388
|
+
full: string;
|
|
388
389
|
};
|
|
389
390
|
shape: {
|
|
390
391
|
default: string;
|
|
@@ -436,6 +437,7 @@ declare const mnButtonVariants: tailwind_variants.TVReturnType<{
|
|
|
436
437
|
two_xl: string;
|
|
437
438
|
three_xl: string;
|
|
438
439
|
four_xl: string;
|
|
440
|
+
full: string;
|
|
439
441
|
};
|
|
440
442
|
shape: {
|
|
441
443
|
default: string;
|
|
@@ -487,6 +489,7 @@ declare const mnButtonVariants: tailwind_variants.TVReturnType<{
|
|
|
487
489
|
two_xl: string;
|
|
488
490
|
three_xl: string;
|
|
489
491
|
four_xl: string;
|
|
492
|
+
full: string;
|
|
490
493
|
};
|
|
491
494
|
shape: {
|
|
492
495
|
default: string;
|
|
@@ -2848,6 +2851,8 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2848
2851
|
/** Layout classes for the anchored popover panel. The mobile sheet is rendered by
|
|
2849
2852
|
* mn-bottom-sheet instead, so it no longer needs a branch here. */
|
|
2850
2853
|
readonly panelClasses = "fixed z-9999 bg-base-100 border border-base-300 rounded-md shadow-lg max-h-60 overflow-auto";
|
|
2854
|
+
/** The panel's own height cap in pixels: the `max-h-60` above, restated for the placement maths. */
|
|
2855
|
+
static readonly PANEL_MAX_HEIGHT_PX = 240;
|
|
2851
2856
|
/** Layout classes for the invisible click shield rendered under the anchored panel.
|
|
2852
2857
|
* One step below the panel's z-index so the panel itself stays clickable, and above
|
|
2853
2858
|
* any modal/drawer chrome (which tops out well under 9998). */
|
|
@@ -2910,10 +2915,13 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2910
2915
|
isDisabled: boolean;
|
|
2911
2916
|
searchTerm: string;
|
|
2912
2917
|
/** Dropdown position calculated from trigger bounding rect */
|
|
2918
|
+
/** Inline placement of the anchored panel; `maxHeight` only binds when the viewport is the tighter cap. */
|
|
2913
2919
|
dropdownStyle: {
|
|
2914
2920
|
top: string;
|
|
2921
|
+
bottom: string;
|
|
2915
2922
|
left: string;
|
|
2916
2923
|
width: string;
|
|
2924
|
+
maxHeight: string | null;
|
|
2917
2925
|
};
|
|
2918
2926
|
private onChange;
|
|
2919
2927
|
private onTouched;
|
|
@@ -2993,7 +3001,10 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2993
3001
|
private lockBodyScroll;
|
|
2994
3002
|
/** Restores the pre-lock `overflow`. Idempotent. */
|
|
2995
3003
|
private unlockBodyScroll;
|
|
2996
|
-
/**
|
|
3004
|
+
/**
|
|
3005
|
+
* Calculates the fixed position for the dropdown based on the trigger element: below it
|
|
3006
|
+
* while the viewport has room, above it otherwise, never past the viewport's edge.
|
|
3007
|
+
*/
|
|
2997
3008
|
private updateDropdownPosition;
|
|
2998
3009
|
/**
|
|
2999
3010
|
* Starts the open-only watchers: an `IntersectionObserver` on the trigger (closes the
|
|
@@ -3419,9 +3430,12 @@ declare class MnDropdown implements OnInit {
|
|
|
3419
3430
|
* is {@link MnDropdownProps.searchable}. */
|
|
3420
3431
|
searchTerm: string;
|
|
3421
3432
|
/** Popover position computed from the trigger's bounding rect. */
|
|
3433
|
+
/** Inline placement of the anchored panel; `maxHeight` only binds when the viewport is the tighter cap. */
|
|
3422
3434
|
dropdownStyle: {
|
|
3423
3435
|
top: string;
|
|
3436
|
+
bottom: string;
|
|
3424
3437
|
left: string;
|
|
3438
|
+
maxHeight: string | null;
|
|
3425
3439
|
};
|
|
3426
3440
|
/**
|
|
3427
3441
|
* The popover panel, relocated to `document.body` on appearance (see mn-multi-select's
|
|
@@ -4035,6 +4049,8 @@ declare class MnSelect implements OnInit {
|
|
|
4035
4049
|
/** Layout classes for the anchored popover panel. The mobile sheet is rendered by
|
|
4036
4050
|
* mn-bottom-sheet instead, so it no longer needs a branch here. */
|
|
4037
4051
|
readonly panelClasses = "fixed z-9999 bg-base-100 border border-base-300 rounded-md shadow-lg max-h-60 overflow-auto";
|
|
4052
|
+
/** The panel's own height cap in pixels: the `max-h-60` above, restated for the placement maths. */
|
|
4053
|
+
static readonly PANEL_MAX_HEIGHT_PX = 240;
|
|
4038
4054
|
/** Layout classes for the invisible click shield rendered under the anchored panel.
|
|
4039
4055
|
* One step below the panel's z-index so the panel itself stays clickable, and above
|
|
4040
4056
|
* any modal/drawer chrome (which tops out well under 9998). */
|
|
@@ -4077,10 +4093,13 @@ declare class MnSelect implements OnInit {
|
|
|
4077
4093
|
*/
|
|
4078
4094
|
private scrollCapture;
|
|
4079
4095
|
/** Dropdown position calculated from the trigger's bounding rect. */
|
|
4096
|
+
/** Inline placement of the anchored panel; `maxHeight` only binds when the viewport is the tighter cap. */
|
|
4080
4097
|
dropdownStyle: {
|
|
4081
4098
|
top: string;
|
|
4099
|
+
bottom: string;
|
|
4082
4100
|
left: string;
|
|
4083
4101
|
width: string;
|
|
4102
|
+
maxHeight: string | null;
|
|
4084
4103
|
};
|
|
4085
4104
|
private onChange;
|
|
4086
4105
|
private onTouched;
|
|
@@ -4202,7 +4221,10 @@ declare class MnSelect implements OnInit {
|
|
|
4202
4221
|
private lockBodyScroll;
|
|
4203
4222
|
/** Restores the pre-lock `overflow`. Idempotent. */
|
|
4204
4223
|
private unlockBodyScroll;
|
|
4205
|
-
/**
|
|
4224
|
+
/**
|
|
4225
|
+
* Calculates the fixed position for the dropdown based on the trigger element: below it
|
|
4226
|
+
* while the viewport has room, above it otherwise, never past the viewport's edge.
|
|
4227
|
+
*/
|
|
4206
4228
|
private updateDropdownPosition;
|
|
4207
4229
|
/**
|
|
4208
4230
|
* Starts the open-only watchers: an `IntersectionObserver` on the trigger (closes the panel
|
|
@@ -9041,62 +9063,49 @@ type MnBreadcrumbsVariants = VariantProps<typeof mnBreadcrumbsVariants>;
|
|
|
9041
9063
|
* row of loose buttons: the segments share one bordered surface, so they read as
|
|
9042
9064
|
* one control with one answer instead of several independent actions. Theme
|
|
9043
9065
|
* tokens only, so it holds up in both light and dark.
|
|
9066
|
+
*
|
|
9067
|
+
* Each segment is an `mnButton`, which owns its own size, colour, radius and
|
|
9068
|
+
* disabled look; the `segment` slot adds only what the button does not know
|
|
9069
|
+
* about — how it sits inside the track.
|
|
9044
9070
|
*/
|
|
9045
9071
|
declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
9046
9072
|
/**
|
|
9047
|
-
* Corner rounding of the track
|
|
9048
|
-
*
|
|
9049
|
-
*
|
|
9050
|
-
* segment share the same
|
|
9073
|
+
* Corner rounding of the track. The segments are rounded one step tighter
|
|
9074
|
+
* (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
|
|
9075
|
+
* the track's own corner instead of poking out of it. Token names match
|
|
9076
|
+
* mn-button's; `full` makes a pill, where track and segment share the same
|
|
9077
|
+
* fully-rounded ends.
|
|
9051
9078
|
*/
|
|
9052
9079
|
borderRadius: {
|
|
9053
9080
|
none: {
|
|
9054
9081
|
root: string;
|
|
9055
|
-
segment: string;
|
|
9056
9082
|
};
|
|
9057
9083
|
xs: {
|
|
9058
9084
|
root: string;
|
|
9059
|
-
segment: string;
|
|
9060
9085
|
};
|
|
9061
9086
|
sm: {
|
|
9062
9087
|
root: string;
|
|
9063
|
-
segment: string;
|
|
9064
9088
|
};
|
|
9065
9089
|
md: {
|
|
9066
9090
|
root: string;
|
|
9067
|
-
segment: string;
|
|
9068
9091
|
};
|
|
9069
9092
|
lg: {
|
|
9070
9093
|
root: string;
|
|
9071
|
-
segment: string;
|
|
9072
9094
|
};
|
|
9073
9095
|
xl: {
|
|
9074
9096
|
root: string;
|
|
9075
|
-
segment: string;
|
|
9076
9097
|
};
|
|
9077
9098
|
two_xl: {
|
|
9078
9099
|
root: string;
|
|
9079
|
-
segment: string;
|
|
9080
9100
|
};
|
|
9081
9101
|
three_xl: {
|
|
9082
9102
|
root: string;
|
|
9083
|
-
segment: string;
|
|
9084
9103
|
};
|
|
9085
9104
|
four_xl: {
|
|
9086
9105
|
root: string;
|
|
9087
|
-
segment: string;
|
|
9088
9106
|
};
|
|
9089
9107
|
full: {
|
|
9090
9108
|
root: string;
|
|
9091
|
-
segment: string;
|
|
9092
|
-
};
|
|
9093
|
-
};
|
|
9094
|
-
size: {
|
|
9095
|
-
sm: {
|
|
9096
|
-
segment: string;
|
|
9097
|
-
};
|
|
9098
|
-
md: {
|
|
9099
|
-
segment: string;
|
|
9100
9109
|
};
|
|
9101
9110
|
};
|
|
9102
9111
|
/**
|
|
@@ -9115,14 +9124,13 @@ declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
|
9115
9124
|
false: {};
|
|
9116
9125
|
};
|
|
9117
9126
|
/**
|
|
9118
|
-
*
|
|
9119
|
-
*
|
|
9120
|
-
*
|
|
9127
|
+
* Whether the segment is the picked one. The colours come from the button
|
|
9128
|
+
* itself (a filled primary button when active, a ghost one otherwise); this
|
|
9129
|
+
* only keeps an inactive segment's box the same size as an active one, whose
|
|
9130
|
+
* fill variant carries a real border.
|
|
9121
9131
|
*/
|
|
9122
9132
|
active: {
|
|
9123
|
-
true: {
|
|
9124
|
-
segment: string;
|
|
9125
|
-
};
|
|
9133
|
+
true: {};
|
|
9126
9134
|
false: {
|
|
9127
9135
|
segment: string;
|
|
9128
9136
|
};
|
|
@@ -9132,59 +9140,42 @@ declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
|
9132
9140
|
segment: string;
|
|
9133
9141
|
}, undefined, {
|
|
9134
9142
|
/**
|
|
9135
|
-
* Corner rounding of the track
|
|
9136
|
-
*
|
|
9137
|
-
*
|
|
9138
|
-
* segment share the same
|
|
9143
|
+
* Corner rounding of the track. The segments are rounded one step tighter
|
|
9144
|
+
* (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
|
|
9145
|
+
* the track's own corner instead of poking out of it. Token names match
|
|
9146
|
+
* mn-button's; `full` makes a pill, where track and segment share the same
|
|
9147
|
+
* fully-rounded ends.
|
|
9139
9148
|
*/
|
|
9140
9149
|
borderRadius: {
|
|
9141
9150
|
none: {
|
|
9142
9151
|
root: string;
|
|
9143
|
-
segment: string;
|
|
9144
9152
|
};
|
|
9145
9153
|
xs: {
|
|
9146
9154
|
root: string;
|
|
9147
|
-
segment: string;
|
|
9148
9155
|
};
|
|
9149
9156
|
sm: {
|
|
9150
9157
|
root: string;
|
|
9151
|
-
segment: string;
|
|
9152
9158
|
};
|
|
9153
9159
|
md: {
|
|
9154
9160
|
root: string;
|
|
9155
|
-
segment: string;
|
|
9156
9161
|
};
|
|
9157
9162
|
lg: {
|
|
9158
9163
|
root: string;
|
|
9159
|
-
segment: string;
|
|
9160
9164
|
};
|
|
9161
9165
|
xl: {
|
|
9162
9166
|
root: string;
|
|
9163
|
-
segment: string;
|
|
9164
9167
|
};
|
|
9165
9168
|
two_xl: {
|
|
9166
9169
|
root: string;
|
|
9167
|
-
segment: string;
|
|
9168
9170
|
};
|
|
9169
9171
|
three_xl: {
|
|
9170
9172
|
root: string;
|
|
9171
|
-
segment: string;
|
|
9172
9173
|
};
|
|
9173
9174
|
four_xl: {
|
|
9174
9175
|
root: string;
|
|
9175
|
-
segment: string;
|
|
9176
9176
|
};
|
|
9177
9177
|
full: {
|
|
9178
9178
|
root: string;
|
|
9179
|
-
segment: string;
|
|
9180
|
-
};
|
|
9181
|
-
};
|
|
9182
|
-
size: {
|
|
9183
|
-
sm: {
|
|
9184
|
-
segment: string;
|
|
9185
|
-
};
|
|
9186
|
-
md: {
|
|
9187
|
-
segment: string;
|
|
9188
9179
|
};
|
|
9189
9180
|
};
|
|
9190
9181
|
/**
|
|
@@ -9203,14 +9194,13 @@ declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
|
9203
9194
|
false: {};
|
|
9204
9195
|
};
|
|
9205
9196
|
/**
|
|
9206
|
-
*
|
|
9207
|
-
*
|
|
9208
|
-
*
|
|
9197
|
+
* Whether the segment is the picked one. The colours come from the button
|
|
9198
|
+
* itself (a filled primary button when active, a ghost one otherwise); this
|
|
9199
|
+
* only keeps an inactive segment's box the same size as an active one, whose
|
|
9200
|
+
* fill variant carries a real border.
|
|
9209
9201
|
*/
|
|
9210
9202
|
active: {
|
|
9211
|
-
true: {
|
|
9212
|
-
segment: string;
|
|
9213
|
-
};
|
|
9203
|
+
true: {};
|
|
9214
9204
|
false: {
|
|
9215
9205
|
segment: string;
|
|
9216
9206
|
};
|
|
@@ -9220,59 +9210,42 @@ declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
|
9220
9210
|
segment: string;
|
|
9221
9211
|
}, tailwind_variants.TVReturnType<{
|
|
9222
9212
|
/**
|
|
9223
|
-
* Corner rounding of the track
|
|
9224
|
-
*
|
|
9225
|
-
*
|
|
9226
|
-
* segment share the same
|
|
9213
|
+
* Corner rounding of the track. The segments are rounded one step tighter
|
|
9214
|
+
* (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
|
|
9215
|
+
* the track's own corner instead of poking out of it. Token names match
|
|
9216
|
+
* mn-button's; `full` makes a pill, where track and segment share the same
|
|
9217
|
+
* fully-rounded ends.
|
|
9227
9218
|
*/
|
|
9228
9219
|
borderRadius: {
|
|
9229
9220
|
none: {
|
|
9230
9221
|
root: string;
|
|
9231
|
-
segment: string;
|
|
9232
9222
|
};
|
|
9233
9223
|
xs: {
|
|
9234
9224
|
root: string;
|
|
9235
|
-
segment: string;
|
|
9236
9225
|
};
|
|
9237
9226
|
sm: {
|
|
9238
9227
|
root: string;
|
|
9239
|
-
segment: string;
|
|
9240
9228
|
};
|
|
9241
9229
|
md: {
|
|
9242
9230
|
root: string;
|
|
9243
|
-
segment: string;
|
|
9244
9231
|
};
|
|
9245
9232
|
lg: {
|
|
9246
9233
|
root: string;
|
|
9247
|
-
segment: string;
|
|
9248
9234
|
};
|
|
9249
9235
|
xl: {
|
|
9250
9236
|
root: string;
|
|
9251
|
-
segment: string;
|
|
9252
9237
|
};
|
|
9253
9238
|
two_xl: {
|
|
9254
9239
|
root: string;
|
|
9255
|
-
segment: string;
|
|
9256
9240
|
};
|
|
9257
9241
|
three_xl: {
|
|
9258
9242
|
root: string;
|
|
9259
|
-
segment: string;
|
|
9260
9243
|
};
|
|
9261
9244
|
four_xl: {
|
|
9262
9245
|
root: string;
|
|
9263
|
-
segment: string;
|
|
9264
9246
|
};
|
|
9265
9247
|
full: {
|
|
9266
9248
|
root: string;
|
|
9267
|
-
segment: string;
|
|
9268
|
-
};
|
|
9269
|
-
};
|
|
9270
|
-
size: {
|
|
9271
|
-
sm: {
|
|
9272
|
-
segment: string;
|
|
9273
|
-
};
|
|
9274
|
-
md: {
|
|
9275
|
-
segment: string;
|
|
9276
9249
|
};
|
|
9277
9250
|
};
|
|
9278
9251
|
/**
|
|
@@ -9291,14 +9264,13 @@ declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
|
|
|
9291
9264
|
false: {};
|
|
9292
9265
|
};
|
|
9293
9266
|
/**
|
|
9294
|
-
*
|
|
9295
|
-
*
|
|
9296
|
-
*
|
|
9267
|
+
* Whether the segment is the picked one. The colours come from the button
|
|
9268
|
+
* itself (a filled primary button when active, a ghost one otherwise); this
|
|
9269
|
+
* only keeps an inactive segment's box the same size as an active one, whose
|
|
9270
|
+
* fill variant carries a real border.
|
|
9297
9271
|
*/
|
|
9298
9272
|
active: {
|
|
9299
|
-
true: {
|
|
9300
|
-
segment: string;
|
|
9301
|
-
};
|
|
9273
|
+
true: {};
|
|
9302
9274
|
false: {
|
|
9303
9275
|
segment: string;
|
|
9304
9276
|
};
|
|
@@ -9372,6 +9344,10 @@ type MnSegmentedDataSource = {
|
|
|
9372
9344
|
* URL, so it can sit on a page that already has a tab bar without the two
|
|
9373
9345
|
* fighting over the query string.
|
|
9374
9346
|
*
|
|
9347
|
+
* Each segment is an `mnButton` — a filled primary one when active, a ghost one
|
|
9348
|
+
* otherwise — so the control inherits the button's sizes, colours and disabled
|
|
9349
|
+
* look rather than maintaining a parallel set.
|
|
9350
|
+
*
|
|
9375
9351
|
* For switching between panes of a page, reach for `mn-tab`; this is for
|
|
9376
9352
|
* switching how one pane is rendered.
|
|
9377
9353
|
*/
|
|
@@ -9394,29 +9370,25 @@ declare class MnSegmented {
|
|
|
9394
9370
|
valueChange: EventEmitter<string>;
|
|
9395
9371
|
/** Resolves this control's own accessible names against the app's bundle. */
|
|
9396
9372
|
private readonly lang;
|
|
9397
|
-
/** Resolved slot classes for the current
|
|
9373
|
+
/** Resolved slot classes for the current rounding and layout. */
|
|
9398
9374
|
get styles(): {
|
|
9399
9375
|
root: (slotProps?: ({
|
|
9400
|
-
size?: "sm" | "md" | undefined;
|
|
9401
9376
|
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9402
9377
|
active?: boolean | undefined;
|
|
9403
9378
|
justified?: boolean | undefined;
|
|
9404
9379
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9405
9380
|
segment: (slotProps?: ({
|
|
9406
|
-
size?: "sm" | "md" | undefined;
|
|
9407
9381
|
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9408
9382
|
active?: boolean | undefined;
|
|
9409
9383
|
justified?: boolean | undefined;
|
|
9410
9384
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9411
9385
|
} & {
|
|
9412
9386
|
root: (slotProps?: ({
|
|
9413
|
-
size?: "sm" | "md" | undefined;
|
|
9414
9387
|
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9415
9388
|
active?: boolean | undefined;
|
|
9416
9389
|
justified?: boolean | undefined;
|
|
9417
9390
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
|
|
9418
9391
|
segment: (slotProps?: ({
|
|
9419
|
-
size?: "sm" | "md" | undefined;
|
|
9420
9392
|
borderRadius?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
|
|
9421
9393
|
active?: boolean | undefined;
|
|
9422
9394
|
justified?: boolean | undefined;
|
|
@@ -9432,10 +9404,20 @@ declare class MnSegmented {
|
|
|
9432
9404
|
*/
|
|
9433
9405
|
isActive(item: MnSegmentedItem): boolean;
|
|
9434
9406
|
/**
|
|
9435
|
-
*
|
|
9407
|
+
* Layout classes for one segment — how it sits in the track. Its size, colour,
|
|
9408
|
+
* radius and disabled look come from the button itself; see
|
|
9409
|
+
* {@link segmentButton}.
|
|
9436
9410
|
* @param item - The segment to style.
|
|
9437
9411
|
*/
|
|
9438
9412
|
segmentClass(item: MnSegmentedItem): string;
|
|
9413
|
+
/**
|
|
9414
|
+
* The `mnButton` configuration of one segment: a filled primary button when it
|
|
9415
|
+
* is the active choice, a ghost button otherwise, at the control's size and one
|
|
9416
|
+
* radius step inside the track. The active segment has no hover — re-picking it
|
|
9417
|
+
* does nothing, so nothing should invite the click.
|
|
9418
|
+
* @param item - The segment to configure.
|
|
9419
|
+
*/
|
|
9420
|
+
segmentButton(item: MnSegmentedItem): Partial<MnButtonTypes>;
|
|
9439
9421
|
/**
|
|
9440
9422
|
* Accessible name for an icon-only segment, or null when the segment shows a
|
|
9441
9423
|
* label — that label already names it, and a second name would only compete.
|