forty-cdk 0.2.0 → 0.3.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/accordion/README.md +122 -0
- package/aspect-ratio/README.md +76 -0
- package/avatar/README.md +100 -0
- package/breadcrumbs/README.md +49 -0
- package/breakpoints/README.md +81 -0
- package/button/README.md +49 -0
- package/calendar/README.md +458 -0
- package/carousel/README.md +358 -0
- package/checkbox/README.md +146 -0
- package/combobox/README.md +535 -0
- package/context-menu/README.md +139 -0
- package/date-field/README.md +184 -0
- package/date-picker/README.md +338 -0
- package/dialog/README.md +388 -0
- package/disclosure/README.md +114 -0
- package/drag-drop/README.md +359 -0
- package/drawer/README.md +560 -0
- package/dropdown-menu/README.md +176 -0
- package/fesm2022/forty-cdk-accordion.mjs +348 -0
- package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
- package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
- package/fesm2022/forty-cdk-avatar.mjs +308 -0
- package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
- package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
- package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
- package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
- package/fesm2022/forty-cdk-button.mjs +134 -0
- package/fesm2022/forty-cdk-button.mjs.map +1 -0
- package/fesm2022/forty-cdk-calendar.mjs +2034 -0
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
- package/fesm2022/forty-cdk-carousel.mjs +968 -0
- package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
- package/fesm2022/forty-cdk-checkbox.mjs +226 -0
- package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-combobox.mjs +2596 -0
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
- package/fesm2022/forty-cdk-context-menu.mjs +413 -0
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-core.mjs +9022 -0
- package/fesm2022/forty-cdk-core.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-field.mjs +744 -0
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-dialog.mjs +707 -0
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
- package/fesm2022/forty-cdk-disclosure.mjs +190 -0
- package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
- package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/forty-cdk-drawer.mjs +1641 -0
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-field.mjs +425 -0
- package/fesm2022/forty-cdk-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-fieldset.mjs +164 -0
- package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
- package/fesm2022/forty-cdk-file-upload.mjs +221 -0
- package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
- package/fesm2022/forty-cdk-hover-card.mjs +496 -0
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
- package/fesm2022/forty-cdk-input.mjs +274 -0
- package/fesm2022/forty-cdk-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +1279 -0
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
- package/fesm2022/forty-cdk-menu.mjs +1439 -0
- package/fesm2022/forty-cdk-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-menubar.mjs +787 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
- package/fesm2022/forty-cdk-meter.mjs +211 -0
- package/fesm2022/forty-cdk-meter.mjs.map +1 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
- package/fesm2022/forty-cdk-number-input.mjs +559 -0
- package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-otp-input.mjs +527 -0
- package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
- package/fesm2022/forty-cdk-pagination.mjs +323 -0
- package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
- package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
- package/fesm2022/forty-cdk-popover.mjs +698 -0
- package/fesm2022/forty-cdk-popover.mjs.map +1 -0
- package/fesm2022/forty-cdk-progress.mjs +226 -0
- package/fesm2022/forty-cdk-progress.mjs.map +1 -0
- package/fesm2022/forty-cdk-radio-group.mjs +378 -0
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
- package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
- package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
- package/fesm2022/forty-cdk-search.mjs +205 -0
- package/fesm2022/forty-cdk-search.mjs.map +1 -0
- package/fesm2022/forty-cdk-select.mjs +1661 -0
- package/fesm2022/forty-cdk-select.mjs.map +1 -0
- package/fesm2022/forty-cdk-separator.mjs +82 -0
- package/fesm2022/forty-cdk-separator.mjs.map +1 -0
- package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
- package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
- package/fesm2022/forty-cdk-slider.mjs +803 -0
- package/fesm2022/forty-cdk-slider.mjs.map +1 -0
- package/fesm2022/forty-cdk-stepper.mjs +886 -0
- package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
- package/fesm2022/forty-cdk-switch.mjs +137 -0
- package/fesm2022/forty-cdk-switch.mjs.map +1 -0
- package/fesm2022/forty-cdk-table.mjs +1518 -0
- package/fesm2022/forty-cdk-table.mjs.map +1 -0
- package/fesm2022/forty-cdk-tabs.mjs +400 -0
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-field.mjs +593 -0
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
- package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
- package/fesm2022/forty-cdk-toast.mjs +1153 -0
- package/fesm2022/forty-cdk-toast.mjs.map +1 -0
- package/fesm2022/forty-cdk-toggle.mjs +516 -0
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
- package/fesm2022/forty-cdk-toolbar.mjs +374 -0
- package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
- package/fesm2022/forty-cdk-tooltip.mjs +672 -0
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
- package/fesm2022/forty-cdk-tree.mjs +2007 -0
- package/fesm2022/forty-cdk-tree.mjs.map +1 -0
- package/fesm2022/forty-cdk-virtualization.mjs +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk.mjs +0 -43310
- package/fesm2022/forty-cdk.mjs.map +1 -1
- package/field/README.md +97 -0
- package/fieldset/README.md +86 -0
- package/file-upload/README.md +73 -0
- package/hover-card/README.md +171 -0
- package/input/README.md +156 -0
- package/listbox/README.md +424 -0
- package/menu/README.md +181 -0
- package/menubar/README.md +140 -0
- package/meter/README.md +128 -0
- package/navigation-menu/README.md +253 -0
- package/number-input/README.md +171 -0
- package/otp-input/README.md +198 -0
- package/package.json +213 -1
- package/pagination/README.md +61 -0
- package/pane-resizer/README.md +136 -0
- package/popover/README.md +262 -0
- package/progress/README.md +115 -0
- package/radio-group/README.md +129 -0
- package/scroll-area/README.md +184 -0
- package/search/README.md +42 -0
- package/select/README.md +488 -0
- package/separator/README.md +84 -0
- package/signal-forms/README.md +72 -0
- package/slider/README.md +152 -0
- package/stepper/README.md +292 -0
- package/switch/README.md +116 -0
- package/table/README.md +769 -0
- package/tabs/README.md +130 -0
- package/time-field/README.md +157 -0
- package/time-picker/README.md +172 -0
- package/toast/README.md +398 -0
- package/toggle/README.md +224 -0
- package/toolbar/README.md +109 -0
- package/tooltip/README.md +274 -0
- package/tree/README.md +708 -0
- package/types/forty-cdk-accordion.d.ts +242 -0
- package/types/forty-cdk-aspect-ratio.d.ts +59 -0
- package/types/forty-cdk-avatar.d.ts +133 -0
- package/types/forty-cdk-breadcrumbs.d.ts +92 -0
- package/types/forty-cdk-breakpoints.d.ts +141 -0
- package/types/forty-cdk-button.d.ts +80 -0
- package/types/forty-cdk-calendar.d.ts +914 -0
- package/types/forty-cdk-carousel.d.ts +530 -0
- package/types/forty-cdk-checkbox.d.ts +141 -0
- package/types/forty-cdk-combobox.d.ts +1259 -0
- package/types/forty-cdk-context-menu.d.ts +313 -0
- package/types/forty-cdk-core.d.ts +5774 -0
- package/types/forty-cdk-date-field.d.ts +307 -0
- package/types/forty-cdk-date-picker.d.ts +622 -0
- package/types/forty-cdk-dialog.d.ts +546 -0
- package/types/forty-cdk-disclosure.d.ts +127 -0
- package/types/forty-cdk-drag-drop.d.ts +456 -0
- package/types/forty-cdk-drawer.d.ts +871 -0
- package/types/forty-cdk-dropdown-menu.d.ts +242 -0
- package/types/forty-cdk-field.d.ts +236 -0
- package/types/forty-cdk-fieldset.d.ts +119 -0
- package/types/forty-cdk-file-upload.d.ts +124 -0
- package/types/forty-cdk-hover-card.d.ts +320 -0
- package/types/forty-cdk-input.d.ts +169 -0
- package/types/forty-cdk-internationalized-date.d.ts +1 -1
- package/types/forty-cdk-listbox.d.ts +513 -0
- package/types/forty-cdk-menu.d.ts +629 -0
- package/types/forty-cdk-menubar.d.ts +451 -0
- package/types/forty-cdk-meter.d.ts +122 -0
- package/types/forty-cdk-navigation-menu.d.ts +514 -0
- package/types/forty-cdk-number-input.d.ts +319 -0
- package/types/forty-cdk-otp-input.d.ts +248 -0
- package/types/forty-cdk-pagination.d.ts +214 -0
- package/types/forty-cdk-pane-resizer.d.ts +145 -0
- package/types/forty-cdk-popover.d.ts +509 -0
- package/types/forty-cdk-progress.d.ts +143 -0
- package/types/forty-cdk-radio-group.d.ts +222 -0
- package/types/forty-cdk-scroll-area.d.ts +258 -0
- package/types/forty-cdk-search.d.ts +142 -0
- package/types/forty-cdk-select.d.ts +899 -0
- package/types/forty-cdk-separator.d.ts +59 -0
- package/types/forty-cdk-signal-forms.d.ts +58 -0
- package/types/forty-cdk-slider.d.ts +379 -0
- package/types/forty-cdk-stepper.d.ts +650 -0
- package/types/forty-cdk-switch.d.ts +87 -0
- package/types/forty-cdk-table.d.ts +723 -0
- package/types/forty-cdk-tabs.d.ts +235 -0
- package/types/forty-cdk-time-field.d.ts +307 -0
- package/types/forty-cdk-time-picker.d.ts +578 -0
- package/types/forty-cdk-toast.d.ts +598 -0
- package/types/forty-cdk-toggle.d.ts +310 -0
- package/types/forty-cdk-toolbar.d.ts +217 -0
- package/types/forty-cdk-tooltip.d.ts +436 -0
- package/types/forty-cdk-tree.d.ts +688 -0
- package/types/forty-cdk.d.ts +1 -19743
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { model, computed, Directive, InjectionToken, inject, ElementRef, input, booleanAttribute } from '@angular/core';
|
|
3
|
+
import { FormUiControlBase, injectHiddenInput, createDefaults, injectTextDirection, RovingTabindex, Collection, firstEnabledHost, reconcileRovingActive, moveIndex, FOR_HOST_ROVING_CONTEXT, registerHandle, reflectDisabled, resolveListNavigation } from 'forty-cdk/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Headless implementation of the [WAI-ARIA Toggle Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/) —
|
|
7
|
+
* a single-purpose `<button>` whose pressed state is reflected via
|
|
8
|
+
* `aria-pressed`. Implements Angular's `FormCheckboxControl` from
|
|
9
|
+
* `@angular/forms/signals` so a single toggle auto-wires with `[formField]`
|
|
10
|
+
* (bold / italic, mute, favourite — the common `aria-pressed` form inputs).
|
|
11
|
+
*
|
|
12
|
+
* Apply on a native `<button>` so Enter / Space and disabled handling come
|
|
13
|
+
* from the platform. The directive toggles its state on click and reflects
|
|
14
|
+
* ARIA + `data-state` for styling.
|
|
15
|
+
*
|
|
16
|
+
* For a set of toggles with arrow-key navigation and single / multiple
|
|
17
|
+
* selection semantics, use `[forToggleGroup]` + `[forToggleGroupItem]`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <button forToggle [(checked)]="bold">B</button>
|
|
22
|
+
*
|
|
23
|
+
* <!-- With Signal Forms: -->
|
|
24
|
+
* <button forToggle [formField]="prefs.bold">B</button>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
class ForToggle extends FormUiControlBase {
|
|
28
|
+
/**
|
|
29
|
+
* Two-way bindable on/off state. Required by `FormCheckboxControl`, so the
|
|
30
|
+
* toggle auto-wires with `[formField]`; the host reflects it through
|
|
31
|
+
* `aria-pressed` and `data-state` (still a toggle button — only the value's
|
|
32
|
+
* name is `checked`). The `model()` change emitter (`(checkedChange)`) fires
|
|
33
|
+
* only on internal transitions (user click), never on consumer writes via
|
|
34
|
+
* `[(checked)]`.
|
|
35
|
+
*/
|
|
36
|
+
checked = model(false, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
injectHiddenInput({
|
|
41
|
+
name: this.name,
|
|
42
|
+
values: computed(() => (this.checked() ? ['on'] : [])),
|
|
43
|
+
disabled: this.effectiveDisabled,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
onClick() {
|
|
47
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.checked.update((v) => !v);
|
|
51
|
+
}
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToggle, isStandalone: true, selector: "[forToggle]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "blur": "markTouched()" }, properties: { "attr.aria-pressed": "checked() ? \"true\" : \"false\"", "attr.aria-disabled": "effectiveDisabled() ? \"true\" : null", "attr.aria-readonly": "readonly() ? \"true\" : null", "attr.aria-required": "required() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.aria-busy": "pending() ? \"true\" : null", "attr.name": "name() || null", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.data-readonly": "readonly() ? \"\" : null" } }, exportAs: ["forToggle"], usesInheritance: true, ngImport: i0 });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggle, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: '[forToggle]',
|
|
59
|
+
exportAs: 'forToggle',
|
|
60
|
+
host: {
|
|
61
|
+
type: 'button',
|
|
62
|
+
'[attr.aria-pressed]': 'checked() ? "true" : "false"',
|
|
63
|
+
'[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
|
|
64
|
+
'[attr.aria-readonly]': 'readonly() ? "true" : null',
|
|
65
|
+
'[attr.aria-required]': 'required() ? "true" : null',
|
|
66
|
+
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
67
|
+
'[attr.aria-busy]': 'pending() ? "true" : null',
|
|
68
|
+
'[attr.name]': 'name() || null',
|
|
69
|
+
'[attr.data-state]': 'checked() ? "checked" : "unchecked"',
|
|
70
|
+
'[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
|
|
71
|
+
'[attr.data-readonly]': 'readonly() ? "" : null',
|
|
72
|
+
'(click)': 'onClick()',
|
|
73
|
+
'(blur)': 'markTouched()',
|
|
74
|
+
},
|
|
75
|
+
}]
|
|
76
|
+
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Library fallback for toggle defaults, read at the root injector when no
|
|
80
|
+
* consumer has called `provideForToggleDefaults`. Exported for the shared defaults
|
|
81
|
+
* contract spec; not re-exported from the primitive's public entry.
|
|
82
|
+
*/
|
|
83
|
+
const FOR_TOGGLE_FALLBACK_DEFAULTS = {
|
|
84
|
+
loop: true,
|
|
85
|
+
};
|
|
86
|
+
const { token, provideDefaults } = createDefaults('FOR_TOGGLE_DEFAULTS', FOR_TOGGLE_FALLBACK_DEFAULTS);
|
|
87
|
+
/** Token holding the resolved toggle defaults for the current scope. */
|
|
88
|
+
const FOR_TOGGLE_DEFAULTS = token;
|
|
89
|
+
/**
|
|
90
|
+
* Configures forty-cdk toggle defaults for this injector scope. Partial
|
|
91
|
+
* overrides inherit unspecified keys from the parent scope (or library
|
|
92
|
+
* defaults at the root).
|
|
93
|
+
*/
|
|
94
|
+
function provideForToggleDefaults(defaults = {}) {
|
|
95
|
+
return provideDefaults(defaults);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const FOR_TOGGLE_GROUP_CONTEXT = new InjectionToken('FOR_TOGGLE_GROUP_CONTEXT');
|
|
99
|
+
function injectToggleGroupContext(piece) {
|
|
100
|
+
const ctx = inject(FOR_TOGGLE_GROUP_CONTEXT, { optional: true });
|
|
101
|
+
if (!ctx) {
|
|
102
|
+
throw new Error(`[forty-cdk/toggle-group] ${piece} must be used inside a [forToggleGroup] element.`);
|
|
103
|
+
}
|
|
104
|
+
return ctx;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Headless group of toggle buttons: a `role="group"` container whose items
|
|
109
|
+
* each carry `aria-pressed`, modelled on the
|
|
110
|
+
* [WAI-ARIA Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)
|
|
111
|
+
* (toggle-button variant). Owns the
|
|
112
|
+
* selected-values set, navigation policy, and the registry of
|
|
113
|
+
* `[forToggleGroupItem]` children. Implements
|
|
114
|
+
* `FormValueControl<readonly string[]>` from `@angular/forms/signals` for
|
|
115
|
+
* `[formField]` auto-wiring. (The Toolbar pattern applies only when a group is
|
|
116
|
+
* nested inside `[forToolbar]`; see the composition note on
|
|
117
|
+
* `ForToggleGroupItem`.)
|
|
118
|
+
*
|
|
119
|
+
* Two selection modes:
|
|
120
|
+
* - multiple (`multiple=true`): clicking an item flips its presence in
|
|
121
|
+
* `value`. Matches a "formatting toolbar" (Bold, Italic, Underline).
|
|
122
|
+
* - single (`multiple=false`, default): clicking selects exclusively;
|
|
123
|
+
* clicking an already-selected item de-selects it (you can land on `[]`).
|
|
124
|
+
* Matches an "alignment toolbar" (Left, Center, Right) where users may
|
|
125
|
+
* want to clear the choice.
|
|
126
|
+
*
|
|
127
|
+
* `value` is always `readonly string[]` so consumers can flip `multiple`
|
|
128
|
+
* without re-typing their state. In single mode the array carries 0 or
|
|
129
|
+
* 1 entries.
|
|
130
|
+
*
|
|
131
|
+
* Roving tabindex: only one item is in the Tab sequence at a time. With
|
|
132
|
+
* a non-empty selection, the first selected item; otherwise the first
|
|
133
|
+
* enabled item in DOM order. Arrow keys move focus (no
|
|
134
|
+
* selection-on-focus — toggles always require an explicit click).
|
|
135
|
+
*
|
|
136
|
+
* `ForToggle` (the standalone single-button toggle) is also a form
|
|
137
|
+
* control, but a `FormCheckboxControl` carrying a single boolean value.
|
|
138
|
+
* Use `ForToggleGroup` (in single or multiple mode) when you need a set
|
|
139
|
+
* of pressed values as the form value.
|
|
140
|
+
*/
|
|
141
|
+
class ForToggleGroup extends FormUiControlBase {
|
|
142
|
+
#host = inject(ElementRef);
|
|
143
|
+
#defaults = inject(FOR_TOGGLE_DEFAULTS);
|
|
144
|
+
/**
|
|
145
|
+
* Two-way bindable. The currently pressed values, in arbitrary order.
|
|
146
|
+
* In single mode the array holds 0 or 1 entries. The `model()` change
|
|
147
|
+
* emitter (`(valueChange)`) fires only on internal transitions (item
|
|
148
|
+
* click), never on consumer writes via `[(value)]`. Required by
|
|
149
|
+
* `FormValueControl<readonly string[]>`.
|
|
150
|
+
*/
|
|
151
|
+
value = model([], /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
153
|
+
/**
|
|
154
|
+
* When false (default), only one item can be pressed at a time. Clicking
|
|
155
|
+
* an already-pressed item clears the selection. When true, clicks toggle
|
|
156
|
+
* each item independently.
|
|
157
|
+
*/
|
|
158
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
159
|
+
/** Layout direction for keyboard navigation. */
|
|
160
|
+
orientation = input('horizontal', /* @ts-ignore */
|
|
161
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
162
|
+
/**
|
|
163
|
+
* Reading direction. RTL swaps ArrowLeft/ArrowRight. When unset (default
|
|
164
|
+
* `null`), the inherited ambient direction is resolved from the nearest
|
|
165
|
+
* ancestor carrying a `dir` attribute (or `<html dir>`), defaulting to
|
|
166
|
+
* `'ltr'`. An explicit `[dir]` always wins and the resolved value is
|
|
167
|
+
* reflected to the host `dir` attribute.
|
|
168
|
+
*/
|
|
169
|
+
_dirInput = input(null, { ...(ngDevMode ? { debugName: "_dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
|
|
170
|
+
dir = injectTextDirection(this._dirInput);
|
|
171
|
+
/**
|
|
172
|
+
* When true (default), arrow nav wraps at the ends. The default is read
|
|
173
|
+
* from `provideForToggleDefaults` for the surrounding scope.
|
|
174
|
+
*/
|
|
175
|
+
loop = input(this.#defaults.loop, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
176
|
+
/**
|
|
177
|
+
* Roving-tabindex tracker. Items promote themselves to active on `(focus)`
|
|
178
|
+
* and read `active()` in their tabindex computed, so re-entry (Shift+Tab
|
|
179
|
+
* back into the group) restores the last focused item — matching Tabs /
|
|
180
|
+
* Tree. Before any focus, `active()` is `null` and the tabindex falls back
|
|
181
|
+
* to the first-selected / first-enabled entry point.
|
|
182
|
+
*/
|
|
183
|
+
roving = new RovingTabindex();
|
|
184
|
+
#items = new Collection();
|
|
185
|
+
#firstSelectedHost = computed(() => {
|
|
186
|
+
const selected = this.value();
|
|
187
|
+
if (selected.length === 0) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
for (const item of this.#items.items()) {
|
|
191
|
+
if (!item.disabled() && selected.includes(item.value())) {
|
|
192
|
+
return item.host;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "#firstSelectedHost" }] : /* istanbul ignore next */ []));
|
|
198
|
+
#firstEnabledHost = computed(() => firstEnabledHost(this.#items.items()), /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "#firstEnabledHost" }] : /* istanbul ignore next */ []));
|
|
200
|
+
constructor() {
|
|
201
|
+
super();
|
|
202
|
+
injectHiddenInput({
|
|
203
|
+
name: this.name,
|
|
204
|
+
values: this.value,
|
|
205
|
+
disabled: this.effectiveDisabled,
|
|
206
|
+
});
|
|
207
|
+
reconcileRovingActive(this.roving, this.#items.items);
|
|
208
|
+
}
|
|
209
|
+
isSelected(v) {
|
|
210
|
+
return this.value().includes(v);
|
|
211
|
+
}
|
|
212
|
+
toggle(v) {
|
|
213
|
+
if (this.effectiveDisabled() || this.readonly()) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const current = this.value();
|
|
217
|
+
const isSelected = current.includes(v);
|
|
218
|
+
if (this.multiple()) {
|
|
219
|
+
this.value.set(isSelected ? current.filter((x) => x !== v) : [...current, v]);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
// Single: clicking the pressed item clears, otherwise replace.
|
|
223
|
+
this.value.set(isSelected ? [] : [v]);
|
|
224
|
+
}
|
|
225
|
+
navigate(currentItem, action) {
|
|
226
|
+
if (this.effectiveDisabled()) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const items = this.#items.items();
|
|
230
|
+
if (items.length === 0) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const currentIndex = items.findIndex((item) => item.host === currentItem);
|
|
234
|
+
const next = moveIndex(currentIndex < 0 ? 0 : currentIndex, items.length, action, {
|
|
235
|
+
loop: this.loop(),
|
|
236
|
+
isDisabled: (i) => items[i].disabled(),
|
|
237
|
+
});
|
|
238
|
+
if (next === null) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
items[next]?.host.focus();
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Tabindex policy: with at least one selection, the first selected item
|
|
245
|
+
* is the entry point; otherwise the first enabled item in DOM order.
|
|
246
|
+
*/
|
|
247
|
+
isFirstFocusableItem(el) {
|
|
248
|
+
const firstSelected = this.#firstSelectedHost();
|
|
249
|
+
if (firstSelected) {
|
|
250
|
+
return firstSelected === el;
|
|
251
|
+
}
|
|
252
|
+
return this.#firstEnabledHost() === el;
|
|
253
|
+
}
|
|
254
|
+
registerItem(handle) {
|
|
255
|
+
this.#items.register(handle);
|
|
256
|
+
}
|
|
257
|
+
unregisterItem(handle) {
|
|
258
|
+
this.#items.unregister(handle);
|
|
259
|
+
this.roving.unregister(handle.host);
|
|
260
|
+
}
|
|
261
|
+
onFocusOut(event) {
|
|
262
|
+
const next = event.relatedTarget;
|
|
263
|
+
if (next && this.#host.nativeElement.contains(next)) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
this.markTouched();
|
|
267
|
+
}
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggleGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
269
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToggleGroup, isStandalone: true, selector: "[forToggleGroup]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, _dirInput: { classPropertyName: "_dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-disabled": "effectiveDisabled() ? \"true\" : null", "attr.aria-readonly": "readonly() ? \"true\" : null", "attr.aria-required": "required() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.aria-busy": "pending() ? \"true\" : null", "attr.data-orientation": "orientation()", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.dir": "dir()" } }, providers: [{ provide: FOR_TOGGLE_GROUP_CONTEXT, useExisting: ForToggleGroup }], exportAs: ["forToggleGroup"], usesInheritance: true, ngImport: i0 });
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggleGroup, decorators: [{
|
|
272
|
+
type: Directive,
|
|
273
|
+
args: [{
|
|
274
|
+
selector: '[forToggleGroup]',
|
|
275
|
+
exportAs: 'forToggleGroup',
|
|
276
|
+
host: {
|
|
277
|
+
role: 'group',
|
|
278
|
+
'[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
|
|
279
|
+
'[attr.aria-readonly]': 'readonly() ? "true" : null',
|
|
280
|
+
'[attr.aria-required]': 'required() ? "true" : null',
|
|
281
|
+
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
282
|
+
'[attr.aria-busy]': 'pending() ? "true" : null',
|
|
283
|
+
'[attr.data-orientation]': 'orientation()',
|
|
284
|
+
'[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
|
|
285
|
+
'[attr.dir]': 'dir()',
|
|
286
|
+
'(focusout)': 'onFocusOut($event)',
|
|
287
|
+
},
|
|
288
|
+
providers: [{ provide: FOR_TOGGLE_GROUP_CONTEXT, useExisting: ForToggleGroup }],
|
|
289
|
+
}]
|
|
290
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], _dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }] } });
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* One toggle button inside a `[forToggleGroup]`. Apply on a `<button>`.
|
|
294
|
+
*
|
|
295
|
+
* Pressed state is derived from the group's `value`. Click goes through
|
|
296
|
+
* `group.toggle(value())` so single-vs-multiple semantics live in the
|
|
297
|
+
* group, not the item.
|
|
298
|
+
*
|
|
299
|
+
* Roving tabindex: only one item is in the Tab sequence at a time
|
|
300
|
+
* (the first selected, or the first enabled when nothing is pressed).
|
|
301
|
+
* Arrow keys move focus inside the group; the consumer never has to
|
|
302
|
+
* wire keyboard navigation manually.
|
|
303
|
+
*
|
|
304
|
+
* **Composition with [forToolbar]:** when the group is nested inside a
|
|
305
|
+
* `[forToolbar]`, focus management is delegated to the toolbar — the
|
|
306
|
+
* tabindex policy and arrow-key navigation flow across all toolbar items
|
|
307
|
+
* (buttons, links, toggle items) instead of staying confined to the
|
|
308
|
+
* group. Selection still lives on the group; only focus is shared.
|
|
309
|
+
*/
|
|
310
|
+
class ForToggleGroupItem {
|
|
311
|
+
group = injectToggleGroupContext('ForToggleGroupItem');
|
|
312
|
+
#rovingHost = inject(FOR_HOST_ROVING_CONTEXT, { optional: true, skipSelf: true });
|
|
313
|
+
#host = inject(ElementRef);
|
|
314
|
+
/** Identifier added to / removed from the group's `value`. Required. */
|
|
315
|
+
value = input.required(/* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
317
|
+
/** Per-item disabled (in addition to the group's `disabled`). */
|
|
318
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
319
|
+
pressed = computed(() => this.group.isSelected(this.value()), /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
|
|
321
|
+
effectiveDisabled = computed(() => this.disabled() || this.group.effectiveDisabled() || (this.#rovingHost?.disabled() ?? false), /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
323
|
+
/**
|
|
324
|
+
* Tabindex per APG: once any item has been focused, the roving tracker owns
|
|
325
|
+
* the tab stop so re-entry restores the last focused item; before that, fall
|
|
326
|
+
* back to the entry point (first selected / first enabled). The roving host
|
|
327
|
+
* is the toolbar when nested inside one, otherwise the group. Disabled items
|
|
328
|
+
* are always -1.
|
|
329
|
+
*/
|
|
330
|
+
tabindex = computed(() => {
|
|
331
|
+
if (this.effectiveDisabled()) {
|
|
332
|
+
return -1;
|
|
333
|
+
}
|
|
334
|
+
const owner = this.#rovingHost ?? this.group;
|
|
335
|
+
if (owner.roving.hasActive()) {
|
|
336
|
+
return owner.roving.tabindexFor(this.#host.nativeElement);
|
|
337
|
+
}
|
|
338
|
+
return owner.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;
|
|
339
|
+
}, /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
341
|
+
constructor() {
|
|
342
|
+
const groupHandle = {
|
|
343
|
+
host: this.#host.nativeElement,
|
|
344
|
+
value: this.value,
|
|
345
|
+
disabled: this.effectiveDisabled,
|
|
346
|
+
};
|
|
347
|
+
registerHandle(groupHandle, (h) => this.group.registerItem(h), (h) => this.group.unregisterItem(h));
|
|
348
|
+
const rovingHost = this.#rovingHost;
|
|
349
|
+
if (rovingHost) {
|
|
350
|
+
const rovingHandle = {
|
|
351
|
+
host: this.#host.nativeElement,
|
|
352
|
+
disabled: this.effectiveDisabled,
|
|
353
|
+
};
|
|
354
|
+
registerHandle(rovingHandle, (h) => rovingHost.registerItem(h), (h) => rovingHost.unregisterItem(h));
|
|
355
|
+
}
|
|
356
|
+
reflectDisabled(this.effectiveDisabled);
|
|
357
|
+
}
|
|
358
|
+
onClick() {
|
|
359
|
+
if (this.effectiveDisabled()) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
this.group.toggle(this.value());
|
|
363
|
+
}
|
|
364
|
+
onFocus() {
|
|
365
|
+
if (this.effectiveDisabled()) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const owner = this.#rovingHost ?? this.group;
|
|
369
|
+
owner.roving.setActive(this.#host.nativeElement);
|
|
370
|
+
}
|
|
371
|
+
onKeyDown(event) {
|
|
372
|
+
if (this.effectiveDisabled()) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const owner = this.#rovingHost ?? this.group;
|
|
376
|
+
const action = resolveListNavigation(event, {
|
|
377
|
+
orientation: owner.orientation(),
|
|
378
|
+
dir: owner.dir(),
|
|
379
|
+
});
|
|
380
|
+
if (!action) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
event.preventDefault();
|
|
384
|
+
owner.navigate(this.#host.nativeElement, action);
|
|
385
|
+
}
|
|
386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggleGroupItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
387
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: ForToggleGroupItem, isStandalone: true, selector: "[forToggleGroupItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "focus": "onFocus()", "keydown": "onKeyDown($event)" }, properties: { "attr.aria-pressed": "pressed() ? \"true\" : \"false\"", "attr.aria-disabled": "effectiveDisabled() ? \"true\" : null", "attr.tabindex": "tabindex()", "attr.data-state": "pressed() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "effectiveDisabled() ? \"\" : null", "attr.data-orientation": "group.orientation()" } }, exportAs: ["forToggleGroupItem"], ngImport: i0 });
|
|
388
|
+
}
|
|
389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: ForToggleGroupItem, decorators: [{
|
|
390
|
+
type: Directive,
|
|
391
|
+
args: [{
|
|
392
|
+
selector: '[forToggleGroupItem]',
|
|
393
|
+
exportAs: 'forToggleGroupItem',
|
|
394
|
+
host: {
|
|
395
|
+
type: 'button',
|
|
396
|
+
'[attr.aria-pressed]': 'pressed() ? "true" : "false"',
|
|
397
|
+
'[attr.aria-disabled]': 'effectiveDisabled() ? "true" : null',
|
|
398
|
+
'[attr.tabindex]': 'tabindex()',
|
|
399
|
+
'[attr.data-state]': 'pressed() ? "checked" : "unchecked"',
|
|
400
|
+
'[attr.data-disabled]': 'effectiveDisabled() ? "" : null',
|
|
401
|
+
'[attr.data-orientation]': 'group.orientation()',
|
|
402
|
+
'(click)': 'onClick()',
|
|
403
|
+
'(focus)': 'onFocus()',
|
|
404
|
+
'(keydown)': 'onKeyDown($event)',
|
|
405
|
+
},
|
|
406
|
+
}]
|
|
407
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Exact public names of every `ForToggle` input, its models included. Spread it into the
|
|
411
|
+
* `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the
|
|
412
|
+
* primitive's full surface — the Signal Forms members `[formField]` binds among them —
|
|
413
|
+
* without hand-maintaining the list. Always spread into an inline object literal as shown
|
|
414
|
+
* below: the literal is what keeps the entry statically analyzable for consumers compiling
|
|
415
|
+
* against the published package. An anti-drift spec fails when this list no longer matches
|
|
416
|
+
* the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported
|
|
417
|
+
* wrapping patterns.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```ts
|
|
421
|
+
* @Component({
|
|
422
|
+
* selector: 'button[myToggle]',
|
|
423
|
+
* template: '',
|
|
424
|
+
* hostDirectives: [
|
|
425
|
+
* {
|
|
426
|
+
* directive: ForToggle,
|
|
427
|
+
* inputs: [...FOR_TOGGLE_HOST_DIRECTIVE_INPUTS],
|
|
428
|
+
* outputs: [...FOR_TOGGLE_HOST_DIRECTIVE_OUTPUTS],
|
|
429
|
+
* },
|
|
430
|
+
* ],
|
|
431
|
+
* })
|
|
432
|
+
* export class MyToggle {}
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
const FOR_TOGGLE_HOST_DIRECTIVE_INPUTS = [
|
|
436
|
+
'checked',
|
|
437
|
+
'dirty',
|
|
438
|
+
'disabled',
|
|
439
|
+
'errors',
|
|
440
|
+
'invalid',
|
|
441
|
+
'name',
|
|
442
|
+
'pending',
|
|
443
|
+
'readonly',
|
|
444
|
+
'required',
|
|
445
|
+
'touched',
|
|
446
|
+
];
|
|
447
|
+
/**
|
|
448
|
+
* Exact public names of every `ForToggle` output, the Signal Forms `touch` output
|
|
449
|
+
* included. Spread it into the `outputs` array of the same `hostDirectives` entry as
|
|
450
|
+
* {@link FOR_TOGGLE_HOST_DIRECTIVE_INPUTS}.
|
|
451
|
+
*/
|
|
452
|
+
const FOR_TOGGLE_HOST_DIRECTIVE_OUTPUTS = [
|
|
453
|
+
'checkedChange',
|
|
454
|
+
'touchedChange',
|
|
455
|
+
'touch',
|
|
456
|
+
];
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Exact public names of every `ForToggleGroup` input, its models included. Spread it into the
|
|
460
|
+
* `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the
|
|
461
|
+
* primitive's full surface — the Signal Forms members `[formField]` binds among them —
|
|
462
|
+
* without hand-maintaining the list. Always spread into an inline object literal as shown
|
|
463
|
+
* below: the literal is what keeps the entry statically analyzable for consumers compiling
|
|
464
|
+
* against the published package. An anti-drift spec fails when this list no longer matches
|
|
465
|
+
* the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported
|
|
466
|
+
* wrapping patterns.
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```ts
|
|
470
|
+
* @Component({
|
|
471
|
+
* selector: 'div[myToggleGroup]',
|
|
472
|
+
* template: '',
|
|
473
|
+
* hostDirectives: [
|
|
474
|
+
* {
|
|
475
|
+
* directive: ForToggleGroup,
|
|
476
|
+
* inputs: [...FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS],
|
|
477
|
+
* outputs: [...FOR_TOGGLE_GROUP_HOST_DIRECTIVE_OUTPUTS],
|
|
478
|
+
* },
|
|
479
|
+
* ],
|
|
480
|
+
* })
|
|
481
|
+
* export class MyToggleGroup {}
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
484
|
+
const FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS = [
|
|
485
|
+
'value',
|
|
486
|
+
'dir',
|
|
487
|
+
'dirty',
|
|
488
|
+
'disabled',
|
|
489
|
+
'errors',
|
|
490
|
+
'invalid',
|
|
491
|
+
'loop',
|
|
492
|
+
'multiple',
|
|
493
|
+
'name',
|
|
494
|
+
'orientation',
|
|
495
|
+
'pending',
|
|
496
|
+
'readonly',
|
|
497
|
+
'required',
|
|
498
|
+
'touched',
|
|
499
|
+
];
|
|
500
|
+
/**
|
|
501
|
+
* Exact public names of every `ForToggleGroup` output, the Signal Forms `touch` output
|
|
502
|
+
* included. Spread it into the `outputs` array of the same `hostDirectives` entry as
|
|
503
|
+
* {@link FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS}.
|
|
504
|
+
*/
|
|
505
|
+
const FOR_TOGGLE_GROUP_HOST_DIRECTIVE_OUTPUTS = [
|
|
506
|
+
'valueChange',
|
|
507
|
+
'touchedChange',
|
|
508
|
+
'touch',
|
|
509
|
+
];
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Generated bundle index. Do not edit.
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
export { FOR_TOGGLE_DEFAULTS, FOR_TOGGLE_GROUP_CONTEXT, FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS, FOR_TOGGLE_GROUP_HOST_DIRECTIVE_OUTPUTS, FOR_TOGGLE_HOST_DIRECTIVE_INPUTS, FOR_TOGGLE_HOST_DIRECTIVE_OUTPUTS, ForToggle, ForToggleGroup, ForToggleGroupItem, provideForToggleDefaults };
|
|
516
|
+
//# sourceMappingURL=forty-cdk-toggle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forty-cdk-toggle.mjs","sources":["../../../projects/forty-cdk/toggle/src/toggle.ts","../../../projects/forty-cdk/toggle/src/toggle-defaults.ts","../../../projects/forty-cdk/toggle/src/toggle-group-context.ts","../../../projects/forty-cdk/toggle/src/toggle-group.ts","../../../projects/forty-cdk/toggle/src/toggle-group-item.ts","../../../projects/forty-cdk/toggle/src/toggle-host-directive.ts","../../../projects/forty-cdk/toggle/src/toggle-group-host-directive.ts","../../../projects/forty-cdk/toggle/src/forty-cdk-toggle.ts"],"sourcesContent":["import { computed, Directive, model } from '@angular/core';\nimport type { FormCheckboxControl } from '@angular/forms/signals';\n\nimport { FormUiControlBase, injectHiddenInput } from 'forty-cdk/core';\n\n/**\n * Headless implementation of the [WAI-ARIA Toggle Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/) —\n * a single-purpose `<button>` whose pressed state is reflected via\n * `aria-pressed`. Implements Angular's `FormCheckboxControl` from\n * `@angular/forms/signals` so a single toggle auto-wires with `[formField]`\n * (bold / italic, mute, favourite — the common `aria-pressed` form inputs).\n *\n * Apply on a native `<button>` so Enter / Space and disabled handling come\n * from the platform. The directive toggles its state on click and reflects\n * ARIA + `data-state` for styling.\n *\n * For a set of toggles with arrow-key navigation and single / multiple\n * selection semantics, use `[forToggleGroup]` + `[forToggleGroupItem]`.\n *\n * @example\n * ```html\n * <button forToggle [(checked)]=\"bold\">B</button>\n *\n * <!-- With Signal Forms: -->\n * <button forToggle [formField]=\"prefs.bold\">B</button>\n * ```\n */\n@Directive({\n selector: '[forToggle]',\n exportAs: 'forToggle',\n host: {\n type: 'button',\n '[attr.aria-pressed]': 'checked() ? \"true\" : \"false\"',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : null',\n '[attr.aria-required]': 'required() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.aria-busy]': 'pending() ? \"true\" : null',\n '[attr.name]': 'name() || null',\n '[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'readonly() ? \"\" : null',\n '(click)': 'onClick()',\n '(blur)': 'markTouched()',\n },\n})\nexport class ForToggle extends FormUiControlBase implements FormCheckboxControl {\n /**\n * Two-way bindable on/off state. Required by `FormCheckboxControl`, so the\n * toggle auto-wires with `[formField]`; the host reflects it through\n * `aria-pressed` and `data-state` (still a toggle button — only the value's\n * name is `checked`). The `model()` change emitter (`(checkedChange)`) fires\n * only on internal transitions (user click), never on consumer writes via\n * `[(checked)]`.\n */\n readonly checked = model<boolean>(false);\n\n constructor() {\n super();\n injectHiddenInput({\n name: this.name,\n values: computed(() => (this.checked() ? ['on'] : [])),\n disabled: this.effectiveDisabled,\n });\n }\n\n protected onClick(): void {\n if (this.effectiveDisabled() || this.readonly()) {\n return;\n }\n this.checked.update((v) => !v);\n }\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant toggle groups in the surrounding injector\n * scope. Configure with `provideForToggleDefaults` either at the application\n * root or in any component's `providers` array; partial overrides merge with\n * the parent scope.\n */\nexport interface ForToggleDefaults {\n /**\n * Whether arrow navigation wraps around past the first / last enabled\n * toggle-group item. Mirrors `ForRadioGroup`'s `loop` default.\n */\n loop: boolean;\n}\n\n/**\n * Library fallback for toggle defaults, read at the root injector when no\n * consumer has called `provideForToggleDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_TOGGLE_FALLBACK_DEFAULTS: ForToggleDefaults = {\n loop: true,\n};\n\nconst { token, provideDefaults } = createDefaults<ForToggleDefaults>(\n 'FOR_TOGGLE_DEFAULTS',\n FOR_TOGGLE_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved toggle defaults for the current scope. */\nexport const FOR_TOGGLE_DEFAULTS = token;\n\n/**\n * Configures forty-cdk toggle defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForToggleDefaults(defaults: Partial<ForToggleDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","import { inject, InjectionToken, type ModelSignal, type Signal } from '@angular/core';\n\nimport {\n type CollectionHandle,\n type ListNavigationAction,\n type WritingDirection,\n type RovingTabindex,\n} from 'forty-cdk/core';\n\n/**\n * Per-item handle stored in the group's `Collection`. The directive\n * registers itself on construction so the group can compute selection,\n * roving tabindex, and arrow-key navigation in DOM order.\n */\nexport interface ForToggleGroupItemHandle extends CollectionHandle {\n readonly value: Signal<string>;\n readonly disabled: Signal<boolean>;\n}\n\n/**\n * Coordination contract owned by `ForToggleGroup`. Items read selection\n * and navigation policy from here and call back through `toggle` and\n * `navigate` to drive state changes.\n */\nexport interface ForToggleGroupContext {\n readonly value: ModelSignal<readonly string[]>;\n readonly multiple: Signal<boolean>;\n /**\n * The group's effective disabled — its own `disabled` input OR'd with a\n * surrounding disabled `[forFieldset]`. Each item ORs this into its own\n * `effectiveDisabled`, so a disabled group (or fieldset) disables every item.\n */\n readonly effectiveDisabled: Signal<boolean>;\n readonly orientation: Signal<'horizontal' | 'vertical'>;\n readonly dir: Signal<WritingDirection>;\n readonly loop: Signal<boolean>;\n\n /**\n * Roving-tabindex tracker. Items call `setActive` on `(focus)` and prefer\n * `active()` in their tabindex computed so the tab stop follows the last\n * focused item (APG re-entry), matching Tabs / Tree.\n */\n readonly roving: RovingTabindex;\n\n isSelected(value: string): boolean;\n toggle(value: string): void;\n\n navigate(currentItem: HTMLElement, action: ListNavigationAction): void;\n isFirstFocusableItem(el: HTMLElement): boolean;\n\n registerItem(handle: ForToggleGroupItemHandle): void;\n unregisterItem(handle: ForToggleGroupItemHandle): void;\n}\n\nexport const FOR_TOGGLE_GROUP_CONTEXT = new InjectionToken<ForToggleGroupContext>(\n 'FOR_TOGGLE_GROUP_CONTEXT',\n);\n\nexport function injectToggleGroupContext(piece: string): ForToggleGroupContext {\n const ctx = inject(FOR_TOGGLE_GROUP_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(\n `[forty-cdk/toggle-group] ${piece} must be used inside a [forToggleGroup] element.`,\n );\n }\n return ctx;\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n Collection,\n firstEnabledHost,\n FormUiControlBase,\n injectHiddenInput,\n type ListNavigationAction,\n moveIndex,\n type WritingDirection,\n reconcileRovingActive,\n RovingTabindex,\n injectTextDirection,\n} from 'forty-cdk/core';\nimport { FOR_TOGGLE_DEFAULTS } from './toggle-defaults';\nimport {\n FOR_TOGGLE_GROUP_CONTEXT,\n type ForToggleGroupContext,\n type ForToggleGroupItemHandle,\n} from './toggle-group-context';\n\n/**\n * Headless group of toggle buttons: a `role=\"group\"` container whose items\n * each carry `aria-pressed`, modelled on the\n * [WAI-ARIA Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)\n * (toggle-button variant). Owns the\n * selected-values set, navigation policy, and the registry of\n * `[forToggleGroupItem]` children. Implements\n * `FormValueControl<readonly string[]>` from `@angular/forms/signals` for\n * `[formField]` auto-wiring. (The Toolbar pattern applies only when a group is\n * nested inside `[forToolbar]`; see the composition note on\n * `ForToggleGroupItem`.)\n *\n * Two selection modes:\n * - multiple (`multiple=true`): clicking an item flips its presence in\n * `value`. Matches a \"formatting toolbar\" (Bold, Italic, Underline).\n * - single (`multiple=false`, default): clicking selects exclusively;\n * clicking an already-selected item de-selects it (you can land on `[]`).\n * Matches an \"alignment toolbar\" (Left, Center, Right) where users may\n * want to clear the choice.\n *\n * `value` is always `readonly string[]` so consumers can flip `multiple`\n * without re-typing their state. In single mode the array carries 0 or\n * 1 entries.\n *\n * Roving tabindex: only one item is in the Tab sequence at a time. With\n * a non-empty selection, the first selected item; otherwise the first\n * enabled item in DOM order. Arrow keys move focus (no\n * selection-on-focus — toggles always require an explicit click).\n *\n * `ForToggle` (the standalone single-button toggle) is also a form\n * control, but a `FormCheckboxControl` carrying a single boolean value.\n * Use `ForToggleGroup` (in single or multiple mode) when you need a set\n * of pressed values as the form value.\n */\n@Directive({\n selector: '[forToggleGroup]',\n exportAs: 'forToggleGroup',\n host: {\n role: 'group',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : null',\n '[attr.aria-required]': 'required() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.aria-busy]': 'pending() ? \"true\" : null',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.dir]': 'dir()',\n '(focusout)': 'onFocusOut($event)',\n },\n providers: [{ provide: FOR_TOGGLE_GROUP_CONTEXT, useExisting: ForToggleGroup }],\n})\nexport class ForToggleGroup\n extends FormUiControlBase\n implements FormValueControl<readonly string[]>, ForToggleGroupContext\n{\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #defaults = inject(FOR_TOGGLE_DEFAULTS);\n\n /**\n * Two-way bindable. The currently pressed values, in arbitrary order.\n * In single mode the array holds 0 or 1 entries. The `model()` change\n * emitter (`(valueChange)`) fires only on internal transitions (item\n * click), never on consumer writes via `[(value)]`. Required by\n * `FormValueControl<readonly string[]>`.\n */\n readonly value = model<readonly string[]>([]);\n\n /**\n * When false (default), only one item can be pressed at a time. Clicking\n * an already-pressed item clears the selection. When true, clicks toggle\n * each item independently.\n */\n readonly multiple = input(false, { transform: booleanAttribute });\n\n /** Layout direction for keyboard navigation. */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /**\n * Reading direction. RTL swaps ArrowLeft/ArrowRight. When unset (default\n * `null`), the inherited ambient direction is resolved from the nearest\n * ancestor carrying a `dir` attribute (or `<html dir>`), defaulting to\n * `'ltr'`. An explicit `[dir]` always wins and the resolved value is\n * reflected to the host `dir` attribute.\n */\n readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n readonly dir = injectTextDirection(this._dirInput);\n\n /**\n * When true (default), arrow nav wraps at the ends. The default is read\n * from `provideForToggleDefaults` for the surrounding scope.\n */\n readonly loop = input(this.#defaults.loop, { transform: booleanAttribute });\n\n /**\n * Roving-tabindex tracker. Items promote themselves to active on `(focus)`\n * and read `active()` in their tabindex computed, so re-entry (Shift+Tab\n * back into the group) restores the last focused item — matching Tabs /\n * Tree. Before any focus, `active()` is `null` and the tabindex falls back\n * to the first-selected / first-enabled entry point.\n */\n readonly roving = new RovingTabindex();\n\n readonly #items = new Collection<ForToggleGroupItemHandle>();\n\n readonly #firstSelectedHost = computed<HTMLElement | null>(() => {\n const selected = this.value();\n if (selected.length === 0) {\n return null;\n }\n for (const item of this.#items.items()) {\n if (!item.disabled() && selected.includes(item.value())) {\n return item.host;\n }\n }\n return null;\n });\n\n readonly #firstEnabledHost = computed(() => firstEnabledHost(this.#items.items()));\n\n constructor() {\n super();\n injectHiddenInput({\n name: this.name,\n values: this.value,\n disabled: this.effectiveDisabled,\n });\n reconcileRovingActive(this.roving, this.#items.items);\n }\n\n isSelected(v: string): boolean {\n return this.value().includes(v);\n }\n\n toggle(v: string): void {\n if (this.effectiveDisabled() || this.readonly()) {\n return;\n }\n const current = this.value();\n const isSelected = current.includes(v);\n if (this.multiple()) {\n this.value.set(isSelected ? current.filter((x) => x !== v) : [...current, v]);\n return;\n }\n // Single: clicking the pressed item clears, otherwise replace.\n this.value.set(isSelected ? [] : [v]);\n }\n\n navigate(currentItem: HTMLElement, action: ListNavigationAction): void {\n if (this.effectiveDisabled()) {\n return;\n }\n const items = this.#items.items();\n if (items.length === 0) {\n return;\n }\n const currentIndex = items.findIndex((item) => item.host === currentItem);\n const next = moveIndex(currentIndex < 0 ? 0 : currentIndex, items.length, action, {\n loop: this.loop(),\n isDisabled: (i) => items[i]!.disabled(),\n });\n if (next === null) {\n return;\n }\n items[next]?.host.focus();\n }\n\n /**\n * Tabindex policy: with at least one selection, the first selected item\n * is the entry point; otherwise the first enabled item in DOM order.\n */\n isFirstFocusableItem(el: HTMLElement): boolean {\n const firstSelected = this.#firstSelectedHost();\n if (firstSelected) {\n return firstSelected === el;\n }\n return this.#firstEnabledHost() === el;\n }\n\n registerItem(handle: ForToggleGroupItemHandle): void {\n this.#items.register(handle);\n }\n\n unregisterItem(handle: ForToggleGroupItemHandle): void {\n this.#items.unregister(handle);\n this.roving.unregister(handle.host);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as HTMLElement | null;\n if (next && this.#host.nativeElement.contains(next)) {\n return;\n }\n this.markTouched();\n }\n}\n","import { booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\n\nimport {\n registerHandle,\n reflectDisabled,\n resolveListNavigation,\n FOR_HOST_ROVING_CONTEXT,\n} from 'forty-cdk/core';\nimport { injectToggleGroupContext } from './toggle-group-context';\n\n/**\n * One toggle button inside a `[forToggleGroup]`. Apply on a `<button>`.\n *\n * Pressed state is derived from the group's `value`. Click goes through\n * `group.toggle(value())` so single-vs-multiple semantics live in the\n * group, not the item.\n *\n * Roving tabindex: only one item is in the Tab sequence at a time\n * (the first selected, or the first enabled when nothing is pressed).\n * Arrow keys move focus inside the group; the consumer never has to\n * wire keyboard navigation manually.\n *\n * **Composition with [forToolbar]:** when the group is nested inside a\n * `[forToolbar]`, focus management is delegated to the toolbar — the\n * tabindex policy and arrow-key navigation flow across all toolbar items\n * (buttons, links, toggle items) instead of staying confined to the\n * group. Selection still lives on the group; only focus is shared.\n */\n@Directive({\n selector: '[forToggleGroupItem]',\n exportAs: 'forToggleGroupItem',\n host: {\n type: 'button',\n '[attr.aria-pressed]': 'pressed() ? \"true\" : \"false\"',\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n '[attr.tabindex]': 'tabindex()',\n '[attr.data-state]': 'pressed() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n '[attr.data-orientation]': 'group.orientation()',\n '(click)': 'onClick()',\n '(focus)': 'onFocus()',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ForToggleGroupItem {\n protected readonly group = injectToggleGroupContext('ForToggleGroupItem');\n readonly #rovingHost = inject(FOR_HOST_ROVING_CONTEXT, { optional: true, skipSelf: true });\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Identifier added to / removed from the group's `value`. Required. */\n readonly value = input.required<string>();\n\n /** Per-item disabled (in addition to the group's `disabled`). */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly pressed = computed(() => this.group.isSelected(this.value()));\n\n readonly effectiveDisabled = computed(\n () =>\n this.disabled() || this.group.effectiveDisabled() || (this.#rovingHost?.disabled() ?? false),\n );\n\n /**\n * Tabindex per APG: once any item has been focused, the roving tracker owns\n * the tab stop so re-entry restores the last focused item; before that, fall\n * back to the entry point (first selected / first enabled). The roving host\n * is the toolbar when nested inside one, otherwise the group. Disabled items\n * are always -1.\n */\n readonly tabindex = computed<-1 | 0>(() => {\n if (this.effectiveDisabled()) {\n return -1;\n }\n const owner = this.#rovingHost ?? this.group;\n if (owner.roving.hasActive()) {\n return owner.roving.tabindexFor(this.#host.nativeElement);\n }\n return owner.isFirstFocusableItem(this.#host.nativeElement) ? 0 : -1;\n });\n\n constructor() {\n const groupHandle = {\n host: this.#host.nativeElement,\n value: this.value,\n disabled: this.effectiveDisabled,\n };\n registerHandle(\n groupHandle,\n (h) => this.group.registerItem(h),\n (h) => this.group.unregisterItem(h),\n );\n\n const rovingHost = this.#rovingHost;\n if (rovingHost) {\n const rovingHandle = {\n host: this.#host.nativeElement,\n disabled: this.effectiveDisabled,\n };\n registerHandle(\n rovingHandle,\n (h) => rovingHost.registerItem(h),\n (h) => rovingHost.unregisterItem(h),\n );\n }\n\n reflectDisabled(this.effectiveDisabled);\n }\n\n protected onClick(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n this.group.toggle(this.value());\n }\n\n protected onFocus(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n const owner = this.#rovingHost ?? this.group;\n owner.roving.setActive(this.#host.nativeElement);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.effectiveDisabled()) {\n return;\n }\n const owner = this.#rovingHost ?? this.group;\n const action = resolveListNavigation(event, {\n orientation: owner.orientation(),\n dir: owner.dir(),\n });\n if (!action) {\n return;\n }\n event.preventDefault();\n owner.navigate(this.#host.nativeElement, action);\n }\n}\n","/**\n * Exact public names of every `ForToggle` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n * selector: 'button[myToggle]',\n * template: '',\n * hostDirectives: [\n * {\n * directive: ForToggle,\n * inputs: [...FOR_TOGGLE_HOST_DIRECTIVE_INPUTS],\n * outputs: [...FOR_TOGGLE_HOST_DIRECTIVE_OUTPUTS],\n * },\n * ],\n * })\n * export class MyToggle {}\n * ```\n */\nexport const FOR_TOGGLE_HOST_DIRECTIVE_INPUTS = [\n 'checked',\n 'dirty',\n 'disabled',\n 'errors',\n 'invalid',\n 'name',\n 'pending',\n 'readonly',\n 'required',\n 'touched',\n] as const;\n\n/**\n * Exact public names of every `ForToggle` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_TOGGLE_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_TOGGLE_HOST_DIRECTIVE_OUTPUTS = [\n 'checkedChange',\n 'touchedChange',\n 'touch',\n] as const;\n","/**\n * Exact public names of every `ForToggleGroup` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n * selector: 'div[myToggleGroup]',\n * template: '',\n * hostDirectives: [\n * {\n * directive: ForToggleGroup,\n * inputs: [...FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS],\n * outputs: [...FOR_TOGGLE_GROUP_HOST_DIRECTIVE_OUTPUTS],\n * },\n * ],\n * })\n * export class MyToggleGroup {}\n * ```\n */\nexport const FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS = [\n 'value',\n 'dir',\n 'dirty',\n 'disabled',\n 'errors',\n 'invalid',\n 'loop',\n 'multiple',\n 'name',\n 'orientation',\n 'pending',\n 'readonly',\n 'required',\n 'touched',\n] as const;\n\n/**\n * Exact public names of every `ForToggleGroup` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_TOGGLE_GROUP_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_TOGGLE_GROUP_HOST_DIRECTIVE_OUTPUTS = [\n 'valueChange',\n 'touchedChange',\n 'touch',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAoBG,MAAO,SAAU,SAAQ,iBAAiB,CAAA;AAC9C;;;;;;;AAOG;IACM,OAAO,GAAG,KAAK,CAAU,KAAK;gFAAC;AAExC,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,iBAAiB,CAAC;YAChB,IAAI,EAAE,I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