@eagami/ui 5.96.0 → 5.98.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.
- package/fesm2022/eagami-ui.mjs +324 -43
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +73 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.98.0",
|
|
4
4
|
"description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
|
|
5
5
|
"author": "Michal Wiraszka <michal@eagami.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/eagami-ui.d.ts
CHANGED
|
@@ -155,6 +155,12 @@ export interface EagamiMessages {
|
|
|
155
155
|
nextMonth: string;
|
|
156
156
|
nextYear: string;
|
|
157
157
|
today: string;
|
|
158
|
+
rangePlaceholder: string;
|
|
159
|
+
rangeDialogLabel: string;
|
|
160
|
+
clearRange: string;
|
|
161
|
+
rangeStartDay: (day: number) => string;
|
|
162
|
+
rangeEndDay: (day: number) => string;
|
|
163
|
+
chooseEndDate: string;
|
|
158
164
|
/** Abbreviated weekday names, Sunday first (index 0), for the calendar
|
|
159
165
|
* header. Bundled so the calendar localizes even when the runtime's
|
|
160
166
|
* `Intl` lacks this locale's date data. */
|
|
@@ -188,6 +194,8 @@ export interface EagamiMessages {
|
|
|
188
194
|
browse: string;
|
|
189
195
|
removeFile: (name: string) => string;
|
|
190
196
|
fileListLabel: string;
|
|
197
|
+
/** Note screen readers hear on the picker when the uploader is read-only. */
|
|
198
|
+
readonly: string;
|
|
191
199
|
constraintsAccept: (accept: string) => string;
|
|
192
200
|
constraintsMaxSize: (size: string) => string;
|
|
193
201
|
constraintsMaxFiles: (count: number) => string;
|
|
@@ -3754,12 +3762,20 @@ export interface DatePickerDateRange {
|
|
|
3754
3762
|
start: Date;
|
|
3755
3763
|
end: Date;
|
|
3756
3764
|
}
|
|
3765
|
+
/** Whether a pick selects one date or a start and end date. */
|
|
3766
|
+
export type DatePickerMode = 'single' | 'range';
|
|
3767
|
+
/** Value reported to Angular forms: a `Date` in `single` mode, a `DatePickerDateRange` in `range` mode. */
|
|
3768
|
+
export type DatePickerControlValue = Date | DatePickerDateRange | null;
|
|
3757
3769
|
interface CalendarDay {
|
|
3758
3770
|
date: Date;
|
|
3759
3771
|
day: number;
|
|
3760
3772
|
isCurrentMonth: boolean;
|
|
3761
3773
|
isToday: boolean;
|
|
3762
3774
|
isSelected: boolean;
|
|
3775
|
+
isRangeStart: boolean;
|
|
3776
|
+
isRangeEnd: boolean;
|
|
3777
|
+
/** Strictly between the ends of the highlighted range. */
|
|
3778
|
+
isInRange: boolean;
|
|
3763
3779
|
isDisabled: boolean;
|
|
3764
3780
|
isFocused: boolean;
|
|
3765
3781
|
}
|
|
@@ -3769,8 +3785,9 @@ interface CalendarDay {
|
|
|
3769
3785
|
* or with a month name) and is rewritten in the configured `format` on commit.
|
|
3770
3786
|
* Supports `min`/`max` bounds, disabled weekdays and dates, configurable week
|
|
3771
3787
|
* start, locale-aware formatting via `Intl.DateTimeFormat`, and full keyboard
|
|
3772
|
-
* navigation (arrows, PageUp/PageDown, Home/End, Enter, Escape).
|
|
3773
|
-
*
|
|
3788
|
+
* navigation (arrows, PageUp/PageDown, Home/End, Enter, Escape). In `range`
|
|
3789
|
+
* mode two picks set a start and end date, and the range is typed as two dates
|
|
3790
|
+
* joined by an en dash. Integrates with Angular forms via `ControlValueAccessor`.
|
|
3774
3791
|
*/
|
|
3775
3792
|
export declare class DatePickerComponent extends LabelledFieldControlBase implements ControlValueAccessor {
|
|
3776
3793
|
protected readonly fieldEl: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
@@ -3798,9 +3815,15 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3798
3815
|
readonly weekStartsOn: import("@angular/core").InputSignal<DatePickerWeekStart>;
|
|
3799
3816
|
readonly locale: import("@angular/core").InputSignal<string | undefined>;
|
|
3800
3817
|
readonly id: import("@angular/core").InputSignal<string>;
|
|
3818
|
+
/** Picks one date, or a start and end date in `range` mode, where only the two ends need to be available days. */
|
|
3819
|
+
readonly mode: import("@angular/core").InputSignal<DatePickerMode>;
|
|
3801
3820
|
readonly value: import("@angular/core").ModelSignal<Date | null>;
|
|
3821
|
+
/** Selected start and end dates in `range` mode, two-way bindable via `[(range)]`. */
|
|
3822
|
+
readonly range: import("@angular/core").ModelSignal<DatePickerDateRange | null>;
|
|
3802
3823
|
/** Fires when the selected date changes, including when cleared. */
|
|
3803
3824
|
readonly changed: import("@angular/core").OutputEmitterRef<Date | null>;
|
|
3825
|
+
/** Fires in `range` mode when the selected range changes, including when cleared. */
|
|
3826
|
+
readonly rangeChanged: import("@angular/core").OutputEmitterRef<DatePickerDateRange | null>;
|
|
3804
3827
|
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
3805
3828
|
readonly viewYear: import("@angular/core").WritableSignal<number>;
|
|
3806
3829
|
readonly viewMonth: import("@angular/core").WritableSignal<number>;
|
|
@@ -3809,6 +3832,8 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3809
3832
|
private readonly isFocused;
|
|
3810
3833
|
/** Entry in progress, held verbatim until it is committed or abandoned. */
|
|
3811
3834
|
private readonly draft;
|
|
3835
|
+
protected readonly rangeAnchor: import("@angular/core").WritableSignal<Date | null>;
|
|
3836
|
+
private readonly hoveredDate;
|
|
3812
3837
|
private onChange;
|
|
3813
3838
|
private onTouched;
|
|
3814
3839
|
readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
@@ -3830,8 +3855,12 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3830
3855
|
private readonly intlLocalizesEffectiveLocale;
|
|
3831
3856
|
/** Placeholder text, empty unless a `placeholder` is given. */
|
|
3832
3857
|
readonly resolvedPlaceholder: import("@angular/core").Signal<string>;
|
|
3858
|
+
protected readonly isRange: import("@angular/core").Signal<boolean>;
|
|
3859
|
+
protected readonly hasValue: import("@angular/core").Signal<boolean>;
|
|
3833
3860
|
/** Accessible name when neither `label` nor `aria-labelledby` is given. */
|
|
3834
3861
|
protected readonly fallbackLabel: import("@angular/core").Signal<string>;
|
|
3862
|
+
protected readonly dialogLabel: import("@angular/core").Signal<string>;
|
|
3863
|
+
protected readonly clearLabel: import("@angular/core").Signal<string>;
|
|
3835
3864
|
readonly dialogId: import("@angular/core").Signal<string>;
|
|
3836
3865
|
readonly fieldClasses: import("@angular/core").Signal<{
|
|
3837
3866
|
'ea-date-picker__field--focused': boolean;
|
|
@@ -3847,9 +3876,11 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3847
3876
|
readonly inputText: import("@angular/core").Signal<string>;
|
|
3848
3877
|
readonly monthYearLabel: import("@angular/core").Signal<string>;
|
|
3849
3878
|
readonly weekdayLabels: import("@angular/core").Signal<string[]>;
|
|
3879
|
+
/** Committed range, or the one being picked: from the anchor to the hovered or focused day. */
|
|
3880
|
+
private readonly highlightedRange;
|
|
3850
3881
|
readonly weeks: import("@angular/core").Signal<CalendarDay[][]>;
|
|
3851
|
-
writeValue(val: DatePickerValue): void;
|
|
3852
|
-
registerOnChange(fn: (value:
|
|
3882
|
+
writeValue(val: DatePickerValue | DatePickerDateRange): void;
|
|
3883
|
+
registerOnChange(fn: (value: DatePickerControlValue) => void): void;
|
|
3853
3884
|
registerOnTouched(fn: () => void): void;
|
|
3854
3885
|
setDisabledState(isDisabled: boolean): void;
|
|
3855
3886
|
/** Toggles the calendar popover between open and closed. */
|
|
@@ -3862,8 +3893,12 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3862
3893
|
/** Moves keyboard focus to the date field. */
|
|
3863
3894
|
focus(): void;
|
|
3864
3895
|
selectDay(day: CalendarDay): void;
|
|
3865
|
-
|
|
3896
|
+
protected onDayHover(day: CalendarDay): void;
|
|
3897
|
+
protected rangeDayLabel(day: CalendarDay): string | null;
|
|
3898
|
+
protected onGridLeave(): void;
|
|
3899
|
+
/** Clears the selected date, or range in `range` mode, and emits `changed` or `rangeChanged` with `null`. */
|
|
3866
3900
|
clear(event: Event): void;
|
|
3901
|
+
private pick;
|
|
3867
3902
|
goToPrevMonth(): void;
|
|
3868
3903
|
goToNextMonth(): void;
|
|
3869
3904
|
goToPrevYear(): void;
|
|
@@ -3881,14 +3916,21 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3881
3916
|
protected onInputBlur(): void;
|
|
3882
3917
|
protected handleInputKeydown(event: KeyboardEvent): void;
|
|
3883
3918
|
private commitDraft;
|
|
3919
|
+
private commitRangeEntry;
|
|
3920
|
+
private parseEntry;
|
|
3921
|
+
private applyRange;
|
|
3884
3922
|
private applyValue;
|
|
3885
3923
|
private isUnavailable;
|
|
3886
3924
|
private covers;
|
|
3887
3925
|
handleGridKeydown(event: KeyboardEvent): void;
|
|
3888
3926
|
/** Called by `<ea-popover>` when the user clicks outside the picker. */
|
|
3889
3927
|
onPopoverCloseRequested(): void;
|
|
3928
|
+
private formatDate;
|
|
3890
3929
|
private formatOptions;
|
|
3891
3930
|
private toDate;
|
|
3931
|
+
private isDateRange;
|
|
3932
|
+
private toRange;
|
|
3933
|
+
private orderRange;
|
|
3892
3934
|
private startOfDay;
|
|
3893
3935
|
private isSameDay;
|
|
3894
3936
|
private addDays;
|
|
@@ -3965,14 +4007,26 @@ export declare class DatePickerComponent extends LabelledFieldControlBase implem
|
|
|
3965
4007
|
"required": false;
|
|
3966
4008
|
"isSignal": true;
|
|
3967
4009
|
};
|
|
4010
|
+
"mode": {
|
|
4011
|
+
"alias": "mode";
|
|
4012
|
+
"required": false;
|
|
4013
|
+
"isSignal": true;
|
|
4014
|
+
};
|
|
3968
4015
|
"value": {
|
|
3969
4016
|
"alias": "value";
|
|
3970
4017
|
"required": false;
|
|
3971
4018
|
"isSignal": true;
|
|
3972
4019
|
};
|
|
4020
|
+
"range": {
|
|
4021
|
+
"alias": "range";
|
|
4022
|
+
"required": false;
|
|
4023
|
+
"isSignal": true;
|
|
4024
|
+
};
|
|
3973
4025
|
}, {
|
|
3974
4026
|
"value": "valueChange";
|
|
4027
|
+
"range": "rangeChange";
|
|
3975
4028
|
"changed": "changed";
|
|
4029
|
+
"rangeChanged": "rangeChanged";
|
|
3976
4030
|
}, never, never, true, never>;
|
|
3977
4031
|
}
|
|
3978
4032
|
/** Width preset of the dialog panel. */
|
|
@@ -4868,6 +4922,11 @@ export declare class FileUploaderComponent extends LabelledFieldControlBase impl
|
|
|
4868
4922
|
*/
|
|
4869
4923
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
4870
4924
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
4925
|
+
/**
|
|
4926
|
+
* Keeps the picker focusable and the file list readable while blocking picking,
|
|
4927
|
+
* dropping and removing files. Screen readers hear a "Read-only" note on the picker.
|
|
4928
|
+
*/
|
|
4929
|
+
readonly readonly: import("@angular/core").InputSignal<boolean>;
|
|
4871
4930
|
/**
|
|
4872
4931
|
* Whether a selection adds to the current files or replaces them. Defaults
|
|
4873
4932
|
* to `true`: picking a second file appends it rather than swapping it in, so
|
|
@@ -4912,6 +4971,7 @@ export declare class FileUploaderComponent extends LabelledFieldControlBase impl
|
|
|
4912
4971
|
private onChange;
|
|
4913
4972
|
private onTouched;
|
|
4914
4973
|
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
4974
|
+
protected readonly isReadonly: import("@angular/core").Signal<boolean>;
|
|
4915
4975
|
private readonly errorState;
|
|
4916
4976
|
protected readonly errorText: import("@angular/core").Signal<string | null>;
|
|
4917
4977
|
protected readonly hasError: import("@angular/core").Signal<boolean>;
|
|
@@ -4922,12 +4982,14 @@ export declare class FileUploaderComponent extends LabelledFieldControlBase impl
|
|
|
4922
4982
|
'ea-file-uploader-field--button': boolean;
|
|
4923
4983
|
'ea-file-uploader-field--error': boolean;
|
|
4924
4984
|
'ea-file-uploader-field--disabled': boolean;
|
|
4985
|
+
'ea-file-uploader-field--readonly': boolean;
|
|
4925
4986
|
'ea-file-uploader-field--drag-over': boolean;
|
|
4926
4987
|
'ea-file-uploader-field--focused': boolean;
|
|
4927
4988
|
}>;
|
|
4928
4989
|
protected readonly errorId: import("@angular/core").Signal<string>;
|
|
4929
4990
|
protected readonly hintId: import("@angular/core").Signal<string>;
|
|
4930
4991
|
protected readonly constraintsId: import("@angular/core").Signal<string>;
|
|
4992
|
+
protected readonly readonlyId: import("@angular/core").Signal<string>;
|
|
4931
4993
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
4932
4994
|
/** Joined human-readable description of accept / maxSize / maxFiles limits. */
|
|
4933
4995
|
protected readonly constraintsText: import("@angular/core").Signal<string>;
|
|
@@ -4950,6 +5012,7 @@ export declare class FileUploaderComponent extends LabelledFieldControlBase impl
|
|
|
4950
5012
|
protected onFileSelected(event: Event): void;
|
|
4951
5013
|
protected onDragEnter(event: DragEvent): void;
|
|
4952
5014
|
protected onDragOver(event: DragEvent): void;
|
|
5015
|
+
private takeDrag;
|
|
4953
5016
|
protected onDragLeave(event: DragEvent): void;
|
|
4954
5017
|
protected onDrop(event: DragEvent): void;
|
|
4955
5018
|
private setDragOver;
|
|
@@ -4992,6 +5055,11 @@ export declare class FileUploaderComponent extends LabelledFieldControlBase impl
|
|
|
4992
5055
|
"required": false;
|
|
4993
5056
|
"isSignal": true;
|
|
4994
5057
|
};
|
|
5058
|
+
"readonly": {
|
|
5059
|
+
"alias": "readonly";
|
|
5060
|
+
"required": false;
|
|
5061
|
+
"isSignal": true;
|
|
5062
|
+
};
|
|
4995
5063
|
"multiple": {
|
|
4996
5064
|
"alias": "multiple";
|
|
4997
5065
|
"required": false;
|