@ngb-bootstrap/core 0.0.0 → 0.1.0-next.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 (76) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +18 -0
  3. package/README.md +26 -0
  4. package/fesm2022/ngb-bootstrap-core-alert.mjs +154 -0
  5. package/fesm2022/ngb-bootstrap-core-alert.mjs.map +1 -0
  6. package/fesm2022/ngb-bootstrap-core-badge.mjs +100 -0
  7. package/fesm2022/ngb-bootstrap-core-badge.mjs.map +1 -0
  8. package/fesm2022/ngb-bootstrap-core-breadcrumb.mjs +135 -0
  9. package/fesm2022/ngb-bootstrap-core-breadcrumb.mjs.map +1 -0
  10. package/fesm2022/ngb-bootstrap-core-button.mjs +513 -0
  11. package/fesm2022/ngb-bootstrap-core-button.mjs.map +1 -0
  12. package/fesm2022/ngb-bootstrap-core-card.mjs +540 -0
  13. package/fesm2022/ngb-bootstrap-core-card.mjs.map +1 -0
  14. package/fesm2022/ngb-bootstrap-core-cdk.mjs +282 -0
  15. package/fesm2022/ngb-bootstrap-core-cdk.mjs.map +1 -0
  16. package/fesm2022/ngb-bootstrap-core-checkbox.mjs +165 -0
  17. package/fesm2022/ngb-bootstrap-core-checkbox.mjs.map +1 -0
  18. package/fesm2022/ngb-bootstrap-core-chips.mjs +512 -0
  19. package/fesm2022/ngb-bootstrap-core-chips.mjs.map +1 -0
  20. package/fesm2022/ngb-bootstrap-core-floating-label.mjs +83 -0
  21. package/fesm2022/ngb-bootstrap-core-floating-label.mjs.map +1 -0
  22. package/fesm2022/ngb-bootstrap-core-footer.mjs +48 -0
  23. package/fesm2022/ngb-bootstrap-core-footer.mjs.map +1 -0
  24. package/fesm2022/ngb-bootstrap-core-icon.mjs +243 -0
  25. package/fesm2022/ngb-bootstrap-core-icon.mjs.map +1 -0
  26. package/fesm2022/ngb-bootstrap-core-input.mjs +540 -0
  27. package/fesm2022/ngb-bootstrap-core-input.mjs.map +1 -0
  28. package/fesm2022/ngb-bootstrap-core-layout.mjs +272 -0
  29. package/fesm2022/ngb-bootstrap-core-layout.mjs.map +1 -0
  30. package/fesm2022/ngb-bootstrap-core-navbar.mjs +150 -0
  31. package/fesm2022/ngb-bootstrap-core-navbar.mjs.map +1 -0
  32. package/fesm2022/ngb-bootstrap-core-radio.mjs +279 -0
  33. package/fesm2022/ngb-bootstrap-core-radio.mjs.map +1 -0
  34. package/fesm2022/ngb-bootstrap-core-sidebar.mjs +425 -0
  35. package/fesm2022/ngb-bootstrap-core-sidebar.mjs.map +1 -0
  36. package/fesm2022/ngb-bootstrap-core-spinner.mjs +126 -0
  37. package/fesm2022/ngb-bootstrap-core-spinner.mjs.map +1 -0
  38. package/fesm2022/ngb-bootstrap-core-switch.mjs +147 -0
  39. package/fesm2022/ngb-bootstrap-core-switch.mjs.map +1 -0
  40. package/fesm2022/ngb-bootstrap-core.mjs +69 -0
  41. package/fesm2022/ngb-bootstrap-core.mjs.map +1 -0
  42. package/ngb-bootstrap.css +827 -0
  43. package/package.json +118 -4
  44. package/styles/_breadcrumb.scss +9 -0
  45. package/styles/_button.scss +14 -0
  46. package/styles/_card.scss +86 -0
  47. package/styles/_chip.scss +10 -0
  48. package/styles/_choice.scss +14 -0
  49. package/styles/_contrast.scss +23 -0
  50. package/styles/_icon.scss +62 -0
  51. package/styles/_index.scss +33 -0
  52. package/styles/_input.scss +9 -0
  53. package/styles/_layout.scss +602 -0
  54. package/styles/_overlay.scss +14 -0
  55. package/styles/_tokens.scss +29 -0
  56. package/styles/_typography.scss +77 -0
  57. package/styles/ngb-bootstrap.scss +2 -0
  58. package/types/ngb-bootstrap-core-alert.d.ts +65 -0
  59. package/types/ngb-bootstrap-core-badge.d.ts +38 -0
  60. package/types/ngb-bootstrap-core-breadcrumb.d.ts +32 -0
  61. package/types/ngb-bootstrap-core-button.d.ts +177 -0
  62. package/types/ngb-bootstrap-core-card.d.ts +154 -0
  63. package/types/ngb-bootstrap-core-cdk.d.ts +165 -0
  64. package/types/ngb-bootstrap-core-checkbox.d.ts +53 -0
  65. package/types/ngb-bootstrap-core-chips.d.ts +170 -0
  66. package/types/ngb-bootstrap-core-floating-label.d.ts +22 -0
  67. package/types/ngb-bootstrap-core-footer.d.ts +16 -0
  68. package/types/ngb-bootstrap-core-icon.d.ts +99 -0
  69. package/types/ngb-bootstrap-core-input.d.ts +208 -0
  70. package/types/ngb-bootstrap-core-layout.d.ts +102 -0
  71. package/types/ngb-bootstrap-core-navbar.d.ts +33 -0
  72. package/types/ngb-bootstrap-core-radio.d.ts +96 -0
  73. package/types/ngb-bootstrap-core-sidebar.d.ts +62 -0
  74. package/types/ngb-bootstrap-core-spinner.d.ts +49 -0
  75. package/types/ngb-bootstrap-core-switch.d.ts +44 -0
  76. package/types/ngb-bootstrap-core.d.ts +82 -0
