@styloviz/select-dropdown 0.1.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/LICENSE +21 -0
- package/README.md +71 -0
- package/fesm2022/styloviz-select-dropdown.mjs +638 -0
- package/fesm2022/styloviz-select-dropdown.mjs.map +1 -0
- package/package.json +43 -0
- package/types/styloviz-select-dropdown.d.ts +217 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StyloViz
|
|
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,71 @@
|
|
|
1
|
+
# @styloviz/select-dropdown
|
|
2
|
+
|
|
3
|
+
> Accessible select / dropdown with search, multi-select and custom option templates.
|
|
4
|
+
|
|
5
|
+
Part of the **StyloViz UI Kit** — a premium Angular 21 + Tailwind CSS 4 dashboard component library. Standalone, `OnPush`, strongly typed, dark-mode ready.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @styloviz/core @styloviz/select-dropdown
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires `@angular/core` and `@angular/common` >= 21. `@styloviz/core` is a peer dependency shared by every component. Prefer everything at once? `@styloviz/all` installs the whole free tier in one command.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { SvSelectDropdownComponent } from '@styloviz/select-dropdown';
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [SvSelectDropdownComponent],
|
|
23
|
+
template: `
|
|
24
|
+
<sv-select-dropdown />
|
|
25
|
+
`,
|
|
26
|
+
})
|
|
27
|
+
export class DemoComponent {}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Inputs
|
|
31
|
+
|
|
32
|
+
| Input | Type | Default | Description |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `value` | `string \| string[] (two-way)` | `''` | Selected value(s) — string for single, string[] for multiple (two-way). |
|
|
35
|
+
| `options` | `SelectOption[]` | `[]` | Flat list of options. Use `groups` instead for sectioned lists. |
|
|
36
|
+
| `groups` | `SelectGroup[]` | `[]` | Grouped options with section labels. |
|
|
37
|
+
| `size` | `SelectSize` | `'md'` | Field size: sm, md or lg. |
|
|
38
|
+
| `variant` | `SelectVariant` | `'default'` | Visual variant. |
|
|
39
|
+
| `placeholder` | `string` | `'Select an option'` | Placeholder shown when nothing is selected. |
|
|
40
|
+
| `label` | `string` | `''` | Field label. |
|
|
41
|
+
| `hint` | `string` | `''` | Helper text shown below the field. |
|
|
42
|
+
| `errorMessage` | `string` | `''` | Error message; puts the field in an error state when set. |
|
|
43
|
+
| `multiple` | `boolean` | `false` | Allow selecting multiple options. |
|
|
44
|
+
| `searchable` | `boolean` | `false` | Show a search box to filter options. |
|
|
45
|
+
| `searchPlaceholder` | `string` | `'Search…'` | Placeholder for the search box. |
|
|
46
|
+
| `noResultsText` | `string` | `'No results found'` | Text shown when a search yields no matches. |
|
|
47
|
+
| `clearable` | `boolean` | `false` | Show a clear (×) control. |
|
|
48
|
+
| `disabled` | `boolean` | `false` | Disable the field. |
|
|
49
|
+
| `loading` | `boolean` | `false` | Show a loading state. |
|
|
50
|
+
| `required` | `boolean` | `false` | Mark the field as required. |
|
|
51
|
+
| `optionalTag` | `boolean` | `false` | Show an "optional" tag next to the label. |
|
|
52
|
+
| `maxSelected` | `number` | `0` | Max selectable options in multiple mode (0 = unlimited). |
|
|
53
|
+
| `inputId` | `string` | `''` | Explicit id for the control (for external <label for>). |
|
|
54
|
+
| `customClass` | `string` | `''` | Extra CSS classes for the control. |
|
|
55
|
+
|
|
56
|
+
## Outputs
|
|
57
|
+
|
|
58
|
+
| Output | Type | Description |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| `selectionChange` | `string \| string[]` | Emitted with the new selection (string or string[]). |
|
|
61
|
+
| `dropdownOpen` | `void` | Emitted when the dropdown opens. |
|
|
62
|
+
| `dropdownClose` | `void` | Emitted when the dropdown closes. |
|
|
63
|
+
| `searchChange` | `string` | Emitted with the search query whenever it changes (for remote filtering). |
|
|
64
|
+
|
|
65
|
+
## Documentation
|
|
66
|
+
|
|
67
|
+
Full API reference and live demos: https://styloviz.dev/docs
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|