@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,513 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, booleanAttribute, computed, inject, input } from "@angular/core";
3
+ import { NGB_I18N } from "@ngb-bootstrap/core";
4
+ import { NgbIcon } from "@ngb-bootstrap/core/icon";
5
+ var NgbButton = class NgbButton {
6
+ element = inject(ElementRef).nativeElement;
7
+ isButton = this.element.tagName === "BUTTON";
8
+ color = input("primary", ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
9
+ variant = input("solid", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
10
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
11
+ loading = input(false, {
12
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
13
+ transform: booleanAttribute
14
+ });
15
+ disabled = input(false, {
16
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
17
+ transform: booleanAttribute
18
+ });
19
+ block = input(false, {
20
+ ...ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {},
21
+ transform: booleanAttribute
22
+ });
23
+ type = input("button", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
24
+ inert = computed(() => this.disabled() || this.loading(), ...ngDevMode ? [{ debugName: "inert" }] : /* istanbul ignore next */ []);
25
+ extraClasses = () => "";
26
+ classes = computed(() => {
27
+ const variant = this.variant();
28
+ const classes = ["btn", variant === "link" ? "btn-link" : `btn-${variant}`];
29
+ classes.push(`theme-${this.color()}`);
30
+ if (this.size() !== "md") classes.push(`btn-${this.size()}`);
31
+ if (this.block()) classes.push("w-100");
32
+ if (!this.isButton && this.disabled()) classes.push("disabled");
33
+ return classes.join(" ") + this.extraClasses();
34
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
35
+ constructor() {
36
+ this.element.addEventListener("click", (event) => {
37
+ if (!this.inert()) return;
38
+ event.preventDefault();
39
+ event.stopImmediatePropagation();
40
+ }, true);
41
+ }
42
+ static ɵfac = i0.ɵɵngDeclareFactory({
43
+ minVersion: "12.0.0",
44
+ version: "22.2.3",
45
+ ngImport: i0,
46
+ type: NgbButton,
47
+ deps: [],
48
+ target: i0.ɵɵFactoryTarget.Component
49
+ });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({
51
+ minVersion: "17.0.0",
52
+ version: "22.2.3",
53
+ type: NgbButton,
54
+ isStandalone: true,
55
+ selector: "button[ngbButton], a[ngbButton]",
56
+ inputs: {
57
+ color: {
58
+ classPropertyName: "color",
59
+ publicName: "color",
60
+ isSignal: true,
61
+ isRequired: false,
62
+ transformFunction: null
63
+ },
64
+ variant: {
65
+ classPropertyName: "variant",
66
+ publicName: "variant",
67
+ isSignal: true,
68
+ isRequired: false,
69
+ transformFunction: null
70
+ },
71
+ size: {
72
+ classPropertyName: "size",
73
+ publicName: "size",
74
+ isSignal: true,
75
+ isRequired: false,
76
+ transformFunction: null
77
+ },
78
+ loading: {
79
+ classPropertyName: "loading",
80
+ publicName: "loading",
81
+ isSignal: true,
82
+ isRequired: false,
83
+ transformFunction: null
84
+ },
85
+ disabled: {
86
+ classPropertyName: "disabled",
87
+ publicName: "disabled",
88
+ isSignal: true,
89
+ isRequired: false,
90
+ transformFunction: null
91
+ },
92
+ block: {
93
+ classPropertyName: "block",
94
+ publicName: "block",
95
+ isSignal: true,
96
+ isRequired: false,
97
+ transformFunction: null
98
+ },
99
+ type: {
100
+ classPropertyName: "type",
101
+ publicName: "type",
102
+ isSignal: true,
103
+ isRequired: false,
104
+ transformFunction: null
105
+ }
106
+ },
107
+ host: { properties: {
108
+ "class": "classes()",
109
+ "attr.type": "isButton ? type() : null",
110
+ "attr.disabled": "isButton && disabled() ? \"\" : null",
111
+ "attr.aria-disabled": "inert() ? \"true\" : null",
112
+ "attr.aria-busy": "loading() ? \"true\" : null",
113
+ "attr.tabindex": "!isButton && inert() ? -1 : null"
114
+ } },
115
+ ngImport: i0,
116
+ template: `
117
+ @if (loading()) {
118
+ <span class="spinner-border spinner-sm" aria-hidden="true"></span>
119
+ }
120
+ <ng-content />
121
+ `,
122
+ isInline: true,
123
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
124
+ });
125
+ };
126
+ i0.ɵɵngDeclareClassMetadata({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.3",
129
+ ngImport: i0,
130
+ type: NgbButton,
131
+ decorators: [{
132
+ type: Component,
133
+ args: [{
134
+ selector: "button[ngbButton], a[ngbButton]",
135
+ template: `
136
+ @if (loading()) {
137
+ <span class="spinner-border spinner-sm" aria-hidden="true"></span>
138
+ }
139
+ <ng-content />
140
+ `,
141
+ changeDetection: ChangeDetectionStrategy.OnPush,
142
+ host: {
143
+ "[class]": "classes()",
144
+ "[attr.type]": "isButton ? type() : null",
145
+ "[attr.disabled]": "isButton && disabled() ? \"\" : null",
146
+ "[attr.aria-disabled]": "inert() ? \"true\" : null",
147
+ "[attr.aria-busy]": "loading() ? \"true\" : null",
148
+ "[attr.tabindex]": "!isButton && inert() ? -1 : null"
149
+ }
150
+ }]
151
+ }],
152
+ ctorParameters: () => [],
153
+ propDecorators: {
154
+ color: [{
155
+ type: i0.Input,
156
+ args: [{
157
+ isSignal: true,
158
+ alias: "color",
159
+ required: false
160
+ }]
161
+ }],
162
+ variant: [{
163
+ type: i0.Input,
164
+ args: [{
165
+ isSignal: true,
166
+ alias: "variant",
167
+ required: false
168
+ }]
169
+ }],
170
+ size: [{
171
+ type: i0.Input,
172
+ args: [{
173
+ isSignal: true,
174
+ alias: "size",
175
+ required: false
176
+ }]
177
+ }],
178
+ loading: [{
179
+ type: i0.Input,
180
+ args: [{
181
+ isSignal: true,
182
+ alias: "loading",
183
+ required: false
184
+ }]
185
+ }],
186
+ disabled: [{
187
+ type: i0.Input,
188
+ args: [{
189
+ isSignal: true,
190
+ alias: "disabled",
191
+ required: false
192
+ }]
193
+ }],
194
+ block: [{
195
+ type: i0.Input,
196
+ args: [{
197
+ isSignal: true,
198
+ alias: "block",
199
+ required: false
200
+ }]
201
+ }],
202
+ type: [{
203
+ type: i0.Input,
204
+ args: [{
205
+ isSignal: true,
206
+ alias: "type",
207
+ required: false
208
+ }]
209
+ }]
210
+ }
211
+ });
212
+ var NgbButtonGroup = class NgbButtonGroup {
213
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
214
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
215
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
216
+ divider = input(false, {
217
+ ...ngDevMode ? { debugName: "divider" } : /* istanbul ignore next */ {},
218
+ transform: booleanAttribute
219
+ });
220
+ classes = computed(() => {
221
+ const classes = [this.orientation() === "vertical" ? "btn-group-vertical" : "btn-group"];
222
+ if (this.size() !== "md") classes.push(`btn-group-${this.size()}`);
223
+ if (this.divider()) classes.push("btn-group-divider");
224
+ return classes.join(" ");
225
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
226
+ static ɵfac = i0.ɵɵngDeclareFactory({
227
+ minVersion: "12.0.0",
228
+ version: "22.2.3",
229
+ ngImport: i0,
230
+ type: NgbButtonGroup,
231
+ deps: [],
232
+ target: i0.ɵɵFactoryTarget.Component
233
+ });
234
+ static ɵcmp = i0.ɵɵngDeclareComponent({
235
+ minVersion: "17.1.0",
236
+ version: "22.2.3",
237
+ type: NgbButtonGroup,
238
+ isStandalone: true,
239
+ selector: "ngb-button-group",
240
+ inputs: {
241
+ label: {
242
+ classPropertyName: "label",
243
+ publicName: "label",
244
+ isSignal: true,
245
+ isRequired: false,
246
+ transformFunction: null
247
+ },
248
+ orientation: {
249
+ classPropertyName: "orientation",
250
+ publicName: "orientation",
251
+ isSignal: true,
252
+ isRequired: false,
253
+ transformFunction: null
254
+ },
255
+ size: {
256
+ classPropertyName: "size",
257
+ publicName: "size",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ divider: {
263
+ classPropertyName: "divider",
264
+ publicName: "divider",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ }
269
+ },
270
+ host: {
271
+ attributes: { "role": "group" },
272
+ properties: {
273
+ "class": "classes()",
274
+ "attr.aria-label": "label() || null"
275
+ }
276
+ },
277
+ ngImport: i0,
278
+ template: "<ng-content />",
279
+ isInline: true,
280
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
281
+ });
282
+ };
283
+ i0.ɵɵngDeclareClassMetadata({
284
+ minVersion: "12.0.0",
285
+ version: "22.2.3",
286
+ ngImport: i0,
287
+ type: NgbButtonGroup,
288
+ decorators: [{
289
+ type: Component,
290
+ args: [{
291
+ selector: "ngb-button-group",
292
+ template: "<ng-content />",
293
+ changeDetection: ChangeDetectionStrategy.OnPush,
294
+ host: {
295
+ role: "group",
296
+ "[class]": "classes()",
297
+ "[attr.aria-label]": "label() || null"
298
+ }
299
+ }]
300
+ }],
301
+ propDecorators: {
302
+ label: [{
303
+ type: i0.Input,
304
+ args: [{
305
+ isSignal: true,
306
+ alias: "label",
307
+ required: false
308
+ }]
309
+ }],
310
+ orientation: [{
311
+ type: i0.Input,
312
+ args: [{
313
+ isSignal: true,
314
+ alias: "orientation",
315
+ required: false
316
+ }]
317
+ }],
318
+ size: [{
319
+ type: i0.Input,
320
+ args: [{
321
+ isSignal: true,
322
+ alias: "size",
323
+ required: false
324
+ }]
325
+ }],
326
+ divider: [{
327
+ type: i0.Input,
328
+ args: [{
329
+ isSignal: true,
330
+ alias: "divider",
331
+ required: false
332
+ }]
333
+ }]
334
+ }
335
+ });
336
+ var NgbButtonX = class NgbButtonX {
337
+ i18n = inject(NGB_I18N);
338
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
339
+ ariaLabel = computed(() => this.label() ?? this.i18n.close, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
340
+ static ɵfac = i0.ɵɵngDeclareFactory({
341
+ minVersion: "12.0.0",
342
+ version: "22.2.3",
343
+ ngImport: i0,
344
+ type: NgbButtonX,
345
+ deps: [],
346
+ target: i0.ɵɵFactoryTarget.Directive
347
+ });
348
+ static ɵdir = i0.ɵɵngDeclareDirective({
349
+ minVersion: "17.1.0",
350
+ version: "22.2.3",
351
+ type: NgbButtonX,
352
+ isStandalone: true,
353
+ selector: "button[ngbButtonX]",
354
+ inputs: { label: {
355
+ classPropertyName: "label",
356
+ publicName: "label",
357
+ isSignal: true,
358
+ isRequired: false,
359
+ transformFunction: null
360
+ } },
361
+ host: {
362
+ attributes: { "type": "button" },
363
+ properties: { "attr.aria-label": "ariaLabel()" },
364
+ classAttribute: "btn-close"
365
+ },
366
+ ngImport: i0
367
+ });
368
+ };
369
+ i0.ɵɵngDeclareClassMetadata({
370
+ minVersion: "12.0.0",
371
+ version: "22.2.3",
372
+ ngImport: i0,
373
+ type: NgbButtonX,
374
+ decorators: [{
375
+ type: Directive,
376
+ args: [{
377
+ selector: "button[ngbButtonX]",
378
+ host: {
379
+ class: "btn-close",
380
+ type: "button",
381
+ "[attr.aria-label]": "ariaLabel()"
382
+ }
383
+ }]
384
+ }],
385
+ propDecorators: { label: [{
386
+ type: i0.Input,
387
+ args: [{
388
+ isSignal: true,
389
+ alias: "label",
390
+ required: false
391
+ }]
392
+ }] }
393
+ });
394
+ var NgbIconButton = class NgbIconButton extends NgbButton {
395
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
396
+ icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
397
+ name = input(...ngDevMode ? [void 0, { debugName: "name" }] : /* istanbul ignore next */ []);
398
+ extraClasses = () => " btn-icon";
399
+ static ɵfac = i0.ɵɵngDeclareFactory({
400
+ minVersion: "12.0.0",
401
+ version: "22.2.3",
402
+ ngImport: i0,
403
+ type: NgbIconButton,
404
+ deps: null,
405
+ target: i0.ɵɵFactoryTarget.Component
406
+ });
407
+ static ɵcmp = i0.ɵɵngDeclareComponent({
408
+ minVersion: "17.0.0",
409
+ version: "22.2.3",
410
+ type: NgbIconButton,
411
+ isStandalone: true,
412
+ selector: "button[ngbIconButton], a[ngbIconButton]",
413
+ inputs: {
414
+ label: {
415
+ classPropertyName: "label",
416
+ publicName: "label",
417
+ isSignal: true,
418
+ isRequired: true,
419
+ transformFunction: null
420
+ },
421
+ icon: {
422
+ classPropertyName: "icon",
423
+ publicName: "icon",
424
+ isSignal: true,
425
+ isRequired: false,
426
+ transformFunction: null
427
+ },
428
+ name: {
429
+ classPropertyName: "name",
430
+ publicName: "name",
431
+ isSignal: true,
432
+ isRequired: false,
433
+ transformFunction: null
434
+ }
435
+ },
436
+ host: { properties: { "attr.aria-label": "label()" } },
437
+ usesInheritance: true,
438
+ ngImport: i0,
439
+ template: `
440
+ @if (loading()) {
441
+ <span class="spinner-border spinner-sm" aria-hidden="true"></span>
442
+ } @else {
443
+ <ngb-icon [icon]="icon()" [name]="name()" />
444
+ }
445
+ `,
446
+ isInline: true,
447
+ dependencies: [{
448
+ kind: "component",
449
+ type: NgbIcon,
450
+ selector: "ngb-icon",
451
+ inputs: [
452
+ "name",
453
+ "icon",
454
+ "theme",
455
+ "size",
456
+ "strokeWidth",
457
+ "label"
458
+ ]
459
+ }],
460
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
461
+ });
462
+ };
463
+ i0.ɵɵngDeclareClassMetadata({
464
+ minVersion: "12.0.0",
465
+ version: "22.2.3",
466
+ ngImport: i0,
467
+ type: NgbIconButton,
468
+ decorators: [{
469
+ type: Component,
470
+ args: [{
471
+ selector: "button[ngbIconButton], a[ngbIconButton]",
472
+ imports: [NgbIcon],
473
+ template: `
474
+ @if (loading()) {
475
+ <span class="spinner-border spinner-sm" aria-hidden="true"></span>
476
+ } @else {
477
+ <ngb-icon [icon]="icon()" [name]="name()" />
478
+ }
479
+ `,
480
+ changeDetection: ChangeDetectionStrategy.OnPush,
481
+ host: { "[attr.aria-label]": "label()" }
482
+ }]
483
+ }],
484
+ propDecorators: {
485
+ label: [{
486
+ type: i0.Input,
487
+ args: [{
488
+ isSignal: true,
489
+ alias: "label",
490
+ required: true
491
+ }]
492
+ }],
493
+ icon: [{
494
+ type: i0.Input,
495
+ args: [{
496
+ isSignal: true,
497
+ alias: "icon",
498
+ required: false
499
+ }]
500
+ }],
501
+ name: [{
502
+ type: i0.Input,
503
+ args: [{
504
+ isSignal: true,
505
+ alias: "name",
506
+ required: false
507
+ }]
508
+ }]
509
+ }
510
+ });
511
+ export { NgbButton, NgbButtonGroup, NgbButtonX, NgbIconButton };
512
+
513
+ //# sourceMappingURL=ngb-bootstrap-core-button.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngb-bootstrap-core-button.mjs","names":[],"sources":["../../../../projects/core/button/button.ts","../../../../projects/core/button/button-group.ts","../../../../projects/core/button/button-x.ts","../../../../projects/core/button/icon-button.ts"],"sourcesContent":["// API adapted from Taiga UI (Apache-2.0), see NOTICE.\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { NgbThemeColor } from '@ngb-bootstrap/core';\n\nexport type NgbButtonVariant = 'solid' | 'outline' | 'subtle' | 'text' | 'link';\nexport type NgbButtonSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type NgbButtonType = 'button' | 'submit' | 'reset';\n\n/**\n * Button or link styled with Bootstrap 6 `.btn`. It enhances the native `<button>` or `<a>`, so\n * forms, `routerLink` and keyboard behaviour keep working.\n *\n * ```html\n * <button ngbButton color=\"primary\" variant=\"outline\" size=\"sm\" [loading]=\"saving()\">Save</button>\n * <a ngbButton href=\"/docs\" [disabled]=\"locked()\">Docs</a>\n * ```\n */\n@Component({\n // Attribute components enhance native elements.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[ngbButton], a[ngbButton]',\n template: `\n @if (loading()) {\n <span class=\"spinner-border spinner-sm\" aria-hidden=\"true\"></span>\n }\n <ng-content />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.type]': 'isButton ? type() : null',\n '[attr.disabled]': 'isButton && disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'inert() ? \"true\" : null',\n '[attr.aria-busy]': 'loading() ? \"true\" : null',\n '[attr.tabindex]': '!isButton && inert() ? -1 : null',\n },\n})\nexport class NgbButton {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n protected readonly isButton = this.element.tagName === 'BUTTON';\n\n /** Theme colour (Bootstrap `.theme-*`). */\n readonly color = input<NgbThemeColor>('primary');\n /** `solid` (default), `outline`, `subtle`, `text` or `link`. */\n readonly variant = input<NgbButtonVariant>('solid');\n /** `xs`, `sm`, `md` (default) or `lg`. */\n readonly size = input<NgbButtonSize>('md');\n /** Shows a spinner, sets `aria-busy` and ignores clicks. The button stays focusable. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Disables the button. A link gets `aria-disabled`, `tabindex=\"-1\"` and ignores clicks. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Stretches the button to the full width of its container. */\n readonly block = input(false, { transform: booleanAttribute });\n /** The `type` of a `<button>`. Defaults to `button`, so it does not submit a form by accident. */\n readonly type = input<NgbButtonType>('button');\n\n protected readonly inert = computed(() => this.disabled() || this.loading());\n\n /** Extra classes added by subclasses, with a leading space. */\n protected readonly extraClasses: () => string = () => '';\n\n protected readonly classes = computed(() => {\n const variant = this.variant();\n const classes = ['btn', variant === 'link' ? 'btn-link' : `btn-${variant}`];\n classes.push(`theme-${this.color()}`);\n if (this.size() !== 'md') classes.push(`btn-${this.size()}`);\n if (this.block()) classes.push('w-100');\n if (!this.isButton && this.disabled()) classes.push('disabled');\n return classes.join(' ') + this.extraClasses();\n });\n\n constructor() {\n // Capture phase, so it runs before the click handlers the consumer binds on the same element.\n this.element.addEventListener(\n 'click',\n (event) => {\n if (!this.inert()) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n },\n true,\n );\n }\n}\n","// API adapted from Taiga UI (Apache-2.0), see NOTICE.\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n input,\n} from '@angular/core';\nimport { NgbButtonSize } from './button';\n\nexport type NgbButtonGroupOrientation = 'horizontal' | 'vertical';\n\n/**\n * Joins buttons into one segmented control, built on Bootstrap 6 `.btn-group`.\n *\n * ```html\n * <ngb-button-group label=\"Text alignment\" size=\"sm\">\n * <button ngbButton variant=\"outline\">Left</button>\n * <button ngbButton variant=\"outline\">Right</button>\n * </ngb-button-group>\n * ```\n */\n@Component({\n selector: 'ngb-button-group',\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'group',\n '[class]': 'classes()',\n '[attr.aria-label]': 'label() || null',\n },\n})\nexport class NgbButtonGroup {\n /** Accessible name of the group. */\n readonly label = input<string>();\n /** `horizontal` (default) or `vertical`. */\n readonly orientation = input<NgbButtonGroupOrientation>('horizontal');\n /** Size applied to every button in the group: `xs`, `sm`, `md` (default) or `lg`. */\n readonly size = input<NgbButtonSize>('md');\n /** Draws a thin divider between buttons, for variants without a border. */\n readonly divider = input(false, { transform: booleanAttribute });\n\n protected readonly classes = computed(() => {\n const classes = [this.orientation() === 'vertical' ? 'btn-group-vertical' : 'btn-group'];\n if (this.size() !== 'md') classes.push(`btn-group-${this.size()}`);\n if (this.divider()) classes.push('btn-group-divider');\n return classes.join(' ');\n });\n}\n","// API adapted from Taiga UI (Apache-2.0), see NOTICE.\nimport { Directive, computed, inject, input } from '@angular/core';\nimport { NGB_I18N } from '@ngb-bootstrap/core';\n\n/**\n * Close button built on Bootstrap 6 `.btn-close`, for dialogs, alerts and drawers.\n *\n * ```html\n * <button ngbButtonX (click)=\"dismiss()\"></button>\n * ```\n */\n@Directive({\n selector: 'button[ngbButtonX]',\n host: {\n class: 'btn-close',\n type: 'button',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class NgbButtonX {\n private readonly i18n = inject(NGB_I18N);\n\n /** Accessible name. Defaults to the `close` string of `NGB_I18N` (\"Close\" in English). */\n readonly label = input<string>();\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.i18n.close);\n}\n","// API adapted from Taiga UI (Apache-2.0), see NOTICE.\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgbIcon } from '@ngb-bootstrap/core/icon';\nimport type { NgbIconDefinition, NgbIconName } from '@ngb-bootstrap/icons';\nimport { NgbButton } from './button';\n\n/**\n * Square button that shows only an icon, built on `.btn` with `.btn-icon`. `label` is required: it\n * becomes the `aria-label`, since there is no visible text.\n *\n * ```html\n * <button ngbIconButton [icon]=\"ngbIconSearch\" label=\"Search\" variant=\"subtle\"></button>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[ngbIconButton], a[ngbIconButton]',\n imports: [NgbIcon],\n template: `\n @if (loading()) {\n <span class=\"spinner-border spinner-sm\" aria-hidden=\"true\"></span>\n } @else {\n <ngb-icon [icon]=\"icon()\" [name]=\"name()\" />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-label]': 'label()',\n },\n})\nexport class NgbIconButton extends NgbButton {\n /** Accessible name of the button. */\n readonly label = input.required<string>();\n /** Icon definition from `@ngb-bootstrap/icons`. Takes precedence over `name`. */\n readonly icon = input<NgbIconDefinition>();\n /** Name of an icon registered with `provideNgbIcons`. */\n readonly name = input<NgbIconName | (string & {})>();\n\n protected override readonly extraClasses = () => ' btn-icon';\n}\n"],"mappings":";;;;AA6CA,IAAa,YAAb,MAAa,UAAS;CACH,UAAU,OAAgC,UAAU,CAAC,CAAC;CACpD,WAAW,KAAK,QAAQ,YAAY;CAG9C,QAAQ,MAAqB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEvC,UAAU,MAAwB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE1C,OAAO,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEjC,UAAU,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAEpD,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAErD,QAAQ,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAElD,OAAO,MAAqB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAE3B,QAAQ,eAAe,KAAK,SAAQ,KAAM,KAAK,QAAO,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzD,qBAAmC;CAEnC,UAAU,eAAc;EACzC,MAAM,UAAU,KAAK,QAAO;EAC5B,MAAM,UAAU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