@nextcloud/vue 9.11.0 → 9.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/CHANGELOG.md +18 -0
- package/dist/assets/NcAppNavigationItem.css +45 -49
- package/dist/assets/NcAppNavigationList.css +2 -26
- package/dist/assets/NcAppNavigationNewItem.css +0 -4
- package/dist/assets/NcAppNavigationSettings.css +6 -6
- package/dist/assets/NcAppSettingsDialog.css +3 -3
- package/dist/assets/NcAppSettingsShortcutsSection.css +1 -1
- package/dist/assets/NcAppSidebar.css +28 -28
- package/dist/assets/NcAssistantButton.css +9 -9
- package/dist/assets/NcAssistantContent.css +3 -3
- package/dist/assets/NcAssistantIcon.css +4 -4
- package/dist/assets/NcAvatar.css +26 -26
- package/dist/assets/NcBlurHash.css +2 -2
- package/dist/assets/NcDateTimePicker.css +234 -234
- package/dist/assets/NcFilePicker.css +1 -1
- package/dist/assets/NcFormBox.css +11 -11
- package/dist/assets/NcFormBoxButton.css +2 -2
- package/dist/assets/NcFormBoxItem.css +15 -15
- package/dist/assets/NcFormBoxSwitch.css +2 -2
- package/dist/assets/NcFormGroup.css +7 -7
- package/dist/assets/NcHotkey.css +8 -8
- package/dist/assets/NcHotkeyList.css +2 -2
- package/dist/assets/NcIconToggleSwitch.css +4 -4
- package/dist/assets/NcKbd.css +3 -3
- package/dist/assets/NcModal.css +69 -63
- package/dist/assets/NcPopover.css +16 -16
- package/dist/assets/NcProfileHoverCard.css +82 -59
- package/dist/assets/NcRadioGroup.css +2 -2
- package/dist/assets/NcRadioGroupButton.css +14 -14
- package/dist/assets/NcRichContenteditable.css +17 -17
- package/dist/assets/NcRichText.css +2 -2
- package/dist/assets/NcUploadPicker.css +41 -0
- package/dist/assets/autolink.css +3 -3
- package/dist/chunks/NcActionInput.mjs +2 -2
- package/dist/chunks/NcActions.mjs +2 -2
- package/dist/chunks/NcAppContent.mjs +4 -4
- package/dist/chunks/NcAppContent.mjs.map +1 -1
- package/dist/chunks/NcAppNavigation.mjs +2 -2
- package/dist/chunks/NcAppNavigationItem.mjs +6 -29
- package/dist/chunks/NcAppNavigationItem.mjs.map +1 -1
- package/dist/chunks/NcAppNavigationList.mjs +8 -138
- package/dist/chunks/NcAppNavigationList.mjs.map +1 -1
- package/dist/chunks/NcAppNavigationNewItem.mjs +1 -1
- package/dist/chunks/NcAppNavigationNewItem.mjs.map +1 -1
- package/dist/chunks/NcAppNavigationSearch.mjs +2 -2
- package/dist/chunks/NcAppNavigationSettings.mjs +8 -8
- package/dist/chunks/NcAppSettingsDialog.mjs +5 -5
- package/dist/chunks/NcAppSettingsShortcutsSection.mjs +3 -3
- package/dist/chunks/NcAppSidebar.mjs +15 -15
- package/dist/chunks/NcAppSidebar.mjs.map +1 -1
- package/dist/chunks/NcAssistantButton.mjs +7 -7
- package/dist/chunks/NcAssistantContent.mjs +3 -3
- package/dist/chunks/NcAssistantIcon.mjs +4 -4
- package/dist/chunks/NcAvatar.mjs +17 -4
- package/dist/chunks/NcAvatar.mjs.map +1 -1
- package/dist/chunks/NcBlurHash.mjs +2 -2
- package/dist/chunks/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/chunks/NcCollectionList.mjs +3 -3
- package/dist/chunks/NcColorPicker.mjs +2 -2
- package/dist/chunks/NcContent.mjs +2 -2
- package/dist/chunks/NcDashboardWidget.mjs +4 -4
- package/dist/chunks/NcDashboardWidget.mjs.map +1 -1
- package/dist/chunks/NcDateTimePicker.mjs +7 -4
- package/dist/chunks/NcDateTimePicker.mjs.map +1 -1
- package/dist/chunks/NcDateTimePickerNative.mjs +2 -2
- package/dist/chunks/NcDialogButton.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/dist/chunks/NcEmojiPicker.mjs +2 -2
- package/dist/chunks/NcFilePicker.mjs +6 -5
- package/dist/chunks/NcFilePicker.mjs.map +1 -1
- package/dist/chunks/NcFormBox.mjs +5 -5
- package/dist/chunks/NcFormBoxButton.mjs +2 -2
- package/dist/chunks/NcFormBoxItem.mjs +8 -8
- package/dist/chunks/NcFormBoxSwitch.mjs +2 -2
- package/dist/chunks/NcFormGroup.mjs +7 -7
- package/dist/chunks/NcHotkey.mjs +4 -4
- package/dist/chunks/NcHotkeyList.mjs +4 -4
- package/dist/chunks/NcIconToggleSwitch.mjs +2 -2
- package/dist/chunks/NcKbd.mjs +4 -4
- package/dist/chunks/NcModal.mjs +13 -8
- package/dist/chunks/NcModal.mjs.map +1 -1
- package/dist/chunks/NcPasswordField.mjs +2 -2
- package/dist/chunks/NcPopover.mjs +2 -2
- package/dist/chunks/NcProfileHoverCard.mjs +205 -157
- package/dist/chunks/NcProfileHoverCard.mjs.map +1 -1
- package/dist/chunks/NcRadioGroup.mjs +2 -2
- package/dist/chunks/NcRadioGroupButton.mjs +6 -6
- package/dist/chunks/NcReferenceWidget.mjs +2 -2
- package/dist/chunks/NcRelatedResourcesPanel.mjs +4 -4
- package/dist/chunks/NcRichContenteditable.mjs +12 -12
- package/dist/chunks/NcRichText.mjs +3 -3
- package/dist/chunks/NcRichText.mjs.map +1 -1
- package/dist/chunks/NcSettingsSection.mjs +2 -2
- package/dist/chunks/NcSettingsSelectGroup.mjs +2 -2
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/dist/chunks/NcTimezonePicker.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/dist/chunks/NcUploadPicker.mjs +269 -0
- package/dist/chunks/NcUploadPicker.mjs.map +1 -0
- package/dist/chunks/NcUserStatusIcon.mjs +2 -2
- package/dist/chunks/_l10n.mjs +86 -84
- package/dist/chunks/_l10n.mjs.map +1 -1
- package/dist/chunks/autolink.mjs +3 -3
- package/dist/chunks/colors.mjs +2 -2
- package/dist/chunks/mdi.mjs +7 -5
- package/dist/chunks/mdi.mjs.map +1 -1
- package/dist/chunks/referencePickerModal.mjs +5 -5
- package/dist/components/NcActionInput/NcActionInput.vue.d.ts +3 -3
- package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +0 -4
- package/dist/components/NcAppNavigationList/NcAppNavigationList.vue.d.ts +1 -57
- package/dist/components/NcAvatar/NcAvatar.vue.d.ts +9 -0
- package/dist/components/NcCollectionList/NcCollectionList.vue.d.ts +8 -0
- package/dist/components/NcCollectionList/NcCollectionListItem.vue.d.ts +4 -0
- package/dist/components/NcDashboardWidget/NcDashboardWidget.vue.d.ts +8 -0
- package/dist/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue.d.ts +4 -0
- package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +2 -2
- package/dist/components/NcFilePicker/NcFilePicker.vue.d.ts +7 -0
- package/dist/components/NcListItemIcon/NcListItemIcon.vue.d.ts +5 -1
- package/dist/components/NcProfileHoverCard/NcProfileHoverCard.vue.d.ts +6 -0
- package/dist/components/NcUploadPicker/NcUploadPicker.vue.d.ts +180 -0
- package/dist/components/NcUploadPicker/index.d.ts +6 -0
- package/dist/components/NcUploadPicker/index.mjs +5 -0
- package/dist/components/NcUploadPicker/index.mjs.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/useFormatDateTime/index.mjs +2 -2
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -11
- package/dist/chunks/highlight.mjs +0 -5
- package/dist/chunks/highlight.mjs.map +0 -1
- package/dist/components/NcAppNavigationList/highlight.d.ts +0 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../assets/NcDateTimePickerNative.css';
|
|
2
2
|
import { defineComponent, useModel, computed, openBlock, createBlock, mergeProps, mergeModels } from "vue";
|
|
3
3
|
import { N as NcInputField } from "./NcInputField.mjs";
|
|
4
|
-
import { r as register, y as
|
|
4
|
+
import { r as register, y as t42, a as t } from "./_l10n.mjs";
|
|
5
5
|
import { c as createElementId } from "./createElementId.mjs";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.mjs";
|
|
7
|
-
register(
|
|
7
|
+
register(t42);
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
...{ inheritAttrs: false },
|
|
10
10
|
__name: "NcDateTimePickerNative",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
|
|
2
|
-
import { r as register, f as
|
|
2
|
+
import { r as register, f as t35, a as t } from "./_l10n.mjs";
|
|
3
3
|
import { N as NcButton } from "./NcButton.mjs";
|
|
4
4
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper.mjs";
|
|
5
5
|
import { N as NcLoadingIcon } from "./NcLoadingIcon.mjs";
|
|
6
|
-
register(
|
|
6
|
+
register(t35);
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "NcDialogButton",
|
|
9
9
|
props: {
|
|
@@ -7,7 +7,7 @@ import { _ as _export_sfc } from "./_plugin-vue_export-helper.mjs";
|
|
|
7
7
|
import { N as NcColorPicker } from "./NcColorPicker.mjs";
|
|
8
8
|
import { u as useTrapStackControl } from "./useTrapStackControl.mjs";
|
|
9
9
|
import { s as setCurrentSkinTone, g as getCurrentSkinTone } from "./emoji.mjs";
|
|
10
|
-
import { r as register, s as
|
|
10
|
+
import { r as register, s as t45, u as t39, v as t17, w as t5, a as t } from "./_l10n.mjs";
|
|
11
11
|
import { C as Color } from "./colors.mjs";
|
|
12
12
|
import { N as NcButton } from "./NcButton.mjs";
|
|
13
13
|
import { N as NcPopover } from "./NcPopover.mjs";
|
|
@@ -55,7 +55,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
55
55
|
], 16, _hoisted_1$1);
|
|
56
56
|
}
|
|
57
57
|
const IconCircle = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
58
|
-
register(
|
|
58
|
+
register(t5, t17, t39, t45);
|
|
59
59
|
let emojiIndex;
|
|
60
60
|
const i18n = {
|
|
61
61
|
search: t("Search emoji"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcFilePicker.css';
|
|
2
|
-
import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, defineComponent, useTemplateRef, computed, normalizeClass, createVNode, withCtx, createBlock, createTextVNode, unref, Fragment, renderList, renderSlot
|
|
2
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, defineComponent, useTemplateRef, computed, nextTick, normalizeClass, createVNode, withCtx, createBlock, createTextVNode, unref, Fragment, renderList, renderSlot } from "vue";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.mjs";
|
|
4
4
|
import { N as NcActionButton } from "./NcActionButton.mjs";
|
|
5
5
|
import { N as NcActionCaption } from "./NcActionCaption.mjs";
|
|
@@ -165,7 +165,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
165
|
const props = __props;
|
|
166
166
|
const emit = __emit;
|
|
167
167
|
__expose({
|
|
168
|
-
reset
|
|
168
|
+
reset,
|
|
169
|
+
triggerPickFiles
|
|
169
170
|
});
|
|
170
171
|
const formElement = useTemplateRef("form");
|
|
171
172
|
const inputElement = useTemplateRef("input");
|
|
@@ -209,9 +210,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
209
210
|
variant: __props.variant
|
|
210
211
|
}, {
|
|
211
212
|
icon: withCtx(() => [
|
|
212
|
-
!__props.loading ? renderSlot(_ctx.$slots, "icon", {
|
|
213
|
+
!__props.loading ? renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
213
214
|
createVNode(IconPlus, { size: 20 })
|
|
214
|
-
]) : (openBlock(), createBlock(NcLoadingIcon, { key: 1 }))
|
|
215
|
+
], void 0, 0) : (openBlock(), createBlock(NcLoadingIcon, { key: 1 }))
|
|
215
216
|
]),
|
|
216
217
|
default: withCtx(() => [
|
|
217
218
|
__props.actionCaption ? (openBlock(), createBlock(NcActionCaption, {
|
|
@@ -289,7 +290,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
289
290
|
};
|
|
290
291
|
}
|
|
291
292
|
});
|
|
292
|
-
const filePicker = "
|
|
293
|
+
const filePicker = "_filePicker_BUlcx";
|
|
293
294
|
const style0 = {
|
|
294
295
|
filePicker
|
|
295
296
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcFilePicker.mjs","sources":["../../node_modules/vue-material-design-icons/FolderUpload.vue","../../node_modules/vue-material-design-icons/Plus.vue","../../node_modules/vue-material-design-icons/Upload.vue","../../src/l10n.ts","../../src/components/NcFilePicker/NcFilePicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon folder-upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"FolderUploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","/*!\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// This is only a dummy file, the real translations are injected by the vite plugin from build/l10n-plugin!\nimport { getGettextBuilder } from '@nextcloud/l10n/gettext'\n\nconst gtBuilder = getGettextBuilder().detectLanguage()\nconst gt = gtBuilder.build()\n\nconst n = gt.ngettext.bind(gt)\nconst t = gt.gettext.bind(gt)\n\nexport { n, t }\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed, nextTick, useTemplateRef } from 'vue'\nimport IconFolderUpload from 'vue-material-design-icons/FolderUpload.vue'\nimport IconPlus from 'vue-material-design-icons/Plus.vue'\nimport IconUpload from 'vue-material-design-icons/Upload.vue'\nimport NcActionButton from '../NcActionButton/NcActionButton.vue'\nimport NcActionCaption from '../NcActionCaption/NcActionCaption.vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcLoadingIcon from '../NcLoadingIcon/NcLoadingIcon.vue'\nimport { t } from '../../l10n.js'\n\nexport interface FilePickerItem {\n\t/**\n\t * SVG icon (as string) for the action\n\t */\n\ticonSvg: string\n\t/**\n\t * Label of the action\n\t */\n\tlabel: string\n\t/**\n\t * Callback when the action is clicked\n\t */\n\tonClick: () => void\n}\n\nexport interface FilePickerItemGroup {\n\t/**\n\t * Caption for the action group\n\t */\n\tcaption: string\n\t/**\n\t * Actions within this group\n\t */\n\tactions: FilePickerItem[]\n}\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * File types to accept\n\t */\n\taccept?: string[]\n\n\t/**\n\t * Optional menu caption to be shown above the actions\n\t */\n\tactionCaption?: string\n\n\t/**\n\t * Additional actions to be shown within the picker menu\n\t */\n\tactions?: FilePickerItem[] | FilePickerItemGroup[]\n\n\t/**\n\t * Allow picking a directory\n\t */\n\tdirectory?: boolean\n\n\t/**\n\t * Disable picking files and only allow picking a directory\n\t */\n\tdirectoryOnly?: boolean\n\n\t/**\n\t * Disabled state of the picker\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * If set then the label is only used for accessibility but not shown visually\n\t */\n\ticonOnly?: boolean\n\n\t/**\n\t * Label of the picker\n\t *\n\t * @default 'Pick file' or 'Pick files' depending on `multiple`\n\t */\n\tlabel?: string\n\n\t/**\n\t * If set then the picker will be set into a loading state.\n\t * This means the picker is disabled, a loading spinner is shown and the label is adjusted.\n\t */\n\tloading?: boolean\n\n\t/**\n\t * Can the user pick multiple files.\n\t * This is ignored when picking folder (by browser limitations).\n\t */\n\tmultiple?: boolean\n\n\t/**\n\t * The variant of the button\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary'\n}>(), {\n\tactions: () => [],\n\taccept: undefined,\n\tactionCaption: '',\n\tlabel: undefined,\n\tvariant: 'primary',\n})\n\nconst emit = defineEmits<{\n\tpick: [files: File[]]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Optional custom icon for the picker menu\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Optional content to be shown in the picker.\n\t * This can be used e.g. for a progress bar or similar.\n\t */\n\tdefault?: Slot\n}>()\n\ndefineExpose({\n\treset,\n})\n\nconst formElement = useTemplateRef('form')\nconst inputElement = useTemplateRef('input')\n\n/**\n * The current label to be used as menu name and accessible name of the picker.\n */\nconst currentLabel = computed(() => {\n\tif (props.loading) {\n\t\treturn t('Uploading …')\n\t} else if (props.label) {\n\t\treturn props.label\n\t} else if (props.directoryOnly) {\n\t\treturn t('Pick folder')\n\t}\n\treturn props.multiple ? t('Pick files') : t('Pick file')\n})\n\n/**\n * Check whether the current browser supports uploading directories\n * Hint: This does not check if the current connection supports this, as some browsers require a secure context!\n */\nconst canUploadFolders = computed(() => {\n\treturn (props.directory || props.directoryOnly) && 'webkitdirectory' in HTMLInputElement.prototype\n})\n\n/**\n * Trigger file picker\n *\n * @param uploadFolders - Whether to upload folders or files\n */\nfunction triggerPickFiles(uploadFolders: boolean) {\n\t// Without reset selecting the same file doesn't trigger the change event\n\treset()\n\n\t// Only if the browser supports picking folders and the user selected \"pick folder\" we set the file input to directory picking.\n\tif (canUploadFolders.value) {\n\t\tinputElement.value!.webkitdirectory = uploadFolders\n\t}\n\n\t// Wait for the reset and the `webkitdirectory` to be dispatched in DOM\n\tnextTick(() => inputElement.value!.click())\n}\n\n/**\n * Handle picking some local files\n */\nfunction onPick() {\n\tconst files = inputElement.value?.files ? Array.from(inputElement.value.files) : []\n\temit('pick', files)\n}\n\n/**\n * Reset the picker state of the currently selected files.\n */\nfunction reset() {\n\tformElement.value!.reset()\n}\n</script>\n\n<template>\n\t<form\n\t\tref=\"form\"\n\t\t:class=\"$style.filePicker\">\n\t\t<NcActions\n\t\t\t:aria-label=\"currentLabel\"\n\t\t\t:disabled=\"disabled || loading\"\n\t\t\t:menuName=\"iconOnly ? undefined : currentLabel\"\n\t\t\t:forceName=\"!iconOnly\"\n\t\t\t:variant>\n\t\t\t<template #icon>\n\t\t\t\t<slot v-if=\"!loading\" name=\"icon\">\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</slot>\n\t\t\t\t<NcLoadingIcon v-else />\n\t\t\t</template>\n\n\t\t\t<NcActionCaption v-if=\"actionCaption\" :name=\"actionCaption\" />\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"!directoryOnly\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(false)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconUpload :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ canUploadFolders || $slots.actions ? (multiple ? t('Upload files') : t('Upload file')) : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"canUploadFolders\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(true)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFolderUpload style=\"color: var(--color-primary-element)\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ !directoryOnly || $slots.actions ? t('Upload folder') : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<template v-for=\"group of actions\">\n\t\t\t\t<NcActionCaption\n\t\t\t\t\tv-if=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:key=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:name=\"(group as FilePickerItemGroup).caption\" />\n\n\t\t\t\t<NcActionButton\n\t\t\t\t\tv-for=\"action of (group as FilePickerItemGroup).actions ?? [group as FilePickerItem]\"\n\t\t\t\t\t:key=\"action.label\"\n\t\t\t\t\tcloseAfterClick\n\t\t\t\t\t@click=\"action.onClick\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :svg=\"action.iconSvg\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcActions>\n\n\t\t<!-- Hidden files picker input - also hidden for accessibility as otherwise such users also loose the ability to pick files -->\n\t\t<input\n\t\t\tref=\"input\"\n\t\t\t:accept=\"accept?.join(', ')\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple\n\t\t\ttype=\"file\"\n\t\t\t@change=\"onPick\">\n\n\t\t<slot />\n\t</form>\n</template>\n\n<style module>\n.filePicker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\theight: var(--default-clickable-area);\n}\n</style>\n\n<docs>\nThis component allows to pick local files (or directories) which can be used to upload them to Nextcloud or directly process them in the browser.\n\n### Exposed methods\n\n- `function reset(): void`\n This method allows to reset the internal state of the file picker to clear the current selection\n\n### Example\n\n```vue\n<template>\n\t<div>\n\t\t<div class=\"wrapper\">\n\t\t\t<NcFilePicker ref=\"picker\"\n\t\t\t\tdirectory\n\t\t\t\t@pick=\"selectedFiles = $event\" />\n\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t@click=\"clearPicker\">\n\t\t\t\tClear\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h3>Selected files:</h3>\n\t\t<ul>\n\t\t\t<li v-for=\"file in selectedFiles\" key=\"file.name\">\n\t\t\t\t{{ file.webkitRelativePath || file.name }}\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tselectedFiles: [],\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t/**\n\t\t\t * This will clear the selected files from the picker.\n\t\t\t */\n\t\t\tclearPicker() {\n\t\t\t\tthis.$refs.picker.reset()\n\t\t\t},\n\t\t},\n\t}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 10px;\n}\n</style>\n```\n</docs>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_normalizeClass","$style","_createVNode","_renderSlot","_createBlock","_createTextVNode","_toDisplayString","$slots","_unref","_Fragment","_renderList"],"mappings":";;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,yHAAwH;;;sBAXpIC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IAClB,cAAY,OAAA;AAAA,IACb,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAK,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAA;AAAA,MACP,OAAM;AAAA,MACL,OAAO,OAAA;AAAA,MACP,QAAQ,OAAA;AAAA,MACT,SAAQ;AAAA;MACXE,mBAEO,QAFPH,cAEO;AAAA,QADQ,OAAA,SAAbI,UAAA,GAAAH,mBAAuC,uCAAhB,OAAA,KAAK,GAAA,CAAA;;;;;;ACOpC,MAAKF,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;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AAAA,cAAA;;;8BAGxEZ,mBAgBWa,UAAA,MAAAC,WAhBe,QAAA,SAAO,CAAhB,UAAK;;gBAEb,MAA8B,wBADtCN,YAGkD,iBAAA;AAAA,kBADhD,KAAM,MAA8B;AAAA,kBACpC,MAAO,MAA8B;AAAA,gBAAA;iBAEvCL,UAAA,IAAA,GAAAH,mBASiBa,2BARE,MAA8B,WAAO,CAAK,SAArD,WAAM;sCADdL,YASiB,gBAAA;AAAA,oBAPf,KAAK,OAAO;AAAA,oBACb,iBAAA;AAAA,oBACC,SAAO,OAAO;AAAA,kBAAA;oBACJ,cACV,MAA0C;AAAA,sBAA1CF,YAA0C,kBAAA;AAAA,wBAAvB,KAAK,OAAO;AAAA,sBAAA;;qCACrB,MACX;AAAA,sCADW,MACXI,gBAAG,OAAO,KAAK,GAAA,CAAA;AAAA,oBAAA;;;;;;;;;QAMlBR,mBAOkB,SAAA;AAAA,UANjB,KAAI;AAAA,UACH,QAAQ,QAAA,QAAQ,KAAI,IAAA;AAAA,UACrB,eAAY;AAAA,UACZ,OAAM;AAAA,UACL,UAAA,QAAA;AAAA,UACD,MAAK;AAAA,UACJ,UAAQ;AAAA,QAAA;QAEVK,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"NcFilePicker.mjs","sources":["../../node_modules/vue-material-design-icons/FolderUpload.vue","../../node_modules/vue-material-design-icons/Plus.vue","../../node_modules/vue-material-design-icons/Upload.vue","../../src/l10n.ts","../../src/components/NcFilePicker/NcFilePicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon folder-upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"FolderUploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","/*!\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// This is only a dummy file, the real translations are injected by the vite plugin from build/l10n-plugin!\nimport { getGettextBuilder } from '@nextcloud/l10n/gettext'\n\nconst gtBuilder = getGettextBuilder().detectLanguage()\nconst gt = gtBuilder.build()\n\nconst n = gt.ngettext.bind(gt)\nconst t = gt.gettext.bind(gt)\n\nexport { n, t }\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed, nextTick, useTemplateRef } from 'vue'\nimport IconFolderUpload from 'vue-material-design-icons/FolderUpload.vue'\nimport IconPlus from 'vue-material-design-icons/Plus.vue'\nimport IconUpload from 'vue-material-design-icons/Upload.vue'\nimport NcActionButton from '../NcActionButton/NcActionButton.vue'\nimport NcActionCaption from '../NcActionCaption/NcActionCaption.vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcLoadingIcon from '../NcLoadingIcon/NcLoadingIcon.vue'\nimport { t } from '../../l10n.js'\n\nexport interface FilePickerItem {\n\t/**\n\t * SVG icon (as string) for the action\n\t */\n\ticonSvg: string\n\t/**\n\t * Label of the action\n\t */\n\tlabel: string\n\t/**\n\t * Callback when the action is clicked\n\t */\n\tonClick: () => void\n}\n\nexport interface FilePickerItemGroup {\n\t/**\n\t * Caption for the action group\n\t */\n\tcaption: string\n\t/**\n\t * Actions within this group\n\t */\n\tactions: FilePickerItem[]\n}\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * File types to accept\n\t */\n\taccept?: string[]\n\n\t/**\n\t * Optional menu caption to be shown above the actions\n\t */\n\tactionCaption?: string\n\n\t/**\n\t * Additional actions to be shown within the picker menu\n\t */\n\tactions?: FilePickerItem[] | FilePickerItemGroup[]\n\n\t/**\n\t * Allow picking a directory\n\t */\n\tdirectory?: boolean\n\n\t/**\n\t * Disable picking files and only allow picking a directory\n\t */\n\tdirectoryOnly?: boolean\n\n\t/**\n\t * Disabled state of the picker\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * If set then the label is only used for accessibility but not shown visually\n\t */\n\ticonOnly?: boolean\n\n\t/**\n\t * Label of the picker\n\t *\n\t * @default 'Pick file' or 'Pick files' depending on `multiple`\n\t */\n\tlabel?: string\n\n\t/**\n\t * If set then the picker will be set into a loading state.\n\t * This means the picker is disabled, a loading spinner is shown and the label is adjusted.\n\t */\n\tloading?: boolean\n\n\t/**\n\t * Can the user pick multiple files.\n\t * This is ignored when picking folder (by browser limitations).\n\t */\n\tmultiple?: boolean\n\n\t/**\n\t * The variant of the button\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary'\n}>(), {\n\tactions: () => [],\n\taccept: undefined,\n\tactionCaption: '',\n\tlabel: undefined,\n\tvariant: 'primary',\n})\n\nconst emit = defineEmits<{\n\tpick: [files: File[]]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Optional custom icon for the picker menu\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Optional content to be shown in the picker.\n\t * This can be used e.g. for a progress bar or similar.\n\t */\n\tdefault?: Slot\n}>()\n\ndefineExpose({\n\treset,\n\ttriggerPickFiles,\n})\n\nconst formElement = useTemplateRef('form')\nconst inputElement = useTemplateRef('input')\n\n/**\n * The current label to be used as menu name and accessible name of the picker.\n */\nconst currentLabel = computed(() => {\n\tif (props.loading) {\n\t\treturn t('Uploading …')\n\t} else if (props.label) {\n\t\treturn props.label\n\t} else if (props.directoryOnly) {\n\t\treturn t('Pick folder')\n\t}\n\treturn props.multiple ? t('Pick files') : t('Pick file')\n})\n\n/**\n * Check whether the current browser supports uploading directories\n * Hint: This does not check if the current connection supports this, as some browsers require a secure context!\n */\nconst canUploadFolders = computed(() => {\n\treturn (props.directory || props.directoryOnly) && 'webkitdirectory' in HTMLInputElement.prototype\n})\n\n/**\n * Trigger file picker\n *\n * @param uploadFolders - Whether to upload folders or files\n */\nfunction triggerPickFiles(uploadFolders: boolean) {\n\t// Without reset selecting the same file doesn't trigger the change event\n\treset()\n\n\t// Only if the browser supports picking folders and the user selected \"pick folder\" we set the file input to directory picking.\n\tif (canUploadFolders.value) {\n\t\tinputElement.value!.webkitdirectory = uploadFolders\n\t}\n\n\t// Wait for the reset and the `webkitdirectory` to be dispatched in DOM\n\tnextTick(() => inputElement.value!.click())\n}\n\n/**\n * Handle picking some local files\n */\nfunction onPick() {\n\tconst files = inputElement.value?.files ? Array.from(inputElement.value.files) : []\n\temit('pick', files)\n}\n\n/**\n * Reset the picker state of the currently selected files.\n */\nfunction reset() {\n\tformElement.value!.reset()\n}\n</script>\n\n<template>\n\t<form\n\t\tref=\"form\"\n\t\t:class=\"$style.filePicker\">\n\t\t<NcActions\n\t\t\t:aria-label=\"currentLabel\"\n\t\t\t:disabled=\"disabled || loading\"\n\t\t\t:menuName=\"iconOnly ? undefined : currentLabel\"\n\t\t\t:forceName=\"!iconOnly\"\n\t\t\t:variant>\n\t\t\t<template #icon>\n\t\t\t\t<slot v-if=\"!loading\" name=\"icon\">\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</slot>\n\t\t\t\t<NcLoadingIcon v-else />\n\t\t\t</template>\n\n\t\t\t<NcActionCaption v-if=\"actionCaption\" :name=\"actionCaption\" />\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"!directoryOnly\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(false)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconUpload :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ canUploadFolders || $slots.actions ? (multiple ? t('Upload files') : t('Upload file')) : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"canUploadFolders\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(true)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFolderUpload style=\"color: var(--color-primary-element)\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ !directoryOnly || $slots.actions ? t('Upload folder') : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<template v-for=\"group of actions\">\n\t\t\t\t<NcActionCaption\n\t\t\t\t\tv-if=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:key=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:name=\"(group as FilePickerItemGroup).caption\" />\n\n\t\t\t\t<NcActionButton\n\t\t\t\t\tv-for=\"action of (group as FilePickerItemGroup).actions ?? [group as FilePickerItem]\"\n\t\t\t\t\t:key=\"action.label\"\n\t\t\t\t\tcloseAfterClick\n\t\t\t\t\t@click=\"action.onClick\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :svg=\"action.iconSvg\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcActions>\n\n\t\t<!-- Hidden files picker input - also hidden for accessibility as otherwise such users also loose the ability to pick files -->\n\t\t<input\n\t\t\tref=\"input\"\n\t\t\t:accept=\"accept?.join(', ')\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple\n\t\t\ttype=\"file\"\n\t\t\t@change=\"onPick\">\n\n\t\t<slot />\n\t</form>\n</template>\n\n<style module>\n.filePicker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\theight: var(--default-clickable-area);\n}\n</style>\n\n<docs>\nThis component allows to pick local files (or directories) which can be used to upload them to Nextcloud or directly process them in the browser.\n\n### Exposed methods\n\n- `function reset(): void`\n This method allows to reset the internal state of the file picker to clear the current selection\n\n### Example\n\n```vue\n<template>\n\t<div>\n\t\t<div class=\"wrapper\">\n\t\t\t<NcFilePicker ref=\"picker\"\n\t\t\t\tdirectory\n\t\t\t\t@pick=\"selectedFiles = $event\" />\n\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t@click=\"clearPicker\">\n\t\t\t\tClear\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h3>Selected files:</h3>\n\t\t<ul>\n\t\t\t<li v-for=\"file in selectedFiles\" key=\"file.name\">\n\t\t\t\t{{ file.webkitRelativePath || file.name }}\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tselectedFiles: [],\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t/**\n\t\t\t * This will clear the selected files from the picker.\n\t\t\t */\n\t\t\tclearPicker() {\n\t\t\t\tthis.$refs.picker.reset()\n\t\t\t},\n\t\t},\n\t}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 10px;\n}\n</style>\n```\n</docs>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_normalizeClass","$style","_createVNode","_renderSlot","_createBlock","_createTextVNode","_toDisplayString","$slots","_unref","_Fragment","_renderList"],"mappings":";;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,yHAAwH;;;sBAXpIC,mBAeO,QAfPC,WAAc,KAAA,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;AAAA,UACZ,OAAM;AAAA,UACL,UAAA,QAAA;AAAA,UACD,MAAK;AAAA,UACJ,UAAQ;AAAA,QAAA;QAEVK,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -24,12 +24,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
const ncFormBox = "
|
|
28
|
-
const ncFormBox_row = "
|
|
29
|
-
const ncFormBox__item = "
|
|
30
|
-
const ncFormBox_col = "
|
|
27
|
+
const ncFormBox = "_ncFormBox_VNb0a";
|
|
28
|
+
const ncFormBox_row = "_ncFormBox_row_NzGjv";
|
|
29
|
+
const ncFormBox__item = "_ncFormBox__item_JIu9L";
|
|
30
|
+
const ncFormBox_col = "_ncFormBox_col_UaYOI";
|
|
31
31
|
const style0 = {
|
|
32
|
-
"material-design-icon": "_material-design-
|
|
32
|
+
"material-design-icon": "_material-design-icon_UQYft",
|
|
33
33
|
ncFormBox,
|
|
34
34
|
ncFormBox_row,
|
|
35
35
|
ncFormBox__item,
|
|
@@ -130,9 +130,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
const formBoxButton = "
|
|
133
|
+
const formBoxButton = "_formBoxButton_14txJ";
|
|
134
134
|
const style0 = {
|
|
135
|
-
"material-design-icon": "_material-design-
|
|
135
|
+
"material-design-icon": "_material-design-icon_0RfRa",
|
|
136
136
|
formBoxButton
|
|
137
137
|
};
|
|
138
138
|
const cssModules = {
|
|
@@ -70,15 +70,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
const formBoxItem = "
|
|
74
|
-
const formBoxItem__description = "
|
|
75
|
-
const formBoxItem_legacy = "
|
|
76
|
-
const formBoxItem_inverted = "
|
|
77
|
-
const formBoxItem__element = "
|
|
78
|
-
const formBoxItem__content = "
|
|
79
|
-
const formBoxItem__icon = "
|
|
73
|
+
const formBoxItem = "_formBoxItem_ER-6m";
|
|
74
|
+
const formBoxItem__description = "_formBoxItem__description_g-KcX";
|
|
75
|
+
const formBoxItem_legacy = "_formBoxItem_legacy_TW1Sp";
|
|
76
|
+
const formBoxItem_inverted = "_formBoxItem_inverted_CxfyH";
|
|
77
|
+
const formBoxItem__element = "_formBoxItem__element_zgVx-";
|
|
78
|
+
const formBoxItem__content = "_formBoxItem__content_dYtDe";
|
|
79
|
+
const formBoxItem__icon = "_formBoxItem__icon_ZIpCi";
|
|
80
80
|
const style0 = {
|
|
81
|
-
"material-design-icon": "_material-design-
|
|
81
|
+
"material-design-icon": "_material-design-icon_ILRX2",
|
|
82
82
|
formBoxItem,
|
|
83
83
|
formBoxItem__description,
|
|
84
84
|
formBoxItem_legacy,
|
|
@@ -77,9 +77,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
const formBoxSwitch__input = "
|
|
80
|
+
const formBoxSwitch__input = "_formBoxSwitch__input_BLkhF";
|
|
81
81
|
const style0 = {
|
|
82
|
-
"material-design-icon": "_material-design-
|
|
82
|
+
"material-design-icon": "_material-design-icon_0Ylmc",
|
|
83
83
|
formBoxSwitch__input
|
|
84
84
|
};
|
|
85
85
|
const cssModules = {
|
|
@@ -49,14 +49,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
const formGroup = "
|
|
53
|
-
const formGroup_noGap = "
|
|
54
|
-
const formGroup__label = "
|
|
55
|
-
const formGroup__description = "
|
|
56
|
-
const formGroup__content = "
|
|
57
|
-
const formGroup__content_only = "
|
|
52
|
+
const formGroup = "_formGroup_eD8cV";
|
|
53
|
+
const formGroup_noGap = "_formGroup_noGap_Eo-YJ";
|
|
54
|
+
const formGroup__label = "_formGroup__label_KZ5RR";
|
|
55
|
+
const formGroup__description = "_formGroup__description_rYOct";
|
|
56
|
+
const formGroup__content = "_formGroup__content_ypTY1";
|
|
57
|
+
const formGroup__content_only = "_formGroup__content_only_z-ggI";
|
|
58
58
|
const style0 = {
|
|
59
|
-
"material-design-icon": "_material-design-
|
|
59
|
+
"material-design-icon": "_material-design-icon_pO-y6",
|
|
60
60
|
formGroup,
|
|
61
61
|
formGroup_noGap,
|
|
62
62
|
formGroup__label,
|
package/dist/chunks/NcHotkey.mjs
CHANGED
|
@@ -42,11 +42,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
const hotkey = "
|
|
46
|
-
const hotkey__label = "
|
|
47
|
-
const hotkey__keys = "
|
|
45
|
+
const hotkey = "_hotkey_rps3-";
|
|
46
|
+
const hotkey__label = "_hotkey__label_9rACj";
|
|
47
|
+
const hotkey__keys = "_hotkey__keys_D5xsu";
|
|
48
48
|
const style0 = {
|
|
49
|
-
"material-design-icon": "_material-design-
|
|
49
|
+
"material-design-icon": "_material-design-icon_Lafyy",
|
|
50
50
|
hotkey,
|
|
51
51
|
hotkey__label,
|
|
52
52
|
hotkey__keys
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../assets/NcHotkeyList.css';
|
|
2
2
|
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, renderSlot } from "vue";
|
|
3
|
-
import { r as register, q as
|
|
3
|
+
import { r as register, q as t33, a as t } from "./_l10n.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.mjs";
|
|
6
|
-
register(
|
|
6
|
+
register(t33);
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "NcHotkeyList",
|
|
9
9
|
props: {
|
|
@@ -26,8 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
const hotkeyList = "
|
|
30
|
-
const hotkeyList__heading = "
|
|
29
|
+
const hotkeyList = "_hotkeyList_tAexI";
|
|
30
|
+
const hotkeyList__heading = "_hotkeyList__heading_KDnkd";
|
|
31
31
|
const style0 = {
|
|
32
32
|
hotkeyList,
|
|
33
33
|
hotkeyList__heading
|
|
@@ -35,9 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
const iconToggleSwitch = "
|
|
38
|
+
const iconToggleSwitch = "_iconToggleSwitch_fKjEc";
|
|
39
39
|
const style0 = {
|
|
40
|
-
"material-design-icon": "_material-design-
|
|
40
|
+
"material-design-icon": "_material-design-icon_Pm1ga",
|
|
41
41
|
iconToggleSwitch
|
|
42
42
|
};
|
|
43
43
|
const cssModules = {
|
package/dist/chunks/NcKbd.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../assets/NcKbd.css';
|
|
2
2
|
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
3
|
-
import { r as register, p as
|
|
3
|
+
import { r as register, p as t7, a as t } from "./_l10n.mjs";
|
|
4
4
|
import { i as isMac } from "./platform.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.mjs";
|
|
6
|
-
register(
|
|
6
|
+
register(t7);
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "NcKbd",
|
|
9
9
|
props: {
|
|
@@ -38,9 +38,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
const kbd = "
|
|
41
|
+
const kbd = "_kbd_gHLon";
|
|
42
42
|
const style0 = {
|
|
43
|
-
"material-design-icon": "_material-design-
|
|
43
|
+
"material-design-icon": "_material-design-icon_5751A",
|
|
44
44
|
kbd
|
|
45
45
|
};
|
|
46
46
|
const cssModules = {
|
package/dist/chunks/NcModal.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { useHotKey } from "../composables/useHotKey/index.mjs";
|
|
|
11
11
|
import "../composables/useIsDarkTheme/index.mjs";
|
|
12
12
|
import "../composables/useIsFullscreen/index.mjs";
|
|
13
13
|
import "../composables/useIsMobile/index.mjs";
|
|
14
|
-
import { r as register, D as
|
|
14
|
+
import { r as register, D as t38, A as t20, a as t } from "./_l10n.mjs";
|
|
15
15
|
import { c as createElementId } from "./createElementId.mjs";
|
|
16
16
|
import { g as getTrapStack } from "./focusTrap.mjs";
|
|
17
17
|
import { i as isRtl } from "./rtl.mjs";
|
|
@@ -52,7 +52,7 @@ function useScopeIdAttrs() {
|
|
|
52
52
|
const scopeIdAttrs = Object.fromEntries(scopeIds.map((scopeId) => [scopeId, ""]));
|
|
53
53
|
return scopeIdAttrs;
|
|
54
54
|
}
|
|
55
|
-
register(t20,
|
|
55
|
+
register(t20, t38);
|
|
56
56
|
const _hoisted_1 = ["aria-labelledby", "aria-describedby"];
|
|
57
57
|
const _hoisted_2 = ["data-theme-light", "data-theme-dark"];
|
|
58
58
|
const _hoisted_3 = ["id"];
|
|
@@ -91,8 +91,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
emits: /* @__PURE__ */ mergeModels(["next", "previous", "close", "update:show"], ["update:show"]),
|
|
92
92
|
setup(__props, { emit: __emit }) {
|
|
93
93
|
useCssVars((_ctx) => ({
|
|
94
|
-
"
|
|
95
|
-
"
|
|
94
|
+
"v56ab185f": numHeaderActions.value,
|
|
95
|
+
"v86f86e3a": cssSlideshowDelay.value
|
|
96
96
|
}));
|
|
97
97
|
const showModal = useModel(__props, "show");
|
|
98
98
|
const props = __props;
|
|
@@ -156,6 +156,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
156
156
|
}
|
|
157
157
|
return actions;
|
|
158
158
|
});
|
|
159
|
+
const hasHeader = computed(() => props.name.trim() !== "" || numHeaderActions.value > 0);
|
|
159
160
|
onMounted(() => {
|
|
160
161
|
if (!props.name && !props.labelId) {
|
|
161
162
|
warn("[NcModal] You need either set the name or set a `labelId` for accessibility.");
|
|
@@ -264,7 +265,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
264
265
|
appear: ""
|
|
265
266
|
}, {
|
|
266
267
|
default: withCtx(() => [
|
|
267
|
-
|
|
268
|
+
hasHeader.value ? (openBlock(), createElementBlock("div", {
|
|
269
|
+
key: 0,
|
|
268
270
|
class: "modal-header",
|
|
269
271
|
"data-theme-light": __props.lightBackdrop,
|
|
270
272
|
"data-theme-dark": !__props.lightBackdrop
|
|
@@ -327,7 +329,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
327
329
|
_: 1
|
|
328
330
|
}, 8, ["aria-label"])) : createCommentVNode("", true)
|
|
329
331
|
])
|
|
330
|
-
], 8, _hoisted_2)
|
|
332
|
+
], 8, _hoisted_2)) : createCommentVNode("", true)
|
|
331
333
|
]),
|
|
332
334
|
_: 3
|
|
333
335
|
}),
|
|
@@ -339,7 +341,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
339
341
|
withDirectives(createElementVNode("div", {
|
|
340
342
|
class: normalizeClass(["modal-wrapper", [
|
|
341
343
|
`modal-wrapper--${__props.size}`,
|
|
342
|
-
{
|
|
344
|
+
{
|
|
345
|
+
"modal-wrapper--spread-navigation": __props.spreadNavigation,
|
|
346
|
+
"modal-wrapper--no-header": !hasHeader.value
|
|
347
|
+
}
|
|
343
348
|
]]),
|
|
344
349
|
onMousedown: withModifiers(handleClickModalWrapper, ["self"])
|
|
345
350
|
}, [
|
|
@@ -429,7 +434,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
429
434
|
};
|
|
430
435
|
}
|
|
431
436
|
});
|
|
432
|
-
const NcModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
437
|
+
const NcModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3aeb69e6"]]);
|
|
433
438
|
export {
|
|
434
439
|
NcModal as N
|
|
435
440
|
};
|