mn-angular-lib 2.0.33 → 2.0.35

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.
Files changed (52) hide show
  1. package/fesm2022/mn-angular-lib-alert.mjs +515 -527
  2. package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
  3. package/fesm2022/mn-angular-lib-bottom-sheet.mjs +264 -357
  4. package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
  5. package/fesm2022/mn-angular-lib-button.mjs +819 -382
  6. package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
  7. package/fesm2022/mn-angular-lib-calendar-core.mjs +240 -365
  8. package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
  9. package/fesm2022/mn-angular-lib-calendar.mjs +1691 -1545
  10. package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
  11. package/fesm2022/mn-angular-lib-collection.mjs +2367 -2796
  12. package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
  13. package/fesm2022/mn-angular-lib-core.mjs +693 -1241
  14. package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
  15. package/fesm2022/mn-angular-lib-display.mjs +679 -712
  16. package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
  17. package/fesm2022/mn-angular-lib-forms.mjs +3671 -4647
  18. package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
  19. package/fesm2022/mn-angular-lib-keyboard.mjs +221 -190
  20. package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
  21. package/fesm2022/mn-angular-lib-modal-core.mjs +711 -896
  22. package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
  23. package/fesm2022/mn-angular-lib-modal-ui.mjs +2089 -2035
  24. package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
  25. package/fesm2022/mn-angular-lib-modal.mjs +76 -121
  26. package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
  27. package/fesm2022/mn-angular-lib-rich-text-editor.mjs +289 -277
  28. package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
  29. package/fesm2022/mn-angular-lib-segmented.mjs +189 -241
  30. package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
  31. package/fesm2022/mn-angular-lib-tab.mjs +409 -642
  32. package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
  33. package/fesm2022/mn-angular-lib.mjs +16 -29
  34. package/package.json +1 -1
  35. package/types/mn-angular-lib-alert.d.ts +239 -241
  36. package/types/mn-angular-lib-bottom-sheet.d.ts +190 -150
  37. package/types/mn-angular-lib-button.d.ts +319 -317
  38. package/types/mn-angular-lib-calendar-core.d.ts +199 -209
  39. package/types/mn-angular-lib-calendar.d.ts +656 -511
  40. package/types/mn-angular-lib-collection.d.ts +1649 -1585
  41. package/types/mn-angular-lib-core.d.ts +524 -535
  42. package/types/mn-angular-lib-display.d.ts +946 -886
  43. package/types/mn-angular-lib-forms.d.ts +3012 -3013
  44. package/types/mn-angular-lib-keyboard.d.ts +125 -85
  45. package/types/mn-angular-lib-modal-core.d.ts +978 -994
  46. package/types/mn-angular-lib-modal-ui.d.ts +541 -493
  47. package/types/mn-angular-lib-modal.d.ts +24 -27
  48. package/types/mn-angular-lib-rich-text-editor.d.ts +131 -98
  49. package/types/mn-angular-lib-segmented.d.ts +354 -341
  50. package/types/mn-angular-lib-tab.d.ts +345 -336
  51. package/types/mn-angular-lib.d.ts +16 -16
  52. package/fesm2022/mn-angular-lib.mjs.map +0 -1
@@ -1,11 +1,8 @@
1
- import * as tailwind_variants from 'tailwind-variants';
2
- import { VariantProps } from 'tailwind-variants';
3
- import * as tailwind_merge from 'tailwind-merge';
4
- import * as i0 from '@angular/core';
5
- import { EventEmitter, TemplateRef } from '@angular/core';
6
- import { MnButtonTypes } from 'mn-angular-lib/button';
7
- import { MnActionIcon } from 'mn-angular-lib/forms';
8
-
1
+ import * as i0 from "@angular/core";
2
+ import { EventEmitter, TemplateRef } from "@angular/core";
3
+ import { MnButtonTypes } from "mn-angular-lib/button";
4
+ import { MnActionIcon } from "mn-angular-lib/forms";
5
+ import { VariantProps } from "tailwind-variants";
9
6
  /**
10
7
  * Styling for {@link MnSegmented}, expressed as tailwind-variants slots so the
11
8
  * template pulls one class string per role.
@@ -19,244 +16,243 @@ import { MnActionIcon } from 'mn-angular-lib/forms';
19
16
  * disabled look; the `segment` slot adds only what the button does not know
20
17
  * about — how it sits inside the track.
21
18
  */
