@nextcloud/vue 8.8.0 → 8.9.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 +23 -0
- package/dist/Components/NcActionButton.cjs +3 -3
- package/dist/Components/NcActionButton.mjs +6 -6
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCaption.cjs +2 -2
- package/dist/Components/NcActionCaption.mjs +2 -2
- package/dist/Components/NcActionCheckbox.cjs +2 -2
- package/dist/Components/NcActionCheckbox.mjs +4 -4
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +3 -3
- package/dist/Components/NcActionLink.mjs +4 -4
- package/dist/Components/NcActionRadio.cjs +2 -2
- package/dist/Components/NcActionRadio.mjs +4 -4
- package/dist/Components/NcActionRouter.cjs +3 -3
- package/dist/Components/NcActionRouter.mjs +4 -4
- package/dist/Components/NcActionSeparator.cjs +2 -2
- package/dist/Components/NcActionSeparator.mjs +2 -2
- package/dist/Components/NcActionText.cjs +3 -3
- package/dist/Components/NcActionText.mjs +4 -4
- package/dist/Components/NcActionTextEditable.cjs +3 -3
- package/dist/Components/NcActionTextEditable.mjs +6 -6
- 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 -1
- package/dist/Components/NcAppContentDetails.mjs +1 -1
- package/dist/Components/NcAppContentList.cjs +1 -1
- package/dist/Components/NcAppContentList.mjs +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 -2
- package/dist/Components/NcAppNavigationIconBullet.mjs +2 -2
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationList.cjs +6 -6
- package/dist/Components/NcAppNavigationList.cjs.map +1 -1
- package/dist/Components/NcAppNavigationList.mjs +6 -6
- package/dist/Components/NcAppNavigationList.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +2 -2
- package/dist/Components/NcAppNavigationNew.mjs +2 -2
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationSpacer.cjs +2 -2
- package/dist/Components/NcAppNavigationSpacer.mjs +2 -2
- 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 +8 -5
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +8 -5
- 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 +5 -4
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +5 -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 +27 -26
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +28 -27
- 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/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 -2
- package/dist/Components/NcCounterBubble.mjs +2 -2
- 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 +42 -40
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +27 -25
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +11 -11
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +12 -12
- 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 +2 -2
- package/dist/Components/NcEllipsisedOption.mjs +3 -3
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +9 -8
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +9 -8
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcGuestContent.cjs +2 -2
- package/dist/Components/NcGuestContent.mjs +2 -2
- 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 +4 -4
- package/dist/Components/NcInputField.cjs.map +1 -1
- package/dist/Components/NcInputField.mjs +7 -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 -2
- package/dist/Components/NcLoadingIcon.mjs +2 -2
- package/dist/Components/NcModal.cjs +8 -7
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +19 -18
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +3 -3
- package/dist/Components/NcNoteCard.mjs +3 -3
- 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 +1 -1
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.cjs.map +1 -1
- package/dist/Components/NcRichText.mjs +8 -8
- package/dist/Components/NcRichText.mjs.map +1 -1
- 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 -4
- package/dist/Components/NcTextArea.cjs.map +1 -1
- package/dist/Components/NcTextArea.mjs +7 -7
- 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 +11 -10
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs +12 -11
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Directives/Linkify.cjs +5 -4
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +6 -5
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Directives/Tooltip.cjs +1 -1
- package/dist/Directives/Tooltip.mjs +1 -1
- package/dist/Functions/reference.cjs +2 -1
- package/dist/Functions/reference.cjs.map +1 -1
- package/dist/Functions/reference.mjs +12 -11
- package/dist/Functions/registerReference.cjs +11 -69
- package/dist/Functions/registerReference.cjs.map +1 -1
- package/dist/Functions/registerReference.mjs +9 -67
- package/dist/Functions/registerReference.mjs.map +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/richEditor.cjs +2 -2
- package/dist/Mixins/richEditor.mjs +2 -2
- package/dist/assets/{NcActions-mt8BQ_bn.css → NcActions-CEbgl0_n.css} +12 -12
- package/dist/assets/{NcAppContent-SZz3PTd8.css → NcAppContent-Cv8rRTyy.css} +1 -0
- package/dist/assets/{NcAppNavigation-9nlYnuUQ.css → NcAppNavigation-D4ZBCJrI.css} +18 -8
- package/dist/assets/{NcAppNavigationList-RooPPg4w.css → NcAppNavigationList-Bj9PwL4X.css} +3 -7
- package/dist/assets/{NcDateTimePicker-l-C3PwHK.css → NcDateTimePicker-BChLYJ5X.css} +10 -10
- package/dist/assets/{NcEmojiPicker-hTlSVIq0.css → NcEmojiPicker-B-4WNYcx.css} +1 -0
- package/dist/assets/{NcRelatedResourcesPanel-oq5eMIoh.css → NcRelatedResourcesPanel-COW9gzml.css} +72 -6
- package/dist/assets/{NcRichText-kDp48Nji.css → NcRichText-BMe-xENJ.css} +5 -2
- package/dist/assets/{NcSelect-GsLmwj9w.css → NcSelect-4aBmXHhA.css} +3 -0
- package/dist/assets/{referencePickerModal-A0PlFUEI.css → referencePickerModal-C1KJzICb.css} +34 -14
- package/dist/chunks/{AlertCircleOutline-HYz1lvHU.cjs → AlertCircleOutline-DHFN4OkX.cjs} +1 -1
- package/dist/chunks/{AlertCircleOutline-HYz1lvHU.cjs.map → AlertCircleOutline-DHFN4OkX.cjs.map} +1 -1
- package/dist/chunks/{AlertCircleOutline-XY0EPUmQ.mjs → AlertCircleOutline-U_bhL30C.mjs} +1 -1
- package/dist/chunks/{AlertCircleOutline-XY0EPUmQ.mjs.map → AlertCircleOutline-U_bhL30C.mjs.map} +1 -1
- package/dist/chunks/{ArrowLeft-fC5aEWWu.cjs → ArrowLeft-CjNnGIlF.cjs} +1 -1
- package/dist/chunks/{ArrowLeft-fC5aEWWu.cjs.map → ArrowLeft-CjNnGIlF.cjs.map} +1 -1
- package/dist/chunks/{ArrowLeft-uW5eNVkY.mjs → ArrowLeft-kklNBL9z.mjs} +1 -1
- package/dist/chunks/{ArrowLeft-uW5eNVkY.mjs.map → ArrowLeft-kklNBL9z.mjs.map} +1 -1
- package/dist/chunks/{ArrowRight-16bLxoZc.mjs → ArrowRight-C3BxTDjF.mjs} +1 -1
- package/dist/chunks/{ArrowRight-16bLxoZc.mjs.map → ArrowRight-C3BxTDjF.mjs.map} +1 -1
- package/dist/chunks/{ArrowRight-uUC8qW2c.cjs → ArrowRight-CxzzJJQ6.cjs} +1 -1
- package/dist/chunks/{ArrowRight-uUC8qW2c.cjs.map → ArrowRight-CxzzJJQ6.cjs.map} +1 -1
- package/dist/chunks/{Check-qy5XrF1J.mjs → Check-CRLmJNGG.mjs} +1 -1
- package/dist/chunks/{Check-qy5XrF1J.mjs.map → Check-CRLmJNGG.mjs.map} +1 -1
- package/dist/chunks/{Check-QBzDcHpr.cjs → Check-CVn5nytg.cjs} +1 -1
- package/dist/chunks/{Check-QBzDcHpr.cjs.map → Check-CVn5nytg.cjs.map} +1 -1
- package/dist/chunks/{ChevronDown-Hc_DTRav.cjs → ChevronDown-DQPox_nl.cjs} +1 -1
- package/dist/chunks/{ChevronDown-Hc_DTRav.cjs.map → ChevronDown-DQPox_nl.cjs.map} +1 -1
- package/dist/chunks/{ChevronDown-suAKKmeb.mjs → ChevronDown-HHJdUMN4.mjs} +1 -1
- package/dist/chunks/{ChevronDown-suAKKmeb.mjs.map → ChevronDown-HHJdUMN4.mjs.map} +1 -1
- package/dist/chunks/{ChevronRight-MdQC55Yq.cjs → ChevronRight-BAJhNawb.cjs} +1 -1
- package/dist/chunks/{ChevronRight-MdQC55Yq.cjs.map → ChevronRight-BAJhNawb.cjs.map} +1 -1
- package/dist/chunks/{ChevronRight-9owhU_17.mjs → ChevronRight-DL3e8bjj.mjs} +1 -1
- package/dist/chunks/{ChevronRight-9owhU_17.mjs.map → ChevronRight-DL3e8bjj.mjs.map} +1 -1
- package/dist/chunks/ChevronUp-B6TIgl1a.mjs +37 -0
- package/dist/chunks/ChevronUp-B6TIgl1a.mjs.map +1 -0
- package/dist/chunks/ChevronUp-kmHRpe7H.cjs +35 -0
- package/dist/chunks/ChevronUp-kmHRpe7H.cjs.map +1 -0
- package/dist/chunks/{Close-QtH6_3PP.mjs → Close-BtO5TPBO.mjs} +1 -1
- package/dist/chunks/{Close-QtH6_3PP.mjs.map → Close-BtO5TPBO.mjs.map} +1 -1
- package/dist/chunks/{Close-dotk0707.cjs → Close-DBfrdXMw.cjs} +1 -1
- package/dist/chunks/{Close-dotk0707.cjs.map → Close-DBfrdXMw.cjs.map} +1 -1
- package/dist/chunks/{DotsHorizontal-6hepLUSS.cjs → DotsHorizontal-B8kTqpHe.cjs} +1 -1
- package/dist/chunks/{DotsHorizontal-6hepLUSS.cjs.map → DotsHorizontal-B8kTqpHe.cjs.map} +1 -1
- package/dist/chunks/{DotsHorizontal-IbmXTXRA.mjs → DotsHorizontal-DfVgEXgz.mjs} +1 -1
- package/dist/chunks/{DotsHorizontal-IbmXTXRA.mjs.map → DotsHorizontal-DfVgEXgz.mjs.map} +1 -1
- package/dist/chunks/{GenColors-MjG_SfWn.mjs → GenColors-BteFtwOv.mjs} +3 -3
- package/dist/chunks/{GenColors-MjG_SfWn.mjs.map → GenColors-BteFtwOv.mjs.map} +1 -1
- package/dist/chunks/{GenColors-LzmNxRE8.cjs → GenColors-vI-bx9ZY.cjs} +3 -3
- package/dist/chunks/{GenColors-LzmNxRE8.cjs.map → GenColors-vI-bx9ZY.cjs.map} +1 -1
- package/dist/chunks/{GenRandomId-ULxaMkkr.cjs.map → GenRandomId-B2O1GMbH.cjs.map} +1 -1
- package/dist/chunks/{GenRandomId-VodkdWbp.mjs.map → GenRandomId-BW3iYFf9.mjs.map} +1 -1
- package/dist/chunks/{Linkify-V7PfCeZ8.mjs.map → Linkify-BaDLLFxP.mjs.map} +1 -1
- package/dist/chunks/{Linkify-f3s3nAe_.cjs.map → Linkify-Dola0NBa.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-6TAtQFtq.cjs → NcActionButtonGroup-BdxkXNwc.cjs} +3 -3
- package/dist/chunks/{NcActionButtonGroup-6TAtQFtq.cjs.map → NcActionButtonGroup-BdxkXNwc.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-w6A9Fw2n.mjs → NcActionButtonGroup-SS3PkUD2.mjs} +5 -5
- package/dist/chunks/{NcActionButtonGroup-w6A9Fw2n.mjs.map → NcActionButtonGroup-SS3PkUD2.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-yvhGpEsS.mjs → NcActionInput-BHq3Le0q.mjs} +9 -9
- package/dist/chunks/{NcActionInput-yvhGpEsS.mjs.map → NcActionInput-BHq3Le0q.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-Fl2UyuVW.cjs → NcActionInput-D308ZntG.cjs} +4 -4
- package/dist/chunks/{NcActionInput-Fl2UyuVW.cjs.map → NcActionInput-D308ZntG.cjs.map} +1 -1
- package/dist/chunks/{NcActions-rHzi4RcQ.mjs → NcActions-CpU9WXzM.mjs} +135 -131
- package/dist/chunks/{NcActions-rHzi4RcQ.mjs.map → NcActions-CpU9WXzM.mjs.map} +1 -1
- package/dist/chunks/{NcActions-iACO4laf.cjs → NcActions-Dfkog_G0.cjs} +134 -130
- package/dist/chunks/{NcActions-iACO4laf.cjs.map → NcActions-Dfkog_G0.cjs.map} +1 -1
- package/dist/chunks/{NcAppContent-c0KjHkMb.mjs → NcAppContent-BDwOdxJE.mjs} +6 -6
- package/dist/chunks/{NcAppContent-c0KjHkMb.mjs.map → NcAppContent-BDwOdxJE.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent--JRFOyLe.cjs → NcAppContent-kqYjKpzU.cjs} +6 -6
- package/dist/chunks/{NcAppContent--JRFOyLe.cjs.map → NcAppContent-kqYjKpzU.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-7U8buuT7.mjs → NcAppNavigation-BRtyTvKt.mjs} +19 -19
- package/dist/chunks/NcAppNavigation-BRtyTvKt.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-AcPesLHq.cjs → NcAppNavigation-DMxORgkV.cjs} +15 -15
- package/dist/chunks/NcAppNavigation-DMxORgkV.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-Iuzt-yzb.cjs → NcAppNavigationCaption-BKchbDsJ.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-Iuzt-yzb.cjs.map → NcAppNavigationCaption-BKchbDsJ.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-UJ7iY1q5.mjs → NcAppNavigationCaption-DsT6O4Hx.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-UJ7iY1q5.mjs.map → NcAppNavigationCaption-DsT6O4Hx.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-pvFIrGQv.cjs → NcAppNavigationItem-CABF2T4q.cjs} +47 -79
- package/dist/chunks/NcAppNavigationItem-CABF2T4q.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-9n2uXjvj.mjs → NcAppNavigationItem-bjPcEx5D.mjs} +55 -86
- package/dist/chunks/NcAppNavigationItem-bjPcEx5D.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-jr12p6VL.mjs → NcAppNavigationNewItem-BHCgaCoK.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationNewItem-jr12p6VL.mjs.map → NcAppNavigationNewItem-BHCgaCoK.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-CXGDvuMl.cjs → NcAppNavigationNewItem-t45tM5u1.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-CXGDvuMl.cjs.map → NcAppNavigationNewItem-t45tM5u1.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-NRqRmMXw.mjs → NcAppNavigationSettings-BQD7JA4m.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationSettings-NRqRmMXw.mjs.map → NcAppNavigationSettings-BQD7JA4m.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-Nd8RJnYL.cjs → NcAppNavigationSettings-CBeUiVLk.cjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-Nd8RJnYL.cjs.map → NcAppNavigationSettings-CBeUiVLk.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-kL5XkG2J.mjs → NcAppNavigationToggle-BZxbkhCr.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationToggle-kL5XkG2J.mjs.map → NcAppNavigationToggle-BZxbkhCr.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-KZ_xHLv9.cjs → NcAppNavigationToggle-DDChOnAq.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationToggle-KZ_xHLv9.cjs.map → NcAppNavigationToggle-DDChOnAq.cjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-S9pm_eoJ.mjs → NcAppSettingsDialog-DeFBTD2J.mjs} +35 -28
- package/dist/chunks/{NcAppSettingsDialog-S9pm_eoJ.mjs.map → NcAppSettingsDialog-DeFBTD2J.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-8l-aNNFq.cjs → NcAppSettingsDialog-EUys9Os_.cjs} +29 -22
- package/dist/chunks/{NcAppSettingsDialog-8l-aNNFq.cjs.map → NcAppSettingsDialog-EUys9Os_.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-kN5SMxgh.mjs → NcAppSidebar-CdSvRI6l.mjs} +26 -22
- package/dist/chunks/{NcAppSidebar-kN5SMxgh.mjs.map → NcAppSidebar-CdSvRI6l.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-l6rV-lnp.cjs → NcAppSidebar-Du-IRmEO.cjs} +17 -13
- package/dist/chunks/{NcAppSidebar-l6rV-lnp.cjs.map → NcAppSidebar-Du-IRmEO.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-CVj9XTPL.cjs → NcAvatar-BEet_8fB.cjs} +57 -53
- package/dist/chunks/{NcAvatar-CVj9XTPL.cjs.map → NcAvatar-BEet_8fB.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-MI8_N7U1.mjs → NcAvatar-e0M-nnF6.mjs} +73 -69
- package/dist/chunks/{NcAvatar-MI8_N7U1.mjs.map → NcAvatar-e0M-nnF6.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-LpXeIBcG.mjs → NcBreadcrumb-CVMyBckA.mjs} +7 -7
- package/dist/chunks/{NcBreadcrumb-LpXeIBcG.mjs.map → NcBreadcrumb-CVMyBckA.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-EhfhBqAL.cjs → NcBreadcrumb-DVXsgQkE.cjs} +4 -4
- package/dist/chunks/{NcBreadcrumb-EhfhBqAL.cjs.map → NcBreadcrumb-DVXsgQkE.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-zYhyJxEY.cjs → NcBreadcrumbs-DkgzO9f5.cjs} +103 -99
- package/dist/chunks/{NcBreadcrumbs-zYhyJxEY.cjs.map → NcBreadcrumbs-DkgzO9f5.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs--4xgDVR7.mjs → NcBreadcrumbs-DqRU0BfB.mjs} +65 -61
- package/dist/chunks/{NcBreadcrumbs--4xgDVR7.mjs.map → NcBreadcrumbs-DqRU0BfB.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-ymUA5BIs.mjs → NcCheckboxRadioSwitch-7Yib86y3.mjs} +6 -6
- package/dist/chunks/{NcCheckboxRadioSwitch-ymUA5BIs.mjs.map → NcCheckboxRadioSwitch-7Yib86y3.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Ox3J2r7t.cjs → NcCheckboxRadioSwitch-Dt96X5bR.cjs} +5 -5
- package/dist/chunks/{NcCheckboxRadioSwitch-Ox3J2r7t.cjs.map → NcCheckboxRadioSwitch-Dt96X5bR.cjs.map} +1 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-C1WLneXl.cjs +4 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-C1WLneXl.cjs.map +1 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-CKROuACA.mjs +3 -0
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-CKROuACA.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-7PNp6DUg.cjs → NcColorPicker-BVqwn1Fr.cjs} +4 -5
- package/dist/chunks/{NcColorPicker-1m1Xv5fE.mjs.map → NcColorPicker-BVqwn1Fr.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-1m1Xv5fE.mjs → NcColorPicker-Dkxeigs5.mjs} +11 -12
- package/dist/chunks/{NcColorPicker-7PNp6DUg.cjs.map → NcColorPicker-Dkxeigs5.mjs.map} +1 -1
- package/dist/chunks/NcContent-Bmeq8hLO.cjs +80 -0
- package/dist/chunks/{NcContent-YJfqE5Kv.mjs.map → NcContent-Bmeq8hLO.cjs.map} +1 -1
- package/dist/chunks/NcContent-COIw1X7V.mjs +87 -0
- package/dist/chunks/{NcContent-L5DDeJmE.cjs.map → NcContent-COIw1X7V.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-oUPY199x.mjs → NcDashboardWidget-Cxz_n1AN.mjs} +6 -6
- package/dist/chunks/{NcDashboardWidget-oUPY199x.mjs.map → NcDashboardWidget-Cxz_n1AN.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-KPADyPUh.cjs → NcDashboardWidget-DArU3jbL.cjs} +3 -3
- package/dist/chunks/{NcDashboardWidget-KPADyPUh.cjs.map → NcDashboardWidget-DArU3jbL.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-KpDnCM7Y.cjs → NcDashboardWidgetItem-BAhzcFfs.cjs} +2 -2
- package/dist/chunks/{NcDashboardWidgetItem-KpDnCM7Y.cjs.map → NcDashboardWidgetItem-BAhzcFfs.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-iZA9aHuL.mjs → NcDashboardWidgetItem-BV2tuXoj.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-iZA9aHuL.mjs.map → NcDashboardWidgetItem-BV2tuXoj.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-EqdvmXRa.mjs → NcDateTime-B0oaElJX.mjs} +2 -2
- package/dist/chunks/{NcDateTime-EqdvmXRa.mjs.map → NcDateTime-B0oaElJX.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-ez2Mc6Ut.cjs → NcDateTime-Dl0XztMt.cjs} +1 -1
- package/dist/chunks/{NcDateTime-ez2Mc6Ut.cjs.map → NcDateTime-Dl0XztMt.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-f6KwlaqC.cjs → NcDialog-C6nYgBDF.cjs} +3 -3
- package/dist/chunks/{NcDialog-f6KwlaqC.cjs.map → NcDialog-C6nYgBDF.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-_HZnlBi4.mjs → NcDialog-D6YSjidf.mjs} +5 -5
- package/dist/chunks/{NcDialog-_HZnlBi4.mjs.map → NcDialog-D6YSjidf.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-CtdP0-DO.cjs → NcDialogButton-D7ibBxsQ.cjs} +11 -10
- package/dist/chunks/{NcDialogButton-xDZQrfsw.mjs.map → NcDialogButton-D7ibBxsQ.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-xDZQrfsw.mjs → NcDialogButton-DQFoaN7q.mjs} +14 -13
- package/dist/chunks/{NcDialogButton-CtdP0-DO.cjs.map → NcDialogButton-DQFoaN7q.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-gZaqE1rk.cjs → NcEmojiPicker-BCdoIKXJ.cjs} +54 -52
- package/dist/chunks/{NcEmojiPicker-gZaqE1rk.cjs.map → NcEmojiPicker-BCdoIKXJ.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-Qi10uLHB.mjs → NcEmojiPicker-fRx7dTTf.mjs} +12 -10
- package/dist/chunks/{NcEmojiPicker-Qi10uLHB.mjs.map → NcEmojiPicker-fRx7dTTf.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-0d6eqre6.cjs → NcHeaderMenu-BUeI4DGP.cjs} +11 -9
- package/dist/chunks/{NcHeaderMenu-0d6eqre6.cjs.map → NcHeaderMenu-BUeI4DGP.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-91qMsRIw.mjs → NcHeaderMenu-CXBimxcN.mjs} +11 -9
- package/dist/chunks/{NcHeaderMenu-91qMsRIw.mjs.map → NcHeaderMenu-CXBimxcN.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-CvnWKK7h.mjs → NcIconSvgWrapper-BTdzvQGV.mjs} +3 -3
- package/dist/chunks/{NcIconSvgWrapper-CvnWKK7h.mjs.map → NcIconSvgWrapper-BTdzvQGV.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-RwagV5P9.cjs → NcIconSvgWrapper-kIn1eQyv.cjs} +3 -3
- package/dist/chunks/{NcIconSvgWrapper-RwagV5P9.cjs.map → NcIconSvgWrapper-kIn1eQyv.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-EgnZwbmj.mjs → NcInputConfirmCancel-BXZqwqY6.mjs} +5 -5
- package/dist/chunks/{NcInputConfirmCancel-EgnZwbmj.mjs.map → NcInputConfirmCancel-BXZqwqY6.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-wK1KES_K.cjs → NcInputConfirmCancel-DpgXTGmT.cjs} +2 -2
- package/dist/chunks/{NcInputConfirmCancel-wK1KES_K.cjs.map → NcInputConfirmCancel-DpgXTGmT.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-DwAhV_Om.mjs → NcListItem-C5oWvAZQ.mjs} +5 -5
- package/dist/chunks/{NcListItem-DwAhV_Om.mjs.map → NcListItem-C5oWvAZQ.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-7wde4DHX.cjs → NcListItem-wxqWqs4s.cjs} +3 -3
- package/dist/chunks/{NcListItem-7wde4DHX.cjs.map → NcListItem-wxqWqs4s.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-1qPc7NDv.cjs → NcListItemIcon-DfdkSCin.cjs} +6 -5
- package/dist/chunks/{NcListItemIcon-1qPc7NDv.cjs.map → NcListItemIcon-DfdkSCin.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-S06TFU1A.mjs → NcListItemIcon-WH9TUCxb.mjs} +8 -7
- package/dist/chunks/{NcListItemIcon-S06TFU1A.mjs.map → NcListItemIcon-WH9TUCxb.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-F30zJsph.mjs → NcPasswordField-BPAivxc_.mjs} +38 -38
- package/dist/chunks/{NcPasswordField-F30zJsph.mjs.map → NcPasswordField-BPAivxc_.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-hngMvgyo.cjs → NcPasswordField-BgNcvN0V.cjs} +16 -16
- package/dist/chunks/{NcPasswordField-hngMvgyo.cjs.map → NcPasswordField-BgNcvN0V.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-93ns_0K4.mjs → NcPopover--V3R3EKV.mjs} +39 -33
- package/dist/chunks/{NcPopover-93ns_0K4.mjs.map → NcPopover--V3R3EKV.mjs.map} +1 -1
- package/dist/chunks/{NcPopover-fv7OFtxM.cjs → NcPopover-h-t7Dnjk.cjs} +16 -10
- package/dist/chunks/{NcPopover-fv7OFtxM.cjs.map → NcPopover-h-t7Dnjk.cjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-BthaVVHU.cjs → NcProgressBar-BYk5hfPI.cjs} +3 -3
- package/dist/chunks/{NcProgressBar-BthaVVHU.cjs.map → NcProgressBar-BYk5hfPI.cjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-h2ufKS6c.mjs → NcProgressBar-DDAeXyp8.mjs} +3 -3
- package/dist/chunks/{NcProgressBar-h2ufKS6c.mjs.map → NcProgressBar-DDAeXyp8.mjs.map} +1 -1
- package/dist/chunks/NcRelatedResourcesPanel-Cp8Au2iI.cjs +371 -0
- package/dist/chunks/NcRelatedResourcesPanel-Cp8Au2iI.cjs.map +1 -0
- package/dist/chunks/NcRelatedResourcesPanel-LTNqJecS.mjs +381 -0
- package/dist/chunks/NcRelatedResourcesPanel-LTNqJecS.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-lE_j-Gfc.mjs → NcRichContenteditable-CHggLQuR.mjs} +42 -35
- package/dist/chunks/{NcRichContenteditable--pSQfJW9.cjs.map → NcRichContenteditable-CHggLQuR.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable--pSQfJW9.cjs → NcRichContenteditable-hT5m_2tr.cjs} +120 -113
- package/dist/chunks/{NcRichContenteditable-lE_j-Gfc.mjs.map → NcRichContenteditable-hT5m_2tr.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-Vm0d22pV.mjs → NcRichText-BBXbh0Hh.mjs} +65 -62
- package/dist/chunks/NcRichText-BBXbh0Hh.mjs.map +1 -0
- package/dist/chunks/{NcRichText-0eMrB-8S.cjs → NcRichText-BWX8BLVh.cjs} +53 -50
- package/dist/chunks/NcRichText-BWX8BLVh.cjs.map +1 -0
- package/dist/chunks/{NcSavingIndicatorIcon-wcQ0mBIL.cjs → NcSavingIndicatorIcon-BTvUkUn-.cjs} +1 -1
- package/dist/chunks/{NcSavingIndicatorIcon-wcQ0mBIL.cjs.map → NcSavingIndicatorIcon-BTvUkUn-.cjs.map} +1 -1
- package/dist/chunks/{NcSavingIndicatorIcon-IqoMFcDK.mjs → NcSavingIndicatorIcon-Bf0SEmgS.mjs} +1 -1
- package/dist/chunks/{NcSavingIndicatorIcon-IqoMFcDK.mjs.map → NcSavingIndicatorIcon-Bf0SEmgS.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-75KHhmKy.mjs → NcSelect-BVmjiQFa.mjs} +55 -51
- package/dist/chunks/{NcSelect-DmqYvkx5.cjs.map → NcSelect-BVmjiQFa.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-DmqYvkx5.cjs → NcSelect-DjTSAsNL.cjs} +50 -46
- package/dist/chunks/{NcSelect-75KHhmKy.mjs.map → NcSelect-DjTSAsNL.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-hNbQxoKD.cjs → NcSelectTags-BJvxyO8E.cjs} +2 -11
- package/dist/chunks/{NcSelectTags-hNbQxoKD.cjs.map → NcSelectTags-BJvxyO8E.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags--fJnxT3p.mjs → NcSelectTags-Ccv-eQzZ.mjs} +4 -13
- package/dist/chunks/{NcSelectTags--fJnxT3p.mjs.map → NcSelectTags-Ccv-eQzZ.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-TsKBeDLR.cjs → NcSettingsInputText-CcO2Du6E.cjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-TsKBeDLR.cjs.map → NcSettingsInputText-CcO2Du6E.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-UaZCytJK.mjs → NcSettingsInputText-DXxmqvcd.mjs} +4 -4
- package/dist/chunks/{NcSettingsInputText-UaZCytJK.mjs.map → NcSettingsInputText-DXxmqvcd.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-bupJ6Jna.mjs → NcSettingsSection-DBe4fKFA.mjs} +3 -3
- package/dist/chunks/{NcSettingsSection-bupJ6Jna.mjs.map → NcSettingsSection-DBe4fKFA.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-m79BAMzc.cjs → NcSettingsSection-qgIYSB_M.cjs} +3 -3
- package/dist/chunks/{NcSettingsSection-m79BAMzc.cjs.map → NcSettingsSection-qgIYSB_M.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup--i1OpaqD.cjs → NcSettingsSelectGroup-DD8PEgvQ.cjs} +6 -6
- package/dist/chunks/{NcSettingsSelectGroup--i1OpaqD.cjs.map → NcSettingsSelectGroup-DD8PEgvQ.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-OBtXPYek.mjs → NcSettingsSelectGroup-d2TLOW1O.mjs} +8 -8
- package/dist/chunks/{NcSettingsSelectGroup-OBtXPYek.mjs.map → NcSettingsSelectGroup-d2TLOW1O.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-J7CSrszM.mjs → NcTextField-CU-YIhL3.mjs} +4 -4
- package/dist/chunks/{NcTextField-J7CSrszM.mjs.map → NcTextField-CU-YIhL3.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-_LseQJYw.cjs → NcTextField-CsnzlYWD.cjs} +2 -2
- package/dist/chunks/{NcTextField-_LseQJYw.cjs.map → NcTextField-CsnzlYWD.cjs.map} +1 -1
- package/dist/chunks/NcTimezonePicker-C-Ci2IuC.cjs +3780 -0
- package/dist/chunks/{NcTimezonePicker-3_GbgBdk.cjs.map → NcTimezonePicker-C-Ci2IuC.cjs.map} +1 -1
- package/dist/chunks/NcTimezonePicker-gvp9MAcg.mjs +3786 -0
- package/dist/chunks/{NcTimezonePicker-WyBb1HGy.mjs.map → NcTimezonePicker-gvp9MAcg.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-dk-rgek6.cjs → NcUserBubble-COhpp9l_.cjs} +4 -3
- package/dist/chunks/{NcUserBubble-GvPAfzyX.mjs.map → NcUserBubble-COhpp9l_.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-GvPAfzyX.mjs → NcUserBubble-CbufscPi.mjs} +6 -5
- package/dist/chunks/{NcUserBubble-dk-rgek6.cjs.map → NcUserBubble-CbufscPi.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-Y1esUu9e.mjs → NcUserStatusIcon-0SGYQL9L.mjs} +37 -54
- package/dist/chunks/{NcUserStatusIcon-Y1esUu9e.mjs.map → NcUserStatusIcon-0SGYQL9L.mjs.map} +1 -1
- package/dist/chunks/NcUserStatusIcon-C7dfcW39.cjs +150 -0
- package/dist/chunks/{NcUserStatusIcon-vElqf2Lx.cjs.map → NcUserStatusIcon-C7dfcW39.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-Cswoc9a6.cjs → ScopeComponent-CSd5rNUA.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-Cswoc9a6.cjs.map → ScopeComponent-CSd5rNUA.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-_g3nK3Vt.mjs → ScopeComponent-LxI8YPnR.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-_g3nK3Vt.mjs.map → ScopeComponent-LxI8YPnR.mjs.map} +1 -1
- package/dist/chunks/_l10n-B986q8RC.cjs +66 -0
- package/dist/chunks/_l10n-B986q8RC.cjs.map +1 -0
- package/dist/chunks/_l10n-D8Scz3mH.mjs +68 -0
- package/dist/chunks/_l10n-D8Scz3mH.mjs.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer-Bj5bLKV4.mjs.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs.map +1 -0
- package/dist/chunks/{actionGlobal-fRayfdEK.mjs.map → actionGlobal-D49NL940.mjs.map} +1 -1
- package/dist/chunks/{actionGlobal-SGFis4LZ.cjs.map → actionGlobal-DL1VaQzF.cjs.map} +1 -1
- package/dist/chunks/{actionText-nj1gFMEY.cjs → actionText-iWNpvZuI.cjs} +1 -1
- package/dist/chunks/{actionText-nj1gFMEY.cjs.map → actionText-iWNpvZuI.cjs.map} +1 -1
- package/dist/chunks/{actionText-bMy_49i8.mjs → actionText-jLsEBszD.mjs} +1 -1
- package/dist/chunks/{actionText-bMy_49i8.mjs.map → actionText-jLsEBszD.mjs.map} +1 -1
- package/dist/chunks/{autolink-oKM43mOC.mjs.map → autolink-BtgUDDdk.mjs.map} +1 -1
- package/dist/chunks/{autolink-gVCgJtXh.cjs.map → autolink-D0rLUkqm.cjs.map} +1 -1
- package/dist/chunks/{emoji-mJIuLpNR.cjs → emoji-DEH9dtOa.cjs} +7 -6
- package/dist/chunks/{emoji-mJIuLpNR.cjs.map → emoji-DEH9dtOa.cjs.map} +1 -1
- package/dist/chunks/{emoji-tllD0Rvt.mjs → emoji-k4gWHxrE.mjs} +4 -3
- package/dist/chunks/{emoji-tllD0Rvt.mjs.map → emoji-k4gWHxrE.mjs.map} +1 -1
- package/dist/chunks/{focusTrap-Py2bQ9-r.mjs.map → focusTrap-Be9GEB5C.mjs.map} +1 -1
- package/dist/chunks/{focusTrap-n3H52LOw.cjs.map → focusTrap-xauhLvvr.cjs.map} +1 -1
- package/dist/chunks/index-Bh9FEWbr.cjs +87 -0
- package/dist/chunks/index-Bh9FEWbr.cjs.map +1 -0
- package/dist/chunks/{index-XRGLuo0a.cjs → index-CIsMzBte.cjs} +9 -11
- package/dist/chunks/{index-XRGLuo0a.cjs.map → index-CIsMzBte.cjs.map} +1 -1
- package/dist/chunks/index-CU14QsCg.mjs +88 -0
- package/dist/chunks/index-CU14QsCg.mjs.map +1 -0
- package/dist/chunks/{index-FO4BaGaF.cjs → index-Cke9rKBg.cjs} +1 -1
- package/dist/chunks/{index-FO4BaGaF.cjs.map → index-Cke9rKBg.cjs.map} +1 -1
- package/dist/chunks/{index-2phCrsSH.mjs → index-CnpswYi6.mjs} +1 -1
- package/dist/chunks/{index-2phCrsSH.mjs.map → index-CnpswYi6.mjs.map} +1 -1
- package/dist/chunks/{index-05Rfhge1.mjs → index-DYXjj9ET.mjs} +10 -12
- package/dist/chunks/{index-05Rfhge1.mjs.map → index-DYXjj9ET.mjs.map} +1 -1
- package/dist/chunks/{logger-3m1eQsSo.mjs.map → logger-C7qcfVW8.mjs.map} +1 -1
- package/dist/chunks/{logger-G6OKp5ly.cjs.map → logger-D9RRY4er.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-TxU49swn.mjs → referencePickerModal-DUhJWt2e.mjs} +721 -659
- package/dist/chunks/referencePickerModal-DUhJWt2e.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-bKXpgb2c.cjs → referencePickerModal-DV7-XzCc.cjs} +377 -315
- package/dist/chunks/referencePickerModal-DV7-XzCc.cjs.map +1 -0
- package/dist/chunks/{usernameToColor-AinK73Yf.cjs → usernameToColor-DibvD_OP.cjs} +1 -1
- package/dist/chunks/{usernameToColor-AinK73Yf.cjs.map → usernameToColor-DibvD_OP.cjs.map} +1 -1
- package/dist/chunks/{usernameToColor-CgFQ3CLQ.mjs → usernameToColor-iYF-oKTP.mjs} +1 -1
- package/dist/chunks/{usernameToColor-CgFQ3CLQ.mjs.map → usernameToColor-iYF-oKTP.mjs.map} +1 -1
- package/dist/functions/reference/widgets.d.ts +37 -0
- package/dist/index.cjs +18 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +112 -111
- package/package.json +13 -13
- package/dist/chunks/NcAppNavigation-7U8buuT7.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-AcPesLHq.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-9n2uXjvj.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-pvFIrGQv.cjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-0EjSdGnM.mjs +0 -3
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-0EjSdGnM.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-0FNcC7Nt.cjs +0 -4
- package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_2603be83_lang-0FNcC7Nt.cjs.map +0 -1
- package/dist/chunks/NcContent-L5DDeJmE.cjs +0 -124
- package/dist/chunks/NcContent-YJfqE5Kv.mjs +0 -131
- package/dist/chunks/NcRelatedResourcesPanel-f1Up3M7Q.cjs +0 -205
- package/dist/chunks/NcRelatedResourcesPanel-f1Up3M7Q.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-zXNE9qiS.mjs +0 -211
- package/dist/chunks/NcRelatedResourcesPanel-zXNE9qiS.mjs.map +0 -1
- package/dist/chunks/NcRichText-0eMrB-8S.cjs.map +0 -1
- package/dist/chunks/NcRichText-Vm0d22pV.mjs.map +0 -1
- package/dist/chunks/NcTimezonePicker-3_GbgBdk.cjs +0 -7195
- package/dist/chunks/NcTimezonePicker-WyBb1HGy.mjs +0 -7201
- package/dist/chunks/NcUserStatusIcon-vElqf2Lx.cjs +0 -167
- package/dist/chunks/_l10n-AmjncLyn.cjs +0 -64
- package/dist/chunks/_l10n-AmjncLyn.cjs.map +0 -1
- package/dist/chunks/_l10n-Y2fvkVoK.mjs +0 -66
- package/dist/chunks/_l10n-Y2fvkVoK.mjs.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-DCfUPqga.cjs.map +0 -1
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-TxU49swn.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-bKXpgb2c.cjs.map +0 -1
- /package/dist/assets/{NcActionButton-rOZFVQA8.css → NcActionButton-Cs5kVVAD.css} +0 -0
- /package/dist/assets/{NcActionButtonGroup-oXobVIqQ.css → NcActionButtonGroup-ChehtUip.css} +0 -0
- /package/dist/assets/{NcActionCaption-afJqyJO6.css → NcActionCaption-Bp8mrIk7.css} +0 -0
- /package/dist/assets/{NcActionCheckbox-6Pvlr1E7.css → NcActionCheckbox-Do--WvUT.css} +0 -0
- /package/dist/assets/{NcActionInput-4zSvDkWm.css → NcActionInput-DjNK8ORa.css} +0 -0
- /package/dist/assets/{NcActionLink-zdzQgwtH.css → NcActionLink-DN3NCDC0.css} +0 -0
- /package/dist/assets/{NcActionRadio-eOr9Sp-D.css → NcActionRadio-B46v1Kn4.css} +0 -0
- /package/dist/assets/{NcActionRouter-MFTD6tYI.css → NcActionRouter-wVMPq1gi.css} +0 -0
- /package/dist/assets/{NcActionSeparator-l98xWbiL.css → NcActionSeparator-CX3zFZuI.css} +0 -0
- /package/dist/assets/{NcActionText-GJYwsw_U.css → NcActionText-YljCzD9Q.css} +0 -0
- /package/dist/assets/{NcActionTextEditable-JrYuWEDd.css → NcActionTextEditable-mti5YQN1.css} +0 -0
- /package/dist/assets/{NcAppNavigationCaption-I1dcvB0N.css → NcAppNavigationCaption-jV1y8HQ1.css} +0 -0
- /package/dist/assets/{NcAppNavigationIconBullet-Nf3ARMLv.css → NcAppNavigationIconBullet-1_cBEwu8.css} +0 -0
- /package/dist/assets/{NcAppNavigationItem-caMsw_N_.css → NcAppNavigationItem-BxoyzD83.css} +0 -0
- /package/dist/assets/{NcAppNavigationNew-joyd78FM.css → NcAppNavigationNew-COjJ3vwU.css} +0 -0
- /package/dist/assets/{NcAppNavigationNewItem-ue-H4LQY.css → NcAppNavigationNewItem-C574fgtB.css} +0 -0
- /package/dist/assets/{NcAppNavigationSettings-Jx_6RpSn.css → NcAppNavigationSettings-nH_pGlKc.css} +0 -0
- /package/dist/assets/{NcAppNavigationSpacer-uaft91Uz.css → NcAppNavigationSpacer-C5p-33VT.css} +0 -0
- /package/dist/assets/{NcAppNavigationToggle-3vMKtCQL.css → NcAppNavigationToggle-De8wq0JA.css} +0 -0
- /package/dist/assets/{NcAppSettingsDialog-0eOo3ERv.css → NcAppSettingsDialog-DR46jcRG.css} +0 -0
- /package/dist/assets/{NcAppSettingsSection-ahfdhix_.css → NcAppSettingsSection-BqF92GLH.css} +0 -0
- /package/dist/assets/{NcAppSidebar-RkF-tqKy.css → NcAppSidebar-BGQX62or.css} +0 -0
- /package/dist/assets/{NcAppSidebarTab-FywbKxqo.css → NcAppSidebarTab-XLBsrGqg.css} +0 -0
- /package/dist/assets/{NcAvatar-5H9cqcD1.css → NcAvatar-Dkf1ypwP.css} +0 -0
- /package/dist/assets/{NcBreadcrumb-HspaFygg.css → NcBreadcrumb-eyloXKCC.css} +0 -0
- /package/dist/assets/{NcBreadcrumbs-KBV0Jccv.css → NcBreadcrumbs-oFXQlxy-.css} +0 -0
- /package/dist/assets/{NcButton-4Wj3KJn8.css → NcButton-DhaPcomf.css} +0 -0
- /package/dist/assets/{NcCheckboxRadioSwitch-mgKotCbU.css → NcCheckboxRadioSwitch-CaAqi0Jt.css} +0 -0
- /package/dist/assets/{NcColorPicker-jW6HOxWA.css → NcColorPicker-CNboc7FY.css} +0 -0
- /package/dist/assets/{NcContent-LWR23l9i.css → NcContent-tZHbeX2L.css} +0 -0
- /package/dist/assets/{NcCounterBubble-rgkmqN46.css → NcCounterBubble-CuCSao3j.css} +0 -0
- /package/dist/assets/{NcDashboardWidget-01deRW9Z.css → NcDashboardWidget-DTV15Fb1.css} +0 -0
- /package/dist/assets/{NcDashboardWidgetItem-OL--xR_P.css → NcDashboardWidgetItem-4v77FH89.css} +0 -0
- /package/dist/assets/{NcDateTimePickerNative-5yybtvfx.css → NcDateTimePickerNative-DnLJu29_.css} +0 -0
- /package/dist/assets/{NcDialog-DN-rY-55.css → NcDialog-M36tj7nk.css} +0 -0
- /package/dist/assets/{NcEllipsisedOption-eoI10kvc.css → NcEllipsisedOption-B6gjXSS9.css} +0 -0
- /package/dist/assets/{NcEmptyContent-pSz7F6Oe.css → NcEmptyContent-ClLPsXo5.css} +0 -0
- /package/dist/assets/{NcGuestContent-mGGTzI2_.css → NcGuestContent-CYYZPMjb.css} +0 -0
- /package/dist/assets/{NcHeaderMenu-Srn5iXdL.css → NcHeaderMenu-BKufmJd0.css} +0 -0
- /package/dist/assets/{NcIconSvgWrapper-KLotijwU.css → NcIconSvgWrapper-oui2KPBT.css} +0 -0
- /package/dist/assets/{NcInputConfirmCancel-ks8z8dIn.css → NcInputConfirmCancel-CSzzPx0i.css} +0 -0
- /package/dist/assets/{NcInputField-L2Lld_iG.css → NcInputField-vYuV3-IY.css} +0 -0
- /package/dist/assets/{NcListItem-L8LeGwpe.css → NcListItem-vwt4bCl6.css} +0 -0
- /package/dist/assets/{NcListItemIcon-PQ2s6ZqX.css → NcListItemIcon-9Dazpmpd.css} +0 -0
- /package/dist/assets/{NcLoadingIcon-hZn7TJM8.css → NcLoadingIcon-CFmftMkz.css} +0 -0
- /package/dist/assets/{NcMentionBubble-YYl1ib_F.css → NcMentionBubble-BhiXWJv8.css} +0 -0
- /package/dist/assets/{NcModal-sIK5sUoC.css → NcModal-CwgrmxSg.css} +0 -0
- /package/dist/assets/{NcNoteCard-f0NZpwjL.css → NcNoteCard-B_Q1mnCM.css} +0 -0
- /package/dist/assets/{NcPopover-MK4GcuPY.css → NcPopover-wrgZy49g.css} +0 -0
- /package/dist/assets/{NcProgressBar-w4-G5gQR.css → NcProgressBar-DDj4bmBB.css} +0 -0
- /package/dist/assets/{NcRichContenteditable-rW6l0h3m.css → NcRichContenteditable-CtbqXSHe.css} +0 -0
- /package/dist/assets/{NcSettingsInputText-MPi6a3Yy.css → NcSettingsInputText-w-LprdjK.css} +0 -0
- /package/dist/assets/{NcSettingsSection-PEWm0eeL.css → NcSettingsSection-8RabR54v.css} +0 -0
- /package/dist/assets/{NcSettingsSelectGroup-_Jpb8yE3.css → NcSettingsSelectGroup-D8mlvzIT.css} +0 -0
- /package/dist/assets/{NcTextArea-4rVwq6GK.css → NcTextArea-DitXCroY.css} +0 -0
- /package/dist/assets/{NcUserBubble-jjzI5imn.css → NcUserBubble-COPMjmKa.css} +0 -0
- /package/dist/assets/{NcUserStatusIcon-62u43_6P.css → NcUserStatusIcon-Dra7jf_o.css} +0 -0
- /package/dist/assets/{Tooltip-wOLIuz0Q.css → Tooltip-DA4si7PR.css} +0 -0
- /package/dist/chunks/{GenRandomId-ULxaMkkr.cjs → GenRandomId-B2O1GMbH.cjs} +0 -0
- /package/dist/chunks/{GenRandomId-VodkdWbp.mjs → GenRandomId-BW3iYFf9.mjs} +0 -0
- /package/dist/chunks/{Linkify-V7PfCeZ8.mjs → Linkify-BaDLLFxP.mjs} +0 -0
- /package/dist/chunks/{Linkify-f3s3nAe_.cjs → Linkify-Dola0NBa.cjs} +0 -0
- /package/dist/chunks/{_plugin-vue2_normalizer-u6G_3nkj.mjs → _plugin-vue2_normalizer-Bj5bLKV4.mjs} +0 -0
- /package/dist/chunks/{_plugin-vue2_normalizer-DCfUPqga.cjs → _plugin-vue2_normalizer-GXKvuwrq.cjs} +0 -0
- /package/dist/chunks/{actionGlobal-fRayfdEK.mjs → actionGlobal-D49NL940.mjs} +0 -0
- /package/dist/chunks/{actionGlobal-SGFis4LZ.cjs → actionGlobal-DL1VaQzF.cjs} +0 -0
- /package/dist/chunks/{autolink-oKM43mOC.mjs → autolink-BtgUDDdk.mjs} +0 -0
- /package/dist/chunks/{autolink-gVCgJtXh.cjs → autolink-D0rLUkqm.cjs} +0 -0
- /package/dist/chunks/{focusTrap-Py2bQ9-r.mjs → focusTrap-Be9GEB5C.mjs} +0 -0
- /package/dist/chunks/{focusTrap-n3H52LOw.cjs → focusTrap-xauhLvvr.cjs} +0 -0
- /package/dist/chunks/{logger-3m1eQsSo.mjs → logger-C7qcfVW8.mjs} +0 -0
- /package/dist/chunks/{logger-G6OKp5ly.cjs → logger-D9RRY4er.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialog-f6KwlaqC.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<div class=\"dialog\" :class=\"dialogClasses\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</div>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = ref(GenRandomId())\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId.value\n\t\t})\n\n\t\t/**\n\t\t * If the underlaying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block-end: 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\twidth: fit-content;\n\t\tmargin-inline: auto 12px; // 12px to align with the overall modal padding\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","showModal","handleButtonClose","handleClosing","handleClosed","modalProps"],"mappings":";iPAoJAA,IAAAC,EAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,EAAA;AAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAAC,MAEA,MAAA,QAAAA,CAAA,KAAAA,EAAA;AAAA,QACA,CAAAC,MACA,OAAAA,KAAA,YAAAA,aAAA;AAAA,MACA;AAAA,MAGA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,SAAA,UAAA,SAAA,MAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAAA,MAAA,MAAA,QAAAA,CAAA,KAAAA,EAAA,MAAA,CAAAD,MAAA,OAAAA,KAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBA,mBAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,WAAA,aAAA;AAAA,EAEA,MAAAE,GAAA,EAAA,MAAAC,GAAA,OAAAC,EAAA,GAAA;AAKA,UAAAC,IAAAC,EAAAA,IAAA,GAKA,EAAA,OAAAC,MAAAC,EAAAA,eAAAH,GAAA,EAAA,OAAA,KAAA,GAMAI,IAAAC,EAAA,SAAA,MAAAH,EAAA,QAAA,GAAA,GAKAI,IAAAD,EAAA,SAAA,MAAAN,GAAA,eAAA,MAAA,GAKAQ,IAAAN,MAAAO,EAAAA,aAAA,GAKAC,IAAAJ,EAAA,SAAA,MAAAR,EAAA,uBAAA,MAAA,GAKAa,IAAAL,EAAAA,SAAA,MAAA;AACA,UAAA,CAAAR,EAAA;AAKA,eAAAA,EAAA,4BAAAU,EAAA;AAAA,IACA,CAAA,GAKAI,IAAAV,EAAA,IAAA,EAAA,GAMAW,IAAA,MAAA;AACA,MAAAC,EAAA,GACA,OAAA,WAAA,MAAAC,EAAA,GAAA,GAAA;AAAA,IACA,GAKAD,IAAA,MAAA;AACA,MAAAF,EAAA,QAAA,IAIAb,EAAA,SAAA;AAAA,IACA,GAKAgB,IAAA,MAAA;AACA,MAAAH,EAAA,QAAA,IAIAb,EAAA,eAAA,EAAA;AAAA,IACA,GAKAiB,IAAAV,EAAAA,SAAA,OAAA;AAAA,MACA,UAAAR,EAAA;AAAA,MACA,WAAAA,EAAA,cAAA,SAAA,SAAAA,EAAA;AAAA;AAAA;AAAA,MAGA,MAAAA,EAAA;AAAA,MACA,MAAAA,EAAA,QAAAc,EAAA;AAAA,MACA,eAAAd,EAAA;AAAA,MACA,qBAAAA,EAAA;AAAA,MACA,wBAAAA,EAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA,mBAAAe;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,eAAAR;AAAA,MACA,cAAAC;AAAA,MACA,yBAAAE;AAAA,MACA,8BAAAC;AAAA,MACA,uBAAAN;AAAA,MACA,YAAAW;AAAA,MACA,SAAAf;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDialog-C6nYgBDF.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<div class=\"dialog\" :class=\"dialogClasses\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</div>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = ref(GenRandomId())\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId.value\n\t\t})\n\n\t\t/**\n\t\t * If the underlaying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block-end: 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\twidth: fit-content;\n\t\tmargin-inline: auto 12px; // 12px to align with the overall modal padding\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","showModal","handleButtonClose","handleClosing","handleClosed","modalProps"],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import '../assets/NcDialog-
|
|
1
|
+
import '../assets/NcDialog-M36tj7nk.css';
|
|
2
2
|
import { useElementSize as m } from "@vueuse/core";
|
|
3
3
|
import { defineComponent as y, ref as s, computed as n } from "vue";
|
|
4
4
|
import C from "../Components/NcModal.mjs";
|
|
5
|
-
import { N as b } from "./NcDialogButton-
|
|
6
|
-
import { G as A } from "./GenRandomId-
|
|
7
|
-
import { n as h } from "./_plugin-vue2_normalizer-
|
|
5
|
+
import { N as b } from "./NcDialogButton-DQFoaN7q.mjs";
|
|
6
|
+
import { G as A } from "./GenRandomId-BW3iYFf9.mjs";
|
|
7
|
+
import { n as h } from "./_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
8
8
|
const N = y({
|
|
9
9
|
name: "NcDialog",
|
|
10
10
|
components: {
|
|
@@ -155,7 +155,7 @@ const N = y({
|
|
|
155
155
|
},
|
|
156
156
|
emits: ["closing", "update:open"],
|
|
157
157
|
setup(e, { emit: a, slots: t }) {
|
|
158
|
-
const i = s(), { width: l } = m(i, { width: 900 }), u = n(() => l.value < 876), f = n(() => t
|
|
158
|
+
const i = s(), { width: l } = m(i, { width: 900 }), u = n(() => l.value < 876), f = n(() => (t == null ? void 0 : t.navigation) !== void 0), r = s(A()), g = n(() => e.navigationAriaLabel || void 0), p = n(() => {
|
|
159
159
|
if (!e.navigationAriaLabel)
|
|
160
160
|
return e.navigationAriaLabelledby || r.value;
|
|
161
161
|
}), o = s(!0), _ = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialog-_HZnlBi4.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<div class=\"dialog\" :class=\"dialogClasses\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</div>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = ref(GenRandomId())\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId.value\n\t\t})\n\n\t\t/**\n\t\t * If the underlaying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block-end: 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\twidth: fit-content;\n\t\tmargin-inline: auto 12px; // 12px to align with the overall modal padding\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","showModal","handleButtonClose","handleClosing","handleClosed","modalProps"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"NcDialog-D6YSjidf.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<div class=\"dialog\" :class=\"dialogClasses\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</div>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = ref(GenRandomId())\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId.value\n\t\t})\n\n\t\t/**\n\t\t * If the underlaying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block-end: 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\twidth: fit-content;\n\t\tmargin-inline: auto 12px; // 12px to align with the overall modal padding\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","showModal","handleButtonClose","handleClosing","handleClosed","modalProps"],"mappings":";;;;;;AAoJA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC;AAAA,IACA,SAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAAC,MAEA,MAAA,QAAAA,CAAA,KAAAA,EAAA;AAAA,QACA,CAAAC,MACA,OAAAA,KAAA,YAAAA,aAAA;AAAA,MACA;AAAA,MAGA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,SAAA,UAAA,SAAA,MAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAAA,MAAA,MAAA,QAAAA,CAAA,KAAAA,EAAA,MAAA,CAAAD,MAAA,OAAAA,KAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBA,mBAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,WAAA,aAAA;AAAA,EAEA,MAAAE,GAAA,EAAA,MAAAC,GAAA,OAAAC,EAAA,GAAA;AAKA,UAAAC,IAAAC,EAAA,GAKA,EAAA,OAAAC,MAAAC,EAAAH,GAAA,EAAA,OAAA,KAAA,GAMAI,IAAAC,EAAA,MAAAH,EAAA,QAAA,GAAA,GAKAI,IAAAD,EAAA,OAAAN,KAAA,gBAAAA,EAAA,gBAAA,MAAA,GAKAQ,IAAAN,EAAAO,GAAA,GAKAC,IAAAJ,EAAA,MAAAR,EAAA,uBAAA,MAAA,GAKAa,IAAAL,EAAA,MAAA;AACA,UAAA,CAAAR,EAAA;AAKA,eAAAA,EAAA,4BAAAU,EAAA;AAAA,IACA,CAAA,GAKAI,IAAAV,EAAA,EAAA,GAMAW,IAAA,MAAA;AACA,MAAAC,EAAA,GACA,OAAA,WAAA,MAAAC,EAAA,GAAA,GAAA;AAAA,IACA,GAKAD,IAAA,MAAA;AACA,MAAAF,EAAA,QAAA,IAIAb,EAAA,SAAA;AAAA,IACA,GAKAgB,IAAA,MAAA;AACA,MAAAH,EAAA,QAAA,IAIAb,EAAA,eAAA,EAAA;AAAA,IACA,GAKAiB,IAAAV,EAAA,OAAA;AAAA,MACA,UAAAR,EAAA;AAAA,MACA,WAAAA,EAAA,cAAA,SAAA,SAAAA,EAAA;AAAA;AAAA;AAAA,MAGA,MAAAA,EAAA;AAAA,MACA,MAAAA,EAAA,QAAAc,EAAA;AAAA,MACA,eAAAd,EAAA;AAAA,MACA,qBAAAA,EAAA;AAAA,MACA,wBAAAA,EAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA,mBAAAe;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,eAAAR;AAAA,MACA,cAAAC;AAAA,MACA,yBAAAE;AAAA,MACA,8BAAAC;AAAA,MACA,uBAAAN;AAAA,MACA,YAAAW;AAAA,MACA,SAAAf;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const o = require("vue"), l = require("../Components/NcButton.cjs"), i = require("./NcIconSvgWrapper-kIn1eQyv.cjs"), u = require("./_plugin-vue2_normalizer-GXKvuwrq.cjs"), a = o.defineComponent({
|
|
3
3
|
name: "NcDialogButton",
|
|
4
4
|
components: {
|
|
5
|
-
NcButton:
|
|
6
|
-
NcIconSvgWrapper:
|
|
5
|
+
NcButton: l,
|
|
6
|
+
NcIconSvgWrapper: i.NcIconSvgWrapper
|
|
7
7
|
},
|
|
8
8
|
props: {
|
|
9
9
|
/**
|
|
@@ -42,27 +42,28 @@ const c = require("vue"), o = require("../Components/NcButton.cjs"), l = require
|
|
|
42
42
|
},
|
|
43
43
|
emits: ["click"],
|
|
44
44
|
setup(n, { emit: e }) {
|
|
45
|
-
return { handleClick: (
|
|
46
|
-
|
|
45
|
+
return { handleClick: (c) => {
|
|
46
|
+
var t;
|
|
47
|
+
(t = n.callback) == null || t.call(n), e("click", c);
|
|
47
48
|
} };
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
|
-
var
|
|
51
|
+
var s = function() {
|
|
51
52
|
var e = this, r = e._self._c;
|
|
52
53
|
return e._self._setupProxy, r("NcButton", { attrs: { "aria-label": e.label, type: e.type }, on: { click: e.handleClick }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
53
54
|
return [e._t("icon", function() {
|
|
54
55
|
return [e.icon !== void 0 ? r("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
|
|
55
56
|
})];
|
|
56
57
|
}, proxy: !0 }], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
|
|
57
|
-
},
|
|
58
|
-
u,
|
|
58
|
+
}, _ = [], d = /* @__PURE__ */ u.normalizeComponent(
|
|
59
59
|
a,
|
|
60
60
|
s,
|
|
61
|
+
_,
|
|
61
62
|
!1,
|
|
62
63
|
null,
|
|
63
64
|
null,
|
|
64
65
|
null,
|
|
65
66
|
null
|
|
66
67
|
);
|
|
67
|
-
const
|
|
68
|
-
exports.NcDialogButton =
|
|
68
|
+
const p = d.exports;
|
|
69
|
+
exports.NcDialogButton = p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialogButton-
|
|
1
|
+
{"version":3,"file":"NcDialogButton-D7ibBxsQ.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn { handleClick }\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","NcButton","NcIconSvgWrapper","type","props","emit","e","_a"],"mappings":";4KA2CAA,IAAAC,EAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAAA,IACA,kBAAAC,EAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA,EAAA,aALA,CAAAC,MAAA;;AACA,OAAAC,IAAAH,EAAA,aAAA,QAAAG,EAAA,KAAAH,IACAC,EAAA,SAAAC,CAAA;AAAA,IACA,EAEA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as o } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { N as
|
|
4
|
-
import { n as
|
|
5
|
-
const
|
|
2
|
+
import l from "../Components/NcButton.mjs";
|
|
3
|
+
import { N as i } from "./NcIconSvgWrapper-BTdzvQGV.mjs";
|
|
4
|
+
import { n as a } from "./_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
5
|
+
const u = o({
|
|
6
6
|
name: "NcDialogButton",
|
|
7
7
|
components: {
|
|
8
|
-
NcButton:
|
|
9
|
-
NcIconSvgWrapper:
|
|
8
|
+
NcButton: l,
|
|
9
|
+
NcIconSvgWrapper: i
|
|
10
10
|
},
|
|
11
11
|
props: {
|
|
12
12
|
/**
|
|
@@ -45,8 +45,9 @@ const a = o({
|
|
|
45
45
|
},
|
|
46
46
|
emits: ["click"],
|
|
47
47
|
setup(n, { emit: e }) {
|
|
48
|
-
return { handleClick: (
|
|
49
|
-
|
|
48
|
+
return { handleClick: (c) => {
|
|
49
|
+
var t;
|
|
50
|
+
(t = n.callback) == null || t.call(n), e("click", c);
|
|
50
51
|
} };
|
|
51
52
|
}
|
|
52
53
|
});
|
|
@@ -57,17 +58,17 @@ var s = function() {
|
|
|
57
58
|
return [e.icon !== void 0 ? r("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
|
|
58
59
|
})];
|
|
59
60
|
}, proxy: !0 }], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
|
|
60
|
-
},
|
|
61
|
-
a,
|
|
62
|
-
s,
|
|
61
|
+
}, d = [], f = /* @__PURE__ */ a(
|
|
63
62
|
u,
|
|
63
|
+
s,
|
|
64
|
+
d,
|
|
64
65
|
!1,
|
|
65
66
|
null,
|
|
66
67
|
null,
|
|
67
68
|
null,
|
|
68
69
|
null
|
|
69
70
|
);
|
|
70
|
-
const
|
|
71
|
+
const g = f.exports;
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
g as N
|
|
73
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialogButton-
|
|
1
|
+
{"version":3,"file":"NcDialogButton-DQFoaN7q.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn { handleClick }\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","NcButton","NcIconSvgWrapper","type","props","emit","e","_a"],"mappings":";;;;AA2CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA,EAAA,aALA,CAAAC,MAAA;;AACA,OAAAC,IAAAH,EAAA,aAAA,QAAAG,EAAA,KAAAH,IACAC,EAAA,SAAAC,CAAA;AAAA,IACA,EAEA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
require('../assets/NcEmojiPicker-
|
|
1
|
+
require('../assets/NcEmojiPicker-B-4WNYcx.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const l = require("emoji-mart-vue-fast"),
|
|
4
|
-
|
|
3
|
+
const l = require("emoji-mart-vue-fast"), n = require("./_l10n-B986q8RC.cjs"), c = require("./emoji-DEH9dtOa.cjs"), o = require("./GenColors-vI-bx9ZY.cjs"), p = require("emoji-mart-vue-fast/data/all.json"), f = require("./_plugin-vue2_normalizer-GXKvuwrq.cjs"), d = require("../Components/NcButton.cjs"), m = require("./NcColorPicker-BVqwn1Fr.cjs"), h = require("./NcPopover-h-t7Dnjk.cjs"), k = require("./NcTextField-CsnzlYWD.cjs"), _ = (r) => r && r.__esModule ? r : { default: r }, v = /* @__PURE__ */ _(p);
|
|
4
|
+
n.register(n.t6, n.t31, n.t36);
|
|
5
5
|
const y = {
|
|
6
6
|
name: "CircleIcon",
|
|
7
7
|
emits: ["click"],
|
|
@@ -20,10 +20,10 @@ const y = {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
var g = function() {
|
|
23
|
-
var e = this,
|
|
24
|
-
return
|
|
23
|
+
var e = this, t = e._self._c;
|
|
24
|
+
return t("span", e._b({ staticClass: "material-design-icon circle-icon", attrs: { "aria-hidden": e.title ? null : !0, "aria-label": e.title, role: "img" }, on: { click: function(i) {
|
|
25
25
|
return e.$emit("click", i);
|
|
26
|
-
} } }, "span", e.$attrs, !1), [
|
|
26
|
+
} } }, "span", e.$attrs, !1), [t("svg", { staticClass: "material-design-icon__svg", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: "0 0 24 24" } }, [t("path", { attrs: { d: "M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" } }, [e.title ? t("title", [e._v(e._s(e.title))]) : e._e()])])]);
|
|
27
27
|
}, C = [], S = /* @__PURE__ */ f.normalizeComponent(
|
|
28
28
|
y,
|
|
29
29
|
g,
|
|
@@ -37,29 +37,29 @@ var g = function() {
|
|
|
37
37
|
const w = S.exports;
|
|
38
38
|
let a;
|
|
39
39
|
const b = {
|
|
40
|
-
search:
|
|
41
|
-
notfound:
|
|
40
|
+
search: n.t("Search emoji"),
|
|
41
|
+
notfound: n.t("No emoji found"),
|
|
42
42
|
categories: {
|
|
43
|
-
search:
|
|
44
|
-
recent:
|
|
45
|
-
smileys:
|
|
46
|
-
people:
|
|
47
|
-
nature:
|
|
48
|
-
foods:
|
|
49
|
-
activity:
|
|
50
|
-
places:
|
|
51
|
-
objects:
|
|
52
|
-
symbols:
|
|
53
|
-
flags:
|
|
54
|
-
custom:
|
|
43
|
+
search: n.t("Search results"),
|
|
44
|
+
recent: n.t("Frequently used"),
|
|
45
|
+
smileys: n.t("Smileys & Emotion"),
|
|
46
|
+
people: n.t("People & Body"),
|
|
47
|
+
nature: n.t("Animals & Nature"),
|
|
48
|
+
foods: n.t("Food & Drink"),
|
|
49
|
+
activity: n.t("Activities"),
|
|
50
|
+
places: n.t("Travel & Places"),
|
|
51
|
+
objects: n.t("Objects"),
|
|
52
|
+
symbols: n.t("Symbols"),
|
|
53
|
+
flags: n.t("Flags"),
|
|
54
|
+
custom: n.t("Custom")
|
|
55
55
|
}
|
|
56
56
|
}, u = [
|
|
57
|
-
new o.Color(255, 222, 52,
|
|
58
|
-
new o.Color(228, 205, 166,
|
|
59
|
-
new o.Color(250, 221, 192,
|
|
60
|
-
new o.Color(174, 129, 87,
|
|
61
|
-
new o.Color(158, 113, 88,
|
|
62
|
-
new o.Color(96, 79, 69,
|
|
57
|
+
new o.Color(255, 222, 52, n.t("Neutral skin color")),
|
|
58
|
+
new o.Color(228, 205, 166, n.t("Light skin tone")),
|
|
59
|
+
new o.Color(250, 221, 192, n.t("Medium light skin tone")),
|
|
60
|
+
new o.Color(174, 129, 87, n.t("Medium skin tone")),
|
|
61
|
+
new o.Color(158, 113, 88, n.t("Medium dark skin tone")),
|
|
62
|
+
new o.Color(96, 79, 69, n.t("Dark skin tone"))
|
|
63
63
|
], j = {
|
|
64
64
|
name: "NcEmojiPicker",
|
|
65
65
|
components: {
|
|
@@ -112,7 +112,7 @@ const b = {
|
|
|
112
112
|
*/
|
|
113
113
|
previewFallbackName: {
|
|
114
114
|
type: String,
|
|
115
|
-
default:
|
|
115
|
+
default: n.t("Pick an emoji")
|
|
116
116
|
},
|
|
117
117
|
/**
|
|
118
118
|
* Whether to close the emoji picker after picking one
|
|
@@ -143,17 +143,17 @@ const b = {
|
|
|
143
143
|
};
|
|
144
144
|
},
|
|
145
145
|
data() {
|
|
146
|
-
const
|
|
146
|
+
const r = c.getCurrentSkinTone();
|
|
147
147
|
return {
|
|
148
148
|
/**
|
|
149
149
|
* The current active color from the skin tone palette
|
|
150
150
|
*/
|
|
151
|
-
currentColor: u[
|
|
151
|
+
currentColor: u[r - 1],
|
|
152
152
|
/**
|
|
153
153
|
* The current active skin tone
|
|
154
154
|
* @type {1|2|3|4|5|6}
|
|
155
155
|
*/
|
|
156
|
-
currentSkinTone:
|
|
156
|
+
currentSkinTone: r,
|
|
157
157
|
search: "",
|
|
158
158
|
open: !1
|
|
159
159
|
};
|
|
@@ -164,66 +164,68 @@ const b = {
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
methods: {
|
|
167
|
-
t:
|
|
167
|
+
t: n.t,
|
|
168
168
|
clearSearch() {
|
|
169
|
+
var e, t;
|
|
169
170
|
this.search = "";
|
|
170
|
-
const t = this.$refs.search
|
|
171
|
-
|
|
171
|
+
const r = (t = (e = this.$refs.search) == null ? void 0 : e.$refs.inputField) == null ? void 0 : t.$refs.input;
|
|
172
|
+
r && r.focus();
|
|
172
173
|
},
|
|
173
174
|
/**
|
|
174
175
|
* Update the current skin tone by the result of the color picker
|
|
175
176
|
* @param {string} color Color set
|
|
176
177
|
*/
|
|
177
|
-
onChangeSkinTone(
|
|
178
|
-
const e = this.skinTonePalette.findIndex((
|
|
178
|
+
onChangeSkinTone(r) {
|
|
179
|
+
const e = this.skinTonePalette.findIndex((t) => t.color.toLowerCase() === r.toLowerCase());
|
|
179
180
|
e > -1 && (this.currentSkinTone = e + 1, this.currentColor = this.skinTonePalette[e], c.setCurrentSkinTone(this.currentSkinTone));
|
|
180
181
|
},
|
|
181
|
-
select(
|
|
182
|
-
this.$emit("select",
|
|
182
|
+
select(r) {
|
|
183
|
+
this.$emit("select", r.native), this.$emit("select-data", r), this.closeOnSelect && (this.open = !1);
|
|
183
184
|
},
|
|
184
185
|
unselect() {
|
|
185
186
|
this.$emit("unselect");
|
|
186
187
|
},
|
|
187
188
|
afterShow() {
|
|
189
|
+
var t, i;
|
|
188
190
|
this.$refs.picker.$el.addEventListener("keydown", this.checkKeyEvent);
|
|
189
|
-
const e = this.$refs.search
|
|
191
|
+
const e = (i = (t = this.$refs.search) == null ? void 0 : t.$refs.inputField) == null ? void 0 : i.$refs.input;
|
|
190
192
|
e && e.focus();
|
|
191
193
|
},
|
|
192
194
|
afterHide() {
|
|
193
195
|
this.$refs.picker.$el.removeEventListener("keydown", this.checkKeyEvent);
|
|
194
196
|
},
|
|
195
|
-
checkKeyEvent(
|
|
196
|
-
if (
|
|
197
|
+
checkKeyEvent(r) {
|
|
198
|
+
if (r.key !== "Tab")
|
|
197
199
|
return;
|
|
198
|
-
const
|
|
200
|
+
const t = this.$refs.picker.$el.querySelectorAll(
|
|
199
201
|
"button, input"
|
|
200
|
-
), i =
|
|
201
|
-
if (
|
|
202
|
-
|
|
202
|
+
), i = t.length - 1;
|
|
203
|
+
if (t.length <= 1) {
|
|
204
|
+
r.preventDefault();
|
|
203
205
|
return;
|
|
204
206
|
}
|
|
205
|
-
|
|
207
|
+
r.shiftKey === !1 && r.target === t[i] ? (r.preventDefault(), t[0].focus()) : r.shiftKey === !0 && r.target === t[0] && (r.preventDefault(), t[i].focus());
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
};
|
|
209
211
|
var $ = function() {
|
|
210
|
-
var e = this,
|
|
211
|
-
return
|
|
212
|
+
var e = this, t = e._self._c;
|
|
213
|
+
return t("NcPopover", e._g(e._b({ attrs: { shown: e.open, container: e.container, "popup-role": "dialog" }, on: { "update:shown": function(i) {
|
|
212
214
|
e.open = i;
|
|
213
215
|
}, "after-show": e.afterShow, "after-hide": e.afterHide }, scopedSlots: e._u([{ key: "trigger", fn: function(i) {
|
|
214
216
|
return [e._t("default", null, null, i)];
|
|
215
|
-
} }], null, !0) }, "NcPopover", e.$attrs, !1), e.$listeners), [
|
|
216
|
-
return [
|
|
217
|
+
} }], null, !0) }, "NcPopover", e.$attrs, !1), e.$listeners), [t("Picker", e._b({ ref: "picker", attrs: { "auto-focus": !1, color: "var(--color-primary-element)", data: e.emojiIndex, emoji: e.previewFallbackEmoji, i18n: e.i18n, native: e.native, "emoji-size": 20, "per-line": 8, "picker-styles": { width: "320px" }, "show-preview": e.showPreview, skin: e.currentSkinTone, "show-skin-tones": !1, title: e.previewFallbackName, role: "dialog", "aria-modal": "true", "aria-label": e.t("Emoji picker") }, on: { select: e.select }, scopedSlots: e._u([{ key: "searchTemplate", fn: function(i) {
|
|
218
|
+
return [t("div", { staticClass: "search__wrapper" }, [t("NcTextField", { ref: "search", staticClass: "search", attrs: { value: e.search, label: e.t("Search"), "label-visible": !0, placeholder: e.i18n.search, "trailing-button-icon": "close", "trailing-button-label": e.t("Clear search"), "show-trailing-button": e.search !== "" }, on: { "update:value": [function(s) {
|
|
217
219
|
e.search = s;
|
|
218
220
|
}, function(s) {
|
|
219
221
|
return i.onSearch(e.search);
|
|
220
222
|
}], "trailing-button-click": function(s) {
|
|
221
223
|
e.clearSearch(), i.onSearch(e.search);
|
|
222
|
-
} } }),
|
|
223
|
-
return [
|
|
224
|
+
} } }), t("NcColorPicker", { attrs: { "palette-only": "", container: e.container, palette: e.skinTonePalette, value: e.currentColor.color }, on: { "update:value": e.onChangeSkinTone } }, [t("NcButton", { attrs: { "aria-label": e.t("Skin tone"), type: "tertiary-no-background" }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
225
|
+
return [t("IconCircle", { style: { color: e.currentColor.color }, attrs: { title: e.currentColor.name, size: 20 } })];
|
|
224
226
|
}, proxy: !0 }], null, !0) })], 1)], 1)];
|
|
225
227
|
} }, e.allowUnselect && e.selectedEmoji ? { key: "customCategory", fn: function() {
|
|
226
|
-
return [
|
|
228
|
+
return [t("div", { staticClass: "emoji-mart-category-label" }, [t("h3", { staticClass: "emoji-mart-category-label" }, [e._v(" " + e._s(e.t("Selected")) + " ")])]), t("Emoji", { staticClass: "emoji-selected", attrs: { data: e.emojiIndex, emoji: e.selectedEmoji, native: !0, size: 32 }, on: { click: e.unselect } }), t("Emoji", { staticClass: "emoji-delete", attrs: { data: e.emojiIndex, emoji: ":x:", native: !0, size: 10 }, on: { click: e.unselect } })];
|
|
227
229
|
}, proxy: !0 } : null], null, !0) }, "Picker", e.$attrs, !1))], 1);
|
|
228
230
|
}, N = [], P = /* @__PURE__ */ f.normalizeComponent(
|
|
229
231
|
j,
|