@adminforth/quick-filters 2.2.16 → 2.2.18

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/build.log CHANGED
@@ -11,5 +11,5 @@ custom/UniversalSearchInput.vue
11
11
  custom/tsconfig.json
12
12
  custom/types.ts
13
13
 
14
- sent 10,836 bytes received 134 bytes 21,940.00 bytes/sec
15
- total size is 10,336 speedup is 0.94
14
+ sent 10,905 bytes received 134 bytes 22,078.00 bytes/sec
15
+ total size is 10,405 speedup is 0.94
@@ -1,21 +1,24 @@
1
1
  <template>
2
2
  <div class="af-universal-search flex items-center gap-1">
3
3
  <slot name="prefix" />
4
- <div class="relative w-64">
5
- <input
4
+ <!-- enter is handled on the wrapper so it fires once: Input spreads attrs on both its root and the input -->
5
+ <div class="w-64" @keyup.enter="applyImmediate">
6
+ <Input
6
7
  v-model="localValue"
7
8
  type="text"
9
+ fullWidth
8
10
  :placeholder="props.meta?.placeholder ?? ''"
9
- class="w-full border rounded text-sm dark:bg-gray-800 border-gray-300 dark:border-gray-600 dark:text-white px-2 py-1.5 pr-6"
10
- @keyup.enter="applyImmediate"
11
11
  >
12
- <p
13
- v-if="localValue"
14
- @click="clear"
15
- class="absolute right-2 top-1/2 -translate-y-1/2 hover:cursor-pointer hover:text-gray-600 dark:text-white dark:hover:text-gray-400 "
16
- >
17
- ✕
18
- </p>
12
+ <template #rightIcon>
13
+ <p
14
+ v-if="localValue"
15
+ @click="clear"
16
+ class="hover:cursor-pointer hover:text-gray-600 dark:text-white dark:hover:text-gray-400"
17
+ >
18
+ ✕
19
+ </p>
20
+ </template>
21
+ </Input>
19
22
  </div>
20
23
  <slot name="suffix" />
21
24
  </div>
@@ -23,6 +26,7 @@
23
26
  <script setup lang="ts">
24
27
  import { ref, watch, onMounted } from 'vue';
25
28
  import adminforth from '@/adminforth';
29
+ import { Input } from '@/afcl';
26
30
  import { AdminForthFilterOperators } from '@/types/Common';
27
31
  import { useRoute } from 'vue-router';
28
32
 
@@ -1,21 +1,24 @@
1
1
  <template>
2
2
  <div class="af-universal-search flex items-center gap-1">
3
3
  <slot name="prefix" />
4
- <div class="relative w-64">
5
- <input
4
+ <!-- enter is handled on the wrapper so it fires once: Input spreads attrs on both its root and the input -->
5
+ <div class="w-64" @keyup.enter="applyImmediate">
6
+ <Input
6
7
  v-model="localValue"
7
8
  type="text"
9
+ fullWidth
8
10
  :placeholder="props.meta?.placeholder ?? ''"
9
- class="w-full border rounded text-sm dark:bg-gray-800 border-gray-300 dark:border-gray-600 dark:text-white px-2 py-1.5 pr-6"
10
- @keyup.enter="applyImmediate"
11
11
  >
12
- <p
13
- v-if="localValue"
14
- @click="clear"
15
- class="absolute right-2 top-1/2 -translate-y-1/2 hover:cursor-pointer hover:text-gray-600 dark:text-white dark:hover:text-gray-400 "
16
- >
17
- ✕
18
- </p>
12
+ <template #rightIcon>
13
+ <p
14
+ v-if="localValue"
15
+ @click="clear"
16
+ class="hover:cursor-pointer hover:text-gray-600 dark:text-white dark:hover:text-gray-400"
17
+ >
18
+ ✕
19
+ </p>
20
+ </template>
21
+ </Input>
19
22
  </div>
20
23
  <slot name="suffix" />
21
24
  </div>
@@ -23,6 +26,7 @@
23
26
  <script setup lang="ts">
24
27
  import { ref, watch, onMounted } from 'vue';
25
28
  import adminforth from '@/adminforth';
29
+ import { Input } from '@/afcl';
26
30
  import { AdminForthFilterOperators } from '@/types/Common';
27
31
  import { useRoute } from 'vue-router';
28
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/quick-filters",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "keywords": [],
19
19
  "author": "DevForth (https://devforth.io)",
20
20
  "license": "MIT",
21
- "description": "",
21
+ "description": "AdminForth plugin that adds configurable quick filter buttons to resource lists.",
22
22
  "devDependencies": {
23
23
  "@types/node": "latest",
24
24
  "adminforth": "^3.7.1",