@open-rlb/ng-bootstrap 3.3.37 → 3.3.38

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-rlb/ng-bootstrap",
3
- "version": "3.3.37",
3
+ "version": "3.3.38",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=21.0.0 <22.0.0",
6
6
  "@angular/common": ">=21.0.0 <22.0.0",
@@ -21,19 +21,60 @@ type TextAlignment = 'left' | 'center' | 'right';
21
21
 
22
22
  ```html
23
23
  <!-- Basic button -->
24
- <button rlb-button color="primary" size="md">Click me</button>
25
- <button rlb-button color="danger" outline>Delete</button>
26
- <button rlb-button color="secondary" [disabled]="true">Disabled</button>
27
- <a rlb-button color="info" isLink>Link</a>
24
+ <button
25
+ rlb-button
26
+ color="primary"
27
+ size="md"
28
+ >
29
+ Click me
30
+ </button>
31
+ <button
32
+ rlb-button
33
+ color="danger"
34
+ outline
35
+ >
36
+ Delete
37
+ </button>
38
+ <button
39
+ rlb-button
40
+ color="secondary"
41
+ [disabled]="true"
42
+ >
43
+ Disabled
44
+ </button>
45
+ <a
46
+ rlb-button
47
+ color="info"
48
+ isLink
49
+ >
50
+ Link
51
+ </a>
28
52
 
29
53
  <!-- Button group -->
30
- <rlb-button-group orientation="horizontal" size="md">
31
- <button rlb-button color="primary">A</button>
32
- <button rlb-button color="primary">B</button>
54
+ <rlb-button-group
55
+ orientation="horizontal"
56
+ size="md"
57
+ >
58
+ <button
59
+ rlb-button
60
+ color="primary"
61
+ >
62
+ A
63
+ </button>
64
+ <button
65
+ rlb-button
66
+ color="primary"
67
+ >
68
+ B
69
+ </button>
33
70
  </rlb-button-group>
34
71
 
35
72
  <!-- FAB (Floating Action Button) -->
36
- <rlb-fab color="primary" size="md" position="br">
73
+ <rlb-fab
74
+ color="primary"
75
+ size="md"
76
+ position="br"
77
+ >
37
78
  <i class="bi bi-plus"></i>
38
79
  </rlb-fab>
39
80
  ```
@@ -47,7 +88,11 @@ type TextAlignment = 'left' | 'center' | 'right';
47
88
 
48
89
  ```html
49
90
  <rlb-alert color="success">Operation successful.</rlb-alert>
50
- <rlb-alert color="danger" [dismissible]="true" (dismissed)="onDismiss()">
91
+ <rlb-alert
92
+ color="danger"
93
+ [dismissible]="true"
94
+ (dismissed)="onDismiss()"
95
+ >
51
96
  An error occurred!
52
97
  </rlb-alert>
53
98
  ```
@@ -60,9 +105,26 @@ type TextAlignment = 'left' | 'center' | 'right';
60
105
  ## Badges
61
106
 
62
107
  ```html
63
- <span rlb-badge color="primary">New</span>
64
- <span rlb-badge color="success" [pill]="true">Active</span>
65
- <span rlb-badge color="danger" [border]="true">3</span>
108
+ <span
109
+ rlb-badge
110
+ color="primary"
111
+ >
112
+ New
113
+ </span>
114
+ <span
115
+ rlb-badge
116
+ color="success"
117
+ [pill]="true"
118
+ >
119
+ Active
120
+ </span>
121
+ <span
122
+ rlb-badge
123
+ color="danger"
124
+ [border]="true"
125
+ >
126
+ 3
127
+ </span>
66
128
  ```
67
129
 
68
130
  **Inputs:** `color`, `pill`, `border`, `hidden-text`, `class`, `badge-text-color`
@@ -72,9 +134,22 @@ type TextAlignment = 'left' | 'center' | 'right';
72
134
  ## Avatar
73
135
 
74
136
  ```html
75
- <rlb-avatar [size]="48" shape="circle" src="/assets/user.png"></rlb-avatar>
76
- <rlb-avatar [size]="40" shape="round">AB</rlb-avatar>
77
- <rlb-avatar [size]="56" shape="square" src="/assets/logo.png"></rlb-avatar>
137
+ <rlb-avatar
138
+ [size]="48"
139
+ shape="circle"
140
+ src="/assets/user.png"
141
+ ></rlb-avatar>
142
+ <rlb-avatar
143
+ [size]="40"
144
+ shape="round"
145
+ >
146
+ AB
147
+ </rlb-avatar>
148
+ <rlb-avatar
149
+ [size]="56"
150
+ shape="square"
151
+ src="/assets/logo.png"
152
+ ></rlb-avatar>
78
153
  ```
