angular-perfect-select 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ishan Karunaratne
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # Angular Perfect Select
2
+
3
+ A modern, feature-rich, and fully accessible select component for Angular applications. Built with react-select API compatibility, enhanced animations, and a focus on user experience.
4
+
5
+ [![npm version](https://badge.fury.io/js/angular-perfect-select.svg)](https://www.npmjs.com/package/angular-perfect-select)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Features
9
+
10
+ ### Core Features
11
+ - **React-Select Compatible** - Full API compatibility with react-select
12
+ - **Modern UI** - Beautiful design with smooth, enhanced animations
13
+ - **Angular 20+** - Built with standalone components and signals
14
+ - **Async Loading** - Load options asynchronously with caching support
15
+ - **Creatable Options** - Allow users to create new options on the fly
16
+ - **Search/Filter** - Built-in search functionality with custom filter support
17
+ - **Multi-Select** - Support for selecting multiple options with animated tag chips
18
+ - **Keyboard Navigation** - Full keyboard support (Arrow keys, Enter, Escape, Tab, Backspace)
19
+ - **Accessibility** - ARIA labels and comprehensive screen reader support
20
+ - **Forms Integration** - Full support for Angular template-driven and reactive forms
21
+
22
+ ### Advanced Features
23
+ - **Select All / Deselect All** - One-click selection for multi-select mode
24
+ - **Option Grouping** - Organize options into categories with sticky headers
25
+ - **Icons in Options** - Add visual elements (SVG or images) to options
26
+ - **Badges in Options** - Display status, roles, or categories with custom colors
27
+ - **Color Themes** - 7 beautiful color themes: blue, purple, green, red, orange, pink, dark
28
+ - **Container Sizing** - 5 physical container sizes: xs, sm, md, lg, xl
29
+ - **Font Sizing** - 5 font size variants: smaller (11px), small (13px), medium (14px), large (16px), larger (18px)
30
+ - **Custom Styles** - Inject custom styles for complete control over appearance
31
+ - **Custom Render Functions** - `getOptionLabel`, `getOptionValue`, `isOptionDisabled`
32
+ - **Flexible Options** - Support for option descriptions and disabled states
33
+ - **Loading States** - Built-in loading indicators for sync and async operations
34
+ - **RTL Support** - Right-to-left language support
35
+ - **Menu Positioning** - Auto, top, or bottom placement with fixed positioning support
36
+ - **Enhanced Animations** - Smooth dropdown animations, staggered options, and tag transitions
37
+ - **Modern UI** - Beautiful design with enhanced shadows, backdrop blur effects, and rounded corners
38
+
39
+ ## Installation
40
+
41
+ Install using npm:
42
+
43
+ ```bash
44
+ npm install angular-perfect-select
45
+ ```
46
+
47
+ Install using yarn:
48
+
49
+ ```bash
50
+ yarn add angular-perfect-select
51
+ ```
52
+
53
+ Install using pnpm:
54
+
55
+ ```bash
56
+ pnpm add angular-perfect-select
57
+ ```
58
+
59
+ ## Quick Start
60
+
61
+ ### Standalone Component (Recommended)
62
+
63
+ ```typescript
64
+ import { Component } from '@angular/core';
65
+ import { FormsModule } from '@angular/forms';
66
+ import { PerfectSelectComponent, SelectOption } from 'angular-perfect-select';
67
+
68
+ @Component({
69
+ selector: 'app-demo',
70
+ standalone: true,
71
+ imports: [FormsModule, PerfectSelectComponent],
72
+ template: \`
73
+ <ng-perfect-select
74
+ [options]="options"
75
+ [(ngModel)]="selectedValue"
76
+ placeholder="Select a country..."
77
+ ></ng-perfect-select>
78
+ \`
79
+ })
80
+ export class DemoComponent {
81
+ selectedValue: any = null;
82
+
83
+ options: SelectOption[] = [
84
+ { id: 'sl', label: 'Sri Lanka', value: 'sl' },
85
+ { id: 'ind', label: 'India', value: 'ind' },
86
+ { id: 'pak', label: 'Pakistan', value: 'pak' }
87
+ ];
88
+ }
89
+ ```
90
+
91
+ ### NgModule Usage
92
+
93
+ ```typescript
94
+ import { NgModule } from '@angular/core';
95
+ import { FormsModule } from '@angular/forms';
96
+ import { PerfectSelectComponent } from 'angular-perfect-select';
97
+
98
+ @NgModule({
99
+ imports: [
100
+ FormsModule,
101
+ PerfectSelectComponent
102
+ ],
103
+ // ...
104
+ })
105
+ export class AppModule { }
106
+ ```
107
+
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ishan Karunaratne
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # Angular Perfect Select
2
+
3
+ A modern, feature-rich, and fully accessible select component for Angular applications. Built with react-select API compatibility, enhanced animations, and a focus on user experience.
4
+
5
+ [![npm version](https://badge.fury.io/js/angular-perfect-select.svg)](https://www.npmjs.com/package/angular-perfect-select)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Features
9
+
10
+ ### Core Features
11
+ - **React-Select Compatible** - Full API compatibility with react-select
12
+ - **Modern UI** - Beautiful design with smooth, enhanced animations
13
+ - **Angular 20+** - Built with standalone components and signals
14
+ - **Async Loading** - Load options asynchronously with caching support
15
+ - **Creatable Options** - Allow users to create new options on the fly
16
+ - **Search/Filter** - Built-in search functionality with custom filter support
17
+ - **Multi-Select** - Support for selecting multiple options with animated tag chips
18
+ - **Keyboard Navigation** - Full keyboard support (Arrow keys, Enter, Escape, Tab, Backspace)
19
+ - **Accessibility** - ARIA labels and comprehensive screen reader support
20
+ - **Forms Integration** - Full support for Angular template-driven and reactive forms
21
+
22
+ ### Advanced Features
23
+ - **Select All / Deselect All** - One-click selection for multi-select mode
24
+ - **Option Grouping** - Organize options into categories with sticky headers
25
+ - **Icons in Options** - Add visual elements (SVG or images) to options
26
+ - **Badges in Options** - Display status, roles, or categories with custom colors
27
+ - **Color Themes** - 7 beautiful color themes: blue, purple, green, red, orange, pink, dark
28
+ - **Container Sizing** - 5 physical container sizes: xs, sm, md, lg, xl
29
+ - **Font Sizing** - 5 font size variants: smaller (11px), small (13px), medium (14px), large (16px), larger (18px)
30
+ - **Custom Styles** - Inject custom styles for complete control over appearance
31
+ - **Custom Render Functions** - `getOptionLabel`, `getOptionValue`, `isOptionDisabled`
32
+ - **Flexible Options** - Support for option descriptions and disabled states
33
+ - **Loading States** - Built-in loading indicators for sync and async operations
34
+ - **RTL Support** - Right-to-left language support
35
+ - **Menu Positioning** - Auto, top, or bottom placement with fixed positioning support
36
+ - **Enhanced Animations** - Smooth dropdown animations, staggered options, and tag transitions
37
+ - **Modern UI** - Beautiful design with enhanced shadows, backdrop blur effects, and rounded corners
38
+
39
+ ## Installation
40
+
41
+ Install using npm:
42
+
43
+ ```bash
44
+ npm install angular-perfect-select
45
+ ```
46
+
47
+ Install using yarn:
48
+
49
+ ```bash
50
+ yarn add angular-perfect-select
51
+ ```
52
+
53
+ Install using pnpm:
54
+
55
+ ```bash
56
+ pnpm add angular-perfect-select
57
+ ```
58
+
59
+ ## Quick Start
60
+
61
+ ### Standalone Component (Recommended)
62
+
63
+ ```typescript
64
+ import { Component } from '@angular/core';
65
+ import { FormsModule } from '@angular/forms';
66
+ import { PerfectSelectComponent, SelectOption } from 'angular-perfect-select';
67
+
68
+ @Component({
69
+ selector: 'app-demo',
70
+ standalone: true,
71
+ imports: [FormsModule, PerfectSelectComponent],
72
+ template: \`
73
+ <ng-perfect-select
74
+ [options]="options"
75
+ [(ngModel)]="selectedValue"
76
+ placeholder="Select a country..."
77
+ ></ng-perfect-select>
78
+ \`
79
+ })
80
+ export class DemoComponent {
81
+ selectedValue: any = null;
82
+
83
+ options: SelectOption[] = [
84
+ { id: 'sl', label: 'Sri Lanka', value: 'sl' },
85
+ { id: 'ind', label: 'India', value: 'ind' },
86
+ { id: 'pak', label: 'Pakistan', value: 'pak' }
87
+ ];
88
+ }
89
+ ```
90
+
91
+ ### NgModule Usage
92
+
93
+ ```typescript
94
+ import { NgModule } from '@angular/core';
95
+ import { FormsModule } from '@angular/forms';
96
+ import { PerfectSelectComponent } from 'angular-perfect-select';
97
+
98
+ @NgModule({
99
+ imports: [
100
+ FormsModule,
101
+ PerfectSelectComponent
102
+ ],
103
+ // ...
104
+ })
105
+ export class AppModule { }
106
+ ```
107
+