@finema/core 3.15.0 → 3.15.2
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
:icon="icon"
|
|
14
14
|
:ui="ui"
|
|
15
15
|
:ignore-filter="ignoreFilter"
|
|
16
|
-
:leading-icon="options.find((
|
|
17
|
-
:avatar="options.find((
|
|
16
|
+
:leading-icon="options.find((item2) => item2.value === value)?.icon"
|
|
17
|
+
:avatar="options.find((item2) => item2.value === value)?.avatar"
|
|
18
18
|
@update:modelValue="onChange"
|
|
19
19
|
@update:searchTerm="onSearch"
|
|
20
20
|
>
|
|
21
21
|
<template #default="{ modelValue, ui: selectMenuUi }">
|
|
22
22
|
<Chip
|
|
23
|
-
v-if="options.find((
|
|
24
|
-
v-bind="options.find((
|
|
23
|
+
v-if="options.find((item2) => item2.value === modelValue)?.chip"
|
|
24
|
+
v-bind="options.find((item2) => item2.value === modelValue)?.chip"
|
|
25
25
|
inset
|
|
26
26
|
standalone
|
|
27
27
|
:size="selectMenuUi.itemLeadingChipSize()"
|
|
@@ -66,6 +66,46 @@
|
|
|
66
66
|
/>
|
|
67
67
|
</div>
|
|
68
68
|
</template>
|
|
69
|
+
|
|
70
|
+
<template #item="{ item }">
|
|
71
|
+
<div
|
|
72
|
+
v-if="item?.type === 'separator'"
|
|
73
|
+
class="my-1 h-px bg-gray-200"
|
|
74
|
+
/>
|
|
75
|
+
<div
|
|
76
|
+
v-else
|
|
77
|
+
class="flex items-center gap-x-2"
|
|
78
|
+
>
|
|
79
|
+
<Chip
|
|
80
|
+
v-if="item?.chip"
|
|
81
|
+
v-bind="item.chip"
|
|
82
|
+
inset
|
|
83
|
+
standalone
|
|
84
|
+
size="2xs"
|
|
85
|
+
/>
|
|
86
|
+
<Icon
|
|
87
|
+
v-if="item?.icon"
|
|
88
|
+
:name="item.icon"
|
|
89
|
+
class="size-4"
|
|
90
|
+
/>
|
|
91
|
+
<Avatar
|
|
92
|
+
v-if="item?.avatar"
|
|
93
|
+
v-bind="item.avatar"
|
|
94
|
+
size="2xs"
|
|
95
|
+
/>
|
|
96
|
+
<component
|
|
97
|
+
:is="item?.component"
|
|
98
|
+
v-if="componentPosition === 'leading' && item?.component"
|
|
99
|
+
v-bind="item?.componentProps"
|
|
100
|
+
/>
|
|
101
|
+
<span class="truncate">{{ item?.label ?? item?.value }}</span>
|
|
102
|
+
<component
|
|
103
|
+
:is="item?.component"
|
|
104
|
+
v-if="componentPosition === 'trailing' && item?.component"
|
|
105
|
+
v-bind="item?.componentProps"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
69
109
|
</SelectMenu>
|
|
70
110
|
</FieldWrapper>
|
|
71
111
|
</template>
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"
|
|
37
37
|
>
|
|
38
38
|
<Chip
|
|
39
|
-
v-if="options.find((
|
|
40
|
-
v-bind="options.find((
|
|
39
|
+
v-if="options.find((item2) => item2.value === _value)?.chip"
|
|
40
|
+
v-bind="options.find((item2) => item2.value === _value)?.chip"
|
|
41
41
|
inset
|
|
42
42
|
standalone
|
|
43
43
|
:size="selectMenuUi.itemLeadingChipSize()"
|
|
44
44
|
class="p-1"
|
|
45
45
|
/>
|
|
46
46
|
<Icon
|
|
47
|
-
v-if="options.find((
|
|
48
|
-
:name="options.find((
|
|
47
|
+
v-if="options.find((item2) => item2.value === _value)?.icon"
|
|
48
|
+
:name="options.find((item2) => item2.value === _value)?.icon"
|
|
49
49
|
class="size-4"
|
|
50
50
|
/>
|
|
51
51
|
<Avatar
|
|
52
|
-
v-if="options.find((
|
|
53
|
-
v-bind="options.find((
|
|
52
|
+
v-if="options.find((item2) => item2.value === _value)?.avatar"
|
|
53
|
+
v-bind="options.find((item2) => item2.value === _value)?.avatar"
|
|
54
54
|
:class="selectMenuUi.itemLeadingAvatar()"
|
|
55
55
|
size="2xs"
|
|
56
56
|
/>
|
|
@@ -93,6 +93,46 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
</template>
|
|
96
|
+
|
|
97
|
+
<template #item="{ item }">
|
|
98
|
+
<div
|
|
99
|
+
v-if="item?.type === 'separator'"
|
|
100
|
+
class="my-1 h-px bg-gray-200"
|
|
101
|
+
/>
|
|
102
|
+
<div
|
|
103
|
+
v-else
|
|
104
|
+
class="flex items-center gap-x-2"
|
|
105
|
+
>
|
|
106
|
+
<Chip
|
|
107
|
+
v-if="item?.chip"
|
|
108
|
+
v-bind="item.chip"
|
|
109
|
+
inset
|
|
110
|
+
standalone
|
|
111
|
+
size="2xs"
|
|
112
|
+
/>
|
|
113
|
+
<Icon
|
|
114
|
+
v-if="item?.icon"
|
|
115
|
+
:name="item.icon"
|
|
116
|
+
class="size-4"
|
|
117
|
+
/>
|
|
118
|
+
<Avatar
|
|
119
|
+
v-if="item?.avatar"
|
|
120
|
+
v-bind="item.avatar"
|
|
121
|
+
size="2xs"
|
|
122
|
+
/>
|
|
123
|
+
<component
|
|
124
|
+
:is="item?.component"
|
|
125
|
+
v-if="componentPosition === 'leading' && item?.component"
|
|
126
|
+
v-bind="item?.componentProps"
|
|
127
|
+
/>
|
|
128
|
+
<span class="truncate">{{ item?.label ?? item?.value }}</span>
|
|
129
|
+
<component
|
|
130
|
+
:is="item?.component"
|
|
131
|
+
v-if="componentPosition === 'trailing' && item?.component"
|
|
132
|
+
v-bind="item?.componentProps"
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</template>
|
|
96
136
|
</SelectMenu>
|
|
97
137
|
</FieldWrapper>
|
|
98
138
|
</template>
|