79
154
 
80
155
  **Inputs:** `size` (px number), `shape` ('circle'|'round'|'square'), `src`, `class`
@@ -84,7 +159,10 @@ type TextAlignment = 'left' | 'center' | 'right';
84
159
  ## Cards
85
160
 
86
161
  ```html
87
- <rlb-card align="left" background="light">
162
+ <rlb-card
163
+ align="left"
164
+ background="light"
165
+ >
88
166
  <rlb-card-header>Card Title</rlb-card-header>
89
167
  <rlb-card-image src="/img.png"></rlb-card-image>
90
168
  <rlb-card-body>
@@ -105,7 +183,11 @@ type TextAlignment = 'left' | 'center' | 'right';
105
183
  ## Accordion
106
184
 
107
185
  ```html
108
- <rlb-accordion [flush]="false" [always-open]="false" [card-style]="true">
186
+ <rlb-accordion
187
+ [flush]="false"
188
+ [always-open]="false"
189
+ [card-style]="true"
190
+ >
109
191
  <rlb-accordion-item>
110
192
  <ng-template rlb-accordion-header>Section 1</ng-template>
111
193
  <ng-template rlb-accordion-body>Content 1</ng-template>
@@ -124,10 +206,19 @@ type TextAlignment = 'left' | 'center' | 'right';
124
206
  ## Tabs
125
207
 
126
208
  ```html
127
- <rlb-tabs view="tab" [vertical]="false" fill="fill">
209
+ <rlb-tabs
210
+ view="tab"
211
+ [vertical]="false"
212
+ fill="fill"
213
+ >
128
214
  <rlb-tab title="Tab 1">Content for tab 1</rlb-tab>
129
215
  <rlb-tab title="Tab 2">Content for tab 2</rlb-tab>
130
- <rlb-tab title="Tab 3" [disabled]="true">Disabled</rlb-tab>
216
+ <rlb-tab
217
+ title="Tab 3"
218
+ [disabled]="true"
219
+ >
220
+ Disabled
221
+ </rlb-tab>
131
222
  </rlb-tabs>
132
223
  ```
133
224
 
@@ -191,11 +282,32 @@ and gate `Next` on the current step's validity. Often embedded in a modal (see t
191
282
  </rlb-carousel>
192
283
  </div>
193
284
 
194
- <button rlb-button outline [disabled]="page() === 0" (click)="prev()">Back</button>
285
+ <button
286
+ rlb-button
287
+ outline
288
+ [disabled]="page() === 0"
289
+ (click)="prev()"
290
+ >
291
+ Back
292
+ </button>
195
293
  @if (page() < count() - 1) {
196
- <button rlb-button color="primary" [disabled]="currentStepInvalid()" (click)="next()">Next</button>
294
+ <button
295
+ rlb-button
296
+ color="primary"
297
+ [disabled]="currentStepInvalid()"
298
+ (click)="next()"
299
+ >
300
+ Next
301
+ </button>
197
302
  } @else {
198
- <button rlb-button color="success" [disabled]="form.invalid" (click)="onFinish()">Finish</button>
303
+ <button
304
+ rlb-button
305
+ color="success"
306
+ [disabled]="form.invalid"
307
+ (click)="onFinish()"
308
+ >
309
+ Finish
310
+ </button>
199
311
  }
200
312
  ```
201
313
 
@@ -240,10 +352,26 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
240
352
 
241
353
  ```html
242
354
  <rlb-dropdown direction="down">
243
- <button rlb-button color="primary" rlb-dropdown>Actions</button>
355
+ <button
356
+ rlb-button
357
+ color="primary"
358
+ rlb-dropdown
359
+ >
360
+ Actions
361
+ </button>
244
362
  <div rlb-dropdown-menu>
245
- <a class="dropdown-item" href="#">Option 1</a>
246
- <a class="dropdown-item" href="#">Option 2</a>
363
+ <a
364
+ class="dropdown-item"
365
+ href="#"
366
+ >
367
+ Option 1
368
+ </a>
369
+ <a
370
+ class="dropdown-item"
371
+ href="#"
372
+ >
373
+ Option 2
374
+ </a>
247
375
  </div>
248
376
  </rlb-dropdown>
