diff --git a/l10n/messages.pot b/l10n/messages.pot index b60f063b..3d9251f3 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -26,11 +26,11 @@ msgstr "" msgid "Copy" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:213 +#: lib/components/FilePicker/FilePicker.vue:214 msgid "Could not create the new folder" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:136 +#: lib/components/FilePicker/FilePicker.vue:137 #: lib/components/FilePicker/FilePickerNavigation.vue:65 msgid "Favorites" msgstr "" @@ -51,7 +51,7 @@ msgstr "" msgid "Name" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:136 +#: lib/components/FilePicker/FilePicker.vue:137 #: lib/components/FilePicker/FilePickerNavigation.vue:61 msgid "Recent" msgstr "" diff --git a/lib/components/DialogBase.vue b/lib/components/DialogBase.vue index 448b104c..ed66a107 100644 --- a/lib/components/DialogBase.vue +++ b/lib/components/DialogBase.vue @@ -1,6 +1,6 @@ @@ -38,7 +38,6 @@ import { NcModal } from '@nextcloud/vue' import { computed, ref, useSlots } from 'vue' import DialogButton, { type IDialogButton } from './DialogButton.vue' -import { Fragment } from 'vue-frag' // can be dropped with vue3 import { useElementSize } from '@vueuse/core' const props = withDefaults(defineProps<{ @@ -46,14 +45,16 @@ const props = withDefaults(defineProps<{ name: string /** Text of the dialog */ message?: string + /** Additional elements to add to the focus trap */ + additionalTrapElements?: string[] /** - * The element here to mount the dialog + * The element where to mount the dialog, if `null` is passed the dialog is mounted in place * @default 'body' */ - container?: string + container?: string | null /** * Size of the underlying NcModal - * @default 'normal' + * @default 'small' */ size?: 'small' | 'normal' | 'large' | 'full' /** @@ -76,12 +77,19 @@ const props = withDefaults(defineProps<{ * ``` */ navigationClasses?: string[] + /** + * Optionally pass additionaly classes which will be set on the content wrapper for custom styling + * @default [] + */ + contentClasses?: string[] }>(), { - size: 'normal', - container: 'body', - message: '', + additionalTrapElements: () => [], buttons: () => [], + container: undefined, + message: '', + contentClasses: () => [], navigationClasses: () => [], + size: 'small', }) const emit = defineEmits<{ @@ -128,7 +136,8 @@ const handleClose = () => { * Properties to pass to the underlying NcModal */ const modalProps = computed(() => ({ - container: props.container, + additionalTrapElements: props.additionalTrapElements, + container: props.container === undefined ? 'body' : props.container, name: props.name, size: props.size, enableSlideshow: false, @@ -138,11 +147,25 @@ const modalProps = computed(() => ({