@indielayer/ui 1.11.0 → 1.12.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/docs/pages/component/select/multiple.vue +35 -13
- package/docs/pages/component/tag/usage.vue +26 -0
- package/lib/components/select/Select.vue.d.ts +3 -3
- package/lib/components/select/Select.vue.js +203 -188
- package/lib/components/tag/Tag.vue.d.ts +1 -0
- package/lib/components/tag/Tag.vue.js +42 -35
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/select/Select.vue +14 -5
- package/src/components/tag/Tag.vue +11 -6
- package/src/version.ts +1 -1
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.12.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ const selectProps = {
|
|
|
16
16
|
type: String,
|
|
17
17
|
default: 'Filter by...',
|
|
18
18
|
},
|
|
19
|
-
filterInputProps: Object,
|
|
20
19
|
virtualList: Boolean,
|
|
21
20
|
virtualListOffsetTop: Number,
|
|
22
21
|
virtualListOffsetBottom: Number,
|
|
@@ -248,12 +247,13 @@ function handleOptionClick(value: string | number) {
|
|
|
248
247
|
if (index !== -1) selected.value.splice(index, 1)
|
|
249
248
|
else {
|
|
250
249
|
selected.value.push(value)
|
|
251
|
-
emit('update:modelValue', selected.value)
|
|
252
250
|
}
|
|
253
251
|
} else {
|
|
254
252
|
selected.value = [value]
|
|
255
253
|
}
|
|
256
254
|
|
|
255
|
+
emit('update:modelValue', selected.value)
|
|
256
|
+
|
|
257
257
|
if (props.filterable)
|
|
258
258
|
setTimeout(() => {
|
|
259
259
|
filterRef.value?.focus()
|
|
@@ -511,7 +511,12 @@ defineExpose({ focus, blur, reset, validate, setError, filterRef })
|
|
|
511
511
|
:outlined="!(isDisabled || options?.find((i) => i.value === value)?.disabled)"
|
|
512
512
|
:disabled="isDisabled || options?.find((i) => i.value === value)?.disabled"
|
|
513
513
|
@remove="(e: Event) => { handleRemove(e, value) }"
|
|
514
|
-
>
|
|
514
|
+
>
|
|
515
|
+
<template #prefix>
|
|
516
|
+
<slot name="tag-prefix" :item="options?.find((i) => i.value === value)"></slot>
|
|
517
|
+
</template>
|
|
518
|
+
{{ getLabel(value) }}
|
|
519
|
+
</x-tag>
|
|
515
520
|
|
|
516
521
|
<div
|
|
517
522
|
v-if="showCountTag"
|
|
@@ -549,7 +554,6 @@ defineExpose({ focus, blur, reset, validate, setError, filterRef })
|
|
|
549
554
|
skip-form-registry
|
|
550
555
|
data-1p-ignore
|
|
551
556
|
size="sm"
|
|
552
|
-
v-bind="filterInputProps"
|
|
553
557
|
/>
|
|
554
558
|
</div>
|
|
555
559
|
</slot>
|
|
@@ -599,7 +603,12 @@ defineExpose({ focus, blur, reset, validate, setError, filterRef })
|
|
|
599
603
|
:outlined="!(isDisabled || options?.find((i) => i.value === value)?.disabled)"
|
|
600
604
|
:disabled="isDisabled || options?.find((i) => i.value === value)?.disabled"
|
|
601
605
|
@remove="(e: Event) => { handleRemove(e, value) }"
|
|
602
|
-
>
|
|
606
|
+
>
|
|
607
|
+
<template #prefix>
|
|
608
|
+
<slot name="tag-prefix" :item="options?.find((i) => i.value === value)"></slot>
|
|
609
|
+
</template>
|
|
610
|
+
{{ getLabel(value) }}
|
|
611
|
+
</x-tag>
|
|
603
612
|
</x-popover-container>
|
|
604
613
|
</template>
|
|
605
614
|
</x-popover>
|
|
@@ -67,11 +67,18 @@ const { styles, classes, className } = useTheme('Tag', {}, props)
|
|
|
67
67
|
]"
|
|
68
68
|
>
|
|
69
69
|
<span
|
|
70
|
-
|
|
71
|
-
class="
|
|
70
|
+
class="max-w-full"
|
|
71
|
+
:class="{'pr-4': removable }"
|
|
72
72
|
>
|
|
73
|
-
<
|
|
74
|
-
|
|
73
|
+
<div class="flex items-center gap-2">
|
|
74
|
+
<slot name="prefix"></slot>
|
|
75
|
+
|
|
76
|
+
<div class="truncate">
|
|
77
|
+
<slot></slot>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div v-if="removable" class="absolute right-1.5 top-0 h-full flex items-center">
|
|
75
82
|
<x-icon
|
|
76
83
|
:size="closeIconSize"
|
|
77
84
|
:icon="closeIcon"
|
|
@@ -81,7 +88,5 @@ const { styles, classes, className } = useTheme('Tag', {}, props)
|
|
|
81
88
|
/>
|
|
82
89
|
</div>
|
|
83
90
|
</span>
|
|
84
|
-
|
|
85
|
-
<slot v-else></slot>
|
|
86
91
|
</component>
|
|
87
92
|
</template>
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.
|
|
1
|
+
export default '1.12.0'
|