@ng-forge/dynamic-forms-bootstrap 0.9.0-next.11 → 0.9.0-next.13

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.
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Bootstrap form defaults.
3
+ *
4
+ * Opinionated host-framework defaults for Bootstrap apps. Library SCSS uses
5
+ * `var(--df-name, structural-fallback)` for layout-essential vars so forms
6
+ * render usefully without any opt-in. These mixins layer in the rest —
7
+ * color, typography, focus accent — that a Bootstrap app expects.
8
+ *
9
+ * Usage (in your app's global stylesheet):
10
+ *
11
+ * @use '@ng-forge/dynamic-forms-bootstrap/styles/defaults' as df;
12
+ *
13
+ * :root {
14
+ * @include df.apply-bootstrap-form-defaults;
15
+ * }
16
+ */
17
+
18
+ @mixin form-grid-defaults {
19
+ --df-grid-columns: 12;
20
+ --df-grid-gap: 0.5rem;
21
+ --df-grid-row-gap: 0.5rem;
22
+
23
+ --df-grid-gap-sm: 0.5rem;
24
+ --df-grid-gap-md: 0.5rem;
25
+ --df-grid-gap-lg: 0.5rem;
26
+ --df-grid-gap-xl: 0.5rem;
27
+
28
+ --df-grid-row-gap-sm: 0.5rem;
29
+ --df-grid-row-gap-md: 0.5rem;
30
+ --df-grid-row-gap-lg: 0.5rem;
31
+ --df-grid-row-gap-xl: 0.5rem;
32
+
33
+ --df-array-item-gap: var(--df-grid-row-gap);
34
+
35
+ --df-focus-color: var(--bs-primary, #0d6efd);
36
+ }
37
+
38
+ @mixin form-page-defaults {
39
+ --df-page-custom-spacing: 1.5rem;
40
+ --df-page-transition-duration: 0.3s;
41
+ --df-page-transition-timing: ease-in-out;
42
+ --df-page-slide-offset: -10px;
43
+ }
44
+
45
+ @mixin form-bootstrap-defaults {
46
+ --df-field-gap: 0.5rem;
47
+ --df-label-font-weight: 500;
48
+ --df-label-color: inherit;
49
+ --df-hint-color: var(--bs-secondary-color, #6c757d);
50
+ --df-hint-font-size: 0.875rem;
51
+ --df-error-color: var(--bs-danger, #dc3545);
52
+ --df-error-font-size: 0.875rem;
53
+
54
+ --df-bs-field-margin-bottom: 1rem;
55
+ --df-bs-field-with-hint-margin-bottom: 0.5rem;
56
+ --df-bs-hint-margin-top: 0.25rem;
57
+ }
58
+
59
+ @mixin apply-bootstrap-form-defaults {
60
+ @include form-grid-defaults;
61
+ @include form-page-defaults;
62
+ @include form-bootstrap-defaults;
63
+ }
@@ -1,8 +1,9 @@
1
- import { FormEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, CheckedFieldComponent, ValueFieldComponent, ValueType, FieldOption, FieldTypeDefinition, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
1
+ import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
2
+ import { FormEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, CheckedFieldComponent, ValueFieldComponent, BaseAddon, DynamicValue, AddonActionPreset, RegisteredActionRef, AddonActionHandler, TextAddon, TemplateAddon, WrapperFieldInputs, ValueType, FieldOption, FieldTypeDefinition, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
3
  import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
4
  import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField } from '@ng-forge/dynamic-forms/integration';
4
5
  import * as _angular_core from '@angular/core';
5
- import { InjectionToken, Provider } from '@angular/core';
6
+ import { InjectionToken, Provider, WritableSignal } from '@angular/core';
6
7
 
7
8
  interface BsButtonProps {
8
9
  variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
@@ -168,6 +169,119 @@ declare class BsDatepickerFieldComponent {
168
169
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsDatepickerFieldComponent, "df-bs-datepicker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
169
170
  }
170
171
 
172
+ /**
173
+ * Decorative icon addon for Bootstrap fields.
174
+ *
175
+ * Renders `<i class="bi bi-{icon}">` (Bootstrap Icons). The `icon` string is the
176
+ * bare suffix — e.g., `'search'` produces `<i class="bi bi-search">`.
177
+ *
178
+ * Add `ariaLabel` for icons that convey meaning (search, error, success);
179
+ * leave it omitted for purely decorative icons (will be `aria-hidden="true"`).
180
+ */
181
+ interface BsIconAddon extends BaseAddon {
182
+ readonly kind: 'bs-icon';
183
+ /** Bootstrap Icons name without the `bi-` prefix (e.g., `'search'`, `'x'`). */
184
+ readonly icon: string;
185
+ /** Accessible label for icons that convey meaning. */
186
+ readonly ariaLabel?: DynamicText;
187
+ }
188
+ /**
189
+ * Common shape of every `bs-button` addon — properties that don't
190
+ * participate in either XOR axis.
191
+ */
192
+ interface BsButtonBase extends BaseAddon {
193
+ readonly kind: 'bs-button';
194
+ /** Bootstrap button variant (mapped to `btn-outline-{severity}`). */
195
+ readonly severity?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
196
+ /** Reactive loading state — swaps the button content for a spinner. */
197
+ readonly loading?: DynamicValue<boolean>;
198
+ }
199
+ /**
200
+ * Click axis — XOR enforced at type level so configurations that combine
201
+ * two click handlers (e.g., `preset` AND `actionRef`) are rejected by
202
+ * TypeScript. The four shapes:
203
+ *
204
+ * - `Preset` — built-in preset action.
205
+ * - `ActionRef` — typed reference to a handler registered via `provideAddonActions(...)`.
206
+ * - `Action` — inline handler (code-only; dropped from JSON-derived configs).
207
+ * - `None` — decorative button with no handler.
208
+ */
209
+ type BsButtonClickPreset = {
210
+ /** Built-in preset action (e.g., `'clear'`, `'toggle-password-visibility'`). JSON-safe. */
211
+ readonly preset: AddonActionPreset;
212
+ readonly actionRef?: never;
213
+ readonly action?: never;
214
+ };
215
+ /**
216
+ * Value type for the `actionRef` slot. When no actions have been registered
217
+ * via `provideAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
218
+ * which would make this variant uninhabitable. Fall back to `string` so the
219
+ * variant stays usable; once the user augments `DynamicFormActionRegistry`,
220
+ * autocomplete tightens to the registered keys.
221
+ */
222
+ type BsButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
223
+ type BsButtonClickActionRef = {
224
+ readonly preset?: never;
225
+ /** Reference to a handler registered via `provideAddonActions(...)`. JSON-safe. */
226
+ readonly actionRef: BsButtonActionRef;
227
+ readonly action?: never;
228
+ };
229
+ type BsButtonClickAction = {
230
+ readonly preset?: never;
231
+ readonly actionRef?: never;
232
+ /** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `provideAddonActions(...)`. */
233
+ readonly action: AddonActionHandler;
234
+ };
235
+ type BsButtonClickNone = {
236
+ readonly preset?: never;
237
+ readonly actionRef?: never;
238
+ readonly action?: never;
239
+ };
240
+ type BsButtonClick = BsButtonClickPreset | BsButtonClickActionRef | BsButtonClickAction | BsButtonClickNone;
241
+ /**
242
+ * Content axis — XOR enforced at type level so an icon-only button is
243
+ * forced to declare `ariaLabel`.
244
+ */
245
+ type BsButtonContentIconOnly = {
246
+ readonly icon: string;
247
+ readonly label?: never;
248
+ /** REQUIRED: icon-only buttons must carry an accessible label. */
249
+ readonly ariaLabel: DynamicText;
250
+ };
251
+ type BsButtonContentLabeled = {
252
+ readonly icon?: string;
253
+ readonly label: DynamicText;
254
+ readonly ariaLabel?: DynamicText;
255
+ };
256
+ type BsButtonContentDecorative = {
257
+ readonly icon?: never;
258
+ readonly label?: never;
259
+ readonly ariaLabel?: DynamicText;
260
+ };
261
+ type BsButtonContent = BsButtonContentIconOnly | BsButtonContentLabeled | BsButtonContentDecorative;
262
+ /**
263
+ * Interactive button addon for Bootstrap fields.
264
+ *
265
+ * Renders `<button class="btn btn-outline-{severity}">` with optional icon,
266
+ * label, severity, and reactive loading state.
267
+ *
268
+ * Type-level guarantees:
269
+ *
270
+ * - **Content axis (XOR):** `IconOnly` (icon + required ariaLabel) |
271
+ * `Labeled` (label, icon optional) | `Decorative` (neither).
272
+ * - **Click axis (XOR):** exactly one of `preset` / `actionRef` / `action`,
273
+ * or none.
274
+ */
275
+ type BsButtonAddon = BsButtonBase & BsButtonContent & BsButtonClick;
276
+ /** Union of all Bootstrap-shipped addon kinds. */
277
+ type BsAddon = BsIconAddon | BsButtonAddon;
278
+ declare module '@ng-forge/dynamic-forms' {
279
+ interface DynamicFormAddonRegistry {
280
+ 'bs-icon': BsIconAddon;
281
+ 'bs-button': BsButtonAddon;
282
+ }
283
+ }
284
+
171
285
  interface BsInputProps extends InputProps {
172
286
  size?: 'sm' | 'lg';
173
287
  floatingLabel?: boolean;
@@ -177,18 +291,60 @@ interface BsInputProps extends InputProps {
177
291
  plaintext?: boolean;
178
292
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
179
293
  }
180
- type BsInputField = InputField<BsInputProps>;
294
+ /**
295
+ * Module-augmentable seam for adding custom addon kinds to `bs-input` at
296
+ * the type level. Pair with `withCustomAddon(...)` for the runtime side:
297
+ *
298
+ * ```ts
299
+ * declare module '@ng-forge/dynamic-forms-bootstrap' {
300
+ * interface BsAddonExtensions {
301
+ * 'my-rating': MyRatingAddon;
302
+ * }
303
+ * }
304
+ * ```
305
+ *
306
+ * Empty by default — the extension lookup resolves to `never` and contributes
307
+ * nothing to the union.
308
+ */
309
+ interface BsAddonExtensions {
310
+ }
311
+ type BsAddonExtension = BsAddonExtensions[keyof BsAddonExtensions];
312
+ /**
313
+ * Addon kinds accepted by `bs-input`.
314
+ *
315
+ * Bootstrap-specific kinds (`bs-icon`, `bs-button`) plus the universal `text`
316
+ * and `template` kinds. `component` is permitted at runtime via the broader
317
+ * `BaseAddon` union (and dropped in JSON-derived configs by the validator)
318
+ * but excluded here so the IDE narrows tightly to declarative shapes.
319
+ *
320
+ * To extend with custom kinds, augment `BsAddonExtensions`.
321
+ */
322
+ type BsInputAddon = BsIconAddon | BsButtonAddon | TextAddon | TemplateAddon | BsAddonExtension;
323
+ type BsInputField = InputField<BsInputProps> & {
324
+ addons?: ReadonlyArray<BsInputAddon>;
325
+ };
181
326
  /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
182
327
  type BsInputComponent = ValueFieldComponent<BsInputField>;
183
328
 
184
329
  declare class BsInputFieldComponent {
185
330
  private bootstrapConfig;
186
331
  protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
332
+ protected readonly ngfa: _ng_forge_dynamic_forms_integration.TypedNgForgeAddons<BsInputAddon>;
187
333
  readonly props: _angular_core.InputSignal<BsInputProps | undefined>;
334
+ /**
335
+ * Wrapper-style host bag pushed by `DfFieldOutlet`. Declared at the
336
+ * component level so `setInputIfDeclared` (which uses
337
+ * `reflectComponentType`) can write it.
338
+ */
339
+ readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
340
+ /** Per-instance type override populated by `toggle-password-visibility` preset. */
341
+ private readonly typeOverride;
188
342
  readonly size: _angular_core.Signal<"sm" | "lg" | undefined>;
189
343
  readonly floatingLabel: _angular_core.Signal<boolean>;
344
+ /** Override (set by `toggle-password-visibility` preset) wins over `props().type`. */
345
+ protected readonly type: _angular_core.Signal<string>;
190
346
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsInputFieldComponent, never>;
191
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsInputFieldComponent, "df-bs-input", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
347
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsInputFieldComponent, "df-bs-input", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }, { directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddons; inputs: {}; outputs: {}; }]>;
192
348
  }
193
349
 
194
350
  interface BsMultiCheckboxProps {
@@ -311,22 +467,6 @@ type BsTextareaComponent = ValueFieldComponent<BsTextareaField>;
311
467
  declare class BsTextareaFieldComponent {
312
468
  protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
313
469
  readonly props: _angular_core.InputSignal<BsTextareaProps | undefined>;
314
- /**
315
- * Reference to the native textarea element.
316
- * Used to imperatively sync the readonly attribute since Angular Signal Forms'
317
- * [field] directive doesn't sync FieldState.readonly() to the DOM.
318
- */
319
- private readonly textareaRef;
320
- /**
321
- * Computed signal that extracts the readonly state from the field.
322
- */
323
- private readonly isReadonly;
324
- /**
325
- * Workaround: Angular Signal Forms' [field] directive does NOT sync the readonly
326
- * attribute to the DOM. This effect imperatively sets/removes the readonly attribute
327
- * on the native textarea element whenever the readonly state changes.
328
- */
329
- private readonly syncReadonlyToDom;
330
470
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTextareaFieldComponent, never>;
331
471
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTextareaFieldComponent, "df-bs-textarea", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
332
472
  }
@@ -532,19 +672,28 @@ type BootstrapConfigFeature = {
532
672
  ɵkind: 'bootstrap-config';
533
673
  ɵproviders: Provider[];
534
674
  };
535
- type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapConfigFeature];
536
675
  /**
537
- * Provides Bootstrap field types for the dynamic form system.
538
- * Use with provideDynamicForm(...withBootstrapFields())
676
+ * Default `withBootstrapFields()` shape — field defs + the auto-included
677
+ * addons feature so `bs-icon` / `bs-button` work out of the box.
678
+ */
679
+ type BootstrapFieldsWithAddons = [...BootstrapFieldTypes, BootstrapAddonsFeature];
680
+ type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapAddonsFeature, BootstrapConfigFeature];
681
+ /**
682
+ * Provides Bootstrap field type definitions for the dynamic form system,
683
+ * with Bootstrap-shipped addon kinds (`bs-icon`, `bs-button`) auto-included
684
+ * so addons work out of the box.
685
+ *
686
+ * If you want addons WITHOUT the field types (rare — e.g., adding addons to
687
+ * a form that uses custom fields), call `withBootstrapAddons()` standalone.
539
688
  *
540
689
  * @param config - Optional global configuration for Bootstrap form fields
541
690
  *
542
691
  * @example
543
692
  * ```typescript
544
- * // Application-level setup
693
+ * // Application-level setup — addons (bs-icon, bs-button) ship in automatically
545
694
  * import { ApplicationConfig } from '@angular/core';
546
- * import { provideDynamicForm } from '@ng-forge/dynamic-form';
547
- * import { withBootstrapFields } from '@ng-forge/dynamic-form-bootstrap';
695
+ * import { provideDynamicForm } from '@ng-forge/dynamic-forms';
696
+ * import { withBootstrapFields } from '@ng-forge/dynamic-forms-bootstrap';
548
697
  *
549
698
  * export const appConfig: ApplicationConfig = {
550
699
  * providers: [
@@ -568,11 +717,94 @@ type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapConfigFeature
568
717
  * };
569
718
  * ```
570
719
  *
571
- * @returns Array of field type definitions and optionally a config feature
720
+ * @returns Tuple of field type definitions, the addons feature, and
721
+ * optionally a config feature.
572
722
  */
573
- declare function withBootstrapFields(): BootstrapFieldTypes;
723
+ declare function withBootstrapFields(): BootstrapFieldsWithAddons;
574
724
  declare function withBootstrapFields(config: BootstrapConfig): BootstrapFieldsWithConfig;
575
- declare function withBootstrapFields(config: BootstrapConfig | undefined): BootstrapFieldTypes | BootstrapFieldsWithConfig;
725
+ declare function withBootstrapFields(config: BootstrapConfig | undefined): BootstrapFieldsWithAddons | BootstrapFieldsWithConfig;
726
+ /**
727
+ * Feature kind discriminant for the Bootstrap addons feature. Matches core's
728
+ * `'addons'` kind so providers flow through the standard addon-kind pipeline
729
+ * in `provideDynamicForm`.
730
+ */
731
+ type BootstrapAddonsFeature = {
732
+ ɵkind: 'addons';
733
+ ɵproviders: Provider[];
734
+ };
735
+ /**
736
+ * Register Bootstrap-shipped addon kinds (`bs-icon`, `bs-button`) standalone.
737
+ *
738
+ * **Most users don't need this** — `withBootstrapFields()` auto-includes
739
+ * these kinds. Call `withBootstrapAddons()` directly only when you want
740
+ * Bootstrap addon kinds without the Bootstrap field types (e.g., a custom
741
+ * field set that wants to render `bs-icon` prefixes), or when you're
742
+ * stitching addons through a different DI scope.
743
+ *
744
+ * @example
745
+ * ```typescript
746
+ * // Custom field types + Bootstrap addon kinds.
747
+ * provideDynamicForm(
748
+ * ...myCustomFields(),
749
+ * withBootstrapAddons(),
750
+ * );
751
+ * ```
752
+ *
753
+ * Adapter authors who need to override a kind with a customised renderer
754
+ * should call `withCustomAddon(...)` directly instead.
755
+ */
756
+ declare function withBootstrapAddons(): BootstrapAddonsFeature;
757
+
758
+ /**
759
+ * Renderer for the `bs-icon` addon kind.
760
+ *
761
+ * Outputs `<i class="bi bi-{icon}">`. The host is set `aria-hidden="true"`
762
+ * by default; if the addon supplies an `ariaLabel`, it is applied so the
763
+ * icon is announced by screen readers.
764
+ */
765
+ declare class BsIconAddonComponent {
766
+ readonly addon: _angular_core.InputSignal<BsIconAddon>;
767
+ /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every kind must declare it. */
768
+ readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
769
+ protected readonly iconClass: _angular_core.Signal<string>;
770
+ protected readonly ariaLabel: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
771
+ protected readonly hasAriaLabel: _angular_core.Signal<boolean>;
772
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsIconAddonComponent, never>;
773
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsIconAddonComponent, "df-bs-icon-addon", never, { "addon": { "alias": "addon"; "required": true; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
774
+ }
775
+
776
+ /**
777
+ * Renderer for the `bs-button` addon kind.
778
+ *
779
+ * Renders a Bootstrap `btn-outline-{severity}` button. Click dispatch
780
+ * (preset / actionRef / action precedence, multi-set warning, `disabled` /
781
+ * `loading` resolution) lives on `NgForgeAddonAction`; this component
782
+ * focuses on the visual layer.
783
+ */
784
+ declare class BsButtonAddonComponent {
785
+ protected readonly action: _ng_forge_dynamic_forms_integration.TypedNgForgeAddonAction<BsButtonAddon>;
786
+ /** Re-exposed for template binding — same signal stored on the directive. */
787
+ protected readonly addon: _angular_core.Signal<BsButtonAddon>;
788
+ protected readonly label: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
789
+ protected readonly ariaLabel: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
790
+ protected readonly iconClass: _angular_core.Signal<string>;
791
+ protected readonly buttonClass: _angular_core.Signal<string>;
792
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsButtonAddonComponent, never>;
793
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsButtonAddonComponent, "df-bs-button-addon", never, {}, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddonAction; inputs: {}; outputs: {}; }]>;
794
+ }
795
+
796
+ /**
797
+ * Per-field writable signal that overrides the input's `type` attribute.
798
+ *
799
+ * Provided at the `bs-input` field component level. The button addon's
800
+ * `'toggle-password-visibility'` preset writes to it; the field component
801
+ * reads it to compute its effective `type`.
802
+ *
803
+ * Optional from a button's perspective — when the button is hosted inside a
804
+ * field that doesn't provide this token (e.g., textarea or a future
805
+ * non-input field), the toggle preset is a no-op.
806
+ */
807
+ declare const BS_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
576
808
 
577
- export { BOOTSTRAP_CONFIG, BOOTSTRAP_FIELD_TYPES, BsButtonFieldComponent, BsCheckboxFieldComponent, BsDatepickerFieldComponent, BsField, BsInputFieldComponent, BsMultiCheckboxFieldComponent, BsRadioFieldComponent, BsSelectFieldComponent, BsSliderFieldComponent, BsTextareaFieldComponent, BsToggleFieldComponent, withBootstrapFields };
578
- export type { AddArrayItemButtonField, BootstrapConfig, BsButtonField, BsButtonProps, BsCheckboxComponent, BsCheckboxField, BsCheckboxProps, BsDatepickerComponent, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsInputComponent, BsInputField, BsInputProps, BsMultiCheckboxComponent, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPreviousButtonField, BsRadioComponent, BsRadioField, BsRadioProps, BsSelectComponent, BsSelectField, BsSelectProps, BsSliderComponent, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaComponent, BsTextareaField, BsTextareaProps, BsToggleComponent, BsToggleField, BsToggleProps, InsertArrayItemButtonField, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };
809
+ export { BOOTSTRAP_CONFIG, BOOTSTRAP_FIELD_TYPES, BS_INPUT_TYPE_OVERRIDE, BsButtonAddonComponent, BsButtonFieldComponent, BsCheckboxFieldComponent, BsDatepickerFieldComponent, BsField, BsIconAddonComponent, BsInputFieldComponent, BsMultiCheckboxFieldComponent, BsRadioFieldComponent, BsSelectFieldComponent, BsSliderFieldComponent, BsTextareaFieldComponent, BsToggleFieldComponent, withBootstrapAddons, withBootstrapFields };
810
+ export type { AddArrayItemButtonField, BootstrapConfig, BsAddon, BsAddonExtensions, BsButtonAddon, BsButtonField, BsButtonProps, BsCheckboxComponent, BsCheckboxField, BsCheckboxProps, BsDatepickerComponent, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsIconAddon, BsInputAddon, BsInputComponent, BsInputField, BsInputProps, BsMultiCheckboxComponent, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPreviousButtonField, BsRadioComponent, BsRadioField, BsRadioProps, BsSelectComponent, BsSelectField, BsSelectProps, BsSliderComponent, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaComponent, BsTextareaField, BsTextareaProps, BsToggleComponent, BsToggleField, BsToggleProps, InsertArrayItemButtonField, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };