@nextcloud/vue 8.31.0 → 8.33.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 +34 -0
- package/dist/Components/NcActionButton.cjs +1 -1
- package/dist/Components/NcActionButton.mjs +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCheckbox.cjs +1 -1
- package/dist/Components/NcActionCheckbox.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +2 -2
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +2 -2
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +1 -1
- package/dist/Components/NcActionRadio.mjs +1 -1
- package/dist/Components/NcActionRouter.cjs +2 -2
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +2 -2
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +2 -2
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +2 -2
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/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/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +2 -63
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +2 -63
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSettingsSectionShortcuts.cjs +4 -0
- package/dist/Components/NcAppSettingsSectionShortcuts.cjs.map +1 -0
- package/dist/Components/NcAppSettingsSectionShortcuts.mjs +5 -0
- package/dist/Components/NcAppSettingsSectionShortcuts.mjs.map +1 -0
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAssistantButton.cjs +1 -1
- package/dist/Components/NcAssistantButton.mjs +1 -1
- package/dist/Components/NcAssistantIcon.cjs +1 -1
- package/dist/Components/NcAssistantIcon.mjs +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 +1 -1
- package/dist/Components/NcButton.mjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +8 -8
- package/dist/Components/NcChip.cjs.map +1 -1
- package/dist/Components/NcChip.mjs +8 -8
- package/dist/Components/NcChip.mjs.map +1 -1
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/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/NcDateTimePicker.cjs +9 -9
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +9 -9
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +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/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +13 -7
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +13 -7
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcHeaderButton.cjs +1 -1
- package/dist/Components/NcHeaderButton.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcHotkey.cjs +4 -0
- package/dist/Components/NcHotkey.cjs.map +1 -0
- package/dist/Components/NcHotkey.mjs +5 -0
- package/dist/Components/NcHotkey.mjs.map +1 -0
- package/dist/Components/NcHotkeyList.cjs +4 -0
- package/dist/Components/NcHotkeyList.cjs.map +1 -0
- package/dist/Components/NcHotkeyList.mjs +5 -0
- package/dist/Components/NcHotkeyList.mjs.map +1 -0
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.mjs +1 -1
- package/dist/Components/NcKbd.cjs +2 -63
- package/dist/Components/NcKbd.cjs.map +1 -1
- package/dist/Components/NcKbd.mjs +2 -63
- package/dist/Components/NcKbd.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/NcModal.cjs +26 -12
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +26 -12
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcRadioGroupButton.cjs +1 -1
- package/dist/Components/NcRadioGroupButton.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 +1 -1
- package/dist/Components/NcRichText.cjs +2 -2
- package/dist/Components/NcRichText.mjs +3 -3
- 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/NcSelectUsers.cjs +1 -1
- package/dist/Components/NcSelectUsers.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/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/Composables/useFormatDateTime.cjs +1 -1
- package/dist/Composables/useFormatDateTime.mjs +1 -1
- package/dist/Composables/useHotKey.cjs.map +1 -1
- package/dist/Composables/useHotKey.mjs.map +1 -1
- package/dist/Composables/useIsMobile.cjs.map +1 -1
- package/dist/Composables/useIsMobile.mjs.map +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +2 -2
- package/dist/Functions/usernameToColor.cjs.map +1 -1
- package/dist/Functions/usernameToColor.mjs +2 -2
- package/dist/Functions/usernameToColor.mjs.map +1 -1
- package/dist/Mixins/isMobile.cjs.map +1 -1
- package/dist/Mixins/isMobile.mjs.map +1 -1
- package/dist/assets/{NcActionButton-DwJihiLc.css → NcActionButton-CG4V9b5b.css} +18 -18
- package/dist/assets/{NcActionCheckbox-DvdNISIs.css → NcActionCheckbox-C8I_k6NA.css} +12 -12
- package/dist/assets/{NcActionInput-DXZaAilC.css → NcActionInput-BvPYSqDP.css} +65 -65
- package/dist/assets/{NcActionLink-7Wp6P-Nk.css → NcActionLink-BtpJIbvI.css} +13 -13
- package/dist/assets/{NcActionRadio-CLsR2Ore.css → NcActionRadio-CLIRNp3t.css} +12 -12
- package/dist/assets/{NcActionRouter-ByijfQtF.css → NcActionRouter-Bpv5Ywxq.css} +16 -16
- package/dist/assets/{NcActionText-CR_yvwWo.css → NcActionText-IMOkntPi.css} +18 -18
- package/dist/assets/{NcActionTextEditable-CCWTiT5c.css → NcActionTextEditable-BCmDMuUg.css} +65 -65
- package/dist/assets/{NcAppContent-DerHKU6P.css → NcAppContent-Ri_iNfn5.css} +23 -23
- package/dist/assets/{NcAppNavigation-R4E_wTZ-.css → NcAppNavigation-Bg4Oe7WC.css} +12 -12
- package/dist/assets/{NcAppNavigationItem-Kua1hP7u.css → NcAppNavigationItem-DSL2nLRf.css} +36 -36
- package/dist/assets/{NcAppNavigationNewItem-Cjbn5XkO.css → NcAppNavigationNewItem-CYSjj3pD.css} +38 -38
- package/dist/assets/NcAppNavigationSettings-2Wh1E3Hq.css +53 -0
- package/dist/assets/{NcAppSettingsDialog-DiJpVNeb.css → NcAppSettingsDialog-2axspyf-.css} +10 -10
- package/dist/assets/{NcAppSettingsSection-IzrCzLDw.css → NcAppSettingsSection-CLSVNQzv.css} +3 -3
- package/dist/assets/NcAppSettingsSectionShortcuts-BuI-s4kd.css +27 -0
- package/dist/assets/{NcAppSidebar-CJYtNcF0.css → NcAppSidebar-Bd2cj1W-.css} +44 -44
- package/dist/assets/{NcAvatar-BdAXbXdR.css → NcAvatar-Cm4kVIfS.css} +24 -24
- package/dist/assets/{NcButton-D8AOCliw.css → NcButton-uQUvp7DS.css} +46 -46
- package/dist/assets/{NcChip-Cc17FJEC.css → NcChip-ByvuZS2-.css} +23 -11
- package/dist/assets/{NcCollectionList-DInDhsAS.css → NcCollectionList-hRgvNUMR.css} +15 -15
- package/dist/assets/{NcColorPicker-CGI9ElwB.css → NcColorPicker-CCqpXoam.css} +43 -35
- package/dist/assets/{NcContent-BedDNXST.css → NcContent-IIXgAj_u.css} +10 -10
- package/dist/assets/{NcDateTimePicker-4Zw7r2r4.css → NcDateTimePicker-BmMuUpwr.css} +27 -27
- package/dist/assets/{NcEmojiPicker-CrjOSMLF.css → NcEmojiPicker-B-iLLj37.css} +122 -122
- package/dist/assets/{NcEmptyContent-xdTcF0yQ.css → NcEmptyContent-CUFc_Dds.css} +9 -9
- package/dist/assets/{NcHeaderButton-CeT-dsLr.css → NcHeaderButton-DI-1Gsph.css} +9 -9
- package/dist/assets/{NcHeaderMenu-BXb9npZp.css → NcHeaderMenu-BkpmEa3M.css} +13 -13
- package/dist/assets/NcHotkey-QklVKSyr.css +44 -0
- package/dist/assets/NcHotkeyList-B42a0d8Z.css +9 -0
- package/dist/assets/{NcInputField-BI3vWgSo.css → NcInputField-CtUAgq1i.css} +42 -42
- package/dist/assets/{NcModal-BzkYPomo.css → NcModal-4ZPVUmG2.css} +62 -62
- package/dist/assets/{NcRadioGroupButton-B1hPj4B8.css → NcRadioGroupButton-qxDfssOp.css} +16 -15
- package/dist/assets/{NcRelatedResourcesPanel-d2OxhjiL.css → NcRelatedResourcesPanel-BgMc8bue.css} +17 -17
- package/dist/assets/{NcRichContenteditable-BoM95AVW.css → NcRichContenteditable-CO5ziuZO.css} +12 -12
- package/dist/assets/{NcRichText-BDx2fupZ.css → NcRichText-BpXupu1n.css} +88 -89
- package/dist/assets/{referencePickerModal-CTpc6_U6.css → referencePickerModal-CGtNx7ew.css} +6 -6
- package/dist/chunks/{NcActionButton-CVW8aRkE.mjs → NcActionButton-CD1Z-o2Y.mjs} +4 -4
- package/dist/chunks/{NcActionButton-CVW8aRkE.mjs.map → NcActionButton-CD1Z-o2Y.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-CFXzNoFT.cjs → NcActionButton-DSq_luox.cjs} +4 -4
- package/dist/chunks/{NcActionButton-CFXzNoFT.cjs.map → NcActionButton-DSq_luox.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs → NcActionButtonGroup-Bd-SOAHU.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs.map → NcActionButtonGroup-Bd-SOAHU.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs → NcActionButtonGroup-DKVCsZhH.cjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs.map → NcActionButtonGroup-DKVCsZhH.cjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs → NcActionCheckbox-D9aQuEYw.mjs} +3 -3
- package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs.map → NcActionCheckbox-D9aQuEYw.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs → NcActionCheckbox-ixZtnZR4.cjs} +3 -3
- package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs.map → NcActionCheckbox-ixZtnZR4.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs → NcActionInput-BMUreHhp.cjs} +7 -7
- package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs.map → NcActionInput-BMUreHhp.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-CoG-fZq9.mjs → NcActionInput-D4MLI-0P.mjs} +7 -7
- package/dist/chunks/{NcActionInput-CoG-fZq9.mjs.map → NcActionInput-D4MLI-0P.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs → NcActionRadio-BmVR-lhZ.mjs} +3 -3
- package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs.map → NcActionRadio-BmVR-lhZ.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs → NcActionRadio-DPF0_wH9.cjs} +3 -3
- package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs.map → NcActionRadio-DPF0_wH9.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs → NcActionTextEditable-5mNFl7Jm.mjs} +4 -4
- package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs.map → NcActionTextEditable-5mNFl7Jm.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-BpahzGpr.cjs → NcActionTextEditable-C8B1qqqe.cjs} +4 -4
- package/dist/chunks/NcActionTextEditable-C8B1qqqe.cjs.map +1 -0
- package/dist/chunks/{NcActions-C832pWHO.mjs → NcActions-BvFVkIzX.mjs} +4 -4
- package/dist/chunks/{NcActions-C832pWHO.mjs.map → NcActions-BvFVkIzX.mjs.map} +1 -1
- package/dist/chunks/{NcActions-B7oXbiVt.cjs → NcActions-CF9VxHHD.cjs} +4 -4
- package/dist/chunks/{NcActions-B7oXbiVt.cjs.map → NcActions-CF9VxHHD.cjs.map} +1 -1
- package/dist/chunks/{NcAppContent-Djy38ou2.cjs → NcAppContent-BSyhjn2J.cjs} +20 -25
- package/dist/chunks/NcAppContent-BSyhjn2J.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-C9NGJE6n.mjs → NcAppContent-C7hwN-sU.mjs} +20 -25
- package/dist/chunks/NcAppContent-C7hwN-sU.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs → NcAppNavigation-B2cKVKBH.mjs} +4 -4
- package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs.map → NcAppNavigation-B2cKVKBH.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs → NcAppNavigation-DApCpI_F.cjs} +4 -4
- package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs.map → NcAppNavigation-DApCpI_F.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs → NcAppNavigationCaption-BOHmVyQb.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs.map → NcAppNavigationCaption-BOHmVyQb.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs → NcAppNavigationCaption-bTauZtcw.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs.map → NcAppNavigationCaption-bTauZtcw.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs → NcAppNavigationItem-DbtR6u7Y.cjs} +9 -9
- package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs.map → NcAppNavigationItem-DbtR6u7Y.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs → NcAppNavigationItem-geCwhCsd.mjs} +9 -9
- package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs.map → NcAppNavigationItem-geCwhCsd.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs → NcAppNavigationNew-BHzvRlVc.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs.map → NcAppNavigationNew-BHzvRlVc.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs → NcAppNavigationNew-BYvFykgl.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs.map → NcAppNavigationNew-BYvFykgl.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs → NcAppNavigationNewItem-Dqnwa8Gl.cjs} +4 -4
- package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs.map → NcAppNavigationNewItem-Dqnwa8Gl.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs → NcAppNavigationNewItem-Yy56yPrn.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs.map → NcAppNavigationNewItem-Yy56yPrn.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs → NcAppNavigationSearch-WfL4IPD8.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs.map → NcAppNavigationSearch-WfL4IPD8.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs → NcAppNavigationSearch-pMlFjm9w.cjs} +4 -4
- package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs.map → NcAppNavigationSearch-pMlFjm9w.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-Dq2O3kRz.mjs → NcAppNavigationSettings-BhK7vlfP.mjs} +16 -10
- package/dist/chunks/NcAppNavigationSettings-BhK7vlfP.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-CkFZMLtH.cjs → NcAppNavigationSettings-C6qjJ3hF.cjs} +16 -10
- package/dist/chunks/NcAppNavigationSettings-C6qjJ3hF.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs → NcAppNavigationToggle-8lSuagjd.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs.map → NcAppNavigationToggle-8lSuagjd.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs → NcAppNavigationToggle-DlnxjlcH.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs.map → NcAppNavigationToggle-DlnxjlcH.mjs.map} +1 -1
- package/dist/chunks/NcAppSettingsDialog--RlMIfbo.cjs +132 -0
- package/dist/chunks/NcAppSettingsDialog--RlMIfbo.cjs.map +1 -0
- package/dist/chunks/NcAppSettingsDialog-8YaW7ud3.mjs +130 -0
- package/dist/chunks/NcAppSettingsDialog-8YaW7ud3.mjs.map +1 -0
- package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs +53 -0
- package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs.map +1 -0
- package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs +52 -0
- package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs.map +1 -0
- package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs +42 -0
- package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs.map +1 -0
- package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs +43 -0
- package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs → NcAppSidebar-DLb6ALHL.cjs} +7 -7
- package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs.map → NcAppSidebar-DLb6ALHL.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs → NcAppSidebar-f7tuofzM.mjs} +7 -7
- package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs.map → NcAppSidebar-f7tuofzM.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs → NcAssistantButton-BMzPE7WA.cjs} +4 -4
- package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs.map → NcAssistantButton-BMzPE7WA.cjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs → NcAssistantButton-enexPvoC.mjs} +4 -4
- package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs.map → NcAssistantButton-enexPvoC.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs → NcAssistantIcon-DfVd2zWt.cjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs.map → NcAssistantIcon-DfVd2zWt.cjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs → NcAssistantIcon-XwQFzBgA.mjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs.map → NcAssistantIcon-XwQFzBgA.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-bd-5zXWN.cjs → NcAvatar-BwioPrbY.cjs} +13 -13
- package/dist/chunks/NcAvatar-BwioPrbY.cjs.map +1 -0
- package/dist/chunks/{NcAvatar-CuYtFEdJ.mjs → NcAvatar-DwUmx6Fg.mjs} +13 -13
- package/dist/chunks/NcAvatar-DwUmx6Fg.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs → NcBreadcrumb-B-zWjBNp.cjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs.map → NcBreadcrumb-B-zWjBNp.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs → NcBreadcrumb-ljdZbX7p.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs.map → NcBreadcrumb-ljdZbX7p.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs → NcBreadcrumbs-B6tPEu9b.cjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs.map → NcBreadcrumbs-B6tPEu9b.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs → NcBreadcrumbs-D2DtX3XC.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs.map → NcBreadcrumbs-D2DtX3XC.mjs.map} +1 -1
- package/dist/chunks/{NcButton-DOsCAjiE.cjs → NcButton-CJBZrdiL.cjs} +6 -5
- package/dist/chunks/{NcButton-CWPBzbcC.mjs.map → NcButton-CJBZrdiL.cjs.map} +1 -1
- package/dist/chunks/{NcButton-CWPBzbcC.mjs → NcButton-DUZTtFhr.mjs} +6 -5
- package/dist/chunks/{NcButton-DOsCAjiE.cjs.map → NcButton-DUZTtFhr.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs → NcCheckboxRadioSwitch-NPJuwzqS.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs.map → NcCheckboxRadioSwitch-NPJuwzqS.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs → NcCheckboxRadioSwitch-wSD3hWxs.cjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs.map → NcCheckboxRadioSwitch-wSD3hWxs.cjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs → NcCollectionList-Br6V_EiM.cjs} +15 -15
- package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs.map → NcCollectionList-Br6V_EiM.cjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs → NcCollectionList-D85QdobI.mjs} +15 -15
- package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs.map → NcCollectionList-D85QdobI.mjs.map} +1 -1
- package/dist/chunks/NcColorPicker-BoS26yac.mjs +137 -0
- package/dist/chunks/NcColorPicker-BoS26yac.mjs.map +1 -0
- package/dist/chunks/NcColorPicker-Dg3d5_aQ.cjs +136 -0
- package/dist/chunks/NcColorPicker-Dg3d5_aQ.cjs.map +1 -0
- package/dist/chunks/{NcContent-I3cwZc0Z.cjs → NcContent-BbPae-OV.cjs} +5 -5
- package/dist/chunks/{NcContent-I3cwZc0Z.cjs.map → NcContent-BbPae-OV.cjs.map} +1 -1
- package/dist/chunks/{NcContent-CGBJ782F.mjs → NcContent-D8OFKv52.mjs} +5 -5
- package/dist/chunks/{NcContent-CGBJ782F.mjs.map → NcContent-D8OFKv52.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs → NcDashboardWidget-SSlGHcII.mjs} +5 -5
- package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs.map → NcDashboardWidget-SSlGHcII.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs → NcDashboardWidget-mEPmvuR0.cjs} +5 -5
- package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs.map → NcDashboardWidget-mEPmvuR0.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs → NcDashboardWidgetItem-BqlNJI6a.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs.map → NcDashboardWidgetItem-BqlNJI6a.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs → NcDashboardWidgetItem-C7AmqxH4.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs.map → NcDashboardWidgetItem-C7AmqxH4.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-Du-BeUCp.mjs → NcDialog-Bg0hY6TP.mjs} +2 -2
- package/dist/chunks/{NcDialog-Du-BeUCp.mjs.map → NcDialog-Bg0hY6TP.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-B2tW1DtP.cjs → NcDialog-D020rlVy.cjs} +2 -2
- package/dist/chunks/{NcDialog-B2tW1DtP.cjs.map → NcDialog-D020rlVy.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-BB84DliS.cjs → NcDialogButton-8JhFaC5X.cjs} +4 -4
- package/dist/chunks/{NcDialogButton-BB84DliS.cjs.map → NcDialogButton-8JhFaC5X.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-DtGSMhif.mjs → NcDialogButton-DSrC6lFd.mjs} +4 -4
- package/dist/chunks/{NcDialogButton-DtGSMhif.mjs.map → NcDialogButton-DSrC6lFd.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-B2SLfIBu.mjs → NcEmojiPicker-CAphjgaf.mjs} +10 -10
- package/dist/chunks/NcEmojiPicker-CAphjgaf.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-q_n1Rd8U.cjs → NcEmojiPicker-DwXhWYHY.cjs} +16 -16
- package/dist/chunks/NcEmojiPicker-DwXhWYHY.cjs.map +1 -0
- package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs → NcHeaderButton-6kuTEKbj.cjs} +4 -4
- package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs.map → NcHeaderButton-6kuTEKbj.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs → NcHeaderButton-TgPjfPtk.mjs} +4 -4
- package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs.map → NcHeaderButton-TgPjfPtk.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs → NcHeaderMenu-CwjH_j0c.cjs} +4 -4
- package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs.map → NcHeaderMenu-CwjH_j0c.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs → NcHeaderMenu-Hk8OTuma.mjs} +4 -4
- package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs.map → NcHeaderMenu-Hk8OTuma.mjs.map} +1 -1
- package/dist/chunks/NcHotkey-BVMf1V89.mjs +60 -0
- package/dist/chunks/NcHotkey-BVMf1V89.mjs.map +1 -0
- package/dist/chunks/NcHotkey-CUPH5u09.cjs +59 -0
- package/dist/chunks/NcHotkey-CUPH5u09.cjs.map +1 -0
- package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs +47 -0
- package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs.map +1 -0
- package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs +48 -0
- package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs → NcInputConfirmCancel-Bk_FQ5aA.cjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs.map → NcInputConfirmCancel-Bk_FQ5aA.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs → NcInputConfirmCancel-XPlRewAN.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs.map → NcInputConfirmCancel-XPlRewAN.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-Dry3uU_8.cjs → NcInputField-DAllLk3X.cjs} +7 -10
- package/dist/chunks/NcInputField-DAllLk3X.cjs.map +1 -0
- package/dist/chunks/{NcInputField-kKgY_2GV.mjs → NcInputField-DUtDY_1I.mjs} +7 -10
- package/dist/chunks/NcInputField-DUtDY_1I.mjs.map +1 -0
- package/dist/chunks/NcKbd-BdW5UbhW.mjs +66 -0
- package/dist/chunks/NcKbd-BdW5UbhW.mjs.map +1 -0
- package/dist/chunks/NcKbd-CVBh8nyU.cjs +65 -0
- package/dist/chunks/NcKbd-CVBh8nyU.cjs.map +1 -0
- package/dist/chunks/{NcListItem-D_-a7WR9.cjs → NcListItem-D3HiK7ra.cjs} +2 -2
- package/dist/chunks/{NcListItem-D_-a7WR9.cjs.map → NcListItem-D3HiK7ra.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-B3ETbT9w.mjs → NcListItem-YVemqwZ_.mjs} +2 -2
- package/dist/chunks/{NcListItem-B3ETbT9w.mjs.map → NcListItem-YVemqwZ_.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs → NcListItemIcon-BKwmcXnO.mjs} +2 -2
- package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs.map → NcListItemIcon-BKwmcXnO.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs → NcListItemIcon-DL1VwHvL.cjs} +2 -2
- package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs.map → NcListItemIcon-DL1VwHvL.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs → NcPasswordField-BeEYmL5N.cjs} +3 -3
- package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs.map → NcPasswordField-BeEYmL5N.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs → NcPasswordField-CujpFQHq.mjs} +3 -3
- package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs.map → NcPasswordField-CujpFQHq.mjs.map} +1 -1
- package/dist/chunks/{NcPopover-DkX3Esbr.cjs → NcPopover-BgUZkmjk.cjs} +3 -3
- package/dist/chunks/{NcPopover-DkX3Esbr.cjs.map → NcPopover-BgUZkmjk.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-DMUA5d7U.mjs → NcPopover-gxcAqoEb.mjs} +3 -3
- package/dist/chunks/{NcPopover-DMUA5d7U.mjs.map → NcPopover-gxcAqoEb.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs → NcRadioGroupButton-CD4tkF_s.mjs} +7 -7
- package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs.map → NcRadioGroupButton-CD4tkF_s.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs → NcRadioGroupButton-DrqgN-8C.cjs} +7 -7
- package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs.map → NcRadioGroupButton-DrqgN-8C.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-jvOEQWWO.mjs → NcRelatedResourcesPanel-BTyqVb_E.mjs} +12 -12
- package/dist/chunks/NcRelatedResourcesPanel-BTyqVb_E.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-jHQ2bRko.cjs → NcRelatedResourcesPanel-CO6jajKF.cjs} +13 -13
- package/dist/chunks/NcRelatedResourcesPanel-CO6jajKF.cjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs → NcRichContenteditable-BivvoSO5.mjs} +13 -12
- package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs.map → NcRichContenteditable-BivvoSO5.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs → NcRichContenteditable-BjxmdpS0.cjs} +13 -12
- package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs.map → NcRichContenteditable-BjxmdpS0.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-DYcfsH5s.cjs → NcRichText-DoQg3Lha.cjs} +7 -7
- package/dist/chunks/NcRichText-DoQg3Lha.cjs.map +1 -0
- package/dist/chunks/{NcRichText-B7M7rNqC.mjs → NcRichText-Dy5By94Y.mjs} +7 -7
- package/dist/chunks/NcRichText-Dy5By94Y.mjs.map +1 -0
- package/dist/chunks/{NcSelect-s3_u0qvy.cjs → NcSelect-Bw8EG_xU.cjs} +4 -4
- package/dist/chunks/{NcSelect-s3_u0qvy.cjs.map → NcSelect-Bw8EG_xU.cjs.map} +1 -1
- package/dist/chunks/{NcSelect-PvjbF3jF.mjs → NcSelect-QVd6uJPA.mjs} +4 -4
- package/dist/chunks/{NcSelect-PvjbF3jF.mjs.map → NcSelect-QVd6uJPA.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-DYUCDZ_e.mjs → NcSelectTags-D-22teKJ.mjs} +6 -6
- package/dist/chunks/NcSelectTags-D-22teKJ.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-e4Gjcx_7.cjs → NcSelectTags-aGwTgIM-.cjs} +6 -6
- package/dist/chunks/NcSelectTags-aGwTgIM-.cjs.map +1 -0
- package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs → NcSelectUsers-DR6-q1aK.mjs} +5 -5
- package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs.map → NcSelectUsers-DR6-q1aK.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs → NcSelectUsers-Qhrizan5.cjs} +5 -5
- package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs.map → NcSelectUsers-Qhrizan5.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs → NcSettingsInputText-O8870Grr.cjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs.map → NcSettingsInputText-O8870Grr.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs → NcSettingsInputText-Q8DDr-Yj.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs.map → NcSettingsInputText-Q8DDr-Yj.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs → NcSettingsSection-DKpzo7eI.cjs} +2 -2
- package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs.map → NcSettingsSection-DKpzo7eI.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs → NcSettingsSection-VxcVEF8L.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs.map → NcSettingsSection-VxcVEF8L.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs → NcSettingsSelectGroup-BQWwtSEb.cjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs.map → NcSettingsSelectGroup-BQWwtSEb.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs → NcSettingsSelectGroup-CZ0EjeJb.mjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs.map → NcSettingsSelectGroup-CZ0EjeJb.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-Cp3tulze.cjs → NcTextField-52Fnd27A.cjs} +5 -5
- package/dist/chunks/{NcTextField-Cp3tulze.cjs.map → NcTextField-52Fnd27A.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-D_IMz2MR.mjs → NcTextField-CVfixgfj.mjs} +5 -5
- package/dist/chunks/{NcTextField-D_IMz2MR.mjs.map → NcTextField-CVfixgfj.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs → NcTimezonePicker-BInLNCSt.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs.map → NcTimezonePicker-BInLNCSt.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs → NcTimezonePicker-CtFsF-jG.cjs} +4 -4
- package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs.map → NcTimezonePicker-CtFsF-jG.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs → NcUserBubble-ByvVV8jh.cjs} +3 -3
- package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs.map → NcUserBubble-ByvVV8jh.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs → NcUserBubble-sIUM-Rru.mjs} +3 -3
- package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs.map → NcUserBubble-sIUM-Rru.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs → NcUserStatusIcon-CYsrjxDh.cjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs.map → NcUserStatusIcon-CYsrjxDh.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs → NcUserStatusIcon-DZI9jlXE.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs.map → NcUserStatusIcon-DZI9jlXE.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs → ScopeComponent-BCznIxFT.cjs} +2 -2
- package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs.map → ScopeComponent-BCznIxFT.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-305QOaqN.mjs → ScopeComponent-CNZ_b7IG.mjs} +2 -2
- package/dist/chunks/{ScopeComponent-305QOaqN.mjs.map → ScopeComponent-CNZ_b7IG.mjs.map} +1 -1
- package/dist/chunks/{_l10n-BEfeU7gr.mjs → _l10n-BWisB7-O.mjs} +67 -71
- package/dist/chunks/_l10n-BWisB7-O.mjs.map +1 -0
- package/dist/chunks/{_l10n-DM-VRK9x.cjs → _l10n-eOBJ3Dwl.cjs} +23 -27
- package/dist/chunks/{_l10n-DM-VRK9x.cjs.map → _l10n-eOBJ3Dwl.cjs.map} +1 -1
- package/dist/chunks/{GenColors-BVouTbTJ.cjs → colors-BsDQ1Yz3.cjs} +40 -46
- package/dist/chunks/colors-BsDQ1Yz3.cjs.map +1 -0
- package/dist/chunks/{GenColors-DIH749TS.mjs → colors-D3xlq-id.mjs} +41 -47
- package/dist/chunks/colors-D3xlq-id.mjs.map +1 -0
- package/dist/chunks/{mdi-DXu6GWVJ.mjs → mdi-CKSXwCsV.mjs} +8 -6
- package/dist/chunks/{mdi-DXu6GWVJ.mjs.map → mdi-CKSXwCsV.mjs.map} +1 -1
- package/dist/chunks/{mdi-BBwE-MZC.cjs → mdi-Nhb6SBw8.cjs} +3 -1
- package/dist/chunks/{mdi-BBwE-MZC.cjs.map → mdi-Nhb6SBw8.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-CN4C9eDc.mjs → referencePickerModal-Cl3fIc9s.mjs} +11 -11
- package/dist/chunks/referencePickerModal-Cl3fIc9s.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-BcAnnsxZ.cjs → referencePickerModal-Dz1h1EHq.cjs} +11 -11
- package/dist/chunks/referencePickerModal-Dz1h1EHq.cjs.map +1 -0
- package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs +9 -0
- package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -0
- package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs +10 -0
- package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -0
- package/dist/chunks/useModelMigration-D5zhrNXr.cjs.map +1 -1
- package/dist/chunks/useModelMigration-EhAWvqDD.mjs.map +1 -1
- package/dist/components/NcAppSettingsDialog/index.d.ts +5 -0
- package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +25 -0
- package/dist/components/NcAppSettingsSection/index.d.ts +5 -0
- package/dist/components/NcAppSettingsSectionShortcuts/index.d.ts +1 -0
- package/dist/components/NcColorPicker/index.d.ts +5 -0
- package/dist/components/NcHotkey/index.d.ts +1 -0
- package/dist/components/NcHotkeyList/index.d.ts +1 -0
- package/dist/composables/index.d.ts +9 -0
- package/dist/composables/useHotKey/index.d.ts +4 -2
- package/dist/composables/useIsMobile/index.d.ts +23 -0
- package/dist/composables/useModelMigration.d.ts +1 -1
- package/dist/index.cjs +66 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +65 -56
- package/dist/index.mjs.map +1 -1
- package/dist/utils/colors.d.ts +36 -0
- package/package.json +15 -16
- package/dist/assets/NcAppNavigationSettings-1YRzh-xl.css +0 -74
- package/dist/chunks/GenColors-BVouTbTJ.cjs.map +0 -1
- package/dist/chunks/GenColors-DIH749TS.mjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-BpahzGpr.cjs.map +0 -1
- package/dist/chunks/NcAppContent-C9NGJE6n.mjs.map +0 -1
- package/dist/chunks/NcAppContent-Djy38ou2.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-CkFZMLtH.cjs.map +0 -1
- package/dist/chunks/NcAppNavigationSettings-Dq2O3kRz.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs +0 -223
- package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs +0 -225
- package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs.map +0 -1
- package/dist/chunks/NcAvatar-CuYtFEdJ.mjs.map +0 -1
- package/dist/chunks/NcAvatar-bd-5zXWN.cjs.map +0 -1
- package/dist/chunks/NcColorPicker-Cae6XNoK.mjs +0 -255
- package/dist/chunks/NcColorPicker-Cae6XNoK.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs +0 -254
- package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-B2SLfIBu.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-q_n1Rd8U.cjs.map +0 -1
- package/dist/chunks/NcInputField-Dry3uU_8.cjs.map +0 -1
- package/dist/chunks/NcInputField-kKgY_2GV.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-jHQ2bRko.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-jvOEQWWO.mjs.map +0 -1
- package/dist/chunks/NcRichText-B7M7rNqC.mjs.map +0 -1
- package/dist/chunks/NcRichText-DYcfsH5s.cjs.map +0 -1
- package/dist/chunks/NcSelectTags-DYUCDZ_e.mjs.map +0 -1
- package/dist/chunks/NcSelectTags-e4Gjcx_7.cjs.map +0 -1
- package/dist/chunks/_l10n-BEfeU7gr.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-BcAnnsxZ.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-CN4C9eDc.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialog-Du-BeUCp.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\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\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal\n\t\tv-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<component\n\t\t\t:is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" class=\"dialog__wrapper\" :class=\"{ '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\n\t\t\t\t\tv-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\n\t\t\t\t\t\tv-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=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\nimport NcModal from '../NcModal/index.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((element) => typeof element === 'string' || element instanceof HTMLElement)\n\t\t\t\t)\n\t\t\t},\n\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 *\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 *\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t *\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 *\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 * Do not show the close button for the dialog.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\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 *\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\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 * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\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 *\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 additional classes which will be set on the navigation for custom styling\n\t\t *\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 additional classes which will be set on the content wrapper for custom styling\n\t\t *\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 additional 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 *\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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t *\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 = 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\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\t\tsubmit(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\t\temit('submit', event)\n\t\t\t\t\t},\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t\t */\n\t\t\t\t\treset(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t\t */\n\t\t\t\t\t\temit('reset', event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t: {})\n\n\t\t/**\n\t\t * If the underlying 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\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif ((button.type === 'submit' || button.nativeType === 'submit')\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\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\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tfunction handleClosing(result) {\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\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tfunction 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\tnoClose: props.noClose || !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\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\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\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\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\tfont-size: 21px;\n\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: 0 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\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\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":[],"mappings":";;;;;;AA6QA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;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,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA,MAAA,CAAA,YAAA,OAAA,YAAA,YAAA,mBAAA,WAAA;AAAA,MAEA;AAAA,MAEA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA;AAAA,MAEA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAA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A,UACA,CAAA,cAAA,MAAA,kBAAA;AACA;AAAA,MACA;AACA,oBAAA,MAAA;AACA,aAAA,WAAA,MAAA,aAAA,GAAA,GAAA;AAAA,IACA;AAOA,aAAA,cAAA,QAAA;AACA,gBAAA,QAAA;AAMA,WAAA,WAAA,MAAA;AAAA,IACA;AAKA,aAAA,eAAA;AACA,gBAAA,QAAA;AAIA,WAAA,eAAA,KAAA;AAAA,IACA;AAKA,UAAA,aAAA,SAAA,OAAA;AAAA,MACA,SAAA,MAAA,WAAA,CAAA,MAAA;AAAA,MACA,WAAA,MAAA,cAAA,SAAA,SAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAIA,SAAA;AAAA,MACA,MAAA,MAAA;AAAA,MACA,MAAA,MAAA,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDialog-Bg0hY6TP.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\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\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal\n\t\tv-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<component\n\t\t\t:is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" class=\"dialog__wrapper\" :class=\"{ '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\n\t\t\t\t\tv-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\n\t\t\t\t\t\tv-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=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\nimport NcModal from '../NcModal/index.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((element) => typeof element === 'string' || element instanceof HTMLElement)\n\t\t\t\t)\n\t\t\t},\n\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 *\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 *\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t *\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 *\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 * Do not show the close button for the dialog.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\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 *\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\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 * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\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 *\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 additional classes which will be set on the navigation for custom styling\n\t\t *\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 additional classes which will be set on the content wrapper for custom styling\n\t\t *\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 additional 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 *\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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t *\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 = 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\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\t\tsubmit(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\t\temit('submit', event)\n\t\t\t\t\t},\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t\t */\n\t\t\t\t\treset(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t\t */\n\t\t\t\t\t\temit('reset', event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t: {})\n\n\t\t/**\n\t\t * If the underlying 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\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif ((button.type === 'submit' || button.nativeType === 'submit')\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\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\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tfunction handleClosing(result) {\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\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tfunction 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\tnoClose: props.noClose || !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\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\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\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\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\tfont-size: 21px;\n\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: 0 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\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\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":[],"mappings":";;;;;;AA6QA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,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AA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ require('../assets/NcDialog-COuFb47k.css');
|
|
|
3
3
|
const core = require("@vueuse/core");
|
|
4
4
|
const Vue = require("vue");
|
|
5
5
|
const GenRandomId = require("./GenRandomId-D7iOvpZS.cjs");
|
|
6
|
-
const NcDialogButton = require("./NcDialogButton-
|
|
6
|
+
const NcDialogButton = require("./NcDialogButton-8JhFaC5X.cjs");
|
|
7
7
|
const Components_NcModal = require("../Components/NcModal.cjs");
|
|
8
8
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
9
9
|
const _sfc_main = Vue.defineComponent({
|
|
@@ -286,4 +286,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
286
286
|
);
|
|
287
287
|
const NcDialog = __component__.exports;
|
|
288
288
|
exports.NcDialog = NcDialog;
|
|
289
|
-
//# sourceMappingURL=NcDialog-
|
|
289
|
+
//# sourceMappingURL=NcDialog-D020rlVy.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialog-B2tW1DtP.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\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\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal\n\t\tv-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<component\n\t\t\t:is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" class=\"dialog__wrapper\" :class=\"{ '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\n\t\t\t\t\tv-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\n\t\t\t\t\t\tv-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=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\nimport NcModal from '../NcModal/index.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((element) => typeof element === 'string' || element instanceof HTMLElement)\n\t\t\t\t)\n\t\t\t},\n\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 *\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 *\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t *\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 *\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 * Do not show the close button for the dialog.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\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 *\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\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 * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\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 *\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 additional classes which will be set on the navigation for custom styling\n\t\t *\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 additional classes which will be set on the content wrapper for custom styling\n\t\t *\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 additional 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 *\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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t *\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 = 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\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\t\tsubmit(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\t\temit('submit', event)\n\t\t\t\t\t},\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t\t */\n\t\t\t\t\treset(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t\t */\n\t\t\t\t\t\temit('reset', event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t: {})\n\n\t\t/**\n\t\t * If the underlying 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\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif ((button.type === 'submit' || button.nativeType === 'submit')\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\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\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tfunction handleClosing(result) {\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\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tfunction 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\tnoClose: props.noClose || !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\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\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\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\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\tfont-size: 21px;\n\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: 0 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\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\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":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AA6QA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAAA;AAAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;A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,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDialog-D020rlVy.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\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\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal\n\t\tv-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<component\n\t\t\t:is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" class=\"dialog__wrapper\" :class=\"{ '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\n\t\t\t\t\tv-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\n\t\t\t\t\t\tv-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=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\nimport NcModal from '../NcModal/index.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((element) => typeof element === 'string' || element instanceof HTMLElement)\n\t\t\t\t)\n\t\t\t},\n\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 *\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 *\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t *\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 *\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 * Do not show the close button for the dialog.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\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 *\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\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 * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\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 *\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 additional classes which will be set on the navigation for custom styling\n\t\t *\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 additional classes which will be set on the content wrapper for custom styling\n\t\t *\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 additional 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 *\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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t *\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 = 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\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\t\tsubmit(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\t\temit('submit', event)\n\t\t\t\t\t},\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t\t */\n\t\t\t\t\treset(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t\t */\n\t\t\t\t\t\temit('reset', event)\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t: {})\n\n\t\t/**\n\t\t * If the underlying 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\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif ((button.type === 'submit' || button.nativeType === 'submit')\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\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\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tfunction handleClosing(result) {\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\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tfunction 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\tnoClose: props.noClose || !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\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\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\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\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\tfont-size: 21px;\n\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: 0 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\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\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":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AA6QA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAAA;AAAAA,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,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA,MAAA,CAAA,YAAA,OAAA,YAAA,YAAA,mBAAA,WAAA;AAAA,MAEA;AAAA,MAEA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;A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cAAA,eAAA;AAEA,aAAA,UAAA,KAAA;AAAA,MACA;AAAA;AAAA;AAAA;AAAA,MAIA,MAAA,OAAA;AACA,cAAA,eAAA;AAIA,aAAA,SAAA,KAAA;AAAA,MACA;AAAA,IACA,IACA,CAAA,CAAA;AAKA,UAAA,YAAAF,IAAAA,IAAA,IAAA;AASA,aAAA,kBAAA,QAAA,QAAA;AAEA,WAAA,OAAA,SAAA,YAAA,OAAA,eAAA,aACA,cAAA,UAAA,UACA,CAAA,cAAA,MAAA,kBAAA;AACA;AAAA,MACA;AACA,oBAAA,MAAA;AACA,aAAA,WAAA,MAAA,aAAA,GAAA,GAAA;AAAA,IACA;AAOA,aAAA,cAAA,QAAA;AACA,gBAAA,QAAA;AAMA,WAAA,WAAA,MAAA;AAAA,IACA;AAKA,aAAA,eAAA;AACA,gBAAA,QAAA;AAIA,WAAA,eAAA,KAAA;AAAA,IACA;AAKA,UAAA,aAAAE,IAAAA,SAAA,OAAA;AAAA,MACA,SAAA,MAAA,WAAA,CAAA,MAAA;AAAA,MACA,WAAA,MAAA,cAAA,SAAA,SAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAIA,SAAA;AAAA,MACA,MAAA,MAAA;AAAA,MACA,MAAA,MAAA,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const Vue = require("vue");
|
|
3
|
-
const _l10n = require("./_l10n-
|
|
4
|
-
const NcButton = require("./NcButton-
|
|
3
|
+
const _l10n = require("./_l10n-eOBJ3Dwl.cjs");
|
|
4
|
+
const NcButton = require("./NcButton-CJBZrdiL.cjs");
|
|
5
5
|
const NcIconSvgWrapper = require("./NcIconSvgWrapper-D-aKMbf3.cjs");
|
|
6
6
|
const Components_NcLoadingIcon = require("../Components/NcLoadingIcon.cjs");
|
|
7
7
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
8
|
-
_l10n.register(_l10n.
|
|
8
|
+
_l10n.register(_l10n.t32);
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
__name: "NcDialogButton",
|
|
11
11
|
props: {
|
|
@@ -126,4 +126,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
126
126
|
);
|
|
127
127
|
const NcDialogButton = __component__.exports;
|
|
128
128
|
exports.NcDialogButton = NcDialogButton;
|
|
129
|
-
//# sourceMappingURL=NcDialogButton-
|
|
129
|
+
//# sourceMappingURL=NcDialogButton-8JhFaC5X.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialogButton-
|
|
1
|
+
{"version":3,"file":"NcDialogButton-8JhFaC5X.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n\t\t:aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@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<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t *\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n *\n * @param {MouseEvent} e The click event\n */\nasync function handleClick(e) {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHA,UAAM,YAAYA,IAAAA,IAAI,KAAK;AAO3B,mBAAe,YAAY,GAAG;AAE7B,UAAI,UAAU,OAAO;AACpB;AAAA,MACD;AAEA,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACxB;AAAA,MACD,UAAC;AACA,kBAAU,QAAQ;AAAA,MACnB;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
import { r as register, d as
|
|
3
|
-
import { N as NcButton } from "./NcButton-
|
|
2
|
+
import { r as register, d as t32, a as t } from "./_l10n-BWisB7-O.mjs";
|
|
3
|
+
import { N as NcButton } from "./NcButton-DUZTtFhr.mjs";
|
|
4
4
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BreCg8pX.mjs";
|
|
5
5
|
import NcLoadingIcon from "../Components/NcLoadingIcon.mjs";
|
|
6
6
|
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
7
|
-
register(
|
|
7
|
+
register(t32);
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
__name: "NcDialogButton",
|
|
10
10
|
props: {
|
|
@@ -127,4 +127,4 @@ const NcDialogButton = __component__.exports;
|
|
|
127
127
|
export {
|
|
128
128
|
NcDialogButton as N
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=NcDialogButton-
|
|
130
|
+
//# sourceMappingURL=NcDialogButton-DSrC6lFd.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDialogButton-
|
|
1
|
+
{"version":3,"file":"NcDialogButton-DSrC6lFd.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\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\n\t\t:aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@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<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t *\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n *\n * @param {MouseEvent} e The click event\n */\nasync function handleClick(e) {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHA,UAAM,YAAY,IAAI,KAAK;AAO3B,mBAAe,YAAY,GAAG;AAE7B,UAAI,UAAU,OAAO;AACpB;AAAA,MACD;AAEA,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACxB;AAAA,MACD,UAAC;AACA,kBAAU,QAAQ;AAAA,MACnB;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import '../assets/NcEmojiPicker-
|
|
1
|
+
import '../assets/NcEmojiPicker-B-iLLj37.css';
|
|
2
2
|
import { Picker, Emoji, EmojiIndex } from "emoji-mart-vue-fast";
|
|
3
3
|
import data from "emoji-mart-vue-fast/data/all.json";
|
|
4
4
|
import { isFocusable } from "tabbable";
|
|
5
5
|
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
6
|
-
import { N as NcColorPicker } from "./NcColorPicker-
|
|
6
|
+
import { N as NcColorPicker } from "./NcColorPicker-BoS26yac.mjs";
|
|
7
7
|
import { u as useTrapStackControl } from "./useTrapStackControl-BnLfCgGU.mjs";
|
|
8
8
|
import { s as setCurrentSkinTone, g as getCurrentSkinTone } from "./emoji-BY_D0V5K.mjs";
|
|
9
|
-
import { r as register,
|
|
10
|
-
import { C as Color } from "./
|
|
11
|
-
import { N as NcButton } from "./NcButton-
|
|
12
|
-
import { N as NcPopover } from "./NcPopover-
|
|
13
|
-
import { N as NcTextField } from "./NcTextField-
|
|
9
|
+
import { r as register, v as t42, w as t36, p as t15, x as t5, a as t } from "./_l10n-BWisB7-O.mjs";
|
|
10
|
+
import { C as Color } from "./colors-D3xlq-id.mjs";
|
|
11
|
+
import { N as NcButton } from "./NcButton-DUZTtFhr.mjs";
|
|
12
|
+
import { N as NcPopover } from "./NcPopover-gxcAqoEb.mjs";
|
|
13
|
+
import { N as NcTextField } from "./NcTextField-CVfixgfj.mjs";
|
|
14
14
|
const _sfc_main$1 = {
|
|
15
15
|
name: "CircleIcon",
|
|
16
16
|
emits: ["click"],
|
|
@@ -44,7 +44,7 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
|
44
44
|
null
|
|
45
45
|
);
|
|
46
46
|
const IconCircle = __component__$1.exports;
|
|
47
|
-
register(t5, t15,
|
|
47
|
+
register(t5, t15, t36, t42);
|
|
48
48
|
let emojiIndex;
|
|
49
49
|
const i18n = {
|
|
50
50
|
search: t("Search emoji"),
|
|
@@ -309,10 +309,10 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
309
309
|
_sfc_staticRenderFns,
|
|
310
310
|
false,
|
|
311
311
|
null,
|
|
312
|
-
"
|
|
312
|
+
"a3ed576d"
|
|
313
313
|
);
|
|
314
314
|
const NcEmojiPicker = __component__.exports;
|
|
315
315
|
export {
|
|
316
316
|
NcEmojiPicker as N
|
|
317
317
|
};
|
|
318
|
-
//# sourceMappingURL=NcEmojiPicker-
|
|
318
|
+
//# sourceMappingURL=NcEmojiPicker-CAphjgaf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcEmojiPicker-CAphjgaf.mjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"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\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover\n\t\tref=\"popover\"\n\t\t:shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\t:focus-trap=\"false /* Handled manually to remove emoji buttons from TAB sequence */\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<div class=\"nc-emoji-picker-container\">\n\t\t\t<Picker\n\t\t\t\tref=\"picker\"\n\t\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t\t:i18n=\"i18n\"\n\t\t\t\t:native=\"native\"\n\t\t\t\t:emoji-size=\"20\"\n\t\t\t\t:per-line=\"8\"\n\t\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t\t:show-preview=\"showPreview\"\n\t\t\t\t:skin=\"currentSkinTone\"\n\t\t\t\t:show-skin-tones=\"false\"\n\t\t\t\t:title=\"previewFallbackName\"\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t@keydown.native.tab.prevent=\"handleTabNavigationSkippingEmojis\"\n\t\t\t\t@select=\"select\">\n\t\t\t\t<template #searchTemplate=\"{ onSearch }\">\n\t\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tref=\"search\"\n\t\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t\t@keydown.left=\"callPickerArrowHandlerWithScrollFix('onArrowLeft', $event)\"\n\t\t\t\t\t\t\t@keydown.right=\"callPickerArrowHandlerWithScrollFix('onArrowRight', $event)\"\n\t\t\t\t\t\t\t@keydown.down=\"callPickerArrowHandlerWithScrollFix('onArrowDown', $event)\"\n\t\t\t\t\t\t\t@keydown.up=\"callPickerArrowHandlerWithScrollFix('onArrowUp', $event)\"\n\t\t\t\t\t\t\t@keydown.enter=\"$refs.picker.onEnter\"\n\t\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); onSearch('');\"\n\t\t\t\t\t\t\t@update:value=\"onSearch(search)\" />\n\t\t\t\t\t\t<NcColorPicker\n\t\t\t\t\t\t\tpalette-only\n\t\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" variant=\"tertiary-no-background\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</NcColorPicker>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Emoji\n\t\t\t\t\t\tclass=\"emoji-selected\"\n\t\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t\t<Emoji\n\t\t\t\t\t\tclass=\"emoji-delete\"\n\t\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t</template>\n\t\t\t</Picker>\n\t\t</div>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Emoji, EmojiIndex, Picker } from 'emoji-mart-vue-fast'\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport { isFocusable } from 'tabbable'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { t } from '../../l10n.js'\nimport { Color } from '../../utils/colors.ts'\nimport NcButton from '../NcButton/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [Boolean, String, Object, Element],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t *\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Component has its own custom focus management\n\t\t// The global focus trap stack should be paused\n\t\tuseTrapStackControl(() => this.open)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t *\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// Manually return focus to the trigger button, as we disabled focus-trap\n\t\t\t// But only if there is no focus target outside the picker, for example, input element that received focus by click closing the emoji picker\n\t\t\tif (!document.activeElement || this.$refs.picker.$el.contains(document.activeElement) || !isFocusable(document.activeElement)) {\n\t\t\t\tthis.$refs.popover.$el.querySelector('button, [role=\"button\"]')?.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Manually handle Tab navigation skipping emoji buttons.\n\t\t * Navigation over emojis is handled by Arrow keys.\n\t\t *\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\thandleTabNavigationSkippingEmojis(event) {\n\t\t\tconst current = event.target\n\t\t\tconst focusable = Array.from(this.$refs.picker.$el.querySelectorAll('button:not(.emoji-mart-emoji), input'))\n\t\t\tif (!event.shiftKey) {\n\t\t\t\tconst nextNode = focusable.find((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) || focusable[0]\n\t\t\t\tnextNode.focus()\n\t\t\t} else {\n\t\t\t\tconst prevNode = focusable.findLast((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING) || focusable.at(-1)\n\t\t\t\tprevNode.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle arrow navigation via <Picker>'s handlers with scroll bug fix\n\t\t *\n\t\t * @param {'onArrowLeft' | 'onArrowRight' | 'onArrowDown' | 'onArrowUp'} originalHandlerName - Picker's arrow keydown handler name\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\tasync callPickerArrowHandlerWithScrollFix(originalHandlerName, event) {\n\t\t\t// Call the original handler\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/components/Picker.vue#L29\n\t\t\t// TODO: expose these methods via slot props in upstream library\n\t\t\tthis.$refs.picker[originalHandlerName](event)\n\n\t\t\t// Wait until emoji-mart-vue-fast scrolls\n\t\t\tawait this.$nextTick()\n\n\t\t\t// Scroll position is incorrect after emoji-mart-vue-fast scrolls...\n\t\t\t// It calculates scroll incorrectly.\n\t\t\t// It doesn't take into account, that emojis are wrapped into categories sections\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/utils/picker.js#L244\n\t\t\t// Now scroll to the correct position\n\t\t\t// TODO: fix in upstream\n\t\t\tconst selectedEmoji = this.$refs.picker.$el.querySelector('.emoji-mart-emoji-selected')\n\t\t\tselectedEmoji?.scrollIntoView({\n\t\t\t\tblock: 'center',\n\t\t\t\tinline: 'center',\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n@use \"sass:meta\";\n\n.nc-emoji-picker-container :deep() {\n\t@include meta.load-css('emoji-mart-vue-fast/css/emoji-mart.css');\n}\n\n.nc-emoji-picker-container :deep(.emoji-mart) {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// Reset emoji-mart styles\n\tbutton {\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-anchors {\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-anchor {\n\t\tborder-radius: 0;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\theight: var(--clickable-area-small);\n\t\tmin-width: var(--clickable-area-small);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t// Icon\n\t\tdiv {\n\t\t\tdisplay: grid;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.emoji-mart-scroll {\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0 calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(8, 1fr);\n\t\tjustify-items: stretch;\n\n\t\t&.emoji-mart-no-results {\n\t\t\tgrid-template-columns: 1fr;\n\t\t\tfont-size: inherit;\n\t\t\tcolor: var(--color-text-maxcontrast) !important;\n\t\t}\n\t}\n\n\t/* Label element in the section grid */\n\tdiv.emoji-mart-category-label {\n\t\tgrid-column: span 8;\n\t\tjustify-self: stretch;\n\t}\n\n\t/* An actual heading inside the element */\n\th3.emoji-mart-category-label {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Inline with buttons\n\t\theight: var(--default-clickable-area);\n\t\tmargin: 0;\n\t\t// Inline with input\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0;\n\t\tuser-select: none;\n\t}\n\n\t.emoji-mart-emoji {\n\t\taspect-ratio: 1 / 1;\n\t\ttext-align: center;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\n\t\t&:hover,\n\t\t&:focus-visible,\n\t\t&.emoji-mart-emoji-selected {\n\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\tborder: none;\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tspan {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n\n.search__wrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--default-grid-baseline);\n\talign-items: end;\n\tpadding-block: var(--default-grid-baseline);\n\tpadding-inline: calc(2 * var(--default-grid-baseline));\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;ACsLA,IAAA;AAEA,MAAA,OAAA;AAAA,EACA,QAAA,EAAA,cAAA;AAAA,EACA,UAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAA,EAAA,gBAAA;AAAA,IACA,QAAA,EAAA,iBAAA;AAAA,IACA,SAAA,EAAA,mBAAA;AAAA,IACA,QAAA,EAAA,eAAA;AAAA,IACA,QAAA,EAAA,kBAAA;AAAA,IACA,OAAA,EAAA,cAAA;AAAA,IACA,UAAA,EAAA,YAAA;AAAA,IACA,QAAA,EAAA,iBAAA;AAAA,IACA,SAAA,EAAA,SAAA;AAAA,IACA,SAAA,EAAA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"use strict";
|
|
3
3
|
const emojiMartVueFast = require("emoji-mart-vue-fast");
|
|
4
4
|
const data = require("emoji-mart-vue-fast/data/all.json");
|
|
5
5
|
const tabbable = require("tabbable");
|
|
6
6
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
7
|
-
const NcColorPicker = require("./NcColorPicker-
|
|
7
|
+
const NcColorPicker = require("./NcColorPicker-Dg3d5_aQ.cjs");
|
|
8
8
|
const useTrapStackControl = require("./useTrapStackControl-XYABY64G.cjs");
|
|
9
9
|
const emoji = require("./emoji-VgSjNTd5.cjs");
|
|
10
|
-
const _l10n = require("./_l10n-
|
|
11
|
-
const
|
|
12
|
-
const NcButton = require("./NcButton-
|
|
13
|
-
const NcPopover = require("./NcPopover-
|
|
14
|
-
const NcTextField = require("./NcTextField-
|
|
10
|
+
const _l10n = require("./_l10n-eOBJ3Dwl.cjs");
|
|
11
|
+
const colors = require("./colors-BsDQ1Yz3.cjs");
|
|
12
|
+
const NcButton = require("./NcButton-CJBZrdiL.cjs");
|
|
13
|
+
const NcPopover = require("./NcPopover-BgUZkmjk.cjs");
|
|
14
|
+
const NcTextField = require("./NcTextField-52Fnd27A.cjs");
|
|
15
15
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
16
16
|
const data__default = /* @__PURE__ */ _interopDefault(data);
|
|
17
17
|
const _sfc_main$1 = {
|
|
@@ -47,7 +47,7 @@ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
47
47
|
null
|
|
48
48
|
);
|
|
49
49
|
const IconCircle = __component__$1.exports;
|
|
50
|
-
_l10n.register(_l10n.t5, _l10n.t15, _l10n.
|
|
50
|
+
_l10n.register(_l10n.t5, _l10n.t15, _l10n.t36, _l10n.t42);
|
|
51
51
|
let emojiIndex;
|
|
52
52
|
const i18n = {
|
|
53
53
|
search: _l10n.t("Search emoji"),
|
|
@@ -68,12 +68,12 @@ const i18n = {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const skinTonePalette = [
|
|
71
|
-
new
|
|
72
|
-
new
|
|
73
|
-
new
|
|
74
|
-
new
|
|
75
|
-
new
|
|
76
|
-
new
|
|
71
|
+
new colors.Color(255, 222, 52, _l10n.t("Neutral skin color")),
|
|
72
|
+
new colors.Color(228, 205, 166, _l10n.t("Light skin tone")),
|
|
73
|
+
new colors.Color(250, 221, 192, _l10n.t("Medium light skin tone")),
|
|
74
|
+
new colors.Color(174, 129, 87, _l10n.t("Medium skin tone")),
|
|
75
|
+
new colors.Color(158, 113, 88, _l10n.t("Medium dark skin tone")),
|
|
76
|
+
new colors.Color(96, 79, 69, _l10n.t("Dark skin tone"))
|
|
77
77
|
];
|
|
78
78
|
const _sfc_main = {
|
|
79
79
|
name: "NcEmojiPicker",
|
|
@@ -312,8 +312,8 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
312
312
|
_sfc_staticRenderFns,
|
|
313
313
|
false,
|
|
314
314
|
null,
|
|
315
|
-
"
|
|
315
|
+
"a3ed576d"
|
|
316
316
|
);
|
|
317
317
|
const NcEmojiPicker = __component__.exports;
|
|
318
318
|
exports.NcEmojiPicker = NcEmojiPicker;
|
|
319
|
-
//# sourceMappingURL=NcEmojiPicker-
|
|
319
|
+
//# sourceMappingURL=NcEmojiPicker-DwXhWYHY.cjs.map
|