@mintplayer/ng-bootstrap 22.28.0 → 22.30.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.
Files changed (134) hide show
  1. package/_bootstrap.scss +4 -101
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
  3. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
  5. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
  7. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
  9. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +157 -824
  25. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
  27. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
  29. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
  31. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
  35. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
  37. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
  39. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
  41. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +283 -20
  43. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
  45. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
  47. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
  49. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
  51. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
  53. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
  55. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
  57. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
  59. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
  61. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
  63. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
  65. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
  67. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
  69. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
  71. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
  73. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
  75. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
  77. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
  81. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
  83. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
  85. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
  87. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
  89. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  90. package/package.json +11 -9
  91. package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
  92. package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
  93. package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
  94. package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
  95. package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
  96. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
  97. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
  98. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
  99. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
  100. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
  101. package/types/mintplayer-ng-bootstrap-datatable.d.ts +222 -422
  102. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
  103. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
  104. package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
  105. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
  106. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
  107. package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
  108. package/types/mintplayer-ng-bootstrap-machine.d.ts +124 -4
  109. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
  110. package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
  111. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
  112. package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
  113. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
  114. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
  115. package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
  116. package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
  117. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
  118. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
  119. package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
  120. package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
  121. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
  122. package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
  123. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
  124. package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
  125. package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
  126. package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
  127. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
  128. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
  129. package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
  130. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
  131. package/src/styles/utilities/cursor.scss +0 -12
  132. package/src/styles/utilities/overflow.scss +0 -12
  133. package/src/styles/utilities/white-space.scss +0 -12
  134. package/src/styles/utilities/width.scss +0 -14