249
377
  ```
@@ -255,7 +383,10 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
255
383
  ## Pagination
256
384
 
257
385
  ```html
258
- <rlb-pagination size="md" alignment="center">
386
+ <rlb-pagination
387
+ size="md"
388
+ alignment="center"
389
+ >
259
390
  <rlb-pagination-item [active]="true">1</rlb-pagination-item>
260
391
  <rlb-pagination-item>2</rlb-pagination-item>
261
392
  </rlb-pagination>
@@ -268,14 +399,32 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
268
399
  ## Navigation (Navbar + Sidebar)
269
400
 
270
401
  ```html
271
- <rlb-navbar color="primary" [dark]="true" expand="lg" placement="fixed-top">
272
- <a rlb-navbar-brand href="/">MyApp</a>
402
+ <rlb-navbar
403
+ color="primary"
404
+ [dark]="true"
405
+ expand="lg"
406
+ placement="fixed-top"
407
+ >
408
+ <a
409
+ rlb-navbar-brand
410
+ href="/"
411
+ >
412
+ MyApp
413
+ </a>
273
414
  <rlb-navbar-items>
274
- <a class="nav-link" routerLink="/home">Home</a>
415
+ <a
416
+ class="nav-link"
417
+ routerLink="/home"
418
+ >
419
+ Home
420
+ </a>
275
421
  </rlb-navbar-items>
276
422
  </rlb-navbar>
277
423
 
278
- <rlb-sidebar [dark]="true" [rounded]="false">
424
+ <rlb-sidebar
425
+ [dark]="true"
426
+ [rounded]="false"
427
+ >
279
428
  <rlb-sidebar-item routerLink="/dashboard">Dashboard</rlb-sidebar-item>
280
429
  <rlb-sidebar-item routerLink="/settings">Settings</rlb-sidebar-item>
281
430
  </rlb-sidebar>
@@ -290,8 +439,16 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
290
439
 
291
440
  ```html
292
441
  <!-- Spinner -->
293
- <rlb-spinner style="border" color="primary" size="md"></rlb-spinner>
294
- <rlb-spinner style="grow" color="success" size="sm"></rlb-spinner>
442
+ <rlb-spinner
443
+ style="border"
444
+ color="primary"
445
+ size="md"
446
+ ></rlb-spinner>
447
+ <rlb-spinner
448
+ style="grow"
449
+ color="success"
450
+ size="sm"
451
+ ></rlb-spinner>
295
452
 
296
453
  <!-- Progress bar -->
297
454
  <rlb-progress
@@ -304,7 +461,10 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
304
461
  ></rlb-progress>
305
462
 
306
463
  <!-- Infinite progress -->
