@uni-design-system/uni-angular 8.0.0 → 8.1.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.
|
@@ -2,8 +2,8 @@ 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
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
|
-
import { FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
6
5
|
import * as _uni_design_system_uni_angular from '@uni-design-system/uni-angular';
|
|
6
|
+
import { FormValueControl, FormCheckboxControl } from '@angular/forms/signals';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Returns a document-unique id for wiring ARIA relationships
|
|
@@ -44,6 +44,111 @@ declare function motionSafe<T extends object>(styles: T): {
|
|
|
44
44
|
'@media (prefers-reduced-motion: no-preference)': T;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Canonical date/time value shapes shared by `uni-calendar`,
|
|
49
|
+
* `uni-date-input`, `uni-time-input` and `uni-date-time-input`.
|
|
50
|
+
*
|
|
51
|
+
* Plain ISO strings, never `Date`s: a calendar date is a label on a wall
|
|
52
|
+
* calendar, not an instant. `new Date('2026-08-20')` is midnight UTC — which
|
|
53
|
+
* is 19 Aug in Honolulu — the classic off-by-one every `Date`-valued picker
|
|
54
|
+
* ships. Strings are timezone-free, JSON-serializable and sortable with `<`.
|
|
55
|
+
* Zoned scheduling is the app's concern; these components never touch
|
|
56
|
+
* `Date.getTimezoneOffset()`.
|
|
57
|
+
*/
|
|
58
|
+
/** A calendar date, `'YYYY-MM-DD'`. */
|
|
59
|
+
type UniDate = string;
|
|
60
|
+
/** A wall-clock time, `'HH:mm'` (24-hour). Display format is separate. */
|
|
61
|
+
type UniTime = string;
|
|
62
|
+
/** A combined date and time, `'YYYY-MM-DDTHH:mm'`. */
|
|
63
|
+
type UniDateTime = string;
|
|
64
|
+
/** A start–end date range. Both ends are inclusive. */
|
|
65
|
+
interface UniDateRange {
|
|
66
|
+
start?: UniDate;
|
|
67
|
+
end?: UniDate;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** `(2026, 8, 5)` → `'2026-08-05'`. Does not validate — see `isValidDate`. */
|
|
71
|
+
declare const isoDate: (year: number, month: number, day: number) => UniDate;
|
|
72
|
+
/** The ISO date when the parts form a real calendar day, else `null`. */
|
|
73
|
+
declare const isValidDate: (year: number, month: number, day: number) => UniDate | null;
|
|
74
|
+
/** Days in a month, leap-year aware. */
|
|
75
|
+
declare const daysInMonth: (year: number, month: number) => number;
|
|
76
|
+
declare const addDays: (date: UniDate, days: number) => UniDate;
|
|
77
|
+
/** Same day ± n months, clamping the day to the target month's length. */
|
|
78
|
+
declare const addMonths: (date: UniDate, months: number) => UniDate;
|
|
79
|
+
/** Day of week, 0 = Sunday … 6 = Saturday. */
|
|
80
|
+
declare const dayOfWeek: (date: UniDate) => number;
|
|
81
|
+
/** `'2026-08-20'` → `'2026-08'`. */
|
|
82
|
+
declare const monthOf: (date: UniDate) => string;
|
|
83
|
+
/** Today as a local-wall-clock ISO date (the one place local time matters). */
|
|
84
|
+
declare const todayIso: () => UniDate;
|
|
85
|
+
/** Inclusive day count of a range: `('-20', '-24')` → 5. */
|
|
86
|
+
declare const inclusiveDayCount: (start: UniDate, end: UniDate) => number;
|
|
87
|
+
interface UniMonthGridCell {
|
|
88
|
+
date: UniDate;
|
|
89
|
+
/** True for leading/trailing cells that belong to the adjacent months. */
|
|
90
|
+
outside: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The week matrix a calendar renders: full weeks covering `'YYYY-MM'`,
|
|
94
|
+
* starting on `weekStart` (0 = Sunday). Outside cells are always present so
|
|
95
|
+
* showing or hiding them is a pure render decision.
|
|
96
|
+
*/
|
|
97
|
+
declare const buildMonthGrid: (month: string, weekStart: number) => UniMonthGridCell[][];
|
|
98
|
+
declare const formatDate: (date: UniDate, locale: string, options?: Intl.DateTimeFormatOptions) => string;
|
|
99
|
+
/** `'2026-08'` → `'August 2026'` in the locale. */
|
|
100
|
+
declare const formatMonthHeading: (month: string, locale: string) => string;
|
|
101
|
+
interface UniWeekdayName {
|
|
102
|
+
/** Column label in the requested format ('narrow' | 'short'). */
|
|
103
|
+
label: string;
|
|
104
|
+
/** Full weekday name, for the columnheader's `abbr`. */
|
|
105
|
+
full: string;
|
|
106
|
+
}
|
|
107
|
+
/** Weekday header labels starting at `weekStart` (0 = Sunday). */
|
|
108
|
+
declare const weekdayNames: (locale: string, weekStart: number, format: "narrow" | "short") => UniWeekdayName[];
|
|
109
|
+
/** `'15:00'` → `'3:00 PM'` (or `'15:00'` when `hour12` is false). */
|
|
110
|
+
declare const formatTime: (time: UniTime, locale: string, hour12: boolean) => string;
|
|
111
|
+
/**
|
|
112
|
+
* The locale's first day of week, 0 = Sunday … 6 = Saturday. Falls back to
|
|
113
|
+
* Sunday where `Intl.Locale` week info is unavailable.
|
|
114
|
+
*/
|
|
115
|
+
declare const localeWeekStart: (locale: string) => number;
|
|
116
|
+
/** Whether the locale's default clock is 12-hour. */
|
|
117
|
+
declare const localeDefaultHour12: (locale: string) => boolean;
|
|
118
|
+
type DateField = 'year' | 'month' | 'day';
|
|
119
|
+
/** The locale's numeric-date field order, e.g. en-US → month, day, year. */
|
|
120
|
+
declare const localeFieldOrder: (locale: string) => DateField[];
|
|
121
|
+
/** Long + short month names → month number, lowercased, dots stripped. */
|
|
122
|
+
declare const localeMonthNames: (locale: string) => Map<string, number>;
|
|
123
|
+
/** The locale's digit pattern as a placeholder, e.g. `'MM/DD/YYYY'`. */
|
|
124
|
+
declare const localeDatePlaceholder: (locale: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* Free-typed date text → ISO date, or `null` when unreadable. Accepts, in
|
|
127
|
+
* order: ISO (`2026-08-20`), a month name from the locale's own long/short
|
|
128
|
+
* lists (`aug 20`, `20 aug 2026`, `August 20th`), and locale-numeric text
|
|
129
|
+
* (`8/20/2026`, `20.8.2026`, `08-20`) with the digit order taken from
|
|
130
|
+
* `Intl.DateTimeFormat(locale).formatToParts()`. A missing year resolves to
|
|
131
|
+
* the next occurrence; two-digit years are refused rather than guessed.
|
|
132
|
+
*/
|
|
133
|
+
declare const parseDateText: (raw: string, locale: string, options?: {
|
|
134
|
+
today?: UniDate;
|
|
135
|
+
}) => UniDate | null;
|
|
136
|
+
/**
|
|
137
|
+
* Free-typed time text → `'HH:mm'`, or `null`. Accepts `9`, `930`, `9:30`,
|
|
138
|
+
* `9.30`, `9 30`, `3p`, `3pm`, `3 PM`, `15:00`. Bare hours 1–7 with no
|
|
139
|
+
* meridiem lean PM when `hour12` — typing `3` into an appointment field
|
|
140
|
+
* means 15:00, not 03:00.
|
|
141
|
+
*/
|
|
142
|
+
declare const parseTimeText: (raw: string, hour12: boolean) => UniTime | null;
|
|
143
|
+
/** Every `minuteStep` time between `min` and `max` (inclusive bounds). */
|
|
144
|
+
declare const timeSlots: (minuteStep: number, min?: UniTime, max?: UniTime) => UniTime[];
|
|
145
|
+
declare const splitDateTime: (value?: UniDateTime) => {
|
|
146
|
+
date?: UniDate;
|
|
147
|
+
time?: UniTime;
|
|
148
|
+
};
|
|
149
|
+
/** One combined value only when both parts are present. */
|
|
150
|
+
declare const joinDateTime: (date?: UniDate, time?: UniTime) => UniDateTime | undefined;
|
|
151
|
+
|
|
47
152
|
interface ListboxNavigationConfig {
|
|
48
153
|
/** How many options are currently navigable. Read reactively. */
|
|
49
154
|
count: () => number;
|
|
@@ -347,7 +452,7 @@ declare class ThemeService {
|
|
|
347
452
|
colors: Signal<Partial<Record<string, string>>>;
|
|
348
453
|
typeFaces: Signal<Record<string, _uni_design_system_uni_core.TypeFaceDefinition>>;
|
|
349
454
|
spacing: Signal<Partial<Record<NullableSize, string | number>>>;
|
|
350
|
-
thicknesses: Signal<
|
|
455
|
+
thicknesses: Signal<Partial<Record<string, string | number>>>;
|
|
351
456
|
radii: Signal<Partial<Record<string, string>>>;
|
|
352
457
|
borders: Signal<Partial<Record<string, string>>>;
|
|
353
458
|
shadows: Signal<Partial<Record<string, string>>>;
|
|
@@ -408,14 +513,36 @@ declare class ThemeService {
|
|
|
408
513
|
backgroundColor: (token?: ColorKey) => NullableStyleExpression;
|
|
409
514
|
backgroundImage: (url?: string) => NullableStyleExpression;
|
|
410
515
|
getContainerColors: (color: Variant, useVariant?: boolean) => _uni_design_system_uni_core.StyleExpression;
|
|
516
|
+
/**
|
|
517
|
+
* The shared keyboard-focus indicator's styles (WCAG 2.4.7), without a
|
|
518
|
+
* selector — for controls that key the ring off their own state selector
|
|
519
|
+
* (`&:focus + .checkbox`). Everything else spreads `focusRing()` instead.
|
|
520
|
+
*
|
|
521
|
+
* Themable: a theme that defines `focusRing` **border** and/or **shadow**
|
|
522
|
+
* primitives replaces the default 2px outline with that border (drawn as
|
|
523
|
+
* an outline hugging the control) plus the ring shadow — one focus
|
|
524
|
+
* language for every control, from text fields to checkboxes to calendar
|
|
525
|
+
* days. A `focusRing` **thickness** primitive sets the outline offset
|
|
526
|
+
* (default 0 when themed, 2px for the classic outline; negative values
|
|
527
|
+
* overlay the control's own border, reading as a border-color change).
|
|
528
|
+
* Without those primitives the classic outline renders, in the given
|
|
529
|
+
* color or `currentColor`.
|
|
530
|
+
*/
|
|
531
|
+
focusRingStyle: (color?: string, gap?: string | number) => {
|
|
532
|
+
boxShadow?: string;
|
|
533
|
+
outline: string;
|
|
534
|
+
outlineOffset: string | number;
|
|
535
|
+
};
|
|
411
536
|
/**
|
|
412
537
|
* Shared keyboard-focus indicator (WCAG 2.4.7). Spread into a component's
|
|
413
538
|
* Emotion styles: `...this.theme.focusRing()` or `focusRing('primary')`.
|
|
539
|
+
* See `focusRingStyle` for how themes restyle it.
|
|
414
540
|
*/
|
|
415
541
|
focusRing: (token?: ColorToken) => {
|
|
416
542
|
'&:focus-visible': {
|
|
543
|
+
boxShadow?: string;
|
|
417
544
|
outline: string;
|
|
418
|
-
outlineOffset: string;
|
|
545
|
+
outlineOffset: string | number;
|
|
419
546
|
};
|
|
420
547
|
};
|
|
421
548
|
typeface: (typeface?: Typeface) => _uni_design_system_uni_core.TypeFaceDefinition;
|
|
@@ -686,6 +813,172 @@ interface ButtonGroupItem {
|
|
|
686
813
|
toggle?: WritableSignal<boolean>;
|
|
687
814
|
}
|
|
688
815
|
|
|
816
|
+
type UniCalendarMode = 'single' | 'range';
|
|
817
|
+
/** What the calendar reads/writes: a date in `single` mode, a range in `range` mode. */
|
|
818
|
+
type UniCalendarValue = UniDate | UniDateRange | undefined;
|
|
819
|
+
/**
|
|
820
|
+
* An availability dot on a day, driven by app data — the scheduling pattern
|
|
821
|
+
* is the first application. `label` extends the day's accessible name
|
|
822
|
+
* (e.g. "3 slots open"); without it the dot is decoration only.
|
|
823
|
+
*/
|
|
824
|
+
interface UniCalendarMarker {
|
|
825
|
+
date: UniDate;
|
|
826
|
+
/** Dot color role, default `'primary'`. */
|
|
827
|
+
variant?: Variant;
|
|
828
|
+
/** Screen-reader suffix appended to the day's name. */
|
|
829
|
+
label?: string;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Theme options for the `calendar` component entry. Selection/range/today
|
|
833
|
+
* colours are deliberately not here — they are the `primary` role pair, so a
|
|
834
|
+
* theme restyles them by restyling its palette.
|
|
835
|
+
*/
|
|
836
|
+
interface UniCalendarOptions {
|
|
837
|
+
/** `'max'` renders circles; `'xxs'` the square/GitHub-contributions look. */
|
|
838
|
+
dayBorderRadius?: Radius;
|
|
839
|
+
typeface?: Typeface;
|
|
840
|
+
/** Grid gutter. */
|
|
841
|
+
gap?: NullableSize;
|
|
842
|
+
navPrevSymbol?: string;
|
|
843
|
+
navNextSymbol?: string;
|
|
844
|
+
/** Intl weekday column format. */
|
|
845
|
+
weekdayFormat?: 'narrow' | 'short';
|
|
846
|
+
/** Show the adjacent months' days, muted and non-interactive. */
|
|
847
|
+
showOutsideDays?: boolean;
|
|
848
|
+
/** How today is marked: 1px outline, or a dot under the number. */
|
|
849
|
+
todayStyle?: 'outline' | 'dot';
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/** One rendered day cell — precomputed so the template stays declarative. */
|
|
853
|
+
interface CalendarCell {
|
|
854
|
+
date: UniDate;
|
|
855
|
+
day: number;
|
|
856
|
+
outside: boolean;
|
|
857
|
+
disabled: boolean;
|
|
858
|
+
today: boolean;
|
|
859
|
+
selected: boolean;
|
|
860
|
+
inBand: boolean;
|
|
861
|
+
tabIndex: number;
|
|
862
|
+
ariaLabel: string;
|
|
863
|
+
markers: UniCalendarMarker[];
|
|
864
|
+
cellClass: string;
|
|
865
|
+
dayClass: string;
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Inline month calendar: single-date or start–end range selection, day
|
|
869
|
+
* markers (availability dots), min/max fences and disabled dates. One tab
|
|
870
|
+
* stop with a roving-tabindex `role="grid"`; every day is a real button
|
|
871
|
+
* named with its full date. Values are plain ISO strings (`'YYYY-MM-DD'`),
|
|
872
|
+
* never `Date` objects, so bindings are timezone-free and serializable.
|
|
873
|
+
* Selection and today colours come from the theme's `primary` role pair;
|
|
874
|
+
* geometry and glyphs come from the `calendar` theme entry.
|
|
875
|
+
*/
|
|
876
|
+
declare class UniCalendarComponent extends BaseComponent<UniCalendarOptions> implements FormValueControl<UniCalendarValue> {
|
|
877
|
+
readonly value: _angular_core.ModelSignal<UniCalendarValue>;
|
|
878
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
879
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
880
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
881
|
+
readonly dirty: _angular_core.InputSignal<boolean>;
|
|
882
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
883
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
884
|
+
/** `'single'` reads/writes a `UniDate`; `'range'` a `UniDateRange`. */
|
|
885
|
+
mode: _angular_core.InputSignal<UniCalendarMode>;
|
|
886
|
+
/** Shown month, `'YYYY-MM'` — two-way, so an app can drive "jump to June". */
|
|
887
|
+
month: _angular_core.ModelSignal<string>;
|
|
888
|
+
/** Earliest selectable date (inclusive). */
|
|
889
|
+
minDate: _angular_core.InputSignal<string>;
|
|
890
|
+
/** Latest selectable date (inclusive). */
|
|
891
|
+
maxDate: _angular_core.InputSignal<string>;
|
|
892
|
+
/** Blocked days: a list of dates, or a predicate. */
|
|
893
|
+
disabledDates: _angular_core.InputSignal<string[] | ((date: UniDate) => boolean)>;
|
|
894
|
+
/** Availability dots; `label` extends the day's accessible name. */
|
|
895
|
+
markers: _angular_core.InputSignal<UniCalendarMarker[]>;
|
|
896
|
+
/** BCP 47 tag; defaults to the document language, then the browser's. */
|
|
897
|
+
locale: _angular_core.InputSignal<string>;
|
|
898
|
+
/** First day of week, 0 = Sunday; defaults from the locale's week info. */
|
|
899
|
+
weekStart: _angular_core.InputSignal<0 | 1 | 2 | 3 | 4 | 5 | 6>;
|
|
900
|
+
/** Names the grid when it stands alone (otherwise the heading names it). */
|
|
901
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
902
|
+
/** Day geometry token; `sm`/`md`/`lg` map to the theme's `calendar` sizes. */
|
|
903
|
+
size: _angular_core.InputSignal<Size>;
|
|
904
|
+
/** Each committed day, including both ends of a range. */
|
|
905
|
+
selected: _angular_core.OutputEmitterRef<string>;
|
|
906
|
+
private readonly host;
|
|
907
|
+
protected readonly headingId: string;
|
|
908
|
+
protected readonly srOnly: string;
|
|
909
|
+
/** Pending range start — set by the first commit, cleared by the second. */
|
|
910
|
+
protected readonly pendingStart: _angular_core.WritableSignal<string>;
|
|
911
|
+
/** Hover/focus candidate painting the preview band while a range is pending. */
|
|
912
|
+
protected readonly previewDate: _angular_core.WritableSignal<string>;
|
|
913
|
+
/** Live-region text; selections are otherwise silent for a screen reader. */
|
|
914
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
915
|
+
protected readonly resolvedLocale: _angular_core.Signal<string>;
|
|
916
|
+
protected readonly resolvedWeekStart: _angular_core.Signal<number>;
|
|
917
|
+
/** The month on screen: the `month` model, else the value's month, else today's. */
|
|
918
|
+
protected readonly viewMonth: _angular_core.Signal<string>;
|
|
919
|
+
private readonly anchorDate;
|
|
920
|
+
/**
|
|
921
|
+
* The roving-tabindex day. Re-derives when the view or value changes
|
|
922
|
+
* (selected day in view → today in view → first enabled day); keyboard
|
|
923
|
+
* navigation writes it directly.
|
|
924
|
+
*/
|
|
925
|
+
protected readonly focusedDate: _angular_core.WritableSignal<string>;
|
|
926
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
927
|
+
protected readonly heading: _angular_core.Signal<string>;
|
|
928
|
+
protected readonly weekdays: _angular_core.Signal<_uni_design_system_uni_angular.UniWeekdayName[]>;
|
|
929
|
+
private readonly disabledDateSet;
|
|
930
|
+
private readonly markersByDate;
|
|
931
|
+
/** The committed range, or the pending preview band. */
|
|
932
|
+
private readonly rangeBand;
|
|
933
|
+
protected isDayDisabled(date: UniDate): boolean;
|
|
934
|
+
private isSelected;
|
|
935
|
+
/** The full render model: one precomputed cell per grid position. */
|
|
936
|
+
protected readonly gridWeeks: _angular_core.Signal<CalendarCell[][]>;
|
|
937
|
+
protected select(date: UniDate): void;
|
|
938
|
+
private cancelPending;
|
|
939
|
+
protected onNav(direction: 1 | -1): void;
|
|
940
|
+
private setViewMonth;
|
|
941
|
+
/**
|
|
942
|
+
* Move the roving focus. A landing on a disabled day keeps going in the
|
|
943
|
+
* same direction until an enabled day; the min/max fence stops the caret,
|
|
944
|
+
* it never wraps. Month edges never block — the grid follows.
|
|
945
|
+
*/
|
|
946
|
+
private moveFocus;
|
|
947
|
+
protected onGridKeydown(event: KeyboardEvent): void;
|
|
948
|
+
protected onDayHover(date: UniDate): void;
|
|
949
|
+
/** Focus the roving day — used by popup hosts when the calendar opens. */
|
|
950
|
+
focusActiveDay(): void;
|
|
951
|
+
protected onHostFocusOut(event: FocusEvent): void;
|
|
952
|
+
private focusDay;
|
|
953
|
+
private pickFocus;
|
|
954
|
+
private firstEnabledInView;
|
|
955
|
+
private announce;
|
|
956
|
+
private readonly daySize;
|
|
957
|
+
protected readonly className: _angular_core.Signal<string>;
|
|
958
|
+
protected readonly navClass: _angular_core.Signal<string>;
|
|
959
|
+
protected readonly headingClass: _angular_core.Signal<string>;
|
|
960
|
+
protected readonly gridClass: _angular_core.Signal<string>;
|
|
961
|
+
protected readonly rowClass: _angular_core.Signal<string>;
|
|
962
|
+
protected readonly weekdayClass: _angular_core.Signal<string>;
|
|
963
|
+
/** The gridcell — range bands paint here so they read as one bar. */
|
|
964
|
+
protected readonly cellClass: _angular_core.Signal<string>;
|
|
965
|
+
protected readonly inRangeClass: _angular_core.Signal<string>;
|
|
966
|
+
protected readonly previewClass: _angular_core.Signal<string>;
|
|
967
|
+
protected readonly bandStartClass: _angular_core.Signal<string>;
|
|
968
|
+
protected readonly bandEndClass: _angular_core.Signal<string>;
|
|
969
|
+
protected readonly dayClass: _angular_core.Signal<string>;
|
|
970
|
+
protected readonly todayClass: _angular_core.Signal<string>;
|
|
971
|
+
protected readonly selectedClass: _angular_core.Signal<string>;
|
|
972
|
+
protected readonly outsideDayClass: _angular_core.Signal<string>;
|
|
973
|
+
protected readonly dotsClass: _angular_core.Signal<string>;
|
|
974
|
+
/** One dot class per marker variant present, resolved from the palette. */
|
|
975
|
+
protected readonly dotClasses: _angular_core.Signal<Map<Variant, string>>;
|
|
976
|
+
protected dotClassFor(variant: Variant | undefined): string;
|
|
977
|
+
protected readonly showOutside: _angular_core.Signal<boolean>;
|
|
978
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniCalendarComponent, never>;
|
|
979
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniCalendarComponent, "uni-calendar, Calendar", 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; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "month": { "alias": "month"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "markers": { "alias": "markers"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "weekStart": { "alias": "weekStart"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "month": "monthChange"; "selected": "selected"; }, never, never, true, never>;
|
|
980
|
+
}
|
|
981
|
+
|
|
689
982
|
declare class UniCardContentComponent extends BaseComponent {
|
|
690
983
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniCardContentComponent, never>;
|
|
691
984
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniCardContentComponent, "uni-card-content", never, {}, {}, never, ["*"], true, never>;
|
|
@@ -735,6 +1028,7 @@ interface UniCheckboxOptions {
|
|
|
735
1028
|
borderRadius?: string | number;
|
|
736
1029
|
/** Unchecked box background token. */
|
|
737
1030
|
boxColor?: ColorKey;
|
|
1031
|
+
focusRingGap?: string | number;
|
|
738
1032
|
}
|
|
739
1033
|
|
|
740
1034
|
declare class UniCheckboxComponent extends BaseComponent<UniCheckboxOptions> implements FormCheckboxControl {
|
|
@@ -860,6 +1154,186 @@ declare class UniDataTableComponent<T> extends BaseComponent<UniDataTableOptions
|
|
|
860
1154
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDataTableComponent<any>, "uni-data-table", never, { "datasource": { "alias": "datasource"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "detailRowTemplate": { "alias": "detailRowTemplate"; "required": false; "isSignal": true; }; "useMultiSelect": { "alias": "useMultiSelect"; "required": false; "isSignal": true; }; "useRowClick": { "alias": "useRowClick"; "required": false; "isSignal": true; }; "highlight": { "alias": "highlight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, { "rowSelect": "rowSelect"; "rowClick": "rowClick"; }, never, ["data-table-header", "data-table-footer"], true, never>;
|
|
861
1155
|
}
|
|
862
1156
|
|
|
1157
|
+
/** Why typed text did not become a date. The raw text stays in the field. */
|
|
1158
|
+
interface UniDateInputRejection {
|
|
1159
|
+
raw: string;
|
|
1160
|
+
reason: 'unparseable' | 'out-of-range' | 'disabled';
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Theme options for the `dateInput` entry. Field chrome is not duplicated
|
|
1164
|
+
* here — it comes from `input` via uni-input-box; these style the popup
|
|
1165
|
+
* affordance and panel only.
|
|
1166
|
+
*/
|
|
1167
|
+
interface UniDateInputOptions {
|
|
1168
|
+
toggleSymbol?: string;
|
|
1169
|
+
popupShadow?: Shadow;
|
|
1170
|
+
popupBorderRadius?: Radius;
|
|
1171
|
+
popupColor?: ContainerColorToken;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Date field with free-typed parsing and a popup calendar. Type `aug 20`,
|
|
1176
|
+
* `8/20/2026` or `2026-08-20`, or pick from the grid — the form gets the
|
|
1177
|
+
* same canonical `'YYYY-MM-DD'` string either way. Parsing is `Intl`-driven
|
|
1178
|
+
* (locale digit order and month names, never hardcoded); unreadable text
|
|
1179
|
+
* stays in the field, flagged, with a `rejected` event. The popup is a
|
|
1180
|
+
* native popover hosting the same `uni-calendar` an app could render inline.
|
|
1181
|
+
*/
|
|
1182
|
+
declare class UniDateInputComponent extends BaseComponent<UniDateInputOptions> implements FormValueControl<UniDate | undefined> {
|
|
1183
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
1184
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1185
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
1186
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
1187
|
+
readonly dirty: _angular_core.InputSignal<boolean>;
|
|
1188
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
1189
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
1190
|
+
/** Accessible name for the field, e.g. "Appointment date". */
|
|
1191
|
+
label: _angular_core.InputSignal<string>;
|
|
1192
|
+
/** Defaults to the locale's digit pattern, e.g. `MM/DD/YYYY`. */
|
|
1193
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
1194
|
+
/** How the committed value renders, e.g. `{ dateStyle: 'long' }`. */
|
|
1195
|
+
displayFormat: _angular_core.InputSignal<Intl.DateTimeFormatOptions>;
|
|
1196
|
+
/** BCP 47 tag; defaults to the document language, then the browser's. */
|
|
1197
|
+
locale: _angular_core.InputSignal<string>;
|
|
1198
|
+
commitOnBlur: _angular_core.InputSignal<boolean>;
|
|
1199
|
+
/** Custom parser, replacing the built-in ISO/locale/month-name parsing. */
|
|
1200
|
+
parse: _angular_core.InputSignal<(raw: string, locale: string) => UniDate | null>;
|
|
1201
|
+
/** Renders without its own input-box chrome, for composers like uni-date-time-input. */
|
|
1202
|
+
embedded: _angular_core.InputSignal<boolean>;
|
|
1203
|
+
minDate: _angular_core.InputSignal<string>;
|
|
1204
|
+
maxDate: _angular_core.InputSignal<string>;
|
|
1205
|
+
disabledDates: _angular_core.InputSignal<string[] | ((date: UniDate) => boolean)>;
|
|
1206
|
+
markers: _angular_core.InputSignal<UniCalendarMarker[]>;
|
|
1207
|
+
weekStart: _angular_core.InputSignal<0 | 1 | 2 | 3 | 4 | 5 | 6>;
|
|
1208
|
+
/** Popup shown. */
|
|
1209
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
1210
|
+
/** Popup hidden. */
|
|
1211
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
1212
|
+
/** A typed commit was refused; the raw text stays in the field. */
|
|
1213
|
+
rejected: _angular_core.OutputEmitterRef<UniDateInputRejection>;
|
|
1214
|
+
private readonly host;
|
|
1215
|
+
private readonly inputRef;
|
|
1216
|
+
private readonly toggleRef;
|
|
1217
|
+
private readonly popupRef;
|
|
1218
|
+
private readonly dropdown;
|
|
1219
|
+
private readonly calendar;
|
|
1220
|
+
protected readonly srOnly: string;
|
|
1221
|
+
/** A refused commit — styles the field and sets aria-invalid until edited. */
|
|
1222
|
+
protected readonly draftInvalid: _angular_core.WritableSignal<boolean>;
|
|
1223
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
1224
|
+
protected readonly toggleElement: _angular_core.Signal<any>;
|
|
1225
|
+
protected readonly popupOpen: _angular_core.Signal<boolean>;
|
|
1226
|
+
protected readonly resolvedLocale: _angular_core.Signal<string>;
|
|
1227
|
+
protected readonly displayText: _angular_core.Signal<string>;
|
|
1228
|
+
protected readonly resolvedPlaceholder: _angular_core.Signal<string>;
|
|
1229
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
1230
|
+
protected readonly toggleLabel: _angular_core.Signal<string>;
|
|
1231
|
+
private fullDate;
|
|
1232
|
+
private isDayBlocked;
|
|
1233
|
+
protected setValue(date: UniDate | undefined, silent?: boolean): void;
|
|
1234
|
+
private refuse;
|
|
1235
|
+
protected commit(raw: string): boolean;
|
|
1236
|
+
/** Step a committed value ±1 day, skipping blocked days, stopping at fences. */
|
|
1237
|
+
private step;
|
|
1238
|
+
protected onInputKeydown(event: KeyboardEvent): void;
|
|
1239
|
+
protected onInput(): void;
|
|
1240
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
1241
|
+
protected openPopup(): void;
|
|
1242
|
+
protected closePopup(): void;
|
|
1243
|
+
protected onPopupShowing(): void;
|
|
1244
|
+
protected onPopupHiding(): void;
|
|
1245
|
+
protected onCalendarPick(date: UniDate): void;
|
|
1246
|
+
/** The popup is a focus-holding dialog: Tab cycles inside it (APG pattern). */
|
|
1247
|
+
protected onPopupKeydown(event: KeyboardEvent): void;
|
|
1248
|
+
private setFieldText;
|
|
1249
|
+
private announce;
|
|
1250
|
+
protected readonly className: _angular_core.Signal<string>;
|
|
1251
|
+
protected readonly rowClass: _angular_core.Signal<string>;
|
|
1252
|
+
protected readonly inputClass: _angular_core.Signal<string>;
|
|
1253
|
+
protected readonly toggleWrapClass: _angular_core.Signal<string>;
|
|
1254
|
+
/** Embedded mode: the composer owns the box; keep only the flex row. */
|
|
1255
|
+
protected readonly embeddedClass: _angular_core.Signal<string>;
|
|
1256
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniDateInputComponent, never>;
|
|
1257
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDateInputComponent, "uni-date-input, DateInput", 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; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "commitOnBlur": { "alias": "commitOnBlur"; "required": false; "isSignal": true; }; "parse": { "alias": "parse"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "markers": { "alias": "markers"; "required": false; "isSignal": true; }; "weekStart": { "alias": "weekStart"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "opened": "opened"; "closed": "closed"; "rejected": "rejected"; }, never, never, true, never>;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Theme options for the `dateTimeInput` entry. Field chrome comes from
|
|
1262
|
+
* `input` via the single shared uni-input-box; these style the seam between
|
|
1263
|
+
* the two parts.
|
|
1264
|
+
*/
|
|
1265
|
+
interface UniDateTimeInputOptions {
|
|
1266
|
+
/** Space between the date part, the divider, and the time part. */
|
|
1267
|
+
partGap?: NullableSize;
|
|
1268
|
+
dividerColor?: ColorToken;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* One field for a date and a time: a thin composer seating a uni-date-input
|
|
1273
|
+
* and a uni-time-input in one input-box chrome under one label, yielding one
|
|
1274
|
+
* combined `'YYYY-MM-DDTHH:mm'` value. The value emits only when both parts
|
|
1275
|
+
* are set — a time without a day is not an answer — and clearing the date
|
|
1276
|
+
* clears it. With `slotsFor`, the time part stays disabled until a day is
|
|
1277
|
+
* chosen and offers exactly that day's slots: the scheduling flow in one
|
|
1278
|
+
* attribute. Two honest tab stops (it is two questions); apps needing a
|
|
1279
|
+
* different arrangement compose the primitives directly.
|
|
1280
|
+
*/
|
|
1281
|
+
declare class UniDateTimeInputComponent extends BaseComponent<UniDateTimeInputOptions> implements FormValueControl<UniDateTime | undefined> {
|
|
1282
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
1283
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1284
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
1285
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
1286
|
+
readonly dirty: _angular_core.InputSignal<boolean>;
|
|
1287
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
1288
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
1289
|
+
/** Names the group; the parts are announced as "Date" and "Time" under it. */
|
|
1290
|
+
label: _angular_core.InputSignal<string>;
|
|
1291
|
+
/** Earliest allowed moment; the date and time fences are split from it. */
|
|
1292
|
+
minDateTime: _angular_core.InputSignal<string>;
|
|
1293
|
+
/** Latest allowed moment; the date and time fences are split from it. */
|
|
1294
|
+
maxDateTime: _angular_core.InputSignal<string>;
|
|
1295
|
+
disabledDates: _angular_core.InputSignal<string[] | ((date: UniDate) => boolean)>;
|
|
1296
|
+
markers: _angular_core.InputSignal<UniCalendarMarker[]>;
|
|
1297
|
+
/** Fixed time choices; superseded per-day by `slotsFor` when that is set. */
|
|
1298
|
+
slots: _angular_core.InputSignal<string[]>;
|
|
1299
|
+
minuteStep: _angular_core.InputSignal<number>;
|
|
1300
|
+
hour12: _angular_core.InputSignal<boolean>;
|
|
1301
|
+
weekStart: _angular_core.InputSignal<0 | 1 | 2 | 3 | 4 | 5 | 6>;
|
|
1302
|
+
locale: _angular_core.InputSignal<string>;
|
|
1303
|
+
/** Scheduling: the day's available times. Gates the time part on a date. */
|
|
1304
|
+
slotsFor: _angular_core.InputSignal<(date: UniDate) => UniTime[]>;
|
|
1305
|
+
private readonly host;
|
|
1306
|
+
/**
|
|
1307
|
+
* The two part-values. An external `value` write re-derives both; an
|
|
1308
|
+
* internal partial state (a date without a time round-trips through
|
|
1309
|
+
* `undefined`) must not be wiped by its own echo.
|
|
1310
|
+
*/
|
|
1311
|
+
private readonly parts;
|
|
1312
|
+
protected readonly dateValue: _angular_core.Signal<string>;
|
|
1313
|
+
protected readonly timeValue: _angular_core.Signal<string>;
|
|
1314
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
1315
|
+
private readonly minParts;
|
|
1316
|
+
private readonly maxParts;
|
|
1317
|
+
protected readonly dateMin: _angular_core.Signal<string>;
|
|
1318
|
+
protected readonly dateMax: _angular_core.Signal<string>;
|
|
1319
|
+
protected readonly timeMin: _angular_core.Signal<string>;
|
|
1320
|
+
protected readonly timeMax: _angular_core.Signal<string>;
|
|
1321
|
+
/** The chosen day's slots when `slotsFor` is set, else the fixed list. */
|
|
1322
|
+
protected readonly effectiveSlots: _angular_core.Signal<string[]>;
|
|
1323
|
+
protected readonly timeDisabled: _angular_core.Signal<boolean>;
|
|
1324
|
+
protected onDatePartChange(date: UniDate | undefined): void;
|
|
1325
|
+
protected onTimePartChange(time: UniTime | undefined): void;
|
|
1326
|
+
private setParts;
|
|
1327
|
+
protected onHostFocusOut(event: FocusEvent): void;
|
|
1328
|
+
protected readonly className: _angular_core.Signal<string>;
|
|
1329
|
+
protected readonly groupClass: _angular_core.Signal<string>;
|
|
1330
|
+
protected readonly datePartClass: _angular_core.Signal<string>;
|
|
1331
|
+
protected readonly timePartClass: _angular_core.Signal<string>;
|
|
1332
|
+
protected readonly dividerClass: _angular_core.Signal<string>;
|
|
1333
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniDateTimeInputComponent, never>;
|
|
1334
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDateTimeInputComponent, "uni-date-time-input, DateTimeInput", 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; }; "minDateTime": { "alias": "minDateTime"; "required": false; "isSignal": true; }; "maxDateTime": { "alias": "maxDateTime"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "markers": { "alias": "markers"; "required": false; "isSignal": true; }; "slots": { "alias": "slots"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "weekStart": { "alias": "weekStart"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "slotsFor": { "alias": "slotsFor"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; }, never, never, true, never>;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
863
1337
|
/**
|
|
864
1338
|
* Theme-level options for the dialog footer action row. Inputs on the
|
|
865
1339
|
* component override these per instance; the theme sets the default posture.
|
|
@@ -1410,6 +1884,12 @@ interface UniInputBoxOptions {
|
|
|
1410
1884
|
disabledTextColor: ColorKey;
|
|
1411
1885
|
focusOutline: string;
|
|
1412
1886
|
focusOutlineOffset: number;
|
|
1887
|
+
/** Border swapped in while an inner control has focus (default: keep `border`). */
|
|
1888
|
+
focusBorder?: Border;
|
|
1889
|
+
/** Ring shown while focused, e.g. a soft `0 0 0 3px` spread shadow. */
|
|
1890
|
+
focusShadow?: Shadow;
|
|
1891
|
+
/** Background swapped in while focused (default: keep `color`). */
|
|
1892
|
+
focusColor?: ContainerColorToken;
|
|
1413
1893
|
}
|
|
1414
1894
|
|
|
1415
1895
|
declare class UniInputBoxComponent extends BaseComponent<UniInputBoxOptions> {
|
|
@@ -1972,6 +2452,11 @@ interface UniRadioOptions {
|
|
|
1972
2452
|
ringColor?: ColorKey;
|
|
1973
2453
|
/** Circle background token. */
|
|
1974
2454
|
fillColor?: ColorKey;
|
|
2455
|
+
/**
|
|
2456
|
+
* Seconds for the dot's grow/retract and the ring's color change
|
|
2457
|
+
* (default 0.3, matching menuItem/expand). 0 switches instantly.
|
|
2458
|
+
*/
|
|
2459
|
+
transitionSpeed?: number;
|
|
1975
2460
|
}
|
|
1976
2461
|
|
|
1977
2462
|
declare class UniRadioComponent extends BaseComponent<UniRadioOptions> implements FormValueControl<string> {
|
|
@@ -2761,6 +3246,105 @@ declare class UniThemeSwitchComponent {
|
|
|
2761
3246
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniThemeSwitchComponent, "uni-theme-switch", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "themeChanged": "themeChanged"; }, never, never, true, never>;
|
|
2762
3247
|
}
|
|
2763
3248
|
|
|
3249
|
+
/** Why typed text did not become a time. The raw text stays in the field. */
|
|
3250
|
+
interface UniTimeInputRejection {
|
|
3251
|
+
raw: string;
|
|
3252
|
+
reason: 'unparseable' | 'out-of-range' | 'unavailable';
|
|
3253
|
+
}
|
|
3254
|
+
/**
|
|
3255
|
+
* Theme options for the `timeInput` entry. Field chrome is not duplicated
|
|
3256
|
+
* here — it comes from `input` via uni-input-box; the list trio matches
|
|
3257
|
+
* tagInput/searchInput.
|
|
3258
|
+
*/
|
|
3259
|
+
interface UniTimeInputOptions {
|
|
3260
|
+
toggleSymbol?: string;
|
|
3261
|
+
listColor?: ContainerColorToken;
|
|
3262
|
+
listShadow?: Shadow;
|
|
3263
|
+
listBorderRadius?: Radius;
|
|
3264
|
+
maxVisibleOptions?: number;
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* Time field: a combobox over time options — the same listbox contract as
|
|
3269
|
+
* uni-search-input and uni-tag-input. Type `3p`, `930` or `15:00`, or pick
|
|
3270
|
+
* `3:00 PM` from the list; the form always gets 24-hour `'HH:mm'` (`hour12`
|
|
3271
|
+
* affects display only). The list is assistive, not exhaustive: any
|
|
3272
|
+
* parseable time commits, unless `slots` pins the choices (a slot picker) —
|
|
3273
|
+
* then a typed time must match one. Unreadable or unavailable text stays in
|
|
3274
|
+
* the field, flagged, with a `rejected` event.
|
|
3275
|
+
*/
|
|
3276
|
+
declare class UniTimeInputComponent extends BaseComponent<UniTimeInputOptions> implements FormValueControl<UniTime | undefined> {
|
|
3277
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
3278
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
3279
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
3280
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
3281
|
+
readonly dirty: _angular_core.InputSignal<boolean>;
|
|
3282
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
3283
|
+
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
3284
|
+
/** Accessible name for the field, e.g. "Start time". */
|
|
3285
|
+
label: _angular_core.InputSignal<string>;
|
|
3286
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
3287
|
+
/** Generated list granularity, in minutes. */
|
|
3288
|
+
minuteStep: _angular_core.InputSignal<number>;
|
|
3289
|
+
/** Earliest allowed time (inclusive), `'09:00'`. */
|
|
3290
|
+
minTime: _angular_core.InputSignal<string>;
|
|
3291
|
+
/** Latest allowed time (inclusive), `'17:00'`. */
|
|
3292
|
+
maxTime: _angular_core.InputSignal<string>;
|
|
3293
|
+
/** Exact allowed times (scheduling). When set, typed entry must match one. */
|
|
3294
|
+
slots: _angular_core.InputSignal<string[]>;
|
|
3295
|
+
/** 12-hour display; defaults from the locale. The value stays 24-hour. */
|
|
3296
|
+
hour12: _angular_core.InputSignal<boolean>;
|
|
3297
|
+
/** BCP 47 tag for the display format; defaults to the document language. */
|
|
3298
|
+
locale: _angular_core.InputSignal<string>;
|
|
3299
|
+
commitOnBlur: _angular_core.InputSignal<boolean>;
|
|
3300
|
+
/** Renders without its own input-box chrome, for composers like uni-date-time-input. */
|
|
3301
|
+
embedded: _angular_core.InputSignal<boolean>;
|
|
3302
|
+
/** A typed commit was refused; the raw text stays in the field. */
|
|
3303
|
+
rejected: _angular_core.OutputEmitterRef<UniTimeInputRejection>;
|
|
3304
|
+
private readonly host;
|
|
3305
|
+
private readonly inputRef;
|
|
3306
|
+
private readonly listRef;
|
|
3307
|
+
protected readonly srOnly: string;
|
|
3308
|
+
/** A refused commit — styles the field and sets aria-invalid until edited. */
|
|
3309
|
+
protected readonly draftInvalid: _angular_core.WritableSignal<boolean>;
|
|
3310
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
3311
|
+
protected readonly resolvedLocale: _angular_core.Signal<string>;
|
|
3312
|
+
protected readonly resolvedHour12: _angular_core.Signal<boolean>;
|
|
3313
|
+
/** The listed times: pinned `slots` verbatim, else the generated step grid. */
|
|
3314
|
+
protected readonly options: _angular_core.Signal<string[]>;
|
|
3315
|
+
protected readonly optionLabels: _angular_core.Signal<string[]>;
|
|
3316
|
+
/** Shared combobox bookkeeping — identical contract to uni-search-input. */
|
|
3317
|
+
protected readonly list: _uni_design_system_uni_angular.ListboxNavigation;
|
|
3318
|
+
protected readonly displayText: _angular_core.Signal<string>;
|
|
3319
|
+
protected readonly resolvedPlaceholder: _angular_core.Signal<string>;
|
|
3320
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
3321
|
+
protected formatValue(time: UniTime): string;
|
|
3322
|
+
protected setValue(time: UniTime | undefined, silent?: boolean): void;
|
|
3323
|
+
private refuse;
|
|
3324
|
+
protected commit(raw: string): boolean;
|
|
3325
|
+
/** Step a committed value ±minuteStep (±1 slot when pinned), clamped. */
|
|
3326
|
+
private stepValue;
|
|
3327
|
+
protected onInputKeydown(event: KeyboardEvent): void;
|
|
3328
|
+
protected onInput(): void;
|
|
3329
|
+
protected onToggle(): void;
|
|
3330
|
+
protected selectOption(time: UniTime): void;
|
|
3331
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
3332
|
+
private openList;
|
|
3333
|
+
private scrollToActive;
|
|
3334
|
+
private scrollToIndex;
|
|
3335
|
+
private setFieldText;
|
|
3336
|
+
private announce;
|
|
3337
|
+
protected readonly className: _angular_core.Signal<string>;
|
|
3338
|
+
protected readonly rowClass: _angular_core.Signal<string>;
|
|
3339
|
+
protected readonly inputClass: _angular_core.Signal<string>;
|
|
3340
|
+
protected readonly toggleWrapClass: _angular_core.Signal<string>;
|
|
3341
|
+
/** Embedded mode: the composer owns the box; keep only the flex row. */
|
|
3342
|
+
protected readonly embeddedClass: _angular_core.Signal<string>;
|
|
3343
|
+
protected readonly listClass: _angular_core.Signal<string>;
|
|
3344
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniTimeInputComponent, never>;
|
|
3345
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniTimeInputComponent, "uni-time-input, TimeInput", 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; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "slots": { "alias": "slots"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "commitOnBlur": { "alias": "commitOnBlur"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "rejected": "rejected"; }, never, never, true, never>;
|
|
3346
|
+
}
|
|
3347
|
+
|
|
2764
3348
|
interface UniToggleOptions {
|
|
2765
3349
|
/**
|
|
2766
3350
|
* The size of the toggle switch
|
|
@@ -2872,5 +3456,5 @@ declare class DragAndDropDirective {
|
|
|
2872
3456
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DragAndDropDirective, "[uni-drag-n-drop], [dragAndDrop]", never, {}, { "onFileDropped": "onFileDropped"; }, never, never, true, never>;
|
|
2873
3457
|
}
|
|
2874
3458
|
|
|
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 };
|
|
3459
|
+
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, UniCalendarComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniCheckboxComponent, UniDataSearchComponent, UniDataTableComponent, UniDateInputComponent, UniDateTimeInputComponent, 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, UniTimeInputComponent, UniToggleComponent, UniTooltipComponent, UniWrapComponent, acceptableFile, addDays, addMonths, anchorArrowStyles, anchorStyles, buildMonthGrid, createListboxNavigation, dayOfWeek, daysInMonth, formatDate, formatMonthHeading, formatTime, getFileExtension, inclusiveDayCount, isDivider, isValidDate, isoDate, joinDateTime, localeDatePlaceholder, localeDefaultHour12, localeFieldOrder, localeMonthNames, localeWeekStart, monthOf, motionSafe, newAnchorName, parseDateText, parseTimeText, resolveFocusTarget, splitDateTime, timeSlots, todayIso, uniqueId, useTimer, visuallyHidden, weekdayNames };
|
|
3460
|
+
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, UniCalendarMarker, UniCalendarMode, UniCalendarOptions, UniCalendarValue, UniCheckboxOptions, UniDataSearchOptions, UniDataTableOptions, UniDatasource, UniDate, UniDateInputOptions, UniDateInputRejection, UniDateRange, UniDateTime, UniDateTimeInputOptions, UniDrawerOptions, UniExpandOptions, UniInputBoxOptions, UniMenuItemOptions, UniMenuOptions, UniMonthGridCell, UniMultiSelectDropdownOptions, UniNotificationBadgeOptions, UniPaginatorOptions, UniRadioOption, UniRadioOptions, UniSearchInputOptions, UniSkeletonOptions, UniSliderOptions, UniStatOptions, UniTabsOptions, UniTagInputOptions, UniTagItem, UniTagOptions, UniTagRejection, UniTagSuggestion, UniTagValue, UniTextareaOptions, UniTime, UniTimeInputOptions, UniTimeInputRejection, UniToggleOptions, UniWeekdayName };
|