@opengis/filter 0.0.13 → 0.0.14
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/dist/README.md +82 -0
- package/dist/favicon.ico +0 -0
- package/dist/filter.js +2744 -0
- package/dist/filter.umd.cjs +1 -0
- package/dist/package.json +22 -0
- package/package.json +46 -7
package/dist/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Filter Panel
|
|
2
|
+
|
|
3
|
+
A flexible and extensible filter component system for Vue 3.
|
|
4
|
+
Ideal for building customizable filter UIs with checkbox, radio, or custom slot fields.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Schema-based filter rendering (radio, checkbox)
|
|
11
|
+
- Slot-based extensibility for custom filters
|
|
12
|
+
- Built-in clear/reset support
|
|
13
|
+
- Emits `change` and `clear` events
|
|
14
|
+
- Popover support with positioning logic
|
|
15
|
+
- Show more / limit options logic
|
|
16
|
+
- Written in TypeScript
|
|
17
|
+
- Fully styleable with Tailwind CSS
|
|
18
|
+
- Mobile-friendly and responsive
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
## Documentation
|
|
22
|
+
|
|
23
|
+
### Live Demo & Docs
|
|
24
|
+
|
|
25
|
+
Check out the documentation and live demo here:
|
|
26
|
+
- [FIlter](https://filter.opengis.info)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Install & Usage
|
|
30
|
+
|
|
31
|
+
### 1. Install the packag
|
|
32
|
+
```bash
|
|
33
|
+
npm i @opengis/filter
|
|
34
|
+
```
|
|
35
|
+
### 2. Register the component
|
|
36
|
+
```typescript
|
|
37
|
+
// main.ts or main.js
|
|
38
|
+
import { createApp } from 'vue'
|
|
39
|
+
import App from './App.vue'
|
|
40
|
+
import InlineFilter from 'filter'
|
|
41
|
+
|
|
42
|
+
createApp(App).component('Filter', InlineFilter).mount('#app')
|
|
43
|
+
```
|
|
44
|
+
### 3. Use it in your template
|
|
45
|
+
|
|
46
|
+
```vue
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<filter :schema="schema" @change="filter = $event" @clear="console.log($event.data)">
|
|
50
|
+
<filter-field :options="options" label="test label" limit=1 name="test" type="checkbox"/>
|
|
51
|
+
</filter>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
import {ref} from 'vue'
|
|
56
|
+
import {ListItem, Schema} from "./forms.model";
|
|
57
|
+
|
|
58
|
+
const options: ListItem[] = [
|
|
59
|
+
{
|
|
60
|
+
value: 'is_video',
|
|
61
|
+
label: 'Video',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 'is_photo',
|
|
65
|
+
label: 'Photo',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const schema = ref({
|
|
70
|
+
name: {type: 'radio', label: 'Наявність фото / відео', options}
|
|
71
|
+
} as Schema);
|
|
72
|
+
|
|
73
|
+
const selectedIcon = ref('')
|
|
74
|
+
const myIcons = ['home', 'user', 'settings', 'arrow-left', 'check'] // your SVG names
|
|
75
|
+
</script>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Contributions
|
|
81
|
+
We welcome contributions!
|
|
82
|
+
Feel free to open issues, suggest features, or submit pull requests.
|
package/dist/favicon.ico
ADDED
|
Binary file
|