@@ -1,189 +1,115 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef, TemplateRef, OnDestroy } from '@angular/core';
3
- import { NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';
2
+ import { TemplateRef, ElementRef, OnDestroy } from '@angular/core';
3
+ import * as _mintplayer_ui_core_navbar from '@mintplayer/ui-core/navbar';
4
+ import { NavbarExpandedChangeEventDetail, NavbarMethods } from '@mintplayer/ui-core/navbar';
4
5
  import * as i1 from '@angular/router';
5
6
 
7
+ /** The `brand` slot of `<bs-navbar>`: `<ng-template bsNavbarBrand>` or `*bsNavbarBrand`. */
8
+ declare class BsNavbarBrandDirective {
9
+ readonly templateRef: TemplateRef<unknown>;
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarBrandDirective, never>;
11
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarBrandDirective, "[bsNavbarBrand]", never, {}, {}, never, never, true, never>;
12
+ }
13
+ /** The `toggler` slot of `<bs-navbar>`: `<ng-template bsNavbarToggler>` or `*bsNavbarToggler`. */
14
+ declare class BsNavbarTogglerDirective {
15
+ readonly templateRef: TemplateRef<unknown>;
16
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarTogglerDirective, never>;
17
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarTogglerDirective, "[bsNavbarToggler]", never, {}, {}, never, never, true, never>;
18
+ }
6
19
  /**
7
- * `<bs-navbar>` — Angular wrapper around the `<mp-navbar>` web component.
8
- *
9
- * Layout, the responsive collapse behaviour, the pure-CSS no-JS toggle and the
10
- * theme-aware styling all live in the WC (single source of UI truth). This
11
- * wrapper only bridges inputs to attributes and projects content into the WC's
12
- * slots:
13
- * - mark the brand with `bs-navbar-brand` (→ `slot="brand"`);
14
- * - left-aligned items go in the default slot;
15
- * - right-aligned items get `slot="end"`.
20
+ * Bootstrap navbar with a no-JS collapse and native `<details>` dropdowns (#437).
16
21
  *
17
- * The WC is registered **client-side only** (`afterNextRender`); on the server
18
- * Angular emits a bare `<mp-navbar>` tag and the SSR layer injects its
19
- * Declarative Shadow DOM (see `injectMpNavbarDsd`), so it renders with JS off.
22
+ * The server-rendered page is the working navbar: the collapse is a checkbox and every
23
+ * dropdown a `<details>`, both of which work with JavaScript off. An `aria-label` names
24
+ * the landmark. The `brand` slot holds the brand; the `toggler` slot replaces the three
25
+ * hamburger bars and reads the open state from `--mp-navbar-expanded: 0|1`.
20
26
  */
21
27
  declare class BsNavbarComponent {
22
- /** Host element — measured by `[bsNavbarContent]` to offset page content. */
28
+ #private;
29
+ /** The host element. */
23
30
  readonly elementRef: ElementRef<HTMLElement>;
24
- /** Bootstrap breakpoint the navbar expands at; collapses below it. */
25
- readonly breakpoint: _angular_core.InputSignal<NavbarBreakpoint>;
26
- /** Theme color of the navbar background (e.g. `primary`, `dark`, `body-tertiary`). */
27
- readonly color: _angular_core.InputSignal<string | undefined>;
28
- /** Accessible label for the `<nav>` landmark. */
29
- /** Whether the collapse is (visually) expanded; reflected to the WC. */
30
- readonly expanded: _angular_core.InputSignal<boolean>;
31
- /** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */
32
- readonly positioning: _angular_core.InputSignal<"fixed" | undefined>;
33
- /** Fires when the collapse toggles (re-emits the WC's `expandedchange`). */
31
+ readonly breakpoint: _angular_core.InputSignal<_mintplayer_ui_core_navbar.NavbarBreakpoint>;
32
+ readonly color: _angular_core.InputSignal<string | null | undefined>;
33
+ readonly expanded: _angular_core.ModelSignal<boolean>;
34
+ readonly positioning: _angular_core.InputSignal<"fixed" | null | undefined>;
35
+ readonly labels: _angular_core.InputSignal<Partial<_mintplayer_ui_core_navbar.NavbarLabels> | null | undefined>;
36
+ /** The collapse opened or closed through the bar. */
34
37
  readonly expandedchange: _angular_core.OutputEmitterRef<NavbarExpandedChangeEventDetail>;
35
- /** String-or-absent attributes derived once via signals. */
36
- protected readonly colorAttr: _angular_core.Signal<string | null>;
37
- protected readonly positioningAttr: _angular_core.Signal<"fixed" | null>;
38
- /** Presence attribute: `''` when expanded, `null` when collapsed. */
39
- protected readonly expandedAttr: _angular_core.Signal<"" | null>;
40
- protected onExpandedchange(event: Event): void;
38
+ private readonly brandSlot;
39
+ private readonly togglerSlot;
40
+ /** The template's named slots. */
41
+ protected readonly slots: _angular_core.Signal<{
42
+ brand: TemplateRef<unknown> | undefined;
43
+ toggler: TemplateRef<unknown> | undefined;
44
+ }>;
45
+ /** The template's props. */
46
+ protected readonly props: _angular_core.Signal<_mintplayer_ui_core_navbar.NavbarProps>;
41
47
  constructor();
48
+ /** Opens or closes the collapse (flips it without an argument), and reports it. */
49
+ toggle(...args: Parameters<NavbarMethods['toggle']>): ReturnType<NavbarMethods['toggle']>;
42
50
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarComponent, never>;
43
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarComponent, "bs-navbar", never, { "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "positioning": { "alias": "positioning"; "required": false; "isSignal": true; }; }, { "expandedchange": "expandedchange"; }, never, ["*"], true, never>;
51
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarComponent, "bs-navbar", never, { "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "positioning": { "alias": "positioning"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "expandedchange": "expandedchange"; }, ["brandSlot", "togglerSlot"], ["*"], true, never>;
44
52
  }
45
53
 
46
- /**
47
- * `<bs-navbar-nav>` — groups navbar items into one of the WC's two nav lists.
48
- *
49
- * `align="start"` (default) joins the left list, `align="end"` the list pushed
50
- * to the far edge in wide mode. The host is `display: contents`, so the grouped
51
- * `<bs-navbar-item>` / `<bs-navbar-dropdown>` children flatten into the WC's
52
- * `.navbar-nav` flex layout exactly like directly-slotted items — the same
53
- * mechanism `<mp-navbar>` itself uses for its slots. The WC slot name stays an
54
- * internal detail (mirrors `bs-navbar-brand` hiding `slot="brand"`).
55
- *
56
- * `display: contents` MUST stay static CSS (never applied via JS) so the no-JS
57
- * SSR path lays out identically from first paint.
58
- */
54
+ /** A group of navbar items; `align="end"` pushes it to the far side when the bar is wide. */
59
55
  declare class BsNavbarNavComponent {
60
- /** Which nav group the items join: `start` (default) or `end` (pushed to the far edge in wide mode). */
56
+ #private;
57
+ /** The host element. */
58
+ readonly elementRef: ElementRef<HTMLElement>;
61
59
  readonly align: _angular_core.InputSignal<"start" | "end">;
62
- protected readonly slotAttr: _angular_core.Signal<"end" | null>;
60
+ /** The template's props. */
61
+ protected readonly props: _angular_core.Signal<{
62
+ bag: _mintplayer_ui_core_navbar.NavbarBag;
63
+ }>;
64
+ constructor();
63
65
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarNavComponent, never>;
64
66
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarNavComponent, "bs-navbar-nav", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
65
67
  }
66
68
 
67
- /**
68
- * `<bs-navbar-item>` — one navbar entry, uniform at EVERY nesting level.
69
- *
70
- * Wraps a consumer light-DOM link: project an `<a routerLink>` / `<a href>` (or
71
- * a `<button>`) as content. The rendered shape is context-aware:
72
- *
73
- * - **Directly in the navbar** (top level, or inside `<bs-navbar-nav>`): wraps
74
- * the link in `<mp-navbar-item>`, which styles it as a `.nav-link` in its
75
- * own shadow.
76
- * - **Inside a dropdown** (`<bs-navbar-dropdown>` / `<bs-dropdown-menu>`,
77
- * detected via `BS_DROPDOWN_MENU_CONTEXT`): the HOST itself becomes the
78
- * `.dropdown-item` — the shape `mp-dropdown-menu` queries (roving tabindex,
79
- * `role=menuitem` on the inner control) and styles via
80
- * `::slotted(.dropdown-item)`. The link stays a DIRECT child of the host so
81
- * the menu wrapper's companion `.dropdown-item > a` reset reaches it
82
- * (`NgTemplateOutlet` through `<ng-container>` adds no wrapper element).
83
- *
84
- * `active` / `disabled` bridge to the WC's presence attributes (nav mode) or
85
- * Bootstrap's item classes + `aria-disabled` (menu mode).
86
- */
69
+ /** One entry around a consumer link: a `.nav-item` in a nav group, a `.dropdown-item` in a dropdown. */
87
70
  declare class BsNavbarItemComponent {
88
- readonly active: _angular_core.InputSignal<boolean>;
89
- readonly disabled: _angular_core.InputSignal<boolean>;
90
- /** Menu mode when authored inside a dropdown; fixed per instance. */
91
- protected readonly inMenu: boolean;
92
- /** Presence attributes: `''` when set, `null` when absent. */
93
- protected readonly activeAttr: _angular_core.Signal<"" | null>;
94
- protected readonly disabledAttr: _angular_core.Signal<"" | null>;
71
+ #private;
72
+ /** The host element. */
73
+ readonly elementRef: ElementRef<HTMLElement>;
74
+ readonly active: _angular_core.InputSignalWithTransform<boolean, unknown>;
75
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
76
+ /** The template's props. */
77
+ protected readonly props: _angular_core.Signal<{
78
+ bag: _mintplayer_ui_core_navbar.NavbarBag;
79
+ }>;
80
+ constructor();
95
81
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarItemComponent, never>;
96
82
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarItemComponent, "bs-navbar-item", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
97
83
  }
98
84
 
99
- /**
100
- * `<bs-navbar-brand>` — Angular wrapper around `<mp-navbar-brand>`.
101
- *
102
- * Project an `<a routerLink>` / text as the brand. The host sets
103
- * `slot="brand"` so the wrapper element lands in `<mp-navbar>`'s `brand` slot
104
- * (mirrors `BsShellSidebarDirective`, which sets `slot="sidebar"`).
105
- */
106
- declare class BsNavbarBrandComponent {
107
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarBrandComponent, never>;
108
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarBrandComponent, "bs-navbar-brand", never, {}, {}, never, ["*"], true, never>;
85
+ /** The `labelTemplate` slot of `<bs-navbar-dropdown>`: `<ng-template bsNavbarDropdownLabelTemplate>` or `*bsNavbarDropdownLabelTemplate`. */
86
+ declare class BsNavbarDropdownLabelTemplateDirective {
87
+ readonly templateRef: TemplateRef<unknown>;
88
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownLabelTemplateDirective, never>;
89
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarDropdownLabelTemplateDirective, "[bsNavbarDropdownLabelTemplate]", never, {}, {}, never, never, true, never>;
109
90
  }
110
-
111
- /**
112
- * Marks the trigger-label template for `<bs-navbar-dropdown>` — any HTML
113
- * (text, icon + text, badges, …). Rendered into the WC's trigger via
114
- * `ngTemplateOutlet`; the trigger's accessible name derives from this content,
115
- * so give an icon-only label an `aria-label`.
116
- *
117
- * ```html
118
- * <bs-navbar-dropdown>
119
- * <span *bsNavbarDropdownLabel>Products</span>
120
- * <bs-navbar-item><a routerLink="/p1">Product 1</a></bs-navbar-item>
121
- * </bs-navbar-dropdown>
122
- * ```
123
- */
124
- declare class BsNavbarDropdownLabelDirective {
125
- readonly templateRef: TemplateRef<any>;
126
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownLabelDirective, never>;
127
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarDropdownLabelDirective, "[bsNavbarDropdownLabel]", never, {}, {}, never, never, true, never>;
128
- }
129
-
130
- /**
131
- * `<bs-navbar-dropdown>` — Angular wrapper around `<mp-navbar-dropdown>`.
132
- *
133
- * The trigger content is the `*bsNavbarDropdownLabel` template — any HTML
134
- * (matches the React/Vue wrappers, which take the WC's `label` slot directly).
135
- * The dropdown panel (`<bs-dropdown-menu>`) is rendered internally — author
136
- * the items directly between the tags, uniformly with the rest of the navbar:
137
- *
138
- * <bs-navbar-dropdown>
139
- * <span *bsNavbarDropdownLabel>Basic</span>
140
- * <bs-navbar-item><a routerLink="/basic/alert">Alert</a></bs-navbar-item>
141
- * <bs-navbar-dropdown>…</bs-navbar-dropdown> <!-- submenu -->
142
- * </bs-navbar-dropdown>
143
- *
144
- * `BS_DROPDOWN_MENU_CONTEXT` is provided here (element injectors follow the
145
- * consumer template's nesting, not the projection site — the internally
146
- * rendered menu is invisible to projected children's injectors), so nested
147
- * `<bs-navbar-item>`s render their `.dropdown-item` shape.
148
- *
149
- * **Active-route trigger highlighting:** a `RouterLinkActive` host directive
150
- * collects the projected descendant `routerLink`s; when any is active
151
- * (non-exact — the whole subtree counts, like the legacy `[bsNavbarTrigger]`
152
- * prefix match) the WC gets its `active` attribute, which recolors the
153
- * shadow-rendered trigger (primary background for submenu triggers). Nested
154
- * dropdowns each report their own subtree, so the full trigger chain of the
155
- * active route highlights. Renders server-side, so it works with JS off.
156
- *
157
- * Reveal/positioning and the no-JS `:focus-within` fallback all live in the WC.
158
- */
91
+ /** A navbar dropdown, or a submenu when nested: a native `<details>`, so it opens with JavaScript off. */
159
92
  declare class BsNavbarDropdownComponent {
160
- protected readonly label: _angular_core.Signal<BsNavbarDropdownLabelDirective>;
161
- /** A projected descendant link's route is active → highlight the trigger. */
162
- protected readonly routeActive: _angular_core.WritableSignal<boolean>;
93
+ #private;
94
+ /** The host element. */
95
+ readonly elementRef: ElementRef<HTMLElement>;
96
+ readonly label: _angular_core.InputSignal<string | null | undefined>;
97
+ readonly active: _angular_core.InputSignalWithTransform<boolean, unknown>;
98
+ private readonly labelTemplateSlot;
99
+ /** The template's named slots. */
100
+ protected readonly slots: _angular_core.Signal<{
101
+ labelTemplate: TemplateRef<unknown> | undefined;
102
+ }>;
103
+ /** What this component hands its content. */
104
+ readonly provided: _angular_core.Signal<_mintplayer_ui_core_navbar.NavbarNesting>;
105
+ /** The template's props. */
106
+ protected readonly props: _angular_core.Signal<{
107
+ view: _mintplayer_ui_core_navbar.NavbarDropdownView;
108
+ label?: string;
109
+ }>;
163
110
  constructor();
164
111
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarDropdownComponent, never>;
165
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, {}, {}, ["label"], ["*"], true, [{ directive: typeof i1.RouterLinkActive; inputs: {}; outputs: {}; }]>;
166
- }
167
-
168
- /**
169
- * `[bsNavbarToggler]` — marks an element as the navbar's custom hamburger
170
- * glyph, replacing the WC's built-in animated 3-bar → X toggler (the `toggler`
171
- * slot's fallback). The slot name stays an internal detail of the WC.
172
- *
173
- * The glyph is a first-class no-JS citizen: DSD slot assignment happens at
174
- * parse time (no fallback flash), the click reaches the in-shadow checkbox via
175
- * native label activation, and the open-state arrives as the inherited
176
- * `--mp-navbar-expanded: 0|1` custom property — derive the morph in CSS, e.g.
177
- * `transform: rotate(calc(var(--mp-navbar-expanded, 0) * 45deg))`.
178
- *
179
- * The host must be NON-interactive: labels do not forward clicks from
180
- * interactive descendants, so a `<button>`/`<a href>` here would kill the
181
- * no-JS toggle. Use a `<span>`/`<div>` glyph. (For a programmatic boolean, use
182
- * `[expanded]`/`(expandedchange)` on `bs-navbar` instead.)
183
- */
184
- declare class BsNavbarTogglerDirective {
185
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarTogglerDirective, never>;
186
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarTogglerDirective, "[bsNavbarToggler]", never, {}, {}, never, never, true, never>;
112
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsNavbarDropdownComponent, "bs-navbar-dropdown", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; }, {}, ["labelTemplateSlot"], ["*"], true, [{ directive: typeof i1.RouterLinkActive; inputs: {}; outputs: {}; }]>;
187
113
  }
188
114
 
189
115
  /**
@@ -195,20 +121,18 @@ declare class BsNavbarTogglerDirective {
195
121
  *
196
122
  * On the client a `ResizeObserver` tracks the bar (theme/viewport changes
197
123
  * resize it) and sets `padding-top` = the element's own initial padding + the
198
- * bar height. On the server — where the bar can't be measured — a fixed 58px
199
- * approximation is serialized into the HTML so SSR/no-JS pages still clear the
200
- * bar (same contract as the pre-WC directive).
124
+ * bar height. Until then (on the server, and with JavaScript off) the offset
125
+ * is CSS: `--bs-navbar-content-offset`, defaulting to 3.5rem, the height of
126
+ * Bootstrap's default navbar. A theme with a taller bar sets that property.
201
127
  */
202
128
  declare class BsNavbarContentDirective implements OnDestroy {
203
129
  #private;
204
130
  /** The `bs-navbar` to clear — pass its template reference (`#nav`). */
205
131
  readonly navbar: _angular_core.InputSignal<BsNavbarComponent>;
206
- /** Server-side height approximation (px) — the bar isn't measurable there. */
207
- static readonly SSR_NAVBAR_HEIGHT = 58;
208
132
  constructor();
209
133
  ngOnDestroy(): void;
210
134
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsNavbarContentDirective, never>;
211
135
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsNavbarContentDirective, "[bsNavbarContent]", never, { "navbar": { "alias": "bsNavbarContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
212
136
  }
213
137
 
214
- export { BsNavbarBrandComponent, BsNavbarComponent, BsNavbarContentDirective, BsNavbarDropdownComponent, BsNavbarDropdownLabelDirective, BsNavbarItemComponent, BsNavbarNavComponent, BsNavbarTogglerDirective };
138
+ export { BsNavbarBrandDirective, BsNavbarComponent, BsNavbarContentDirective, BsNavbarDropdownComponent, BsNavbarDropdownLabelTemplateDirective, BsNavbarItemComponent, BsNavbarNavComponent, BsNavbarTogglerDirective };
@@ -1,50 +1,83 @@
1
+ import * as _mintplayer_ui_core_otp_input from '@mintplayer/ui-core/otp-input';
2
+ import { OtpInputMethods } from '@mintplayer/ui-core/otp-input';
3
+ export { OtpInputCase, OtpInputSize, OtpInputType } from '@mintplayer/ui-core/otp-input';
1
4
  import * as _angular_core from '@angular/core';
2
5
  import { OnInit, ElementRef } from '@angular/core';
3
- import { OtpInputType, OtpInputCase, OtpInputSize, MintOtpInputElement } from '@mintplayer/web-components/otp-input';
4
- export * from '@mintplayer/web-components/otp-input';
5
6
  import { ControlValueAccessor } from '@angular/forms';
7
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y';
6
8
 
9
+ /**
10
+ * The `ControlValueAccessor` of `bs-otp-input` (a host directive of the
11
+ * generated component, see `otp-input.angular.ts`). A bound form control drives
12
+ * the code through `viewValue`; every change the user makes (typing, paste,
13
+ * `clear()`, a layout change that drops characters) reaches the form through
14
+ * the component's `value` model, which a form write never touches.
15
+ */
7
16
  declare class BsOtpInputValueAccessor implements ControlValueAccessor, OnInit {
8
- private host;
9
- private injector;
10
- private destroyRef;
11
- private ngControl;
12
- private onValueChange?;
13
- private onTouched?;
17
+ private readonly injector;
18
+ private readonly destroyRef;
19
+ /** A form control drives the code: its `viewValue` wins over the `value` input. */
20
+ readonly bound: _angular_core.WritableSignal<boolean>;
21
+ readonly viewValue: _angular_core.WritableSignal<string>;
22
+ readonly disabled: _angular_core.WritableSignal<boolean>;
23
+ private onChange;
24
+ onTouched: () => void;
14
25
  ngOnInit(): void;
15
- protected onValueChangeEvent(ev: Event): void;
16
- protected onTouchEvent(): void;
17
- private syncInvalid;
18
26
  registerOnChange(fn: (value: string) => void): void;
19
27
  registerOnTouched(fn: () => void): void;
20
28
  writeValue(value: string | null | undefined): void;
21
29
  setDisabledState(isDisabled: boolean): void;
22
30
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsOtpInputValueAccessor, never>;
23
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsOtpInputValueAccessor, "bs-otp-input", never, {}, {}, never, never, true, never>;
31
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsOtpInputValueAccessor, never, never, {}, {}, never, never, true, never>;
32
+ }
33
+ /**
34
+ * `focus()` on the `bs-otp-input` host moves into its input, so a directive that
35
+ * focuses the element it sits on (`autofocus` through FocusOnLoadDirective)
36
+ * reaches the field.
37
+ */
38
+ declare class BsOtpInputFocusDirective {
39
+ constructor();
40
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsOtpInputFocusDirective, never>;
41
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsOtpInputFocusDirective, never, never, {}, {}, never, never, true, never>;
24
42
  }
25
43
 
44
+ /**
45
+ * A segmented one-time-code input (#437): one real `<input>` behind decorative boxes.
46
+ *
47
+ * With JavaScript off it is a plain `.form-control` that takes the code and submits under `name`.
48
+ * `groups` sets the boxes (`[1,1,1,1,1,1]`, or `[5,5,5,5,5]` for a product key). `value` is two-way;
49
+ * `complete` fires when the user fills the last box. An `aria-label` on the component names the input.
50
+ */
26
51
  declare class BsOtpInputComponent {
52
+ #private;
53
+ /** The host element. */
54
+ readonly elementRef: ElementRef<HTMLElement>;
27
55
  readonly groups: _angular_core.InputSignal<number[]>;
28
- readonly type: _angular_core.InputSignal<OtpInputType>;
29
- readonly case: _angular_core.InputSignal<OtpInputCase>;
30
- readonly size: _angular_core.InputSignal<OtpInputSize>;
31
- readonly disabled: _angular_core.InputSignal<boolean>;
32
- readonly invalid: _angular_core.InputSignal<boolean>;
33
- readonly inputLabel: _angular_core.InputSignal<string | null>;
34
- readonly value: _angular_core.ModelSignal<string | undefined>;
56
+ readonly type: _angular_core.InputSignal<_mintplayer_ui_core_otp_input.OtpInputType>;
57
+ readonly letterCase: _angular_core.InputSignal<_mintplayer_ui_core_otp_input.OtpInputCase>;
58
+ readonly size: _angular_core.InputSignal<_mintplayer_ui_core_otp_input.OtpInputSize>;
59
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
60
+ readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
61
+ readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
62
+ readonly errorText: _angular_core.InputSignal<string | null | undefined>;
63
+ readonly name: _angular_core.InputSignal<string | null | undefined>;
64
+ readonly inputLabel: _angular_core.InputSignal<string | null | undefined>;
65
+ readonly value: _angular_core.ModelSignal<string>;
66
+ /** Every keystroke, paste and clear: the current, possibly partial, code. */
67
+ readonly valuechange: _angular_core.OutputEmitterRef<string>;
68
+ /** The user filled the last box. */
35
69
  readonly complete: _angular_core.OutputEmitterRef<string>;
36
- readonly elementRef: _angular_core.Signal<ElementRef<MintOtpInputElement> | undefined>;
37
- private readonly hostRef;
38
- protected readonly invalidAttr: _angular_core.Signal<"" | null>;
70
+ /** The template's props. */
71
+ protected readonly props: _angular_core.Signal<{
72
+ view: _mintplayer_ui_core_otp_input.OtpInputView;
73
+ }>;
39
74
  constructor();
40
- protected onValueChange(event: Event): void;
41
- protected onCompleteEvent(event: Event): void;
42
- /** Move focus into the hidden input. */
43
- focus(options?: FocusOptions): void;
44
- /** Reset the value to empty string. */
45
- clear(): void;
75
+ /** Empties the code, and reports it. */
76
+ clear(...args: Parameters<OtpInputMethods['clear']>): ReturnType<OtpInputMethods['clear']>;
77
+ /** Moves focus into the input. */
78
+ focusInput(...args: Parameters<OtpInputMethods['focusInput']>): ReturnType<OtpInputMethods['focusInput']>;
46
79
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsOtpInputComponent, never>;
47
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsOtpInputComponent, "bs-otp-input", never, { "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "case": { "alias": "case"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "complete": "complete"; }, never, never, true, [{ directive: typeof BsOtpInputValueAccessor; inputs: {}; outputs: {}; }]>;
80
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsOtpInputComponent, "bs-otp-input", never, { "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "letterCase": { "alias": "letterCase"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valuechange": "valuechange"; "complete": "complete"; }, never, never, true, [{ directive: typeof BsOtpInputValueAccessor; inputs: {}; outputs: {}; }, { directive: typeof BsOtpInputFocusDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.BsControlValidityDirective; inputs: { "errorMessages": "errorMessages"; }; outputs: {}; }]>;
48
81
  }
49
82
 
50
- export { BsOtpInputComponent, BsOtpInputValueAccessor };
83
+ export { BsOtpInputComponent, BsOtpInputFocusDirective, BsOtpInputValueAccessor };
@@ -1,24 +1,40 @@
1
+ import * as _mintplayer_ui_core_pagination from '@mintplayer/ui-core/pagination';
2
+ import { PaginationLabels } from '@mintplayer/ui-core/pagination';
1
3
  import * as _angular_core from '@angular/core';
2
- import { ElementRef } from '@angular/core';
3
4
  import { Size } from '@mintplayer/ng-bootstrap';
4
- import { MpPagination } from '@mintplayer/web-components/pagination';
5
5
 
6
+ /**
7
+ * Bootstrap's `.pagination` markup, rendered by this component's own
8
+ * template (#437) from `@mintplayer/ui-core/pagination`. Pages are buttons;
9
+ * with `hrefFor` they are real links, so SSR output navigates with
10
+ * JavaScript off and a plain click selects in place. The consumer's
11
+ * `aria-*` / `id` / `tabindex` on `<bs-pagination>` land on the `<nav>`.
12
+ */
6
13
  declare class BsPaginationComponent {
14
+ private readonly host;
15
+ private readonly hostAria;
7
16
  /** All page numbers. */
8
17
  readonly pageNumbers: _angular_core.InputSignal<number[]>;
9
18
  /** Selected number. */
10
19
  readonly selectedPageNumber: _angular_core.ModelSignal<number>;
11
- /** Number of boxes (cap on visible items; the WC clamps to whatever fits the host). */
20
+ /** Cap on visible boxes, arrows included (0 = uncapped). */
12
21
  readonly numberOfBoxes: _angular_core.InputSignal<number>;
13
22
  /** Display previous/next arrows. */
14
23
  readonly showArrows: _angular_core.InputSignal<boolean>;
15
24
  /** Page number size. */
16
25
  readonly size: _angular_core.InputSignal<Size>;
17
- protected readonly paginationRef: _angular_core.Signal<ElementRef<MpPagination>>;
18
- constructor();
19
- onPageChange(event: Event): void;
26
+ /** Localized accessible names; missing keys fall back to English. */
27
+ readonly labels: _angular_core.InputSignal<Partial<PaginationLabels> | null>;
28
+ /** Renders every page as a link to this URL, so it works without JavaScript. */
29
+ readonly hrefFor: _angular_core.InputSignal<((page: number) => string) | null>;
30
+ readonly view: _angular_core.Signal<_mintplayer_ui_core_pagination.PaginationView>;
31
+ readonly navBag: _angular_core.Signal<{
32
+ [x: string]: string | number | boolean | null;
33
+ }>;
34
+ select(page: number | null): void;
35
+ onLinkClick(event: MouseEvent, page: number | null): void;
20
36
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPaginationComponent, never>;
21
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsPaginationComponent, "bs-pagination", never, { "pageNumbers": { "alias": "pageNumbers"; "required": false; "isSignal": true; }; "selectedPageNumber": { "alias": "selectedPageNumber"; "required": false; "isSignal": true; }; "numberOfBoxes": { "alias": "numberOfBoxes"; "required": false; "isSignal": true; }; "showArrows": { "alias": "showArrows"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "selectedPageNumber": "selectedPageNumberChange"; }, never, never, true, never>;
37
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsPaginationComponent, "bs-pagination", never, { "pageNumbers": { "alias": "pageNumbers"; "required": false; "isSignal": true; }; "selectedPageNumber": { "alias": "selectedPageNumber"; "required": false; "isSignal": true; }; "numberOfBoxes": { "alias": "numberOfBoxes"; "required": false; "isSignal": true; }; "showArrows": { "alias": "showArrows"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "hrefFor": { "alias": "hrefFor"; "required": false; "isSignal": true; }; }, { "selectedPageNumber": "selectedPageNumberChange"; }, never, never, true, never>;
22
38
  }
23
39
 
24
40
  type PageNumberType = number | '...';
@@ -1,60 +1,90 @@
1
+ import * as _mintplayer_ui_core_phone_input from '@mintplayer/ui-core/phone-input';
2
+ import { PhoneChangeEventDetail, PhoneInputMethods } from '@mintplayer/ui-core/phone-input';
3
+ export { PhoneChangeEventDetail } from '@mintplayer/ui-core/phone-input';
1
4
  import * as _angular_core from '@angular/core';
5
+ import { OnInit, ElementRef } from '@angular/core';
2
6
  import { ControlValueAccessor } from '@angular/forms';
3
- import { PhoneChangeEventDetail } from '@mintplayer/web-components/phone-input';
4
- import * as i1 from '@mintplayer/ng-bootstrap/a11y';
7
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y';
5
8
 
6
9
  /**
7
- * `<bs-phone-input>` — a phone-number form control: country picker with flags,
8
- * a dial code that cannot be edited away, and as-you-type formatting.
9
- *
10
- * The control value is **E.164** (`'+32470123456'`), or `null` while empty, so a
11
- * form posts one canonical string. `(phoneChange)` carries the decomposed parts
12
- * for consumers that need them — note `valid` is `undefined` until the selected
13
- * country's validation rules have loaded, which is deliberate rather than
14
- * optimistic.
15
- *
16
- * ```html
17
- * <bs-form>
18
- * <bs-phone-input [(ngModel)]="phone" default-country="be"
19
- * [errorMessages]="{ required: 'Enter a phone number.' }" />
20
- * </bs-form>
21
- * ```
10
+ * The `ControlValueAccessor` of `bs-phone-input` (a host directive of the
11
+ * generated component, see `phone-input.angular.ts`). A bound form control
12
+ * drives the E.164 value through `viewValue`; every change the user makes
13
+ * (typing, paste, a country pick, rules that load and re-derive the E.164)
14
+ * reaches the form through the component's `value` model, which a form write
15
+ * never touches.
22
16
  */
23
- declare class BsPhoneInputComponent implements ControlValueAccessor {
17
+ declare class BsPhoneInputValueAccessor implements ControlValueAccessor, OnInit {
18
+ private readonly injector;
24
19
  private readonly destroyRef;
20
+ /** A form control drives the value: its `viewValue` wins over the `value` input. */
21
+ readonly bound: _angular_core.WritableSignal<boolean>;
22
+ readonly viewValue: _angular_core.WritableSignal<string | null>;
23
+ readonly disabled: _angular_core.WritableSignal<boolean>;
25
24
  private onChange;
26
- private onTouched;
27
- /** Set by `setDisabledState` before the view exists, applied by the effect. */
28
- private disabledByForm;
29
- private readonly phoneInput;
30
- /** ISO 3166-1 alpha-2, lowercase. Two-way via `(countryChange)`. */
31
- readonly country: _angular_core.InputSignal<string | null>;
32
- /** Country to start on when the value is empty. */
33
- readonly defaultCountry: _angular_core.InputSignal<string | null>;
34
- /** BCP-47 tag for country names and their ordering. Omitted = browser locale. */
35
- readonly locale: _angular_core.InputSignal<string | null>;
36
- readonly preferredCountries: _angular_core.InputSignal<readonly string[] | null>;
37
- readonly allowedCountries: _angular_core.InputSignal<readonly string[] | null>;
38
- readonly placeholder: _angular_core.InputSignal<string | null>;
39
- readonly autocomplete: _angular_core.InputSignal<string>;
40
- /** Accessible name of the number field. */
41
- readonly inputLabel: _angular_core.InputSignal<string | null>;
42
- /** Accessible name of the country picker. */
43
- readonly countryLabel: _angular_core.InputSignal<string | null>;
44
- readonly countryChange: _angular_core.OutputEmitterRef<string>;
45
- /** The full detail: E.164 value plus country, dial code, digits and validity. */
46
- readonly phoneChange: _angular_core.OutputEmitterRef<PhoneChangeEventDetail>;
47
- protected readonly preferredAttr: _angular_core.Signal<string | null>;
48
- protected readonly allowedAttr: _angular_core.Signal<string | null>;
49
- constructor();
50
- writeValue(value: string | null): void;
25
+ onTouched: () => void;
26
+ ngOnInit(): void;
51
27
  registerOnChange(fn: (value: string | null) => void): void;
52
28
  registerOnTouched(fn: () => void): void;
29
+ writeValue(value: string | null | undefined): void;
53
30
  setDisabledState(isDisabled: boolean): void;
54
- protected onValueChange(ev: Event): void;
55
- protected onCountryChange(ev: Event): void;
31
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPhoneInputValueAccessor, never>;
32
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsPhoneInputValueAccessor, never, never, {}, {}, never, never, true, never>;
33
+ }
34
+ /**
35
+ * `focus()` on the `bs-phone-input` host moves into the number field, not the
36
+ * country picker (D13), so a directive that focuses the element it sits on
37
+ * reaches the field.
38
+ */
39
+ declare class BsPhoneInputFocusDirective {
40
+ constructor();
41
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPhoneInputFocusDirective, never>;
42
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsPhoneInputFocusDirective, never, never, {}, {}, never, never, true, never>;
43
+ }
44
+
45
+ /**
46
+ * A phone-number field (#437): country picker with flags, dial code, and a number input that formats as
47
+ * the user types. `value` is two-way E.164 (`+32470123456`); `country` is two-way too.
48
+ *
49
+ * With JavaScript off it is a plain country select and tel input; the typed text submits under `name`.
50
+ * An `aria-label` on the component names the number input; `countryLabel` names the picker.
51
+ */
52
+ declare class BsPhoneInputComponent {
53
+ #private;
54
+ /** The host element. */
55
+ readonly elementRef: ElementRef<HTMLElement>;
56
+ readonly value: _angular_core.ModelSignal<string | null>;
57
+ readonly country: _angular_core.ModelSignal<string | null>;
58
+ readonly defaultCountry: _angular_core.InputSignal<string | null | undefined>;
59
+ readonly locale: _angular_core.InputSignal<string | null | undefined>;
60
+ readonly preferredCountries: _angular_core.InputSignal<string | readonly string[] | null>;
61
+ readonly allowedCountries: _angular_core.InputSignal<string | readonly string[] | null>;
62
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
63
+ readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
64
+ readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
65
+ readonly errorText: _angular_core.InputSignal<string | null | undefined>;
66
+ readonly placeholder: _angular_core.InputSignal<string | null | undefined>;
67
+ readonly autocomplete: _angular_core.InputSignal<string>;
68
+ readonly name: _angular_core.InputSignal<string | null | undefined>;
69
+ readonly inputLabel: _angular_core.InputSignal<string | null | undefined>;
70
+ readonly countryLabel: _angular_core.InputSignal<string | null | undefined>;
71
+ /** The E.164 value changed (null while empty). */
72
+ readonly valuechange: _angular_core.OutputEmitterRef<string | null>;
73
+ /** The user picked a country, or typed a `+XX` that switched it. */
74
+ readonly countrychange: _angular_core.OutputEmitterRef<string>;
75
+ /** Every edit, pick and rules load: the value with its parts and validity. */
76
+ readonly phonechange: _angular_core.OutputEmitterRef<PhoneChangeEventDetail>;
77
+ /** The template's props. */
78
+ protected readonly props: _angular_core.Signal<{
79
+ view: _mintplayer_ui_core_phone_input.PhoneInputView;
80
+ }>;
81
+ constructor();
82
+ /** Moves focus into the number field, not the country picker. */
83
+ focusInput(...args: Parameters<PhoneInputMethods['focusInput']>): ReturnType<PhoneInputMethods['focusInput']>;
84
+ /** Settles once the flags and the rules in flight have been applied. */
85
+ whenReady(...args: Parameters<PhoneInputMethods['whenReady']>): ReturnType<PhoneInputMethods['whenReady']>;
56
86
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPhoneInputComponent, never>;
57
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsPhoneInputComponent, "bs-phone-input", never, { "country": { "alias": "country"; "required": false; "isSignal": true; }; "defaultCountry": { "alias": "defaultCountry"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "preferredCountries": { "alias": "preferredCountries"; "required": false; "isSignal": true; }; "allowedCountries": { "alias": "allowedCountries"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "countryLabel": { "alias": "countryLabel"; "required": false; "isSignal": true; }; }, { "countryChange": "countryChange"; "phoneChange": "phoneChange"; }, never, never, true, [{ directive: typeof i1.BsControlValidityDirective; inputs: { "errorMessages": "errorMessages"; }; outputs: {}; }]>;
87
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsPhoneInputComponent, "bs-phone-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "country": { "alias": "country"; "required": false; "isSignal": true; }; "defaultCountry": { "alias": "defaultCountry"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "preferredCountries": { "alias": "preferredCountries"; "required": false; "isSignal": true; }; "allowedCountries": { "alias": "allowedCountries"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "countryLabel": { "alias": "countryLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "country": "countryChange"; "valuechange": "valuechange"; "countrychange": "countrychange"; "phonechange": "phonechange"; }, never, never, true, [{ directive: typeof BsPhoneInputValueAccessor; inputs: {}; outputs: {}; }, { directive: typeof BsPhoneInputFocusDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.BsControlValidityDirective; inputs: { "errorMessages": "errorMessages"; }; outputs: {}; }]>;
58
88
  }
59
89
 
60
- export { BsPhoneInputComponent };
90
+ export { BsPhoneInputComponent, BsPhoneInputFocusDirective, BsPhoneInputValueAccessor };