mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 19:06:35 +00:00
5b6a58fba0
- new vue app for serving live chat widget, created subdirectories inside frontend dir `main` and `widget` - vite changes for both main app and widget app. - new backend live chat channel - apis for live chat widget
48 lines
1.4 KiB
Vue
48 lines
1.4 KiB
Vue
<script setup>
|
|
import { computed } from 'vue'
|
|
import { ComboboxRoot, useForwardPropsEmits } from 'radix-vue'
|
|
import { cn } from '../../../lib/utils'
|
|
|
|
const props = defineProps({
|
|
modelValue: { type: null, required: false, default: '' },
|
|
defaultValue: { type: null, required: false },
|
|
open: { type: Boolean, required: false, default: true },
|
|
defaultOpen: { type: Boolean, required: false },
|
|
searchTerm: { type: String, required: false },
|
|
multiple: { type: Boolean, required: false },
|
|
disabled: { type: Boolean, required: false },
|
|
name: { type: String, required: false },
|
|
dir: { type: String, required: false },
|
|
filterFunction: { type: Function, required: false },
|
|
displayValue: { type: Function, required: false },
|
|
resetSearchTermOnBlur: { type: Boolean, required: false },
|
|
asChild: { type: Boolean, required: false },
|
|
as: { type: null, required: false },
|
|
class: { type: null, required: false }
|
|
})
|
|
|
|
const emits = defineEmits(['update:modelValue', 'update:open', 'update:searchTerm'])
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props
|
|
|
|
return delegated
|
|
})
|
|
|
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
</script>
|
|
|
|
<template>
|
|
<ComboboxRoot
|
|
v-bind="forwarded"
|
|
:class="
|
|
cn(
|
|
'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',
|
|
props.class
|
|
)
|
|
"
|
|
>
|
|
<slot />
|
|
</ComboboxRoot>
|
|
</template>
|