22
- declare const mnSegmentedVariants: tailwind_variants.TVReturnType<{
23
- /**
24
- * Corner rounding of the track. The segments are rounded one step tighter
25
- * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
26
- * the track's own corner instead of poking out of it. Token names match
27
- * mn-button's; `full` makes a pill, where track and segment share the same
28
- * fully-rounded ends.
29
- */
30
- borderRadius: {
31
- none: {
32
- root: string;
33
- };
34
- xs: {
35
- root: string;
36
- };
37
- sm: {
38
- root: string;
39
- };
40
- md: {
41
- root: string;
42
- };
43
- lg: {
44
- root: string;
45
- };
46
- xl: {
47
- root: string;
48
- };
49
- two_xl: {
50
- root: string;
51
- };
52
- three_xl: {
53
- root: string;
54
- };
55
- four_xl: {
56
- root: string;
57
- };
58
- full: {
59
- root: string;
60
- };
61
- };
62
- /**
63
- * Stretch the track and share its width evenly between the segments.
64
- *
65
- * The segments grow from a zero basis but keep their automatic minimum, so a
66
- * justified control inside an auto-width parent still asks for the room its
67
- * labels need. Letting them shrink below their content (`min-w-0`) made the
68
- * parent resolve to a narrower box and truncated the labels instead.
69
- */
70
- justified: {
71
- true: {
72
- root: string;
73
- segment: string;
74
- };
75
- false: {};
76
- };
77
- /**
78
- * Whether the segment is the picked one. The colours come from the button
79
- * itself (a filled primary button when active, a ghost one otherwise); this
80
- * only keeps an inactive segment's box the same size as an active one, whose
81
- * fill variant carries a real border.
82
- */
83
- active: {
84
- true: {};
85
- false: {
86
- segment: string;
87
- };
19
+ export declare const mnSegmentedVariants: import("tailwind-variants").TVReturnType<{
20
+ /**
21
+ * Corner rounding of the track. The segments are rounded one step tighter
22
+ * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
23
+ * the track's own corner instead of poking out of it. Token names match
24
+ * mn-button's; `full` makes a pill, where track and segment share the same
25
+ * fully-rounded ends.
26
+ */
27
+ borderRadius: {
28
+ none: {
29
+ root: string;
88
30
  };
31
+ xs: {
32
+ root: string;
33
+ };
34
+ sm: {
35
+ root: string;
36
+ };
37
+ md: {
38
+ root: string;
39
+ };
40
+ lg: {
41
+ root: string;
42
+ };
43
+ xl: {
44
+ root: string;
45
+ };
46
+ two_xl: {
47
+ root: string;
48
+ };
49
+ three_xl: {
50
+ root: string;
51
+ };
52
+ four_xl: {
53
+ root: string;
54
+ };
55
+ full: {
56
+ root: string;
57
+ };
58
+ };
59
+ /**
60
+ * Stretch the track and share its width evenly between the segments.
61
+ *
62
+ * The segments grow from a zero basis but keep their automatic minimum, so a
63
+ * justified control inside an auto-width parent still asks for the room its
64
+ * labels need. Letting them shrink below their content (`min-w-0`) made the
65
+ * parent resolve to a narrower box and truncated the labels instead.
66
+ */
67
+ justified: {
68
+ true: {
69
+ root: string;
70
+ segment: string;
71
+ };
72
+ false: {};
73
+ };
74
+ /**
75
+ * Whether the segment is the picked one. The colours come from the button
76
+ * itself (a filled primary button when active, a ghost one otherwise); this
77
+ * only keeps an inactive segment's box the same size as an active one, whose
78
+ * fill variant carries a real border.
79
+ */
80
+ active: {
81
+ true: {};
82
+ false: {
83
+ segment: string;
84
+ };
85
+ };
89
86
  }, {
90
- root: string;
91
- segment: string;
87
+ root: string;
88
+ segment: string;
92
89
  }, undefined, {
93
- /**
94
- * Corner rounding of the track. The segments are rounded one step tighter
95
- * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
96
- * the track's own corner instead of poking out of it. Token names match
97
- * mn-button's; `full` makes a pill, where track and segment share the same
98
- * fully-rounded ends.
99
- */
100
- borderRadius: {
101
- none: {
102
- root: string;
103
- };
104
- xs: {
105
- root: string;
106
- };
107
- sm: {
108
- root: string;
109
- };
110
- md: {
111
- root: string;
112
- };
113
- lg: {
114
- root: string;
115
- };
116
- xl: {
117
- root: string;
118
- };
119
- two_xl: {
120
- root: string;
121
- };
122
- three_xl: {
123
- root: string;
124
- };
125
- four_xl: {
126
- root: string;
127
- };
128
- full: {
129
- root: string;
130
- };
131
- };
132
- /**
133
- * Stretch the track and share its width evenly between the segments.
134
- *
135
- * The segments grow from a zero basis but keep their automatic minimum, so a
136
- * justified control inside an auto-width parent still asks for the room its
137
- * labels need. Letting them shrink below their content (`min-w-0`) made the
138
- * parent resolve to a narrower box and truncated the labels instead.
139
- */
140
- justified: {
141
- true: {
142
- root: string;
143
- segment: string;
144
- };
145
- false: {};
146
- };
147
- /**
148
- * Whether the segment is the picked one. The colours come from the button
149
- * itself (a filled primary button when active, a ghost one otherwise); this
150
- * only keeps an inactive segment's box the same size as an active one, whose
151
- * fill variant carries a real border.
152
- */
153
- active: {
154
- true: {};
155
- false: {
156
- segment: string;
157
- };
90
+ /**
91
+ * Corner rounding of the track. The segments are rounded one step tighter
92
+ * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
93
+ * the track's own corner instead of poking out of it. Token names match
94
+ * mn-button's; `full` makes a pill, where track and segment share the same
95
+ * fully-rounded ends.
96
+ */
97
+ borderRadius: {
98
+ none: {
99
+ root: string;
100
+ };
101
+ xs: {
102
+ root: string;
103
+ };
104
+ sm: {
105
+ root: string;
106
+ };
107
+ md: {
108
+ root: string;
109
+ };
110
+ lg: {
111
+ root: string;
112
+ };
113
+ xl: {
114
+ root: string;
115
+ };
116
+ two_xl: {
117
+ root: string;
118
+ };
119
+ three_xl: {
120
+ root: string;
158
121
  };
122
+ four_xl: {
123
+ root: string;
124
+ };
125
+ full: {
126
+ root: string;
127
+ };
128
+ };
129
+ /**
130
+ * Stretch the track and share its width evenly between the segments.
131
+ *
132
+ * The segments grow from a zero basis but keep their automatic minimum, so a
133
+ * justified control inside an auto-width parent still asks for the room its
134
+ * labels need. Letting them shrink below their content (`min-w-0`) made the
135
+ * parent resolve to a narrower box and truncated the labels instead.
136
+ */
137
+ justified: {
138
+ true: {
139
+ root: string;
140
+ segment: string;
141
+ };
142
+ false: {};
143
+ };
144
+ /**
145
+ * Whether the segment is the picked one. The colours come from the button
146
+ * itself (a filled primary button when active, a ghost one otherwise); this
147
+ * only keeps an inactive segment's box the same size as an active one, whose
148
+ * fill variant carries a real border.
149
+ */
150
+ active: {
151
+ true: {};
152
+ false: {
153
+ segment: string;
154
+ };
155
+ };
159
156
  }, {
160
- root: string;
161
- segment: string;
162
- }, tailwind_variants.TVReturnType<{
163
- /**
164
- * Corner rounding of the track. The segments are rounded one step tighter
165
- * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
166
- * the track's own corner instead of poking out of it. Token names match
167
- * mn-button's; `full` makes a pill, where track and segment share the same
168
- * fully-rounded ends.
169
- */
170
- borderRadius: {
171
- none: {
172
- root: string;
173
- };
174
- xs: {
175
- root: string;
176
- };
177
- sm: {
178
- root: string;
179
- };
180
- md: {
181
- root: string;
182
- };
183
- lg: {
184
- root: string;
185
- };
186
- xl: {
187
- root: string;
188
- };
189
- two_xl: {
190
- root: string;
191
- };
192
- three_xl: {
193
- root: string;
194
- };
195
- four_xl: {
196
- root: string;
197
- };
198
- full: {
199
- root: string;
200
- };
201
- };
202
- /**
203
- * Stretch the track and share its width evenly between the segments.
204
- *
205
- * The segments grow from a zero basis but keep their automatic minimum, so a
206
- * justified control inside an auto-width parent still asks for the room its
207
- * labels need. Letting them shrink below their content (`min-w-0`) made the
208
- * parent resolve to a narrower box and truncated the labels instead.
209
- */
210
- justified: {
211
- true: {
212
- root: string;
213
- segment: string;
214
- };
215
- false: {};
216
- };
217
- /**
218
- * Whether the segment is the picked one. The colours come from the button
219
- * itself (a filled primary button when active, a ghost one otherwise); this
220
- * only keeps an inactive segment's box the same size as an active one, whose
221
- * fill variant carries a real border.
222
- */
223
- active: {
224
- true: {};
225
- false: {
226
- segment: string;
227
- };
157
+ root: string;
158
+ segment: string;
159
+ }, import("tailwind-variants").TVReturnTypeLike<{
160
+ /**
161
+ * Corner rounding of the track. The segments are rounded one step tighter
162
+ * (see `SEGMENT_RADIUS` on the component) so a filled segment nests inside
163
+ * the track's own corner instead of poking out of it. Token names match
164
+ * mn-button's; `full` makes a pill, where track and segment share the same
165
+ * fully-rounded ends.
166
+ */
167
+ borderRadius: {
168
+ none: {
169
+ root: string;
170
+ };
171
+ xs: {
172
+ root: string;
173
+ };
174
+ sm: {
175
+ root: string;
176
+ };
177
+ md: {
178
+ root: string;
179
+ };
180
+ lg: {
181
+ root: string;
182
+ };
183
+ xl: {
184
+ root: string;
228
185
  };
186
+ two_xl: {
187
+ root: string;
188
+ };
189
+ three_xl: {
190
+ root: string;
191
+ };
192
+ four_xl: {
193
+ root: string;
194
+ };
195
+ full: {
196
+ root: string;
197
+ };
198
+ };
199
+ /**
200
+ * Stretch the track and share its width evenly between the segments.
201
+ *
202
+ * The segments grow from a zero basis but keep their automatic minimum, so a
203
+ * justified control inside an auto-width parent still asks for the room its
204
+ * labels need. Letting them shrink below their content (`min-w-0`) made the
205
+ * parent resolve to a narrower box and truncated the labels instead.
206
+ */
207
+ justified: {
208
+ true: {
209
+ root: string;
210
+ segment: string;
211
+ };
212
+ false: {};
213
+ };
214
+ /**
215
+ * Whether the segment is the picked one. The colours come from the button
216
+ * itself (a filled primary button when active, a ghost one otherwise); this
217
+ * only keeps an inactive segment's box the same size as an active one, whose
218
+ * fill variant carries a real border.
219
+ */
220
+ active: {
221
+ true: {};
222
+ false: {
223
+ segment: string;
224
+ };
225
+ };
229
226
  }, {
230
- root: string;
231
- segment: string;
232
- }, undefined, unknown, unknown, undefined>>;
233
- type MnSegmentedVariants = VariantProps<typeof mnSegmentedVariants>;
234
-
227
+ root: string;
228
+ segment: string;
229
+ }>>;
230
+ export type MnSegmentedVariants = VariantProps<typeof mnSegmentedVariants>;
235
231
  /**
236
232
  * One choice in a {@link MnSegmented} control.
237
233
  *
238
234
  * A segment is a label, an icon, or both. Icon-only segments carry no visible
239
235
  * text, so they need an {@link ariaLabel} to stay reachable by name.
240
236
  */
241
- type MnSegmentedItem = {
242
- /** Value emitted when this segment is picked; also identifies the active one. */
243
- value: string;
244
- /** Translation key or literal label. Omit for an icon-only segment. */
245
- label?: string;
246
- /**
247
- * Optional leading icon: a `TemplateRef` (full control over the icon set — an
248
- * `<mn-icon>`, an emoji, a bespoke `<svg>`) or lucide icon *data* such as
249
- * `LucideList.icon`. The same convention the dropdown's actions use; see
250
- * {@link MnActionIcon}.
251
- */
252
- icon?: MnActionIcon;
253
- /**
254
- * Accessible name of the segment. Required when {@link label} is omitted,
255
- * since an icon alone names nothing; ignored otherwise — the label is the name.
256
- */
257
- ariaLabel?: string;
258
- /** Whether this choice cannot be picked. Defaults to false. */
259
- disabled?: boolean;
237
+ export type MnSegmentedItem = {
238
+ /** Value emitted when this segment is picked; also identifies the active one. */
239
+ value: string;
240
+ /** Translation key or literal label. Omit for an icon-only segment. */
241
+ label?: string;
242
+ /**
243
+ * Optional leading icon: a `TemplateRef` (full control over the icon set — an
244
+ * `<mn-icon>`, an emoji, a bespoke `<svg>`) or lucide icon *data* such as
245
+ * `LucideList.icon`. The same convention the dropdown's actions use; see
246
+ * {@link MnActionIcon}.
247
+ */
248
+ icon?: MnActionIcon;
249
+ /**
250
+ * Accessible name of the segment. Required when {@link label} is omitted,
251
+ * since an icon alone names nothing; ignored otherwise — the label is the name.
252
+ */
253
+ ariaLabel?: string;
254
+ /** Whether this choice cannot be picked. Defaults to false. */
255
+ disabled?: boolean;
260
256
  };
261
257
  /**
262
258
  * Data source for {@link MnSegmented}.
@@ -265,24 +261,23 @@ type MnSegmentedItem = {
265
261
  * at a time, and which one is decided by the consumer through
266
262
  * {@link MnSegmented.value} rather than by the control itself.
267
263
  */
268
- type MnSegmentedDataSource = {
269
- /** The choices, in the order they are shown. Two or three read best. */
270
- items: MnSegmentedItem[];
271
- /** Visual scale. Defaults to `'md'`. */
272
- size?: 'sm' | 'md';
273
- /**
274
- * Corner rounding, in mn-button's radius tokens plus `'full'` for a pill.
275
- * Defaults to `'lg'`. The segments follow the track one step tighter, so the
276
- * active segment stays nested inside the track's corner.
277
- */
278
- borderRadius?: MnSegmentedVariants['borderRadius'];
279
- /**
280
- * Translation key or literal naming what the group switches, e.g. "View".
281
- * Without it the group is an unnamed set of buttons to a screen reader.
282
- */
283
- ariaLabel?: string;
264
+ export type MnSegmentedDataSource = {
265
+ /** The choices, in the order they are shown. Two or three read best. */
266
+ items: MnSegmentedItem[];
267
+ /** Visual scale. Defaults to `'md'`. */
268
+ size?: 'sm' | 'md';
269
+ /**
270
+ * Corner rounding, in mn-button's radius tokens plus `'full'` for a pill.
271
+ * Defaults to `'lg'`. The segments follow the track one step tighter, so the
272
+ * active segment stays nested inside the track's corner.
273
+ */
274
+ borderRadius?: MnSegmentedVariants['borderRadius'];
275
+ /**
276
+ * Translation key or literal naming what the group switches, e.g. "View".
277
+ * Without it the group is an unnamed set of buttons to a screen reader.
278
+ */
279
+ ariaLabel?: string;
284
280
  };
285
-
286
281
  /**
287
282
  * A segmented control: two or three mutually exclusive choices sharing one
288
283
  * track, of which exactly one is active — a view switch (list ⇄ calendar), a
@@ -302,94 +297,112 @@ type MnSegmentedDataSource = {
302
297
  * For switching between panes of a page, reach for `mn-tab`; this is for
303
298
  * switching how one pane is rendered.
304
299
  */
305
- declare class MnSegmented {
306
- /** The choices and how the group is labelled and scaled. */
307
- dataSource: MnSegmentedDataSource;
308
- /**
309
- * Value of the active segment. No value (or one naming no segment) leaves the
310
- * control with nothing active, which is what an unresolved selection should
311
- * look like — the component never picks one on the consumer's behalf.
312
- */
313
- value?: string;
314
- /**
315
- * Whether the segments stretch to fill the available width. Defaults to false,
316
- * so the control hugs its content and can be parked at the end of a row; turn
317
- * it on where it should span its container, typically on a narrow screen.
318
- */
319
- justified: boolean;
320
- /** Emits the picked segment's value. The consumer decides what to do with it. */
321
- valueChange: EventEmitter<string>;
322
- /** Resolves this control's own accessible names against the app's bundle. */
323
- private readonly lang;
324
- /** Resolved slot classes for the current rounding and layout. */
325
- get styles(): {
326
- root: (slotProps?: ({
327
- borderRadius?: "lg" | "none" | "xs" | "sm" | "md" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
328
- justified?: boolean | undefined;
329
- active?: boolean | undefined;
330
- } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
331
- segment: (slotProps?: ({
332
- borderRadius?: "lg" | "none" | "xs" | "sm" | "md" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
333
- justified?: boolean | undefined;
334
- active?: boolean | undefined;
335
- } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
336
- } & {
337
- root: (slotProps?: ({
338
- borderRadius?: "lg" | "none" | "xs" | "sm" | "md" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
339
- justified?: boolean | undefined;
340
- active?: boolean | undefined;
341
- } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
342
- segment: (slotProps?: ({
343
- borderRadius?: "lg" | "none" | "xs" | "sm" | "md" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
344
- justified?: boolean | undefined;
345
- active?: boolean | undefined;
346
- } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string;
347
- } & {};
348
- /** Icon edge length matching the control's text size. */
349
- get iconSize(): number;
350
- /** Accessible name of the group, or null when the consumer named nothing. */
351
- get groupLabel(): string | null;
352
- /**
353
- * Whether `item` is the active choice.
354
- * @param item - The segment to test.
355
- */
356
- isActive(item: MnSegmentedItem): boolean;
357
- /**
358
- * Layout classes for one segment — how it sits in the track. Its size, colour,
359
- * radius and disabled look come from the button itself; see
360
- * {@link segmentButton}.
361
- * @param item - The segment to style.
362
- */
363
- segmentClass(item: MnSegmentedItem): string;
364
- /**
365
- * The `mnButton` configuration of one segment: a filled primary button when it
366
- * is the active choice, a ghost button otherwise, at the control's size and one
367
- * radius step inside the track. The active segment has no hover — re-picking it
368
- * does nothing, so nothing should invite the click.
369
- * @param item - The segment to configure.
370
- */
371
- segmentButton(item: MnSegmentedItem): Partial<MnButtonTypes>;
372
- /**
373
- * Accessible name for an icon-only segment, or null when the segment shows a
374
- * label — that label already names it, and a second name would only compete.
375
- * @param item - The segment to name.
376
- */
377
- segmentLabel(item: MnSegmentedItem): string | null;
378
- /**
379
- * Whether an icon was supplied as a `TemplateRef` rather than lucide icon data.
380
- * @param value - The icon to test.
381
- */
382
- isTemplateRef(value: unknown): value is TemplateRef<unknown>;
383
- /**
384
- * Announces a click. Re-picking the active segment is silent: it is not a
385
- * change, and a consumer that reloads on every emission would refetch for
386
- * nothing.
387
- * @param item - The segment that was clicked.
388
- */
389
- select(item: MnSegmentedItem): void;
390
- static ɵfac: i0.ɵɵFactoryDeclaration<MnSegmented, never>;
391
- 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>;
392
- }
393
-
394
- export { MnSegmented, mnSegmentedVariants };
395
- export type { MnSegmentedDataSource, MnSegmentedItem, MnSegmentedVariants };
300
+ export declare class MnSegmented {
301
+ /** The choices and how the group is labelled and scaled. */
302
+ dataSource: MnSegmentedDataSource;
303
+ /**
304
+ * Value of the active segment. No value (or one naming no segment) leaves the
305
+ * control with nothing active, which is what an unresolved selection should
306
+ * look like — the component never picks one on the consumer's behalf.
307
+ */
308
+ value?: string;
309
+ /**
310
+ * Whether the segments stretch to fill the available width. Defaults to false,
311
+ * so the control hugs its content and can be parked at the end of a row; turn
312
+ * it on where it should span its container, typically on a narrow screen.
313
+ */
314
+ justified: boolean;
315
+ /** Emits the picked segment's value. The consumer decides what to do with it. */
316
+ valueChange: EventEmitter<string>;
317
+ /** Resolves this control's own accessible names against the app's bundle. */
318
+ private readonly lang;
319
+ /** Resolved slot classes for the current rounding and layout. */
320
+ get styles(): {
321
+ root: (slotProps?: ({
322
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
323
+ justified?: boolean | undefined;
324
+ active?: boolean | undefined;
325
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
326
+ segment: (slotProps?: ({
327
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
328
+ justified?: boolean | undefined;
329
+ active?: boolean | undefined;
330
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
331
+ } & {
332
+ root: (slotProps?: ({
333
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
334
+ justified?: boolean | undefined;
335
+ active?: boolean | undefined;
336
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
337
+ segment: (slotProps?: ({
338
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
339
+ justified?: boolean | undefined;
340
+ active?: boolean | undefined;
341
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
342
+ } & {
343
+ base: (slotProps?: ({
344
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "two_xl" | "three_xl" | "four_xl" | "full" | undefined;
345
+ justified?: boolean | undefined;
346
+ active?: boolean | undefined;
347
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
348
+ };
349
+ /** Icon edge length matching the control's text size. */
350
+ get iconSize(): number;
351
+ /** Accessible name of the group, or null when the consumer named nothing. */
352
+ get groupLabel(): string | null;
353
+ /**
354
+ * Whether `item` is the active choice.
355
+ * @param item - The segment to test.
356
+ */
357
+ isActive(item: MnSegmentedItem): boolean;
358
+ /**
359
+ * Layout classes for one segment — how it sits in the track. Its size, colour,
360
+ * radius and disabled look come from the button itself; see
361
+ * {@link segmentButton}.
362
+ * @param item - The segment to style.
363
+ */
364
+ segmentClass(item: MnSegmentedItem): string;
365
+ /**
366
+ * The `mnButton` configuration of one segment: a filled primary button when it
367
+ * is the active choice, a ghost button otherwise, at the control's size and one
368
+ * radius step inside the track. The active segment has no hover — re-picking it
369
+ * does nothing, so nothing should invite the click.
370
+ * @param item - The segment to configure.
371
+ */
372
+ segmentButton(item: MnSegmentedItem): Partial<MnButtonTypes>;
373
+ /**
374
+ * Accessible name for an icon-only segment, or null when the segment shows a
375
+ * label — that label already names it, and a second name would only compete.
376
+ * @param item - The segment to name.
377
+ */
378
+ segmentLabel(item: MnSegmentedItem): string | null;
379
+ /**
380
+ * Whether an icon was supplied as a `TemplateRef` rather than lucide icon data.
381
+ * @param value - The icon to test.
382
+ */
383
+ isTemplateRef(value: unknown): value is TemplateRef<unknown>;
384
+ /**
385
+ * Announces a click. Re-picking the active segment is silent: it is not a
386
+ * change, and a consumer that reloads on every emission would refetch for
387
+ * nothing.
388
+ * @param item - The segment that was clicked.
389
+ */
390
+ select(item: MnSegmentedItem): void;
391
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnSegmented, never>;
392
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnSegmented, "mn-segmented", never, {
393
+ "dataSource": {
394
+ "alias": "dataSource";
395
+ "required": true;
396
+ };
397
+ "value": {
398
+ "alias": "value";
399
+ "required": false;
400
+ };
401
+ "justified": {
402
+ "alias": "justified";
403
+ "required": false;
404
+ };
405
+ }, {
406
+ "valueChange": "valueChange";
407
+ }, never, never, true, never>;
408
+ }