@stackline/angular-multiselect-dropdown 2.0.4 → 4.0.1

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/README.md CHANGED
@@ -6,13 +6,13 @@
6
6
  [![npm downloads](https://img.shields.io/npm/dt/@stackline/angular-multiselect-dropdown.svg?style=flat-square)](https://www.npmjs.com/package/@stackline/angular-multiselect-dropdown)
7
7
  [![npm monthly](https://img.shields.io/npm/dm/@stackline/angular-multiselect-dropdown.svg?style=flat-square)](https://www.npmjs.com/package/@stackline/angular-multiselect-dropdown)
8
8
  [![license](https://img.shields.io/npm/l/@stackline/angular-multiselect-dropdown.svg?style=flat-square)](https://github.com/alexandroit/angular-multiselect-dropdown/blob/master/LICENSE)
9
- [![Angular 2](https://img.shields.io/badge/Angular-2.x-red?style=flat-square&logo=angular)](https://alexandro.net/docs/angular/multiselect/angular-2/)
9
+ [![Angular 4](https://img.shields.io/badge/Angular-4.x-red?style=flat-square&logo=angular)](https://alexandro.net/docs/angular/multiselect/angular-4/)
10
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-2.4-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org)
11
11
  [![GitHub stars](https://img.shields.io/github/stars/alexandroit/angular-multiselect-dropdown.svg?style=flat-square)](https://github.com/alexandroit/angular-multiselect-dropdown/stargazers)
12
12
 
13
- **[Documentation & Live Demos](https://alexandro.net/docs/angular/multiselect/)** | **[Angular 2 Demo](https://alexandro.net/docs/angular/multiselect/angular-2/)** | **[npm](https://www.npmjs.com/package/@stackline/angular-multiselect-dropdown)** | **[Issues](https://github.com/alexandroit/angular-multiselect-dropdown/issues)** | **[Repository](https://github.com/alexandroit/angular-multiselect-dropdown)**
13
+ **[Documentation & Live Demos](https://alexandro.net/docs/angular/multiselect/)** | **[Angular 4 Demo](https://alexandro.net/docs/angular/multiselect/angular-4/)** | **[npm](https://www.npmjs.com/package/@stackline/angular-multiselect-dropdown)** | **[Issues](https://github.com/alexandroit/angular-multiselect-dropdown/issues)** | **[Repository](https://github.com/alexandroit/angular-multiselect-dropdown)**
14
14
 
15
- **Latest tested npm release:** `2.0.4` for Angular `2.x`
15
+ **Latest tested npm release:** `4.0.1` for Angular `4.x`
16
16
 
17
17
  ---
18
18
 
@@ -24,15 +24,15 @@
24
24
 
25
25
  The original `angular2-multiselect-dropdown` package became difficult to keep current across multiple Angular generations. This maintained package keeps the classic API and template structure intact, introduces the new primary selector `<angular-multiselect>`, preserves the legacy alias `<angular2-multiselect>`, and publishes the project line by line so older applications can keep a predictable upgrade path.
26
26
 
27
- The repository contains the full documentation matrix from Angular 2 through Angular 21. The current public npm release is `2.0.4` for Angular 2.x applications.
27
+ The repository contains the full documentation matrix from Angular 2 through Angular 21. The current public npm release is `4.0.1` for Angular 4.x applications.
28
28
 
29
- The Angular 2 package is compatible with Angular 2.x and was tested in a real Angular 2.4.10 application before publication.
29
+ The Angular 4 package is compatible with Angular 4.x and was tested in a real Angular 4.4.7 application before npm publication.
30
30
 
31
31
  ## Features
32
32
 
33
33
  | Feature | Supported |
34
34
  | :--- | :---: |
35
- | Angular 2 tested published release line | ✅ |
35
+ | Angular 4 tested published release line | ✅ |
36
36
  | Multi-select and single-select modes | ✅ |
37
37
  | Search and filter | ✅ |
38
38
  | Group by field | ✅ |
@@ -43,7 +43,7 @@ The Angular 2 package is compatible with Angular 2.x and was tested in a real An
43
43
  | Lazy loading and remote-data hooks | ✅ |
44
44
  | Theming via bundled CSS/SCSS | ✅ |
45
45
  | Primary selector `<angular-multiselect>` | ✅ |
46
- | Legacy selector `<angular2-multiselect>` | ✅ |
46
+ | Legacy compatibility alias `<angular2-multiselect>` | ✅ |
47
47
  | Versioned docs builds per Angular line | ✅ |
48
48
 
49
49
  ## Table of Contents
@@ -54,19 +54,20 @@ The Angular 2 package is compatible with Angular 2.x and was tested in a real An
54
54
  4. [Setup](#setup)
55
55
  5. [Custom CSS and SCSS Themes](#custom-css-and-scss-themes)
56
56
  6. [Basic Usage](#basic-usage)
57
- 7. [Custom Templates](#custom-templates)
58
- 8. [Forms Integration](#forms-integration)
59
- 9. [Lazy Loading and Remote Data](#lazy-loading-and-remote-data)
60
- 10. [Events](#events)
61
- 11. [Run Locally](#run-locally)
62
- 12. [License](#license)
57
+ 7. [Official Angular 4 Test Matrix](#official-angular-4-test-matrix)
58
+ 8. [Custom Templates](#custom-templates)
59
+ 9. [Forms Integration](#forms-integration)
60
+ 10. [Lazy Loading and Remote Data](#lazy-loading-and-remote-data)
61
+ 11. [Events](#events)
62
+ 12. [Run Locally](#run-locally)
63
+ 13. [License](#license)
63
64
 
64
65
  ## Rename Note
65
66
 
66
67
  - new package: `@stackline/angular-multiselect-dropdown`
67
68
  - previous package: `@stackline/angular2-multiselect-dropdown`
68
69
  - primary selector: `<angular-multiselect>`
69
- - legacy alias still accepted: `<angular2-multiselect>`
70
+ - legacy alias still accepted only for compatibility: `<angular2-multiselect>`
70
71
 
71
72
  ## Angular Version Compatibility
72
73
 
@@ -98,10 +99,10 @@ Each package family only installs on its matching Angular family. Framework majo
98
99
  ## Installation
99
100
 
100
101
  ```bash
101
- npm install @stackline/angular-multiselect-dropdown@2.0.4
102
+ npm install @stackline/angular-multiselect-dropdown@4.0.1 --save-exact
102
103
  ```
103
104
 
104
- Install `2.0.4` for Angular 2.x applications. This patch keeps the tested Angular 2 behavior and updates the published README, package metadata, and documentation links.
105
+ Install `4.0.1` for Angular 4.x applications. This line keeps the tested Angular 4 behavior, makes `<angular-multiselect>` the documented standard selector, and keeps `<angular2-multiselect>` only as a legacy compatibility alias.
105
106
 
106
107
  ## Setup
107
108
 
@@ -155,20 +156,30 @@ Use the `css` file when you want a plain compiled starter that can be copied and
155
156
 
156
157
  ```ts
157
158
  dropdownList = [
158
- { id: 1, itemName: 'India' },
159
- { id: 2, itemName: 'Singapore' },
160
- { id: 3, itemName: 'Australia' },
161
- { id: 4, itemName: 'Canada' }
159
+ { id: 1, itemName: 'Brazil' },
160
+ { id: 2, itemName: 'Canada' },
161
+ { id: 3, itemName: 'Portugal' },
162
+ { id: 4, itemName: 'United States' },
163
+ { id: 5, itemName: 'Argentina' },
164
+ { id: 6, itemName: 'Germany' },
165
+ { id: 7, itemName: 'Japan' },
166
+ { id: 8, itemName: 'South Africa' }
162
167
  ];
163
168
 
164
- selectedItems = [{ id: 2, itemName: 'Singapore' }];
169
+ selectedItems = [{ id: 2, itemName: 'Canada' }];
165
170
 
166
171
  dropdownSettings = {
167
172
  singleSelection: false,
168
- text: 'Select Countries',
169
- selectAllText: 'Select All',
170
- unSelectAllText: 'UnSelect All',
173
+ text: 'Classic basic',
174
+ selectAllText: 'Select all',
175
+ unSelectAllText: 'Clear all',
171
176
  enableSearchFilter: true,
177
+ searchPlaceholderText: 'Search',
178
+ badgeShowLimit: 4,
179
+ maxHeight: 260,
180
+ showCheckbox: true,
181
+ noDataLabel: 'No data',
182
+ theme: 'classic',
172
183
  tagToBody: false
173
184
  };
174
185
  ```
@@ -185,6 +196,41 @@ dropdownSettings = {
185
196
  </angular-multiselect>
186
197
  ```
187
198
 
199
+ ## Official Angular 4 Test Matrix
200
+
201
+ The published Angular 4 release was tested in a real Angular `4.4.7` application with `@stackline/angular-multiselect-dropdown@4.0.1`. The docs now use the same examples from that test app.
202
+
203
+ Switch between skins through the settings object:
204
+
205
+ ```ts
206
+ settings = {
207
+ text: 'Classic basic',
208
+ theme: 'classic'
209
+ };
210
+
211
+ materialSettings = {
212
+ text: 'Material basic',
213
+ theme: 'material'
214
+ };
215
+ ```
216
+
217
+ The same twelve scenarios are validated for both `classic` and `material`:
218
+
219
+ | # | Scenario | Main settings tested |
220
+ | :---: | :--- | :--- |
221
+ | 01 | Basic multi | `{ enableSearchFilter: false }` |
222
+ | 02 | Search + select all | Search, select all, clear all, events |
223
+ | 03 | Single without checkbox | `{ singleSelection: true, showCheckbox: false, enableCheckAll: false }` |
224
+ | 04 | Multi without checkbox | `{ showCheckbox: false, enableCheckAll: false }` |
225
+ | 05 | Selection limit | `{ limitSelection: 2, badgeShowLimit: 2 }` |
226
+ | 06 | Badge overflow | `{ badgeShowLimit: 2, maxHeight: 220 }` |
227
+ | 07 | Grouped by region | `{ groupBy: 'region', maxHeight: 220 }` |
228
+ | 08 | Disabled with value | `{ disabled: true }` |
229
+ | 09 | Empty data | `{ noDataLabel: 'No records found' }` |
230
+ | 10 | Long list with scroll | `{ maxHeight: 120, badgeShowLimit: 3 }` |
231
+ | 11 | Local lazy loading | `{ lazyLoading: true, maxHeight: 120, badgeShowLimit: 3 }` |
232
+ | 12 | Item + chip template | `<c-badge>` and `<c-item>` custom templates |
233
+
188
234
  ## Custom Templates
189
235
 
190
236
  ```html
@@ -201,11 +247,7 @@ dropdownSettings = {
201
247
  </angular-multiselect>
202
248
  ```
203
249
 
204
- The same template contract also works with the legacy selector:
205
-
206
- ```html
207
- <angular2-multiselect></angular2-multiselect>
208
- ```
250
+ `<angular2-multiselect>` remains available only as a legacy compatibility alias for applications migrating from the old outdated plugin. New code and all current examples should use `<angular-multiselect>`.
209
251
 
210
252
  ## Forms Integration
211
253
 
@@ -268,10 +310,6 @@ The classic output contract is preserved:
268
310
  ```bash
269
311
  npm install
270
312
  npm run docs:sync
271
- npm run build-package
272
- cd docs-src/angular-21
273
- npm install --ignore-scripts
274
- npm run build
275
313
  ```
276
314
 
277
315
  ## License
@@ -300,7 +300,9 @@
300
300
  padding-left: 15px !important;
301
301
  }
302
302
 
303
- .stackline-dropdown.theme-material {
303
+ .stackline-dropdown.theme-material,
304
+ .stackline-dropdown.theme-dark,
305
+ .stackline-dropdown.theme-custom {
304
306
  --ms-primary: #3f51b5;
305
307
  --ms-primary-soft: rgba(63, 81, 181, 0.12);
306
308
  --ms-surface: #ffffff;
@@ -313,6 +315,9 @@
313
315
  --ms-chip-bg: #e8eaf6;
314
316
  --ms-chip-text: #303f9f;
315
317
  --ms-chip-remove: #303f9f;
318
+ --ms-divider: rgba(125, 119, 134, 0.16);
319
+ --ms-section-bg: rgba(247, 242, 250, 0.76);
320
+ --ms-selected-text: var(--ms-primary);
316
321
  --ms-shadow: 0 1px 2px rgba(33, 33, 33, 0.16), 0 12px 32px rgba(63, 81, 181, 0.12);
317
322
  --ms-shadow-soft: 0 1px 2px rgba(33, 33, 33, 0.12), 0 4px 12px rgba(33, 33, 33, 0.08);
318
323
  display: block;
@@ -321,11 +326,55 @@
321
326
  font: inherit;
322
327
  }
323
328
 
324
- .stackline-dropdown.theme-material .selected-list {
329
+ .stackline-dropdown.theme-dark {
330
+ --ms-primary: #8ab4f8;
331
+ --ms-primary-soft: rgba(138, 180, 248, 0.18);
332
+ --ms-surface: #151a23;
333
+ --ms-surface-soft: #202736;
334
+ --ms-surface-muted: #111722;
335
+ --ms-outline: #384456;
336
+ --ms-outline-strong: #8ab4f8;
337
+ --ms-on-surface: #edf2f7;
338
+ --ms-on-surface-muted: #aab6c5;
339
+ --ms-chip-bg: #263247;
340
+ --ms-chip-text: #d7e6ff;
341
+ --ms-chip-remove: #d7e6ff;
342
+ --ms-divider: rgba(170, 182, 197, 0.18);
343
+ --ms-section-bg: #101620;
344
+ --ms-selected-text: #d7e6ff;
345
+ --ms-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
346
+ --ms-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 24px rgba(0, 0, 0, 0.28);
347
+ }
348
+
349
+ .stackline-dropdown.theme-custom {
350
+ --ms-primary: var(--stackline-ms-primary, #0f766e);
351
+ --ms-primary-soft: var(--stackline-ms-primary-soft, rgba(15, 118, 110, 0.14));
352
+ --ms-surface: var(--stackline-ms-surface, #ffffff);
353
+ --ms-surface-soft: var(--stackline-ms-surface-soft, #ecfdf5);
354
+ --ms-surface-muted: var(--stackline-ms-surface-muted, #d1fae5);
355
+ --ms-outline: var(--stackline-ms-outline, #99f6e4);
356
+ --ms-outline-strong: var(--stackline-ms-outline-strong, #0f766e);
357
+ --ms-on-surface: var(--stackline-ms-on-surface, #102a2a);
358
+ --ms-on-surface-muted: var(--stackline-ms-on-surface-muted, #47615f);
359
+ --ms-chip-bg: var(--stackline-ms-chip-bg, #ccfbf1);
360
+ --ms-chip-text: var(--stackline-ms-chip-text, #115e59);
361
+ --ms-chip-remove: var(--stackline-ms-chip-remove, #115e59);
362
+ --ms-divider: var(--stackline-ms-divider, rgba(15, 118, 110, 0.16));
363
+ --ms-section-bg: var(--stackline-ms-section-bg, #f0fdfa);
364
+ --ms-selected-text: var(--stackline-ms-selected-text, var(--ms-primary));
365
+ --ms-shadow: var(--stackline-ms-shadow, 0 18px 42px rgba(15, 118, 110, 0.15));
366
+ --ms-shadow-soft: var(--stackline-ms-shadow-soft, 0 1px 2px rgba(15, 118, 110, 0.16), 0 8px 18px rgba(15, 118, 110, 0.09));
367
+ }
368
+
369
+ .stackline-dropdown.theme-material .selected-list,
370
+ .stackline-dropdown.theme-dark .selected-list,
371
+ .stackline-dropdown.theme-custom .selected-list {
325
372
  width: 100%;
326
373
  }
327
374
 
328
- .stackline-dropdown.theme-material .selected-list .c-btn {
375
+ .stackline-dropdown.theme-material .selected-list .c-btn,
376
+ .stackline-dropdown.theme-dark .selected-list .c-btn,
377
+ .stackline-dropdown.theme-custom .selected-list .c-btn {
329
378
  position: relative;
330
379
  display: flex;
331
380
  align-items: center;
@@ -345,17 +394,23 @@
345
394
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
346
395
  }
347
396
 
348
- .stackline-dropdown.theme-material .selected-list .c-btn:hover {
397
+ .stackline-dropdown.theme-material .selected-list .c-btn:hover,
398
+ .stackline-dropdown.theme-dark .selected-list .c-btn:hover,
399
+ .stackline-dropdown.theme-custom .selected-list .c-btn:hover {
349
400
  border-color: var(--ms-outline-strong);
350
401
  }
351
402
 
352
- .stackline-dropdown.theme-material .selected-list .c-btn.disabled {
403
+ .stackline-dropdown.theme-material .selected-list .c-btn.disabled,
404
+ .stackline-dropdown.theme-dark .selected-list .c-btn.disabled,
405
+ .stackline-dropdown.theme-custom .selected-list .c-btn.disabled {
353
406
  background: var(--ms-surface);
354
407
  cursor: not-allowed;
355
408
  opacity: 0.72;
356
409
  }
357
410
 
358
- .stackline-dropdown.theme-material .selected-list .c-list {
411
+ .stackline-dropdown.theme-material .selected-list .c-list,
412
+ .stackline-dropdown.theme-dark .selected-list .c-list,
413
+ .stackline-dropdown.theme-custom .selected-list .c-list {
359
414
  display: flex;
360
415
  flex: 1 1 auto;
361
416
  flex-wrap: wrap;
@@ -367,7 +422,9 @@
367
422
  float: none;
368
423
  }
369
424
 
370
- .stackline-dropdown.theme-material .selected-list .c-list .c-token {
425
+ .stackline-dropdown.theme-material .selected-list .c-list .c-token,
426
+ .stackline-dropdown.theme-dark .selected-list .c-list .c-token,
427
+ .stackline-dropdown.theme-custom .selected-list .c-list .c-token {
371
428
  position: relative;
372
429
  display: inline-block;
373
430
  vertical-align: middle;
@@ -385,7 +442,9 @@
385
442
  float: none;
386
443
  }
387
444
 
388
- .stackline-dropdown.theme-material .selected-list .c-list .c-token .c-label {
445
+ .stackline-dropdown.theme-material .selected-list .c-list .c-token .c-label,
446
+ .stackline-dropdown.theme-dark .selected-list .c-list .c-token .c-label,
447
+ .stackline-dropdown.theme-custom .selected-list .c-list .c-token .c-label {
389
448
  display: inline-flex;
390
449
  align-items: center;
391
450
  float: none;
@@ -397,7 +456,9 @@
397
456
  overflow-wrap: anywhere;
398
457
  }
399
458
 
400
- .stackline-dropdown.theme-material .selected-list .c-list .c-token .fa-remove {
459
+ .stackline-dropdown.theme-material .selected-list .c-list .c-token .fa-remove,
460
+ .stackline-dropdown.theme-dark .selected-list .c-list .c-token .fa-remove,
461
+ .stackline-dropdown.theme-custom .selected-list .c-list .c-token .fa-remove {
401
462
  position: absolute;
402
463
  right: 10px;
403
464
  top: 50%;
@@ -412,7 +473,9 @@
412
473
  cursor: pointer;
413
474
  }
414
475
 
415
- .stackline-dropdown.theme-material .selected-list .countplaceholder {
476
+ .stackline-dropdown.theme-material .selected-list .countplaceholder,
477
+ .stackline-dropdown.theme-dark .selected-list .countplaceholder,
478
+ .stackline-dropdown.theme-custom .selected-list .countplaceholder {
416
479
  display: inline-flex;
417
480
  flex: 0 0 auto;
418
481
  align-items: center;
@@ -426,7 +489,11 @@
426
489
  }
427
490
 
428
491
  .stackline-dropdown.theme-material .selected-list .fa-angle-down,
429
- .stackline-dropdown.theme-material .selected-list .fa-angle-up {
492
+ .stackline-dropdown.theme-dark .selected-list .fa-angle-down,
493
+ .stackline-dropdown.theme-custom .selected-list .fa-angle-down,
494
+ .stackline-dropdown.theme-material .selected-list .fa-angle-up,
495
+ .stackline-dropdown.theme-dark .selected-list .fa-angle-up,
496
+ .stackline-dropdown.theme-custom .selected-list .fa-angle-up {
430
497
  position: absolute;
431
498
  top: 50%;
432
499
  right: 16px;
@@ -441,7 +508,9 @@
441
508
  pointer-events: none;
442
509
  }
443
510
 
444
- .stackline-dropdown.theme-material .dropdown-list {
511
+ .stackline-dropdown.theme-material .dropdown-list,
512
+ .stackline-dropdown.theme-dark .dropdown-list,
513
+ .stackline-dropdown.theme-custom .dropdown-list {
445
514
  position: absolute;
446
515
  width: 100%;
447
516
  padding-top: 8px;
@@ -449,12 +518,20 @@
449
518
  }
450
519
 
451
520
  .stackline-dropdown.theme-material .arrow-up,
521
+ .stackline-dropdown.theme-dark .arrow-up,
522
+ .stackline-dropdown.theme-custom .arrow-up,
452
523
  .stackline-dropdown.theme-material .arrow-down,
453
- .stackline-dropdown.theme-material .arrow-2 {
524
+ .stackline-dropdown.theme-dark .arrow-down,
525
+ .stackline-dropdown.theme-custom .arrow-down,
526
+ .stackline-dropdown.theme-material .arrow-2,
527
+ .stackline-dropdown.theme-dark .arrow-2,
528
+ .stackline-dropdown.theme-custom .arrow-2 {
454
529
  display: none;
455
530
  }
456
531
 
457
- .stackline-dropdown.theme-material .list-area {
532
+ .stackline-dropdown.theme-material .list-area,
533
+ .stackline-dropdown.theme-dark .list-area,
534
+ .stackline-dropdown.theme-custom .list-area {
458
535
  overflow: hidden;
459
536
  border-radius: 22px;
460
537
  background: var(--ms-surface);
@@ -463,25 +540,31 @@
463
540
  margin: 0;
464
541
  }
465
542
 
466
- .stackline-dropdown.theme-material .select-all {
543
+ .stackline-dropdown.theme-material .select-all,
544
+ .stackline-dropdown.theme-dark .select-all,
545
+ .stackline-dropdown.theme-custom .select-all {
467
546
  padding: 10px 14px;
468
- border-bottom: 1px solid rgba(125, 119, 134, 0.16);
469
- background: rgba(247, 242, 250, 0.76);
547
+ border-bottom: 1px solid var(--ms-divider);
548
+ background: var(--ms-section-bg);
470
549
  text-align: left;
471
550
  }
472
551
 
473
- .stackline-dropdown.theme-material .list-filter {
552
+ .stackline-dropdown.theme-material .list-filter,
553
+ .stackline-dropdown.theme-dark .list-filter,
554
+ .stackline-dropdown.theme-custom .list-filter {
474
555
  position: relative;
475
556
  display: flex;
476
557
  align-items: center;
477
558
  min-height: 52px;
478
559
  padding-left: 48px;
479
560
  padding-right: 44px;
480
- border-bottom: 1px solid rgba(125, 119, 134, 0.16);
561
+ border-bottom: 1px solid var(--ms-divider);
481
562
  background: var(--ms-surface);
482
563
  }
483
564
 
484
- .stackline-dropdown.theme-material .list-filter input {
565
+ .stackline-dropdown.theme-material .list-filter input,
566
+ .stackline-dropdown.theme-dark .list-filter input,
567
+ .stackline-dropdown.theme-custom .list-filter input {
485
568
  width: 100%;
486
569
  height: 100%;
487
570
  border: 0;
@@ -491,15 +574,21 @@
491
574
  padding: 0;
492
575
  }
493
576
 
494
- .stackline-dropdown.theme-material .list-filter input::placeholder {
577
+ .stackline-dropdown.theme-material .list-filter input::placeholder,
578
+ .stackline-dropdown.theme-dark .list-filter input::placeholder,
579
+ .stackline-dropdown.theme-custom .list-filter input::placeholder {
495
580
  color: var(--ms-on-surface-muted);
496
581
  }
497
582
 
498
- .stackline-dropdown.theme-material .list-filter input:focus {
583
+ .stackline-dropdown.theme-material .list-filter input:focus,
584
+ .stackline-dropdown.theme-dark .list-filter input:focus,
585
+ .stackline-dropdown.theme-custom .list-filter input:focus {
499
586
  outline: none;
500
587
  }
501
588
 
502
- .stackline-dropdown.theme-material .list-filter .fa {
589
+ .stackline-dropdown.theme-material .list-filter .fa,
590
+ .stackline-dropdown.theme-dark .list-filter .fa,
591
+ .stackline-dropdown.theme-custom .list-filter .fa {
503
592
  position: absolute;
504
593
  top: 50%;
505
594
  left: 16px;
@@ -512,14 +601,18 @@
512
601
  color: var(--ms-on-surface-muted);
513
602
  }
514
603
 
515
- .stackline-dropdown.theme-material .dropdown-list ul {
604
+ .stackline-dropdown.theme-material .dropdown-list ul,
605
+ .stackline-dropdown.theme-dark .dropdown-list ul,
606
+ .stackline-dropdown.theme-custom .dropdown-list ul {
516
607
  list-style: none;
517
608
  margin: 0;
518
609
  padding: 8px;
519
610
  overflow: auto;
520
611
  }
521
612
 
522
- .stackline-dropdown.theme-material .dropdown-list ul li {
613
+ .stackline-dropdown.theme-material .dropdown-list ul li,
614
+ .stackline-dropdown.theme-dark .dropdown-list ul li,
615
+ .stackline-dropdown.theme-custom .dropdown-list ul li {
523
616
  align-items: center;
524
617
  min-height: 0;
525
618
  margin: 4px;
@@ -531,23 +624,33 @@
531
624
  transition: background-color 0.16s ease, color 0.16s ease;
532
625
  }
533
626
 
534
- .stackline-dropdown.theme-material .dropdown-list ul li:first-child {
627
+ .stackline-dropdown.theme-material .dropdown-list ul li:first-child,
628
+ .stackline-dropdown.theme-dark .dropdown-list ul li:first-child,
629
+ .stackline-dropdown.theme-custom .dropdown-list ul li:first-child {
535
630
  padding-top: 12px;
536
631
  }
537
632
 
538
- .stackline-dropdown.theme-material .dropdown-list ul li:last-child {
633
+ .stackline-dropdown.theme-material .dropdown-list ul li:last-child,
634
+ .stackline-dropdown.theme-dark .dropdown-list ul li:last-child,
635
+ .stackline-dropdown.theme-custom .dropdown-list ul li:last-child {
539
636
  padding-bottom: 12px;
540
637
  }
541
638
 
542
- .stackline-dropdown.theme-material .dropdown-list ul li:hover {
639
+ .stackline-dropdown.theme-material .dropdown-list ul li:hover,
640
+ .stackline-dropdown.theme-dark .dropdown-list ul li:hover,
641
+ .stackline-dropdown.theme-custom .dropdown-list ul li:hover {
543
642
  background: var(--ms-surface-soft);
544
643
  }
545
644
 
546
- .stackline-dropdown.theme-material .pure-checkbox {
645
+ .stackline-dropdown.theme-material .pure-checkbox,
646
+ .stackline-dropdown.theme-dark .pure-checkbox,
647
+ .stackline-dropdown.theme-custom .pure-checkbox {
547
648
  position: relative;
548
649
  }
549
650
 
550
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label {
651
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label,
652
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox] + label,
653
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox] + label {
551
654
  position: relative;
552
655
  display: block;
553
656
  width: 100%;
@@ -559,7 +662,9 @@
559
662
  user-select: none;
560
663
  }
561
664
 
562
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label:before {
665
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label:before,
666
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox] + label:before,
667
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox] + label:before {
563
668
  box-sizing: content-box;
564
669
  content: "";
565
670
  position: absolute;
@@ -574,7 +679,9 @@
574
679
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
575
680
  }
576
681
 
577
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label:after {
682
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox] + label:after,
683
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox] + label:after,
684
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox] + label:after {
578
685
  box-sizing: content-box;
579
686
  content: "";
580
687
  position: absolute;
@@ -594,25 +701,33 @@
594
701
  }
595
702
 
596
703
  .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:focus + label:before,
597
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:hover + label:before {
704
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:focus + label:before,
705
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:focus + label:before,
706
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:hover + label:before,
707
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:hover + label:before,
708
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:hover + label:before {
598
709
  border-color: var(--ms-primary);
599
710
  background: var(--ms-surface-soft);
600
711
  }
601
712
 
602
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked + label:before {
713
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked + label:before,
714
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked + label:before,
715
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked + label:before {
603
716
  border-color: var(--ms-primary);
604
717
  background: var(--ms-primary);
605
718
  }
606
719
 
607
- .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked + label:after {
720
+ .stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked + label:after,
721
+ .stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked + label:after,
722
+ .stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked + label:after {
608
723
  transform: rotate(-45deg) scale(1);
609
724
  }
610
725
 
611
- .stackline-dropdown.theme-material .list-message {
726
+ .stackline-dropdown.theme-material .list-message,
727
+ .stackline-dropdown.theme-dark .list-message,
728
+ .stackline-dropdown.theme-custom .list-message {
612
729
  margin: 0;
613
730
  padding: 20px 14px;
614
731
  color: var(--ms-on-surface-muted);
615
732
  text-align: center;
616
733
  }
617
-
618
- /*# sourceMappingURL=multiselect.component.css.map */
package/package.json CHANGED
@@ -1,24 +1,12 @@
1
1
  {
2
2
  "name": "@stackline/angular-multiselect-dropdown",
3
- "version": "2.0.4",
4
- "description": "Angular 2 compatible multiselect dropdown for the Stackline maintained Angular release line.",
3
+ "version": "4.0.1",
4
+ "description": "Angular 4 compatible multiselect dropdown package for the Stackline Angular 4 release line.",
5
5
  "keywords": [
6
- "angular",
7
- "angular2",
8
- "angular 2",
9
- "angular-multiselect-dropdown",
6
+ "angular 2 multiselect dropdown",
7
+ "angular 4 multiselect dropdown",
10
8
  "angular multiselect",
11
- "angular dropdown",
12
- "multiselect",
13
- "multiselect-dropdown",
14
- "dropdown",
15
- "select",
16
- "search-filter",
17
- "group-by",
18
- "custom-templates",
19
- "template-driven-forms",
20
- "reactive-forms",
21
- "stackline"
9
+ "angular dropdown"
22
10
  ],
23
11
  "license": "MIT",
24
12
  "angular-cli": {},
@@ -41,7 +29,7 @@
41
29
  "explorer": "source-map-explorer ./dist/index.umd.js",
42
30
  "gh-pages": "rimraf docs && npm run docs && gh-pages -d docs",
43
31
  "lint": "npm run tslint 'src/**/*.ts'",
44
- "ngcompile": "node_modules/.bin/ngc -p tsconfig-aot.json",
32
+ "ngcompile": "ngc -p tsconfig-aot.json",
45
33
  "postversion": "git push && git push --tags",
46
34
  "prebuild": "rimraf dist tmp",
47
35
  "prebuild:watch": "rimraf dist tmp",
@@ -122,9 +110,9 @@
122
110
  "main": "angular2-multiselect-dropdown.ts",
123
111
  "types": "angular2-multiselect-dropdown.ts",
124
112
  "peerDependencies": {
125
- "@angular/common": ">=2.0.0 <3.0.0",
126
- "@angular/core": ">=2.0.0 <3.0.0",
127
- "@angular/forms": ">=2.0.0 <3.0.0"
113
+ "@angular/common": ">=4.0.0 <5.0.0",
114
+ "@angular/core": ">=4.0.0 <5.0.0",
115
+ "@angular/forms": ">=4.0.0 <5.0.0"
128
116
  },
129
- "homepage": "https://alexandro.net/docs/angular/multiselect/"
117
+ "homepage": "https://alexandro.net/docs/angular/multiselect/angular-4/"
130
118
  }
@@ -1,4 +1,4 @@
1
- <div class="stackline-dropdown" [ngClass]="{'theme-material': settings.theme == 'material', 'theme-classic': settings.theme != 'material'}" (clickOutside)="closeDropdown()">
1
+ <div class="stackline-dropdown" [ngClass]="getDropdownClasses()" (clickOutside)="closeDropdown()">
2
2
  <div class="selected-list">
3
3
  <div class="c-btn" (click)="toggleDropdown($event)" [ngClass]="{'disabled': settings.disabled}">
4
4
  <span *ngIf="selectedItems?.length == 0">{{settings.text}}</span>