@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,272 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, model, signal } from "@angular/core";
3
+ let nextId = 0;
4
+ const DESKTOP = "(width >= 1024px)";
5
+ var NgbBrand = class NgbBrand {
6
+ template = inject(TemplateRef);
7
+ static ɵfac = i0.ɵɵngDeclareFactory({
8
+ minVersion: "12.0.0",
9
+ version: "22.2.3",
10
+ ngImport: i0,
11
+ type: NgbBrand,
12
+ deps: [],
13
+ target: i0.ɵɵFactoryTarget.Directive
14
+ });
15
+ static ɵdir = i0.ɵɵngDeclareDirective({
16
+ minVersion: "14.0.0",
17
+ version: "22.2.3",
18
+ type: NgbBrand,
19
+ isStandalone: true,
20
+ selector: "ng-template[ngbBrand]",
21
+ ngImport: i0
22
+ });
23
+ };
24
+ i0.ɵɵngDeclareClassMetadata({
25
+ minVersion: "12.0.0",
26
+ version: "22.2.3",
27
+ ngImport: i0,
28
+ type: NgbBrand,
29
+ decorators: [{
30
+ type: Directive,
31
+ args: [{ selector: "ng-template[ngbBrand]" }]
32
+ }]
33
+ });
34
+ var NgbLayout = class NgbLayout {
35
+ sidebarId = `ngb-sidebar-${nextId++}`;
36
+ sidebarOpen = signal(false, ...ngDevMode ? [{ debugName: "sidebarOpen" }] : /* istanbul ignore next */ []);
37
+ desktop = signal(false, ...ngDevMode ? [{ debugName: "desktop" }] : /* istanbul ignore next */ []);
38
+ brand = contentChild(NgbBrand, {
39
+ ...ngDevMode ? { debugName: "brand" } : /* istanbul ignore next */ {},
40
+ descendants: true
41
+ });
42
+ rounded = input(true, {
43
+ ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
44
+ transform: booleanAttribute
45
+ });
46
+ mode = input("full-navbar", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
47
+ collapsible = input(false, {
48
+ ...ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {},
49
+ transform: booleanAttribute
50
+ });
51
+ sidebarCollapsed = model(false, ...ngDevMode ? [{ debugName: "sidebarCollapsed" }] : /* istanbul ignore next */ []);
52
+ sidebarRail = computed(() => this.desktop() && this.collapsible() && this.sidebarCollapsed(), ...ngDevMode ? [{ debugName: "sidebarRail" }] : /* istanbul ignore next */ []);
53
+ sidebarExpanded = computed(() => this.desktop() ? !this.sidebarRail() : this.sidebarOpen(), ...ngDevMode ? [{ debugName: "sidebarExpanded" }] : /* istanbul ignore next */ []);
54
+ constructor() {
55
+ const destroyRef = inject(DestroyRef);
56
+ afterNextRender(() => {
57
+ if (typeof matchMedia !== "function") return;
58
+ const query = matchMedia(DESKTOP);
59
+ const onChange = () => {
60
+ this.desktop.set(query.matches);
61
+ if (query.matches) this.closeSidebar();
62
+ };
63
+ onChange();
64
+ query.addEventListener("change", onChange);
65
+ destroyRef.onDestroy(() => query.removeEventListener("change", onChange));
66
+ });
67
+ }
68
+ openSidebar() {
69
+ this.sidebarOpen.set(true);
70
+ }
71
+ closeSidebar() {
72
+ this.sidebarOpen.set(false);
73
+ }
74
+ toggleSidebar() {
75
+ if (this.desktop() && this.collapsible()) this.sidebarCollapsed.update((collapsed) => !collapsed);
76
+ else this.sidebarOpen.update((open) => !open);
77
+ }
78
+ static ɵfac = i0.ɵɵngDeclareFactory({
79
+ minVersion: "12.0.0",
80
+ version: "22.2.3",
81
+ ngImport: i0,
82
+ type: NgbLayout,
83
+ deps: [],
84
+ target: i0.ɵɵFactoryTarget.Component
85
+ });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({
87
+ minVersion: "17.2.0",
88
+ version: "22.2.3",
89
+ type: NgbLayout,
90
+ isStandalone: true,
91
+ selector: "ngb-layout",
92
+ inputs: {
93
+ rounded: {
94
+ classPropertyName: "rounded",
95
+ publicName: "rounded",
96
+ isSignal: true,
97
+ isRequired: false,
98
+ transformFunction: null
99
+ },
100
+ mode: {
101
+ classPropertyName: "mode",
102
+ publicName: "mode",
103
+ isSignal: true,
104
+ isRequired: false,
105
+ transformFunction: null
106
+ },
107
+ collapsible: {
108
+ classPropertyName: "collapsible",
109
+ publicName: "collapsible",
110
+ isSignal: true,
111
+ isRequired: false,
112
+ transformFunction: null
113
+ },
114
+ sidebarCollapsed: {
115
+ classPropertyName: "sidebarCollapsed",
116
+ publicName: "sidebarCollapsed",
117
+ isSignal: true,
118
+ isRequired: false,
119
+ transformFunction: null
120
+ }
121
+ },
122
+ outputs: { sidebarCollapsed: "sidebarCollapsedChange" },
123
+ host: {
124
+ properties: {
125
+ "class.ngb-layout-square": "!rounded()",
126
+ "class.ngb-layout-full-sidebar": "mode() === \"full-sidebar\"",
127
+ "class.ngb-layout-collapsible": "collapsible()",
128
+ "class.ngb-layout-sidebar-collapsed": "collapsible() && sidebarCollapsed()"
129
+ },
130
+ classAttribute: "ngb-layout"
131
+ },
132
+ queries: [{
133
+ propertyName: "brand",
134
+ first: true,
135
+ predicate: NgbBrand,
136
+ descendants: true,
137
+ isSignal: true
138
+ }],
139
+ ngImport: i0,
140
+ template: `
141
+ <ng-content select="ngb-navbar" />
142
+ <div class="container-fluid px-0">
143
+ <div class="row g-0 flex-nowrap">
144
+ <ng-content select="ngb-sidebar" />
145
+ <ng-content />
146
+ </div>
147
+ </div>
148
+ `,
149
+ isInline: true,
150
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
151
+ });
152
+ };
153
+ i0.ɵɵngDeclareClassMetadata({
154
+ minVersion: "12.0.0",
155
+ version: "22.2.3",
156
+ ngImport: i0,
157
+ type: NgbLayout,
158
+ decorators: [{
159
+ type: Component,
160
+ args: [{
161
+ selector: "ngb-layout",
162
+ template: `
163
+ <ng-content select="ngb-navbar" />
164
+ <div class="container-fluid px-0">
165
+ <div class="row g-0 flex-nowrap">
166
+ <ng-content select="ngb-sidebar" />
167
+ <ng-content />
168
+ </div>
169
+ </div>
170
+ `,
171
+ changeDetection: ChangeDetectionStrategy.OnPush,
172
+ host: {
173
+ class: "ngb-layout",
174
+ "[class.ngb-layout-square]": "!rounded()",
175
+ "[class.ngb-layout-full-sidebar]": "mode() === \"full-sidebar\"",
176
+ "[class.ngb-layout-collapsible]": "collapsible()",
177
+ "[class.ngb-layout-sidebar-collapsed]": "collapsible() && sidebarCollapsed()"
178
+ }
179
+ }]
180
+ }],
181
+ ctorParameters: () => [],
182
+ propDecorators: {
183
+ brand: [{
184
+ type: i0.ContentChild,
185
+ args: [i0.forwardRef(() => NgbBrand), {
186
+ descendants: true,
187
+ isSignal: true
188
+ }]
189
+ }],
190
+ rounded: [{
191
+ type: i0.Input,
192
+ args: [{
193
+ isSignal: true,
194
+ alias: "rounded",
195
+ required: false
196
+ }]
197
+ }],
198
+ mode: [{
199
+ type: i0.Input,
200
+ args: [{
201
+ isSignal: true,
202
+ alias: "mode",
203
+ required: false
204
+ }]
205
+ }],
206
+ collapsible: [{
207
+ type: i0.Input,
208
+ args: [{
209
+ isSignal: true,
210
+ alias: "collapsible",
211
+ required: false
212
+ }]
213
+ }],
214
+ sidebarCollapsed: [{
215
+ type: i0.Input,
216
+ args: [{
217
+ isSignal: true,
218
+ alias: "sidebarCollapsed",
219
+ required: false
220
+ }]
221
+ }, {
222
+ type: i0.Output,
223
+ args: ["sidebarCollapsedChange"]
224
+ }]
225
+ }
226
+ });
227
+ var NgbLayoutContent = class NgbLayoutContent {
228
+ static ɵfac = i0.ɵɵngDeclareFactory({
229
+ minVersion: "12.0.0",
230
+ version: "22.2.3",
231
+ ngImport: i0,
232
+ type: NgbLayoutContent,
233
+ deps: [],
234
+ target: i0.ɵɵFactoryTarget.Component
235
+ });
236
+ static ɵcmp = i0.ɵɵngDeclareComponent({
237
+ minVersion: "14.0.0",
238
+ version: "22.2.3",
239
+ type: NgbLayoutContent,
240
+ isStandalone: true,
241
+ selector: "ngb-layout-content",
242
+ host: { classAttribute: "ngb-layout-content col" },
243
+ ngImport: i0,
244
+ template: `
245
+ <main class="ngb-layout-main"><ng-content /></main>
246
+ <ng-content select="ngb-footer" />
247
+ `,
248
+ isInline: true,
249
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
250
+ });
251
+ };
252
+ i0.ɵɵngDeclareClassMetadata({
253
+ minVersion: "12.0.0",
254
+ version: "22.2.3",
255
+ ngImport: i0,
256
+ type: NgbLayoutContent,
257
+ decorators: [{
258
+ type: Component,
259
+ args: [{
260
+ selector: "ngb-layout-content",
261
+ template: `
262
+ <main class="ngb-layout-main"><ng-content /></main>
263
+ <ng-content select="ngb-footer" />
264
+ `,
265
+ changeDetection: ChangeDetectionStrategy.OnPush,
266
+ host: { class: "ngb-layout-content col" }
267
+ }]
268
+ }]
269
+ });
270
+ export { NgbBrand, NgbLayout, NgbLayoutContent };
271
+
272
+ //# sourceMappingURL=ngb-bootstrap-core-layout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngb-bootstrap-core-layout.mjs","names":[],"sources":["../../../../projects/core/layout/layout.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n TemplateRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n signal,\n} from '@angular/core';\n\nlet nextId = 0;\n\n/** Matches Bootstrap 6 `lg`, where the sidebar drawer turns into a fixed column. */\nconst DESKTOP = '(width >= 1024px)';\n\n/**\n * How `<ngb-layout>` divides the top of the page from `lg` up: `full-navbar` runs the navbar across\n * the whole width above the sidebar; `full-sidebar` runs the sidebar the whole height, with the\n * navbar beside it.\n */\nexport type NgbLayoutMode = 'full-navbar' | 'full-sidebar';\n\n/**\n * The brand (logo, name, version) of `<ngb-layout>`, as a template so it can be shown where the\n * mode puts it: at the start of the navbar, or from `lg` up in `full-sidebar` mode at the top of\n * the sidebar (back in the navbar while the sidebar is collapsed to its rail).\n *\n * ```html\n * <ng-template ngbBrand><a class=\"navbar-brand\" routerLink=\"/\">My app</a></ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[ngbBrand]' })\nexport class NgbBrand {\n readonly template = inject(TemplateRef);\n}\n\n/**\n * Page shell in the Taiga UI docs style, on the Bootstrap grid: a fixed `<ngb-navbar>`, an\n * `<ngb-sidebar>` column and an `<ngb-layout-content>` column inside a rounded window frame.\n * Below `lg` the sidebar is a drawer that the navbar's menu button opens.\n *\n * ```html\n * <ngb-layout>\n * <ng-template ngbBrand>…</ng-template>\n * <ngb-navbar>…</ngb-navbar>\n * <ngb-sidebar [items]=\"items\" />\n * <ngb-layout-content>\n * <router-outlet />\n * <ngb-footer>…</ngb-footer>\n * </ngb-layout-content>\n * </ngb-layout>\n * ```\n */\n@Component({\n selector: 'ngb-layout',\n template: `\n <ng-content select=\"ngb-navbar\" />\n <div class=\"container-fluid px-0\">\n <div class=\"row g-0 flex-nowrap\">\n <ng-content select=\"ngb-sidebar\" />\n <ng-content />\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ngb-layout',\n '[class.ngb-layout-square]': '!rounded()',\n '[class.ngb-layout-full-sidebar]': 'mode() === \"full-sidebar\"',\n '[class.ngb-layout-collapsible]': 'collapsible()',\n '[class.ngb-layout-sidebar-collapsed]': 'collapsible() && sidebarCollapsed()',\n },\n})\nexport class NgbLayout {\n /** Id of the sidebar drawer, for the menu button's `aria-controls`. */\n readonly sidebarId = `ngb-sidebar-${nextId++}`;\n /** Whether the sidebar drawer is open (below `lg` only; from `lg` up the sidebar is always shown). */\n readonly sidebarOpen = signal(false);\n /** Whether the viewport is `lg` or wider, where the sidebar is a column rather than a drawer. */\n readonly desktop = signal(false);\n /** The `ngbBrand` template, placed in the layout or its navbar. */\n readonly brand = contentChild(NgbBrand, { descendants: true });\n\n /** Round the corners of the frame and the sidebar, content and footer panels. */\n readonly rounded = input(true, { transform: booleanAttribute });\n /** Whether the navbar spans the full width or the sidebar the full height, from `lg` up. */\n readonly mode = input<NgbLayoutMode>('full-navbar');\n /**\n * Show the navbar's menu button from `lg` up too, to contract the sidebar to a rail of top-level\n * icons and expand it again.\n */\n readonly collapsible = input(false, { transform: booleanAttribute });\n /** Whether the sidebar is contracted to its icon rail (from `lg` up, when `collapsible`). */\n readonly sidebarCollapsed = model(false);\n\n /** Whether the sidebar is contracted right now: `collapsible`, collapsed and from `lg` up. */\n readonly sidebarRail = computed(\n () => this.desktop() && this.collapsible() && this.sidebarCollapsed(),\n );\n /** Whether the sidebar is shown in full: the open drawer below `lg`, the expanded column from `lg` up. */\n readonly sidebarExpanded = computed(() =>\n this.desktop() ? !this.sidebarRail() : this.sidebarOpen(),\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n if (typeof matchMedia !== 'function') return;\n const query = matchMedia(DESKTOP);\n const onChange = () => {\n this.desktop.set(query.matches);\n // Leaving the drawer open while resizing up to lg would keep the page modal.\n if (query.matches) this.closeSidebar();\n };\n onChange();\n query.addEventListener('change', onChange);\n destroyRef.onDestroy(() => query.removeEventListener('change', onChange));\n });\n }\n\n openSidebar(): void {\n this.sidebarOpen.set(true);\n }\n\n closeSidebar(): void {\n this.sidebarOpen.set(false);\n }\n\n /** Below `lg` opens or closes the drawer; from `lg` up contracts or expands a `collapsible` sidebar. */\n toggleSidebar(): void {\n if (this.desktop() && this.collapsible()) {\n this.sidebarCollapsed.update((collapsed) => !collapsed);\n } else {\n this.sidebarOpen.update((open) => !open);\n }\n }\n}\n\n/**\n * The content column of `<ngb-layout>`. Wraps its content in `<main>`; an `<ngb-footer>` inside it\n * is placed after `<main>`, at the bottom of the column.\n */\n@Component({\n selector: 'ngb-layout-content',\n template: `\n <main class=\"ngb-layout-main\"><ng-content /></main>\n <ng-content select=\"ngb-footer\" />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'ngb-layout-content col' },\n})\nexport class NgbLayoutContent {}\n"],"mappings":";;AAgBA,IAAI,SAAS;AAGb,MAAM,UAAU;AAmBhB,IAAa,WAAb,MAAa,SAAQ;CACV,WAAW,OAAO,WAAW;CAD3B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EADpB,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,wBAAuB,CAAE;;;AA0ChD,IAAa,YAAb,MAAa,UAAS;CAEX,YAAY,eAAe;CAE3B,cAAc,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE3B,UAAU,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEvB,QAAQ,aAAa,UAAQ;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,aAAa;CAAI,CAAA;CAGlD,UAAU,MAAM,MAAI;EA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utlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, computed, contentChild, inject, input } from "@angular/core";
4
+ import { NgbIcon } from "@ngb-bootstrap/core/icon";
5
+ import { NgbBrand, NgbLayout } from "@ngb-bootstrap/core/layout";
6
+ import { ngbIconHamburgerButton } from "@ngb-bootstrap/icons";
7
+ var NgbNavbar = class NgbNavbar {
8
+ layout = inject(NgbLayout, { optional: true });
9
+ menuIcon = ngbIconHamburgerButton;
10
+ ownBrand = contentChild(NgbBrand, ...ngDevMode ? [{ debugName: "ownBrand" }] : /* istanbul ignore next */ []);
11
+ brand = computed(() => this.layout?.brand() ?? this.ownBrand(), ...ngDevMode ? [{ debugName: "brand" }] : /* istanbul ignore next */ []);
12
+ menuLabel = input("Menu", ...ngDevMode ? [{ debugName: "menuLabel" }] : /* istanbul ignore next */ []);
13
+ static ɵfac = i0.ɵɵngDeclareFactory({
14
+ minVersion: "12.0.0",
15
+ version: "22.2.3",
16
+ ngImport: i0,
17
+ type: NgbNavbar,
18
+ deps: [],
19
+ target: i0.ɵɵFactoryTarget.Component
20
+ });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({
22
+ minVersion: "17.0.0",
23
+ version: "22.2.3",
24
+ type: NgbNavbar,
25
+ isStandalone: true,
26
+ selector: "ngb-navbar",
27
+ inputs: { menuLabel: {
28
+ classPropertyName: "menuLabel",
29
+ publicName: "menuLabel",
30
+ isSignal: true,
31
+ isRequired: false,
32
+ transformFunction: null
33
+ } },
34
+ host: {
35
+ attributes: { "role": "banner" },
36
+ classAttribute: "navbar ngb-navbar"
37
+ },
38
+ queries: [{
39
+ propertyName: "ownBrand",
40
+ first: true,
41
+ predicate: NgbBrand,
42
+ descendants: true,
43
+ isSignal: true
44
+ }],
45
+ ngImport: i0,
46
+ template: `
47
+ <div class="ngb-navbar-start">
48
+ @if (layout) {
49
+ <button
50
+ type="button"
51
+ class="btn btn-icon btn-text ngb-navbar-menu"
52
+ [attr.aria-label]="menuLabel()"
53
+ [attr.aria-controls]="layout.sidebarId"
54
+ [attr.aria-expanded]="layout.sidebarExpanded()"
55
+ (click)="layout.toggleSidebar()"
56
+ >
57
+ <ngb-icon [icon]="menuIcon" size="1.5rem" />
58
+ </button>
59
+ }
60
+ @if (brand(); as brand) {
61
+ <div class="ngb-navbar-brand"><ng-container *ngTemplateOutlet="brand.template" /></div>
62
+ }
63
+ <ng-content />
64
+ </div>
65
+ <div class="ngb-navbar-center"><ng-content select="[ngbNavbarCenter]" /></div>
66
+ <div class="ngb-navbar-end"><ng-content select="[ngbNavbarEnd]" /></div>
67
+ `,
68
+ isInline: true,
69
+ dependencies: [{
70
+ kind: "component",
71
+ type: NgbIcon,
72
+ selector: "ngb-icon",
73
+ inputs: [
74
+ "name",
75
+ "icon",
76
+ "theme",
77
+ "size",
78
+ "strokeWidth",
79
+ "label"
80
+ ]
81
+ }, {
82
+ kind: "directive",
83
+ type: NgTemplateOutlet,
84
+ selector: "[ngTemplateOutlet]",
85
+ inputs: [
86
+ "ngTemplateOutletContext",
87
+ "ngTemplateOutlet",
88
+ "ngTemplateOutletInjector"
89
+ ]
90
+ }],
91
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
92
+ });
93
+ };
94
+ i0.ɵɵngDeclareClassMetadata({
95
+ minVersion: "12.0.0",
96
+ version: "22.2.3",
97
+ ngImport: i0,
98
+ type: NgbNavbar,
99
+ decorators: [{
100
+ type: Component,
101
+ args: [{
102
+ selector: "ngb-navbar",
103
+ imports: [NgbIcon, NgTemplateOutlet],
104
+ template: `
105
+ <div class="ngb-navbar-start">
106
+ @if (layout) {
107
+ <button
108
+ type="button"
109
+ class="btn btn-icon btn-text ngb-navbar-menu"
110
+ [attr.aria-label]="menuLabel()"
111
+ [attr.aria-controls]="layout.sidebarId"
112
+ [attr.aria-expanded]="layout.sidebarExpanded()"
113
+ (click)="layout.toggleSidebar()"
114
+ >
115
+ <ngb-icon [icon]="menuIcon" size="1.5rem" />
116
+ </button>
117
+ }
118
+ @if (brand(); as brand) {
119
+ <div class="ngb-navbar-brand"><ng-container *ngTemplateOutlet="brand.template" /></div>
120
+ }
121
+ <ng-content />
122
+ </div>
123
+ <div class="ngb-navbar-center"><ng-content select="[ngbNavbarCenter]" /></div>
124
+ <div class="ngb-navbar-end"><ng-content select="[ngbNavbarEnd]" /></div>
125
+ `,
126
+ changeDetection: ChangeDetectionStrategy.OnPush,
127
+ host: {
128
+ class: "navbar ngb-navbar",
129
+ role: "banner"
130
+ }
131
+ }]
132
+ }],
133
+ propDecorators: {
134
+ ownBrand: [{
135
+ type: i0.ContentChild,
136
+ args: [i0.forwardRef(() => NgbBrand), { isSignal: true }]
137
+ }],
138
+ menuLabel: [{
139
+ type: i0.Input,
140
+ args: [{
141
+ isSignal: true,
142
+ alias: "menuLabel",
143
+ required: false
144
+ }]
145
+ }]
146
+ }
147
+ });
148
+ export { NgbNavbar };
149
+
150
+ //# sourceMappingURL=ngb-bootstrap-core-navbar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngb-bootstrap-core-navbar.mjs","names":[],"sources":["../../../../projects/core/navbar/navbar.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport { NgbIcon } from '@ngb-bootstrap/core/icon';\nimport { NgbBrand, NgbLayout } from '@ngb-bootstrap/core/layout';\nimport { ngbIconHamburgerButton } from '@ngb-bootstrap/icons';\n\n/**\n * Fixed top bar, built on Bootstrap 6 `.navbar`. Its content goes in three slots: the start\n * (default content, after an `ngbBrand` template if there is one), `[ngbNavbarCenter]` and\n * `[ngbNavbarEnd]`. Inside\n * `<ngb-layout>` it adds a menu button that opens the sidebar drawer below `lg`, and from `lg` up\n * contracts and expands the sidebar when the layout is `collapsible`.\n *\n * ```html\n * <ngb-navbar>\n * <a class=\"navbar-brand\" routerLink=\"/\">My app</a>\n * <div ngbNavbarCenter>…search…</div>\n * <div ngbNavbarEnd>…actions…</div>\n * </ngb-navbar>\n * ```\n */\n@Component({\n selector: 'ngb-navbar',\n imports: [NgbIcon, NgTemplateOutlet],\n template: `\n <div class=\"ngb-navbar-start\">\n @if (layout) {\n <button\n type=\"button\"\n class=\"btn btn-icon btn-text ngb-navbar-menu\"\n [attr.aria-label]=\"menuLabel()\"\n [attr.aria-controls]=\"layout.sidebarId\"\n [attr.aria-expanded]=\"layout.sidebarExpanded()\"\n (click)=\"layout.toggleSidebar()\"\n >\n <ngb-icon [icon]=\"menuIcon\" size=\"1.5rem\" />\n </button>\n }\n @if (brand(); as brand) {\n <div class=\"ngb-navbar-brand\"><ng-container *ngTemplateOutlet=\"brand.template\" /></div>\n }\n <ng-content />\n </div>\n <div class=\"ngb-navbar-center\"><ng-content select=\"[ngbNavbarCenter]\" /></div>\n <div class=\"ngb-navbar-end\"><ng-content select=\"[ngbNavbarEnd]\" /></div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'navbar ngb-navbar', role: 'banner' },\n})\nexport class NgbNavbar {\n protected readonly layout = inject(NgbLayout, { optional: true });\n protected readonly menuIcon = ngbIconHamburgerButton;\n private readonly ownBrand = contentChild(NgbBrand);\n protected readonly brand = computed(() => this.layout?.brand() ?? this.ownBrand());\n\n /** Accessible name of the menu button. */\n readonly menuLabel = input('Menu');\n}\n"],"mappings":";;;;;;AAwDA,IAAa,YAAb,MAAa,UAAS;CACD,SAAS,OAAO,WAAW,EAAE,UAAU,KAAI,CAAE;CAC7C,WAAW;CACb,WAAW,aAAa,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,QAAQ,eAAe,KAAK,QAAQ,MAAK,KAAM,KAAK,SAAQ,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzE,YAAY,MAAM,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+B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