ngwr 10.1.0 → 10.2.1
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/alert/styles/_index.scss +7 -3
- package/breadcrumbs/styles/_index.scss +1 -1
- package/dialog/styles/_index.scss +31 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +59 -11
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-calendar.mjs +88 -8
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +4 -4
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +18 -4
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapter-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-adapter.mjs +3 -3
- package/fesm2022/ngwr-date-picker.mjs +336 -54
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +33 -17
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-drag-drop.mjs +7 -7
- package/fesm2022/ngwr-drawer.mjs +37 -19
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +9 -9
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-falling-text.mjs +4 -4
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-hotkey.mjs +31 -10
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +11 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +11 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +4 -4
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-list.mjs +14 -9
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +71 -31
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +4 -4
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +16 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +13 -9
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover.mjs +28 -8
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +9 -9
- package/fesm2022/ngwr-shiny-text.mjs +7 -7
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +27 -17
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +19 -31
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-tilt-card.mjs +7 -7
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +54 -20
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typewriter.mjs +4 -4
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-window.mjs +80 -18
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/en.json +8 -0
- package/i18n/ru.json +8 -0
- package/package.json +1 -1
- package/sidebar/styles/_index.scss +3 -3
- package/stepper/styles/_index.scss +3 -3
- package/tabs/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +29 -8
- package/types/ngwr-button.d.ts +32 -0
- package/types/ngwr-calendar.d.ts +27 -1
- package/types/ngwr-clipboard.d.ts +8 -1
- package/types/ngwr-date-picker.d.ts +124 -8
- package/types/ngwr-dialog.d.ts +13 -0
- package/types/ngwr-drawer.d.ts +15 -0
- package/types/ngwr-hotkey.d.ts +2 -0
- package/types/ngwr-list.d.ts +7 -2
- package/types/ngwr-loading-bar.d.ts +4 -7
- package/types/ngwr-pagination.d.ts +6 -1
- package/types/ngwr-popover.d.ts +10 -2
- package/types/ngwr-storage.d.ts +10 -1
- package/types/ngwr-toast.d.ts +19 -4
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +23 -2
- package/typography/styles/_index.scss +2 -2
|
@@ -28,7 +28,15 @@ $base-colors: (
|
|
|
28
28
|
$contrast-threshold: 150 !default;
|
|
29
29
|
|
|
30
30
|
// Dark text used on light backgrounds.
|
|
31
|
-
|
|
31
|
+
//
|
|
32
|
+
// Pure black, not a near-black. `_contrast()` does not blend — it picks
|
|
33
|
+
// whichever of these two candidates scores higher against the fill — so this
|
|
34
|
+
// value IS the ceiling for every intent whose label comes out dark, and a
|
|
35
|
+
// softer black spends contrast that cannot be recovered anywhere else.
|
|
36
|
+
// Measured: #171616 cost between 0.74 and 1.95 across the ramp, and left
|
|
37
|
+
// `secondary` clearing AA by 0.02 when 5.26:1 was available. On a saturated
|
|
38
|
+
// chip the two are hard to tell apart; the ratio is not.
|
|
39
|
+
$contrast-dark: #000000 !default;
|
|
32
40
|
|
|
33
41
|
// Light text used on dark backgrounds.
|
|
34
42
|
$contrast-light: #ffffff !default;
|
|
@@ -236,14 +244,27 @@ $contrast-light: #ffffff !default;
|
|
|
236
244
|
// intent to warning's share would drag primary to near-navy for no reason.
|
|
237
245
|
// Each is the measured minimum that clears 4.5:1 in BOTH themes on the surface
|
|
238
246
|
// and on the tag's 6% / 10% tints, with 3pp of headroom.
|
|
247
|
+
// Calibrated against the `-soft` TINT, not the plain surface — it is the
|
|
248
|
+
// darker of the two backgrounds `-ink` is documented for, in both themes, so
|
|
249
|
+
// it is the binding one.
|
|
250
|
+
//
|
|
251
|
+
// Each share is the LARGEST (most saturated) value that still reaches 5.0:1
|
|
252
|
+
// there. Targeting AA's 4.5 exactly is what the first pass did, and it left
|
|
253
|
+
// every intent between 4.59 and 4.83 — inside rounding distance of the line.
|
|
254
|
+
// Anything that shifted the background a little then pushed it under:
|
|
255
|
+
// `wr-typography--code` measured 4.24 with `success-ink`, `wr-tag--primary`
|
|
256
|
+
// 4.42. Half a point of headroom absorbs that, for 2–7 points of share.
|
|
257
|
+
//
|
|
258
|
+
// Going further is not free: 5.25 costs 7–11 points and 5.5 up to 14, which
|
|
259
|
+
// on `primary` means 93% -> 79% and a visibly muddier blue.
|
|
239
260
|
$ink-mix: (
|
|
240
|
-
primary:
|
|
241
|
-
secondary:
|
|
242
|
-
success:
|
|
243
|
-
warning:
|
|
244
|
-
danger:
|
|
245
|
-
info:
|
|
246
|
-
medium:
|
|
261
|
+
primary: 86%,
|
|
262
|
+
secondary: 75%,
|
|
263
|
+
success: 67%,
|
|
264
|
+
warning: 48%,
|
|
265
|
+
danger: 72%,
|
|
266
|
+
info: 71%,
|
|
267
|
+
medium: 65%,
|
|
247
268
|
);
|
|
248
269
|
|
|
249
270
|
@each $name, $share in $ink-mix {
|
package/types/ngwr-button.d.ts
CHANGED
|
@@ -113,7 +113,39 @@ declare class WrButton {
|
|
|
113
113
|
* used, falling back to `rounded`.
|
|
114
114
|
*/
|
|
115
115
|
protected readonly effectiveShape: _angular_core.Signal<WrButtonShape>;
|
|
116
|
+
private readonly hostEl;
|
|
117
|
+
/**
|
|
118
|
+
* Whether this instance is the `<wr-btn>` ELEMENT rather than the attribute
|
|
119
|
+
* form on a native `<button>` / `<a>`.
|
|
120
|
+
*
|
|
121
|
+
* The element form is documented as first-class and is what the pagination,
|
|
122
|
+
* event-calendar and popconfirm chrome use — but a custom element has no
|
|
123
|
+
* button semantics of its own. It was rendering with no `role`, no
|
|
124
|
+
* `tabindex` and no keyboard activation, so it was invisible to assistive
|
|
125
|
+
* tech and unreachable by Tab. Measured in Chromium against the built site:
|
|
126
|
+
* the whole `wr-pagination` subtree, 26 elements, contained ZERO focusable
|
|
127
|
+
* nodes and sixty Tab presses never entered it. axe cannot see this — an
|
|
128
|
+
* unknown element with no role simply is not an interactive control to it,
|
|
129
|
+
* which is the same blind spot that lets `disabled` pass unnoticed on a
|
|
130
|
+
* custom element.
|
|
131
|
+
*/
|
|
132
|
+
private readonly isCustomHost;
|
|
133
|
+
private readonly isOff;
|
|
116
134
|
protected readonly nativeDisabled: _angular_core.Signal<"" | null>;
|
|
135
|
+
protected readonly hostRole: _angular_core.Signal<"button" | null>;
|
|
136
|
+
/** Out of the tab order while off — `disabled` is inert on a custom element. */
|
|
137
|
+
protected readonly hostTabIndex: _angular_core.Signal<"0" | null>;
|
|
138
|
+
protected readonly hostAriaDisabled: _angular_core.Signal<"true" | null>;
|
|
139
|
+
/**
|
|
140
|
+
* Enter and Space activate a button. A native one does this for free; a
|
|
141
|
+
* custom element does not, so without this the element form could be focused
|
|
142
|
+
* (once it had a tabindex) and still not be operable.
|
|
143
|
+
*
|
|
144
|
+
* `preventDefault` on Space is not optional — it scrolls the page otherwise.
|
|
145
|
+
* The pointer path needs no guard here: `.wr-btn[disabled]` already sets
|
|
146
|
+
* `pointer-events: none`.
|
|
147
|
+
*/
|
|
148
|
+
protected onHostKeydown(event: KeyboardEvent): void;
|
|
117
149
|
protected readonly classes: _angular_core.Signal<string>;
|
|
118
150
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrButton, never>;
|
|
119
151
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrButton, "wr-btn, button[wr-btn], a[wr-btn]", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "isDisabledWhenLoading": { "alias": "isDisabledWhenLoading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
package/types/ngwr-calendar.d.ts
CHANGED
|
@@ -56,10 +56,20 @@ declare class WrCalendar {
|
|
|
56
56
|
readonly max: _angular_core.InputSignal<Date | null>;
|
|
57
57
|
/** Predicate — return `false` to disable specific dates (e.g. weekends only). */
|
|
58
58
|
readonly dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Move real focus onto the roving cell as soon as the grid is on screen.
|
|
61
|
+
*
|
|
62
|
+
* Off by default: a standalone `<wr-calendar>` sitting in a page must not
|
|
63
|
+
* steal focus on load. `wr-date-picker` turns it on for the popup it opens
|
|
64
|
+
* from its trigger, where the user asked to be taken to the calendar.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
readonly autoFocus: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
59
68
|
/** Disable interaction entirely. @default false */
|
|
60
69
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
61
70
|
private readonly adapter;
|
|
62
71
|
private readonly host;
|
|
72
|
+
private readonly injector;
|
|
63
73
|
/** Currently displayed month (any date inside it). */
|
|
64
74
|
protected readonly viewDate: _angular_core.WritableSignal<Date>;
|
|
65
75
|
/** Date currently focused by keyboard (single roving tabindex). */
|
|
@@ -105,11 +115,27 @@ declare class WrCalendar {
|
|
|
105
115
|
protected onCellLeave(): void;
|
|
106
116
|
private applyRangeClick;
|
|
107
117
|
protected onKeyDown(event: KeyboardEvent): void;
|
|
118
|
+
/**
|
|
119
|
+
* The first selectable day at or after `candidate`, else the first before it,
|
|
120
|
+
* else `candidate` unchanged when everything nearby is closed off. Bounded at
|
|
121
|
+
* a year each way so a pathological `dateFilter` cannot spin.
|
|
122
|
+
*/
|
|
123
|
+
private nearestEnabled;
|
|
124
|
+
/**
|
|
125
|
+
* The first selectable day at `candidate` or beyond it in `step`'s direction,
|
|
126
|
+
* else null when that whole direction is closed off — which is the answer for
|
|
127
|
+
* an ArrowLeft that would cross `min`: stay put.
|
|
128
|
+
*
|
|
129
|
+
* Direction matters. Reusing `nearestEnabled`, which probes forward first,
|
|
130
|
+
* would send an ArrowLeft over a disabled weekend straight back to the day it
|
|
131
|
+
* started from, so the ring could never cross the hole.
|
|
132
|
+
*/
|
|
133
|
+
private nearestEnabledToward;
|
|
108
134
|
private focusActiveCell;
|
|
109
135
|
/** Used by the template's `track` expression. */
|
|
110
136
|
protected trackByTime(_: number, date: Date): number;
|
|
111
137
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrCalendar, never>;
|
|
112
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrCalendar, "wr-calendar", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "date": "dateChange"; "range": "rangeChange"; }, never, never, true, never>;
|
|
138
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrCalendar, "wr-calendar", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "date": "dateChange"; "range": "rangeChange"; }, never, never, true, never>;
|
|
113
139
|
}
|
|
114
140
|
|
|
115
141
|
export { WrCalendar };
|
|
@@ -54,7 +54,14 @@ declare class WrClipboard {
|
|
|
54
54
|
* return `'unsupported'` when the capability genuinely isn't there.
|
|
55
55
|
*/
|
|
56
56
|
permission(name: 'read' | 'write'): Promise<WrClipboardPermission>;
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Hidden-textarea + `execCommand('copy')` write. Synchronous, no permissions.
|
|
59
|
+
*
|
|
60
|
+
* `select()` takes focus, and the textarea is removed a moment later — so
|
|
61
|
+
* without putting focus back, every copy on a non-secure origin (plain
|
|
62
|
+
* `http://`, which is exactly where the async clipboard is missing) leaves
|
|
63
|
+
* focus on `<body>` and the user's next Tab restarts from the top of the page.
|
|
64
|
+
*/
|
|
58
65
|
private legacyWrite;
|
|
59
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrClipboard, never>;
|
|
60
67
|
static ɵprov: i0.ɵɵInjectableDeclaration<WrClipboard>;
|
|
@@ -84,6 +84,7 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
84
84
|
private readonly host;
|
|
85
85
|
private readonly destroyRef;
|
|
86
86
|
protected readonly inputEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
87
|
+
protected readonly triggerEl: _angular_core.Signal<ElementRef<HTMLButtonElement> | undefined>;
|
|
87
88
|
/** The picked Date. Bound by `[formField]`, or two-way via `[(value)]`. */
|
|
88
89
|
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
89
90
|
/** Emitted on blur so a bound field can mark itself touched. */
|
|
@@ -92,6 +93,14 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
92
93
|
protected readonly text: _angular_core.WritableSignal<string>;
|
|
93
94
|
/** Whether the popover is currently open. */
|
|
94
95
|
protected readonly overlayOpen: _angular_core.WritableSignal<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Where focus came from, captured as an explicit argument at open time —
|
|
98
|
+
* never read off `document.activeElement`, which by then may already be the
|
|
99
|
+
* pane. Every close path that took focus INTO the panel hands it back here.
|
|
100
|
+
*/
|
|
101
|
+
private openedFrom;
|
|
102
|
+
/** Whether the panel this open cycle should take focus. */
|
|
103
|
+
private autoFocusPanel;
|
|
95
104
|
/** Resolved format — falls back to a mode-appropriate default. */
|
|
96
105
|
protected readonly resolvedFormat: _angular_core.Signal<string>;
|
|
97
106
|
protected readonly isTime: _angular_core.Signal<boolean>;
|
|
@@ -99,6 +108,9 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
99
108
|
private readonly labelDate;
|
|
100
109
|
private readonly labelTime;
|
|
101
110
|
private readonly labelDateTime;
|
|
111
|
+
private readonly panelLabelDate;
|
|
112
|
+
private readonly panelLabelTime;
|
|
113
|
+
private readonly panelLabelDateTime;
|
|
102
114
|
/**
|
|
103
115
|
* Accessible name of the text field. Falls back to the placeholder, then to
|
|
104
116
|
* the same catalog string the calendar button uses — the field is a
|
|
@@ -108,6 +120,16 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
108
120
|
private readonly fieldLabel;
|
|
109
121
|
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
110
122
|
protected readonly triggerLabel: _angular_core.Signal<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Accessible name of the popup. The trigger advertises
|
|
125
|
+
* `aria-haspopup="dialog"`, so the panel is a `role="dialog"` — and an unnamed
|
|
126
|
+
* dialog announces as a bare "dialog". Defaults to the catalog's
|
|
127
|
+
* `datePicker.panel*` string for the current `mode`.
|
|
128
|
+
*/
|
|
129
|
+
readonly panelAriaLabel: _angular_core.InputSignal<string | null>;
|
|
130
|
+
/** Popup id — what the trigger's `aria-controls` points at while open. */
|
|
131
|
+
protected readonly panelId: string;
|
|
132
|
+
protected readonly resolvedPanelLabel: _angular_core.Signal<string>;
|
|
111
133
|
protected readonly classes: _angular_core.Signal<string>;
|
|
112
134
|
private overlayRef;
|
|
113
135
|
/** Live calendar ref while the date popover is open — lets the panel track
|
|
@@ -123,6 +145,24 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
123
145
|
/** Called by the input's click — opens the overlay if it isn't open already. */
|
|
124
146
|
protected openOnInput(): void;
|
|
125
147
|
protected toggleOverlay(): void;
|
|
148
|
+
/**
|
|
149
|
+
* The keyboard route into the panel, per the APG date-picker pattern.
|
|
150
|
+
*
|
|
151
|
+
* `Alt+ArrowDown` opens and takes focus; a bare arrow moves focus in when the
|
|
152
|
+
* panel is ALREADY open, which is how someone who opened it by clicking the
|
|
153
|
+
* field gets to the grid. Every other key — characters, Backspace, the
|
|
154
|
+
* horizontal arrows, Home / End — is left to the field untouched, so typing a
|
|
155
|
+
* date keeps working exactly as before.
|
|
156
|
+
*/
|
|
157
|
+
protected onFieldKey(event: KeyboardEvent): void;
|
|
158
|
+
/**
|
|
159
|
+
* Move focus into an already-mounted panel. A plain query is right HERE and
|
|
160
|
+
* wrong at mount time: the panel has settled, so there is no deferral to get
|
|
161
|
+
* wrong — and it keeps `autoFocus` as the single piece of panel API.
|
|
162
|
+
*/
|
|
163
|
+
private focusPanel;
|
|
164
|
+
/** Hand focus back to whatever opened the panel, if it is still on the page. */
|
|
165
|
+
private restoreFocus;
|
|
126
166
|
private openOverlay;
|
|
127
167
|
private attachDate;
|
|
128
168
|
private attachTime;
|
|
@@ -131,12 +171,19 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
131
171
|
/** Push a value to the model while remembering it, so the sync effect treats
|
|
132
172
|
* the resulting change as an echo and leaves the display text alone. */
|
|
133
173
|
private commitValue;
|
|
174
|
+
/**
|
|
175
|
+
* Focus goes back to the opener only when it was still INSIDE the panel —
|
|
176
|
+
* dropped there, it would land on `<body>` and the next Tab would restart
|
|
177
|
+
* from the top of the page. When focus had already moved elsewhere (a click
|
|
178
|
+
* on another control, which is itself what closed us) it is left alone:
|
|
179
|
+
* stealing it back would fight the user for the caret.
|
|
180
|
+
*/
|
|
134
181
|
private closeOverlay;
|
|
135
182
|
private dispose;
|
|
136
183
|
private isOutOfBounds;
|
|
137
184
|
private sameDate;
|
|
138
185
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrDatePicker, never>;
|
|
139
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrDatePicker, "wr-date-picker", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
186
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrDatePicker, "wr-date-picker", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "panelAriaLabel": { "alias": "panelAriaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
140
187
|
}
|
|
141
188
|
|
|
142
189
|
/**
|
|
@@ -154,6 +201,8 @@ declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
154
201
|
*/
|
|
155
202
|
type WrDateRange = readonly [Date | null, Date | null];
|
|
156
203
|
|
|
204
|
+
/** Which end of the range an edit applies to. */
|
|
205
|
+
type RangeEnd = 0 | 1;
|
|
157
206
|
/**
|
|
158
207
|
* Date-range picker — two text inputs sharing one range calendar.
|
|
159
208
|
*
|
|
@@ -224,7 +273,17 @@ declare class WrDateRangePicker implements FormValueControl<WrDateRange | null>
|
|
|
224
273
|
* @default false
|
|
225
274
|
*/
|
|
226
275
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
227
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* Read-only — neither the inputs nor the calendar can change the value.
|
|
278
|
+
*
|
|
279
|
+
* Deliberately stricter than `wr-date-picker`, which still opens its popup
|
|
280
|
+
* while read-only: with two fields feeding one calendar there is no reading
|
|
281
|
+
* of "untypeable" that leaves the grid free to rewrite both ends. The doc
|
|
282
|
+
* used to promise the trigger still opened; the code has always refused, and
|
|
283
|
+
* refusing is the behaviour worth keeping.
|
|
284
|
+
*
|
|
285
|
+
* @default false
|
|
286
|
+
*/
|
|
228
287
|
readonly readonly: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
229
288
|
private readonly adapter;
|
|
230
289
|
private readonly overlay;
|
|
@@ -233,6 +292,8 @@ declare class WrDateRangePicker implements FormValueControl<WrDateRange | null>
|
|
|
233
292
|
private readonly host;
|
|
234
293
|
private readonly destroyRef;
|
|
235
294
|
protected readonly startEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
295
|
+
protected readonly endEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
296
|
+
protected readonly triggerEl: _angular_core.Signal<ElementRef<HTMLButtonElement> | undefined>;
|
|
236
297
|
/** The picked range. Bound by `[formField]`, or two-way via `[(value)]`. */
|
|
237
298
|
readonly value: _angular_core.ModelSignal<WrDateRange | null>;
|
|
238
299
|
/** Emitted on blur so a bound field can mark itself touched. */
|
|
@@ -242,12 +303,34 @@ declare class WrDateRangePicker implements FormValueControl<WrDateRange | null>
|
|
|
242
303
|
protected readonly endText: _angular_core.WritableSignal<string>;
|
|
243
304
|
/** Whether the popover is currently open. */
|
|
244
305
|
protected readonly overlayOpen: _angular_core.WritableSignal<boolean>;
|
|
306
|
+
/**
|
|
307
|
+
* Which element opened the popup — captured as an argument, never read off
|
|
308
|
+
* `document.activeElement`, which by then may already be the pane. With TWO
|
|
309
|
+
* text inputs this is the whole point: "restore focus to the field" is
|
|
310
|
+
* ambiguous here, and the old code resolved it by always picking the START
|
|
311
|
+
* input, so closing from the end input threw the caret across the control.
|
|
312
|
+
*/
|
|
313
|
+
private openedFrom;
|
|
314
|
+
/** Whether the panel this open cycle should take focus. */
|
|
315
|
+
private autoFocusPanel;
|
|
245
316
|
/** Resolved format — falls back to a mode-appropriate default. */
|
|
246
317
|
protected readonly resolvedFormat: _angular_core.Signal<string>;
|
|
247
318
|
protected readonly isDateTime: _angular_core.Signal<boolean>;
|
|
248
319
|
protected readonly triggerLabel: string;
|
|
249
320
|
protected readonly startLabel: string;
|
|
250
321
|
protected readonly endLabel: string;
|
|
322
|
+
private readonly panelLabelRange;
|
|
323
|
+
private readonly panelLabelRangeDateTime;
|
|
324
|
+
/**
|
|
325
|
+
* Accessible name of the popup. The trigger advertises
|
|
326
|
+
* `aria-haspopup="dialog"`, so the pane is a `role="dialog"` — and an unnamed
|
|
327
|
+
* dialog announces as a bare "dialog". Defaults to the catalog's
|
|
328
|
+
* `datePicker.panelRange*` string for the current `mode`.
|
|
329
|
+
*/
|
|
330
|
+
readonly panelAriaLabel: _angular_core.InputSignal<string | null>;
|
|
331
|
+
/** Popup id — what the trigger's `aria-controls` points at while open. */
|
|
332
|
+
protected readonly panelId: string;
|
|
333
|
+
protected readonly resolvedPanelLabel: _angular_core.Signal<string>;
|
|
251
334
|
protected readonly classes: _angular_core.Signal<string>;
|
|
252
335
|
private overlayRef;
|
|
253
336
|
/** Live panel ref while the popover is open — lets typed edits move the
|
|
@@ -261,15 +344,39 @@ declare class WrDateRangePicker implements FormValueControl<WrDateRange | null>
|
|
|
261
344
|
protected onEndInput(event: Event): void;
|
|
262
345
|
protected onBlur(event: FocusEvent): void;
|
|
263
346
|
/** Called by an input's click — opens the overlay if it isn't open already. */
|
|
264
|
-
protected openOnInput(): void;
|
|
347
|
+
protected openOnInput(end: RangeEnd): void;
|
|
265
348
|
protected toggleOverlay(): void;
|
|
349
|
+
/**
|
|
350
|
+
* The keyboard route into the popup, per the APG date-picker pattern, and the
|
|
351
|
+
* only one either field has. `Alt+ArrowDown` opens and takes focus; a bare
|
|
352
|
+
* vertical arrow walks focus in when the popup is ALREADY open, which is how
|
|
353
|
+
* someone who opened it by clicking a field reaches the grid. Every other key
|
|
354
|
+
* belongs to the field, so typing a date keeps working with the popup open.
|
|
355
|
+
*/
|
|
356
|
+
protected onFieldKey(event: KeyboardEvent, end: RangeEnd): void;
|
|
357
|
+
/** The input element for an end — the two are otherwise addressed by index. */
|
|
358
|
+
private fieldEl;
|
|
359
|
+
/**
|
|
360
|
+
* Move focus into an already-mounted panel. A plain query is right HERE and
|
|
361
|
+
* wrong at mount time: the panel has settled, so there is no deferral to get
|
|
362
|
+
* wrong — and it keeps `autoFocus` as the single piece of panel API.
|
|
363
|
+
*/
|
|
364
|
+
private focusPanel;
|
|
365
|
+
/** Hand focus back to whatever opened the popup, if it is still on the page. */
|
|
366
|
+
private restoreFocus;
|
|
266
367
|
private onRangeInput;
|
|
267
368
|
private openOverlay;
|
|
268
369
|
/**
|
|
269
|
-
* Close the popover
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* the
|
|
370
|
+
* Close the popover, handing focus back to whichever field or button opened
|
|
371
|
+
* it — but ONLY when focus was still inside the pane. Dropped there it would
|
|
372
|
+
* land on `<body>` and the next Tab would restart from the top of the page;
|
|
373
|
+
* moved on by the user, it must be left where they put it.
|
|
374
|
+
*
|
|
375
|
+
* There is deliberately no "always restore" escape hatch. Escape reaches this
|
|
376
|
+
* overlay from anywhere in the document (the CDK dispatches it to the topmost
|
|
377
|
+
* one), so forcing a restore would drag the caret backwards out of the field
|
|
378
|
+
* the user was actually typing in — into the one that happened to open the
|
|
379
|
+
* popup, possibly several Tab stops away.
|
|
273
380
|
*/
|
|
274
381
|
private closeOverlay;
|
|
275
382
|
private dispose;
|
|
@@ -300,9 +407,18 @@ declare class WrDateRangePicker implements FormValueControl<WrDateRange | null>
|
|
|
300
407
|
*/
|
|
301
408
|
private isOutOfBounds;
|
|
302
409
|
private sameDate;
|
|
410
|
+
/**
|
|
411
|
+
* `null` and `[null, null]` are the same VALUE — an empty range — and treating
|
|
412
|
+
* them as different is what let the FIRST blur on an untouched picker write
|
|
413
|
+
* `[null, null]` over the `null` it was bound to. No date had moved, but
|
|
414
|
+
* `model()` emitted: a bound `[formField]` went dirty from nothing but tabbing
|
|
415
|
+
* through, and a consumer's `@if (period())` flipped from empty to truthy with
|
|
416
|
+
* neither end picked. The write guard in `commitRange` is only as good as this
|
|
417
|
+
* comparison.
|
|
418
|
+
*/
|
|
303
419
|
private sameRange;
|
|
304
420
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrDateRangePicker, never>;
|
|
305
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrDateRangePicker, "wr-date-range-picker", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "startPlaceholder": { "alias": "startPlaceholder"; "required": false; "isSignal": true; }; "endPlaceholder": { "alias": "endPlaceholder"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
421
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrDateRangePicker, "wr-date-range-picker", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "startPlaceholder": { "alias": "startPlaceholder"; "required": false; "isSignal": true; }; "endPlaceholder": { "alias": "endPlaceholder"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "panelAriaLabel": { "alias": "panelAriaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
306
422
|
}
|
|
307
423
|
|
|
308
424
|
export { WrDatePicker, WrDateRangePicker };
|
package/types/ngwr-dialog.d.ts
CHANGED
|
@@ -140,6 +140,19 @@ declare class WrDialog {
|
|
|
140
140
|
private readonly responsiveConfig;
|
|
141
141
|
private readonly i18n;
|
|
142
142
|
open<C, R = unknown, D = unknown>(component: ComponentType<C>, options?: WrDialogOptions<D>): WrDialogRef<C, R>;
|
|
143
|
+
/**
|
|
144
|
+
* The dismiss button's accessible name.
|
|
145
|
+
*
|
|
146
|
+
* Two failure modes, and resolving PER OPEN is what covers both. `t()` hands
|
|
147
|
+
* back the KEY on a miss, and `WrI18n` is root-provided with an empty catalog
|
|
148
|
+
* by default, so an app that never configured i18n named its dismiss button
|
|
149
|
+
* "dialog.close" — a name axe cannot fault, because a name is present, and a
|
|
150
|
+
* screen reader reads out verbatim. Resolving once at injection time fixed
|
|
151
|
+
* that but froze the answer: this is a root service, constructed before an
|
|
152
|
+
* async catalog has loaded, so a localized app got the English fallback on
|
|
153
|
+
* every dialog it ever opened.
|
|
154
|
+
*/
|
|
155
|
+
private closeLabel;
|
|
143
156
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialog, never>;
|
|
144
157
|
static ɵprov: i0.ɵɵInjectableDeclaration<WrDialog>;
|
|
145
158
|
}
|
package/types/ngwr-drawer.d.ts
CHANGED
|
@@ -254,6 +254,21 @@ declare class WrDrawerManager {
|
|
|
254
254
|
private readonly isBrowser;
|
|
255
255
|
private readonly i18n;
|
|
256
256
|
open<C, R = unknown, D = unknown>(component: ComponentType<C>, options?: WrDrawerOptions<D>): WrDrawerRef<C, R>;
|
|
257
|
+
/**
|
|
258
|
+
* The dismiss button's accessible name.
|
|
259
|
+
*
|
|
260
|
+
* Resolved per open, not once at injection: this is a root service, so a
|
|
261
|
+
* `readI18nText` field — which is what `WrDialog` uses — would be evaluated
|
|
262
|
+
* before an async catalog had loaded and then freeze that answer for the life
|
|
263
|
+
* of the app.
|
|
264
|
+
*
|
|
265
|
+
* The miss check is the point. `t()` hands back the KEY when the catalog has
|
|
266
|
+
* no entry, and `WrI18n` is root-provided with an empty catalog by default —
|
|
267
|
+
* so an app that never configured i18n got a button announced as
|
|
268
|
+
* "drawer.close, button". A name WAS present, which is exactly why the axe
|
|
269
|
+
* gate could not see it.
|
|
270
|
+
*/
|
|
271
|
+
private closeLabel;
|
|
257
272
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrDrawerManager, never>;
|
|
258
273
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WrDrawerManager>;
|
|
259
274
|
}
|
package/types/ngwr-hotkey.d.ts
CHANGED
|
@@ -68,9 +68,11 @@ declare class WrHotkey {
|
|
|
68
68
|
private readonly doc;
|
|
69
69
|
private readonly zone;
|
|
70
70
|
private readonly platform;
|
|
71
|
+
private readonly destroyRef;
|
|
71
72
|
private readonly isMac;
|
|
72
73
|
/** Bindings grouped by listener target. */
|
|
73
74
|
private readonly registries;
|
|
75
|
+
constructor();
|
|
74
76
|
/** Register a binding. */
|
|
75
77
|
bind(spec: WrHotkeySpec, handler: (event: KeyboardEvent) => void, options?: WrHotkeyOptions): WrHotkeyHandle;
|
|
76
78
|
private readonly listeners;
|
package/types/ngwr-list.d.ts
CHANGED
|
@@ -43,8 +43,13 @@ declare class WrList {
|
|
|
43
43
|
* - default — main label / body
|
|
44
44
|
* - `[wrListItemTrailing]` — meta value, action button, chevron
|
|
45
45
|
*
|
|
46
|
-
* Set `interactive` to get hover
|
|
47
|
-
*
|
|
46
|
+
* Set `interactive` to get hover and cursor styles, a tab stop, and Enter /
|
|
47
|
+
* Space activation. The role stays `listitem`: the row lives inside a
|
|
48
|
+
* `<ul role="list">`, where a `button` or `option` child role would break the
|
|
49
|
+
* structure the container promises. That means an interactive row ANNOUNCES as
|
|
50
|
+
* a list item rather than as a control — deliberate, but worth knowing when the
|
|
51
|
+
* whole row is the only way to reach an action. Where the action needs to be
|
|
52
|
+
* announced as one, project a real button into `[wrListItemTrailing]`.
|
|
48
53
|
*
|
|
49
54
|
* @example
|
|
50
55
|
* ```html
|
|
@@ -4,13 +4,6 @@ import { Signal } from '@angular/core';
|
|
|
4
4
|
/** Public state of the loading bar. */
|
|
5
5
|
type WrLoadingState = 'idle' | 'running' | 'completing';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
*
|
|
10
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
7
|
/**
|
|
15
8
|
* Singleton state machine for a top-of-page progress indicator. Driven
|
|
16
9
|
* by router events out of the box, plus a manual `start()` / `complete()`
|
|
@@ -30,6 +23,8 @@ type WrLoadingState = 'idle' | 'running' | 'completing';
|
|
|
30
23
|
*/
|
|
31
24
|
declare class WrLoadingBar {
|
|
32
25
|
private readonly router;
|
|
26
|
+
private readonly destroyRef;
|
|
27
|
+
private readonly isBrowser;
|
|
33
28
|
/** Live count of pending "tasks" (manual + router). */
|
|
34
29
|
private readonly count;
|
|
35
30
|
/** Tween value `[0, 1]` — the bar's actual width. */
|
|
@@ -37,6 +32,7 @@ declare class WrLoadingBar {
|
|
|
37
32
|
readonly progress: Signal<number>;
|
|
38
33
|
readonly state: Signal<WrLoadingState>;
|
|
39
34
|
private timer;
|
|
35
|
+
private holdTimer;
|
|
40
36
|
constructor();
|
|
41
37
|
/** Reserve a slot. The bar starts trickling as long as `count > 0`. */
|
|
42
38
|
start(): void;
|
|
@@ -46,6 +42,7 @@ declare class WrLoadingBar {
|
|
|
46
42
|
reset(): void;
|
|
47
43
|
private beginTrickle;
|
|
48
44
|
private stopTrickle;
|
|
45
|
+
private clearHold;
|
|
49
46
|
private finish;
|
|
50
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrLoadingBar, never>;
|
|
51
48
|
static ɵprov: i0.ɵɵInjectableDeclaration<WrLoadingBar>;
|
|
@@ -123,7 +123,12 @@ declare class WrPagination {
|
|
|
123
123
|
protected readonly classes: _angular_core.Signal<string>;
|
|
124
124
|
protected isCurrent(page: number): boolean;
|
|
125
125
|
protected goTo(page: number | typeof ELLIPSIS): void;
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* `wr-select` carries an `unknown` value by design, so the size arrives
|
|
128
|
+
* untyped and is narrowed here. It used to arrive as `any` through
|
|
129
|
+
* `[ngModel]`, which hid the coercion rather than removing the need for it.
|
|
130
|
+
*/
|
|
131
|
+
protected onSizeChange(size: unknown): void;
|
|
127
132
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPagination, never>;
|
|
128
133
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPagination, "wr-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showSizeChanger": { "alias": "showSizeChanger"; "required": false; "isSignal": true; }; "showTotal": { "alias": "showTotal"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ofLabel": { "alias": "ofLabel"; "required": false; "isSignal": true; }; "prevLabel": { "alias": "prevLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "pageSize": "pageSizeChange"; }, never, never, true, never>;
|
|
129
134
|
}
|
package/types/ngwr-popover.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare class WrPopover {
|
|
|
26
26
|
* - `'tooltip'` — text content, hover+focus trigger, `role="tooltip"`,
|
|
27
27
|
* `aria-describedby` on the host.
|
|
28
28
|
*/
|
|
29
|
-
readonly mode: _angular_core.InputSignal<"
|
|
29
|
+
readonly mode: _angular_core.InputSignal<"popover" | "tooltip">;
|
|
30
30
|
/**
|
|
31
31
|
* How the popover opens. Ignored in tooltip mode — tooltips are always
|
|
32
32
|
* hover+focus. @default 'click'
|
|
@@ -45,6 +45,13 @@ declare class WrPopover {
|
|
|
45
45
|
* overrides it. Tooltips never become sheets. @default undefined
|
|
46
46
|
*/
|
|
47
47
|
readonly responsive: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
48
|
+
/**
|
|
49
|
+
* Popover mode only — accessible name of the panel. `role="dialog"` with no
|
|
50
|
+
* name announces as a bare "dialog", so the catalog's `popover.label` is used
|
|
51
|
+
* when nothing is given. A popover has no universal name; whenever the panel
|
|
52
|
+
* has a heading or a purpose, pass it.
|
|
53
|
+
*/
|
|
54
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
48
55
|
/** Fires after the panel opens. */
|
|
49
56
|
readonly opened: _angular_core.OutputEmitterRef<void>;
|
|
50
57
|
/** Fires after the panel closes. */
|
|
@@ -62,6 +69,7 @@ declare class WrPopover {
|
|
|
62
69
|
protected readonly isTooltip: _angular_core.Signal<boolean>;
|
|
63
70
|
/** Auto-generated id for `aria-controls` / `aria-describedby`. */
|
|
64
71
|
protected readonly panelId: string;
|
|
72
|
+
private readonly resolvedAriaLabel;
|
|
65
73
|
private readonly resolvedPosition;
|
|
66
74
|
private overlayRef;
|
|
67
75
|
private hoverCloseTimer;
|
|
@@ -93,7 +101,7 @@ declare class WrPopover {
|
|
|
93
101
|
private scheduleHoverClose;
|
|
94
102
|
private clearHoverClose;
|
|
95
103
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPopover, never>;
|
|
96
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopover, "[wrPopover]", never, { "content": { "alias": "wrPopover"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
104
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopover, "[wrPopover]", never, { "content": { "alias": "wrPopover"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
export { WrPopover };
|
package/types/ngwr-storage.d.ts
CHANGED
|
@@ -37,7 +37,16 @@ declare class WrStorage {
|
|
|
37
37
|
private readonly engine;
|
|
38
38
|
private readonly config;
|
|
39
39
|
private readonly isBrowser;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Per-key watchers. Shared so multiple `watch(k)` calls reuse one signal.
|
|
42
|
+
*
|
|
43
|
+
* The fallback is kept alongside the signal because every refresh has to read
|
|
44
|
+
* the key the same way `watch` first did. Refreshing without it made `get` and
|
|
45
|
+
* `watch` disagree about what an ABSENT key means: after a `remove()` the
|
|
46
|
+
* signal went to `null` while `get(key, fallback)` still answered with the
|
|
47
|
+
* default, so a consumer watching `'theme'` with a `'light'` fallback got no
|
|
48
|
+
* theme at all rather than the light one.
|
|
49
|
+
*/
|
|
41
50
|
private readonly watchers;
|
|
42
51
|
private listenerInstalled;
|
|
43
52
|
/** Is `key` present (regardless of value / expiry)? */
|