307
- <rlb-progress [infinite]="true" color="info"></rlb-progress>
464
+ <rlb-progress
465
+ [infinite]="true"
466
+ color="info"
467
+ ></rlb-progress>
308
468
  ```
309
469
 
310
470
  **Spinner inputs:** `style` ('border'|'grow'), `color`, `size`
@@ -312,6 +472,85 @@ next() { this.page.update(p => Math.min(this.count() - 1, p + 1)); }
312
472
 
313
473
  ---
314
474
 
475
+ ## Placeholders (skeletons)
476
+
477
+ Skeleton loading state for content that hasn't loaded yet. Use `rlb-placeholder-text` for
478
+ quick multi-line text blocks, or `rlb-placeholder` + `rlb-placeholder-line` for custom layouts
479
+ (cards, stat rows). Toggle with an `@if (loading())` block — render the skeleton while loading,
480
+ the real content otherwise.
481
+
482
+ ```html
483
+ <!-- Quick multi-line text skeleton -->
484
+ <rlb-placeholder-text
485
+ [lines]="3"
486
+ animation="glow"
487
+ />
488
+
489
+ <!-- Per-line widths: pass a string[] (falls back to 100% past the end) -->
490
+ <rlb-placeholder-text
491
+ [lines]="3"
492
+ [width]="['80%', '100%', '60%']"
493
+ animation="glow"
494
+ />
495
+
496
+ <!-- Custom layout: container + individual lines for full control -->
497
+ <rlb-placeholder animation="glow">
498
+ <rlb-placeholder-line
499
+ width="40%"
500
+ height="28px"
501
+ />
502
+ <rlb-placeholder-line width="100%" />
503
+ <rlb-placeholder-line
504
+ width="80%"
505
+ color="primary"
506
+ size="sm"
507
+ />
508
+ <rlb-placeholder-line
509
+ width="60%"
510
+ [rounded]="false"
511
+ />
512
+ </rlb-placeholder>
513
+
514
+ <!-- Skeleton-style any element via the directive -->
515
+ <span
516
+ rlb-placeholder
517
+ placeholder-animation="glow"
518
+ style="width: 6rem"
519
+ >
520
+ &nbsp;
521
+ </span>
522
+ ```
523
+
524
+ Common pattern — a fixed number of skeleton rows (e.g. matching a table page size):
525
+
526
+ ```html
527
+ <rlb-placeholder animation="glow">
528
+ @for (line of [].constructor(pageSize()); track $index) {
529
+ <rlb-placeholder-line width="100%" />
530
+ }
531
+ </rlb-placeholder>
532
+ ```
533
+
534
+ **`rlb-placeholder`** (container, applies the animation to children)
535
+ Inputs: `animation` ('glow' | 'wave' | 'none', default 'none')
536
+
537
+ **`rlb-placeholder-line`** (one skeleton bar; renders as a block with bottom margin)
538
+ Inputs: `width` (CSS string, default '100%'), `height` (CSS string, default '1.5rem'),
539
+ `size` ('xs' | 'sm' | 'md' | 'lg', default 'md'), `color` (Bootstrap bg name, default 'secondary'),
540
+ `rounded` (boolean, default `true`)
541
+
542
+ **`rlb-placeholder-text`** (convenience: N lines in a `rlb-placeholder` for you)
543
+ Inputs: `lines` (default 1), `width` (string **or** string[] for per-line widths, default '100%'),
544
+ `animation`, `size`, `color`, `height`, `rounded` — same meaning/defaults as above
545
+
546
+ **`[rlb-placeholder]`** (directive to skeletonize any element)
547
+ Inputs (aliased): `placeholder-color` (Color), `placeholder-size` ('xs'|'sm'|'md'|'lg'),
548
+ `placeholder-animation` ('glow' | 'fade' | 'none')
549
+
550
+ > Boolean inputs like `rounded` need a binding: `[rounded]="false"`, not a bare `rounded` attribute.
551
+
552
+ ---
553
+
315
554
  ## Toast
316
555
 
317
556
  ```typescript
@@ -328,7 +567,14 @@ showSuccess() {
328
567
  ## Tooltip
329
568
 
330
569
  ```html
331
- <button rlb-button rlb-tooltip title="Helpful tip" placement="top">Hover me</button>
570
+ <button
571
+ rlb-button
572
+ rlb-tooltip
573
+ title="Helpful tip"
574
+ placement="top"
575
+ >
576
+ Hover me
577
+ </button>
332
578
  ```
333
579
 
334
580
  ---
@@ -337,12 +583,29 @@ showSuccess() {
337
583
 
338
584
  ```html
339
585
  <!-- Collapse -->
340
- <button rlb-button rlb-collapse-toggle target="myCollapse">Toggle</button>
586
+ <button
587
+ rlb-button
588
+ rlb-collapse-toggle
589
+ target="myCollapse"
590
+ >
591
+ Toggle
592
+ </button>
341
593
  <rlb-collapse id="myCollapse">Hidden content</rlb-collapse>
342
594
 
343
595
  <!-- Offcanvas -->
344
- <button rlb-button rlb-offcanvas-toggle target="myPanel">Open Panel</button>
345
- <rlb-offcanvas id="myPanel" placement="start">Panel content</rlb-offcanvas>
596
+ <button
597
+ rlb-button
598
+ rlb-offcanvas-toggle
599
+ target="myPanel"
600
+ >
601
+ Open Panel
602
+ </button>
603
+ <rlb-offcanvas
604
+ id="myPanel"
605
+ placement="start"
606
+ >
607
+ Panel content
608
+ </rlb-offcanvas>
346
609
  ```
347
610
 
348
611
  ---
@@ -353,12 +616,13 @@ showSuccess() {
353
616
  import { RlbBootstrapModule } from '@open-rlb/ng-bootstrap';
354
617
 
355
618
  @NgModule({
356
- imports: [RlbBootstrapModule]
619
+ imports: [RlbBootstrapModule],
357
620
  })
358
621
  export class AppModule {}
359
622
  ```
360
623
 
361
624
  Or import individual components for standalone:
625
+
362
626
  ```typescript
363
627
  import { ButtonComponent, AlertComponent, CardComponent } from '@open-rlb/ng-bootstrap';
364
628
  ```