@uni-design-system/uni-angular 7.2.0 → 8.0.0
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, WritableSignal, InjectionToken, ElementRef, TemplateRef, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
3
3
|
import * as _uni_design_system_uni_core from '@uni-design-system/uni-core';
|
|
4
|
-
import { IconName, Variant, ContainerColorToken, PaletteConfig, GenerateColorsConfig, Radii, UniTheme, ComponentName, ComponentTheme, NullableSize, ThemeName, TextRole, ContentColorToken, Size, Thickness, NullableStyleExpression, ColorKey, ColorToken, Typeface, Radius, OptionalSize, Border, Shadow, ZIndexableElements, Elevation, RadiiSize, TextColor, JustifyContent, StyleExpression, Orientation, CssLength, OptionalAlignSelf, OptionalAlignItems, OptionalAlignContent, OptionalJustifyContent, OptionalDisplay, OptionalPosition, OptionalOverflow, OptionalFlexDirection, OptionalTextAlign, OptionalWrap, ColorScheme, ColorCategory, ThemeShape, ContrastCheck, Colors, GenerationInput } from '@uni-design-system/uni-core';
|
|
4
|
+
import { IconName, Variant, ContainerColorToken, PaletteConfig, GenerateColorsConfig, Radii, UniTheme, ComponentName, ComponentTheme, NullableSize, ThemeName, ThemeParseResult, TextRole, ContentColorToken, Size, Thickness, NullableStyleExpression, ColorKey, ColorToken, Typeface, Radius, OptionalSize, Border, Shadow, ZIndexableElements, Elevation, RadiiSize, TextColor, JustifyContent, StyleExpression, Orientation, CssLength, OptionalAlignSelf, OptionalAlignItems, OptionalAlignContent, OptionalJustifyContent, OptionalDisplay, OptionalPosition, OptionalOverflow, OptionalFlexDirection, OptionalTextAlign, OptionalWrap, TagTone, ColorScheme, ColorCategory, ThemeShape, ContrastCheck, Colors, GenerationInput } from '@uni-design-system/uni-core';
|
|
5
5
|
import { FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
6
|
+
import * as _uni_design_system_uni_angular from '@uni-design-system/uni-angular';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Returns a document-unique id for wiring ARIA relationships
|
|
@@ -43,6 +44,64 @@ declare function motionSafe<T extends object>(styles: T): {
|
|
|
43
44
|
'@media (prefers-reduced-motion: no-preference)': T;
|
|
44
45
|
};
|
|
45
46
|
|
|
47
|
+
interface ListboxNavigationConfig {
|
|
48
|
+
/** How many options are currently navigable. Read reactively. */
|
|
49
|
+
count: () => number;
|
|
50
|
+
/** Id prefix for the listbox and its options. */
|
|
51
|
+
idPrefix?: string;
|
|
52
|
+
/** Wrap past the ends. Default true. */
|
|
53
|
+
wrap?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The keyboard and ARIA bookkeeping shared by every combobox-style popup:
|
|
57
|
+
* open state, the active option index, and the `aria-activedescendant` id
|
|
58
|
+
* wiring. Deliberately owns no markup and no filtering — each control renders
|
|
59
|
+
* its own options and decides what a suggestion *is*.
|
|
60
|
+
*
|
|
61
|
+
* Extracted because three controls need the identical contract
|
|
62
|
+
* (`uni-search-input`, `uni-tag-input`, and the multi-select upgrade), and the
|
|
63
|
+
* parts that silently drift between hand-rolled copies all live here: the
|
|
64
|
+
* wrap-around arithmetic, Home/End, and keeping the active id in sync with the
|
|
65
|
+
* option list.
|
|
66
|
+
*
|
|
67
|
+
* `Enter` and `Escape` are deliberately *not* handled: what they mean depends
|
|
68
|
+
* on the control (submit a search, commit a typed token, clear the field), and
|
|
69
|
+
* `activeIndex()` is all a caller needs to decide.
|
|
70
|
+
*/
|
|
71
|
+
declare class ListboxNavigation {
|
|
72
|
+
private readonly config;
|
|
73
|
+
/** Id for the `role="listbox"` element; wire as `aria-controls`. */
|
|
74
|
+
readonly listboxId: string;
|
|
75
|
+
private readonly _open;
|
|
76
|
+
private readonly _activeIndex;
|
|
77
|
+
private readonly wrap;
|
|
78
|
+
/** Whether the popup is showing. Also false when there is nothing to show. */
|
|
79
|
+
readonly open: Signal<boolean>;
|
|
80
|
+
/** Index of the highlighted option, or -1 when none is active. */
|
|
81
|
+
readonly activeIndex: Signal<number>;
|
|
82
|
+
/** Value for `aria-activedescendant`, or null when nothing is active. */
|
|
83
|
+
readonly activeDescendantId: Signal<string | null>;
|
|
84
|
+
constructor(config: ListboxNavigationConfig);
|
|
85
|
+
/** Stable per-option id, for `role="option"` elements. */
|
|
86
|
+
optionId(index: number): string;
|
|
87
|
+
show(): void;
|
|
88
|
+
/** Close and drop the active option, so reopening starts clean. */
|
|
89
|
+
hide(): void;
|
|
90
|
+
setActive(index: number): void;
|
|
91
|
+
/**
|
|
92
|
+
* Handle ArrowDown / ArrowUp / Home / End, opening the popup if needed.
|
|
93
|
+
* Returns true when the key was consumed, so a caller can fall through to
|
|
94
|
+
* its own handling for everything else.
|
|
95
|
+
*/
|
|
96
|
+
navigate(event: KeyboardEvent): boolean;
|
|
97
|
+
private nextIndex;
|
|
98
|
+
private step;
|
|
99
|
+
/** Close when focus leaves the control entirely (not on internal moves). */
|
|
100
|
+
closeOnFocusOut(event: FocusEvent): void;
|
|
101
|
+
}
|
|
102
|
+
/** Factory mirroring the signal-API style used elsewhere in the CDK. */
|
|
103
|
+
declare const createListboxNavigation: (config: ListboxNavigationConfig) => ListboxNavigation;
|
|
104
|
+
|
|
46
105
|
/**
|
|
47
106
|
* Native CSS Anchor Positioning helpers (Baseline 2026). These replace the
|
|
48
107
|
* former @floating-ui/dom dependency: the browser tracks the anchor natively
|
|
@@ -270,10 +329,19 @@ declare class ThemeService {
|
|
|
270
329
|
static readonly CUSTOM_KEY = "CustomTheme";
|
|
271
330
|
/** localStorage key holding the serialized brand palette config. */
|
|
272
331
|
static readonly PALETTE_KEY = "uni-custom-palette";
|
|
273
|
-
private themes;
|
|
274
332
|
private localStorage;
|
|
275
|
-
|
|
276
|
-
|
|
333
|
+
/**
|
|
334
|
+
* The live theme registry: the injected {@link UNI_THEMES} map (validated
|
|
335
|
+
* at construction) plus anything added via {@link registerTheme} — including
|
|
336
|
+
* the custom brand theme, which registers under {@link CUSTOM_KEY} so it is
|
|
337
|
+
* an ordinary, selectable entry.
|
|
338
|
+
*/
|
|
339
|
+
private readonly registry;
|
|
340
|
+
private readonly _theme;
|
|
341
|
+
/** The active theme. Write via {@link setTheme}/{@link selectTheme} — every write is validated. */
|
|
342
|
+
readonly theme: Signal<UniTheme>;
|
|
343
|
+
/** Selectable themes, derived from the registry — reactive to registration. */
|
|
344
|
+
readonly themeOptions: Signal<Options<string>>;
|
|
277
345
|
components: Signal<Partial<Record<ComponentName, ComponentTheme<object>>>>;
|
|
278
346
|
component: <T>(componentName: ComponentName) => Signal<ComponentTheme<T>>;
|
|
279
347
|
colors: Signal<Partial<Record<string, string>>>;
|
|
@@ -285,7 +353,37 @@ declare class ThemeService {
|
|
|
285
353
|
shadows: Signal<Partial<Record<string, string>>>;
|
|
286
354
|
icons: Signal<_uni_design_system_uni_core.Icons>;
|
|
287
355
|
constructor();
|
|
288
|
-
|
|
356
|
+
/**
|
|
357
|
+
* Activate a registered theme. Returns false — touching nothing, persisting
|
|
358
|
+
* nothing — when the name is unknown (previously this silently kept the old
|
|
359
|
+
* theme while still recording the bad key).
|
|
360
|
+
*/
|
|
361
|
+
selectTheme(themeName: ThemeName): boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Validate and activate a theme without registering it. The result carries
|
|
364
|
+
* acceptance or the complete list of rejection reasons; on rejection the
|
|
365
|
+
* active theme is unchanged.
|
|
366
|
+
*/
|
|
367
|
+
setTheme(input: unknown): ThemeParseResult;
|
|
368
|
+
/**
|
|
369
|
+
* Validate and add a theme to the registry (keyed by its `id`), making it
|
|
370
|
+
* selectable and listed in {@link themeOptions}. On rejection the registry
|
|
371
|
+
* is unchanged and the result lists every reason.
|
|
372
|
+
*/
|
|
373
|
+
registerTheme(input: unknown, opts?: {
|
|
374
|
+
select?: boolean;
|
|
375
|
+
}): ThemeParseResult;
|
|
376
|
+
/**
|
|
377
|
+
* The gate every externally-supplied theme passes: validate, then restore
|
|
378
|
+
* any built-in icons the payload left out. Themes that travel as JSON (the
|
|
379
|
+
* MCP theme tools, a theme registry) omit the built-in icon set — it is
|
|
380
|
+
* ~71% of the bytes and every consumer already ships it — so hydration
|
|
381
|
+
* applies the same `{...BaseIcons, ...icons}` contract `createTheme` uses:
|
|
382
|
+
* the theme's own icons win, built-ins fill the rest.
|
|
383
|
+
*/
|
|
384
|
+
private accept;
|
|
385
|
+
/** Remove a registered theme; falls back to the first remaining theme if it was active. */
|
|
386
|
+
unregisterTheme(id: string): void;
|
|
289
387
|
/** The live brand palette config, when a custom theme is active. */
|
|
290
388
|
customPalette: _angular_core.WritableSignal<BrandPaletteConfig>;
|
|
291
389
|
isCustomTheme: Signal<boolean>;
|
|
@@ -295,7 +393,7 @@ declare class ThemeService {
|
|
|
295
393
|
* reload) renders with the same brand.
|
|
296
394
|
*/
|
|
297
395
|
applyPalette(config: BrandPaletteConfig, persist?: boolean): void;
|
|
298
|
-
/** Drop the custom brand theme and fall back to the first
|
|
396
|
+
/** Drop the custom brand theme and fall back to the first registered theme. */
|
|
299
397
|
clearCustomPalette(): void;
|
|
300
398
|
selectedThemeName: Signal<string>;
|
|
301
399
|
selectedThemeKey: _angular_core.WritableSignal<string>;
|
|
@@ -977,6 +1075,10 @@ declare class UniDropdownComponent extends BaseComponent<UniDropdownOptions> imp
|
|
|
977
1075
|
readonly popoverId: string;
|
|
978
1076
|
paddingVertical: _angular_core.InputSignal<NullableSize>;
|
|
979
1077
|
paddingHorizontal: _angular_core.InputSignal<NullableSize>;
|
|
1078
|
+
border: _angular_core.InputSignal<string>;
|
|
1079
|
+
borderRadius: _angular_core.InputSignal<string>;
|
|
1080
|
+
shadow: _angular_core.InputSignal<string>;
|
|
1081
|
+
color: _angular_core.InputSignal<ContainerColorToken>;
|
|
980
1082
|
dropdownShowing: _angular_core.OutputEmitterRef<boolean>;
|
|
981
1083
|
dropdownHiding: _angular_core.OutputEmitterRef<boolean>;
|
|
982
1084
|
dropdownRef: ElementRef<HTMLDivElement>;
|
|
@@ -997,11 +1099,32 @@ declare class UniDropdownComponent extends BaseComponent<UniDropdownOptions> imp
|
|
|
997
1099
|
hideDropdown(): void;
|
|
998
1100
|
ngOnDestroy(): void;
|
|
999
1101
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniDropdownComponent, never>;
|
|
1000
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDropdownComponent, "uni-dropdown", never, { "trigger": { "alias": "trigger"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "paddingVertical": { "alias": "paddingVertical"; "required": false; "isSignal": true; }; "paddingHorizontal": { "alias": "paddingHorizontal"; "required": false; "isSignal": true; }; }, { "dropdownShowing": "dropdownShowing"; "dropdownHiding": "dropdownHiding"; }, never, ["*"], true, never>;
|
|
1102
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDropdownComponent, "uni-dropdown", never, { "trigger": { "alias": "trigger"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "paddingVertical": { "alias": "paddingVertical"; "required": false; "isSignal": true; }; "paddingHorizontal": { "alias": "paddingHorizontal"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "dropdownShowing": "dropdownShowing"; "dropdownHiding": "dropdownHiding"; }, never, ["*"], true, never>;
|
|
1001
1103
|
}
|
|
1002
1104
|
|
|
1003
|
-
|
|
1105
|
+
/** Theme-level options for `uni-expand`. */
|
|
1106
|
+
interface UniExpandOptions {
|
|
1107
|
+
/**
|
|
1108
|
+
* Base reveal/collapse duration in seconds (matching alert/card
|
|
1109
|
+
* `transitionSpeed`), lives in the `expand` theme options. The default
|
|
1110
|
+
* theme uses `0.35`. This is the duration at a 240px-tall region; the
|
|
1111
|
+
* actual duration scales with content height (√-of-height, clamped —
|
|
1112
|
+
* `expandDuration` in uni-core) so short regions stay snappy and tall
|
|
1113
|
+
* ones aren't rushed. Also drives `uni-expand-toggle`'s chevron rotation
|
|
1114
|
+
* so trigger and region move on the same clock.
|
|
1115
|
+
*/
|
|
1116
|
+
transitionSpeed?: number;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
declare class UniExpandComponent extends BaseComponent<UniExpandOptions> {
|
|
1004
1120
|
collapsed: _angular_core.ModelSignal<boolean>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Exact per-instance duration in seconds. Bypasses size-aware scaling —
|
|
1123
|
+
* an explicit number means the consumer wants that number. Omitted, the
|
|
1124
|
+
* duration derives from the `expand` theme options' `transitionSpeed`
|
|
1125
|
+
* scaled by content height (see `duration`).
|
|
1126
|
+
*/
|
|
1127
|
+
transitionSpeed: _angular_core.InputSignal<number>;
|
|
1005
1128
|
/** Referenced by the controlling toggle's aria-controls. */
|
|
1006
1129
|
readonly regionId: string;
|
|
1007
1130
|
/**
|
|
@@ -1010,8 +1133,29 @@ declare class UniExpandComponent {
|
|
|
1010
1133
|
* animations only after the first render, i.e. on real state changes.
|
|
1011
1134
|
*/
|
|
1012
1135
|
protected readonly ready: _angular_core.WritableSignal<boolean>;
|
|
1136
|
+
private readonly contentRef;
|
|
1137
|
+
/**
|
|
1138
|
+
* Last observed content height. Retained after collapse (the observer
|
|
1139
|
+
* disconnects but the signal keeps its value) so the leave animation and
|
|
1140
|
+
* the next reveal are timed to the real size. Until the first measurement
|
|
1141
|
+
* lands — one frame into the very first reveal — the duration falls back
|
|
1142
|
+
* to the unscaled token; CSS remaps animation progress when
|
|
1143
|
+
* `animation-duration` updates, so the retime is imperceptible that early.
|
|
1144
|
+
*/
|
|
1145
|
+
private readonly contentHeight;
|
|
1013
1146
|
constructor();
|
|
1014
1147
|
toggle(): void;
|
|
1148
|
+
/**
|
|
1149
|
+
* The resolved duration in seconds: the `transitionSpeed` input verbatim,
|
|
1150
|
+
* or the `expand` theme options' `transitionSpeed` scaled by content height
|
|
1151
|
+
* (`expandDuration` — √-of-height, clamped) so short regions stay snappy
|
|
1152
|
+
* and tall ones aren't rushed. The public sync hook: Expand Area binds this
|
|
1153
|
+
* to its toggle so the chevron rotates on the region's clock, and consumers
|
|
1154
|
+
* can bind adjacent styling the same way
|
|
1155
|
+
* (`[style.transition-duration]="expand.duration() + 's'"`).
|
|
1156
|
+
*/
|
|
1157
|
+
readonly duration: _angular_core.Signal<number>;
|
|
1158
|
+
protected readonly cssDuration: _angular_core.Signal<string>;
|
|
1015
1159
|
/**
|
|
1016
1160
|
* A custom element is `display: inline` by default, which would lay the
|
|
1017
1161
|
* animated grid out as a block-in-inline box and distort the revealed
|
|
@@ -1031,11 +1175,16 @@ declare class UniExpandComponent {
|
|
|
1031
1175
|
* decorations that legitimately paint outside the region (focus rings,
|
|
1032
1176
|
* offset outlines). Angular removes a leaving node on the next frame when it
|
|
1033
1177
|
* detects no animation, so nothing hangs when the guard strips them.
|
|
1178
|
+
*
|
|
1179
|
+
* The classes carry the default duration; the animated div's
|
|
1180
|
+
* `[style.animation-duration]` binding overrides it with the resolved
|
|
1181
|
+
* `duration`, so the classes stay static while timing tracks the theme and
|
|
1182
|
+
* the content's size through signals alone.
|
|
1034
1183
|
*/
|
|
1035
1184
|
expandAnimation: string;
|
|
1036
1185
|
collapseAnimation: string;
|
|
1037
1186
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniExpandComponent, never>;
|
|
1038
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandComponent, "uni-expand", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["*"], true, never>;
|
|
1187
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandComponent, "uni-expand", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "transitionSpeed": { "alias": "transitionSpeed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["*"], true, never>;
|
|
1039
1188
|
}
|
|
1040
1189
|
|
|
1041
1190
|
/**
|
|
@@ -1056,13 +1205,19 @@ declare class UniExpandToggleComponent {
|
|
|
1056
1205
|
label: _angular_core.InputSignal<string>;
|
|
1057
1206
|
/** Muted qualifier beside the label ("for POs & custom orders"). Needs `label`. */
|
|
1058
1207
|
sublabel: _angular_core.InputSignal<string>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Rotation duration in seconds. Expand Area binds the region's resolved
|
|
1210
|
+
* `duration` here so chevron and reveal share one clock even when the
|
|
1211
|
+
* region is size-scaled or overridden per instance.
|
|
1212
|
+
*/
|
|
1213
|
+
transitionSpeed: _angular_core.InputSignal<number>;
|
|
1214
|
+
/** Fallback clock when no `transitionSpeed` is bound: the `expand` theme options' `transitionSpeed`. */
|
|
1215
|
+
private readonly expandOptions;
|
|
1216
|
+
private readonly speed;
|
|
1059
1217
|
/**
|
|
1060
1218
|
* The glyph rotates, never the host.
|
|
1061
1219
|
*
|
|
1062
|
-
* The host is
|
|
1063
|
-
* `anchor-name` on its own element, nested inside ours — so rotating the
|
|
1064
|
-
* host swings the anchor through the turn and the bubble visibly bobs. The
|
|
1065
|
-
* host is also taller than the glyph (an inline-level box reserves baseline
|
|
1220
|
+
* The host is taller than the glyph (an inline-level box reserves baseline
|
|
1066
1221
|
* descender space), so spinning it about its own centre walks the glyph
|
|
1067
1222
|
* off-centre. `uni-icon` is a centred square sized to the glyph, which makes
|
|
1068
1223
|
* it the only box here that rotates symmetrically. It also keeps a label
|
|
@@ -1074,7 +1229,7 @@ declare class UniExpandToggleComponent {
|
|
|
1074
1229
|
protected readonly labelClassName: string;
|
|
1075
1230
|
toggle(): void;
|
|
1076
1231
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniExpandToggleComponent, never>;
|
|
1077
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandToggleComponent, "uni-expand-toggle", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "sublabel": { "alias": "sublabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, never, true, never>;
|
|
1232
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandToggleComponent, "uni-expand-toggle", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "sublabel": { "alias": "sublabel"; "required": false; "isSignal": true; }; "transitionSpeed": { "alias": "transitionSpeed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, never, true, never>;
|
|
1078
1233
|
}
|
|
1079
1234
|
|
|
1080
1235
|
declare class UniExpandAreaComponent {
|
|
@@ -1419,25 +1574,76 @@ declare class UniWrapComponent extends UniBoxComponent {
|
|
|
1419
1574
|
interface BaseMenuItem {
|
|
1420
1575
|
symbolName?: string;
|
|
1421
1576
|
action?: () => void;
|
|
1577
|
+
/** Tone routed through the theme's `menuItem.variants` (e.g. 'warn' for destructive actions). */
|
|
1578
|
+
variant?: Variant;
|
|
1579
|
+
disabled?: boolean;
|
|
1422
1580
|
}
|
|
1423
1581
|
interface MenuItemWithLabel extends BaseMenuItem {
|
|
1424
1582
|
label: string;
|
|
1425
1583
|
template?: never;
|
|
1426
1584
|
context?: never;
|
|
1585
|
+
divider?: never;
|
|
1427
1586
|
}
|
|
1428
1587
|
interface MenuItemWithTemplate<T = any> extends BaseMenuItem {
|
|
1429
1588
|
label?: never;
|
|
1430
1589
|
template: TemplateRef<T>;
|
|
1431
1590
|
context: T;
|
|
1591
|
+
divider?: never;
|
|
1592
|
+
}
|
|
1593
|
+
/** A non-interactive separator between item groups; styled by the theme's `menu` options. */
|
|
1594
|
+
interface MenuDivider {
|
|
1595
|
+
divider: true;
|
|
1596
|
+
}
|
|
1597
|
+
type MenuItem<T = any> = MenuDivider | MenuItemWithLabel | MenuItemWithTemplate<T>;
|
|
1598
|
+
declare const isDivider: (item: MenuItem) => item is MenuDivider;
|
|
1599
|
+
/** Theme options for the `menuItem` component entry. */
|
|
1600
|
+
interface UniMenuItemOptions {
|
|
1601
|
+
height?: number;
|
|
1602
|
+
paddingHorizontal?: NullableSize;
|
|
1603
|
+
gap?: NullableSize;
|
|
1604
|
+
borderRadius?: Radius;
|
|
1605
|
+
typeface?: Typeface;
|
|
1606
|
+
/** Resting text color; undefined inherits the panel's on-color. */
|
|
1607
|
+
textColor?: ColorKey;
|
|
1608
|
+
hoverColor?: ContainerColorToken;
|
|
1609
|
+
/** Trailing symbol marking the active item; undefined/'' renders none. */
|
|
1610
|
+
activeSymbol?: string;
|
|
1611
|
+
/** Hover/focus transition in seconds; 0 switches instantly. */
|
|
1612
|
+
transitionSpeed?: number;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Theme options for the `menu` component entry. The panel-chrome fields
|
|
1617
|
+
* (color/border/borderRadius/shadow) fall back to the theme's `dropdown`
|
|
1618
|
+
* options when undefined, so menus follow generic popovers until a theme
|
|
1619
|
+
* deliberately splits them.
|
|
1620
|
+
*/
|
|
1621
|
+
interface UniMenuOptions {
|
|
1622
|
+
/** Panel minimum width in px; undefined sizes to the widest item. */
|
|
1623
|
+
minWidth?: number;
|
|
1624
|
+
color?: ContainerColorToken;
|
|
1625
|
+
border?: Border;
|
|
1626
|
+
borderRadius?: Radius;
|
|
1627
|
+
shadow?: Shadow;
|
|
1628
|
+
paddingVertical?: NullableSize;
|
|
1629
|
+
paddingHorizontal?: NullableSize;
|
|
1630
|
+
dividerBorder?: Border;
|
|
1631
|
+
/** Vertical margin and horizontal inset applied to dividers. */
|
|
1632
|
+
dividerSpacing?: NullableSize;
|
|
1432
1633
|
}
|
|
1433
|
-
type MenuItem<T = any> = MenuItemWithLabel | MenuItemWithTemplate<T>;
|
|
1434
1634
|
|
|
1435
1635
|
declare class UniMenuComponent {
|
|
1636
|
+
private theme;
|
|
1436
1637
|
menuItems: _angular_core.InputSignal<MenuItem[]>;
|
|
1437
1638
|
activeItem: _angular_core.InputSignal<MenuItem>;
|
|
1438
1639
|
placement: _angular_core.InputSignal<Placement>;
|
|
1439
1640
|
menuItemClicked: _angular_core.OutputEmitterRef<MenuItem>;
|
|
1440
1641
|
TriggerClassName: string;
|
|
1642
|
+
/** Type guard for the template: dividers render as separators, not items. */
|
|
1643
|
+
protected readonly isDivider: (item: MenuItem) => item is _uni_design_system_uni_angular.MenuDivider;
|
|
1644
|
+
protected readonly menuOptions: _angular_core.Signal<UniMenuOptions>;
|
|
1645
|
+
protected readonly menuClassName: _angular_core.Signal<string>;
|
|
1646
|
+
protected readonly dividerClassName: _angular_core.Signal<string>;
|
|
1441
1647
|
private itemComponents;
|
|
1442
1648
|
private dropdownComponent;
|
|
1443
1649
|
/** Which item receives focus when the menu opens (ArrowUp opens onto the last item). */
|
|
@@ -1499,20 +1705,49 @@ declare class UniMultiSelectDropdownComponent<T = unknown> extends BaseComponent
|
|
|
1499
1705
|
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
1500
1706
|
readonly options: _angular_core.InputSignal<Options<T>>;
|
|
1501
1707
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1708
|
+
/**
|
|
1709
|
+
* What the field is for, e.g. "Fruits". Rendered visually hidden inside the
|
|
1710
|
+
* trigger so its accessible name reads "Fruits, Apple, Pear" — without it a
|
|
1711
|
+
* screen reader announces only the current selection, with no clue which
|
|
1712
|
+
* field it belongs to.
|
|
1713
|
+
*/
|
|
1714
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1715
|
+
/** Debounce for the filter box, matching the library's input debounce. */
|
|
1716
|
+
readonly debounceTime: _angular_core.InputSignal<number>;
|
|
1717
|
+
protected readonly srOnly: string;
|
|
1502
1718
|
protected readonly query: _angular_core.WritableSignal<string>;
|
|
1719
|
+
private queryTimer?;
|
|
1503
1720
|
protected readonly filteredOptions: _angular_core.Signal<Options<T>>;
|
|
1721
|
+
private readonly optionRefs;
|
|
1722
|
+
/**
|
|
1723
|
+
* Roving focus over the options. The shared helper owns the index
|
|
1724
|
+
* arithmetic — wrapping, Home/End, and never pointing past a list the
|
|
1725
|
+
* filter has narrowed — the same contract `uni-search-input` and
|
|
1726
|
+
* `uni-tag-input` use, so the keys behave identically across all three.
|
|
1727
|
+
*/
|
|
1728
|
+
protected readonly list: _uni_design_system_uni_angular.ListboxNavigation;
|
|
1729
|
+
/** Announced with the selection so the count is not left to guesswork. */
|
|
1730
|
+
readonly selectionSummary: _angular_core.Signal<string>;
|
|
1504
1731
|
readonly selectedLabelsText: _angular_core.Signal<string>;
|
|
1505
1732
|
protected readonly showError: _angular_core.Signal<boolean>;
|
|
1506
1733
|
protected readonly textColor: _angular_core.Signal<_uni_design_system_uni_core.TextColor>;
|
|
1507
1734
|
triggerClass: string;
|
|
1508
1735
|
protected readonly searchInputClass: _angular_core.Signal<string>;
|
|
1509
1736
|
protected handleQueryInput(event: Event): void;
|
|
1737
|
+
/**
|
|
1738
|
+
* Arrow keys walk the options from anywhere in the panel, including the
|
|
1739
|
+
* filter box — previously the only way in was to Tab through every
|
|
1740
|
+
* checkbox.
|
|
1741
|
+
*/
|
|
1742
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
1743
|
+
/** Keeps the active index in step when focus lands on a row by pointer. */
|
|
1744
|
+
protected onOptionFocus(index: number): void;
|
|
1510
1745
|
selectAll(): void;
|
|
1511
1746
|
deselectAll(): void;
|
|
1512
1747
|
protected isOptionSelected(option: Option<T>): _angular_core.Signal<boolean>;
|
|
1513
1748
|
toggleOption(option: Option<T>, checked: boolean): void;
|
|
1514
1749
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniMultiSelectDropdownComponent<any>, never>;
|
|
1515
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniMultiSelectDropdownComponent<any>, "uni-multi-select-dropdown", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; }, never, never, true, never>;
|
|
1750
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniMultiSelectDropdownComponent<any>, "uni-multi-select-dropdown", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; }, never, never, true, never>;
|
|
1516
1751
|
}
|
|
1517
1752
|
|
|
1518
1753
|
interface UniNotificationBadgeOptions {
|
|
@@ -1853,12 +2088,10 @@ declare class UniSearchInputComponent extends BaseComponent<UniSearchInputOption
|
|
|
1853
2088
|
search: _angular_core.OutputEmitterRef<string>;
|
|
1854
2089
|
suggestionSelected: _angular_core.OutputEmitterRef<string>;
|
|
1855
2090
|
protected readonly field: _angular_core.Signal<UniDebounceInputComponent>;
|
|
1856
|
-
readonly listboxId: string;
|
|
1857
|
-
protected readonly listOpen: _angular_core.WritableSignal<boolean>;
|
|
1858
|
-
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
1859
2091
|
protected readonly visibleSuggestions: _angular_core.Signal<string[]>;
|
|
1860
|
-
|
|
1861
|
-
protected readonly
|
|
2092
|
+
/** Shared combobox bookkeeping: open state, active option, ARIA ids. */
|
|
2093
|
+
protected readonly list: _uni_design_system_uni_angular.ListboxNavigation;
|
|
2094
|
+
readonly listboxId: string;
|
|
1862
2095
|
protected readonly hasQuery: _angular_core.Signal<boolean>;
|
|
1863
2096
|
protected handleChange(value: string): void;
|
|
1864
2097
|
protected submit(): void;
|
|
@@ -2189,13 +2422,217 @@ declare class UniSymbolComponent extends BaseComponent<SymbolOptions> {
|
|
|
2189
2422
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniSymbolComponent, "uni-symbol", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "weight": { "alias": "weight"; "required": false; "isSignal": true; }; "grade": { "alias": "grade"; "required": false; "isSignal": true; }; "opticalSize": { "alias": "opticalSize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2190
2423
|
}
|
|
2191
2424
|
|
|
2192
|
-
|
|
2425
|
+
/** Theme options for the `tag` component entry. */
|
|
2426
|
+
interface UniTagOptions {
|
|
2427
|
+
borderRadius?: Radius;
|
|
2428
|
+
typeface?: Typeface;
|
|
2429
|
+
/** Space between the lead element, label and remove button. */
|
|
2430
|
+
gap?: NullableSize;
|
|
2431
|
+
/** Icon primitive for the remove affordance. */
|
|
2432
|
+
removeIcon?: IconName;
|
|
2433
|
+
/** Icon primitive shown in the lead slot when the chip is selected. */
|
|
2434
|
+
selectedIcon?: IconName;
|
|
2435
|
+
}
|
|
2436
|
+
/** The value a tag echoes back on `removed` / `activated`. */
|
|
2437
|
+
type UniTagValue = string | number | undefined;
|
|
2438
|
+
|
|
2439
|
+
/**
|
|
2440
|
+
* Compact chip for categories, states, filters and tokens.
|
|
2441
|
+
*
|
|
2442
|
+
* Two orthogonal style axes: `variant` picks the colour role and `tone` picks
|
|
2443
|
+
* the archetype (soft / solid / outline). Both live in the theme's `tag` entry,
|
|
2444
|
+
* so a theme restyles every chip in the app without touching markup.
|
|
2445
|
+
*
|
|
2446
|
+
* Structurally a chip is **body + trailing action as siblings**, never nested
|
|
2447
|
+
* buttons: an interactive chip whose body is a `<button>` cannot contain the
|
|
2448
|
+
* remove `<button>` (invalid HTML, and the inner control becomes unreachable
|
|
2449
|
+
* for keyboard users). Both stay independently operable.
|
|
2450
|
+
*/
|
|
2451
|
+
declare class UniTagComponent extends BaseComponent<UniTagOptions> {
|
|
2452
|
+
size: _angular_core.InputSignal<Size>;
|
|
2453
|
+
tone: _angular_core.InputSignal<TagTone>;
|
|
2193
2454
|
label: _angular_core.InputSignal<string>;
|
|
2194
2455
|
value: _angular_core.InputSignal<string | number>;
|
|
2195
|
-
|
|
2196
|
-
|
|
2456
|
+
/** Truncation budget, e.g. `'14ch'`. A number is treated as px. */
|
|
2457
|
+
maxWidth: _angular_core.InputSignal<string | number>;
|
|
2458
|
+
avatarSrc: _angular_core.InputSignal<string>;
|
|
2459
|
+
/** Initials fallback when `avatarSrc` is absent or fails to load. */
|
|
2460
|
+
avatarName: _angular_core.InputSignal<string>;
|
|
2461
|
+
/** Theme icon primitive — the preferred glyph path. */
|
|
2462
|
+
iconName: _angular_core.InputSignal<IconName>;
|
|
2463
|
+
/** Material Symbols ligature, for glyphs the theme's icon set doesn't carry. */
|
|
2464
|
+
symbolName: _angular_core.InputSignal<string>;
|
|
2465
|
+
/** Status dot in the current colour. */
|
|
2466
|
+
dot: _angular_core.InputSignal<boolean>;
|
|
2467
|
+
removable: _angular_core.InputSignal<boolean>;
|
|
2468
|
+
interactive: _angular_core.InputSignal<boolean>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Toggle state. Left undefined the chip carries no `aria-pressed` at all —
|
|
2471
|
+
* an interactive chip is not always a toggle (inside a tag input it is
|
|
2472
|
+
* focusable so it can be removed), and announcing "not pressed" on a
|
|
2473
|
+
* recipient chip is worse than announcing nothing.
|
|
2474
|
+
*/
|
|
2475
|
+
selected: _angular_core.InputSignal<boolean>;
|
|
2476
|
+
invalid: _angular_core.InputSignal<boolean>;
|
|
2477
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
2478
|
+
/** Accessible-name override for the remove button. */
|
|
2479
|
+
removeLabel: _angular_core.InputSignal<string>;
|
|
2480
|
+
/**
|
|
2481
|
+
* Tab position of the chip's controls. A composite that owns its own
|
|
2482
|
+
* roving focus — `uni-tag-input`, where the whole field is one tab stop —
|
|
2483
|
+
* passes `-1` so Tab does not walk through every chip to reach the next
|
|
2484
|
+
* control.
|
|
2485
|
+
*/
|
|
2486
|
+
controlTabIndex: _angular_core.InputSignal<number>;
|
|
2487
|
+
removed: _angular_core.OutputEmitterRef<UniTagValue>;
|
|
2488
|
+
activated: _angular_core.OutputEmitterRef<UniTagValue>;
|
|
2489
|
+
/** A disabled chip wears the theme's `disabled` role, whatever its variant. */
|
|
2490
|
+
protected readonly resolvedVariant: _angular_core.Signal<_uni_design_system_uni_core.Variant>;
|
|
2491
|
+
protected readonly themeStyle: _angular_core.Signal<{
|
|
2492
|
+
[x: string]: string | number | _uni_design_system_uni_core.StyleExpression;
|
|
2493
|
+
}>;
|
|
2494
|
+
/** Lead elements derive from the chip height, so no second size token. */
|
|
2495
|
+
protected readonly leadSize: _angular_core.Signal<number>;
|
|
2496
|
+
/** Remove glyph, proportional to the chip rather than to the icon-button. */
|
|
2497
|
+
protected readonly removeGlyphSize: _angular_core.Signal<number>;
|
|
2498
|
+
protected readonly initials: _angular_core.Signal<string>;
|
|
2499
|
+
protected readonly hostClass: _angular_core.Signal<string>;
|
|
2500
|
+
/** Truncating label; `title` exposes the full text when a budget is set. */
|
|
2501
|
+
protected readonly labelClass: string;
|
|
2502
|
+
protected readonly bodyClass: _angular_core.Signal<string>;
|
|
2503
|
+
protected readonly leadClass: _angular_core.Signal<string>;
|
|
2504
|
+
protected readonly dotClass: _angular_core.Signal<string>;
|
|
2505
|
+
protected remove(): void;
|
|
2506
|
+
protected activate(): void;
|
|
2197
2507
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniTagComponent, never>;
|
|
2198
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniTagComponent, "uni-tag", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "
|
|
2508
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniTagComponent, "uni-tag", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "avatarSrc": { "alias": "avatarSrc"; "required": false; "isSignal": true; }; "avatarName": { "alias": "avatarName"; "required": false; "isSignal": true; }; "iconName": { "alias": "iconName"; "required": false; "isSignal": true; }; "symbolName": { "alias": "symbolName"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; "controlTabIndex": { "alias": "controlTabIndex"; "required": false; "isSignal": true; }; }, { "removed": "removed"; "activated": "activated"; }, never, ["[tag-lead]", "*"], true, never>;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
/**
|
|
2512
|
+
* One committed token. `value` is canonical — what a form submits — and
|
|
2513
|
+
* everything else is presentation the field may enrich from a suggestion.
|
|
2514
|
+
*
|
|
2515
|
+
* `{ value: 'a@b.com' }` is a complete item, so the least a caller has to write
|
|
2516
|
+
* is `[value]="[{ value: 'a@b.com' }]"`.
|
|
2517
|
+
*/
|
|
2518
|
+
interface UniTagItem {
|
|
2519
|
+
/** Canonical value, e.g. an email address. */
|
|
2520
|
+
value: string;
|
|
2521
|
+
/** Display text; falls back to `value`. */
|
|
2522
|
+
label?: string;
|
|
2523
|
+
avatarSrc?: string;
|
|
2524
|
+
/**
|
|
2525
|
+
* Failed `validate()`. The item stays **in** the value rather than being
|
|
2526
|
+
* rejected — a field that silently swallows a typo'd address is worse than
|
|
2527
|
+
* one that shows it in red, and the user can click in to fix it.
|
|
2528
|
+
*/
|
|
2529
|
+
invalid?: boolean;
|
|
2530
|
+
/** Locked token (e.g. a thread owner): rendered without a remove control. */
|
|
2531
|
+
disabled?: boolean;
|
|
2532
|
+
}
|
|
2533
|
+
/** A type-ahead entry. Same contract as `uni-search-input`: the app filters. */
|
|
2534
|
+
interface UniTagSuggestion {
|
|
2535
|
+
value: string;
|
|
2536
|
+
label?: string;
|
|
2537
|
+
description?: string;
|
|
2538
|
+
avatarSrc?: string;
|
|
2539
|
+
}
|
|
2540
|
+
/** Why a typed token did not become a chip. */
|
|
2541
|
+
interface UniTagRejection {
|
|
2542
|
+
raw: string;
|
|
2543
|
+
reason: 'duplicate' | 'max' | 'invalid';
|
|
2544
|
+
}
|
|
2545
|
+
/** Theme options for the `tagInput` component entry. */
|
|
2546
|
+
interface UniTagInputOptions {
|
|
2547
|
+
/** Space between chips. */
|
|
2548
|
+
chipGap?: NullableSize;
|
|
2549
|
+
chipSize?: Size;
|
|
2550
|
+
/** Keeps the text input usable when chips have wrapped. */
|
|
2551
|
+
minInputWidth?: string | number;
|
|
2552
|
+
listColor?: ContainerColorToken;
|
|
2553
|
+
listShadow?: Shadow;
|
|
2554
|
+
listBorderRadius?: Radius;
|
|
2555
|
+
maxSuggestions?: number;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
declare class UniTagInputComponent extends BaseComponent<UniTagInputOptions> implements FormValueControl<UniTagItem[]> {
|
|
2559
|
+
readonly value: _angular_core.ModelSignal<UniTagItem[]>;
|
|
2560
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2561
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
2562
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
2563
|
+
readonly dirty: _angular_core.InputSignal<boolean>;
|
|
2564
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
2565
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
2566
|
+
/** Accessible name for the field, e.g. "To". */
|
|
2567
|
+
label: _angular_core.InputSignal<string>;
|
|
2568
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
2569
|
+
/** `email` wires an address validator, paste parser and space separator. */
|
|
2570
|
+
preset: _angular_core.InputSignal<"text" | "email">;
|
|
2571
|
+
separators: _angular_core.InputSignal<string[]>;
|
|
2572
|
+
commitOnBlur: _angular_core.InputSignal<boolean>;
|
|
2573
|
+
allowDuplicates: _angular_core.InputSignal<boolean>;
|
|
2574
|
+
max: _angular_core.InputSignal<number>;
|
|
2575
|
+
validate: _angular_core.InputSignal<(raw: string) => boolean>;
|
|
2576
|
+
parse: _angular_core.InputSignal<(pasted: string) => string[]>;
|
|
2577
|
+
tagVariant: _angular_core.InputSignal<Variant>;
|
|
2578
|
+
tagTone: _angular_core.InputSignal<TagTone>;
|
|
2579
|
+
tagSize: _angular_core.InputSignal<Size>;
|
|
2580
|
+
suggestions: _angular_core.InputSignal<UniTagSuggestion[]>;
|
|
2581
|
+
/** Debounced text the app should filter `suggestions` from. */
|
|
2582
|
+
query: _angular_core.OutputEmitterRef<string>;
|
|
2583
|
+
debounceTime: _angular_core.InputSignal<number>;
|
|
2584
|
+
added: _angular_core.OutputEmitterRef<UniTagItem>;
|
|
2585
|
+
removed: _angular_core.OutputEmitterRef<UniTagItem>;
|
|
2586
|
+
rejected: _angular_core.OutputEmitterRef<UniTagRejection>;
|
|
2587
|
+
private readonly inputRef;
|
|
2588
|
+
private readonly chipRefs;
|
|
2589
|
+
/** Uncommitted text in the field. */
|
|
2590
|
+
protected readonly draft: _angular_core.WritableSignal<string>;
|
|
2591
|
+
/** Index of the focused chip, or -1 when focus is in the text input. */
|
|
2592
|
+
protected readonly focusedChip: _angular_core.WritableSignal<number>;
|
|
2593
|
+
/** Announcement for the status region; add/remove are otherwise silent. */
|
|
2594
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
2595
|
+
protected readonly hintId: string;
|
|
2596
|
+
protected readonly srOnly: string;
|
|
2597
|
+
private queryTimer?;
|
|
2598
|
+
protected readonly visibleSuggestions: _angular_core.Signal<UniTagSuggestion[]>;
|
|
2599
|
+
/** Shared combobox bookkeeping — identical contract to uni-search-input. */
|
|
2600
|
+
protected readonly list: _uni_design_system_uni_angular.ListboxNavigation;
|
|
2601
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
2602
|
+
protected readonly separatorKeys: _angular_core.Signal<string[]>;
|
|
2603
|
+
protected readonly describedBy: _angular_core.Signal<string>;
|
|
2604
|
+
protected labelOf(item: UniTagItem | UniTagSuggestion): string;
|
|
2605
|
+
/** Split pasted text into candidate tokens. */
|
|
2606
|
+
private parseRaw;
|
|
2607
|
+
private isValid;
|
|
2608
|
+
/**
|
|
2609
|
+
* Turn typed text into a chip. Invalid entries are kept and flagged rather
|
|
2610
|
+
* than dropped; duplicates and over-max are refused with a reason.
|
|
2611
|
+
*/
|
|
2612
|
+
protected commit(raw: string): boolean;
|
|
2613
|
+
private reject;
|
|
2614
|
+
protected removeAt(index: number, focus?: 'left' | 'right' | 'input'): void;
|
|
2615
|
+
private countNoun;
|
|
2616
|
+
private announce;
|
|
2617
|
+
protected focusInput(): void;
|
|
2618
|
+
private focusChip;
|
|
2619
|
+
protected onInputKeydown(event: KeyboardEvent): void;
|
|
2620
|
+
protected onInput(value: string): void;
|
|
2621
|
+
protected onPaste(event: ClipboardEvent): void;
|
|
2622
|
+
protected onBlur(): void;
|
|
2623
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
2624
|
+
protected onChipKeydown(event: KeyboardEvent, index: number): void;
|
|
2625
|
+
/** Lift a chip back into the input for correction. */
|
|
2626
|
+
protected editChip(index: number): void;
|
|
2627
|
+
protected selectSuggestion(suggestion: UniTagSuggestion): void;
|
|
2628
|
+
private commitDraft;
|
|
2629
|
+
private setDraft;
|
|
2630
|
+
protected readonly className: _angular_core.Signal<string>;
|
|
2631
|
+
protected readonly fieldClass: _angular_core.Signal<string>;
|
|
2632
|
+
protected readonly inputClass: _angular_core.Signal<string>;
|
|
2633
|
+
protected readonly listClass: _angular_core.Signal<string>;
|
|
2634
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniTagInputComponent, never>;
|
|
2635
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniTagInputComponent, "uni-tag-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "preset": { "alias": "preset"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "commitOnBlur": { "alias": "commitOnBlur"; "required": false; "isSignal": true; }; "allowDuplicates": { "alias": "allowDuplicates"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "validate": { "alias": "validate"; "required": false; "isSignal": true; }; "parse": { "alias": "parse"; "required": false; "isSignal": true; }; "tagVariant": { "alias": "tagVariant"; "required": false; "isSignal": true; }; "tagTone": { "alias": "tagTone"; "required": false; "isSignal": true; }; "tagSize": { "alias": "tagSize"; "required": false; "isSignal": true; }; "suggestions": { "alias": "suggestions"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "query": "query"; "added": "added"; "removed": "removed"; "rejected": "rejected"; }, never, never, true, never>;
|
|
2199
2636
|
}
|
|
2200
2637
|
|
|
2201
2638
|
/**
|
|
@@ -2375,6 +2812,13 @@ declare class UniTooltipComponent extends BaseComponent<UniTooltipOptions> {
|
|
|
2375
2812
|
isMouseInside: _angular_core.WritableSignal<boolean>;
|
|
2376
2813
|
/** Whether the bubble is currently shown (or fading out). */
|
|
2377
2814
|
private readonly visible;
|
|
2815
|
+
/**
|
|
2816
|
+
* Set when the wrapped control is activated: clicking a button is not a
|
|
2817
|
+
* request to toggle the bubble, and re-showing it right away makes a
|
|
2818
|
+
* state-flipping label ("Expand" → "Collapse") blink back mid-interaction.
|
|
2819
|
+
* Re-arms when the pointer leaves or focus moves away.
|
|
2820
|
+
*/
|
|
2821
|
+
private readonly suppressed;
|
|
2378
2822
|
readonly tooltipId: string;
|
|
2379
2823
|
private readonly anchorName;
|
|
2380
2824
|
hoverDelay: _angular_core.InputSignal<number>;
|
|
@@ -2388,6 +2832,13 @@ declare class UniTooltipComponent extends BaseComponent<UniTooltipOptions> {
|
|
|
2388
2832
|
onFocusIn(event: FocusEvent): void;
|
|
2389
2833
|
onFocusOut(): void;
|
|
2390
2834
|
onEscape(event: Event): void;
|
|
2835
|
+
/**
|
|
2836
|
+
* A click on an interactive element inside the host is an activation of
|
|
2837
|
+
* that control — hide the bubble and stay suppressed until re-arm. A click
|
|
2838
|
+
* anywhere else (inline-text tooltips, tap on a non-interactive host)
|
|
2839
|
+
* keeps the tap-to-toggle behavior.
|
|
2840
|
+
*/
|
|
2841
|
+
protected onClick(event: Event): void;
|
|
2391
2842
|
toggleTooltip(): void;
|
|
2392
2843
|
mouseenter(): void;
|
|
2393
2844
|
mouseleave(): void;
|
|
@@ -2421,5 +2872,5 @@ declare class DragAndDropDirective {
|
|
|
2421
2872
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DragAndDropDirective, "[uni-drag-n-drop], [dragAndDrop]", never, {}, { "onFileDropped": "onFileDropped"; }, never, never, true, never>;
|
|
2422
2873
|
}
|
|
2423
2874
|
|
|
2424
|
-
export { BodyRenderDirective, ConfirmationDialogComponent, DragAndDropDirective, FOCUSABLE_SELECTOR, LocalStorageService, NotificationService, NotificationsComponent, RippleDirective, ThemeService, UNI_THEMES, UniAlertComponent, UniAppBarComponent, UniAvatarComponent, UniAvatarGroupComponent, UniBackgroundComponent, UniBadgeComponent, UniBaseDatasource, UniBoxComponent, UniBreadcrumbComponent, UniButtonComponent, UniButtonGroupComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniCheckboxComponent, UniDataSearchComponent, UniDataTableComponent, UniDebounceInputComponent, UniDialogButtonsComponent, UniDialogComponent, UniDialogHeaderComponent, UniDividerComponent, UniDrawerComponent, UniDropdownComponent, UniExpandAreaComponent, UniExpandComponent, UniExpandToggleComponent, UniFileDropZoneComponent, UniGridAreaComponent, UniGridComponent, UniIconButtonComponent, UniIconComponent, UniInputBoxComponent, UniInputComponent, UniJsonViewComponent, UniMenuComponent, UniMultiSelectComponent, UniMultiSelectDropdownComponent, UniNotificationBadgeComponent, UniPaginatorComponent, UniPopoverComponent, UniProgressBarComponent, UniProgressGaugeComponent, UniRadioComponent, UniRecordDatasource, UniRowComponent, UniScrollAreaComponent, UniSearchInputComponent, UniSelectComponent, UniServerSideDatasource, UniSkeletonComponent, UniSliderComponent, UniSnackbarComponent, UniSortHeaderComponent, UniStackComponent, UniStatComponent, UniSymbolComponent, UniTabComponent, UniTabsComponent, UniTagComponent, UniTextComponent, UniTextareaComponent, UniThemeBuilderComponent, UniThemeSwitchComponent, UniToggleComponent, UniTooltipComponent, UniWrapComponent, acceptableFile, anchorArrowStyles, anchorStyles, getFileExtension, motionSafe, newAnchorName, resolveFocusTarget, uniqueId, useTimer, visuallyHidden };
|
|
2425
|
-
export type { Alert, AnchorOffset, BrandPaletteConfig, BreadcrumbItem, ButtonGroupConfig, ButtonGroupItem, ColumnDefinition, Confirmation, DataLoader, DrawerMode, DrawerPosition, ImagePosition, MenuItem, MenuItemWithLabel, MenuItemWithTemplate, Option, Options, PageRequest, PageResponse, Placement, ScrollbarAppearance, SkeletonShape, Snackbar, Sort, SortDirection, UniAppBarOptions, UniAvatarGroupOptions, UniAvatarOptions, UniBreadcrumbOptions, UniCheckboxOptions, UniDataSearchOptions, UniDataTableOptions, UniDatasource, UniDrawerOptions, UniInputBoxOptions, UniMultiSelectDropdownOptions, UniNotificationBadgeOptions, UniPaginatorOptions, UniRadioOption, UniRadioOptions, UniSearchInputOptions, UniSkeletonOptions, UniSliderOptions, UniStatOptions, UniTabsOptions, UniTextareaOptions, UniToggleOptions };
|
|
2875
|
+
export { BodyRenderDirective, ConfirmationDialogComponent, DragAndDropDirective, FOCUSABLE_SELECTOR, ListboxNavigation, LocalStorageService, NotificationService, NotificationsComponent, RippleDirective, ThemeService, UNI_THEMES, UniAlertComponent, UniAppBarComponent, UniAvatarComponent, UniAvatarGroupComponent, UniBackgroundComponent, UniBadgeComponent, UniBaseDatasource, UniBoxComponent, UniBreadcrumbComponent, UniButtonComponent, UniButtonGroupComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniCheckboxComponent, UniDataSearchComponent, UniDataTableComponent, UniDebounceInputComponent, UniDialogButtonsComponent, UniDialogComponent, UniDialogHeaderComponent, UniDividerComponent, UniDrawerComponent, UniDropdownComponent, UniExpandAreaComponent, UniExpandComponent, UniExpandToggleComponent, UniFileDropZoneComponent, UniGridAreaComponent, UniGridComponent, UniIconButtonComponent, UniIconComponent, UniInputBoxComponent, UniInputComponent, UniJsonViewComponent, UniMenuComponent, UniMultiSelectComponent, UniMultiSelectDropdownComponent, UniNotificationBadgeComponent, UniPaginatorComponent, UniPopoverComponent, UniProgressBarComponent, UniProgressGaugeComponent, UniRadioComponent, UniRecordDatasource, UniRowComponent, UniScrollAreaComponent, UniSearchInputComponent, UniSelectComponent, UniServerSideDatasource, UniSkeletonComponent, UniSliderComponent, UniSnackbarComponent, UniSortHeaderComponent, UniStackComponent, UniStatComponent, UniSymbolComponent, UniTabComponent, UniTabsComponent, UniTagComponent, UniTagInputComponent, UniTextComponent, UniTextareaComponent, UniThemeBuilderComponent, UniThemeSwitchComponent, UniToggleComponent, UniTooltipComponent, UniWrapComponent, acceptableFile, anchorArrowStyles, anchorStyles, createListboxNavigation, getFileExtension, isDivider, motionSafe, newAnchorName, resolveFocusTarget, uniqueId, useTimer, visuallyHidden };
|
|
2876
|
+
export type { Alert, AnchorOffset, BrandPaletteConfig, BreadcrumbItem, ButtonGroupConfig, ButtonGroupItem, ColumnDefinition, Confirmation, DataLoader, DrawerMode, DrawerPosition, ImagePosition, ListboxNavigationConfig, MenuDivider, MenuItem, MenuItemWithLabel, MenuItemWithTemplate, Option, Options, PageRequest, PageResponse, Placement, ScrollbarAppearance, SkeletonShape, Snackbar, Sort, SortDirection, UniAppBarOptions, UniAvatarGroupOptions, UniAvatarOptions, UniBreadcrumbOptions, UniCheckboxOptions, UniDataSearchOptions, UniDataTableOptions, UniDatasource, UniDrawerOptions, UniExpandOptions, UniInputBoxOptions, UniMenuItemOptions, UniMenuOptions, UniMultiSelectDropdownOptions, UniNotificationBadgeOptions, UniPaginatorOptions, UniRadioOption, UniRadioOptions, UniSearchInputOptions, UniSkeletonOptions, UniSliderOptions, UniStatOptions, UniTabsOptions, UniTagInputOptions, UniTagItem, UniTagOptions, UniTagRejection, UniTagSuggestion, UniTagValue, UniTextareaOptions, UniToggleOptions };
|