@@ -0,0 +1,208 @@
1
+ import * as i0 from "@angular/core";
2
+ import { DoCheck, InjectionToken, Signal } from "@angular/core";
3
+ export type NgbInputSize = 'sm' | 'md' | 'lg';
4
+ /**
5
+ * What a field wrapper (`ngb-textfield`, `ngb-floating-label`) tells the `ngbInput` inside it.
6
+ * Provided under `NGB_INPUT_FIELD`, so the input can read it without a query or an effect.
7
+ */
8
+ export interface NgbInputField {
9
+ /** Ids of the hint and error elements, for `aria-describedby`. */
10
+ readonly describedBy: Signal<string | null>;
11
+ /** Default `placeholder` of the input. Bootstrap's floating label needs one to detect a value. */
12
+ readonly placeholder?: string;
13
+ }
14
+ /** Provided by the field wrappers; the `ngbInput` inside them injects it. */
15
+ export declare const NGB_INPUT_FIELD: InjectionToken<NgbInputField>;
16
+ /**
17
+ * Native `<input>`, `<textarea>` or `<select>` styled with Bootstrap 6 `.form-control`. It
18
+ * enhances the element instead of wrapping it, so `formControlName`, `formControl` and `ngModel`
19
+ * attach to the native element with Angular's built-in value accessors. No custom
20
+ * `ControlValueAccessor` is needed, as the value is a plain string or number.
21
+ *
22
+ * It adds `is-invalid` and `aria-invalid` once the control is invalid and touched, and a stable
23
+ * `id` for the label. Inside `ngb-textfield` or `ngb-floating-label` it also links hint and error
24
+ * text with `aria-describedby`.
25
+ *
26
+ * ```html
27
+ * <input ngbInput size="lg" placeholder="Name" [formControl]="name" />
28
+ * <textarea ngbInput rows="3" [(ngModel)]="bio"></textarea>
29
+ * ```
30
+ */
31
+ export declare class NgbInput implements DoCheck {
32
+ private readonly element;
33
+ private readonly control;
34
+ private readonly field;
35
+ private readonly ownDescribedBy;
36
+ private watched;
37
+ private subscription?;
38
+ /** Element id, which the label points at. Defaults to a generated `ngb-input-n`. */
39
+ readonly id: import("@angular/core").InputSignal<string>;
40
+ /** `sm`, `md` (default) or `lg`. */
41
+ readonly size: import("@angular/core").InputSignal<NgbInputSize>;
42
+ /** Shows the value as text without a border (`.form-control-plaintext`), for a readonly input. */
43
+ readonly plaintext: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
44
+ /**
45
+ * Forces the invalid state on or off, for errors the form does not know about, such as a server
46
+ * response. By default the input is invalid when its control is invalid and touched.
47
+ */
48
+ readonly invalid: import("@angular/core").InputSignal<boolean | undefined>;
49
+ /** Placeholder. Inside `ngb-floating-label` it defaults to a space, which the CSS needs. */
50
+ readonly placeholder: import("@angular/core").InputSignal<string | undefined>;
51
+ private readonly touchedInvalid;
52
+ private readonly valueState;
53
+ private readonly disabledState;
54
+ private readonly readonlyState;
55
+ /** `true` while the field shows its invalid state. */
56
+ readonly isInvalid: Signal<boolean>;
57
+ /** `true` when the input is not empty. */
58
+ readonly hasValue: Signal<boolean>;
59
+ /** `true` when the input or its control is disabled. */
60
+ readonly disabled: Signal<boolean>;
61
+ /** `true` when the input is read-only. */
62
+ readonly readonly: Signal<boolean>;
63
+ protected readonly placeholderText: Signal<string | null>;
64
+ protected readonly describedBy: Signal<string | null>;
65
+ constructor();
66
+ ngDoCheck(): void;
67
+ /** Re-reads the control and element state. Runs on every change detection pass and on events. */
68
+ protected sync(): void;
69
+ /** Empties the input like the user would, so any bound control or `(input)` handler sees it. */
70
+ clear(): void;
71
+ /** Focuses the native element. */
72
+ focus(): void;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbInput, never>;
74
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbInput, "input[ngbInput], textarea[ngbInput], select[ngbInput]", ["ngbInput"], {
75
+ "id": {
76
+ "alias": "id";
77
+ "required": false;
78
+ "isSignal": true;
79
+ };
80
+ "size": {
81
+ "alias": "size";
82
+ "required": false;
83
+ "isSignal": true;
84
+ };
85
+ "plaintext": {
86
+ "alias": "plaintext";
87
+ "required": false;
88
+ "isSignal": true;
89
+ };
90
+ "invalid": {
91
+ "alias": "invalid";
92
+ "required": false;
93
+ "isSignal": true;
94
+ };
95
+ "placeholder": {
96
+ "alias": "placeholder";
97
+ "required": false;
98
+ "isSignal": true;
99
+ };
100
+ }, {}, never, never, true, never>;
101
+ }
102
+ /**
103
+ * Shared by `ngb-textfield` and `ngb-floating-label`: finds the `ngbInput` inside, and owns the
104
+ * label, hint and error text and their ids.
105
+ */
106
+ export declare abstract class NgbField {
107
+ protected readonly control: import("@angular/core").Signal<NgbInput | undefined>;
108
+ /** Label text. It is a `<label>` tied to the input with `for`. */
109
+ readonly label: import("@angular/core").InputSignal<string | undefined>;
110
+ /** Help text under the field. It describes the input through `aria-describedby`. */
111
+ readonly hint: import("@angular/core").InputSignal<string | undefined>;
112
+ /** Error text, shown while the input is invalid (its control is invalid and touched). */
113
+ readonly error: import("@angular/core").InputSignal<string | undefined>;
114
+ protected readonly hintId: string;
115
+ protected readonly errorId: string;
116
+ protected readonly labelFor: import("@angular/core").Signal<string | null>;
117
+ protected readonly showError: import("@angular/core").Signal<boolean>;
118
+ /** Ids for the input's `aria-describedby`: the hint, then the error. */
119
+ readonly describedBy: import("@angular/core").Signal<string | null>;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbField, never>;
121
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbField, never, never, {
122
+ "label": {
123
+ "alias": "label";
124
+ "required": false;
125
+ "isSignal": true;
126
+ };
127
+ "hint": {
128
+ "alias": "hint";
129
+ "required": false;
130
+ "isSignal": true;
131
+ };
132
+ "error": {
133
+ "alias": "error";
134
+ "required": false;
135
+ "isSignal": true;
136
+ };
137
+ }, {}, ["control"], never, true, never>;
138
+ }
139
+ /**
140
+ * Content before the input of an `ngb-textfield`: an icon, text or a button. Text and icons get
141
+ * `.input-group-text`; a `<button>` or `<a>` keeps its own `.btn` styling.
142
+ *
143
+ * ```html
144
+ * <span ngbPrefix>$</span>
145
+ * ```
146
+ */
147
+ export declare class NgbPrefix {
148
+ protected readonly interactive: boolean;
149
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbPrefix, never>;
150
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPrefix, "[ngbPrefix]", never, {}, {}, never, never, true, never>;
151
+ }
152
+ /**
153
+ * Content after the input of an `ngb-textfield`, with the same rules as `ngbPrefix`.
154
+ *
155
+ * ```html
156
+ * <button ngbButton ngbSuffix variant="outline">Search</button>
157
+ * ```
158
+ */
159
+ export declare class NgbSuffix {
160
+ protected readonly interactive: boolean;
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSuffix, never>;
162
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbSuffix, "[ngbSuffix]", never, {}, {}, never, never, true, never>;
163
+ }
164
+ /**
165
+ * Text field in the Taiga UI Textfield style: a label, a native `ngbInput` or textarea, optional
166
+ * prefix and suffix content, a clear button, and hint and error text. Built on Bootstrap 6
167
+ * `.form-field`, `.form-label`, `.input-group`, `.form-text` and `.invalid-feedback`.
168
+ *
169
+ * ```html
170
+ * <ngb-textfield label="Email" hint="We never share it." error="Enter a valid email." clearable>
171
+ * <ngb-icon ngbPrefix [icon]="mail" />
172
+ * <input ngbInput type="email" formControlName="email" />
173
+ * </ngb-textfield>
174
+ * ```
175
+ */
176
+ export declare class NgbTextfield extends NgbField {
177
+ protected readonly i18n: import("@ngb-bootstrap/core").NgbI18n;
178
+ /** `sm`, `md` (default) or `lg`. Sizes the whole group: input, prefix, suffix and buttons. */
179
+ readonly size: import("@angular/core").InputSignal<NgbInputSize>;
180
+ /** Shows a clear button while the input has a value and is neither disabled nor read-only. */
181
+ readonly clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
182
+ /** Accessible name of the clear button. Defaults to the `clear` string of `NGB_I18N`. */
183
+ readonly clearLabel: import("@angular/core").InputSignal<string | undefined>;
184
+ /** Emits after the clear button emptied the input. */
185
+ readonly cleared: import("@angular/core").OutputEmitterRef<void>;
186
+ protected readonly showClear: import("@angular/core").Signal<boolean>;
187
+ protected clear(): void;
188
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbTextfield, never>;
189
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbTextfield, "ngb-textfield", never, {
190
+ "size": {
191
+ "alias": "size";
192
+ "required": false;
193
+ "isSignal": true;
194
+ };
195
+ "clearable": {
196
+ "alias": "clearable";
197
+ "required": false;
198
+ "isSignal": true;
199
+ };
200
+ "clearLabel": {
201
+ "alias": "clearLabel";
202
+ "required": false;
203
+ "isSignal": true;
204
+ };
205
+ }, {
206
+ "cleared": "cleared";
207
+ }, never, ["[ngbPrefix]", "*", "[ngbSuffix]"], true, never>;
208
+ }
@@ -0,0 +1,102 @@
1
+ import * as i0 from "@angular/core";
2
+ import { TemplateRef } from "@angular/core";
3
+ /**
4
+ * How `<ngb-layout>` divides the top of the page from `lg` up: `full-navbar` runs the navbar across
5
+ * the whole width above the sidebar; `full-sidebar` runs the sidebar the whole height, with the
6
+ * navbar beside it.
7
+ */
8
+ export type NgbLayoutMode = 'full-navbar' | 'full-sidebar';
9
+ /**
10
+ * The brand (logo, name, version) of `<ngb-layout>`, as a template so it can be shown where the
11
+ * mode puts it: at the start of the navbar, or from `lg` up in `full-sidebar` mode at the top of
12
+ * the sidebar (back in the navbar while the sidebar is collapsed to its rail).
13
+ *
14
+ * ```html
15
+ * <ng-template ngbBrand><a class="navbar-brand" routerLink="/">My app</a></ng-template>
16
+ * ```
17
+ */
18
+ export declare class NgbBrand {
19
+ readonly template: TemplateRef<any>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbBrand, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbBrand, "ng-template[ngbBrand]", never, {}, {}, never, never, true, never>;
22
+ }
23
+ /**
24
+ * Page shell in the Taiga UI docs style, on the Bootstrap grid: a fixed `<ngb-navbar>`, an
25
+ * `<ngb-sidebar>` column and an `<ngb-layout-content>` column inside a rounded window frame.
26
+ * Below `lg` the sidebar is a drawer that the navbar's menu button opens.
27
+ *
28
+ * ```html
29
+ * <ngb-layout>
30
+ * <ng-template ngbBrand>…</ng-template>
31
+ * <ngb-navbar>…</ngb-navbar>
32
+ * <ngb-sidebar [items]="items" />
33
+ * <ngb-layout-content>
34
+ * <router-outlet />
35
+ * <ngb-footer>…</ngb-footer>
36
+ * </ngb-layout-content>
37
+ * </ngb-layout>
38
+ * ```
39
+ */
40
+ export declare class NgbLayout {
41
+ /** Id of the sidebar drawer, for the menu button's `aria-controls`. */
42
+ readonly sidebarId: string;
43
+ /** Whether the sidebar drawer is open (below `lg` only; from `lg` up the sidebar is always shown). */
44
+ readonly sidebarOpen: import("@angular/core").WritableSignal<boolean>;
45
+ /** Whether the viewport is `lg` or wider, where the sidebar is a column rather than a drawer. */
46
+ readonly desktop: import("@angular/core").WritableSignal<boolean>;
47
+ /** The `ngbBrand` template, placed in the layout or its navbar. */
48
+ readonly brand: import("@angular/core").Signal<NgbBrand | undefined>;
49
+ /** Round the corners of the frame and the sidebar, content and footer panels. */
50
+ readonly rounded: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
51
+ /** Whether the navbar spans the full width or the sidebar the full height, from `lg` up. */
52
+ readonly mode: import("@angular/core").InputSignal<NgbLayoutMode>;
53
+ /**
54
+ * Show the navbar's menu button from `lg` up too, to contract the sidebar to a rail of top-level
55
+ * icons and expand it again.
56
+ */
57
+ readonly collapsible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
58
+ /** Whether the sidebar is contracted to its icon rail (from `lg` up, when `collapsible`). */
59
+ readonly sidebarCollapsed: import("@angular/core").ModelSignal<boolean>;
60
+ /** Whether the sidebar is contracted right now: `collapsible`, collapsed and from `lg` up. */
61
+ readonly sidebarRail: import("@angular/core").Signal<boolean>;
62
+ /** Whether the sidebar is shown in full: the open drawer below `lg`, the expanded column from `lg` up. */
63
+ readonly sidebarExpanded: import("@angular/core").Signal<boolean>;
64
+ constructor();
65
+ openSidebar(): void;
66
+ closeSidebar(): void;
67
+ /** Below `lg` opens or closes the drawer; from `lg` up contracts or expands a `collapsible` sidebar. */
68
+ toggleSidebar(): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbLayout, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbLayout, "ngb-layout", never, {
71
+ "rounded": {
72
+ "alias": "rounded";
73
+ "required": false;
74
+ "isSignal": true;
75
+ };
76
+ "mode": {
77
+ "alias": "mode";
78
+ "required": false;
79
+ "isSignal": true;
80
+ };
81
+ "collapsible": {
82
+ "alias": "collapsible";
83
+ "required": false;
84
+ "isSignal": true;
85
+ };
86
+ "sidebarCollapsed": {
87
+ "alias": "sidebarCollapsed";
88
+ "required": false;
89
+ "isSignal": true;
90
+ };
91
+ }, {
92
+ "sidebarCollapsed": "sidebarCollapsedChange";
93
+ }, ["brand"], ["ngb-navbar", "ngb-sidebar", "*"], true, never>;
94
+ }
95
+ /**
96
+ * The content column of `<ngb-layout>`. Wraps its content in `<main>`; an `<ngb-footer>` inside it
97
+ * is placed after `<main>`, at the bottom of the column.
98
+ */
99
+ export declare class NgbLayoutContent {
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbLayoutContent, never>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbLayoutContent, "ngb-layout-content", never, {}, {}, never, ["*", "ngb-footer"], true, never>;
102
+ }
@@ -0,0 +1,33 @@
1
+ import { NgbBrand, NgbLayout } from "@ngb-bootstrap/core/layout";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Fixed top bar, built on Bootstrap 6 `.navbar`. Its content goes in three slots: the start
5
+ * (default content, after an `ngbBrand` template if there is one), `[ngbNavbarCenter]` and
6
+ * `[ngbNavbarEnd]`. Inside
7
+ * `<ngb-layout>` it adds a menu button that opens the sidebar drawer below `lg`, and from `lg` up
8
+ * contracts and expands the sidebar when the layout is `collapsible`.
9
+ *
10
+ * ```html
11
+ * <ngb-navbar>
12
+ * <a class="navbar-brand" routerLink="/">My app</a>
13
+ * <div ngbNavbarCenter>…search…</div>
14
+ * <div ngbNavbarEnd>…actions…</div>
15
+ * </ngb-navbar>
16
+ * ```
17
+ */
18
+ export declare class NgbNavbar {
19
+ protected readonly layout: NgbLayout | null;
20
+ protected readonly menuIcon: import("@ngb-bootstrap/icons").NgbIconDefinition;
21
+ private readonly ownBrand;
22
+ protected readonly brand: import("@angular/core").Signal<NgbBrand | undefined>;
23
+ /** Accessible name of the menu button. */
24
+ readonly menuLabel: import("@angular/core").InputSignal<string>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbNavbar, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbNavbar, "ngb-navbar", never, {
27
+ "menuLabel": {
28
+ "alias": "menuLabel";
29
+ "required": false;
30
+ "isSignal": true;
31
+ };
32
+ }, {}, ["ownBrand"], ["*", "[ngbNavbarCenter]", "[ngbNavbarEnd]"], true, never>;
33
+ }
@@ -0,0 +1,96 @@
1
+ import { NgbThemeColor } from "@ngb-bootstrap/core";
2
+ import { NgbValueAccessor } from "@ngb-bootstrap/core/cdk";
3
+ import * as i0 from "@angular/core";
4
+ export type NgbRadioSize = 'sm' | 'md' | 'lg';
5
+ export type NgbRadioOrientation = 'vertical' | 'horizontal';
6
+ /**
7
+ * Owns the value of a set of `<ngb-radio>` items. The items are native radios sharing one
8
+ * `name`, so the browser provides the arrow-key behaviour: one tab stop for the group, arrows
9
+ * move the selection. The model is `value`, the value of the selected item.
10
+ *
11
+ * ```html
12
+ * <ngb-radio-group label="Plan" [(value)]="plan">
13
+ * <ngb-radio value="free">Free</ngb-radio>
14
+ * <ngb-radio value="pro">Pro</ngb-radio>
15
+ * </ngb-radio-group>
16
+ * ```
17
+ */
18
+ export declare class NgbRadioGroup<T = unknown> extends NgbValueAccessor<T> {
19
+ /** Shared `name` of the radios. Defaults to a unique id. */
20
+ readonly name: import("@angular/core").InputSignal<string>;
21
+ /** Accessible name of the group. Use it when the group has no visible heading. */
22
+ readonly label: import("@angular/core").InputSignal<string | undefined>;
23
+ /** `vertical` (default) or `horizontal`. */
24
+ readonly orientation: import("@angular/core").InputSignal<NgbRadioOrientation>;
25
+ /** Theme colour (Bootstrap `.theme-*`) for every radio. */
26
+ readonly color: import("@angular/core").InputSignal<NgbThemeColor | undefined>;
27
+ /** `sm`, `md` (default) or `lg`, for every radio. */
28
+ readonly size: import("@angular/core").InputSignal<NgbRadioSize>;
29
+ protected readonly classes: import("@angular/core").Signal<"ngb-choice-group ngb-choice-group-inline" | "ngb-choice-group">;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbRadioGroup<any>, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbRadioGroup<any>, "ngb-radio-group", never, {
32
+ "name": {
33
+ "alias": "name";
34
+ "required": false;
35
+ "isSignal": true;
36
+ };
37
+ "label": {
38
+ "alias": "label";
39
+ "required": false;
40
+ "isSignal": true;
41
+ };
42
+ "orientation": {
43
+ "alias": "orientation";
44
+ "required": false;
45
+ "isSignal": true;
46
+ };
47
+ "color": {
48
+ "alias": "color";
49
+ "required": false;
50
+ "isSignal": true;
51
+ };
52
+ "size": {
53
+ "alias": "size";
54
+ "required": false;
55
+ "isSignal": true;
56
+ };
57
+ }, {}, never, ["*"], true, never>;
58
+ }
59
+ /**
60
+ * One option of an `<ngb-radio-group>`, built on Bootstrap 6 `.radio` over a native
61
+ * `<input type="radio">`. The projected content is the label.
62
+ *
63
+ * ```html
64
+ * <ngb-radio value="pro" hint="Unlimited projects.">Pro</ngb-radio>
65
+ * ```
66
+ */
67
+ export declare class NgbRadio {
68
+ protected readonly group: NgbRadioGroup<any>;
69
+ protected readonly id: string;
70
+ protected readonly hintId: string;
71
+ /** The value the group takes when this radio is selected. */
72
+ readonly value: import("@angular/core").InputSignal<unknown>;
73
+ /** Description shown under the label and linked with `aria-describedby`. */
74
+ readonly hint: import("@angular/core").InputSignal<string | undefined>;
75
+ /** Disables this radio. The group can disable all of them. */
76
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
77
+ protected readonly classes: import("@angular/core").Signal<string>;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbRadio, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbRadio, "ngb-radio", never, {
80
+ "value": {
81
+ "alias": "value";
82
+ "required": true;
83
+ "isSignal": true;
84
+ };
85
+ "hint": {
86
+ "alias": "hint";
87
+ "required": false;
88
+ "isSignal": true;
89
+ };
90
+ "disabled": {
91
+ "alias": "disabled";
92
+ "required": false;
93
+ "isSignal": true;
94
+ };
95
+ }, {}, never, ["*"], true, never>;
96
+ }
@@ -0,0 +1,62 @@
1
+ import { NgbLayout } from "@ngb-bootstrap/core/layout";
2
+ import { NgbIconDefinition } from "@ngb-bootstrap/icons";
3
+ import * as i0 from "@angular/core";
4
+ /** One entry in `<ngb-sidebar>`: a router link, an external link, or a group of children. */
5
+ export interface NgbSidebarItem {
6
+ readonly label: string;
7
+ /** Router link, e.g. `/components/badge`. */
8
+ readonly link?: string;
9
+ /** External URL, opened in a new tab. */
10
+ readonly href?: string;
11
+ /** Icon shown before top-level items. */
12
+ readonly icon?: NgbIconDefinition;
13
+ readonly children?: readonly NgbSidebarItem[];
14
+ }
15
+ /**
16
+ * Side navigation in the Taiga UI docs style. From `lg` up it is a fixed column of
17
+ * `<ngb-layout>`; below `lg` it is a Bootstrap drawer (`.lg:drawer`) opened by the navbar's menu
18
+ * button and closed by the backdrop, Escape or following a link. In a `collapsible` layout it
19
+ * contracts from `lg` up to a rail of top-level icons. Groups expand to reveal the current route. Content placed inside it (e.g. a notice) appears above the items.
20
+ *
21
+ * ```html
22
+ * <ngb-sidebar label="Documentation" [items]="items" />
23
+ * ```
24
+ */
25
+ export declare class NgbSidebar {
26
+ protected readonly layout: NgbLayout | null;
27
+ private readonly router;
28
+ private readonly drawer;
29
+ private readonly expanded;
30
+ protected readonly chevron: NgbIconDefinition;
31
+ /** The navigation tree. */
32
+ readonly items: import("@angular/core").InputSignal<readonly NgbSidebarItem[]>;
33
+ /** Accessible name of the navigation. */
34
+ readonly label: import("@angular/core").InputSignal<string>;
35
+ /** Accessible name of the drawer's close button. */
36
+ readonly closeLabel: import("@angular/core").InputSignal<string>;
37
+ constructor();
38
+ protected isExpanded(item: NgbSidebarItem): boolean;
39
+ protected toggle(item: NgbSidebarItem): void;
40
+ /** A click on the dialog itself, outside its box, is a click on the backdrop. */
41
+ protected closeOnBackdrop(event: MouseEvent): void;
42
+ /** Expands every group that contains the current route, keeping groups the user opened. */
43
+ private expandActive;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSidebar, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbSidebar, "ngb-sidebar", never, {
46
+ "items": {
47
+ "alias": "items";
48
+ "required": false;
49
+ "isSignal": true;
50
+ };
51
+ "label": {
52
+ "alias": "label";
53
+ "required": false;
54
+ "isSignal": true;
55
+ };
56
+ "closeLabel": {
57
+ "alias": "closeLabel";
58
+ "required": false;
59
+ "isSignal": true;
60
+ };
61
+ }, {}, never, ["*"], true, never>;
62
+ }
@@ -0,0 +1,49 @@
1
+ import { NgbThemeColor } from "@ngb-bootstrap/core";
2
+ import * as i0 from "@angular/core";
3
+ export type NgbSpinnerType = 'border' | 'grow';
4
+ export type NgbSpinnerSize = 'sm' | 'md';
5
+ /**
6
+ * Loading indicator built on Bootstrap 6 `.spinner-border` and `.spinner-grow`. It is a
7
+ * `role="status"` region with visually hidden text, named "Loading…" by default.
8
+ *
9
+ * ```html
10
+ * <ngb-spinner color="primary" size="sm" />
11
+ * <ngb-spinner type="grow" label="Saving your draft" />
12
+ * ```
13
+ */
14
+ export declare class NgbSpinner {
15
+ private readonly i18n;
16
+ /** `border` (default) or `grow`. */
17
+ readonly type: import("@angular/core").InputSignal<NgbSpinnerType>;
18
+ /** `md` (default) or `sm`. For any other size, set `--spinner-width` and `--spinner-height`. */
19
+ readonly size: import("@angular/core").InputSignal<NgbSpinnerSize>;
20
+ /** Theme colour. Without it the spinner takes the current text colour. */
21
+ readonly color: import("@angular/core").InputSignal<NgbThemeColor | undefined>;
22
+ /** Accessible text. Defaults to the `loading` string of `NGB_I18N`. */
23
+ readonly label: import("@angular/core").InputSignal<string | undefined>;
24
+ protected readonly text: import("@angular/core").Signal<string>;
25
+ protected readonly classes: import("@angular/core").Signal<string>;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSpinner, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbSpinner, "ngb-spinner", never, {
28
+ "type": {
29
+ "alias": "type";
30
+ "required": false;
31
+ "isSignal": true;
32
+ };
33
+ "size": {
34
+ "alias": "size";
35
+ "required": false;
36
+ "isSignal": true;
37
+ };
38
+ "color": {
39
+ "alias": "color";
40
+ "required": false;
41
+ "isSignal": true;
42
+ };
43
+ "label": {
44
+ "alias": "label";
45
+ "required": false;
46
+ "isSignal": true;
47
+ };
48
+ }, {}, never, never, true, never>;
49
+ }
@@ -0,0 +1,44 @@
1
+ import { NgbThemeColor } from "@ngb-bootstrap/core";
2
+ import { NgbValueAccessor } from "@ngb-bootstrap/core/cdk";
3
+ import * as i0 from "@angular/core";
4
+ export type NgbSwitchSize = 'sm' | 'md' | 'lg';
5
+ /**
6
+ * Switch built on Bootstrap 6 `.switch` over a native `<input type="checkbox" role="switch">`.
7
+ * The projected content is the label. The model is `value` (`true` / `false`), the same name
8
+ * every ngb form control uses.
9
+ *
10
+ * ```html
11
+ * <ngb-switch [(value)]="notifications" hint="Sent by email.">Notifications</ngb-switch>
12
+ * <ngb-switch formControlName="darkMode">Dark mode</ngb-switch>
13
+ * ```
14
+ */
15
+ export declare class NgbSwitch extends NgbValueAccessor<boolean> {
16
+ protected readonly id: string;
17
+ protected readonly hintId: string;
18
+ /** Description shown under the label and linked with `aria-describedby`. */
19
+ readonly hint: import("@angular/core").InputSignal<string | undefined>;
20
+ /** Theme colour (Bootstrap `.theme-*`). Defaults to the control colour. */
21
+ readonly color: import("@angular/core").InputSignal<NgbThemeColor | undefined>;
22
+ /** `sm`, `md` (default) or `lg`. */
23
+ readonly size: import("@angular/core").InputSignal<NgbSwitchSize>;
24
+ protected readonly classes: import("@angular/core").Signal<string>;
25
+ protected toggle(event: Event): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbSwitch, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbSwitch, "ngb-switch", never, {
28
+ "hint": {
29
+ "alias": "hint";
30
+ "required": false;
31
+ "isSignal": true;
32
+ };
33
+ "color": {
34
+ "alias": "color";
35
+ "required": false;
36
+ "isSignal": true;
37
+ };
38
+ "size": {
39
+ "alias": "size";
40
+ "required": false;
41
+ "isSignal": true;
42
+ };
43
+ }, {}, never, ["*"], true, never>;
44
+ }