@nextcloud/vue 8.16.0 → 8.17.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 +28 -2
- package/dist/Components/NcActionButton.cjs +4 -6
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +4 -6
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCaption.cjs +2 -4
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +2 -4
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +3 -5
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +3 -5
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +2 -4
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +2 -4
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +3 -5
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +3 -5
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +2 -4
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +2 -4
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionSeparator.cjs +2 -4
- package/dist/Components/NcActionSeparator.cjs.map +1 -1
- package/dist/Components/NcActionSeparator.mjs +2 -4
- package/dist/Components/NcActionSeparator.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +2 -4
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +2 -4
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +3 -5
- package/dist/Components/NcActionTextEditable.cjs.map +1 -1
- package/dist/Components/NcActionTextEditable.mjs +3 -5
- package/dist/Components/NcActionTextEditable.mjs.map +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppContentDetails.cjs +1 -3
- package/dist/Components/NcAppContentDetails.cjs.map +1 -1
- package/dist/Components/NcAppContentDetails.mjs +1 -3
- package/dist/Components/NcAppContentDetails.mjs.map +1 -1
- package/dist/Components/NcAppContentList.cjs +1 -3
- package/dist/Components/NcAppContentList.cjs.map +1 -1
- package/dist/Components/NcAppContentList.mjs +1 -3
- package/dist/Components/NcAppContentList.mjs.map +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationIconBullet.cjs +2 -4
- package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
- package/dist/Components/NcAppNavigationIconBullet.mjs +2 -4
- package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationList.cjs +2 -4
- package/dist/Components/NcAppNavigationList.cjs.map +1 -1
- package/dist/Components/NcAppNavigationList.mjs +2 -4
- package/dist/Components/NcAppNavigationList.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +2 -4
- package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +2 -4
- package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationSpacer.cjs +2 -4
- package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSpacer.mjs +2 -4
- package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +2 -4
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +2 -4
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +2 -4
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +2 -4
- package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +11 -6
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +11 -6
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +5 -7
- package/dist/Components/NcChip.cjs.map +1 -1
- package/dist/Components/NcChip.mjs +5 -7
- package/dist/Components/NcChip.mjs.map +1 -1
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcCounterBubble.cjs +2 -49
- package/dist/Components/NcCounterBubble.cjs.map +1 -1
- package/dist/Components/NcCounterBubble.mjs +2 -49
- package/dist/Components/NcCounterBubble.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +7 -13
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +7 -13
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +3 -5
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +3 -5
- package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEllipsisedOption.cjs +3 -5
- package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
- package/dist/Components/NcEllipsisedOption.mjs +3 -5
- package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +2 -4
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +2 -4
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcGuestContent.cjs +2 -4
- package/dist/Components/NcGuestContent.cjs.map +1 -1
- package/dist/Components/NcGuestContent.mjs +2 -4
- package/dist/Components/NcGuestContent.mjs.map +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcHighlight.cjs +1 -1
- package/dist/Components/NcHighlight.mjs +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +1 -1
- package/dist/Components/NcInputField.cjs +5 -7
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +5 -7
- package/dist/Components/NcInputField.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcLoadingIcon.cjs +2 -4
- package/dist/Components/NcLoadingIcon.cjs.map +1 -1
- package/dist/Components/NcLoadingIcon.mjs +2 -4
- package/dist/Components/NcLoadingIcon.mjs.map +1 -1
- package/dist/Components/NcModal.cjs +8 -16
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +8 -16
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +2 -12
- package/dist/Components/NcNoteCard.cjs.map +1 -1
- package/dist/Components/NcNoteCard.mjs +2 -12
- package/dist/Components/NcNoteCard.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcProgressBar.cjs +1 -1
- package/dist/Components/NcProgressBar.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +2 -2
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +2 -2
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSavingIndicatorIcon.cjs +1 -1
- package/dist/Components/NcSavingIndicatorIcon.mjs +1 -1
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +4 -6
- package/dist/Components/NcTextArea.cjs.map +1 -1
- package/dist/Components/NcTextArea.mjs +4 -6
- package/dist/Components/NcTextArea.mjs.map +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Components/NcVNodes.cjs +1 -3
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs +1 -3
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Composables/useHotKey.cjs +52 -0
- package/dist/Composables/useHotKey.cjs.map +1 -0
- package/dist/Composables/useHotKey.mjs +52 -0
- package/dist/Composables/useHotKey.mjs.map +1 -0
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActionCheckbox-wDyhRXuN.css → NcActionCheckbox-sIGqnckr.css} +12 -12
- package/dist/assets/{NcActionRadio-CpCvyMa_.css → NcActionRadio-DFcWmvae.css} +12 -12
- package/dist/assets/{NcActions-BAHCEkZI.css → NcActions-f24RrX8r.css} +12 -12
- package/dist/assets/{NcAppNavigation-BM1S8Ewr.css → NcAppNavigation-YKWEqLwF.css} +12 -14
- package/dist/assets/{NcAppNavigationCaption-CYv7YhUS.css → NcAppNavigationCaption-zgtPq3Od.css} +9 -8
- package/dist/assets/{NcAppSettingsDialog-YgAGku7I.css → NcAppSettingsDialog-QF6aTZ3s.css} +19 -19
- package/dist/assets/{NcAvatar-BnOXoW8w.css → NcAvatar-CfUWTmJW.css} +28 -28
- package/dist/assets/{NcButton-BHxZm42y.css → NcButton-DYJAoXeG.css} +47 -47
- package/dist/assets/{NcCheckboxRadioSwitch-BkBep4wT.css → NcCheckboxRadioSwitch-DWtZ7faS.css} +55 -53
- package/dist/assets/{NcContent--2CGtswk.css → NcContent-ZFNIjylG.css} +10 -10
- package/dist/assets/{NcCounterBubble-BQB2m2ZT.css → NcCounterBubble-Dizdz4Hk.css} +12 -13
- package/dist/assets/{NcDateTimePicker-CWLRe5-W.css → NcDateTimePicker-C7MhJgGO.css} +7 -7
- package/dist/assets/{NcDialog-j6_6dpiF.css → NcDialog-DKdW_D2J.css} +15 -15
- package/dist/assets/{NcHeaderMenu-CuAI7Fgb.css → NcHeaderMenu-6C_FnkA6.css} +12 -12
- package/dist/assets/{NcInputField-Dq0PVf84.css → NcInputField-CQc5dRbY.css} +33 -33
- package/dist/assets/{NcListItem-D8zBJgoD.css → NcListItem-Db199R20.css} +46 -44
- package/dist/assets/{NcModal-Ch7ovo9y.css → NcModal-Djc2K_kW.css} +70 -70
- package/dist/assets/{NcRichContenteditable-CkvTrjfG.css → NcRichContenteditable-BYEZK1DT.css} +61 -59
- package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs → AlertCircleOutline-DLtiWgZd.cjs} +1 -3
- package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs.map → AlertCircleOutline-DLtiWgZd.cjs.map} +1 -1
- package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs → AlertCircleOutline-DU3QwU5Y.mjs} +1 -3
- package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs.map → AlertCircleOutline-DU3QwU5Y.mjs.map} +1 -1
- package/dist/chunks/{ArrowLeft-B9iGweTd.mjs → ArrowLeft-BhAxJBYx.mjs} +1 -3
- package/dist/chunks/{ArrowLeft-B9iGweTd.mjs.map → ArrowLeft-BhAxJBYx.mjs.map} +1 -1
- package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs → ArrowLeft-CONurT5C.cjs} +1 -3
- package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs.map → ArrowLeft-CONurT5C.cjs.map} +1 -1
- package/dist/chunks/{ArrowRight-DaYrccVG.cjs → ArrowRight-Bj5G_mG0.cjs} +1 -3
- package/dist/chunks/{ArrowRight-DaYrccVG.cjs.map → ArrowRight-Bj5G_mG0.cjs.map} +1 -1
- package/dist/chunks/{ArrowRight-Clf455e1.mjs → ArrowRight-KsL2PC-o.mjs} +1 -3
- package/dist/chunks/{ArrowRight-Clf455e1.mjs.map → ArrowRight-KsL2PC-o.mjs.map} +1 -1
- package/dist/chunks/{Check-PawIlCwa.mjs → Check-XHAzUBkX.mjs} +1 -3
- package/dist/chunks/{Check-PawIlCwa.mjs.map → Check-XHAzUBkX.mjs.map} +1 -1
- package/dist/chunks/{Check-DZc7keoa.cjs → Check-fCbe4vqy.cjs} +1 -3
- package/dist/chunks/{Check-DZc7keoa.cjs.map → Check-fCbe4vqy.cjs.map} +1 -1
- package/dist/chunks/{ChevronDown-CF9m1o8_.cjs → ChevronDown-CiFbcDUC.cjs} +1 -3
- package/dist/chunks/{ChevronDown-CF9m1o8_.cjs.map → ChevronDown-CiFbcDUC.cjs.map} +1 -1
- package/dist/chunks/{ChevronDown-PedEroXo.mjs → ChevronDown-D3Tfshug.mjs} +1 -3
- package/dist/chunks/{ChevronDown-PedEroXo.mjs.map → ChevronDown-D3Tfshug.mjs.map} +1 -1
- package/dist/chunks/{ChevronRight-BNa7yMja.mjs → ChevronRight-C3eVhc5a.mjs} +1 -3
- package/dist/chunks/{ChevronRight-BNa7yMja.mjs.map → ChevronRight-C3eVhc5a.mjs.map} +1 -1
- package/dist/chunks/{ChevronRight-DVw6mR11.cjs → ChevronRight-CWbdN5_r.cjs} +1 -3
- package/dist/chunks/{ChevronRight-DVw6mR11.cjs.map → ChevronRight-CWbdN5_r.cjs.map} +1 -1
- package/dist/chunks/{ChevronUp-CTOKWYlC.cjs → ChevronUp-A2riTBrv.cjs} +1 -3
- package/dist/chunks/{ChevronUp-CTOKWYlC.cjs.map → ChevronUp-A2riTBrv.cjs.map} +1 -1
- package/dist/chunks/{ChevronUp-DGLTg_nO.mjs → ChevronUp-ljACquzS.mjs} +1 -3
- package/dist/chunks/{ChevronUp-DGLTg_nO.mjs.map → ChevronUp-ljACquzS.mjs.map} +1 -1
- package/dist/chunks/{Close-1V1F2F-M.mjs → Close-B6ccm1RP.mjs} +1 -3
- package/dist/chunks/{Close-1V1F2F-M.mjs.map → Close-B6ccm1RP.mjs.map} +1 -1
- package/dist/chunks/{Close-C2VrgKj3.cjs → Close-B7lGu0cG.cjs} +1 -3
- package/dist/chunks/{Close-C2VrgKj3.cjs.map → Close-B7lGu0cG.cjs.map} +1 -1
- package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs → DotsHorizontal-Cd2x8oz2.mjs} +1 -3
- package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs.map → DotsHorizontal-Cd2x8oz2.mjs.map} +1 -1
- package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs → DotsHorizontal-DQfnwpao.cjs} +1 -3
- package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs.map → DotsHorizontal-DQfnwpao.cjs.map} +1 -1
- package/dist/chunks/{GenColors-BIhFdCC4.cjs → GenColors-Bj69w5nu.cjs} +1 -7
- package/dist/chunks/{GenColors-BIhFdCC4.cjs.map → GenColors-Bj69w5nu.cjs.map} +1 -1
- package/dist/chunks/{GenColors-CSpRMtcT.mjs → GenColors-u1W5WMXj.mjs} +1 -7
- package/dist/chunks/{GenColors-CSpRMtcT.mjs.map → GenColors-u1W5WMXj.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-CRr3MGWH.mjs → NcActionButtonGroup-Bd37MbKW.mjs} +2 -4
- package/dist/chunks/{NcActionButtonGroup-CRr3MGWH.mjs.map → NcActionButtonGroup-Bd37MbKW.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-u0n6b6by.cjs → NcActionButtonGroup-D5m7jjJp.cjs} +2 -4
- package/dist/chunks/{NcActionButtonGroup-u0n6b6by.cjs.map → NcActionButtonGroup-D5m7jjJp.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-CcfF_tha.cjs → NcActionInput-C-LpHj3H.cjs} +6 -8
- package/dist/chunks/{NcActionInput-CcfF_tha.cjs.map → NcActionInput-C-LpHj3H.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-Cz7D7XfL.mjs → NcActionInput-Cih0zYV4.mjs} +6 -8
- package/dist/chunks/{NcActionInput-Cz7D7XfL.mjs.map → NcActionInput-Cih0zYV4.mjs.map} +1 -1
- package/dist/chunks/{NcActions-BNYD2s1x.mjs → NcActions-D77YAhAy.mjs} +12 -9
- package/dist/chunks/NcActions-D77YAhAy.mjs.map +1 -0
- package/dist/chunks/{NcActions-Bu5UnlHN.cjs → NcActions-DWydFozA.cjs} +12 -9
- package/dist/chunks/NcActions-DWydFozA.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-DIojf9zk.mjs → NcAppContent-4BxMQ7Xt.mjs} +5 -9
- package/dist/chunks/{NcAppContent-DIojf9zk.mjs.map → NcAppContent-4BxMQ7Xt.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-BiQqUrj1.cjs → NcAppContent-Cvlj45G9.cjs} +5 -9
- package/dist/chunks/{NcAppContent-BiQqUrj1.cjs.map → NcAppContent-Cvlj45G9.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-D2duZ9d4.cjs → NcAppNavigation-BSPUmFOP.cjs} +4 -6
- package/dist/chunks/{NcAppNavigation-D2duZ9d4.cjs.map → NcAppNavigation-BSPUmFOP.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-b745VaE7.mjs → NcAppNavigation-DAUiOJeC.mjs} +4 -6
- package/dist/chunks/{NcAppNavigation-b745VaE7.mjs.map → NcAppNavigation-DAUiOJeC.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-lStN6GgW.cjs → NcAppNavigationCaption-DIsO1tke.cjs} +4 -6
- package/dist/chunks/{NcAppNavigationCaption-BhT61A8a.mjs.map → NcAppNavigationCaption-DIsO1tke.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-BhT61A8a.mjs → NcAppNavigationCaption-DPUdrh1W.mjs} +4 -6
- package/dist/chunks/{NcAppNavigationCaption-lStN6GgW.cjs.map → NcAppNavigationCaption-DPUdrh1W.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DymXTFpC.cjs → NcAppNavigationItem-B_pjMPx9.cjs} +8 -16
- package/dist/chunks/{NcAppNavigationItem-DymXTFpC.cjs.map → NcAppNavigationItem-B_pjMPx9.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-BgUcekR9.mjs → NcAppNavigationItem-DFd3T8cM.mjs} +8 -16
- package/dist/chunks/{NcAppNavigationItem-BgUcekR9.mjs.map → NcAppNavigationItem-DFd3T8cM.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-Di3xZODi.mjs → NcAppNavigationNewItem-C3feTWit.mjs} +3 -5
- package/dist/chunks/{NcAppNavigationNewItem-Di3xZODi.mjs.map → NcAppNavigationNewItem-C3feTWit.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-BWqcj3fJ.cjs → NcAppNavigationNewItem-ChhIGd9y.cjs} +3 -5
- package/dist/chunks/{NcAppNavigationNewItem-BWqcj3fJ.cjs.map → NcAppNavigationNewItem-ChhIGd9y.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-DXgD6484.cjs → NcAppNavigationSearch-2zELXCcb.cjs} +4 -6
- package/dist/chunks/{NcAppNavigationSearch-DXgD6484.cjs.map → NcAppNavigationSearch-2zELXCcb.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-Bn6ze-K8.mjs → NcAppNavigationSearch-BjFk5Svv.mjs} +4 -6
- package/dist/chunks/{NcAppNavigationSearch-Bn6ze-K8.mjs.map → NcAppNavigationSearch-BjFk5Svv.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-CPtlFWzu.mjs → NcAppNavigationSettings-BbdXmZxA.mjs} +3 -7
- package/dist/chunks/{NcAppNavigationSettings-CPtlFWzu.mjs.map → NcAppNavigationSettings-BbdXmZxA.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-X-3Hn4DT.cjs → NcAppNavigationSettings-nXyfQjef.cjs} +3 -7
- package/dist/chunks/{NcAppNavigationSettings-X-3Hn4DT.cjs.map → NcAppNavigationSettings-nXyfQjef.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-CefGs9zI.mjs → NcAppNavigationToggle-BfEEm-rA.mjs} +3 -9
- package/dist/chunks/{NcAppNavigationToggle-CefGs9zI.mjs.map → NcAppNavigationToggle-BfEEm-rA.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-EOuuC2uD.cjs → NcAppNavigationToggle-Bs8GCwir.cjs} +3 -9
- package/dist/chunks/{NcAppNavigationToggle-EOuuC2uD.cjs.map → NcAppNavigationToggle-Bs8GCwir.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-BygD2XER.mjs → NcAppSettingsDialog-4B3lv0WQ.mjs} +5 -7
- package/dist/chunks/{NcAppSettingsDialog-BygD2XER.mjs.map → NcAppSettingsDialog-4B3lv0WQ.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-B9tlPluJ.cjs → NcAppSettingsDialog-lfxi50N4.cjs} +5 -7
- package/dist/chunks/{NcAppSettingsDialog-B9tlPluJ.cjs.map → NcAppSettingsDialog-lfxi50N4.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-ClR8nmTm.mjs → NcAppSidebar-CiTS4hjx.mjs} +8 -18
- package/dist/chunks/{NcAppSidebar-ClR8nmTm.mjs.map → NcAppSidebar-CiTS4hjx.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-DHsJCU6p.cjs → NcAppSidebar-CxX00b2d.cjs} +8 -18
- package/dist/chunks/{NcAppSidebar-DHsJCU6p.cjs.map → NcAppSidebar-CxX00b2d.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-C1miLzxS.mjs → NcAvatar-BFV6oZYX.mjs} +9 -11
- package/dist/chunks/NcAvatar-BFV6oZYX.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-B_FI8kMO.cjs → NcAvatar-D70EswFk.cjs} +9 -11
- package/dist/chunks/NcAvatar-D70EswFk.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-6-TEgzIX.mjs → NcBreadcrumb-B5L1PSLJ.mjs} +4 -6
- package/dist/chunks/{NcBreadcrumb-6-TEgzIX.mjs.map → NcBreadcrumb-B5L1PSLJ.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-BEGaPK2T.cjs → NcBreadcrumb-Ck9jIMJ0.cjs} +4 -6
- package/dist/chunks/{NcBreadcrumb-BEGaPK2T.cjs.map → NcBreadcrumb-Ck9jIMJ0.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-BvgztT1n.cjs → NcBreadcrumbs-BDi5uySu.cjs} +4 -8
- package/dist/chunks/{NcBreadcrumbs-BvgztT1n.cjs.map → NcBreadcrumbs-BDi5uySu.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-B9rm2Pwq.mjs → NcBreadcrumbs-Di8TiK0J.mjs} +4 -8
- package/dist/chunks/{NcBreadcrumbs-B9rm2Pwq.mjs.map → NcBreadcrumbs-Di8TiK0J.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Du9MhLnc.cjs → NcCheckboxRadioSwitch-DeufC6NH.cjs} +5 -23
- package/dist/chunks/{NcCheckboxRadioSwitch-Dxh5eqs0.mjs.map → NcCheckboxRadioSwitch-DeufC6NH.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Dxh5eqs0.mjs → NcCheckboxRadioSwitch-DnnuXT1_.mjs} +5 -23
- package/dist/chunks/{NcCheckboxRadioSwitch-Du9MhLnc.cjs.map → NcCheckboxRadioSwitch-DnnuXT1_.mjs.map} +1 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-BRgyzABt.mjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-BRgyzABt.mjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-jOhbAsqn.cjs +4 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-jOhbAsqn.cjs.map +1 -0
- package/dist/chunks/{NcCollectionList-BTU680_b.cjs → NcCollectionList-1EeBHCrM.cjs} +7 -11
- package/dist/chunks/{NcCollectionList-BTU680_b.cjs.map → NcCollectionList-1EeBHCrM.cjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-DLw6mNFw.mjs → NcCollectionList-BxSwb-Gx.mjs} +7 -11
- package/dist/chunks/{NcCollectionList-DLw6mNFw.mjs.map → NcCollectionList-BxSwb-Gx.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-BUq5h7jz.mjs → NcColorPicker-B3WnrXPa.mjs} +8 -10
- package/dist/chunks/{NcColorPicker-BUq5h7jz.mjs.map → NcColorPicker-B3WnrXPa.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-CiNIPwM2.cjs → NcColorPicker-C4V9Xmmq.cjs} +8 -10
- package/dist/chunks/{NcColorPicker-CiNIPwM2.cjs.map → NcColorPicker-C4V9Xmmq.cjs.map} +1 -1
- package/dist/chunks/{NcContent-C1xtRN_d.cjs → NcContent-DOV1i_sw.cjs} +5 -7
- package/dist/chunks/{NcContent-C1xtRN_d.cjs.map → NcContent-DOV1i_sw.cjs.map} +1 -1
- package/dist/chunks/{NcContent-D6FQABFh.mjs → NcContent-YmMP5qXT.mjs} +5 -7
- package/dist/chunks/{NcContent-D6FQABFh.mjs.map → NcContent-YmMP5qXT.mjs.map} +1 -1
- package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs +106 -0
- package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs.map +1 -0
- package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs +105 -0
- package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs.map +1 -0
- package/dist/chunks/{NcDashboardWidget-DcmmCy--.cjs → NcDashboardWidget-D3oQtVgq.cjs} +6 -8
- package/dist/chunks/{NcDashboardWidget-DcmmCy--.cjs.map → NcDashboardWidget-D3oQtVgq.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-D7HGohS3.mjs → NcDashboardWidget-DOSAwzd2.mjs} +6 -8
- package/dist/chunks/{NcDashboardWidget-D7HGohS3.mjs.map → NcDashboardWidget-DOSAwzd2.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-LOg5ztHu.mjs → NcDashboardWidgetItem-DSaANTMY.mjs} +4 -6
- package/dist/chunks/{NcDashboardWidgetItem-LOg5ztHu.mjs.map → NcDashboardWidgetItem-DSaANTMY.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-l9PIHfs-.cjs → NcDashboardWidgetItem-DWrAY-RW.cjs} +4 -6
- package/dist/chunks/{NcDashboardWidgetItem-l9PIHfs-.cjs.map → NcDashboardWidgetItem-DWrAY-RW.cjs.map} +1 -1
- package/dist/chunks/{NcDateTime-D-MxBcYv.cjs → NcDateTime-Bfv9PBx5.cjs} +2 -4
- package/dist/chunks/{NcDateTime-D-MxBcYv.cjs.map → NcDateTime-Bfv9PBx5.cjs.map} +1 -1
- package/dist/chunks/{NcDateTime-C9kf-YEX.mjs → NcDateTime-CFcnq5-P.mjs} +2 -4
- package/dist/chunks/{NcDateTime-C9kf-YEX.mjs.map → NcDateTime-CFcnq5-P.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-DGaf6Udc.cjs → NcDialog-C7L86Jj6.cjs} +35 -9
- package/dist/chunks/NcDialog-C7L86Jj6.cjs.map +1 -0
- package/dist/chunks/{NcDialog-VincZ0XS.mjs → NcDialog-DXRkgfxf.mjs} +35 -9
- package/dist/chunks/NcDialog-DXRkgfxf.mjs.map +1 -0
- package/dist/chunks/{NcDialogButton-CNWF4urB.cjs → NcDialogButton-Cq7U6E8M.cjs} +18 -7
- package/dist/chunks/NcDialogButton-Cq7U6E8M.cjs.map +1 -0
- package/dist/chunks/{NcDialogButton-JvyN3X6S.mjs → NcDialogButton-DzPzSBzz.mjs} +18 -7
- package/dist/chunks/NcDialogButton-DzPzSBzz.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-1Lmb0vDx.mjs → NcEmojiPicker-CjeoGVH7.mjs} +7 -11
- package/dist/chunks/{NcEmojiPicker-1Lmb0vDx.mjs.map → NcEmojiPicker-CjeoGVH7.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-DT9jlZ0U.cjs → NcEmojiPicker-Cuo4irbL.cjs} +7 -11
- package/dist/chunks/{NcEmojiPicker-DT9jlZ0U.cjs.map → NcEmojiPicker-Cuo4irbL.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs → NcHeaderMenu-D6vHevbN.cjs} +3 -5
- package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs.map → NcHeaderMenu-D6vHevbN.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs → NcHeaderMenu-DGrf5SDZ.mjs} +3 -5
- package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs.map → NcHeaderMenu-DGrf5SDZ.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs → NcIconSvgWrapper-Cb4bAwV6.cjs} +2 -4
- package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs.map → NcIconSvgWrapper-Cb4bAwV6.cjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs → NcIconSvgWrapper-DjrkBUkC.mjs} +2 -4
- package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs.map → NcIconSvgWrapper-DjrkBUkC.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-WkGs9n0n.mjs → NcInputConfirmCancel-CTMBdhFf.mjs} +5 -7
- package/dist/chunks/{NcInputConfirmCancel-WkGs9n0n.mjs.map → NcInputConfirmCancel-CTMBdhFf.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-d15q32Kg.cjs → NcInputConfirmCancel-DMTb3AI2.cjs} +5 -7
- package/dist/chunks/{NcInputConfirmCancel-d15q32Kg.cjs.map → NcInputConfirmCancel-DMTb3AI2.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-C88XN6YO.mjs → NcListItem-79bJNkOw.mjs} +14 -9
- package/dist/chunks/NcListItem-79bJNkOw.mjs.map +1 -0
- package/dist/chunks/{NcListItem-EKJB0pLP.cjs → NcListItem-BIKAHiIz.cjs} +15 -10
- package/dist/chunks/NcListItem-BIKAHiIz.cjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-CaH2qDJw.cjs → NcListItemIcon-B03yo56l.cjs} +5 -7
- package/dist/chunks/{NcListItemIcon-CaH2qDJw.cjs.map → NcListItemIcon-B03yo56l.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-B_1SU8D4.mjs → NcListItemIcon-Bo4o5oVB.mjs} +5 -7
- package/dist/chunks/{NcListItemIcon-B_1SU8D4.mjs.map → NcListItemIcon-Bo4o5oVB.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-BwznS07l.mjs → NcPasswordField-BbbShH-t.mjs} +3 -9
- package/dist/chunks/{NcPasswordField-BwznS07l.mjs.map → NcPasswordField-BbbShH-t.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DNoYXohw.cjs → NcPasswordField-DYyZIkoL.cjs} +3 -9
- package/dist/chunks/{NcPasswordField-DNoYXohw.cjs.map → NcPasswordField-DYyZIkoL.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs → NcPopover-C0G7sLVP.cjs} +1 -5
- package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs.map → NcPopover-C0G7sLVP.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-VxUr4c6P.mjs → NcPopover-DbeCmze0.mjs} +1 -5
- package/dist/chunks/{NcPopover-VxUr4c6P.mjs.map → NcPopover-DbeCmze0.mjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs → NcProgressBar-BrDAF_Zr.cjs} +2 -4
- package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs.map → NcProgressBar-BrDAF_Zr.cjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-CZtllSde.mjs → NcProgressBar-D_6Z7U5w.mjs} +2 -4
- package/dist/chunks/{NcProgressBar-CZtllSde.mjs.map → NcProgressBar-D_6Z7U5w.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-Dzs3PYFk.cjs → NcRelatedResourcesPanel-Ccltm-Er.cjs} +8 -18
- package/dist/chunks/{NcRelatedResourcesPanel-i0NTYqUN.mjs.map → NcRelatedResourcesPanel-Ccltm-Er.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-i0NTYqUN.mjs → NcRelatedResourcesPanel-DxC7FIlo.mjs} +8 -18
- package/dist/chunks/{NcRelatedResourcesPanel-Dzs3PYFk.cjs.map → NcRelatedResourcesPanel-DxC7FIlo.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-CEbFjqp9.mjs → NcRichContenteditable-CxlVyONK.mjs} +21 -26
- package/dist/chunks/NcRichContenteditable-CxlVyONK.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-wPBdqg09.cjs → NcRichContenteditable-DgpXktip.cjs} +21 -26
- package/dist/chunks/NcRichContenteditable-DgpXktip.cjs.map +1 -0
- package/dist/chunks/{NcRichText-yXF4GYlY.mjs → NcRichText-BvfYsu9z.mjs} +5 -9
- package/dist/chunks/{NcRichText-yXF4GYlY.mjs.map → NcRichText-BvfYsu9z.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-VkvYnsdW.cjs → NcRichText-C90luaNZ.cjs} +5 -9
- package/dist/chunks/{NcRichText-VkvYnsdW.cjs.map → NcRichText-C90luaNZ.cjs.map} +1 -1
- package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs → NcSavingIndicatorIcon-Bu-zt4pR.cjs} +1 -3
- package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs.map → NcSavingIndicatorIcon-Bu-zt4pR.cjs.map} +1 -1
- package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs → NcSavingIndicatorIcon-nv1147dk.mjs} +1 -3
- package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs.map → NcSavingIndicatorIcon-nv1147dk.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-sVANAgAj.cjs → NcSelect-DMDRJq-5.cjs} +5 -7
- package/dist/chunks/{NcSelect-sVANAgAj.cjs.map → NcSelect-DMDRJq-5.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-CphXaRDq.mjs → NcSelect-kmuffooC.mjs} +5 -7
- package/dist/chunks/{NcSelect-CphXaRDq.mjs.map → NcSelect-kmuffooC.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-Dj3rLyZe.mjs → NcSelectTags-Bppbqmvs.mjs} +3 -5
- package/dist/chunks/{NcSelectTags-Dj3rLyZe.mjs.map → NcSelectTags-Bppbqmvs.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-DTyiD2pa.cjs → NcSelectTags-DEHO1VM7.cjs} +3 -5
- package/dist/chunks/{NcSelectTags-DTyiD2pa.cjs.map → NcSelectTags-DEHO1VM7.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DWpZg8Av.cjs → NcSettingsInputText-BBQoQrAG.cjs} +3 -5
- package/dist/chunks/{NcSettingsInputText-DWpZg8Av.cjs.map → NcSettingsInputText-BBQoQrAG.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DERFu-YS.mjs → NcSettingsInputText-hAlIWx1R.mjs} +3 -5
- package/dist/chunks/{NcSettingsInputText-DERFu-YS.mjs.map → NcSettingsInputText-hAlIWx1R.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-CmmnCHg2.mjs → NcSettingsSection-BT-d36B9.mjs} +3 -7
- package/dist/chunks/{NcSettingsSection-CmmnCHg2.mjs.map → NcSettingsSection-BT-d36B9.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-BwpFsQ1r.cjs → NcSettingsSection-Dvcx-V7F.cjs} +3 -7
- package/dist/chunks/{NcSettingsSection-BwpFsQ1r.cjs.map → NcSettingsSection-Dvcx-V7F.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CL1bEq6g.cjs → NcSettingsSelectGroup-BL8EH6GB.cjs} +4 -6
- package/dist/chunks/{NcSettingsSelectGroup-CL1bEq6g.cjs.map → NcSettingsSelectGroup-BL8EH6GB.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-BQc8lPh6.mjs → NcSettingsSelectGroup-OkPHjjsK.mjs} +4 -6
- package/dist/chunks/{NcSettingsSelectGroup-BQc8lPh6.mjs.map → NcSettingsSelectGroup-OkPHjjsK.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-BDlLxIBj.mjs → NcTextField-DWfgnCsS.mjs} +4 -8
- package/dist/chunks/{NcTextField-BDlLxIBj.mjs.map → NcTextField-DWfgnCsS.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-DLnxKZWa.cjs → NcTextField-Db1VpUnM.cjs} +4 -8
- package/dist/chunks/{NcTextField-DLnxKZWa.cjs.map → NcTextField-Db1VpUnM.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-3t-1P2Jd.cjs → NcTimezonePicker-8R-hkchD.cjs} +3 -5
- package/dist/chunks/{NcTimezonePicker-3t-1P2Jd.cjs.map → NcTimezonePicker-8R-hkchD.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-BSkLspq1.mjs → NcTimezonePicker-DdVLB1Bv.mjs} +3 -5
- package/dist/chunks/{NcTimezonePicker-BSkLspq1.mjs.map → NcTimezonePicker-DdVLB1Bv.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DxTBJt7-.cjs → NcUserBubble-3UqGE1ad.cjs} +4 -8
- package/dist/chunks/{NcUserBubble-DxTBJt7-.cjs.map → NcUserBubble-3UqGE1ad.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-B_i04DHm.mjs → NcUserBubble-CuLF1XDp.mjs} +4 -8
- package/dist/chunks/{NcUserBubble-B_i04DHm.mjs.map → NcUserBubble-CuLF1XDp.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-DZIISraw.mjs → NcUserStatusIcon-CCCrTIIn.mjs} +3 -5
- package/dist/chunks/{NcUserStatusIcon-DZIISraw.mjs.map → NcUserStatusIcon-CCCrTIIn.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-v0iUL9CD.cjs → NcUserStatusIcon-Cx9unttb.cjs} +3 -5
- package/dist/chunks/{NcUserStatusIcon-v0iUL9CD.cjs.map → NcUserStatusIcon-Cx9unttb.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Din0MwwL.cjs → ScopeComponent-BWAf-wih.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-Din0MwwL.cjs.map → ScopeComponent-BWAf-wih.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-BfYUtYsU.mjs → ScopeComponent-lSfP0CG7.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-BfYUtYsU.mjs.map → ScopeComponent-lSfP0CG7.mjs.map} +1 -1
- package/dist/chunks/_l10n-B4dEPXsr.mjs +130 -0
- package/dist/chunks/_l10n-B4dEPXsr.mjs.map +1 -0
- package/dist/chunks/_l10n-BEDw4wKe.cjs +129 -0
- package/dist/chunks/{_l10n-CikTMMT1.cjs.map → _l10n-BEDw4wKe.cjs.map} +1 -1
- package/dist/chunks/{_plugin-vue2_normalizer-D637Qkok.mjs → _plugin-vue2_normalizer-DU4iP6Vu.mjs} +2 -26
- package/dist/chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs.map +1 -0
- package/dist/chunks/{_plugin-vue2_normalizer-DbFIE4_M.cjs → _plugin-vue2_normalizer-V0q-tHlQ.cjs} +2 -26
- package/dist/chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs.map +1 -0
- package/dist/chunks/{index-CsogA-K5.mjs → index-Bz6q9mZw.mjs} +1 -3
- package/dist/chunks/{index-CsogA-K5.mjs.map → index-Bz6q9mZw.mjs.map} +1 -1
- package/dist/chunks/{index-oIpl1nrk.cjs → index-CC4ahXvG.cjs} +3 -5
- package/dist/chunks/index-CC4ahXvG.cjs.map +1 -0
- package/dist/chunks/{index-DbA2OZyf.mjs → index-CMZdBcqP.mjs} +3 -5
- package/dist/chunks/index-CMZdBcqP.mjs.map +1 -0
- package/dist/chunks/{index-BANjku4q.cjs → index-DIJxEozm.cjs} +1 -3
- package/dist/chunks/{index-BANjku4q.cjs.map → index-DIJxEozm.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-CrqjWX5J.cjs → referencePickerModal-CT32j5pQ.cjs} +17 -35
- package/dist/chunks/{referencePickerModal-CrqjWX5J.cjs.map → referencePickerModal-CT32j5pQ.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-DN2oqc6Q.mjs → referencePickerModal-DW9uLKIZ.mjs} +17 -35
- package/dist/chunks/{referencePickerModal-DN2oqc6Q.mjs.map → referencePickerModal-DW9uLKIZ.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor-DamXL3WM.cjs → usernameToColor-CpdyuYfd.cjs} +1 -1
- package/dist/chunks/{usernameToColor-DamXL3WM.cjs.map → usernameToColor-CpdyuYfd.cjs.map} +1 -1
- package/dist/chunks/{usernameToColor-zLYstN5o.mjs → usernameToColor-DivFGAn4.mjs} +1 -1
- package/dist/chunks/{usernameToColor-zLYstN5o.mjs.map → usernameToColor-DivFGAn4.mjs.map} +1 -1
- package/dist/index.cjs +54 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +55 -53
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/NcActions-BNYD2s1x.mjs.map +0 -1
- package/dist/chunks/NcActions-Bu5UnlHN.cjs.map +0 -1
- package/dist/chunks/NcAvatar-B_FI8kMO.cjs.map +0 -1
- package/dist/chunks/NcAvatar-C1miLzxS.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-Dx3hLEKV.cjs +0 -4
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-Dx3hLEKV.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-U1P8BlMr.mjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-U1P8BlMr.mjs.map +0 -1
- package/dist/chunks/NcDialog-DGaf6Udc.cjs.map +0 -1
- package/dist/chunks/NcDialog-VincZ0XS.mjs.map +0 -1
- package/dist/chunks/NcDialogButton-CNWF4urB.cjs.map +0 -1
- package/dist/chunks/NcDialogButton-JvyN3X6S.mjs.map +0 -1
- package/dist/chunks/NcListItem-C88XN6YO.mjs.map +0 -1
- package/dist/chunks/NcListItem-EKJB0pLP.cjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-CEbFjqp9.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-wPBdqg09.cjs.map +0 -1
- package/dist/chunks/_l10n-BlIvfB2V.mjs +0 -130
- package/dist/chunks/_l10n-BlIvfB2V.mjs.map +0 -1
- package/dist/chunks/_l10n-CikTMMT1.cjs +0 -129
- package/dist/chunks/_plugin-vue2_normalizer-D637Qkok.mjs.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-DbFIE4_M.cjs.map +0 -1
- package/dist/chunks/index-DbA2OZyf.mjs.map +0 -1
- package/dist/chunks/index-oIpl1nrk.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcDateTimePickerNative-BAcKr0B3.css';
|
|
2
|
-
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-
|
|
3
|
-
import { S as ScopeComponent } from "../chunks/ScopeComponent-
|
|
2
|
+
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
3
|
+
import { S as ScopeComponent } from "../chunks/ScopeComponent-lSfP0CG7.mjs";
|
|
4
4
|
const inputDateTypes = ["date", "datetime-local", "month", "time", "week"];
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
name: "NcDateTimePickerNative",
|
|
@@ -188,9 +188,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
188
188
|
_sfc_staticRenderFns,
|
|
189
189
|
false,
|
|
190
190
|
null,
|
|
191
|
-
"fbe2ff4a"
|
|
192
|
-
null,
|
|
193
|
-
null
|
|
191
|
+
"fbe2ff4a"
|
|
194
192
|
);
|
|
195
193
|
const NcDateTimePickerNative = __component__.exports;
|
|
196
194
|
ScopeComponent(NcDateTimePickerNative);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDateTimePickerNative.mjs","sources":["../../src/components/NcDateTimePickerNative/NcDateTimePickerNative.vue","../../src/components/NcDateTimePickerNative/index.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n#### Usage: type='datetime-local'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='week'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"week\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='month'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"month\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"native-datetime-picker\">\n\t\t<label :class=\"{ 'hidden-visually': hideLabel }\" :for=\"id\">{{ label }}</label>\n\t\t<input :id=\"id\"\n\t\t\tclass=\"native-datetime-picker--input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type=\"type\"\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\tv-on=\"listeners\">\n\t</div>\n</template>\n\n<script>\n\nconst inputDateTypes = ['date', 'datetime-local', 'month', 'time', 'week']\n\nexport default {\n\tname: 'NcDateTimePickerNative',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The date is – like the `Date` object in JavaScript – tied to UTC.\n\t\t * The selected time zone does not have an influence of the selected time and date value.\n\t\t * You have to translate the time yourself when you want to factor in time zones.\n\t\t * Pass null to clear the input field.\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Date,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the input field\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t * default type: String\n\t\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidate: (name) => inputDateTypes.includes(name),\n\t\t},\n\t\t/**\n\t\t * text inside the label element\n\t\t * default type: String\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'Please choose a date',\n\t\t},\n\t\t/**\n\t\t * min attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmin: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * max attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmax: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Flag to hide the label\n\t\t * default type: String\n\t\t * The hidden input label for accessibility purposes.\n\t\t */\n\t\thideLabel: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'input',\n\t],\n\n\tcomputed: {\n\t\tformattedValue() {\n\t\t\treturn this.formatValue(this.value)\n\t\t},\n\t\tformattedMin() {\n\t\t\tif (this.min) {\n\t\t\t\treturn this.formatValue(this.min)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tformattedMax() {\n\t\t\tif (this.max) {\n\t\t\t\treturn this.formatValue(this.max)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tlisteners() {\n\t\t\treturn {\n\t\t\t\t...this.$listeners,\n\t\t\t\t/**\n\t\t\t\t * Handle the input event\n\t\t\t\t *\n\t\t\t\t * @param {InputEvent} $event input event payload\n\t\t\t\t * @return {Date|string} new chosen Date() or an empty string\n\t\t\t\t */\n\t\t\t\tinput: ($event) => {\n\t\t\t\t\tif (isNaN($event.target.valueAsNumber)) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {string} empty string\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', null)\n\t\t\t\t\t}\n\t\t\t\t\tif (this.type === 'time') {\n\t\t\t\t\t\tconst time = $event.target.value\n\t\t\t\t\t\tif (this.value === '') {\n\t\t\t\t\t\t\t// this case is because of Chrome bug\n\t\t\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(new Date())\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(this.value)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\t\tconst MM = (new Date($event.target.value).getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\t\t\tif (this.value === '') {\n\t\t\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(new Date())\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(this.value)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t\t}\n\t\t\t\t\tconst timezoneOffsetSeconds = new Date($event.target.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\t\t\t\tconst inputDateWithTimezone = $event.target.valueAsNumber + timezoneOffsetSeconds\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('input', new Date(inputDateWithTimezone))\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Returns Object with string values of a Date\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {object|undefined}\n\t\t */\n\t\tgetReadableDate(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\t\t\t\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tconst dd = value.getDate().toString().padStart(2, '0')\n\t\t\t\tconst hh = value.getHours().toString().padStart(2, '0')\n\t\t\t\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\t\t\t\treturn { yyyy, MM, dd, hh, mm }\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Returns preformatted value for the input field\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {string|undefined}\n\t\t */\n\t\tformatValue(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst { yyyy, MM, dd, hh, mm } = this.getReadableDate(value)\n\t\t\t\tif (this.type === 'datetime-local') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'date') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}`\n\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\treturn `${yyyy}-${MM}`\n\t\t\t\t} else if (this.type === 'time') {\n\t\t\t\t\treturn `${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'week') {\n\t\t\t\t\tconst startDate = new Date(yyyy, 0, 1)\n\t\t\t\t\tconst daysSinceBeginningOfYear = Math.floor((value - startDate)\n\t\t\t\t\t\t/ (24 * 60 * 60 * 1000))\n\t\t\t\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\t\t\t\treturn `${yyyy}-W${weekNumber}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t.native-datetime-picker {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--input {\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tpadding-right: 4px;\n\t}\n\n\t[data-theme-light],\n\t[data-themes*=light] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\n\t[data-theme-dark],\n\t[data-themes*=dark] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n\n\t[data-theme-default],\n\t[data-themes*=default] {\n\t\t@media (prefers-color-scheme: light) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: light;\n\t\t\t}\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: dark;\n\t\t\t}\n\t\t}\n\t}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport NcDateTimePickerNative from './NcDateTimePickerNative.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePickerNative)\n\nexport default NcDateTimePickerNative\n"],"names":["yyyy","MM","dd","hh","mm"],"mappings":";;AA6IA,MAAA,iBAAA,CAAA,QAAA,kBAAA,SAAA,QAAA,MAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,CAAA,SAAA,eAAA,SAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AA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ue","../../src/components/NcDateTimePickerNative/index.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components provides a wrapper around the native browser datetime picker. <br>\nThis is an input with some type of date e.g. https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local). <br>\nAll available types are: 'date', 'datetime-local', 'month', 'time' and 'week', please check them here: https://html.spec.whatwg.org/multipage/input.html# <br>\n\n### Examples\n\n#### Usage: type='datetime-local'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='datetime-local' with min date and max date\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:min=\"yesterdayDate\"\n\t\t\t:max=\"someDate\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"datetime-local\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t\tyesterdayDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n\t\t\t\tsomeDate: new Date(new Date().setDate(new Date().getDate() + 7)),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='week'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"week\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Usage: type='month'\n```vue\n<template>\n\t<div>\n\t\t<span>Picked date: {{ value || 'null' }}</span>\n\t\t<NcDateTimePickerNative\n\t\t\tv-model=\"value\"\n\t\t\t:id=\"id\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"month\" />\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tvalue: new Date(),\n\t\t\t\tid: 'date-time-picker',\n\t\t\t\tlabel: 'please select a new date',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"native-datetime-picker\">\n\t\t<label :class=\"{ 'hidden-visually': hideLabel }\" :for=\"id\">{{ label }}</label>\n\t\t<input :id=\"id\"\n\t\t\tclass=\"native-datetime-picker--input\"\n\t\t\t:class=\"inputClass\"\n\t\t\t:type=\"type\"\n\t\t\t:value=\"formattedValue\"\n\t\t\t:min=\"formattedMin\"\n\t\t\t:max=\"formattedMax\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\tv-on=\"listeners\">\n\t</div>\n</template>\n\n<script>\n\nconst inputDateTypes = ['date', 'datetime-local', 'month', 'time', 'week']\n\nexport default {\n\tname: 'NcDateTimePickerNative',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The date is – like the `Date` object in JavaScript – tied to UTC.\n\t\t * The selected time zone does not have an influence of the selected time and date value.\n\t\t * You have to translate the time yourself when you want to factor in time zones.\n\t\t * Pass null to clear the input field.\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Date,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the input field\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t * default type: String\n\t\t * The type of the input element, it can be `date`, `datetime-local`, `month`, `time`, `week`\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t\tvalidate: (name) => inputDateTypes.includes(name),\n\t\t},\n\t\t/**\n\t\t * text inside the label element\n\t\t * default type: String\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'Please choose a date',\n\t\t},\n\t\t/**\n\t\t * min attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmin: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * max attribute of the input field\n\t\t * default type: null\n\t\t */\n\t\tmax: {\n\t\t\ttype: [Date, Boolean],\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Flag to hide the label\n\t\t * default type: String\n\t\t * The hidden input label for accessibility purposes.\n\t\t */\n\t\thideLabel: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcDateTimePickerNative in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'input',\n\t],\n\n\tcomputed: {\n\t\tformattedValue() {\n\t\t\treturn this.formatValue(this.value)\n\t\t},\n\t\tformattedMin() {\n\t\t\tif (this.min) {\n\t\t\t\treturn this.formatValue(this.min)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tformattedMax() {\n\t\t\tif (this.max) {\n\t\t\t\treturn this.formatValue(this.max)\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tlisteners() {\n\t\t\treturn {\n\t\t\t\t...this.$listeners,\n\t\t\t\t/**\n\t\t\t\t * Handle the input event\n\t\t\t\t *\n\t\t\t\t * @param {InputEvent} $event input event payload\n\t\t\t\t * @return {Date|string} new chosen Date() or an empty string\n\t\t\t\t */\n\t\t\t\tinput: ($event) => {\n\t\t\t\t\tif (isNaN($event.target.valueAsNumber)) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {string} empty string\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', null)\n\t\t\t\t\t}\n\t\t\t\t\tif (this.type === 'time') {\n\t\t\t\t\t\tconst time = $event.target.value\n\t\t\t\t\t\tif (this.value === '') {\n\t\t\t\t\t\t\t// this case is because of Chrome bug\n\t\t\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(new Date())\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { yyyy, MM, dd } = this.getReadableDate(this.value)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${time}`))\n\t\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\t\tconst MM = (new Date($event.target.value).getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\t\t\tif (this.value === '') {\n\t\t\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(new Date())\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { yyyy, dd, hh, mm } = this.getReadableDate(this.value)\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t\t */\n\t\t\t\t\t\treturn this.$emit('input', new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`))\n\t\t\t\t\t}\n\t\t\t\t\tconst timezoneOffsetSeconds = new Date($event.target.valueAsNumber).getTimezoneOffset() * 1000 * 60\n\t\t\t\t\tconst inputDateWithTimezone = $event.target.valueAsNumber + timezoneOffsetSeconds\n\t\t\t\t\t/**\n\t\t\t\t\t * Emitted when the input value changes\n\t\t\t\t\t *\n\t\t\t\t\t * @return {Date} new chosen Date()\n\t\t\t\t\t */\n\t\t\t\t\treturn this.$emit('input', new Date(inputDateWithTimezone))\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Returns Object with string values of a Date\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {object|undefined}\n\t\t */\n\t\tgetReadableDate(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst yyyy = value.getFullYear().toString().padStart(4, '0')\n\t\t\t\tconst MM = (value.getMonth() + 1).toString().padStart(2, '0')\n\t\t\t\tconst dd = value.getDate().toString().padStart(2, '0')\n\t\t\t\tconst hh = value.getHours().toString().padStart(2, '0')\n\t\t\t\tconst mm = value.getMinutes().toString().padStart(2, '0')\n\n\t\t\t\treturn { yyyy, MM, dd, hh, mm }\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Returns preformatted value for the input field\n\t\t *\n\t\t * @param {Date} value The selected value\n\t\t * @return {string|undefined}\n\t\t */\n\t\tformatValue(value) {\n\t\t\tif (value instanceof Date) {\n\t\t\t\tconst { yyyy, MM, dd, hh, mm } = this.getReadableDate(value)\n\t\t\t\tif (this.type === 'datetime-local') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}T${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'date') {\n\t\t\t\t\treturn `${yyyy}-${MM}-${dd}`\n\t\t\t\t} else if (this.type === 'month') {\n\t\t\t\t\treturn `${yyyy}-${MM}`\n\t\t\t\t} else if (this.type === 'time') {\n\t\t\t\t\treturn `${hh}:${mm}`\n\t\t\t\t} else if (this.type === 'week') {\n\t\t\t\t\tconst startDate = new Date(yyyy, 0, 1)\n\t\t\t\t\tconst daysSinceBeginningOfYear = Math.floor((value - startDate)\n\t\t\t\t\t\t/ (24 * 60 * 60 * 1000))\n\t\t\t\t\tconst weekNumber = Math.ceil(daysSinceBeginningOfYear / 7)\n\t\t\t\t\treturn `${yyyy}-W${weekNumber}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t.native-datetime-picker {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.native-datetime-picker .native-datetime-picker--input {\n\t\twidth: 100%;\n\t\tflex: 0 0 auto;\n\t\tpadding-right: 4px;\n\t}\n\n\t[data-theme-light],\n\t[data-themes*=light] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: light;\n\t\t}\n\t}\n\n\t[data-theme-dark],\n\t[data-themes*=dark] {\n\t\t.native-datetime-picker--input {\n\t\t\tcolor-scheme: dark;\n\t\t}\n\t}\n\n\t[data-theme-default],\n\t[data-themes*=default] {\n\t\t@media (prefers-color-scheme: light) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: light;\n\t\t\t}\n\t\t}\n\t\t@media (prefers-color-scheme: dark) {\n\t\t\t.native-datetime-picker--input {\n\t\t\t\tcolor-scheme: dark;\n\t\t\t}\n\t\t}\n\t}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport NcDateTimePickerNative from './NcDateTimePickerNative.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePickerNative)\n\nexport default NcDateTimePickerNative\n"],"names":["yyyy","MM","dd","hh","mm"],"mappings":";;AA6IA,MAAA,iBAAA,CAAA,QAAA,kBAAA,SAAA,QAAA,MAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,CAAA,SAAA,eAAA,SAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,KAAA;AAAA,MACA,MAAA,CAAA,MAAA,OAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,KAAA;AAAA,MACA,MAAA,CAAA,MAAA,OAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA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,EAAA,MAAA,IAAA,IAAA,IAAA,OAAA,KAAA,gBAAA,KAAA;AACA,YAAA,KAAA,SAAA,kBAAA;AACA,iBAAA,GAAA,aAAA,KAAA,WAAA,KAAA,WAAA,KAAA,WAAA,KAAA;AAAA,QACA,WAAA,KAAA,SAAA,QAAA;AACA,iBAAA,GAAA,aAAA,KAAA,WAAA,KAAA;AAAA,QACA,WAAA,KAAA,SAAA,SAAA;AACA,iBAAA,GAAA,aAAA,KAAA;AAAA,QACA,WAAA,KAAA,SAAA,QAAA;AACA,iBAAA,GAAA,WAAA,KAAA;AAAA,QACA,WAAA,KAAA,SAAA,QAAA;AACA,gBAAA,YAAA,IAAA,KAAA,MAAA,GAAA,CAAA;AACA,gBAAA,2BAAA,KAAA,OAAA,QAAA,cACA,KAAA,KAAA,KAAA,IAAA;AACA,gBAAA,aAAA,KAAA,KAAA,2BAAA,CAAA;AACA,iBAAA,GAAA,aAAA,MAAA;AAAA,QACA;AAAA,MACA,OAAA;AACA,eAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;AC3VA,eAAe,sBAAsB;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../assets/NcEllipsisedOption-DZK2vWD1.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const Components_NcHighlight = require("../chunks/index-
|
|
4
|
-
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-
|
|
3
|
+
const Components_NcHighlight = require("../chunks/index-DIJxEozm.cjs");
|
|
4
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
name: "NcEllipsisedOption",
|
|
7
7
|
components: {
|
|
@@ -87,9 +87,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
87
87
|
_sfc_staticRenderFns,
|
|
88
88
|
false,
|
|
89
89
|
null,
|
|
90
|
-
"0c4478a6"
|
|
91
|
-
null,
|
|
92
|
-
null
|
|
90
|
+
"0c4478a6"
|
|
93
91
|
);
|
|
94
92
|
const NcEllipsisedOption = __component__.exports;
|
|
95
93
|
module.exports = NcEllipsisedOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEllipsisedOption.cjs","sources":["../../src/components/NcEllipsisedOption/NcEllipsisedOption.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA component to display a long text with highlight support in one line truncated with ellipsis in the end but keeping up to 10 last characters.\n\nIt is supposed to be used as an `NcSelect`'s option in first place.\n\n### General usage\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Plain text</h4>\n\t\t<p>{{ text }}</p>\n\n\t\t<h4>Truncated text with <code>text-overflow: ellipsis</code></h4>\n\t\t<p style=\"text-overflow: ellipsis; overflow: hidden; white-space: pre;\">{{ text }}</p>\n\n\t\t<h4>NcEllipsisedOption searching for \"Nineteen\"</h4>\n\t\t<NcEllipsisedOption :name=\"text\" :search=\"search\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext: 'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen Twenty',\n\t\t\tsearch: 'Nineteen',\n\t\t}\n\t},\n}\n</script>\n```\n\n### Usage in `NcSelect`\n\n```vue\n<template>\n\t<NcSelect v-model=\"selected\" :options=\"options\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"option.label\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"selectedOption.label\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\toptions: [\n\t\t\t\t'Option 1 - a short opt.',\n\t\t\t\t'Option 2 - a very very very very long opt.',\n\t\t\t].map((label) => ({ label })),\n\t\t\tselected: '',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<span class=\"name-parts\" :title=\"name\">\n\t\t<NcHighlight class=\"name-parts__first\"\n\t\t\t:text=\"part1\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight1\" />\n\t\t<NcHighlight v-if=\"part2\"\n\t\t\tclass=\"name-parts__last\"\n\t\t\t:text=\"part2\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight2\" />\n\t</span>\n</template>\n<script>\nimport NcHighlight from '../NcHighlight/index.js'\nimport FindRanges from '../../utils/FindRanges.js'\n\nexport default {\n\tname: 'NcEllipsisedOption',\n\n\tcomponents: {\n\t\tNcHighlight,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The text to be display in one line. If it is longer than 10 characters, it is be truncated with ellipsis in the end but keeping up to 10 last characters to fit the parent container.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The search value to highlight in the text\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tneedsTruncate() {\n\t\t\treturn this.name && this.name.length >= 10\n\t\t},\n\t\t/**\n\t\t * Index at which to split the name if it is longer than 10 characters.\n\t\t *\n\t\t * @return {number} The position at which to split\n\t\t */\n\t\tsplit() {\n\t\t\t// leave maximum 10 letters\n\t\t\treturn this.name.length - Math.min(Math.floor(this.name.length / 2), 10)\n\t\t},\n\t\tpart1() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(0, this.split)\n\t\t\t}\n\t\t\treturn this.name\n\t\t},\n\t\tpart2() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(this.split)\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\t\t/**\n\t\t * The ranges to highlight. Since we split the string for ellipsising,\n\t\t * the Highlight component cannot figure this out itself and needs the ranges provided.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight1() {\n\t\t\tif (!this.search) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn FindRanges(this.name, this.search)\n\t\t},\n\t\t/**\n\t\t * We shift the ranges for the second part by the position of the split.\n\t\t * Ranges out of the string length are discarded by the Highlight component,\n\t\t * so we don't need to take care of this here.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight2() {\n\t\t\treturn this.highlight1.map(range => {\n\t\t\t\treturn {\n\t\t\t\t\tstart: range.start - this.split,\n\t\t\t\t\tend: range.end - this.split,\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.name-parts {\n\tdisplay: flex;\n\tmax-width: 100%;\n\tcursor: inherit;\n\t&__first {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\t&__first,\n\t&__last {\n\t\t// prevent whitespace from being trimmed\n\t\twhite-space: pre;\n\t\tcursor: inherit;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n}\n</style>\n"],"names":["NcHighlight","FindRanges"],"mappings":";;;AAqFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAA,uBAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,gBAAA;AACA,aAAA,KAAA,QAAA,KAAA,KAAA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAEA,aAAA,KAAA,KAAA,SAAA,KAAA,IAAA,KAAA,MAAA,KAAA,KAAA,SAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA,IACA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA,KAAA,KAAA,MAAA,GAAA,KAAA,KAAA;AAAA,MACA;AACA,aAAA,KAAA;AAAA,IACA;AAAA,IACA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA,KAAA,KAAA,MAAA,KAAA,KAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,aAAA;AACA,UAAA,CAAA,KAAA,QAAA;AACA,eAAA,CAAA;AAAA,MACA;AACA,aAAAC,uBAAA,WAAA,KAAA,MAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,aAAA;AACA,aAAA,KAAA,WAAA,IAAA,WAAA;AACA,eAAA;AAAA,UACA,OAAA,MAAA,QAAA,KAAA;AAAA,UACA,KAAA,MAAA,MAAA,KAAA;AAAA,QACA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"NcEllipsisedOption.cjs","sources":["../../src/components/NcEllipsisedOption/NcEllipsisedOption.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA component to display a long text with highlight support in one line truncated with ellipsis in the end but keeping up to 10 last characters.\n\nIt is supposed to be used as an `NcSelect`'s option in first place.\n\n### General usage\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Plain text</h4>\n\t\t<p>{{ text }}</p>\n\n\t\t<h4>Truncated text with <code>text-overflow: ellipsis</code></h4>\n\t\t<p style=\"text-overflow: ellipsis; overflow: hidden; white-space: pre;\">{{ text }}</p>\n\n\t\t<h4>NcEllipsisedOption searching for \"Nineteen\"</h4>\n\t\t<NcEllipsisedOption :name=\"text\" :search=\"search\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext: 'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen Twenty',\n\t\t\tsearch: 'Nineteen',\n\t\t}\n\t},\n}\n</script>\n```\n\n### Usage in `NcSelect`\n\n```vue\n<template>\n\t<NcSelect v-model=\"selected\" :options=\"options\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"option.label\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"selectedOption.label\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\toptions: [\n\t\t\t\t'Option 1 - a short opt.',\n\t\t\t\t'Option 2 - a very very very very long opt.',\n\t\t\t].map((label) => ({ label })),\n\t\t\tselected: '',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<span class=\"name-parts\" :title=\"name\">\n\t\t<NcHighlight class=\"name-parts__first\"\n\t\t\t:text=\"part1\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight1\" />\n\t\t<NcHighlight v-if=\"part2\"\n\t\t\tclass=\"name-parts__last\"\n\t\t\t:text=\"part2\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight2\" />\n\t</span>\n</template>\n<script>\nimport NcHighlight from '../NcHighlight/index.js'\nimport FindRanges from '../../utils/FindRanges.js'\n\nexport default {\n\tname: 'NcEllipsisedOption',\n\n\tcomponents: {\n\t\tNcHighlight,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The text to be display in one line. If it is longer than 10 characters, it is be truncated with ellipsis in the end but keeping up to 10 last characters to fit the parent container.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The search value to highlight in the text\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tneedsTruncate() {\n\t\t\treturn this.name && this.name.length >= 10\n\t\t},\n\t\t/**\n\t\t * Index at which to split the name if it is longer than 10 characters.\n\t\t *\n\t\t * @return {number} The position at which to split\n\t\t */\n\t\tsplit() {\n\t\t\t// leave maximum 10 letters\n\t\t\treturn this.name.length - Math.min(Math.floor(this.name.length / 2), 10)\n\t\t},\n\t\tpart1() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(0, this.split)\n\t\t\t}\n\t\t\treturn this.name\n\t\t},\n\t\tpart2() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(this.split)\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\t\t/**\n\t\t * The ranges to highlight. Since we split the string for ellipsising,\n\t\t * the Highlight component cannot figure this out itself and needs the ranges provided.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight1() {\n\t\t\tif (!this.search) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn FindRanges(this.name, this.search)\n\t\t},\n\t\t/**\n\t\t * We shift the ranges for the second part by the position of the split.\n\t\t * Ranges out of the string length are discarded by the Highlight component,\n\t\t * so we don't need to take care of this here.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight2() {\n\t\t\treturn this.highlight1.map(range => {\n\t\t\t\treturn {\n\t\t\t\t\tstart: range.start - this.split,\n\t\t\t\t\tend: range.end - this.split,\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.name-parts {\n\tdisplay: flex;\n\tmax-width: 100%;\n\tcursor: inherit;\n\t&__first {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\t&__first,\n\t&__last {\n\t\t// prevent whitespace from being trimmed\n\t\twhite-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A,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcEllipsisedOption-DZK2vWD1.css';
|
|
2
|
-
import { N as NcHighlight, F as FindRanges } from "../chunks/index-
|
|
3
|
-
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-
|
|
2
|
+
import { N as NcHighlight, F as FindRanges } from "../chunks/index-Bz6q9mZw.mjs";
|
|
3
|
+
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
4
4
|
const _sfc_main = {
|
|
5
5
|
name: "NcEllipsisedOption",
|
|
6
6
|
components: {
|
|
@@ -86,9 +86,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
86
86
|
_sfc_staticRenderFns,
|
|
87
87
|
false,
|
|
88
88
|
null,
|
|
89
|
-
"0c4478a6"
|
|
90
|
-
null,
|
|
91
|
-
null
|
|
89
|
+
"0c4478a6"
|
|
92
90
|
);
|
|
93
91
|
const NcEllipsisedOption = __component__.exports;
|
|
94
92
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEllipsisedOption.mjs","sources":["../../src/components/NcEllipsisedOption/NcEllipsisedOption.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA component to display a long text with highlight support in one line truncated with ellipsis in the end but keeping up to 10 last characters.\n\nIt is supposed to be used as an `NcSelect`'s option in first place.\n\n### General usage\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Plain text</h4>\n\t\t<p>{{ text }}</p>\n\n\t\t<h4>Truncated text with <code>text-overflow: ellipsis</code></h4>\n\t\t<p style=\"text-overflow: ellipsis; overflow: hidden; white-space: pre;\">{{ text }}</p>\n\n\t\t<h4>NcEllipsisedOption searching for \"Nineteen\"</h4>\n\t\t<NcEllipsisedOption :name=\"text\" :search=\"search\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext: 'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen Twenty',\n\t\t\tsearch: 'Nineteen',\n\t\t}\n\t},\n}\n</script>\n```\n\n### Usage in `NcSelect`\n\n```vue\n<template>\n\t<NcSelect v-model=\"selected\" :options=\"options\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"option.label\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"selectedOption.label\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\toptions: [\n\t\t\t\t'Option 1 - a short opt.',\n\t\t\t\t'Option 2 - a very very very very long opt.',\n\t\t\t].map((label) => ({ label })),\n\t\t\tselected: '',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<span class=\"name-parts\" :title=\"name\">\n\t\t<NcHighlight class=\"name-parts__first\"\n\t\t\t:text=\"part1\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight1\" />\n\t\t<NcHighlight v-if=\"part2\"\n\t\t\tclass=\"name-parts__last\"\n\t\t\t:text=\"part2\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight2\" />\n\t</span>\n</template>\n<script>\nimport NcHighlight from '../NcHighlight/index.js'\nimport FindRanges from '../../utils/FindRanges.js'\n\nexport default {\n\tname: 'NcEllipsisedOption',\n\n\tcomponents: {\n\t\tNcHighlight,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The text to be display in one line. If it is longer than 10 characters, it is be truncated with ellipsis in the end but keeping up to 10 last characters to fit the parent container.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The search value to highlight in the text\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tneedsTruncate() {\n\t\t\treturn this.name && this.name.length >= 10\n\t\t},\n\t\t/**\n\t\t * Index at which to split the name if it is longer than 10 characters.\n\t\t *\n\t\t * @return {number} The position at which to split\n\t\t */\n\t\tsplit() {\n\t\t\t// leave maximum 10 letters\n\t\t\treturn this.name.length - Math.min(Math.floor(this.name.length / 2), 10)\n\t\t},\n\t\tpart1() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(0, this.split)\n\t\t\t}\n\t\t\treturn this.name\n\t\t},\n\t\tpart2() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(this.split)\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\t\t/**\n\t\t * The ranges to highlight. Since we split the string for ellipsising,\n\t\t * the Highlight component cannot figure this out itself and needs the ranges provided.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight1() {\n\t\t\tif (!this.search) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn FindRanges(this.name, this.search)\n\t\t},\n\t\t/**\n\t\t * We shift the ranges for the second part by the position of the split.\n\t\t * Ranges out of the string length are discarded by the Highlight component,\n\t\t * so we don't need to take care of this here.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight2() {\n\t\t\treturn this.highlight1.map(range => {\n\t\t\t\treturn {\n\t\t\t\t\tstart: range.start - this.split,\n\t\t\t\t\tend: range.end - this.split,\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.name-parts {\n\tdisplay: flex;\n\tmax-width: 100%;\n\tcursor: inherit;\n\t&__first {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\t&__first,\n\t&__last {\n\t\t// prevent whitespace from being trimmed\n\t\tw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ACA
|
|
1
|
+
{"version":3,"file":"NcEllipsisedOption.mjs","sources":["../../src/components/NcEllipsisedOption/NcEllipsisedOption.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nA component to display a long text with highlight support in one line truncated with ellipsis in the end but keeping up to 10 last characters.\n\nIt is supposed to be used as an `NcSelect`'s option in first place.\n\n### General usage\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Plain text</h4>\n\t\t<p>{{ text }}</p>\n\n\t\t<h4>Truncated text with <code>text-overflow: ellipsis</code></h4>\n\t\t<p style=\"text-overflow: ellipsis; overflow: hidden; white-space: pre;\">{{ text }}</p>\n\n\t\t<h4>NcEllipsisedOption searching for \"Nineteen\"</h4>\n\t\t<NcEllipsisedOption :name=\"text\" :search=\"search\" />\n\t</div>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext: 'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen Twenty',\n\t\t\tsearch: 'Nineteen',\n\t\t}\n\t},\n}\n</script>\n```\n\n### Usage in `NcSelect`\n\n```vue\n<template>\n\t<NcSelect v-model=\"selected\" :options=\"options\">\n\t\t<template #option=\"option\">\n\t\t\t<NcEllipsisedOption :name=\"option.label\" />\n\t\t</template>\n\t\t<template #selected-option=\"selectedOption\">\n\t\t\t<NcEllipsisedOption :name=\"selectedOption.label\" />\n\t\t</template>\n\t</NcSelect>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\toptions: [\n\t\t\t\t'Option 1 - a short opt.',\n\t\t\t\t'Option 2 - a very very very very long opt.',\n\t\t\t].map((label) => ({ label })),\n\t\t\tselected: '',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<span class=\"name-parts\" :title=\"name\">\n\t\t<NcHighlight class=\"name-parts__first\"\n\t\t\t:text=\"part1\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight1\" />\n\t\t<NcHighlight v-if=\"part2\"\n\t\t\tclass=\"name-parts__last\"\n\t\t\t:text=\"part2\"\n\t\t\t:search=\"search\"\n\t\t\t:highlight=\"highlight2\" />\n\t</span>\n</template>\n<script>\nimport NcHighlight from '../NcHighlight/index.js'\nimport FindRanges from '../../utils/FindRanges.js'\n\nexport default {\n\tname: 'NcEllipsisedOption',\n\n\tcomponents: {\n\t\tNcHighlight,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The text to be display in one line. If it is longer than 10 characters, it is be truncated with ellipsis in the end but keeping up to 10 last characters to fit the parent container.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The search value to highlight in the text\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tneedsTruncate() {\n\t\t\treturn this.name && this.name.length >= 10\n\t\t},\n\t\t/**\n\t\t * Index at which to split the name if it is longer than 10 characters.\n\t\t *\n\t\t * @return {number} The position at which to split\n\t\t */\n\t\tsplit() {\n\t\t\t// leave maximum 10 letters\n\t\t\treturn this.name.length - Math.min(Math.floor(this.name.length / 2), 10)\n\t\t},\n\t\tpart1() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(0, this.split)\n\t\t\t}\n\t\t\treturn this.name\n\t\t},\n\t\tpart2() {\n\t\t\tif (this.needsTruncate) {\n\t\t\t\treturn this.name.slice(this.split)\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\t\t/**\n\t\t * The ranges to highlight. Since we split the string for ellipsising,\n\t\t * the Highlight component cannot figure this out itself and needs the ranges provided.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight1() {\n\t\t\tif (!this.search) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn FindRanges(this.name, this.search)\n\t\t},\n\t\t/**\n\t\t * We shift the ranges for the second part by the position of the split.\n\t\t * Ranges out of the string length are discarded by the Highlight component,\n\t\t * so we don't need to take care of this here.\n\t\t *\n\t\t * @return {Array} The array with the ranges to highlight\n\t\t */\n\t\thighlight2() {\n\t\t\treturn this.highlight1.map(range => {\n\t\t\t\treturn {\n\t\t\t\t\tstart: range.start - this.split,\n\t\t\t\t\tend: range.end - this.split,\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.name-parts {\n\tdisplay: flex;\n\tmax-width: 100%;\n\tcursor: inherit;\n\t&__first {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\t&__first,\n\t&__last {\n\t\t// prevent whitespace from being trimmed\n\t\twhite-space: pre;\n\t\tcursor: inherit;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;AAqFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,gBAAA;AACA,aAAA,KAAA,QAAA,KAAA,KAAA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAEA,aAAA,KAAA,KAAA,SAAA,KAAA,IAAA,KAAA,MAAA,KAAA,KAAA,SAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA,IACA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA,KAAA,KAAA,MAAA,GAAA,KAAA,KAAA;AAAA,MACA;AACA,aAAA,KAAA;AAAA,IACA;AAAA,IACA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA,KAAA,KAAA,MAAA,KAAA,KAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,aAAA;AACA,UAAA,CAAA,KAAA,QAAA;AACA,eAAA,CAAA;AAAA,MACA;AACA,aAAA,WAAA,KAAA,MAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,aAAA;AACA,aAAA,KAAA,WAAA,IAAA,WAAA;AACA,eAAA;AAAA,UACA,OAAA,MAAA,QAAA,KAAA;AAAA,UACA,KAAA,MAAA,MAAA,KAAA;AAAA,QACA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcEmptyContent-BU0QVo3d.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-
|
|
3
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
4
4
|
const _sfc_main = {
|
|
5
5
|
name: "NcEmptyContent",
|
|
6
6
|
props: {
|
|
@@ -49,9 +49,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
49
49
|
_sfc_staticRenderFns,
|
|
50
50
|
false,
|
|
51
51
|
null,
|
|
52
|
-
"fede0c71"
|
|
53
|
-
null,
|
|
54
|
-
null
|
|
52
|
+
"fede0c71"
|
|
55
53
|
);
|
|
56
54
|
const NcEmptyContent = __component__.exports;
|
|
57
55
|
module.exports = NcEmptyContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEmptyContent.cjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<span v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\" class=\"empty-content__description\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;AAqJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAA,UAAA,OAAA,gBAAA,mBAAA;AAAA,IACA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"NcEmptyContent.cjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<span v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\" class=\"empty-content__description\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;AAqJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAA,UAAA,OAAA,gBAAA,mBAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcEmptyContent-BU0QVo3d.css';
|
|
2
|
-
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-
|
|
2
|
+
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
3
3
|
const _sfc_main = {
|
|
4
4
|
name: "NcEmptyContent",
|
|
5
5
|
props: {
|
|
@@ -48,9 +48,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
48
48
|
_sfc_staticRenderFns,
|
|
49
49
|
false,
|
|
50
50
|
null,
|
|
51
|
-
"fede0c71"
|
|
52
|
-
null,
|
|
53
|
-
null
|
|
51
|
+
"fede0c71"
|
|
54
52
|
);
|
|
55
53
|
const NcEmptyContent = __component__.exports;
|
|
56
54
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcEmptyContent.mjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<span v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\" class=\"empty-content__description\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";AAqJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAA,UAAA,OAAA,gBAAA,mBAAA;AAAA,IACA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"NcEmptyContent.mjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<span v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\" class=\"empty-content__description\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";AAqJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAA,UAAA,OAAA,gBAAA,mBAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcGuestContent-BLJ37yLM.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-
|
|
3
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
4
4
|
const _sfc_main = {
|
|
5
5
|
name: "NcGuestContent",
|
|
6
6
|
mounted() {
|
|
@@ -21,9 +21,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
21
21
|
_sfc_staticRenderFns,
|
|
22
22
|
false,
|
|
23
23
|
null,
|
|
24
|
-
"cbad78fb"
|
|
25
|
-
null,
|
|
26
|
-
null
|
|
24
|
+
"cbad78fb"
|
|
27
25
|
);
|
|
28
26
|
const NcGuestContent = __component__.exports;
|
|
29
27
|
module.exports = NcGuestContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcGuestContent.cjs","sources":["../../src/components/NcGuestContent/NcGuestContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis components provides a wrapper around guest page content.\nIt should be used as the main wrapper for public pages, similar to `NcContent`.\n\nIt can't be used multiple times on the same page.\n\n### Usage\n\n```vue\n<template>\n\t<NcGuestContent>\n\t\t<h2>Hello guest</h2>\n\t\t<span>How are you?</span>\n\t</NcGuestContent>\n</template>\n```\n</docs>\n\n<template>\n\t<div id=\"guest-content-vue\">\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\n/**\n * Guest content container to be used for the guest content of your app\n */\nexport default {\n\tname: 'NcGuestContent',\n\tmounted() {\n\t\tdocument.getElementById('content').classList.add('nc-guest-content')\n\t},\n\tdestroyed() {\n\t\tdocument.getElementById('content').classList.remove('nc-guest-content')\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n#guest-content-vue {\n\tcolor: var(--color-main-text);\n\tbackground-color: var(--color-main-background);\n\tmin-width: 0;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\theight: fit-content;\n\tpadding: 15px;\n\tmargin: 20px auto;\n}\n</style>\n\n<style lang=\"scss\">\n#content.nc-guest-content {\n\t// Enable scrolling\n\toverflow: auto;\n\n\t// Fix box being cutoff at the bottom\n\tmargin-bottom: 0;\n\theight: calc(var(--body-height) + var(--body-container-margin));\n}\n</style>\n"],"names":[],"mappings":";;AAmCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,IAAA,kBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,OAAA,kBAAA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"NcGuestContent.cjs","sources":["../../src/components/NcGuestContent/NcGuestContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis components provides a wrapper around guest page content.\nIt should be used as the main wrapper for public pages, similar to `NcContent`.\n\nIt can't be used multiple times on the same page.\n\n### Usage\n\n```vue\n<template>\n\t<NcGuestContent>\n\t\t<h2>Hello guest</h2>\n\t\t<span>How are you?</span>\n\t</NcGuestContent>\n</template>\n```\n</docs>\n\n<template>\n\t<div id=\"guest-content-vue\">\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\n/**\n * Guest content container to be used for the guest content of your app\n */\nexport default {\n\tname: 'NcGuestContent',\n\tmounted() {\n\t\tdocument.getElementById('content').classList.add('nc-guest-content')\n\t},\n\tdestroyed() {\n\t\tdocument.getElementById('content').classList.remove('nc-guest-content')\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n#guest-content-vue {\n\tcolor: var(--color-main-text);\n\tbackground-color: var(--color-main-background);\n\tmin-width: 0;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\theight: fit-content;\n\tpadding: 15px;\n\tmargin: 20px auto;\n}\n</style>\n\n<style lang=\"scss\">\n#content.nc-guest-content {\n\t// Enable scrolling\n\toverflow: auto;\n\n\t// Fix box being cutoff at the bottom\n\tmargin-bottom: 0;\n\theight: calc(var(--body-height) + var(--body-container-margin));\n}\n</style>\n"],"names":[],"mappings":";;AAmCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,IAAA,kBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,OAAA,kBAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcGuestContent-BLJ37yLM.css';
|
|
2
|
-
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-
|
|
2
|
+
import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
3
3
|
const _sfc_main = {
|
|
4
4
|
name: "NcGuestContent",
|
|
5
5
|
mounted() {
|
|
@@ -20,9 +20,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
20
20
|
_sfc_staticRenderFns,
|
|
21
21
|
false,
|
|
22
22
|
null,
|
|
23
|
-
"cbad78fb"
|
|
24
|
-
null,
|
|
25
|
-
null
|
|
23
|
+
"cbad78fb"
|
|
26
24
|
);
|
|
27
25
|
const NcGuestContent = __component__.exports;
|
|
28
26
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcGuestContent.mjs","sources":["../../src/components/NcGuestContent/NcGuestContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis components provides a wrapper around guest page content.\nIt should be used as the main wrapper for public pages, similar to `NcContent`.\n\nIt can't be used multiple times on the same page.\n\n### Usage\n\n```vue\n<template>\n\t<NcGuestContent>\n\t\t<h2>Hello guest</h2>\n\t\t<span>How are you?</span>\n\t</NcGuestContent>\n</template>\n```\n</docs>\n\n<template>\n\t<div id=\"guest-content-vue\">\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\n/**\n * Guest content container to be used for the guest content of your app\n */\nexport default {\n\tname: 'NcGuestContent',\n\tmounted() {\n\t\tdocument.getElementById('content').classList.add('nc-guest-content')\n\t},\n\tdestroyed() {\n\t\tdocument.getElementById('content').classList.remove('nc-guest-content')\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n#guest-content-vue {\n\tcolor: var(--color-main-text);\n\tbackground-color: var(--color-main-background);\n\tmin-width: 0;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\theight: fit-content;\n\tpadding: 15px;\n\tmargin: 20px auto;\n}\n</style>\n\n<style lang=\"scss\">\n#content.nc-guest-content {\n\t// Enable scrolling\n\toverflow: auto;\n\n\t// Fix box being cutoff at the bottom\n\tmargin-bottom: 0;\n\theight: calc(var(--body-height) + var(--body-container-margin));\n}\n</style>\n"],"names":[],"mappings":";AAmCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,IAAA,kBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,OAAA,kBAAA;AAAA,EACA;AACA
|
|
1
|
+
{"version":3,"file":"NcGuestContent.mjs","sources":["../../src/components/NcGuestContent/NcGuestContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis components provides a wrapper around guest page content.\nIt should be used as the main wrapper for public pages, similar to `NcContent`.\n\nIt can't be used multiple times on the same page.\n\n### Usage\n\n```vue\n<template>\n\t<NcGuestContent>\n\t\t<h2>Hello guest</h2>\n\t\t<span>How are you?</span>\n\t</NcGuestContent>\n</template>\n```\n</docs>\n\n<template>\n\t<div id=\"guest-content-vue\">\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\n/**\n * Guest content container to be used for the guest content of your app\n */\nexport default {\n\tname: 'NcGuestContent',\n\tmounted() {\n\t\tdocument.getElementById('content').classList.add('nc-guest-content')\n\t},\n\tdestroyed() {\n\t\tdocument.getElementById('content').classList.remove('nc-guest-content')\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n#guest-content-vue {\n\tcolor: var(--color-main-text);\n\tbackground-color: var(--color-main-background);\n\tmin-width: 0;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 10px var(--color-box-shadow);\n\theight: fit-content;\n\tpadding: 15px;\n\tmargin: 20px auto;\n}\n</style>\n\n<style lang=\"scss\">\n#content.nc-guest-content {\n\t// Enable scrolling\n\toverflow: auto;\n\n\t// Fix box being cutoff at the bottom\n\tmargin-bottom: 0;\n\theight: calc(var(--body-height) + var(--body-container-margin));\n}\n</style>\n"],"names":[],"mappings":";AAmCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,IAAA,kBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,aAAA,eAAA,SAAA,EAAA,UAAA,OAAA,kBAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require('../assets/NcInputField-
|
|
1
|
+
require('../assets/NcInputField-CQc5dRbY.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
const Components_NcButton = require("./NcButton.cjs");
|
|
4
4
|
const GenRandomId = require("../chunks/GenRandomId-BQDud3d4.cjs");
|
|
5
|
-
const AlertCircleOutline = require("../chunks/AlertCircleOutline-
|
|
6
|
-
const Check = require("../chunks/Check-
|
|
7
|
-
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-
|
|
5
|
+
const AlertCircleOutline = require("../chunks/AlertCircleOutline-DLtiWgZd.cjs");
|
|
6
|
+
const Check = require("../chunks/Check-fCbe4vqy.cjs");
|
|
7
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
name: "NcInputField",
|
|
10
10
|
components: {
|
|
@@ -227,9 +227,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
227
227
|
_sfc_staticRenderFns,
|
|
228
228
|
false,
|
|
229
229
|
null,
|
|
230
|
-
"
|
|
231
|
-
null,
|
|
232
|
-
null
|
|
230
|
+
"374fffac"
|
|
233
231
|
);
|
|
234
232
|
const NcInputField = __component__.exports;
|
|
235
233
|
module.exports = NcInputField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcInputField.cjs","sources":["../../src/components/NcInputField/NcInputField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nThis component is used by the other Fields components.\nIt extends and styles an HTMLInputElement.\n\nYou cannot use it as is. This is here for documentation purposes.\nSee the other field components.\n\nFor a list of all available props and attributes, please check the [HTMLInputElement documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n\n</docs>\n\n<template>\n\t<div class=\"input-field\"\n\t\t:class=\"{\n\t\t\t'input-field--disabled': disabled,\n\t\t\t'input-field--label-outside': labelOutside || !isValidLabel,\n\t\t\t'input-field--leading-icon': hasLeadingIcon,\n\t\t\t'input-field--trailing-icon': showTrailingButton || hasTrailingIcon,\n\t\t\t'input-field--pill': pill,\n\t\t}\">\n\t\t<div class=\"input-field__main-wrapper\">\n\t\t\t<input v-bind=\"$attrs\"\n\t\t\t\t:id=\"computedId\"\n\t\t\t\tref=\"input\"\n\t\t\t\tclass=\"input-field__input\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\t:class=\"[inputClass,\n\t\t\t\t\t{\n\t\t\t\t\t\t'input-field__input--success': success,\n\t\t\t\t\t\t'input-field__input--error': error,\n\t\t\t\t\t}]\"\n\t\t\t\t:value=\"value.toString()\"\n\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t@input=\"handleInput\">\n\t\t\t<!-- Label -->\n\t\t\t<label v-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"input-field__label\"\n\t\t\t\t:for=\"computedId\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\n\t\t\t<!-- Leading icon -->\n\t\t\t<div v-show=\"hasLeadingIcon\" class=\"input-field__icon input-field__icon--leading\">\n\t\t\t\t<!-- Leading material design icon in the text field, set the size to 18 -->\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<!-- trailing button -->\n\t\t\t<NcButton v-if=\"showTrailingButton\"\n\t\t\t\ttype=\"tertiary-no-background\"\n\t\t\t\tclass=\"input-field__trailing-button\"\n\t\t\t\t:aria-label=\"trailingButtonLabel\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@click=\"handleTrailingButtonClick\">\n\t\t\t\t<!-- Populating this slot creates a trailing button within the\n\t\t\t\tinput boundaries that emits a `trailing-button-click` event -->\n\t\t\t\t<template #icon>\n\t\t\t\t\t<slot name=\"trailing-button-icon\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<!-- Success and error icons -->\n\t\t\t<div v-else-if=\"success || error\"\n\t\t\t\tclass=\"input-field__icon input-field__icon--trailing\">\n\t\t\t\t<Check v-if=\"success\" :size=\"20\" style=\"color: var(--color-success-text);\" />\n\t\t\t\t<AlertCircle v-else-if=\"error\" :size=\"20\" style=\"color: var(--color-error-text);\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<p v-if=\"helperText.length > 0\"\n\t\t\t:id=\"`${inputName}-helper-text`\"\n\t\t\tclass=\"input-field__helper-text-message\"\n\t\t\t:class=\"{\n\t\t\t\t'input-field__helper-text-message--error': error,\n\t\t\t\t'input-field__helper-text-message--success': success,\n\t\t\t}\">\n\t\t\t<Check v-if=\"success\" class=\"input-field__helper-text-message__icon\" :size=\"18\" />\n\t\t\t<AlertCircle v-else-if=\"error\" class=\"input-field__helper-text-message__icon\" :size=\"18\" />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport AlertCircle from 'vue-material-design-icons/AlertCircleOutline.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\n\nexport default {\n\tname: 'NcInputField',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tAlertCircle,\n\t\tCheck,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The value of the input field\n\t\t * If type is 'number' and a number is passed as value than the type of `update:value` will also be 'number'\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The type of the input element\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'text',\n\t\t\t\t'password',\n\t\t\t\t'email',\n\t\t\t\t'tel',\n\t\t\t\t'url',\n\t\t\t\t'search',\n\t\t\t\t'number',\n\t\t\t].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The input label, always provide one for accessibility purposes.\n\t\t * This will also be used as a placeholder unless the placeholder\n\t\t * prop is populated with a different string.\n\t\t *\n\t\t * Note: If the background color is not `--color-main-background` consider using an external label instead (see `labelOutside`).\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Pass in true if you want to use an external label. This is useful\n\t\t * if you need a label that looks different from the one provided by\n\t\t * this component\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The placeholder of the input. This defaults as the string that's\n\t\t * passed into the label prop. In order to remove the placeholder,\n\t\t * pass in an empty string.\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Label of the trailing button\n\t\t *\n\t\t * Required when showTrailingButton is set\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Toggles the success state of the component. Adds a checkmark icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\tsuccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the error state of the component. Adds an error icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Additional helper text message\n\t\t *\n\t\t * This will be displayed beneath the input field. In case the field is\n\t\t * also marked as having an error, the text will be displayed in red.\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Disable the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the input should have a pill form.\n\t\t * By default, input has rounded corners.\n\t\t */\n\t\tpill: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcInputField in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'trailing-button-click',\n\t],\n\n\tcomputed: {\n\t\tcomputedId() {\n\t\t\treturn this.$attrs.id && this.$attrs.id !== '' ? this.$attrs.id : this.inputName\n\t\t},\n\n\t\tinputName() {\n\t\t\treturn 'input' + GenRandomId()\n\t\t},\n\n\t\thasLeadingIcon() {\n\t\t\treturn this.$slots.default\n\t\t},\n\n\t\thasTrailingIcon() {\n\t\t\treturn this.success\n\t\t},\n\n\t\thasPlaceholder() {\n\t\t\treturn this.placeholder !== '' && this.placeholder !== undefined\n\t\t},\n\n\t\tcomputedPlaceholder() {\n\t\t\treturn this.hasPlaceholder ? this.placeholder : this.label\n\t\t},\n\n\t\tisValidLabel() {\n\t\t\tconst isValidLabel = this.label || this.labelOutside\n\t\t\tif (!isValidLabel) {\n\t\t\t\tconsole.warn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t\t\t}\n\t\t\treturn isValidLabel\n\t\t},\n\n\t\tariaDescribedby() {\n\t\t\tconst ariaDescribedby = []\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\tariaDescribedby.push(`${this.inputName}-helper-text`)\n\t\t\t}\n\t\t\tif (this.$attrs['aria-describedby']) {\n\t\t\t\tariaDescribedby.push(this.$attrs['aria-describedby'])\n\t\t\t}\n\t\t\treturn ariaDescribedby.join(' ') || null\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.input.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.input.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', this.type === 'number' && typeof this.value === 'number' ? parseFloat(event.target.value, 10) : event.target.value)\n\t\t},\n\n\t\thandleTrailingButtonClick(event) {\n\t\t\tthis.$emit('trailing-button-click', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.input-field {\n\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t// The padding before the input can start (leading button or border)\n\t--input-padding-start: var(--border-radius-large);\n\t// The padding where the input has to end (trailing button or border)\n\t--input-padding-end: var(--border-radius-large);\n\t// positional styles\n\tposition: relative;\n\twidth: 100%;\n\tmargin-block-start: 6px; // for the label in active state\n\n\t&--disabled {\n\t\topacity: 0.4;\n\t\tfilter: saturate(0.4);\n\t}\n\n\t// If there is no internal label we reset the margin reserved for it\n\t&--label-outside {\n\t\tmargin-block-start: 0;\n\t}\n\n\t&--leading-icon {\n\t\t--input-padding-start: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--trailing-icon {\n\t\t--input-padding-end: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--pill {\n\t\t--input-border-radius: var(--border-radius-pill);\n\t}\n\n\t&__main-wrapper {\n\t\theight: var(--default-clickable-area);\n\t\tposition: relative;\n\t}\n\n\t&__input {\n\t\t// If border width differes between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\tborder-radius: var(--input-border-radius);\n\n\t\tcursor: pointer;\n\t\t-webkit-appearance: textfield !important;\n\t\t-moz-appearance: textfield !important;\n\t\tappearance: textfield !important;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\theight: calc(var(--default-clickable-area) - 2 * var(--input-border-width-offset)) !important;\n\t\twidth: 100%;\n\n\t\tpadding-inline: calc(var(--input-padding-start) + var(--input-border-width-offset)) calc(var(--input-padding-end) + var(--input-border-width-offset));\n\t\tpadding-block: var(--input-border-width-offset);\n\n\t\t&::placeholder {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tborder-color: var(--color-main-text) !important;\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\n\t\t&:focus + .input-field__label,\n\t\t&:hover:not(:placeholder-shown) + .input-field__label {\n\t\t\tcolor: var(--color-main-text);\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\n\t\t&--success {\n\t\t\tborder-color: var(--color-success) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\n\t\t&--error {\n\t\t\tborder-color: var(--color-error) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\t}\n\n\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t&:not(&--label-outside) &__input:not(:focus)::placeholder {\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\t--input-label-font-size: var(--default-font-size);\n\t\tposition: absolute;\n\t\tmargin-inline: var(--input-padding-start) var(--input-padding-end);\n\t\tmax-width: fit-content;\n\t\tfont-size: var(--input-label-font-size);\n\t\tinset-block-start: calc((var(--default-clickable-area) - 1lh) / 2); // center the label vertically\n\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\t--input-label-font-size: 13px; // minimum allowed font size for accessibility\n\t\tline-height: 1.5; // minimum allowed line height for accessibility\n\t\t// 1.5 * font-size = line-height; line-height / 2 for centering and make it negative as we need to move outside the element\n\t\tinset-block-start: calc(-1.5 * var(--input-label-font-size) / 2);\n\t\tfont-weight: 500;\n\t\tborder-radius: var(--default-grid-baseline) var(--default-grid-baseline) 0 0;\n\t\tbackground-color: var(--color-main-background);\n\t\tpadding-inline: var(--default-grid-baseline);\n\t\tmargin-inline: calc(var(--input-padding-start) - var(--default-grid-baseline)) calc(var(--input-padding-end) - var(--default-grid-baseline));\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__icon {\n\t\tposition: absolute;\n\t\theight: var(--default-clickable-area);\n\t\twidth: var(--default-clickable-area);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\topacity: 0.7;\n\n\t\tinset-block-end: 0;\n\n\t\t&--leading {\n\t\t\tinset-inline-start: 0px;\n\t\t}\n\n\t\t&--trailing {\n\t\t\tinset-inline-end: 0px;\n\t\t}\n\t}\n\n\t&__trailing-button {\n\t\t--button-size: calc(var(--default-clickable-area) - 2 * var(--border-width-input-focused, 2px)) !important;\n\t\t--button-radius: calc(var(--input-border-radius) - var(--border-width-input-focused, 2px)); // lower radius as size is smaller\n\n\t\t&.button-vue {\n\t\t\tposition: absolute;\n\t\t\ttop: var(--border-width-input-focused, 2px);\n\t\t\tright: var(--border-width-input-focused, 2px);\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tpadding-inline: var(--border-radius-large);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\n\t\t&--error {\n\t\t\tcolor: var(--color-error-text);\n\t\t}\n\n\t\t&--success {\n\t\t\tcolor: var(--color-success-text);\n\t\t}\n\t}\n}\n</style>\n"],"names":["NcButton","AlertCircle","Check","GenRandomId"],"mappings":";;;;;;AAoGA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,aAAAC,mBAAA;AAAA,IACA,OAAAC,MAAA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACA,EAAA,SAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAA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sBAAA;AACA,aAAA,KAAA,iBAAA,KAAA,cAAA,KAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,YAAA,eAAA,KAAA,SAAA,KAAA;AACA,UAAA,CAAA,cAAA;AACA,gBAAA,KAAA,mJAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,YAAA,kBAAA,CAAA;AACA,UAAA,KAAA,WAAA,SAAA,GAAA;AACA,wBAAA,KAAA,GAAA,YAAA,WAAA,eAAA;AAAA,MACA;AACA,UAAA,KAAA,OAAA,kBAAA,GAAA;AACA,wBAAA,KAAA,KAAA,OAAA,kBAAA,CAAA;AAAA,MACA;AACA,aAAA,gBAAA,KAAA,GAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,MAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,MAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAA,OAAA;AACA,WAAA,MAAA,gBAAA,KAAA,SAAA,YAAA,OAAA,KAAA,UAAA,WAAA,WAAA,MAAA,OAAA,OAAA,EAAA,IAAA,MAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,0BAAA,OAAA;AACA,WAAA,MAAA,yBAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcInputField.cjs","sources":["../../src/components/NcInputField/NcInputField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nThis component is used by the other Fields components.\nIt extends and styles an HTMLInputElement.\n\nYou cannot use it as is. This is here for documentation purposes.\nSee the other field components.\n\nFor a list of all available props and attributes, please check the [HTMLInputElement documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n\n</docs>\n\n<template>\n\t<div class=\"input-field\"\n\t\t:class=\"{\n\t\t\t'input-field--disabled': disabled,\n\t\t\t'input-field--label-outside': labelOutside || !isValidLabel,\n\t\t\t'input-field--leading-icon': hasLeadingIcon,\n\t\t\t'input-field--trailing-icon': showTrailingButton || hasTrailingIcon,\n\t\t\t'input-field--pill': pill,\n\t\t}\">\n\t\t<div class=\"input-field__main-wrapper\">\n\t\t\t<input v-bind=\"$attrs\"\n\t\t\t\t:id=\"computedId\"\n\t\t\t\tref=\"input\"\n\t\t\t\tclass=\"input-field__input\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\t:class=\"[inputClass,\n\t\t\t\t\t{\n\t\t\t\t\t\t'input-field__input--success': success,\n\t\t\t\t\t\t'input-field__input--error': error,\n\t\t\t\t\t}]\"\n\t\t\t\t:value=\"value.toString()\"\n\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t@input=\"handleInput\">\n\t\t\t<!-- Label -->\n\t\t\t<label v-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"input-field__label\"\n\t\t\t\t:for=\"computedId\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\n\t\t\t<!-- Leading icon -->\n\t\t\t<div v-show=\"hasLeadingIcon\" class=\"input-field__icon input-field__icon--leading\">\n\t\t\t\t<!-- Leading material design icon in the text field, set the size to 18 -->\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<!-- trailing button -->\n\t\t\t<NcButton v-if=\"showTrailingButton\"\n\t\t\t\ttype=\"tertiary-no-background\"\n\t\t\t\tclass=\"input-field__trailing-button\"\n\t\t\t\t:aria-label=\"trailingButtonLabel\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@click=\"handleTrailingButtonClick\">\n\t\t\t\t<!-- Populating this slot creates a trailing button within the\n\t\t\t\tinput boundaries that emits a `trailing-button-click` event -->\n\t\t\t\t<template #icon>\n\t\t\t\t\t<slot name=\"trailing-button-icon\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<!-- Success and error icons -->\n\t\t\t<div v-else-if=\"success || error\"\n\t\t\t\tclass=\"input-field__icon input-field__icon--trailing\">\n\t\t\t\t<Check v-if=\"success\" :size=\"20\" style=\"color: var(--color-success-text);\" />\n\t\t\t\t<AlertCircle v-else-if=\"error\" :size=\"20\" style=\"color: var(--color-error-text);\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<p v-if=\"helperText.length > 0\"\n\t\t\t:id=\"`${inputName}-helper-text`\"\n\t\t\tclass=\"input-field__helper-text-message\"\n\t\t\t:class=\"{\n\t\t\t\t'input-field__helper-text-message--error': error,\n\t\t\t\t'input-field__helper-text-message--success': success,\n\t\t\t}\">\n\t\t\t<Check v-if=\"success\" class=\"input-field__helper-text-message__icon\" :size=\"18\" />\n\t\t\t<AlertCircle v-else-if=\"error\" class=\"input-field__helper-text-message__icon\" :size=\"18\" />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nimport AlertCircle from 'vue-material-design-icons/AlertCircleOutline.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\n\nexport default {\n\tname: 'NcInputField',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tAlertCircle,\n\t\tCheck,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The value of the input field\n\t\t * If type is 'number' and a number is passed as value than the type of `update:value` will also be 'number'\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The type of the input element\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator: (value) => [\n\t\t\t\t'text',\n\t\t\t\t'password',\n\t\t\t\t'email',\n\t\t\t\t'tel',\n\t\t\t\t'url',\n\t\t\t\t'search',\n\t\t\t\t'number',\n\t\t\t].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The input label, always provide one for accessibility purposes.\n\t\t * This will also be used as a placeholder unless the placeholder\n\t\t * prop is populated with a different string.\n\t\t *\n\t\t * Note: If the background color is not `--color-main-background` consider using an external label instead (see `labelOutside`).\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Pass in true if you want to use an external label. This is useful\n\t\t * if you need a label that looks different from the one provided by\n\t\t * this component\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The placeholder of the input. This defaults as the string that's\n\t\t * passed into the label prop. In order to remove the placeholder,\n\t\t * pass in an empty string.\n\t\t */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Label of the trailing button\n\t\t *\n\t\t * Required when showTrailingButton is set\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Toggles the success state of the component. Adds a checkmark icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\tsuccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggles the error state of the component. Adds an error icon.\n\t\t * this cannot be used together with canClear.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Additional helper text message\n\t\t *\n\t\t * This will be displayed beneath the input field. In case the field is\n\t\t * also marked as having an error, the text will be displayed in red.\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Disable the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the input should have a pill form.\n\t\t * By default, input has rounded corners.\n\t\t */\n\t\tpill: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Class to add to the input field.\n\t\t * Necessary to use NcInputField in the NcActionInput component.\n\t\t */\n\t\tinputClass: {\n\t\t\ttype: [Object, String],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'trailing-button-click',\n\t],\n\n\tcomputed: {\n\t\tcomputedId() {\n\t\t\treturn this.$attrs.id && this.$attrs.id !== '' ? this.$attrs.id : this.inputName\n\t\t},\n\n\t\tinputName() {\n\t\t\treturn 'input' + GenRandomId()\n\t\t},\n\n\t\thasLeadingIcon() {\n\t\t\treturn this.$slots.default\n\t\t},\n\n\t\thasTrailingIcon() {\n\t\t\treturn this.success\n\t\t},\n\n\t\thasPlaceholder() {\n\t\t\treturn this.placeholder !== '' && this.placeholder !== undefined\n\t\t},\n\n\t\tcomputedPlaceholder() {\n\t\t\treturn this.hasPlaceholder ? this.placeholder : this.label\n\t\t},\n\n\t\tisValidLabel() {\n\t\t\tconst isValidLabel = this.label || this.labelOutside\n\t\t\tif (!isValidLabel) {\n\t\t\t\tconsole.warn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t\t\t}\n\t\t\treturn isValidLabel\n\t\t},\n\n\t\tariaDescribedby() {\n\t\t\tconst ariaDescribedby = []\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\tariaDescribedby.push(`${this.inputName}-helper-text`)\n\t\t\t}\n\t\t\tif (this.$attrs['aria-describedby']) {\n\t\t\t\tariaDescribedby.push(this.$attrs['aria-describedby'])\n\t\t\t}\n\t\t\treturn ariaDescribedby.join(' ') || null\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.input.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.input.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.$emit('update:value', this.type === 'number' && typeof this.value === 'number' ? parseFloat(event.target.value, 10) : event.target.value)\n\t\t},\n\n\t\thandleTrailingButtonClick(event) {\n\t\t\tthis.$emit('trailing-button-click', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.input-field {\n\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t// The padding before the input can start (leading button or border)\n\t--input-padding-start: var(--border-radius-large);\n\t// The padding where the input has to end (trailing button or border)\n\t--input-padding-end: var(--border-radius-large);\n\t// positional styles\n\tposition: relative;\n\twidth: 100%;\n\tmargin-block-start: 6px; // for the label in active state\n\n\t&--disabled {\n\t\topacity: 0.4;\n\t\tfilter: saturate(0.4);\n\t}\n\n\t// If there is no internal label we reset the margin reserved for it\n\t&--label-outside {\n\t\tmargin-block-start: 0;\n\t}\n\n\t&--leading-icon {\n\t\t--input-padding-start: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--trailing-icon {\n\t\t--input-padding-end: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--pill {\n\t\t--input-border-radius: var(--border-radius-pill);\n\t}\n\n\t&__main-wrapper {\n\t\theight: var(--default-clickable-area);\n\t\tposition: relative;\n\t}\n\n\t&__input {\n\t\t// If border width differes between focused and unfocused we need to compensate to prevent jumping\n\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\tborder-radius: var(--input-border-radius);\n\n\t\tcursor: pointer;\n\t\t-webkit-appearance: textfield !important;\n\t\t-moz-appearance: textfield !important;\n\t\tappearance: textfield !important;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\theight: calc(var(--default-clickable-area) - 2 * var(--input-border-width-offset)) !important;\n\t\twidth: 100%;\n\n\t\tpadding-inline: calc(var(--input-padding-start) + var(--input-border-width-offset)) calc(var(--input-padding-end) + var(--input-border-width-offset));\n\t\tpadding-block: var(--input-border-width-offset);\n\n\t\t&::placeholder {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t&:active:not([disabled]),\n\t\t&:hover:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\tborder-color: var(--color-main-text);\n\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t}\n\n\t\t&:focus + .input-field__label,\n\t\t&:hover:not(:placeholder-shown) + .input-field__label {\n\t\t\tcolor: var(--color-main-text);\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\n\t\t&--success {\n\t\t\tborder-color: var(--color-success) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\n\t\t&--error,\n\t\t&:invalid {\n\t\t\tborder-color: var(--color-error) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\t}\n\n\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t&:not(&--label-outside) &__input:not(:focus)::placeholder {\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\t--input-label-font-size: var(--default-font-size);\n\t\tposition: absolute;\n\t\tmargin-inline: var(--input-padding-start) var(--input-padding-end);\n\t\tmax-width: fit-content;\n\t\tfont-size: var(--input-label-font-size);\n\t\tinset-block-start: calc((var(--default-clickable-area) - 1lh) / 2); // center the label vertically\n\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\t--input-label-font-size: 13px; // minimum allowed font size for accessibility\n\t\tline-height: 1.5; // minimum allowed line height for accessibility\n\t\t// 1.5 * font-size = line-height; line-height / 2 for centering and make it negative as we need to move outside the element\n\t\tinset-block-start: calc(-1.5 * var(--input-label-font-size) / 2);\n\t\tfont-weight: 500;\n\t\tborder-radius: var(--default-grid-baseline) var(--default-grid-baseline) 0 0;\n\t\tbackground-color: var(--color-main-background);\n\t\tpadding-inline: var(--default-grid-baseline);\n\t\tmargin-inline: calc(var(--input-padding-start) - var(--default-grid-baseline)) calc(var(--input-padding-end) - var(--default-grid-baseline));\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__icon {\n\t\tposition: absolute;\n\t\theight: var(--default-clickable-area);\n\t\twidth: var(--default-clickable-area);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\topacity: 0.7;\n\n\t\tinset-block-end: 0;\n\n\t\t&--leading {\n\t\t\tinset-inline-start: 0px;\n\t\t}\n\n\t\t&--trailing {\n\t\t\tinset-inline-end: 0px;\n\t\t}\n\t}\n\n\t&__trailing-button {\n\t\t--button-size: calc(var(--default-clickable-area) - 2 * var(--border-width-input-focused, 2px)) !important;\n\t\t--button-radius: calc(var(--input-border-radius) - var(--border-width-input-focused, 2px)); // lower radius as size is smaller\n\n\t\t&.button-vue {\n\t\t\tposition: absolute;\n\t\t\ttop: var(--border-width-input-focused, 2px);\n\t\t\tright: var(--border-width-input-focused, 2px);\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tpadding-inline: var(--border-radius-large);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\n\t\t&--error {\n\t\t\tcolor: var(--color-error-text);\n\t\t}\n\n\t\t&--success {\n\t\t\tcolor: var(--color-success-text);\n\t\t}\n\t}\n}\n</style>\n"],"names":["NcButton","AlertCircle","Check","GenRandomId"],"mappings":";;;;;;AAoGA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,aAAAC,mBAAA;AAAA,IACA,OAAAC,MAAA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA,CAAA,QA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