pull/5161/head
mertsincan 2024-01-24 10:50:48 +00:00
commit 02ecd32420
3 changed files with 87 additions and 116 deletions

View File

@ -23743,6 +23743,30 @@
"default": "", "default": "",
"description": "Used to pass attributes to the item's DOM element." "description": "Used to pass attributes to the item's DOM element."
}, },
{
"name": "itemLabel",
"optional": true,
"readonly": false,
"type": "DropdownPassThroughOptionType<T>",
"default": "",
"description": "Used to pass attributes to the item label's DOM element."
},
{
"name": "tickIcon",
"optional": true,
"readonly": false,
"type": "DropdownPassThroughOptionType<T>",
"default": "",
"description": "Used to pass attributes to the tick icon's DOM element."
},
{
"name": "blankIcon",
"optional": true,
"readonly": false,
"type": "DropdownPassThroughOptionType<T>",
"default": "",
"description": "Used to pass attributes to the bank icon's DOM element."
},
{ {
"name": "emptyMessage", "name": "emptyMessage",
"optional": true, "optional": true,
@ -24230,6 +24254,22 @@
"default": "true", "default": "true",
"description": "When enabled, the focus is placed on the hovered option." "description": "When enabled, the focus is placed on the hovered option."
}, },
{
"name": "highlightOnSelect",
"optional": true,
"readonly": false,
"type": "boolean",
"default": "false",
"description": "Highlights automatically the first item."
},
{
"name": "showTick",
"optional": true,
"readonly": false,
"type": "boolean",
"default": "true",
"description": "Whether the selected option will be shown with a tick."
},
{ {
"name": "filterMessage", "name": "filterMessage",
"optional": true, "optional": true,

View File

@ -26,36 +26,14 @@
<div> <div>
<span class="font-medium text-900 block mb-2">Team Members</span> <span class="font-medium text-900 block mb-2">Team Members</span>
<ul class="list-none p-0 m-0 flex flex-column gap-3"> <ul class="list-none p-0 m-0 flex flex-column gap-3">
<li class="flex align-items-center gap-2"> <li v-for="member in members" :key="member.name" class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" /> <img :src="`https://primefaces.org/cdn/primevue/images/avatar/${member.image}`" style="width: 32px" />
<div> <div>
<span class="font-medium">Amy Elsner</span> <span class="font-medium">{{ member.name }}</span>
<div class="text-sm text-color-secondary">amy@email.com</div> <div class="text-sm text-color-secondary">{{ member.email }}</div>
</div> </div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm"> <div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Owner</span> <span>{{ member.role }}</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
<div>
<span class="font-medium">Bernardo Dominic</span>
<div class="text-sm text-color-secondary">bernardo@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Editor</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
<div>
<span class="font-medium">Ioni Bowcher Elsner</span>
<div class="text-sm text-color-secondary">ioni@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Viewer</span>
<i class="pi pi-angle-down"></i> <i class="pi pi-angle-down"></i>
</div> </div>
</li> </li>
@ -71,6 +49,11 @@
export default { export default {
data() { data() {
return { return {
members: [
{ name: 'Amy Elsner', image: 'amyelsner.png', email: 'amy@email.com', role: 'Owner' },
{ name: 'Bernardo Dominic', image: 'bernardodominic.png', email: 'bernardo@email.com', role: 'Editor' },
{ name: 'Ioni Bowcher', image: 'ionibowcher.png', email: 'ioni@email.com', role: 'Viewer' }
],
code: { code: {
basic: ` basic: `
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" /> <Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
@ -96,36 +79,14 @@ export default {
<div> <div>
<span class="font-medium text-900 block mb-2">Team Members</span> <span class="font-medium text-900 block mb-2">Team Members</span>
<ul class="list-none p-0 m-0 flex flex-column gap-3"> <ul class="list-none p-0 m-0 flex flex-column gap-3">
<li class="flex align-items-center gap-2"> <li v-for="member in members" :key="member.name" class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" /> <img :src="\`https://primefaces.org/cdn/primevue/images/avatar/\${member.image}\`" style="width: 32px" />
<div> <div>
<span class="font-medium">Amy Elsner</span> <span class="font-medium">{{ member.name }}</span>
<div class="text-sm text-color-secondary">amy@email.com</div> <div class="text-sm text-color-secondary">{{ member.email }}</div>
</div> </div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm"> <div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Owner</span> <span>{{ member.role }}</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
<div>
<span class="font-medium">Bernardo Dominic</span>
<div class="text-sm text-color-secondary">bernardo@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Editor</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
<div>
<span class="font-medium">Ioni Bowcher Elsner</span>
<div class="text-sm text-color-secondary">ioni@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Viewer</span>
<i class="pi pi-angle-down"></i> <i class="pi pi-angle-down"></i>
</div> </div>
</li> </li>
@ -160,36 +121,14 @@ export default {
<div> <div>
<span class="font-medium text-900 block mb-2">Team Members</span> <span class="font-medium text-900 block mb-2">Team Members</span>
<ul class="list-none p-0 m-0 flex flex-column gap-3"> <ul class="list-none p-0 m-0 flex flex-column gap-3">
<li class="flex align-items-center gap-2"> <li v-for="member in members" :key="member.name" class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" /> <img :src="\`https://primefaces.org/cdn/primevue/images/avatar/\${member.image}\`" style="width: 32px" />
<div> <div>
<span class="font-medium">Amy Elsner</span> <span class="font-medium">{{ member.name }}</span>
<div class="text-sm text-color-secondary">amy@email.com</div> <div class="text-sm text-color-secondary">{{ member.email }}</div>
</div> </div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm"> <div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Owner</span> <span>{{ member.role }}</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
<div>
<span class="font-medium">Bernardo Dominic</span>
<div class="text-sm text-color-secondary">bernardo@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Editor</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
<div>
<span class="font-medium">Ioni Bowcher Elsner</span>
<div class="text-sm text-color-secondary">ioni@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Viewer</span>
<i class="pi pi-angle-down"></i> <i class="pi pi-angle-down"></i>
</div> </div>
</li> </li>
@ -202,6 +141,15 @@ export default {
<script> <script>
export default { export default {
data() {
return {
members: [
{ name: 'Amy Elsner', image: 'amyelsner.png', email: 'amy@email.com', role: 'Owner' },
{ name: 'Bernardo Dominic', image: 'bernardodominic.png', email: 'bernardo@email.com', role: 'Editor' },
{ name: 'Ioni Bowcher', image: 'ionibowcher.png', email: 'ioni@email.com', role: 'Viewer' }
]
}
},
methods: { methods: {
toggle(event) { toggle(event) {
this.$refs.op.toggle(event); this.$refs.op.toggle(event);
@ -236,36 +184,14 @@ export default {
<div> <div>
<span class="font-medium text-900 block mb-2">Team Members</span> <span class="font-medium text-900 block mb-2">Team Members</span>
<ul class="list-none p-0 m-0 flex flex-column gap-3"> <ul class="list-none p-0 m-0 flex flex-column gap-3">
<li class="flex align-items-center gap-2"> <li v-for="member in members" :key="member.name" class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" style="width: 32px" /> <img :src="\`https://primefaces.org/cdn/primevue/images/avatar/\${member.image}\`" style="width: 32px" />
<div> <div>
<span class="font-medium">Amy Elsner</span> <span class="font-medium">{{ member.name }}</span>
<div class="text-sm text-color-secondary">amy@email.com</div> <div class="text-sm text-color-secondary">{{ member.email }}</div>
</div> </div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm"> <div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Owner</span> <span>{{ member.role }}</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/bernardodominic.png" style="width: 32px" />
<div>
<span class="font-medium">Bernardo Dominic</span>
<div class="text-sm text-color-secondary">bernardo@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Editor</span>
<i class="pi pi-angle-down"></i>
</div>
</li>
<li class="flex align-items-center gap-2">
<img src="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" style="width: 32px" />
<div>
<span class="font-medium">Ioni Bowcher Elsner</span>
<div class="text-sm text-color-secondary">ioni@email.com</div>
</div>
<div class="flex align-items-center gap-2 text-color-secondary ml-auto text-sm">
<span>Viewer</span>
<i class="pi pi-angle-down"></i> <i class="pi pi-angle-down"></i>
</div> </div>
</li> </li>
@ -280,6 +206,11 @@ export default {
import { ref } from "vue"; import { ref } from "vue";
const op = ref(); const op = ref();
const members = ref([
{ name: 'Amy Elsner', image: 'amyelsner.png', email: 'amy@email.com', role: 'Owner' },
{ name: 'Bernardo Dominic', image: 'bernardodominic.png', email: 'bernardo@email.com', role: 'Editor' },
{ name: 'Ioni Bowcher', image: 'ionibowcher.png', email: 'ioni@email.com', role: 'Viewer' }
]);
const toggle = (event) => { const toggle = (event) => {
op.value.toggle(event); op.value.toggle(event);

View File

@ -15,8 +15,8 @@
<label class="text-right text-xs text-white">{{ progress }}% uploaded...</label> <label class="text-right text-xs text-white">{{ progress }}% uploaded...</label>
</div> </div>
<div class="flex gap-3 mb-3"> <div class="flex gap-3 mb-3">
<Button label="Another Upload?" text class="p-0" @click="closeCallback"></Button> <Button label="Another Upload?" text class="py-1 px-2" @click="closeCallback"></Button>
<Button label="Cancel" text class="text-white p-0" @click="closeCallback"></Button> <Button label="Cancel" text class="text-white py-1 px-2" @click="closeCallback"></Button>
</div> </div>
</div> </div>
</section> </section>
@ -48,8 +48,8 @@ export default {
<label class="text-right text-xs text-white">{{ progress }}% uploaded...</label> <label class="text-right text-xs text-white">{{ progress }}% uploaded...</label>
</div> </div>
<div class="flex gap-3 mb-3"> <div class="flex gap-3 mb-3">
<Button label="Another Upload?" text class="p-0" @click="closeCallback"></Button> <Button label="Another Upload?" text class="py-1 px-2" @click="closeCallback"></Button>
<Button label="Cancel" text class="text-white p-0" @click="closeCallback"></Button> <Button label="Cancel" text class="text-white py-1 px-2" @click="closeCallback"></Button>
</div> </div>
</div> </div>
</section> </section>
@ -72,8 +72,8 @@ export default {
<label class="text-right text-xs text-white">{{ progress }}% uploaded...</label> <label class="text-right text-xs text-white">{{ progress }}% uploaded...</label>
</div> </div>
<div class="flex gap-3 mb-3"> <div class="flex gap-3 mb-3">
<Button label="Another Upload?" text class="p-0" @click="closeCallback"></Button> <Button label="Another Upload?" text class="py-1 px-2" @click="closeCallback"></Button>
<Button label="Cancel" text class="text-white p-0" @click="closeCallback"></Button> <Button label="Cancel" text class="text-white py-1 px-2" @click="closeCallback"></Button>
</div> </div>
</div> </div>
</section> </section>
@ -139,8 +139,8 @@ export default {
<label class="text-right text-xs text-white">{{ progress }}% uploaded...</label> <label class="text-right text-xs text-white">{{ progress }}% uploaded...</label>
</div> </div>
<div class="flex gap-3 mb-3"> <div class="flex gap-3 mb-3">
<Button label="Another Upload?" text class="p-0" @click="closeCallback"></Button> <Button label="Another Upload?" text class="py-1 px-2" @click="closeCallback"></Button>
<Button label="Cancel" text class="text-white p-0" @click="closeCallback"></Button> <Button label="Cancel" text class="text-white py-1 px-2" @click="closeCallback"></Button>
</div> </div>
</div> </div>
</section> </section>