ngwr 12.0.0 → 12.2.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/README.md +79 -20
- package/alert/styles/_index.scss +11 -4
- package/badge/styles/_index.scss +30 -0
- package/badge/styles/_tag.scss +15 -1
- package/descriptions/styles/_index.scss +13 -3
- package/drawer/styles/_index.scss +95 -1
- 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 +3 -3
- package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +3 -3
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- 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-adapters-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker.mjs +18 -18
- package/fesm2022/ngwr-date.mjs +3 -3
- 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 +15 -15
- 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 +6 -6
- package/fesm2022/ngwr-drawer.mjs +24 -18
- 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 +3 -3
- 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 +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- 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 +3 -3
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- 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 +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +72 -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 +6 -6
- 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-testing.mjs +71 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +98 -8
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +22 -12
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +6 -6
- 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 +6 -6
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +18 -18
- 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 +6 -6
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +9 -9
- 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 +3 -3
- 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 +3 -3
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +12 -12
- package/llms-full.txt +1 -1
- package/llms.txt +24 -2
- package/overlay/styles/_arrow.scss +243 -0
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +17 -0
- package/popover/styles/_index.scss +49 -207
- package/select/styles/_index.scss +30 -4
- package/sidebar/styles/_index.scss +4 -1
- package/stepper/styles/_index.scss +44 -5
- package/theme/styles/_mixins.scss +10 -0
- package/tree/styles/_index.scss +10 -2
- package/types/ngwr-pagination.d.ts +11 -0
- package/types/ngwr-segmented-testing.d.ts +44 -0
- package/types/ngwr-segmented.d.ts +86 -4
- package/types/ngwr-select.d.ts +12 -2
- package/types/ngwr-version.d.ts +1 -1
package/fesm2022/ngwr-qr.mjs
CHANGED
|
@@ -1069,10 +1069,10 @@ class WrQr {
|
|
|
1069
1069
|
drawQrCode(el, opts);
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1073
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.
|
|
1072
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrQr, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: WrQr, isStandalone: true, selector: "wr-qr", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, iconUrl: { classPropertyName: "iconUrl", publicName: "iconUrl", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.background": "bgColor()" }, classAttribute: "wr-qr" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Always emit the canvas \u2014 painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
1074
1074
|
}
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrQr, decorators: [{
|
|
1076
1076
|
type: Component,
|
|
1077
1077
|
args: [{ selector: 'wr-qr', encapsulation: ViewEncapsulation.None, host: { class: 'wr-qr', '[style.background]': 'bgColor()' }, template: "<!--\n Always emit the canvas \u2014 painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n" }]
|
|
1078
1078
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], iconUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUrl", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
|
package/fesm2022/ngwr-radio.mjs
CHANGED
|
@@ -90,10 +90,10 @@ class WrRadio {
|
|
|
90
90
|
onBlur() {
|
|
91
91
|
this.group?.markTouched();
|
|
92
92
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
94
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
94
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrRadio, isStandalone: true, selector: "wr-radio", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRadio, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
98
|
args: [{ selector: 'wr-radio', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, imports: [WrIcon], template: "<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\n" }]
|
|
99
99
|
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
@@ -154,8 +154,8 @@ class WrRadioGroup {
|
|
|
154
154
|
markTouched() {
|
|
155
155
|
this.touch.emit();
|
|
156
156
|
}
|
|
157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
158
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
158
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrRadioGroup, isStandalone: true, selector: "wr-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, host: { attributes: { "role": "radiogroup" }, classAttribute: "wr-radio-group" }, providers: [
|
|
159
159
|
{
|
|
160
160
|
provide: WR_RADIO_GROUP,
|
|
161
161
|
// eslint-disable-next-line @angular-eslint/no-forward-ref
|
|
@@ -163,7 +163,7 @@ class WrRadioGroup {
|
|
|
163
163
|
},
|
|
164
164
|
], ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
165
165
|
}
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRadioGroup, decorators: [{
|
|
167
167
|
type: Component,
|
|
168
168
|
args: [{
|
|
169
169
|
selector: 'wr-radio-group',
|
package/fesm2022/ngwr-rating.mjs
CHANGED
|
@@ -177,10 +177,10 @@ class WrRating {
|
|
|
177
177
|
this.value.set(value);
|
|
178
178
|
this.hoverValue.set(null);
|
|
179
179
|
}
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRating, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrRating, isStandalone: true, selector: "wr-rating", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
182
182
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRating, decorators: [{
|
|
184
184
|
type: Component,
|
|
185
185
|
args: [{ selector: 'wr-rating', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n" }]
|
|
186
186
|
}], ctorParameters: () => [], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
|
package/fesm2022/ngwr-result.mjs
CHANGED
|
@@ -34,10 +34,10 @@ class WrResult {
|
|
|
34
34
|
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
35
35
|
classes = computed(() => `wr-result wr-result--${this.status()}`, /* @ts-ignore */
|
|
36
36
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
37
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
38
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrResult, isStandalone: true, selector: "wr-result", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
42
|
args: [{ selector: 'wr-result', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\n</div>\n" }]
|
|
43
43
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
|
|
@@ -67,10 +67,10 @@ class WrResult404 {
|
|
|
67
67
|
description = input(null, /* @ts-ignore */
|
|
68
68
|
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
69
69
|
desc = useI18nText(this.description, 'result.notFound', 'Sorry, the page you visited does not exist.');
|
|
70
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
70
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult404, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrResult404, isStandalone: true, selector: "wr-result-404", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n", dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
72
72
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult404, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
75
|
args: [{ selector: 'wr-result-404', encapsulation: ViewEncapsulation.None, imports: [WrResult], template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n" }]
|
|
76
76
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
@@ -84,10 +84,10 @@ class WrResult403 {
|
|
|
84
84
|
description = input(null, /* @ts-ignore */
|
|
85
85
|
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
86
86
|
desc = useI18nText(this.description, 'result.forbidden', 'Sorry, you are not authorized to access this page.');
|
|
87
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
88
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
87
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult403, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrResult403, isStandalone: true, selector: "wr-result-403", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n", dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult403, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
92
|
args: [{ selector: 'wr-result-403', encapsulation: ViewEncapsulation.None, imports: [WrResult], template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n" }]
|
|
93
93
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
@@ -101,10 +101,10 @@ class WrResult500 {
|
|
|
101
101
|
description = input(null, /* @ts-ignore */
|
|
102
102
|
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
103
103
|
desc = useI18nText(this.description, 'result.serverError', 'Sorry, something went wrong.');
|
|
104
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
105
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult500, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrResult500, isStandalone: true, selector: "wr-result-500", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n", dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrResult500, decorators: [{
|
|
108
108
|
type: Component,
|
|
109
109
|
args: [{ selector: 'wr-result-500', encapsulation: ViewEncapsulation.None, imports: [WrResult], template: "<!--\n Shared by the three status presets, which differ only in the `status` each\n class declares.\n\n `ngProjectAs` is load-bearing: `<wr-result>` projects one slot,\n `select=\"[wrResultExtra]\"`, and it matches that selector against the nodes in\n THIS template. A bare `<ng-content />` does not carry the attribute, so\n everything a consumer projected into `<wr-result-404>` was dropped silently \u2014\n including the button each preset's own `@example` shows. `ngProjectAs` is what\n tells the outer slot what this pass-through stands for.\n-->\n<wr-result [status]=\"status\" [title]=\"title()\" [description]=\"desc()\">\n <ng-content ngProjectAs=\"[wrResultExtra]\" />\n</wr-result>\n" }]
|
|
110
110
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
@@ -262,10 +262,10 @@ class WrRotatingText {
|
|
|
262
262
|
return i * stagger;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
266
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
265
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRotatingText, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
266
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrRotatingText, isStandalone: true, selector: "wr-rotating-text", inputs: { texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: true, transformFunction: null }, rotationInterval: { classPropertyName: "rotationInterval", publicName: "rotationInterval", isSignal: true, isRequired: false, transformFunction: null }, splitBy: { classPropertyName: "splitBy", publicName: "splitBy", isSignal: true, isRequired: false, transformFunction: null }, auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, staggerDuration: { classPropertyName: "staggerDuration", publicName: "staggerDuration", isSignal: true, isRequired: false, transformFunction: null }, staggerFrom: { classPropertyName: "staggerFrom", publicName: "staggerFrom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nextChange: "nextChange" }, host: { classAttribute: "wr-rotating-text" }, ngImport: i0, template: "<!--\n The readable text, once: the spans below are per-character. Deliberately NOT a\n live region \u2014 `auto` rotates every two seconds by default, and the APG's answer\n for self-advancing content is silence, not an announcement every two seconds.\n-->\n\n<span class=\"wr-rotating-text__sr-only\">{{ current() }}</span>\n\n<!-- Animated visual content. -->\n<span class=\"wr-rotating-text__inner\" aria-hidden=\"true\">\n @for (word of words(); track $index) {\n <span class=\"wr-rotating-text__word\">\n @for (char of word.characters; track $index) {\n <span class=\"wr-rotating-text__char\">{{ char }}</span>\n }\n @if (word.needsSpace) {\n <span class=\"wr-rotating-text__space\"> </span>\n }\n </span>\n }\n</span>\n", styles: [".wr-rotating-text{display:inline-flex;align-items:center;overflow:hidden;vertical-align:bottom}.wr-rotating-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-rotating-text__inner{display:inline-flex;flex-wrap:wrap}.wr-rotating-text__word{display:inline-flex;align-items:center}.wr-rotating-text__char{display:inline-block;will-change:transform,opacity}.wr-rotating-text__space{display:inline;white-space:pre}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
267
267
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrRotatingText, decorators: [{
|
|
269
269
|
type: Component,
|
|
270
270
|
args: [{ selector: 'wr-rotating-text', encapsulation: ViewEncapsulation.None, host: { class: 'wr-rotating-text' }, template: "<!--\n The readable text, once: the spans below are per-character. Deliberately NOT a\n live region \u2014 `auto` rotates every two seconds by default, and the APG's answer\n for self-advancing content is silence, not an announcement every two seconds.\n-->\n\n<span class=\"wr-rotating-text__sr-only\">{{ current() }}</span>\n\n<!-- Animated visual content. -->\n<span class=\"wr-rotating-text__inner\" aria-hidden=\"true\">\n @for (word of words(); track $index) {\n <span class=\"wr-rotating-text__word\">\n @for (char of word.characters; track $index) {\n <span class=\"wr-rotating-text__char\">{{ char }}</span>\n }\n @if (word.needsSpace) {\n <span class=\"wr-rotating-text__space\"> </span>\n }\n </span>\n }\n</span>\n", styles: [".wr-rotating-text{display:inline-flex;align-items:center;overflow:hidden;vertical-align:bottom}.wr-rotating-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-rotating-text__inner{display:inline-flex;flex-wrap:wrap}.wr-rotating-text__word{display:inline-flex;align-items:center}.wr-rotating-text__char{display:inline-block;will-change:transform,opacity}.wr-rotating-text__space{display:inline;white-space:pre}\n"] }]
|
|
271
271
|
}], ctorParameters: () => [], propDecorators: { texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: true }] }], rotationInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotationInterval", required: false }] }], splitBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitBy", required: false }] }], auto: [{ type: i0.Input, args: [{ isSignal: true, alias: "auto", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], easing: [{ type: i0.Input, args: [{ isSignal: true, alias: "easing", required: false }] }], staggerDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerDuration", required: false }] }], staggerFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerFrom", required: false }] }], nextChange: [{ type: i0.Output, args: ["nextChange"] }] } });
|
package/fesm2022/ngwr-scroll.mjs
CHANGED
|
@@ -92,10 +92,10 @@ class WrScroll {
|
|
|
92
92
|
else
|
|
93
93
|
container.scrollTo(options);
|
|
94
94
|
}
|
|
95
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
96
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrScroll, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
96
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: WrScroll });
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrScroll, decorators: [{
|
|
99
99
|
type: Service
|
|
100
100
|
}] });
|
|
101
101
|
|
|
@@ -196,6 +196,17 @@ const SIZES = ['sm', 'lg'];
|
|
|
196
196
|
* - Activation is the browser's own default action on a button, which jsdom does not
|
|
197
197
|
* implement, so {@link select} clicks — see {@link WrSegmentedOptionHarness.select}.
|
|
198
198
|
*
|
|
199
|
+
* **It is a signal-forms control**, which adds two things to read here and one that
|
|
200
|
+
* cannot be read at all. `[formField]` binds the component's own `value` model, and a
|
|
201
|
+
* surrounding `<wr-form-field>` publishes its state onto the GROUP —
|
|
202
|
+
* {@link isInvalid} and {@link getDescriptionText} answer that, on the host rather
|
|
203
|
+
* than per segment, because the strip is one field and a description repeated on
|
|
204
|
+
* every segment would be announced once per Tab. What is NOT here is the field's
|
|
205
|
+
* `touched` flag: the component only emits `touch`, and whether anything listened is
|
|
206
|
+
* a fact about the form, not about this DOM — assert it on the field.
|
|
207
|
+
* {@link blur} is how a spec gets there, and it is the ONLY route: a click does not
|
|
208
|
+
* mark a field touched, and neither does moving from one segment to the next.
|
|
209
|
+
*
|
|
199
210
|
* **There is deliberately no `getValue()` and no selection by value.** `options` is
|
|
200
211
|
* a bound array of `{ value, label, … }` and the value is a generic `T` the component
|
|
201
212
|
* writes nowhere — not on the host, not on a segment. The single exception is an
|
|
@@ -419,6 +430,66 @@ class WrSegmentedHarness extends ComponentHarness {
|
|
|
419
430
|
}
|
|
420
431
|
return null;
|
|
421
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Whether the surrounding `<wr-form-field>` is reporting this control invalid, from
|
|
435
|
+
* `aria-invalid` on the host.
|
|
436
|
+
*
|
|
437
|
+
* `false` for a control with no field around it, and `false` for a field that is
|
|
438
|
+
* invalid but has not shown its copy yet: the component keys the attribute on the
|
|
439
|
+
* MESSAGE existing rather than on the error, because announcing "invalid" while
|
|
440
|
+
* pointing at nothing is worse than staying quiet. So this and
|
|
441
|
+
* {@link getDescriptionText} move together, and a `true` with no description would
|
|
442
|
+
* be the finding.
|
|
443
|
+
*/
|
|
444
|
+
async isInvalid() {
|
|
445
|
+
return (await (await this.host()).getAttribute('aria-invalid')) === 'true';
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* The text `aria-describedby` points at — the validation copy a screen reader is
|
|
449
|
+
* given for this control — or `null` when the host describes nothing.
|
|
450
|
+
*
|
|
451
|
+
* Resolved from the document root, because the element named may sit anywhere on
|
|
452
|
+
* the page, and THROWS when the reference resolves to no element: a dangling
|
|
453
|
+
* `aria-describedby` renders exactly like a working one and is announced as
|
|
454
|
+
* nothing, so returning `null` for it would report the bug as the healthy state.
|
|
455
|
+
*/
|
|
456
|
+
async getDescriptionText() {
|
|
457
|
+
const describedBy = await (await this.host()).getAttribute('aria-describedby');
|
|
458
|
+
if (describedBy === null)
|
|
459
|
+
return null;
|
|
460
|
+
const root = this.documentRootLocatorFactory();
|
|
461
|
+
const texts = [];
|
|
462
|
+
for (const id of describedBy.split(/\s+/).filter(Boolean)) {
|
|
463
|
+
// `CSS.escape`, because `WrFormField.controlId` is a public input: a
|
|
464
|
+
// consumer passing `controlId="user.email"` makes `#user.email-errors`
|
|
465
|
+
// read as "id `user` with class `email-errors`", which matches nothing —
|
|
466
|
+
// and this method THROWS on no match, so an unescaped selector reports a
|
|
467
|
+
// healthy field as the exact bug the throw exists to catch.
|
|
468
|
+
const target = await root.locatorForOptional(`#${CSS.escape(id)}`)();
|
|
469
|
+
if (!target) {
|
|
470
|
+
throw new Error(`WrSegmentedHarness.getDescriptionText(): \`aria-describedby\` names "${id}", which is on no element ` +
|
|
471
|
+
'in the document — a screen reader announces nothing for it.');
|
|
472
|
+
}
|
|
473
|
+
texts.push(await target.text());
|
|
474
|
+
}
|
|
475
|
+
return texts.join(' ');
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Take focus off the strip entirely — what marks a bound field touched, and the
|
|
479
|
+
* only thing that does.
|
|
480
|
+
*
|
|
481
|
+
* The component emits `touch` from a `focusout` that leaves the host, so a click
|
|
482
|
+
* does not reach it and neither does Tab from one segment to the next: a strip a
|
|
483
|
+
* user tabbed straight past has to end up untouched, which is the case `touched`
|
|
484
|
+
* exists for. Resolves quietly when nothing inside was focused, since that is
|
|
485
|
+
* already the state this asks for.
|
|
486
|
+
*/
|
|
487
|
+
async blur() {
|
|
488
|
+
for (const option of await this.getOptions()) {
|
|
489
|
+
if (await option.isFocused())
|
|
490
|
+
return option.blur();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
422
493
|
/**
|
|
423
494
|
* The index the component publishes for the thumb, from the
|
|
424
495
|
* `--wr-segmented-thumb-index` custom property it sets inline.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-segmented-testing.mjs","sources":["../../../projects/lib/segmented/testing/wr-segmented-option-harness.ts","../../../projects/lib/segmented/testing/wr-segmented-harness.ts","../../../projects/lib/segmented/testing/ngwr-segmented-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSegmentedOptionHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one segment of a `<wr-segmented>` — an option, not a control.\n *\n * A segment is a real `<button type=\"button\">` carrying `aria-pressed`, so it is a\n * TOGGLE BUTTON to a screen reader: it announces its own pressed state and its own\n * name, and it is its own tab stop. That is why this exists as a harness of its own,\n * and why the questions below are worth asking per segment rather than in bulk on\n * `WrSegmentedHarness` — which is where the SELECTION lives.\n *\n * Three name-shaped methods, because a segment has three different names and only\n * one of them is what a person hears:\n *\n * - {@link getText} — the visible label, `null` for an icon-only segment.\n * - {@link getAccessibleName} — what is announced, `null` when nothing names it.\n * - {@link getLabel} — the same, but it refuses to answer `null`, so a spec\n * addressing segments by label fails where the mistake is rather than three\n * lines later.\n *\n * @example\n * ```ts\n * const segmented = await loader.getHarness(WrSegmentedHarness);\n * const [, week] = await segmented.getOptions();\n *\n * await week.select();\n * expect(await week.isSelected()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedOptionHarness extends ComponentHarness {\n /** The segment is a plain `<button>` — the BEM class is what identifies it. */\n static hostSelector = '.wr-segmented__option';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedOptionHarnessFilters = {}): HarnessPredicate<WrSegmentedOptionHarness> {\n return (\n new HarnessPredicate(WrSegmentedOptionHarness, options)\n // Matched on the nullable name, not on `getLabel()`: a predicate runs against\n // EVERY segment, so one unnamed sibling would otherwise throw a query for the\n // others out of the water.\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n );\n }\n\n private readonly labelText = this.locatorForOptional('.wr-segmented__label');\n private readonly icon = this.locatorForOptional('.wr-segmented__icon');\n\n /**\n * The visible label, or `null` for an icon-only segment.\n *\n * `null` rather than `''`: the label element is only rendered when the option\n * carries a `label`, and \"no text at all\" and \"an empty label\" are different\n * mistakes to be looking at.\n */\n async getText(): Promise<string | null> {\n const label = await this.labelText();\n return label ? label.text() : null;\n }\n\n /**\n * The name a screen reader announces for this segment, or `null` when nothing\n * names it.\n *\n * The component's own fallback chain, read back off the page: a labelled segment\n * is named by its text and carries no `aria-label`; an icon-only one is named by\n * `aria-label`, which the template fills from the option's `ariaLabel` or — as a\n * last resort — from its stringified `value`.\n *\n * `null` is a finding, not a detail: an icon-only segment whose option supplied\n * neither an `ariaLabel` nor a stringifiable value is announced as a bare unnamed\n * button.\n */\n async getAccessibleName(): Promise<string | null> {\n const text = await this.getText();\n if (text !== null) return text;\n return (await this.host()).getAttribute('aria-label');\n }\n\n /**\n * The segment's accessible name, for addressing it — and a targeted failure when\n * it has none.\n *\n * {@link getAccessibleName} is the same answer without the refusal; use that one\n * when `null` is what a spec is checking for.\n */\n async getLabel(): Promise<string> {\n const name = await this.getAccessibleName();\n if (name === null) {\n throw new Error(\n 'WrSegmentedOptionHarness.getLabel(): this segment has no name — it renders no label and carries no ' +\n '`aria-label`, so a screen reader announces an unnamed button. Give the option a `label`, or an ' +\n '`ariaLabel` when it is icon-only.'\n );\n }\n return name;\n }\n\n /**\n * Whether this segment is the control's current answer.\n *\n * From `aria-pressed`, in preference to the `wr-segmented__option--selected`\n * class: both are public and they move together, but the class only recolours the\n * label while the attribute is the entire state a screen reader is given.\n */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-pressed')) === 'true';\n }\n\n /**\n * Whether the segment refuses selection — for either reason.\n *\n * The native `disabled` PROPERTY, which is what actually blocks activation. The\n * option's own `disabled` and the whole control's land on it identically, and from\n * outside they are the same thing: this segment cannot be picked. Ask\n * `WrSegmentedHarness.isDisabled()` for which of the two it was.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the segment renders an icon beside (or instead of) its label. */\n async hasIcon(): Promise<boolean> {\n return (await this.icon()) !== null;\n }\n\n /**\n * The name of the segment's icon, or `null` when it renders none.\n *\n * From `data-icon`, which `<wr-icon>` reflects. The glyph itself is markup the\n * icon registry writes into the element, and an UNREGISTERED name leaves that\n * empty — so the attribute is the only place the wiring survives, and it is the\n * one that tells \"no icon asked for\" from \"icon asked for, never registered\".\n */\n async getIconName(): Promise<string | null> {\n const icon = await this.icon();\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /**\n * Pick this segment.\n *\n * A click, and deliberately not a keypress: activating a `<button>` from the\n * keyboard is the BROWSER's default action for Enter / Space — the component\n * implements no key handling of its own — and jsdom implements none of it either,\n * so there is nothing here for a key to drive. A no-arg CDK click needs no\n * layout, which is the other half of why this is the drivable path.\n *\n * Nothing happens when the segment is already selected (a segmented control has no\n * untoggle), and nothing happens when it is disabled — but not for the reason the\n * `pointer-events: none` on a whole disabled control suggests, which is CSS a unit\n * test never applies. The CDK's own `click()` reads the native `disabled` PROPERTY\n * and dispatches the mouse sequence WITHOUT the final `click` event, so on a\n * disabled segment the component's handler is never reached at all (measured: zero\n * click events). Either way the value does not move and this resolves quietly, so\n * assert the result rather than assume it, or reach for\n * `WrSegmentedHarness.select()`, which says which of the two it was.\n */\n async select(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move keyboard focus to the segment. Each segment is its own tab stop. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Take focus off the segment. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSegmentedSize } from 'ngwr/segmented';\n\nimport type { WrSegmentedHarnessFilters, WrSegmentedOptionHarnessFilters } from './interfaces';\nimport { WrSegmentedOptionHarness } from './wr-segmented-option-harness';\n\n/** Sizes that earn a modifier class — `md` is the default and carries none. */\nconst SIZES: readonly WrSegmentedSize[] = ['sm', 'lg'];\n\n/**\n * Test harness for `<wr-segmented>` — the root of a two-class family with\n * {@link WrSegmentedOptionHarness}.\n *\n * **What the control actually is**, because it decides everything below: not a\n * `radiogroup`, not a `tablist` and not native radios. The host is a plain\n * `role=\"group\"` and each segment is a `<button aria-pressed>` — a row of toggle\n * buttons over one value. Three consequences a spec has to know about:\n *\n * - The selection is `aria-pressed`, on exactly one segment. There is no\n * `aria-checked`, no `aria-selected`, and no \"2 of 3\" position announced.\n * - **There is no roving tab stop.** The component authors no `tabindex` and no\n * arrow-key handler, so every enabled segment is its OWN tab stop —\n * {@link getTabStopLabels} returns a list where a radiogroup or a tablist would\n * have one entry. Focus and selection are therefore independent here:\n * {@link getFocusedLabel} implies nothing about {@link getSelectedIndex}, and\n * arrowing along the strip moves neither.\n * - Activation is the browser's own default action on a button, which jsdom does not\n * implement, so {@link select} clicks — see {@link WrSegmentedOptionHarness.select}.\n *\n * **There is deliberately no `getValue()` and no selection by value.** `options` is\n * a bound array of `{ value, label, … }` and the value is a generic `T` the component\n * writes nowhere — not on the host, not on a segment. The single exception is an\n * accident rather than an addressing scheme: an icon-only option with no `ariaLabel`\n * has its value stringified into the segment's `aria-label`, which for an object\n * value reads `[object Object]`. So address segments by their label\n * ({@link select}) or by position ({@link selectAt}), and assert the picked value on\n * the host's own model — the only place it exists, and the assertion that would have\n * caught the bug anyway.\n *\n * The sliding thumb is decoration (`aria-hidden`), and the four methods that mention\n * it read what the component PUBLISHES for the stylesheet — two custom properties and\n * two modifier classes — never painted geometry, which a DOM without layout does not\n * have. {@link getThumbIndex} in particular is not the selection; it is the trap that\n * method documents.\n *\n * @example\n * ```ts\n * const range = await loader.getHarness(WrSegmentedHarness.with({ label: 'Range' }));\n *\n * expect(await range.getOptionLabels()).toEqual(['Day', 'Week', 'Month']);\n * await range.select({ label: 'Week' });\n * expect(await range.getSelectedIndex()).toBe(1);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedHarness extends ComponentHarness {\n static hostSelector = 'wr-segmented';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedHarnessFilters = {}): HarnessPredicate<WrSegmentedHarness> {\n return new HarnessPredicate(WrSegmentedHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('size', options.size, async (harness, size) => (await harness.getSize()) === size)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /**\n * The role the host announces — `group`.\n *\n * Worth pinning precisely because it is the weaker of the shapes this component\n * could have had: a `group` of toggle buttons tells a screen reader that the\n * segments belong together, and nothing more. Were this to become a `radiogroup` or\n * a `tablist`, the keyboard contract would change with it (one tab stop, arrow keys\n * moving the selection), and every spec written against {@link getTabStopLabels}\n * would need to change too.\n */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The control's accessible name, resolved the way a screen reader resolves it: the\n * text of every element `aria-labelledby` points at, and `aria-label` only when\n * that named nothing. `null` when the consumer wired neither.\n *\n * The order is not interchangeable — `aria-labelledby` WINS in the accessible-name\n * computation — so a control carrying both is announced by the heading it points at,\n * and reporting the `aria-label` would describe a name nobody hears.\n *\n * The component ships no label input on purpose (the question is the consumer's own\n * heading), so this is the only way to check that wiring held, and a `null` on a\n * group of three unrelated-sounding buttons is a real finding.\n */\n async getAccessibleName(): Promise<string | null> {\n const host = await this.host();\n\n const labelledBy = await host.getAttribute('aria-labelledby');\n if (labelledBy !== null) {\n // Resolved from the document root: `aria-labelledby` may point anywhere on the\n // page, and the heading above a control is normally outside it.\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of labelledBy.split(/\\s+/).filter(Boolean)) {\n const target = await root.locatorForOptional(`#${id}`)();\n if (target) texts.push(await target.text());\n }\n\n // A reference that resolves to nothing names nothing, and the computation falls\n // through to `aria-label` exactly as it does in a browser.\n if (texts.length) return texts.join(' ');\n }\n\n return host.getAttribute('aria-label');\n }\n\n /** This control's own segments, in DOM order. A sibling control's are not here. */\n async getOptions(filters: WrSegmentedOptionHarnessFilters = {}): Promise<WrSegmentedOptionHarness[]> {\n return this.locatorForAll(WrSegmentedOptionHarness.with(filters))();\n }\n\n /**\n * The accessible name of every segment, in DOM order — the visible labels, with an\n * icon-only segment answering with the `aria-label` that stands in for its text.\n *\n * Throws when a segment has no name at all, rather than leaving a hole in the list:\n * see {@link WrSegmentedOptionHarness.getLabel}.\n */\n async getOptionLabels(): Promise<string[]> {\n const options = await this.getOptions();\n return Promise.all(options.map(option => option.getLabel()));\n }\n\n /** The pressed segment, or `null` when nothing is selected. */\n async getSelectedOption(): Promise<WrSegmentedOptionHarness | null> {\n const [selected] = await this.getOptions({ selected: true });\n return selected ?? null;\n }\n\n /**\n * The accessible name of the pressed segment, or `null` when nothing is selected.\n *\n * `null` is also the answer for a bound value that matches no option — the control\n * holds it, no segment is pressed, and the page shows an unanswered control. See\n * {@link getThumbIndex}, which does NOT answer `null` in that state.\n */\n async getSelectedLabel(): Promise<string | null> {\n const selected = await this.getSelectedOption();\n return selected ? selected.getLabel() : null;\n }\n\n /**\n * The position of the pressed segment, or `-1` when nothing is selected.\n *\n * Derived from `aria-pressed`, which is the selection. The other index on the page —\n * the thumb's — is not; it clamps at 0 (see {@link getThumbIndex}).\n */\n async getSelectedIndex(): Promise<number> {\n const options = await this.getOptions();\n for (let index = 0; index < options.length; index++) {\n if (await options[index].isSelected()) return index;\n }\n return -1;\n }\n\n /**\n * Pick the first segment matching the filters — this is how the control's value\n * changes.\n *\n * Throws when nothing matches, naming the segments that do exist, and throws again\n * when the segment is still unpressed afterwards. That second failure has exactly\n * two causes and reports both, because a click that quietly did nothing surfaces as\n * an unrelated assertion three lines later.\n */\n async select(filters: WrSegmentedOptionHarnessFilters): Promise<void> {\n const [option] = await this.getOptions(filters);\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.select(): no segment matched ${JSON.stringify(filters)}. This control offers: ` +\n `${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'select');\n }\n\n /**\n * Pick the segment at a position, counting from zero — the addressing route for an\n * icon-only strip, or for one whose labels a spec would rather not hard-code.\n *\n * Throws on an index outside the control, saying how many segments there are: an\n * off-by-one that resolved to nothing would otherwise read as \"the click did not\n * take\".\n */\n async selectAt(index: number): Promise<void> {\n const options = await this.getOptions();\n const option = options[index];\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.selectAt(): index ${index} is outside this control, which has ${options.length} ` +\n `segment(s): ${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'selectAt');\n }\n\n /**\n * Whether the control was disabled AS A WHOLE, from the `wr-segmented--disabled`\n * modifier.\n *\n * Deliberately not \"every segment is disabled\": a control whose options each carry\n * their own `disabled` looks identical to a user, and the modifier is the only thing\n * on the page that tells the two apart. What actually blocks a click is the native\n * `disabled` each button gets either way — ask a segment\n * ({@link WrSegmentedOptionHarness.isDisabled}) for that.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--disabled');\n }\n\n /**\n * The rendered control size.\n *\n * `md` is the component's own default and earns NO modifier class, so a bare host\n * IS `md` — the absence is the answer rather than a missing one. Read from the\n * class instead of the input, which is also why this reports what was rendered:\n * unlike the form controls, `<wr-segmented>` does not resolve its size through\n * `provideWrConfig()`, so an app-wide default set there does not reach it and this\n * will say so.\n */\n async getSize(): Promise<WrSegmentedSize> {\n const host = await this.host();\n for (const size of SIZES) {\n if (await host.hasClass(`wr-segmented--${size}`)) return size;\n }\n return 'md';\n }\n\n /**\n * The accessible name of every segment a Tab press can reach, in tab order.\n *\n * A LIST, not one label, and that is the shape worth pinning: the component authors\n * no roving `tabindex`, so each enabled segment is its own tab stop and reaching the\n * third one takes three Tabs. An all-disabled control is skipped over entirely and\n * answers `[]`.\n *\n * Unnamed segments are reported as `(unnamed)` rather than throwing — a tab order is\n * still a fact worth reading on a page that has that bug in it.\n */\n async getTabStopLabels(): Promise<string[]> {\n const enabled = await this.getOptions({ disabled: false });\n return this.describe(enabled);\n }\n\n /**\n * The accessible name of the segment that currently holds focus, or `null` when\n * focus is elsewhere.\n *\n * Independent of the selection here — see the note on the class. Reported as\n * `(unnamed)` for a segment with no name, for the reason\n * {@link getTabStopLabels} gives.\n */\n async getFocusedLabel(): Promise<string | null> {\n for (const option of await this.getOptions()) {\n if (await option.isFocused()) {\n return (await option.getAccessibleName()) ?? '(unnamed)';\n }\n }\n return null;\n }\n\n /**\n * The index the component publishes for the thumb, from the\n * `--wr-segmented-thumb-index` custom property it sets inline.\n *\n * **Not the selection, and this is the difference that bites.** The property is\n * `Math.max(0, selectedIndex)`, so a control holding a value that matches no option\n * publishes `0` — the thumb parks under the FIRST segment and is hidden by\n * {@link isThumbVisible} instead of being moved out of the way. A harness that read\n * this to answer \"which segment is selected\" would report segment one for a control\n * with no selection at all. {@link getSelectedIndex} is the selection.\n *\n * It is also not where the thumb IS: the stylesheet turns this into a `translateX`,\n * and no measurement of that survives a DOM without layout. This is the input to\n * that, which is the part a unit test can honestly check.\n */\n async getThumbIndex(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-index');\n }\n\n /**\n * The segment count the component publishes for the thumb, from\n * `--wr-segmented-thumb-count` — the divisor the stylesheet computes the thumb's\n * width with.\n *\n * Should always equal the number of segments, and the reason to ask is that nothing\n * else notices when it does not: a count that fell out of step with the options\n * leaves the thumb the wrong width and sliding to the wrong place, while every ARIA\n * state on the page stays correct. It is clamped to a minimum of `1`, so an empty\n * control reports `1` rather than dividing by zero.\n */\n async getThumbCount(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-count');\n }\n\n /**\n * Whether the thumb is being shown at all.\n *\n * Read from the ABSENCE of the `wr-segmented--unselected` modifier, which is the\n * hook the stylesheet zeroes the thumb's opacity through. The computed opacity is\n * not the answer here — a unit test applies no stylesheet — so the public modifier\n * is the contract, and it is what tells \"parked under segment one\" from \"hidden\n * because nothing is selected\".\n */\n async isThumbVisible(): Promise<boolean> {\n return !(await (await this.host()).hasClass('wr-segmented--unselected'));\n }\n\n /**\n * Whether the thumb will animate its next move, from the `wr-segmented--mounted`\n * modifier that gates the transition.\n *\n * Not \"the thumb is animating now\": nothing about a running animation is visible to\n * a unit test. What this pins is the deliberate asymmetry — the class is added in\n * `afterNextRender`, so the FIRST snap to the initial value is instant and every\n * user-driven move after it slides. Deferred work like that only lands once the\n * fixture is stable, which every harness read already waits for.\n */\n async isThumbTransitionEnabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--mounted');\n }\n\n /** Click a segment and turn a click that did nothing into a failure that says why. */\n private async pick(option: WrSegmentedOptionHarness, caller: 'select' | 'selectAt'): Promise<void> {\n await option.select();\n\n if (!(await option.isSelected())) {\n const name = (await option.getAccessibleName()) ?? '(unnamed)';\n throw new Error(\n `WrSegmentedHarness.${caller}(): \"${name}\" is still unpressed after being clicked — either that ` +\n 'option carries `disabled` or the whole control does.'\n );\n }\n }\n\n /** Segment names for an error message, which must not throw on its way out. */\n private async describeOptions(): Promise<string[]> {\n return this.describe(await this.getOptions());\n }\n\n private async describe(options: readonly WrSegmentedOptionHarness[]): Promise<string[]> {\n return Promise.all(options.map(async option => (await option.getAccessibleName()) ?? '(unnamed)'));\n }\n\n /**\n * One custom property off the host's `style` ATTRIBUTE.\n *\n * Not `getCssValue()`, which is `getComputedStyle`: with the entry point's own\n * stylesheet loaded that resolves the sheet's declaration, so the method\n * answers plausibly at exactly the moment the host binding — the thing under\n * test — is what broke. The attribute holds only what the component wrote.\n */\n private async inlineVar(property: string): Promise<string> {\n const attr = (await (await this.host()).getAttribute('style')) ?? '';\n const found = new RegExp(`(?:^|;)\\\\s*${property}\\\\s*:\\\\s*([^;]+)`).exec(attr);\n return (found?.[1] ?? '').trim();\n }\n\n /** One of the thumb's inline custom properties, as a number. */\n private async thumbVar(property: string): Promise<number> {\n const raw = await this.inlineVar(property);\n const value = Number.parseInt(raw, 10);\n if (Number.isNaN(value)) {\n throw new Error(\n `WrSegmentedHarness: could not read \\`${property}\\`, which computed to \"${raw}\". The component sets it ` +\n 'inline on the host; an environment that drops custom properties cannot answer this.'\n );\n }\n return value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,MAAO,wBAAyB,SAAQ,gBAAgB,CAAA;;AAE5D,IAAA,OAAO,YAAY,GAAG,uBAAuB;;AAG7C,IAAA,OAAO,IAAI,CAAC,OAAA,GAA2C,EAAE,EAAA;AACvD,QAAA,QACE,IAAI,gBAAgB,CAAC,wBAAwB,EAAE,OAAO;;;;aAInD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,KAAK,CAAC;aAEnE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;aAC9G,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CA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A,OAAO,KAAK;IACd;;;ACpYF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-segmented-testing.mjs","sources":["../../../projects/lib/segmented/testing/wr-segmented-option-harness.ts","../../../projects/lib/segmented/testing/wr-segmented-harness.ts","../../../projects/lib/segmented/testing/ngwr-segmented-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSegmentedOptionHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one segment of a `<wr-segmented>` — an option, not a control.\n *\n * A segment is a real `<button type=\"button\">` carrying `aria-pressed`, so it is a\n * TOGGLE BUTTON to a screen reader: it announces its own pressed state and its own\n * name, and it is its own tab stop. That is why this exists as a harness of its own,\n * and why the questions below are worth asking per segment rather than in bulk on\n * `WrSegmentedHarness` — which is where the SELECTION lives.\n *\n * Three name-shaped methods, because a segment has three different names and only\n * one of them is what a person hears:\n *\n * - {@link getText} — the visible label, `null` for an icon-only segment.\n * - {@link getAccessibleName} — what is announced, `null` when nothing names it.\n * - {@link getLabel} — the same, but it refuses to answer `null`, so a spec\n * addressing segments by label fails where the mistake is rather than three\n * lines later.\n *\n * @example\n * ```ts\n * const segmented = await loader.getHarness(WrSegmentedHarness);\n * const [, week] = await segmented.getOptions();\n *\n * await week.select();\n * expect(await week.isSelected()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedOptionHarness extends ComponentHarness {\n /** The segment is a plain `<button>` — the BEM class is what identifies it. */\n static hostSelector = '.wr-segmented__option';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedOptionHarnessFilters = {}): HarnessPredicate<WrSegmentedOptionHarness> {\n return (\n new HarnessPredicate(WrSegmentedOptionHarness, options)\n // Matched on the nullable name, not on `getLabel()`: a predicate runs against\n // EVERY segment, so one unnamed sibling would otherwise throw a query for the\n // others out of the water.\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n );\n }\n\n private readonly labelText = this.locatorForOptional('.wr-segmented__label');\n private readonly icon = this.locatorForOptional('.wr-segmented__icon');\n\n /**\n * The visible label, or `null` for an icon-only segment.\n *\n * `null` rather than `''`: the label element is only rendered when the option\n * carries a `label`, and \"no text at all\" and \"an empty label\" are different\n * mistakes to be looking at.\n */\n async getText(): Promise<string | null> {\n const label = await this.labelText();\n return label ? label.text() : null;\n }\n\n /**\n * The name a screen reader announces for this segment, or `null` when nothing\n * names it.\n *\n * The component's own fallback chain, read back off the page: a labelled segment\n * is named by its text and carries no `aria-label`; an icon-only one is named by\n * `aria-label`, which the template fills from the option's `ariaLabel` or — as a\n * last resort — from its stringified `value`.\n *\n * `null` is a finding, not a detail: an icon-only segment whose option supplied\n * neither an `ariaLabel` nor a stringifiable value is announced as a bare unnamed\n * button.\n */\n async getAccessibleName(): Promise<string | null> {\n const text = await this.getText();\n if (text !== null) return text;\n return (await this.host()).getAttribute('aria-label');\n }\n\n /**\n * The segment's accessible name, for addressing it — and a targeted failure when\n * it has none.\n *\n * {@link getAccessibleName} is the same answer without the refusal; use that one\n * when `null` is what a spec is checking for.\n */\n async getLabel(): Promise<string> {\n const name = await this.getAccessibleName();\n if (name === null) {\n throw new Error(\n 'WrSegmentedOptionHarness.getLabel(): this segment has no name — it renders no label and carries no ' +\n '`aria-label`, so a screen reader announces an unnamed button. Give the option a `label`, or an ' +\n '`ariaLabel` when it is icon-only.'\n );\n }\n return name;\n }\n\n /**\n * Whether this segment is the control's current answer.\n *\n * From `aria-pressed`, in preference to the `wr-segmented__option--selected`\n * class: both are public and they move together, but the class only recolours the\n * label while the attribute is the entire state a screen reader is given.\n */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-pressed')) === 'true';\n }\n\n /**\n * Whether the segment refuses selection — for either reason.\n *\n * The native `disabled` PROPERTY, which is what actually blocks activation. The\n * option's own `disabled` and the whole control's land on it identically, and from\n * outside they are the same thing: this segment cannot be picked. Ask\n * `WrSegmentedHarness.isDisabled()` for which of the two it was.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Whether the segment renders an icon beside (or instead of) its label. */\n async hasIcon(): Promise<boolean> {\n return (await this.icon()) !== null;\n }\n\n /**\n * The name of the segment's icon, or `null` when it renders none.\n *\n * From `data-icon`, which `<wr-icon>` reflects. The glyph itself is markup the\n * icon registry writes into the element, and an UNREGISTERED name leaves that\n * empty — so the attribute is the only place the wiring survives, and it is the\n * one that tells \"no icon asked for\" from \"icon asked for, never registered\".\n */\n async getIconName(): Promise<string | null> {\n const icon = await this.icon();\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /**\n * Pick this segment.\n *\n * A click, and deliberately not a keypress: activating a `<button>` from the\n * keyboard is the BROWSER's default action for Enter / Space — the component\n * implements no key handling of its own — and jsdom implements none of it either,\n * so there is nothing here for a key to drive. A no-arg CDK click needs no\n * layout, which is the other half of why this is the drivable path.\n *\n * Nothing happens when the segment is already selected (a segmented control has no\n * untoggle), and nothing happens when it is disabled — but not for the reason the\n * `pointer-events: none` on a whole disabled control suggests, which is CSS a unit\n * test never applies. The CDK's own `click()` reads the native `disabled` PROPERTY\n * and dispatches the mouse sequence WITHOUT the final `click` event, so on a\n * disabled segment the component's handler is never reached at all (measured: zero\n * click events). Either way the value does not move and this resolves quietly, so\n * assert the result rather than assume it, or reach for\n * `WrSegmentedHarness.select()`, which says which of the two it was.\n */\n async select(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move keyboard focus to the segment. Each segment is its own tab stop. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Take focus off the segment. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSegmentedSize } from 'ngwr/segmented';\n\nimport type { WrSegmentedHarnessFilters, WrSegmentedOptionHarnessFilters } from './interfaces';\nimport { WrSegmentedOptionHarness } from './wr-segmented-option-harness';\n\n/** Sizes that earn a modifier class — `md` is the default and carries none. */\nconst SIZES: readonly WrSegmentedSize[] = ['sm', 'lg'];\n\n/**\n * Test harness for `<wr-segmented>` — the root of a two-class family with\n * {@link WrSegmentedOptionHarness}.\n *\n * **What the control actually is**, because it decides everything below: not a\n * `radiogroup`, not a `tablist` and not native radios. The host is a plain\n * `role=\"group\"` and each segment is a `<button aria-pressed>` — a row of toggle\n * buttons over one value. Three consequences a spec has to know about:\n *\n * - The selection is `aria-pressed`, on exactly one segment. There is no\n * `aria-checked`, no `aria-selected`, and no \"2 of 3\" position announced.\n * - **There is no roving tab stop.** The component authors no `tabindex` and no\n * arrow-key handler, so every enabled segment is its OWN tab stop —\n * {@link getTabStopLabels} returns a list where a radiogroup or a tablist would\n * have one entry. Focus and selection are therefore independent here:\n * {@link getFocusedLabel} implies nothing about {@link getSelectedIndex}, and\n * arrowing along the strip moves neither.\n * - Activation is the browser's own default action on a button, which jsdom does not\n * implement, so {@link select} clicks — see {@link WrSegmentedOptionHarness.select}.\n *\n * **It is a signal-forms control**, which adds two things to read here and one that\n * cannot be read at all. `[formField]` binds the component's own `value` model, and a\n * surrounding `<wr-form-field>` publishes its state onto the GROUP —\n * {@link isInvalid} and {@link getDescriptionText} answer that, on the host rather\n * than per segment, because the strip is one field and a description repeated on\n * every segment would be announced once per Tab. What is NOT here is the field's\n * `touched` flag: the component only emits `touch`, and whether anything listened is\n * a fact about the form, not about this DOM — assert it on the field.\n * {@link blur} is how a spec gets there, and it is the ONLY route: a click does not\n * mark a field touched, and neither does moving from one segment to the next.\n *\n * **There is deliberately no `getValue()` and no selection by value.** `options` is\n * a bound array of `{ value, label, … }` and the value is a generic `T` the component\n * writes nowhere — not on the host, not on a segment. The single exception is an\n * accident rather than an addressing scheme: an icon-only option with no `ariaLabel`\n * has its value stringified into the segment's `aria-label`, which for an object\n * value reads `[object Object]`. So address segments by their label\n * ({@link select}) or by position ({@link selectAt}), and assert the picked value on\n * the host's own model — the only place it exists, and the assertion that would have\n * caught the bug anyway.\n *\n * The sliding thumb is decoration (`aria-hidden`), and the four methods that mention\n * it read what the component PUBLISHES for the stylesheet — two custom properties and\n * two modifier classes — never painted geometry, which a DOM without layout does not\n * have. {@link getThumbIndex} in particular is not the selection; it is the trap that\n * method documents.\n *\n * @example\n * ```ts\n * const range = await loader.getHarness(WrSegmentedHarness.with({ label: 'Range' }));\n *\n * expect(await range.getOptionLabels()).toEqual(['Day', 'Week', 'Month']);\n * await range.select({ label: 'Week' });\n * expect(await range.getSelectedIndex()).toBe(1);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSegmentedHarness extends ComponentHarness {\n static hostSelector = 'wr-segmented';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSegmentedHarnessFilters = {}): HarnessPredicate<WrSegmentedHarness> {\n return new HarnessPredicate(WrSegmentedHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n )\n .addOption('size', options.size, async (harness, size) => (await harness.getSize()) === size)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /**\n * The role the host announces — `group`.\n *\n * Worth pinning precisely because it is the weaker of the shapes this component\n * could have had: a `group` of toggle buttons tells a screen reader that the\n * segments belong together, and nothing more. Were this to become a `radiogroup` or\n * a `tablist`, the keyboard contract would change with it (one tab stop, arrow keys\n * moving the selection), and every spec written against {@link getTabStopLabels}\n * would need to change too.\n */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The control's accessible name, resolved the way a screen reader resolves it: the\n * text of every element `aria-labelledby` points at, and `aria-label` only when\n * that named nothing. `null` when the consumer wired neither.\n *\n * The order is not interchangeable — `aria-labelledby` WINS in the accessible-name\n * computation — so a control carrying both is announced by the heading it points at,\n * and reporting the `aria-label` would describe a name nobody hears.\n *\n * The component ships no label input on purpose (the question is the consumer's own\n * heading), so this is the only way to check that wiring held, and a `null` on a\n * group of three unrelated-sounding buttons is a real finding.\n */\n async getAccessibleName(): Promise<string | null> {\n const host = await this.host();\n\n const labelledBy = await host.getAttribute('aria-labelledby');\n if (labelledBy !== null) {\n // Resolved from the document root: `aria-labelledby` may point anywhere on the\n // page, and the heading above a control is normally outside it.\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of labelledBy.split(/\\s+/).filter(Boolean)) {\n const target = await root.locatorForOptional(`#${id}`)();\n if (target) texts.push(await target.text());\n }\n\n // A reference that resolves to nothing names nothing, and the computation falls\n // through to `aria-label` exactly as it does in a browser.\n if (texts.length) return texts.join(' ');\n }\n\n return host.getAttribute('aria-label');\n }\n\n /** This control's own segments, in DOM order. A sibling control's are not here. */\n async getOptions(filters: WrSegmentedOptionHarnessFilters = {}): Promise<WrSegmentedOptionHarness[]> {\n return this.locatorForAll(WrSegmentedOptionHarness.with(filters))();\n }\n\n /**\n * The accessible name of every segment, in DOM order — the visible labels, with an\n * icon-only segment answering with the `aria-label` that stands in for its text.\n *\n * Throws when a segment has no name at all, rather than leaving a hole in the list:\n * see {@link WrSegmentedOptionHarness.getLabel}.\n */\n async getOptionLabels(): Promise<string[]> {\n const options = await this.getOptions();\n return Promise.all(options.map(option => option.getLabel()));\n }\n\n /** The pressed segment, or `null` when nothing is selected. */\n async getSelectedOption(): Promise<WrSegmentedOptionHarness | null> {\n const [selected] = await this.getOptions({ selected: true });\n return selected ?? null;\n }\n\n /**\n * The accessible name of the pressed segment, or `null` when nothing is selected.\n *\n * `null` is also the answer for a bound value that matches no option — the control\n * holds it, no segment is pressed, and the page shows an unanswered control. See\n * {@link getThumbIndex}, which does NOT answer `null` in that state.\n */\n async getSelectedLabel(): Promise<string | null> {\n const selected = await this.getSelectedOption();\n return selected ? selected.getLabel() : null;\n }\n\n /**\n * The position of the pressed segment, or `-1` when nothing is selected.\n *\n * Derived from `aria-pressed`, which is the selection. The other index on the page —\n * the thumb's — is not; it clamps at 0 (see {@link getThumbIndex}).\n */\n async getSelectedIndex(): Promise<number> {\n const options = await this.getOptions();\n for (let index = 0; index < options.length; index++) {\n if (await options[index].isSelected()) return index;\n }\n return -1;\n }\n\n /**\n * Pick the first segment matching the filters — this is how the control's value\n * changes.\n *\n * Throws when nothing matches, naming the segments that do exist, and throws again\n * when the segment is still unpressed afterwards. That second failure has exactly\n * two causes and reports both, because a click that quietly did nothing surfaces as\n * an unrelated assertion three lines later.\n */\n async select(filters: WrSegmentedOptionHarnessFilters): Promise<void> {\n const [option] = await this.getOptions(filters);\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.select(): no segment matched ${JSON.stringify(filters)}. This control offers: ` +\n `${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'select');\n }\n\n /**\n * Pick the segment at a position, counting from zero — the addressing route for an\n * icon-only strip, or for one whose labels a spec would rather not hard-code.\n *\n * Throws on an index outside the control, saying how many segments there are: an\n * off-by-one that resolved to nothing would otherwise read as \"the click did not\n * take\".\n */\n async selectAt(index: number): Promise<void> {\n const options = await this.getOptions();\n const option = options[index];\n if (!option) {\n throw new Error(\n `WrSegmentedHarness.selectAt(): index ${index} is outside this control, which has ${options.length} ` +\n `segment(s): ${(await this.describeOptions()).join(', ')}.`\n );\n }\n await this.pick(option, 'selectAt');\n }\n\n /**\n * Whether the control was disabled AS A WHOLE, from the `wr-segmented--disabled`\n * modifier.\n *\n * Deliberately not \"every segment is disabled\": a control whose options each carry\n * their own `disabled` looks identical to a user, and the modifier is the only thing\n * on the page that tells the two apart. What actually blocks a click is the native\n * `disabled` each button gets either way — ask a segment\n * ({@link WrSegmentedOptionHarness.isDisabled}) for that.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--disabled');\n }\n\n /**\n * The rendered control size.\n *\n * `md` is the component's own default and earns NO modifier class, so a bare host\n * IS `md` — the absence is the answer rather than a missing one. Read from the\n * class instead of the input, which is also why this reports what was rendered:\n * unlike the form controls, `<wr-segmented>` does not resolve its size through\n * `provideWrConfig()`, so an app-wide default set there does not reach it and this\n * will say so.\n */\n async getSize(): Promise<WrSegmentedSize> {\n const host = await this.host();\n for (const size of SIZES) {\n if (await host.hasClass(`wr-segmented--${size}`)) return size;\n }\n return 'md';\n }\n\n /**\n * The accessible name of every segment a Tab press can reach, in tab order.\n *\n * A LIST, not one label, and that is the shape worth pinning: the component authors\n * no roving `tabindex`, so each enabled segment is its own tab stop and reaching the\n * third one takes three Tabs. An all-disabled control is skipped over entirely and\n * answers `[]`.\n *\n * Unnamed segments are reported as `(unnamed)` rather than throwing — a tab order is\n * still a fact worth reading on a page that has that bug in it.\n */\n async getTabStopLabels(): Promise<string[]> {\n const enabled = await this.getOptions({ disabled: false });\n return this.describe(enabled);\n }\n\n /**\n * The accessible name of the segment that currently holds focus, or `null` when\n * focus is elsewhere.\n *\n * Independent of the selection here — see the note on the class. Reported as\n * `(unnamed)` for a segment with no name, for the reason\n * {@link getTabStopLabels} gives.\n */\n async getFocusedLabel(): Promise<string | null> {\n for (const option of await this.getOptions()) {\n if (await option.isFocused()) {\n return (await option.getAccessibleName()) ?? '(unnamed)';\n }\n }\n return null;\n }\n\n /**\n * Whether the surrounding `<wr-form-field>` is reporting this control invalid, from\n * `aria-invalid` on the host.\n *\n * `false` for a control with no field around it, and `false` for a field that is\n * invalid but has not shown its copy yet: the component keys the attribute on the\n * MESSAGE existing rather than on the error, because announcing \"invalid\" while\n * pointing at nothing is worse than staying quiet. So this and\n * {@link getDescriptionText} move together, and a `true` with no description would\n * be the finding.\n */\n async isInvalid(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-invalid')) === 'true';\n }\n\n /**\n * The text `aria-describedby` points at — the validation copy a screen reader is\n * given for this control — or `null` when the host describes nothing.\n *\n * Resolved from the document root, because the element named may sit anywhere on\n * the page, and THROWS when the reference resolves to no element: a dangling\n * `aria-describedby` renders exactly like a working one and is announced as\n * nothing, so returning `null` for it would report the bug as the healthy state.\n */\n async getDescriptionText(): Promise<string | null> {\n const describedBy = await (await this.host()).getAttribute('aria-describedby');\n if (describedBy === null) return null;\n\n const root = this.documentRootLocatorFactory();\n const texts: string[] = [];\n for (const id of describedBy.split(/\\s+/).filter(Boolean)) {\n // `CSS.escape`, because `WrFormField.controlId` is a public input: a\n // consumer passing `controlId=\"user.email\"` makes `#user.email-errors`\n // read as \"id `user` with class `email-errors`\", which matches nothing —\n // and this method THROWS on no match, so an unescaped selector reports a\n // healthy field as the exact bug the throw exists to catch.\n const target = await root.locatorForOptional(`#${CSS.escape(id)}`)();\n if (!target) {\n throw new Error(\n `WrSegmentedHarness.getDescriptionText(): \\`aria-describedby\\` names \"${id}\", which is on no element ` +\n 'in the document — a screen reader announces nothing for it.'\n );\n }\n texts.push(await target.text());\n }\n return texts.join(' ');\n }\n\n /**\n * Take focus off the strip entirely — what marks a bound field touched, and the\n * only thing that does.\n *\n * The component emits `touch` from a `focusout` that leaves the host, so a click\n * does not reach it and neither does Tab from one segment to the next: a strip a\n * user tabbed straight past has to end up untouched, which is the case `touched`\n * exists for. Resolves quietly when nothing inside was focused, since that is\n * already the state this asks for.\n */\n async blur(): Promise<void> {\n for (const option of await this.getOptions()) {\n if (await option.isFocused()) return option.blur();\n }\n }\n\n /**\n * The index the component publishes for the thumb, from the\n * `--wr-segmented-thumb-index` custom property it sets inline.\n *\n * **Not the selection, and this is the difference that bites.** The property is\n * `Math.max(0, selectedIndex)`, so a control holding a value that matches no option\n * publishes `0` — the thumb parks under the FIRST segment and is hidden by\n * {@link isThumbVisible} instead of being moved out of the way. A harness that read\n * this to answer \"which segment is selected\" would report segment one for a control\n * with no selection at all. {@link getSelectedIndex} is the selection.\n *\n * It is also not where the thumb IS: the stylesheet turns this into a `translateX`,\n * and no measurement of that survives a DOM without layout. This is the input to\n * that, which is the part a unit test can honestly check.\n */\n async getThumbIndex(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-index');\n }\n\n /**\n * The segment count the component publishes for the thumb, from\n * `--wr-segmented-thumb-count` — the divisor the stylesheet computes the thumb's\n * width with.\n *\n * Should always equal the number of segments, and the reason to ask is that nothing\n * else notices when it does not: a count that fell out of step with the options\n * leaves the thumb the wrong width and sliding to the wrong place, while every ARIA\n * state on the page stays correct. It is clamped to a minimum of `1`, so an empty\n * control reports `1` rather than dividing by zero.\n */\n async getThumbCount(): Promise<number> {\n return this.thumbVar('--wr-segmented-thumb-count');\n }\n\n /**\n * Whether the thumb is being shown at all.\n *\n * Read from the ABSENCE of the `wr-segmented--unselected` modifier, which is the\n * hook the stylesheet zeroes the thumb's opacity through. The computed opacity is\n * not the answer here — a unit test applies no stylesheet — so the public modifier\n * is the contract, and it is what tells \"parked under segment one\" from \"hidden\n * because nothing is selected\".\n */\n async isThumbVisible(): Promise<boolean> {\n return !(await (await this.host()).hasClass('wr-segmented--unselected'));\n }\n\n /**\n * Whether the thumb will animate its next move, from the `wr-segmented--mounted`\n * modifier that gates the transition.\n *\n * Not \"the thumb is animating now\": nothing about a running animation is visible to\n * a unit test. What this pins is the deliberate asymmetry — the class is added in\n * `afterNextRender`, so the FIRST snap to the initial value is instant and every\n * user-driven move after it slides. Deferred work like that only lands once the\n * fixture is stable, which every harness read already waits for.\n */\n async isThumbTransitionEnabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-segmented--mounted');\n }\n\n /** Click a segment and turn a click that did nothing into a failure that says why. */\n private async pick(option: WrSegmentedOptionHarness, caller: 'select' | 'selectAt'): Promise<void> {\n await option.select();\n\n if (!(await option.isSelected())) {\n const name = (await option.getAccessibleName()) ?? '(unnamed)';\n throw new Error(\n `WrSegmentedHarness.${caller}(): \"${name}\" is still unpressed after being clicked — either that ` +\n 'option carries `disabled` or the whole control does.'\n );\n }\n }\n\n /** Segment names for an error message, which must not throw on its way out. */\n private async describeOptions(): Promise<string[]> {\n return this.describe(await this.getOptions());\n }\n\n private async describe(options: readonly WrSegmentedOptionHarness[]): Promise<string[]> {\n return Promise.all(options.map(async option => (await option.getAccessibleName()) ?? '(unnamed)'));\n }\n\n /**\n * One custom property off the host's `style` ATTRIBUTE.\n *\n * Not `getCssValue()`, which is `getComputedStyle`: with the entry point's own\n * stylesheet loaded that resolves the sheet's declaration, so the method\n * answers plausibly at exactly the moment the host binding — the thing under\n * test — is what broke. The attribute holds only what the component wrote.\n */\n private async inlineVar(property: string): Promise<string> {\n const attr = (await (await this.host()).getAttribute('style')) ?? '';\n const found = new RegExp(`(?:^|;)\\\\s*${property}\\\\s*:\\\\s*([^;]+)`).exec(attr);\n return (found?.[1] ?? '').trim();\n }\n\n /** One of the thumb's inline custom properties, as a number. */\n private async thumbVar(property: string): Promise<number> {\n const raw = await this.inlineVar(property);\n const value = Number.parseInt(raw, 10);\n if (Number.isNaN(value)) {\n throw new Error(\n `WrSegmentedHarness: could not read \\`${property}\\`, which computed to \"${raw}\". The component sets it ` +\n 'inline on the host; an environment that drops custom properties cannot answer this.'\n );\n }\n return value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,MAAO,wBAAyB,SAAQ,gBAAgB,CAAA;;AAE5D,IAAA,OAAO,YAAY,GAAG,uBAAuB;;AAG7C,IAAA,OAAO,IAAI,CAAC,OAAA,GAA2C,EAAE,EAAA;AACvD,QAAA,QACE,IAAI,gBA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