@nextcloud/vue 9.2.0 → 9.3.1
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 +39 -1
- package/dist/assets/{NcActionButton-D7bnKlOt.css → NcActionButton-Bb0ihLdt.css} +18 -18
- package/dist/assets/{NcActionButtonGroup-CRTH2v24.css → NcActionButtonGroup-Bt8kRk79.css} +8 -8
- package/dist/assets/{NcActionInput--OC-0kRP.css → NcActionInput-BxRA_Skn.css} +65 -65
- package/dist/assets/{NcActionLink-DjrAv1MG.css → NcActionLink-DAEr-vmd.css} +13 -13
- package/dist/assets/{NcActionTextEditable-BPaRhJ6u.css → NcActionTextEditable-TPYz4ma-.css} +65 -65
- package/dist/assets/{NcActions-DXLRy-4d.css → NcActions-DOI7rRa0.css} +11 -11
- package/dist/assets/{NcAppContent-r_MkL84m.css → NcAppContent-HF21N7dO.css} +19 -19
- package/dist/assets/{NcAppNavigation-Br6xragy.css → NcAppNavigation-f2zUqaiQ.css} +12 -12
- package/dist/assets/{NcAppNavigationItem-6ZUh2hMu.css → NcAppNavigationItem-D97Onpd9.css} +36 -36
- package/dist/assets/{NcAppNavigationSearch-CUSlFbdJ.css → NcAppNavigationSearch-BH8hBjGe.css} +5 -5
- package/dist/assets/{NcAppSettingsDialog-B51_ysuI.css → NcAppSettingsDialog-CapZ_qNk.css} +36 -10
- package/dist/assets/{NcAppSidebar-aGrIJ9f6.css → NcAppSidebar-krHtMwId.css} +44 -44
- package/dist/assets/{NcAvatar-BvgSFJqT.css → NcAvatar-f8SJKMDw.css} +24 -24
- package/dist/assets/{NcButton-BjcEkfk2.css → NcButton--Fj4gghF.css} +48 -48
- package/dist/assets/{NcChip-T6s7HqeL.css → NcChip-DZ8dUSFy.css} +12 -12
- package/dist/assets/{NcCollectionList-D9dOsdP2.css → NcCollectionList-C7OiUQQ-.css} +15 -15
- package/dist/assets/{NcDashboardWidget-DD06i7ws.css → NcDashboardWidget-DFY9GRrd.css} +12 -12
- package/dist/assets/{NcDateTimePicker-DL6-rWSN.css → NcDateTimePicker-D6xbEbaC.css} +236 -233
- package/dist/assets/{NcFormBoxItem-j2nGdOvd.css → NcFormBoxItem-BfXKp9xJ.css} +14 -14
- package/dist/assets/{NcIconSvgWrapper-D6qXQDNo.css → NcIconSvgWrapper-N3OwSN9O.css} +10 -10
- package/dist/assets/{NcInputField-D5SEE7D0.css → NcInputField-B9DSDOEd.css} +82 -61
- package/dist/assets/{NcListItem-D9Lk0t6j.css → NcListItem-CZnKmy9X.css} +41 -41
- package/dist/assets/{NcListItemIcon-OOjV0jWx.css → NcListItemIcon-aquns6B7.css} +13 -13
- package/dist/assets/{NcModal-Dyub1-f2.css → NcModal-DLWvQ8EA.css} +59 -67
- package/dist/assets/{NcNoteCard-l5nIN9Hg.css → NcNoteCard-DZSuYX4-.css} +10 -10
- package/dist/assets/{NcPasswordField-CMuvrdVC.css → NcPasswordField-BCJ0LHSS.css} +2 -2
- package/dist/assets/{NcRelatedResourcesPanel-CZDNe7DZ.css → NcRelatedResourcesPanel-DYB-wrU0.css} +10 -10
- package/dist/assets/{NcRichText-QPnpxaeG.css → NcRichText-RvICaxkO.css} +108 -91
- package/dist/assets/{NcSelect-BTLcqg7Y.css → NcSelect-ZnE_MlqV.css} +52 -5
- package/dist/assets/{NcTextArea-7C2JBozT.css → NcTextArea-nivEqHE-.css} +62 -42
- package/dist/assets/{NcUserBubble-ChgvvPPf.css → NcUserBubble-B3Jad98g.css} +8 -8
- package/dist/chunks/{NcActionButton-2Rxa55KE.mjs → NcActionButton-pKOSrlGE.mjs} +5 -5
- package/dist/chunks/NcActionButton-pKOSrlGE.mjs.map +1 -0
- package/dist/chunks/{NcActionButtonGroup-DouiEx4u.mjs → NcActionButtonGroup-D1cYCNRq.mjs} +4 -4
- package/dist/chunks/NcActionButtonGroup-D1cYCNRq.mjs.map +1 -0
- package/dist/chunks/{NcActionInput-BUey_7p4.mjs → NcActionInput-uL5aa-A2.mjs} +12 -10
- package/dist/chunks/NcActionInput-uL5aa-A2.mjs.map +1 -0
- package/dist/chunks/{NcActionLink-afakPM_N.mjs → NcActionLink-vEvKSV4N.mjs} +3 -3
- package/dist/chunks/NcActionLink-vEvKSV4N.mjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-CXH_CFjU.mjs → NcActionTextEditable-CoYA6jeC.mjs} +5 -5
- package/dist/chunks/NcActionTextEditable-CoYA6jeC.mjs.map +1 -0
- package/dist/chunks/{NcActions-QtUC1sD3.mjs → NcActions-DWmvh7-Y.mjs} +20 -50
- package/dist/chunks/NcActions-DWmvh7-Y.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-DW_SpXeR.mjs → NcAppContent-CTpYDkuT.mjs} +9 -18
- package/dist/chunks/NcAppContent-CTpYDkuT.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-DrlEs9WS.mjs → NcAppNavigation-NSjIVdnb.mjs} +7 -7
- package/dist/chunks/NcAppNavigation-NSjIVdnb.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-CW__bXHt.mjs → NcAppNavigationCaption-D4yUe1MX.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-CW__bXHt.mjs.map → NcAppNavigationCaption-D4yUe1MX.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DH7wxFRY.mjs → NcAppNavigationItem-hKUS0nZj.mjs} +8 -8
- package/dist/chunks/NcAppNavigationItem-hKUS0nZj.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNew-Y50s6jTC.mjs → NcAppNavigationNew-CuwqNksa.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-Y50s6jTC.mjs.map → NcAppNavigationNew-CuwqNksa.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-DehA23th.mjs → NcAppNavigationNewItem-IzXE-EEq.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-DehA23th.mjs.map → NcAppNavigationNewItem-IzXE-EEq.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-BWx-LXJj.mjs → NcAppNavigationSearch-DCgwKEm9.mjs} +5 -5
- package/dist/chunks/NcAppNavigationSearch-DCgwKEm9.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-77CxwYOD.mjs → NcAppNavigationSettings-T04pqKfn.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-77CxwYOD.mjs.map → NcAppNavigationSettings-T04pqKfn.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-B7AG3mEJ.mjs → NcAppSettingsDialog-BCVofwA8.mjs} +38 -12
- package/dist/chunks/NcAppSettingsDialog-BCVofwA8.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsShortcutsSection-o6KPisIT.mjs → NcAppSettingsShortcutsSection-QPGGYtbC.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsShortcutsSection-o6KPisIT.mjs.map → NcAppSettingsShortcutsSection-QPGGYtbC.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BZh0lWlQ.mjs → NcAppSidebar-BvBvQsXb.mjs} +6 -6
- package/dist/chunks/NcAppSidebar-BvBvQsXb.mjs.map +1 -0
- package/dist/chunks/{NcAssistantButton-D3v1Xk22.mjs → NcAssistantButton-CjpLsI1X.mjs} +5 -5
- package/dist/chunks/{NcAssistantButton-D3v1Xk22.mjs.map → NcAssistantButton-CjpLsI1X.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-CCdgVDM4.mjs → NcAssistantIcon-BMDc4udc.mjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-CCdgVDM4.mjs.map → NcAssistantIcon-BMDc4udc.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-uKR5Re43.mjs → NcAvatar-DmUGApWA.mjs} +28 -24
- package/dist/chunks/NcAvatar-DmUGApWA.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-BffVglho.mjs → NcBreadcrumb-Bwkn3eve.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-BffVglho.mjs.map → NcBreadcrumb-Bwkn3eve.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DCzvS4nv.mjs → NcBreadcrumbs-PN5_hHQn.mjs} +5 -5
- package/dist/chunks/{NcBreadcrumbs-DCzvS4nv.mjs.map → NcBreadcrumbs-PN5_hHQn.mjs.map} +1 -1
- package/dist/chunks/{NcButton-DkC5k3Lb.mjs → NcButton-Dc8V4Urj.mjs} +7 -4
- package/dist/chunks/NcButton-Dc8V4Urj.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-CAxvqRrM.mjs → NcCheckboxRadioSwitch-BCSKF7Tk.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-CAxvqRrM.mjs.map → NcCheckboxRadioSwitch-BCSKF7Tk.mjs.map} +1 -1
- package/dist/chunks/{NcChip-DH4rTzjt.mjs → NcChip-D8tGFzRl.mjs} +8 -8
- package/dist/chunks/NcChip-D8tGFzRl.mjs.map +1 -0
- package/dist/chunks/{NcCollectionList-BsgtKu_8.mjs → NcCollectionList-C-Zxsdgw.mjs} +10 -9
- package/dist/chunks/NcCollectionList-C-Zxsdgw.mjs.map +1 -0
- package/dist/chunks/{NcColorPicker-rGVCe-44.mjs → NcColorPicker-Kc0JqRtp.mjs} +6 -6
- package/dist/chunks/{NcColorPicker-rGVCe-44.mjs.map → NcColorPicker-Kc0JqRtp.mjs.map} +1 -1
- package/dist/chunks/{NcContent-DeXRbVuo.mjs → NcContent-BR_nMwKN.mjs} +4 -4
- package/dist/chunks/{NcContent-DeXRbVuo.mjs.map → NcContent-BR_nMwKN.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-BxIt1qRx.mjs → NcDashboardWidget-Bz1t6sj0.mjs} +6 -6
- package/dist/chunks/NcDashboardWidget-Bz1t6sj0.mjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-Dg8AbqGD.mjs → NcDashboardWidgetItem-C_xl9X2u.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-Dg8AbqGD.mjs.map → NcDashboardWidgetItem-C_xl9X2u.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-B6ni6QAB.mjs → NcDateTimePicker-DTf51PD8.mjs} +10 -10
- package/dist/chunks/{NcDateTimePicker-B6ni6QAB.mjs.map → NcDateTimePicker-DTf51PD8.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-BaauiB0I.mjs → NcDateTimePickerNative-DXF3-uR3.mjs} +2 -2
- package/dist/chunks/{NcDateTimePickerNative-BaauiB0I.mjs.map → NcDateTimePickerNative-DXF3-uR3.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-BC0--SOc.mjs → NcDialog-CM7SCS7Z.mjs} +3 -3
- package/dist/chunks/{NcDialog-BC0--SOc.mjs.map → NcDialog-CM7SCS7Z.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYQZ84A2.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-BBumVVme.mjs} +4 -4
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYQZ84A2.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-BBumVVme.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-CKp3IB6N.mjs → NcEmojiPicker-pM4Pg2yq.mjs} +6 -6
- package/dist/chunks/{NcEmojiPicker-CKp3IB6N.mjs.map → NcEmojiPicker-pM4Pg2yq.mjs.map} +1 -1
- package/dist/chunks/NcFormBox-K2tCRm3B.mjs.map +1 -1
- package/dist/chunks/{NcFormBoxButton-CCs-0mb3.mjs → NcFormBoxButton-7jokSLLb.mjs} +4 -4
- package/dist/chunks/{NcFormBoxButton-CCs-0mb3.mjs.map → NcFormBoxButton-7jokSLLb.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-B7dsN2G5.mjs} +8 -38
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-B7dsN2G5.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxItem-C3We3v_4.mjs → NcFormBoxItem-BBP76Mkf.mjs} +10 -10
- package/dist/chunks/{NcFormBoxItem-C3We3v_4.mjs.map → NcFormBoxItem-BBP76Mkf.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxSwitch-gHZMcoCQ.mjs → NcFormBoxSwitch-UJwYMQPm.mjs} +4 -4
- package/dist/chunks/{NcFormBoxSwitch-gHZMcoCQ.mjs.map → NcFormBoxSwitch-UJwYMQPm.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-DafXYbXB.mjs → NcHeaderButton-CA17OV7l.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-DafXYbXB.mjs.map → NcHeaderButton-CA17OV7l.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-DfO7ghiM.mjs → NcHeaderMenu-CdlSBOyC.mjs} +2 -2
- package/dist/chunks/{NcHeaderMenu-DfO7ghiM.mjs.map → NcHeaderMenu-CdlSBOyC.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-CmqTn7WR.mjs → NcHotkey-KGHPzHBJ.mjs} +2 -2
- package/dist/chunks/{NcHotkey-CmqTn7WR.mjs.map → NcHotkey-KGHPzHBJ.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-CuENLgpa.mjs → NcHotkeyList-BBE5BqwB.mjs} +2 -2
- package/dist/chunks/{NcHotkeyList-CuENLgpa.mjs.map → NcHotkeyList-BBE5BqwB.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-5AA93z-F.mjs → NcIconSvgWrapper-BvLanNaW.mjs} +4 -4
- package/dist/chunks/NcIconSvgWrapper-BvLanNaW.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-BWJotcI2.mjs → NcInputConfirmCancel-CSO9hp4z.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-BWJotcI2.mjs.map → NcInputConfirmCancel-CSO9hp4z.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-DwkKsbxv.mjs → NcInputField-Bwsh2aHY.mjs} +16 -14
- package/dist/chunks/NcInputField-Bwsh2aHY.mjs.map +1 -0
- package/dist/chunks/{NcKbd-B87GdbDW.mjs → NcKbd-D3YSTteg.mjs} +2 -2
- package/dist/chunks/{NcKbd-B87GdbDW.mjs.map → NcKbd-D3YSTteg.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-BLSWE2Hb.mjs → NcListItem-BHmdTInS.mjs} +4 -4
- package/dist/chunks/NcListItem-BHmdTInS.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-BXVk-irh.mjs → NcListItemIcon-8fWhyS_R.mjs} +5 -5
- package/dist/chunks/NcListItemIcon-8fWhyS_R.mjs.map +1 -0
- package/dist/chunks/NcModal-MC_HktJd.mjs +422 -0
- package/dist/chunks/NcModal-MC_HktJd.mjs.map +1 -0
- package/dist/chunks/{NcNoteCard-Dw222p4P.mjs → NcNoteCard-CVhtNL04.mjs} +5 -5
- package/dist/chunks/NcNoteCard-CVhtNL04.mjs.map +1 -0
- package/dist/chunks/{NcPasswordField-BkVdu9LI.mjs → NcPasswordField-djttkA5Q.mjs} +11 -8
- package/dist/chunks/NcPasswordField-djttkA5Q.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-DP7W80M0.mjs → NcRelatedResourcesPanel-BVGAmIja.mjs} +9 -9
- package/dist/chunks/NcRelatedResourcesPanel-BVGAmIja.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-A0F0waG9.mjs → NcRichContenteditable-0w6dbJeG.mjs} +17 -12
- package/dist/chunks/{NcRichContenteditable-A0F0waG9.mjs.map → NcRichContenteditable-0w6dbJeG.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-PvndLTtG.mjs → NcRichText-CBMtJzE_.mjs} +45 -8
- package/dist/chunks/NcRichText-CBMtJzE_.mjs.map +1 -0
- package/dist/chunks/{NcSelect-DekSQwK1.mjs → NcSelect-Czzsi3P_.mjs} +8 -5
- package/dist/chunks/NcSelect-Czzsi3P_.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-wqBc8W15.mjs → NcSelectTags-DJwqmQ7_.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-wqBc8W15.mjs.map → NcSelectTags-DJwqmQ7_.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-DGY_Fvw7.mjs → NcSelectUsers-DVTI1DIZ.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-DGY_Fvw7.mjs.map → NcSelectUsers-DVTI1DIZ.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DDccDeTg.mjs → NcSettingsSection-DYXU4pOK.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DDccDeTg.mjs.map → NcSettingsSection-DYXU4pOK.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-Bpm9HZXh.mjs → NcSettingsSelectGroup-CuRTrvVN.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-Bpm9HZXh.mjs.map → NcSettingsSelectGroup-CuRTrvVN.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CBx0eeEG.mjs → NcTextArea-CdtxX_QJ.mjs} +11 -9
- package/dist/chunks/NcTextArea-CdtxX_QJ.mjs.map +1 -0
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-cbNqV44E.mjs → NcTextField.vue_vue_type_script_setup_true_lang-D1y_LfGJ.mjs} +5 -5
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-D1y_LfGJ.mjs.map +1 -0
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-Dr3oElNm.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-CGFRZR-3.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-Dr3oElNm.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-CGFRZR-3.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-2CLRpxdk.mjs → NcUserBubble-DPAmU2_J.mjs} +8 -8
- package/dist/chunks/NcUserBubble-DPAmU2_J.mjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-D6fygDFl.mjs → NcUserStatusIcon-CGEf7fej.mjs} +2 -2
- package/dist/chunks/{NcUserStatusIcon-D6fygDFl.mjs.map → NcUserStatusIcon-CGEf7fej.mjs.map} +1 -1
- package/dist/chunks/{_l10n--WxGDYem.mjs → _l10n-DrTiip5c.mjs} +65 -65
- package/dist/chunks/_l10n-DrTiip5c.mjs.map +1 -0
- package/dist/chunks/appName-DtnLUijR.mjs +41 -0
- package/dist/chunks/appName-DtnLUijR.mjs.map +1 -0
- package/dist/chunks/{colors-BhsvsNTT.mjs → colors-Go3zmZRD.mjs} +2 -2
- package/dist/chunks/{colors-BhsvsNTT.mjs.map → colors-Go3zmZRD.mjs.map} +1 -1
- package/dist/chunks/{mdi-8kZvl9vo.mjs → mdi-XFJRiRqJ.mjs} +16 -12
- package/dist/chunks/{mdi-8kZvl9vo.mjs.map → mdi-XFJRiRqJ.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-el0J7aNd.mjs → referencePickerModal-DmD3-xYB.mjs} +7 -7
- package/dist/chunks/{referencePickerModal-el0J7aNd.mjs.map → referencePickerModal-DmD3-xYB.mjs.map} +1 -1
- package/dist/chunks/useCopy-7FVrniF_.mjs +39 -0
- package/dist/chunks/useCopy-7FVrniF_.mjs.map +1 -0
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionInput/NcActionInput.vue.d.ts +6 -5
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionLink/index.mjs +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- package/dist/components/NcActions/NcActions.vue.d.ts +21 -7
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/NcAppNavigationCaption.vue.d.ts +11 -2
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +11 -2
- package/dist/components/NcAppNavigationItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationNew/index.mjs +1 -1
- package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
- package/dist/components/NcAppSettingsDialog/NcAppSettingsDialog.vue.d.ts +5 -0
- package/dist/components/NcAppSettingsDialog/NcAppSettingsDialogVersion.vue.d.ts +2 -0
- package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
- package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
- package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
- package/dist/components/NcAppSidebar/NcAppSidebar.vue.d.ts +11 -2
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAssistantButton/index.mjs +1 -1
- package/dist/components/NcAssistantIcon/index.mjs +1 -1
- package/dist/components/NcAvatar/NcAvatar.vue.d.ts +14 -4
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/NcBreadcrumb.vue.d.ts +11 -2
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/NcBreadcrumbs.vue.d.ts +22 -4
- package/dist/components/NcBreadcrumbs/index.mjs +1 -1
- package/dist/components/NcButton/index.mjs +1 -1
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
- package/dist/components/NcChip/index.mjs +1 -1
- package/dist/components/NcCollectionList/NcCollectionList.vue.d.ts +40 -10
- package/dist/components/NcCollectionList/NcCollectionListItem.vue.d.ts +25 -6
- package/dist/components/NcCollectionList/index.mjs +1 -1
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/NcDashboardWidget.vue.d.ts +39 -10
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue.d.ts +25 -6
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTime/NcDateTime.vue.d.ts +1 -1
- package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +5 -5
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
- package/dist/components/NcDialog/NcDialog.vue.d.ts +1 -1
- package/dist/components/NcDialog/index.mjs +1 -1
- package/dist/components/NcDialogButton/index.mjs +1 -1
- package/dist/components/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcFormBoxButton/index.mjs +1 -1
- package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
- package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
- package/dist/components/NcHeaderButton/index.mjs +1 -1
- package/dist/components/NcHeaderMenu/index.mjs +1 -1
- package/dist/components/NcHotkey/index.mjs +1 -1
- package/dist/components/NcHotkeyList/index.mjs +1 -1
- package/dist/components/NcIconSvgWrapper/index.mjs +1 -1
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/index.mjs +1 -1
- package/dist/components/NcListItem/NcListItem.vue.d.ts +11 -2
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/NcListItemIcon.vue.d.ts +15 -4
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- package/dist/components/NcModal/NcModal.vue.d.ts +151 -1
- package/dist/components/NcModal/index.d.ts +4 -0
- package/dist/components/NcModal/index.mjs +1 -1
- package/dist/components/NcNoteCard/index.mjs +1 -1
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/NcAutoCompleteResult.vue.d.ts +2 -2
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/NcReferenceList.vue.d.ts +2 -2
- package/dist/components/NcRichText/NcReferencePicker/NcProviderList.vue.d.ts +1 -0
- package/dist/components/NcRichText/NcReferencePicker/NcReferencePicker.vue.d.ts +2 -0
- package/dist/components/NcRichText/NcReferencePicker/NcReferencePickerModal.vue.d.ts +146 -1
- package/dist/components/NcRichText/NcReferencePicker/NcSearch.vue.d.ts +1 -0
- package/dist/components/NcRichText/NcRichTextCopyButton.vue.d.ts +6 -0
- package/dist/components/NcRichText/index.mjs +3 -3
- package/dist/components/NcSelect/NcSelect.vue.d.ts +1 -0
- package/dist/components/NcSelect/index.mjs +1 -1
- package/dist/components/NcSelectTags/NcSelectTags.vue.d.ts +1 -0
- package/dist/components/NcSelectTags/index.mjs +1 -1
- package/dist/components/NcSelectUsers/index.mjs +1 -1
- package/dist/components/NcSettingsSection/index.mjs +1 -1
- package/dist/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue.d.ts +1 -0
- package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/index.mjs +1 -1
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/NcUserStatusIcon.vue.d.ts +2 -2
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/{components/NcFormBoxCopyButton → composables}/useCopy.d.ts +2 -0
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/composables/useHotKey/index.d.ts +7 -0
- package/dist/composables/useHotKey/index.mjs +6 -3
- package/dist/composables/useHotKey/index.mjs.map +1 -1
- package/dist/composables/useScopeIdAttrs.d.ts +26 -0
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +65 -65
- package/dist/mixins/userStatus.d.ts +8 -0
- package/dist/utils/appName.d.ts +5 -0
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +24 -24
- package/dist/chunks/NcActionButton-2Rxa55KE.mjs.map +0 -1
- package/dist/chunks/NcActionButtonGroup-DouiEx4u.mjs.map +0 -1
- package/dist/chunks/NcActionInput-BUey_7p4.mjs.map +0 -1
- package/dist/chunks/NcActionLink-afakPM_N.mjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-CXH_CFjU.mjs.map +0 -1
- package/dist/chunks/NcActions-QtUC1sD3.mjs.map +0 -1
- package/dist/chunks/NcAppContent-DW_SpXeR.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-DrlEs9WS.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-DH7wxFRY.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-BWx-LXJj.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-B7AG3mEJ.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-BZh0lWlQ.mjs.map +0 -1
- package/dist/chunks/NcAvatar-uKR5Re43.mjs.map +0 -1
- package/dist/chunks/NcButton-DkC5k3Lb.mjs.map +0 -1
- package/dist/chunks/NcChip-DH4rTzjt.mjs.map +0 -1
- package/dist/chunks/NcCollectionList-BsgtKu_8.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidget-BxIt1qRx.mjs.map +0 -1
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-5AA93z-F.mjs.map +0 -1
- package/dist/chunks/NcInputField-DwkKsbxv.mjs.map +0 -1
- package/dist/chunks/NcListItem-BLSWE2Hb.mjs.map +0 -1
- package/dist/chunks/NcListItemIcon-BXVk-irh.mjs.map +0 -1
- package/dist/chunks/NcModal-BIG1WrLo.mjs +0 -778
- package/dist/chunks/NcModal-BIG1WrLo.mjs.map +0 -1
- package/dist/chunks/NcNoteCard-Dw222p4P.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-BkVdu9LI.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-DP7W80M0.mjs.map +0 -1
- package/dist/chunks/NcRichText-PvndLTtG.mjs.map +0 -1
- package/dist/chunks/NcSelect-DekSQwK1.mjs.map +0 -1
- package/dist/chunks/NcTextArea-CBx0eeEG.mjs.map +0 -1
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-cbNqV44E.mjs.map +0 -1
- package/dist/chunks/NcUserBubble-2CLRpxdk.mjs.map +0 -1
- package/dist/chunks/_l10n--WxGDYem.mjs.map +0 -1
- package/dist/utils/Timer.d.ts +0 -25
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcChip-DH4rTzjt.mjs","sources":["../../src/components/NcChip/NcChip.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<docs>\n### Basic usage\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 8px; flex-wrap: wrap;\">\n\t\t<NcChip text=\"Notes.txt\" />\n\t\t<NcChip text=\"Files\" :icon-path=\"mdiFile\" />\n\t\t<NcChip text=\"Color\" :icon-path=\"mdiPalette\" variant=\"tertiary\" />\n\t\t<NcChip text=\"Current time\" :icon-path=\"mdiClock\" no-close variant=\"primary\" />\n\t\t<NcChip text=\"Canceled\" :icon-path=\"mdiCancel\" variant=\"error\" no-close />\n\t\t<NcChip text=\"Open\" :icon-path=\"mdiCircle\" variant=\"success\" no-close />\n\t\t<NcChip text=\"Due tomorrow\" :icon-path=\"mdiAlertCircleOutline\" variant=\"warning\" no-close />\n\t</div>\n</template>\n<script>\nimport { mdiClock, mdiFile, mdiPalette, mdiCancel, mdiCircle, mdiAlertCircleOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiAlertCircleOutline,\n\t\t\tmdiCancel,\n\t\t\tmdiCircle,\n\t\t\tmdiClock,\n\t\t\tmdiFile,\n\t\t\tmdiPalette,\n\t\t}\n\t}\n}\n</script>\n```\n\n### Advanced usage\n\nIt is also possible to use custom components for the icon by using the `icon` slot.\nIn this example we are using the `NcAvatar` component to render the users avatar as the icon.\n\n*Hint: If you use round icons like avatars you should set their size to `24px` (or use CSS variable `--chip-size`) to make them fully fill and align with the the chip*\n\nAlso it is possible to pass custom actions.\n\n```vue\n<template>\n\t<NcChip>\n\t\t<!-- The icon slot allow to use custom components as the chip icon -->\n\t\t<template #icon>\n\t\t\t<NcAvatar :size=\"24\" user=\"jdoe\" display-name=\"J. Doe\" />\n\t\t</template>\n\t\t<!-- The actions slot allows to add custom actions -->\n\t\t<template #actions>\n\t\t\t<NcActionButton>\n\t\t\t\t<template #icon>\n\t\t\t\t\t<ContactsIcon :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd to contacts\n\t\t\t</NcActionButton>\n\t\t</template>\n\t\t<!-- The default slot can be used for add content, just like the `text` prop -->\n\t\tJ. Doe\n\t</NcChip>\n</template>\n<script>\nimport ContactsIcon from 'vue-material-design-icons/Contacts.vue'\nexport default {\n\tcomponents: {\n\t\tContactsIcon,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div\n\t\tclass=\"nc-chip\"\n\t\t:class=\"{\n\t\t\t[`nc-chip--${variant}`]: true,\n\t\t\t'nc-chip--no-actions': noClose && !hasActions(),\n\t\t\t'nc-chip--no-icon': !hasIcon(),\n\t\t}\">\n\t\t<span v-if=\"hasIcon()\" class=\"nc-chip__icon\">\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The default icon wrapper uses a size of 18px to ensure the icon is not clipped by the round chip style -->\n\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\tv-if=\"iconPath || iconSvg\"\n\t\t\t\t\tinline\n\t\t\t\t\t:path=\"iconPath\"\n\t\t\t\t\t:svg=\"iconPath ? undefined : iconSvg\"\n\t\t\t\t\t:size=\"18\" />\n\t\t\t</slot>\n\t\t</span>\n\t\t<span class=\"nc-chip__text\">\n\t\t\t<slot>{{ text }}</slot>\n\t\t</span>\n\t\t<NcActions\n\t\t\tv-if=\"canClose || hasActions()\"\n\t\t\tclass=\"nc-chip__actions\"\n\t\t\t:container=\"actionsContainer\"\n\t\t\t:force-menu=\"!canClose\"\n\t\t\tvariant=\"tertiary-no-background\">\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"canClose\"\n\t\t\t\tclose-after-click\n\t\t\t\t@click=\"emit('close')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiClose\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ ariaLabelClose }}\n\t\t\t</NcActionButton>\n\t\t\t<slot name=\"actions\" />\n\t\t</NcActions>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { mdiClose } from '@mdi/js'\nimport { computed } from 'vue'\nimport NcActionButton from '../NcActionButton/NcActionButton.vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { t } from '../../l10n.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * aria label to set on the close button\n\t *\n\t * @default 'Close'\n\t */\n\tariaLabelClose?: string\n\n\t/**\n\t * Container for the actions\n\t */\n\tactionsContainer?: string\n\n\t/**\n\t * Main text of the chip.\n\t */\n\ttext?: string\n\n\t/**\n\t * SVG path of the icon to use, this takes precedence over `iconSVG`.\n\t * For example icon paths from `@mdi/js` can be used.\n\t */\n\ticonPath?: string\n\n\t/**\n\t * Inline SVG to use as the icon\n\t */\n\ticonSvg?: string\n\n\t/**\n\t * Set to true to prevent the close button to be shown\n\t */\n\tnoClose?: boolean\n\n\t/**\n\t * Set the chips design variant-\n\t *\n\t * This sets the background style of the chip, similar to NcButton's `variant`.\n\t *\n\t * @default 'secondary'\n\t * @since 8.23.0\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'warning' | 'success'\n}>(), {\n\tariaLabelClose: t('Close'),\n\tactionsContainer: 'body',\n\ticonPath: undefined,\n\ticonSvg: undefined,\n\ttext: '',\n\tvariant: 'secondary',\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Emitted when the close button is clicked\n\t */\n\tclose: []\n}>()\n\nconst slots = defineSlots<{\n\t/**\n\t * The actions slot can be used to add custom actions (`NcAction*`) to the chips actions.\n\t */\n\tactions?: Slot\n\n\t/**\n\t * The default slot can be used to set the text that is shown.\n\t */\n\tdefault?: Slot\n\n\t/**\n\t * The icon slot can be used to set the chip icon.\n\t * Make sure that the icon is not exceeding a height of `--chip-size`.\n\t * For round icons a exact size of `var(--chip-size)` is recommended.\n\t */\n\ticon?: Slot\n}>()\n\nconst canClose = computed(() => !props.noClose)\nconst hasActions = () => !!slots.actions\nconst hasIcon = () => Boolean(props.iconPath || props.iconSvg || !!slots.icon)\n</script>\n\n<style scoped lang=\"scss\">\n.nc-chip {\n\t--chip-size: 24px;\n\t--chip-radius: calc(var(--chip-size) / 2);\n\t// Setup size of wrapper\n\theight: var(--chip-size);\n\tmax-width: fit-content;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tborder-radius: var(--chip-radius);\n\tbackground-color: var(--color-background-hover);\n\n\t&--primary {\n\t\tbackground-color: var(--color-primary-element);\n\t\tcolor: var(--color-primary-element-text);\n\t}\n\n\t&--secondary {\n\t\tbackground-color: var(--color-primary-element-light);\n\t\tcolor: var(--color-primary-element-light-text);\n\t}\n\n\t&--error {\n\t\tbackground-color: var(--color-error);\n\t\tcolor: var(--color-error-text);\n\t}\n\n\t&--warning {\n\t\tbackground-color: var(--color-warning);\n\t\tcolor: var(--color-warning-text);\n\t}\n\n\t&--success {\n\t\tbackground-color: var(--color-success);\n\t\tcolor: var(--color-success-text);\n\t}\n\n\t&--no-actions &__text {\n\t\t// If there are no actions we need to add some padding to ensure the text is not cut-off\n\t\tpadding-inline-end: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t&--no-icon &__text {\n\t\t// Add some more space to the border\n\t\tpadding-inline-start: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t&__text {\n\t\t// Allow to grow the text\n\t\t// this is only used if an app forces a width of the chip\n\t\tflex: 1 auto;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-wrap: nowrap;\n\t}\n\n\t&__icon {\n\t\t// Do neither grow nor shrink, size is fixed\n\t\tflex: 0 0 var(--chip-size);\n\t\tmargin-inline-end: var(--default-grid-baseline);\n\n\t\tline-height: 1;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\t// Force size\n\t\toverflow: hidden;\n\t\theight: var(--chip-size);\n\t\twidth: var(--chip-size);\n\t}\n\n\t&__actions {\n\t\t// Do neither grow nor shrink, size is fixed\n\t\tflex: 0 0 var(--chip-size);\n\t\t// Adjust action size to match chip size\n\t\t--default-clickable-area: var(--chip-size);\n\t\t--border-radius-element: var(--chip-radius);\n\t}\n}\n</style>\n"],"names":["_useSlots","_createElementBlock","variant","noClose","_openBlock","_renderSlot","iconPath","iconSvg","_createBlock","_createElementVNode","text","actionsContainer","_createVNode","_unref","_createTextVNode","ariaLabelClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiIA,UAAM,QAAQ;AAoDd,UAAM,OAAO;AAOb,UAAM,QAAQA,SAAA;AAmBd,UAAM,WAAW,SAAS,MAAM,CAAC,MAAM,OAAO;AAC9C,UAAM,aAAa,MAAM,CAAC,CAAC,MAAM;AACjC,UAAM,UAAU,MAAM,QAAQ,MAAM,YAAY,MAAM,WAAW,CAAC,CAAC,MAAM,IAAI;;0BAnI5EC,mBAsCM,OAAA;AAAA,QArCL,uBAAM,WAAS;AAAA,uBACWC,KAAAA,OAAO,EAAA,GAAA;AAAA,UAAqCC,uBAAAA,KAAAA,YAAY,WAAA;AAAA,+BAAsC,QAAA;AAAA,QAAO;;QAKnH,aAAZC,UAAA,GAAAH,mBAUO,QAVP,YAUO;AAAA,UATNI,WAQO,yBARP,MAQO;AAAA,YALCC,KAAAA,YAAYC,KAAAA,wBADnBC,YAKc,kBAAA;AAAA;cAHb,QAAA;AAAA,cACC,MAAMF,KAAAA;AAAAA,cACN,KAAKA,KAAAA,WAAW,SAAYC,KAAAA;AAAAA,cAC5B,MAAM;AAAA,YAAA;;;QAGVE,mBAEO,QAFP,YAEO;AAAA,UADNJ,WAAuB,4BAAvB,MAAuB;AAAA,4CAAdK,KAAAA,IAAI,GAAA,CAAA;AAAA,UAAA;;QAGP,SAAA,SAAY,WAAA,kBADnBF,YAgBY,WAAA;AAAA;UAdX,OAAM;AAAA,UACL,WAAWG,KAAAA;AAAAA,UACX,eAAa,SAAA;AAAA,UACd,SAAQ;AAAA,QAAA;2BACR,MAQiB;AAAA,YAPV,SAAA,sBADPH,YAQiB,gBAAA;AAAA;cANhB,qBAAA;AAAA,cACC,+CAAO,KAAI,OAAA;AAAA,YAAA;cACD,cACV,MAAgD;AAAA,gBAAhDI,YAAgD,kBAAA;AAAA,kBAA7B,MAAMC,MAAA,QAAA;AAAA,kBAAW,MAAM;AAAA,gBAAA;;+BAChC,MACX;AAAA,gBADWC,gBAAA,sBACRC,KAAAA,cAAc,GAAA,CAAA;AAAA,cAAA;;;YAElBV,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcCollectionList-BsgtKu_8.mjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span\n\t\t\tv-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{ 'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input\n\t\t\t\tv-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component\n\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.ts'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\nimport { getRoute } from '../NcRichText/autolink.ts'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The collection\n\t\t */\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Current error if any\n\t\t */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: [\n\t\t'removeResource',\n\t\t'renameCollection',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter((resource) => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('removeResource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('renameCollection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: var(--default-clickable-area);\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-inline-start: var(--default-clickable-area);\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-inline-end: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\n/**\n * Extracts the OCS data from a response\n *\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n *\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n *\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n *\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref } from 'vue'\nimport {\n\taddResourceService,\n\tcreateCollectionService,\n\tgetCollectionsByResourceService,\n\tremoveResourceService,\n\trenameCollectionService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tstoredCollections.value = collections\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tstoredCollections.value.push(collection)\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tstoredCollections.value = storedCollections.value.filter((item) => item.id !== collectionId)\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex((item) => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tstoredCollections.value[index] = collection\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\t/**\n\t * @param {*} param0\n\t */\n\tasync function addResourceToCollection({ collectionId, resourceType, resourceId }) {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect\n\t\t\t\t\tref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem\n\t\t\tv-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\nimport { t } from '../../l10n.ts'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport { searchService } from './service.ts'\nimport { useCollections } from './useCollections.js'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then((collections) => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tlogger.error('Failed to search for collections', { error })\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter((collection) => collection.resources\n\t\t\t\t.some((resource) => resource && resource.id === String(this.id) && resource.type === this.type))\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach((type) => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find((collection) => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then((resourceId) => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tloger.error('[NcCollectionList] No resource selected', e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tlogger.error(error, { error: e })\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((e) => {\n\t\t\t\t\tlogger.error(t('Failed to rename the project'), { error: e })\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_8","_openBlock","_createElementBlock","_createVNode","_toDisplayString","_createElementVNode","_hoisted_2","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_normalizeClass","_hoisted_4","_Transition","_hoisted_5","_hoisted_6","_withCtx"],"mappings":";;;;;;;;;;;;AAiFA,MAAKA,cAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,YAAY;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA,IACN;AAAA,IACA;AAAA;EAGD,OAAO;AACN,WAAO;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACV;AAAA,EACD;AAAA,EAEA,UAAU;AAAA,IACT,UAAU;AACT,aAAO,CAAC,aAAa,CAAC,SAAS,SAAS;AAAA,IACzC;AAAA,IAEA,YAAY;AACX,aAAO,CAAC,aAAa,mBAAmB,SAAS;AAAA,IAClD;AAAA,IAEA,YAAY;AAEX,aAAO,KAAK,WAAW,WAAW,OAAO,CAAC,aAAa,CAAC,MAAM,QAAQ,QAAQ,CAAC,KAAK,CAAA;AAAA,IACrF;AAAA,IAEA,eAAe;AACd,aAAO,CAAC,aAAa;AACpB,cAAM,QAAQ,SAAS,KAAK,SAAS,SAAS,IAAI;AAElD,eAAO,QACJ,EAAE,WAAW,eAAe,IAAI,OAAO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AAA,YACxBX,mBAIO,QAJP,YAIO;AAAA,cAHM,OAAO,sBAAnBH,mBAAiE,QAAA;AAAA;gBAAtC,OAAKS,eAAA,CAAE,OAAO,OAAa,QAAQ,CAAA;AAAA,6BACzC,OAAO,WAAM,kBAAlCF,YAA2F,qBAAA;AAAA;gBAAjD,qBAAA;AAAA,gBAAmB,gBAAc,OAAO;AAAA;cAClFJ,mBAAqD,QAArD,YAAqDD,gBAAtB,OAAO,KAAK,GAAA,CAAA;AAAA;;2BAG7C,MAEI;AAAA,YAFJC,mBAEI,KAFJ,YAEID,gBADA,SAAA,EAAC,wDAAA,CAAA,GAAA,CAAA;AAAA;;;;;IAKRD,YAIaU,YAAA,EAJD,MAAK,OAAM,GAAA;AAAA,uBACtB,MAEK;AAAA,QAFK,MAAA,sBAAVX,mBAEK,MAFL,YAEKE,gBADD,MAAA,KAAK,GAAA,CAAA;;;;sBAGVF,mBAMmDK,UAAA,MAAAC,WAL7B,SAAA,aAAW,CAAzB,eAAU;0BADlBC,YAMmD,iCAAA;AAAA,QAJjD,KAAK,WAAW;AAAA,QAChB;AAAA,QACA,OAAO,MAAA,iBAAiB,WAAW,EAAE;AAAA,QACrC,oBAAmB,SAAA;AAAA,QACnB,kBAAiB,OAAA;AAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidget-BxIt1qRx.mjs","sources":["../../node_modules/vue-material-design-icons/Check.vue","../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon check-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=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CheckIcon\",\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## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t},\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent\n\t\t\tv-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent\n\t\t\t\tv-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a\n\t\t\tv-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { t } from '../../l10n.ts'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.ts'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-element);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-block: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-inline-start: 8px;\n\t\tmax-height: var(--default-clickable-area);\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_createBlock","_renderSlot","_createVNode","_Fragment","_renderList","_toHandlers"],"mappings":";;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,0DAAyD;;;sBAXrEC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IAClB,cAAY,OAAA;AAAA,IACb,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAK,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAA;AAAA,MACP,OAAM;AAAA,MACL,OAAO,OAAA;AAAA,M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I,KAAA,EAFD,OAAM,UAAS,GAAC,KAEnB;AAAA;;;UAKc,OAAA,MAAM,WAAM,IAA7BG,WASO,0CATP,MASO;AAAA,MAPC,OAAA,oCADPD,YAOiB,2BAAA;AAAA;QALf,aAAa,OAAA;AAAA;QACH,cAEV,MAAgC;AAAA,UAAhCC,WAAgC,KAAA,QAAA,oBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;eAMvB,SAAA,yBADZL,mBAOI,KAAA;AAAA;MALF,MAAM,OAAA;AAAA,MACP,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,uBACN,OAAA,aAAa,GAAA,GAAA,UAAA;;;;","x_google_ignoreList":[0]}
|
package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs","sources":["../../src/components/NcFormBoxCopyButton/useCopy.ts","../../src/components/NcFormBoxCopyButton/NcFormBoxCopyButton.vue"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MaybeRefOrGetter } from 'vue'\n\nimport { ref, toValue } from 'vue'\n\nconst DELAY = 2000\n\n/**\n * Copy content to clipboard with copied state\n *\n * @param content - Content to copy\n */\nexport function useCopy(content: MaybeRefOrGetter<string>) {\n\tconst isCopied = ref(false)\n\n\t/**\n\t * Copy the content to clipboard\n\t */\n\tasync function copy() {\n\t\tif (isCopied.value) {\n\t\t\treturn\n\t\t}\n\n\t\tconst value = toValue(content)\n\t\ttry {\n\t\t\tawait navigator.clipboard.writeText(value)\n\t\t} catch {\n\t\t\t// Fallback for a case when clipboard API is not available or permission denied\n\t\t\tprompt('', value)\n\t\t}\n\n\t\tisCopied.value = true\n\t\tsetTimeout(() => {\n\t\t\tisCopied.value = false\n\t\t}, DELAY)\n\t}\n\n\treturn {\n\t\tisCopied,\n\t\tcopy,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { mdiCheck, mdiContentCopy } from '@mdi/js'\nimport { whenever } from '@vueuse/core'\nimport { computed } from 'vue'\nimport NcFormBoxButton from '../NcFormBoxButton/NcFormBoxButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { t } from '../../l10n.ts'\nimport { useCopy } from './useCopy.ts'\n\nconst {\n\tlabel = undefined,\n\tvalue,\n\tdisabled = false,\n} = defineProps<{\n\t/** Copied value's value */\n\tlabel?: string\n\t/** The value to be copied */\n\tvalue: string\n\t/** Native disabled attribute */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Value has been successfully copied */\n\tcopy: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n}>()\n\nconst { isCopied, copy } = useCopy(() => value)\n\nconst icon = computed(() => isCopied.value ? mdiCheck : mdiContentCopy)\n\nwhenever(isCopied, () => emit('copy'))\n</script>\n\n<template>\n\t<NcFormBoxButton\n\t\t:disabled\n\t\tinverted-accent\n\t\t@click=\"copy\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t{{ isCopied ? t('Copied') : t('Copy to clipboard') }}\n\t\t\t</span>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #description>\n\t\t\t{{ value }}\n\t\t</template>\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :path=\"icon\" inline />\n\t\t</template>\n\t</NcFormBoxButton>\n</template>\n\n<docs>\n### General\n\n`NcFormBoxButton` set up to be a copy button.\n\n```vue\n<template>\n\t<NcFormGroup label=\"CalDAV\" description=\"Access Nextcloud calendars from other apps and devices\">\n\t\t<NcFormBox>\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"CalDAV URL\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/\" />\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"Server Address for iOS and macOS\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/principals/users/user/\" />\n\t\t</NcFormBox>\n\t</NcFormGroup>\n</template>\n```\n</docs>\n"],"names":["_createBlock","disabled","_unref","value","_createVNode","$slots","label","_createElementVNode","_toDisplayString","_renderSlot"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,QAAQ;AAOP,SAAS,QAAQ,SAAmC;AAC1D,QAAM,WAAW,IAAI,KAAK;AAK1B,iBAAe,OAAO;AACrB,QAAI,SAAS,OAAO;AACnB;AAAA,IACD;AAEA,UAAM,QAAQ,QAAQ,OAAO;AAC7B,QAAI;AACH,YAAM,UAAU,UAAU,UAAU,KAAK;AAAA,IAC1C,QAAQ;AAEP,aAAO,IAAI,KAAK;AAAA,IACjB;AAEA,aAAS,QAAQ;AACjB,eAAW,MAAM;AAChB,eAAS,QAAQ;AAAA,IAClB,GAAG,KAAK;AAAA,EACT;AAEA,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EAAA;AAEF;;;;;;;;;;;AChBA,UAAM,OAAO;AAUb,UAAM,EAAE,UAAU,KAAA,IAAS,QAAQ,MAAM,QAAA,KAAK;AAE9C,UAAM,OAAO,SAAS,MAAM,SAAS,QAAQ,WAAW,cAAc;AAEtE,aAAS,UAAU,MAAM,KAAK,MAAM,CAAC;;0BAIpCA,YAkBkB,iBAAA;AAAA,QAjBhB,UAAAC,KAAAA;AAAAA,QACD,mBAAA;AAAA,QACC,SAAOC,MAAA,IAAA;AAAA,MAAA;QASG,qBACV,MAAW;AAAA,0CAARC,KAAAA,KAAK,GAAA,CAAA;AAAA,QAAA;QAEE,cACV,MAAwC;AAAA,UAAxCC,YAAwC,kBAAA;AAAA,YAArB,MAAM,KAAA;AAAA,YAAM,QAAA;AAAA,UAAA;;;;QAZhBC,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,mBAEO,QAFP,YAEOC,gBADHN,kBAAWA,MAAA,CAAA,cAAcA,MAAA,CAAA,EAAC,mBAAA,CAAA,GAAA,CAAA;AAAA,YAE9BO,WAEO,4BAFP,MAEO;AAAA,8CADHH,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcIconSvgWrapper-5AA93z-F.mjs","sources":["../../src/components/NcIconSvgWrapper/NcIconSvgWrapper.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nRender raw SVG string icons.\n\n### Usage within `icon`-slot\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<NcButton aria-label=\"Close\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"closeSvg\" name=\"Close\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Settings\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"cogSvg\" name=\"Cog\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Add\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"plusSvg\" name=\"Plus\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Send\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiSend\" name=\"Send\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Star\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiStar\" name=\"Star\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport closeSvg from '@mdi/svg/svg/close.svg?raw'\nimport cogSvg from '@mdi/svg/svg/cog.svg?raw'\nimport plusSvg from '@mdi/svg/svg/plus.svg?raw'\nimport { mdiSend } from '@mdi/js'\nimport { mdiStar } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\t// This icons are static data, so you do not need to put them into `data` which will make them reactive\n\t\treturn {\n\t\t\tcloseSvg,\n\t\t\tcogSvg,\n\t\t\tplusSvg,\n\t\t\tmdiSend,\n\t\t\tmdiStar,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(5, max-content);\n\tgap: 10px;\n}\n</style>\n```\n\n### Inline usage inside text\n\n```vue\n<template>\n\t<p>\n\t\tThis is my <NcIconSvgWrapper inline :path=\"mdiStar\" /> Favorite\n\t</p>\n</template>\n<script>\nimport { mdiStar } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiStar,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Directional usage\n\nThe `directional` property allows to enable a language direction aware icon.\nThis icon component can be used in places where an language direction aware icon should be used,\nfor example if an arrow pointing to the left it used it often points in the wrong direction for right-to-left languages.\nIn this cases this icon can be used which will always point into the logical \"start\" direction.\n\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcButton @click=\"isRtl = !isRtl\">Toggle RTL</NcButton>\n\t\t<div class=\"directional\" :dir=\"isRtl ? 'rtl' : 'ltr'\">\n\t\t\t<NcButton alignment=\"start\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiChevronLeft\" />\n\t\t\t\t</template>\n\t\t\t\tPrevious\n\t\t\t</NcButton>\n\t\t\t<NcButton alignment=\"end-reverse\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiChevronRight\" />\n\t\t\t\t</template>\n\t\t\t\tNext\n\t\t\t</NcButton>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiChevronLeft, mdiChevronRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiChevronLeft,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisRtl: false\n\t\t}\n\t},\n}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: calc(2 * var(--default-grid-baseline));\n\tmax-width: 300px;\n}\n\n.directional {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: calc(2 * var(--default-grid-baseline));\n}\n\n.directional * {\n\tflex: 1 50%;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport DOMPurify from 'dompurify'\nimport { computed, warn } from 'vue'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Make the icon directional, meaning it is langauge direction aware.\n\t * If the icon is placed in a right-to-left context it will be mirrored vertically.\n\t */\n\tdirectional?: boolean\n\n\t/**\n\t * Set if the icon should be used as inline content e.g. within text.\n\t * By default the icon is made a block element for use inside `icon`-slots.\n\t */\n\tinline?: boolean\n\n\t/**\n\t * Raw SVG string to render\n\t */\n\tsvg?: string\n\n\t/**\n\t * Label of the icon, used in aria-label\n\t */\n\tname?: string\n\n\t/**\n\t * Raw SVG path to render. Takes precedence over the SVG string in the `svg` prop.\n\t */\n\tpath?: string\n\n\t/**\n\t * Size of the icon to show. Only use if not using within an icon slot.\n\t * Defaults to 20px which is the Nextcloud icon size for all icon slots.\n\t */\n\tsize?: number | 'auto'\n}>(), {\n\tname: undefined,\n\tpath: '',\n\tsize: 20,\n\tsvg: '',\n})\n\n/**\n * Icon size used in CSS\n */\nconst iconSize = computed(() => typeof props.size === 'number' ? `${props.size}px` : props.size)\n\n/**\n * The sanitized SVG or undefined if path shall be used\n */\nconst cleanSvg = computed(() => {\n\tif (!props.svg || props.path) {\n\t\treturn\n\t}\n\n\tconst svg = DOMPurify.sanitize(props.svg)\n\n\tconst svgDocument = new DOMParser().parseFromString(svg, 'image/svg+xml')\n\n\tif (svgDocument.querySelector('parsererror')) {\n\t\twarn('SVG is not valid')\n\t\treturn ''\n\t}\n\n\tif (svgDocument.documentElement.id) {\n\t\tsvgDocument.documentElement.removeAttribute('id')\n\t}\n\n\treturn svgDocument.documentElement.outerHTML\n})\n</script>\n\n<template>\n\t<span\n\t\t:aria-hidden=\"name ? undefined : 'true'\"\n\t\t:aria-label=\"name || undefined\"\n\t\tclass=\"icon-vue\"\n\t\t:class=\"{\n\t\t\t'icon-vue--directional': directional,\n\t\t\t'icon-vue--inline': inline,\n\t\t}\"\n\t\trole=\"img\">\n\t\t<svg v-if=\"!cleanSvg\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path :d=\"path\" />\n\t\t</svg>\n\t\t<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component,vue/no-v-html -->\n\t\t<span v-else v-html=\"cleanSvg\" />\n\t</span>\n</template>\n\n<style lang=\"scss\" scoped>\n.icon-vue {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: var(--default-clickable-area);\n\tmin-height: var(--default-clickable-area);\n\topacity: 1;\n\n\t&#{&}--inline {\n\t\tdisplay: inline-flex !important;\n\t\tmin-width: fit-content;\n\t\tmin-height: fit-content;\n\t\tvertical-align: text-bottom;\n\t}\n\n\t// Icon svg wrapper\n\tspan {\n\t\tline-height: 0;\n\t}\n\n\t&:deep(svg) {\n\t\tfill: currentColor;\n\t\twidth: v-bind('iconSize');\n\t\theight: v-bind('iconSize');\n\t\tmax-width: v-bind('iconSize');\n\t\tmax-height: v-bind('iconSize');\n\t}\n\n\t&--directional:deep(svg:dir(rtl)) {\n\t\ttransform: scaleX(-1);\n\t}\n}\n</style>\n"],"names":["_createElementBlock","name","directional","inline","_openBlock","_createElementVNode","path"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,QAAQ;AA2Cd,UAAM,WAAW,SAAS,MAAM,OAAO,MAAM,SAAS,WAAW,GAAG,MAAM,IAAI,OAAO,MAAM,IAAI;AAK/F,UAAM,WAAW,SAAS,MAAM;AAC/B,UAAI,CAAC,MAAM,OAAO,MAAM,MAAM;AAC7B;AAAA,MACD;AAEA,YAAM,MAAM,UAAU,SAAS,MAAM,GAAG;AAExC,YAAM,cAAc,IAAI,UAAA,EAAY,gBAAgB,KAAK,eAAe;AAExE,UAAI,YAAY,cAAc,aAAa,GAAG;AAC7C,aAAK,kBAAkB;AACvB,eAAO;AAAA,MACR;AAEA,UAAI,YAAY,gBAAgB,IAAI;AACnC,oBAAY,gBAAgB,gBAAgB,IAAI;AAAA,MACjD;AAEA,aAAO,YAAY,gBAAgB;AAAA,IACpC,CAAC;;0BAIAA,mBAcO,QAAA;AAAA,QAbL,eAAaC,KAAAA,OAAO,SAAS;AAAA,QAC7B,cAAYA,KAAAA,QAAQ;AAAA,QACrB,uBAAM,YAAU;AAAA,mCACsBC,KAAAA;AAAAA,8BAAoCC,KAAAA;AAAAA,QAAAA;QAI1E,MAAK;AAAA,MAAA;SACO,SAAA,SAAZC,aAAAJ,mBAEM,OAFN,YAEM;AAAA,UADLK,mBAAkB,QAAA,EAAX,GAAGC,KAAAA,QAAI,MAAA,GAAA,UAAA;AAAA,QAAA,oBAGfN,mBAAiC,QAAA;AAAA;UAApB,WAAQ,SAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcInputField-DwkKsbxv.mjs","sources":["../../src/components/NcInputField/NcInputField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nThis component is used by the other Fields components.\nIt extends and styles an HTMLInputElement.\n\nYou cannot use it as is. This is here for documentation purposes.\nSee the other field components.\n\nFor a list of all available props and attributes, please check the [HTMLInputElement documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { mdiAlertCircle, mdiCheck } from '@mdi/js'\nimport { computed, useAttrs, useTemplateRef, warn } from 'vue'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { isLegacy } from '../../utils/legacy.ts'\nimport NcButton from '../NcButton/index.ts'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.ts'\n\nexport interface NcInputFieldProps {\n\t/**\n\t * Class to add to the root component.\n\t */\n\tclass?: VueClassType\n\n\t/**\n\t * Class to add to the input field.\n\t * Necessary to use NcInputField in the NcActionInput component.\n\t */\n\tinputClass?: VueClassType\n\n\t/**\n\t * HTML id of the input field\n\t */\n\tid?: string\n\n\t/**\n\t * The input label, always provide one for accessibility purposes.\n\t * On Nextcloud before version 32 this will also be used as a placeholder unless the placeholder\n\t * prop is populated with a different string.\n\t *\n\t * Note: If the background color is not `--color-main-background` consider using an external label instead (see `labelOutside`).\n\t */\n\tlabel?: string\n\n\t/**\n\t * Pass in true if you want to use an external label. This is useful\n\t * if you need a label that looks different from the one provided by\n\t * this component\n\t */\n\tlabelOutside?: boolean\n\n\t/**\n\t * The type of the input element\n\t */\n\ttype?: 'text' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'number'\n\n\t/**\n\t * The placeholder of the input.\n\t * On Nextcloud before version 32 this would default to the `label` prop.\n\t * On Nextcloud 32 and on v9 of this library it will no longer have a default value.\n\t */\n\tplaceholder?: string\n\n\t/**\n\t * Controls whether to display the trailing button.\n\t */\n\tshowTrailingButton?: boolean\n\n\t/**\n\t * Label of the trailing button\n\t *\n\t * Required when showTrailingButton is set\n\t */\n\ttrailingButtonLabel?: string\n\n\t/**\n\t * Toggles the success state of the component. Adds a checkmark icon.\n\t */\n\tsuccess?: boolean\n\n\t/**\n\t * Toggles the error state of the component. Adds an error icon.\n\t */\n\terror?: boolean\n\n\t/**\n\t * Additional helper text message\n\t *\n\t * This will be displayed beneath the input field. In case the field is\n\t * also marked as having an error, the text will be displayed in red.\n\t */\n\thelperText?: string\n\n\t/**\n\t * Disable the input field\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * Specifies whether the input should have a pill form.\n\t * By default, input has rounded corners.\n\t */\n\tpill?: boolean\n}\n\ndefineOptions({\n\tinheritAttrs: false,\n})\n\n/**\n * The value of the input field\n * If type is 'number' and a number is passed as value than the type of `update:value` will also be 'number'\n */\nconst modelValue = defineModel<string | number>({ required: true })\n\nconst props = withDefaults(defineProps<NcInputFieldProps>(), {\n\tclass: '',\n\thelperText: '',\n\tid: () => createElementId(),\n\tinputClass: '',\n\tlabel: undefined,\n\tplaceholder: undefined,\n\ttrailingButtonLabel: undefined,\n\ttype: 'text',\n})\n\nconst emit = defineEmits<{\n\ttrailingButtonClick: [event: MouseEvent]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Leading icon, set the size to 20.\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Icon for the trailing button.\n\t */\n\t'trailing-button-icon'?: Slot\n}>()\n\n// public API\ndefineExpose({\n\tfocus,\n\tselect,\n})\n\nconst attrs = useAttrs()\n\nconst inputElement = useTemplateRef('input')\n\nconst hasTrailingIcon = computed(() => props.showTrailingButton || props.success)\n\nconst internalPlaceholder = computed(() => {\n\tif (props.placeholder) {\n\t\treturn props.placeholder\n\t}\n\tif (props.label) {\n\t\t// if there is a label we use it as fallback on legacy but on current we need\n\t\t// to pass at least an empty string as placeholder to make css `:placeholder-shown` work.\n\t\treturn isLegacy ? props.label : ''\n\t}\n\treturn undefined\n})\n\nconst isValidLabel = computed(() => {\n\tconst isValidLabel = props.label || props.labelOutside\n\tif (!isValidLabel) {\n\t\twarn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t}\n\treturn isValidLabel\n})\n\nconst ariaDescribedby = computed(() => {\n\tconst ariaDescribedby: string[] = []\n\tif (props.helperText) {\n\t\tariaDescribedby.push(`${props.id}-helper-text`)\n\t}\n\tif (attrs['aria-describedby']) {\n\t\tariaDescribedby.push(String(attrs['aria-describedby']))\n\t}\n\treturn ariaDescribedby.join(' ') || undefined\n})\n\n/**\n * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputElement.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputElement.value!.select()\n}\n\n/**\n * Handle the input event of the HTML input.\n * Parses numbers in case of numeric type.\n *\n * @param event - The input event\n */\nfunction handleInput(event: Event) {\n\tconst target = event.target as HTMLInputElement\n\tmodelValue.value = props.type === 'number' && typeof modelValue.value === 'number'\n\t\t? parseFloat(target.value)\n\t\t: target.value\n}\n</script>\n\n<template>\n\t<div\n\t\tclass=\"input-field\"\n\t\t:class=\"[{\n\t\t\t'input-field--disabled': disabled,\n\t\t\t'input-field--error': error,\n\t\t\t'input-field--label-outside': labelOutside || !isValidLabel,\n\t\t\t'input-field--leading-icon': !!$slots.icon,\n\t\t\t'input-field--trailing-icon': hasTrailingIcon,\n\t\t\t'input-field--pill': pill,\n\t\t\t'input-field--success': success,\n\t\t\t'input-field--legacy': isLegacy,\n\t\t}, $props.class]\">\n\t\t<div class=\"input-field__main-wrapper\">\n\t\t\t<input\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t:id\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\tclass=\"input-field__input\"\n\t\t\t\t:class=\"inputClass\"\n\t\t\t\t:disabled\n\t\t\t\t:placeholder=\"internalPlaceholder\"\n\t\t\t\t:type\n\t\t\t\t:value=\"modelValue.toString()\"\n\t\t\t\t@input=\"handleInput\">\n\t\t\t<!-- Label -->\n\t\t\t<label\n\t\t\t\tv-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"input-field__label\"\n\t\t\t\t:for=\"id\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\n\t\t\t<!-- Leading icon -->\n\t\t\t<div v-show=\"!!$slots.icon\" class=\"input-field__icon input-field__icon--leading\">\n\t\t\t\t<slot name=\"icon\" />\n\t\t\t</div>\n\n\t\t\t<!-- trailing button -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"showTrailingButton\"\n\t\t\t\tclass=\"input-field__trailing-button\"\n\t\t\t\t:aria-label=\"trailingButtonLabel\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t\t@click=\"emit('trailingButtonClick', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<slot name=\"trailing-button-icon\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<!-- Success and error icons -->\n\t\t\t<div\n\t\t\t\tv-else-if=\"success || error\"\n\t\t\t\tclass=\"input-field__icon input-field__icon--trailing\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"success\" :path=\"mdiCheck\" />\n\t\t\t\t<NcIconSvgWrapper v-else :path=\"mdiAlertCircle\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<p\n\t\t\tv-if=\"helperText\"\n\t\t\t:id=\"`${id}-helper-text`\"\n\t\t\tclass=\"input-field__helper-text-message\">\n\t\t\t<NcIconSvgWrapper v-if=\"success\" class=\"input-field__helper-text-message__icon\" :path=\"mdiCheck\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"error\" class=\"input-field__helper-text-message__icon\" :path=\"mdiAlertCircle\" />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n\n.input-field {\n\t--input-border-color: var(--color-border-maxcontrast);\n\t--input-border-radius: var(--border-radius-element);\n\t// Used e.g. if border width differs between focused and unfocused we need to compensate to prevent jumping\n\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t// The padding before the input can start (leading button or border)\n\t--input-padding-start: var(--border-radius-element);\n\t// The padding where the input has to end (trailing button or border)\n\t--input-padding-end: var(--border-radius-element);\n\t// positional styles\n\tposition: relative;\n\twidth: 100%;\n\tmargin-block-start: 6px; // for the label in active state\n\n\t&--disabled {\n\t\topacity: 0.4;\n\t\tfilter: saturate(0.4);\n\t}\n\n\t// If there is no internal label we reset the margin reserved for it\n\t&--label-outside {\n\t\tmargin-block-start: 0;\n\t}\n\n\t&--leading-icon {\n\t\t--input-padding-start: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--trailing-icon {\n\t\t--input-padding-end: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--pill {\n\t\t--input-border-radius: var(--border-radius-pill);\n\t}\n\n\t&__main-wrapper {\n\t\theight: var(--default-clickable-area);\n\t\tpadding: var(--border-width-input, 2px);\n\t\tposition: relative;\n\n\t\t&:not(:has([disabled])):has(input:focus),\n\t\t&:not(:has([disabled])):has(input:active) {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t&__input {\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: none;\n\t\tborder-radius: var(--input-border-radius);\n\t\tbox-shadow:\n\t\t\t0 -1px var(--input-border-color),\n\t\t\t0 0 0 1px color-mix(in srgb, var(--input-border-color), 65% transparent);\n\n\t\tcursor: pointer;\n\t\t-webkit-appearance: textfield !important;\n\t\t-moz-appearance: textfield !important;\n\t\tappearance: textfield !important;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\theight: 100% !important;\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\tpadding-block: var(--input-border-width-offset);\n\t\tpadding-inline: calc(var(--input-padding-start) + var(--input-border-width-offset)) calc(var(--input-padding-end) + var(--input-border-width-offset));\n\n\t\t&::placeholder {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t// prevent Blink and WebKit to add an additional button when type is set to search\n\t\t// we have our properly styled trailing button anyways.\n\t\t&::-webkit-search-cancel-button {\n\t\t\t// its a weird bug in Blink that this rule must not be grouped with the other selectors below.\n\t\t\t// otherwise it is not recognized by Blink\n\t\t\tdisplay: none;\n\t\t}\n\t\t&::-webkit-search-decoration,\n\t\t&::-webkit-search-results-button,\n\t\t&::-webkit-search-results-decoration,\n\t\t&::-ms-clear {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&:hover:not([disabled]) {\n\t\t\tbox-shadow: 0 0 0 1px var(--input-border-color);;\n\t\t}\n\n\t\t&:active:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\t--input-border-color: var(--color-main-text);\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t\tborder: var(--border-width-input-focused, 2px) solid var(--input-border-color);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t}\n\n\t\t&:focus + .input-field__label,\n\t\t&:hover:not(:placeholder-shown) + .input-field__label {\n\t\t\tcolor: var(--color-main-text);\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\t}\n\n\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t&:not(&--label-outside) &__input:not(:focus)::placeholder {\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\t--input-label-font-size: var(--default-font-size);\n\t\tfont-size: var(--input-label-font-size);\n\n\t\tposition: absolute;\n\t\tmargin-inline: var(--input-padding-start) var(--input-padding-end);\n\t\tmax-width: fit-content;\n\t\tinset-block-start: calc((var(--default-clickable-area) - 1lh) / 2); // center the label vertically\n\t\tinset-inline: var(--border-width-input-focused, 2px);\n\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\t--input-label-font-size: 13px; // minimum allowed font size for accessibility\n\t\tline-height: 1.5; // minimum allowed line height for accessibility\n\t\t// 1.5 * font-size = line-height; line-height / 2 for centering and make it negative as we need to move outside the element\n\t\tinset-block-start: calc(-1.5 * var(--input-label-font-size) / 2);\n\t\tfont-weight: 500;\n\t\tborder-radius: var(--default-grid-baseline) var(--default-grid-baseline) 0 0;\n\t\tbackground-color: var(--color-main-background);\n\t\tpadding-inline: var(--default-grid-baseline);\n\t\tmargin-inline: calc(var(--input-padding-start) - var(--default-grid-baseline)) calc(var(--input-padding-end) - var(--default-grid-baseline));\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__icon {\n\t\tposition: absolute;\n\t\theight: var(--default-clickable-area);\n\t\twidth: var(--default-clickable-area);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\topacity: 0.7;\n\n\t\tinset-block-end: 0;\n\n\t\t&--leading {\n\t\t\tinset-inline-start: 0px;\n\t\t}\n\n\t\t&--trailing {\n\t\t\tinset-inline-end: 0px;\n\t\t}\n\t}\n\n\t&__trailing-button {\n\t\t--button-size: calc(var(--default-clickable-area) - 2 * var(--border-width-input-focused, 2px)) !important;\n\t\t--button-radius: calc(var(--input-border-radius) - var(--border-width-input-focused, 2px)); // lower radius as size is smaller\n\n\t\t&.button-vue {\n\t\t\tposition: absolute;\n\t\t\ttop: var(--border-width-input-focused, 2px);\n\t\t\tinset-inline-end: var(--border-width-input-focused, 2px);\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tpadding-inline: var(--border-radius-element);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\t}\n\n\t&--error {\n\t\t.input-field__helper-text-message,\n\t\t.input-field__icon--trailing {\n\t\t\tcolor: var(--color-text-error, var(--color-error));\n\t\t}\n\t}\n\n\t&--error .input-field__input,\n\t&__input:user-invalid {\n\t\t--input-border-color: var(--color-border-error, var(--color-error)) !important; //Override hover border color\n\t\t&:focus-visible {\n\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t}\n\t}\n\n\t&--success {\n\t\t.input-field__input {\n\t\t\t--input-border-color: var(--color-border-success, var(--color-success)) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\t\t.input-field__helper-text-message__icon {\n\t\t\tcolor: var(--color-border-success, var(--color-success));\n\t\t}\n\t}\n\n\t&--legacy {\n\t\t.input-field__input {\n\t\t\tbox-shadow: 0 0 0 1px var(--input-border-color) inset;\n\t\t}\n\n\t\t.input-field__main-wrapper:hover:not(:has([disabled])) {\n\t\t\tpadding: 0;\n\n\t\t\t.input-field__input {\n\t\t\t\t--input-border-color: var(--color-main-text);\n\t\t\t\t// Reset padding offset when focused\n\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\tborder: var(--border-width-input-focused, 2px) solid var(--input-border-color);\n\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":["_useModel","isValidLabel","ariaDescribedby","_createElementBlock","disabled","error","labelOutside","$slots","pill","success","_unref","$props","_createElementVNode","_mergeProps","id","inputClass","type","label","_withDirectives","_renderSlot","showTrailingButton","_createBlock","trailingButtonLabel","_openBlock","helperText","_createTextVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4HA,UAAM,aAAaA,SAA4B,SAAA,YAAmB;AAElE,UAAM,QAAQ;AAWd,UAAM,OAAO;AAiBb,aAAa;AAAA,MACZ;AAAA,MACA;AAAA,IAAA,CACA;AAED,UAAM,QAAQ,SAAA;AAEd,UAAM,eAAe,eAAe,OAAO;AAE3C,UAAM,kBAAkB,SAAS,MAAM,MAAM,sBAAsB,MAAM,OAAO;AAEhF,UAAM,sBAAsB,SAAS,MAAM;AAC1C,UAAI,MAAM,aAAa;AACtB,eAAO,MAAM;AAAA,MACd;AACA,UAAI,MAAM,OAAO;AAGhB,eAAO,WAAW,MAAM,QAAQ;AAAA,MACjC;AACA,aAAO;AAAA,IACR,CAAC;AAED,UAAM,eAAe,SAAS,MAAM;AACnC,YAAMC,gBAAe,MAAM,SAAS,MAAM;AAC1C,UAAI,CAACA,eAAc;AAClB,aAAK,mJAAmJ;AAAA,MACzJ;AACA,aAAOA;AAAAA,IACR,CAAC;AAED,UAAM,kBAAkB,SAAS,MAAM;AACtC,YAAMC,mBAA4B,CAAA;AAClC,UAAI,MAAM,YAAY;AACrBA,yBAAgB,KAAK,GAAG,MAAM,EAAE,cAAc;AAAA,MAC/C;AACA,UAAI,MAAM,kBAAkB,GAAG;AAC9BA,yBAAgB,KAAK,OAAO,MAAM,kBAAkB,CAAC,CAAC;AAAA,MACvD;AACA,aAAOA,iBAAgB,KAAK,GAAG,KAAK;AAAA,IACrC,CAAC;AAQD,aAAS,MAAM,SAAwB;AACtC,mBAA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AA,CAAAA,CAAAA,KAAAA,OAAO,IAAI;AAAA,UAAA;UAMnBa,KAAAA,mCADPC,YAUWX,MAAA,QAAA,GAAA;AAAA;YARV,OAAM;AAAA,YACL,cAAYY,KAAAA;AAAAA,YACZ,UAAUlB,KAAAA;AAAAA,YACX,SAAQ;AAAA,YACP,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAE,KAAI,uBAAwB,MAAM;AAAA,UAAA;YAC/B,cACV,MAAoC;AAAA,cAApCe,WAAoC,KAAA,QAAA,wBAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;+CAM1BV,KAAAA,WAAWJ,KAAAA,SADvBkB,UAAA,GAAApB,mBAKM,OALN,YAKM;AAAA,YAFmBM,KAAAA,wBAAxBY,YAAoDX,MAAA,gBAAA,GAAA;AAAA;cAAlB,MAAMA,MAAA,QAAA;AAAA,YAAA,uCACxCW,YAAkDX,MAAA,gBAAA,GAAA;AAAA;cAAxB,MAAMA,MAAA,cAAA;AAAA,YAAA;;;QAI3Bc,KAAAA,2BADPrB,mBAOI,KAAA;AAAA;UALF,OAAOW,KAAAA,EAAE;AAAA,UACV,OAAM;AAAA,QAAA;UACkBL,KAAAA,wBAAxBY,YAAmGX,MAAA,gBAAA,GAAA;AAAA;YAAlE,OAAM;AAAA,YAA0C,MAAMA,MAAA,QAAA;AAAA,UAAA,yBAC1DL,KAAAA,sBAA7BgB,YAA4GX,MAAA,gBAAA,GAAA;AAAA;YAAxE,OAAM;AAAA,YAA0C,MAAMA,MAAA,cAAA;AAAA,UAAA;UAAkBe,gBAAA,sBACzGD,KAAAA,UAAU,GAAA,CAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcListItem-BLSWE2Hb.mjs","sources":["../../src/components/NcListItem/NcListItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### Default Usage\n\n```vue\n<template>\n\t<ul>\n\t\t<NcListItem active\n\t\t\tbold\n\t\t\t:counter-number=\"123\"\n\t\t\tcounterType=\"highlighted\"\n\t\t\tdetails=\"1h\"\n\t\t\tname=\"This is an active element with highlighted counter\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"This is an active element with outlined counter\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:counter-number=\"123\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"This is an active element with normal counter\"\n\t\t\t:bold=\"false\"\n\t\t\t:active=\"true\"\n\t\t\t:counter-number=\"123\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #details>\n\t\t\t\t<LinkIcon :size=\"16\"/>\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#fff\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"Name of the element with highlighted counter\"\n\t\t\tbold\n\t\t\t:force-display-actions=\"true\"\n\t\t\tdetails=\"1h\"\n\t\t\t:counter-number=\"123\"\n\t\t\tcounterType=\"highlighted\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"Name of the element with outlined counter\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\t:counter-number=\"123\"\n\t\t\tcounterType=\"outlined\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"Name of the element with normal counter\"\n\t\t\t:bold=\"false\"\n\t\t\t:force-display-actions=\"true\"\n\t\t\tdetails=\"1h\"\n\t\t\t:counter-number=\"123\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"Name of the element\"\n\t\t\t:bold=\"false\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #name>\n\t\t\t\t<span style=\"display: flex; gap: 0.5rem; color: var(--color-favorite);\">\n\t\t\t\t\tFlexible styling within the first line of the component\n\t\t\t\t\t<div style=\"color: var(--color-text-error, var(--color-error));\">\n\t\t\t\t\t\tlike this.\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tIn this slot you can put both text and other components such as icons\n\t\t\t</template>\n\t\t\t<template #details>\n\t\t\t\t<LinkIcon :size=\"16\"/>\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"Without subname, Name of the element\"\n\t\t\t:bold=\"false\"\n\t\t\tdetails=\"1h\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #indicator>\n\t\t\t\t<!-- Color dot -->\n\t\t\t\t<CheckboxBlankCircle :size=\"16\" fill-color=\"#0082c9\"/>\n\t\t\t</template>\n\t\t</NcListItem>\n\t</ul>\n</template>\n\n<script>\n\timport CheckboxBlankCircle from 'vue-material-design-icons/CheckboxBlankCircle'\n\timport LinkIcon from 'vue-material-design-icons/Link'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheckboxBlankCircle,\n\t\t\tLinkIcon,\n\t\t}\n\t}\n</script>\n\n```\n\n### NcListItem one line mode\n```vue\n<NcListItem active\n\t:bold=\"false\"\n\t:counter-number=\"123\"\n\tcounterType=\"highlighted\"\n\tdetails=\"1h\"\n\tname=\"This is an active element with highlighted counter\"\n\tone-line>\n\t<template #icon>\n\t\t<NcAvatar disable-menu :size=\"34\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t</template>\n\t<template #subname>\n\t\tIn this slot you can put both text and other components such as icons\n\t</template>\n\t<template #indicator>\n\t\t<!-- Color dot -->\n\t\t<CheckboxBlankCircle :size=\"20\" fill-color=\"#fff\" />\n\t</template>\n\t<template #actions>\n\t\t<NcActionButton>\n\t\t\tButton one\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\tButton two\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\tButton three\n\t\t</NcActionButton>\n\t</template>\n</NcListItem>\n```\n### NcListItem with extra actions slot and customized icon\n\nThe `extra-actions` slot can be used to add other interactive components.\n\nThe `actions-icon` slot can be used to pass icon to the inner NcActions component.\n\n```vue\n<template>\n\t<div>\n\t\t<NcListItem\n\t\t\tname=\"This is an active element with extra actions slot\"\n\t\t\tbold\n\t\t\t:active=\"true\"\n\t\t\t:force-display-actions=\"true\">\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #extra-actions>\n\t\t\t\t<NcButton variant=\"primary\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconCog :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<template #actions-icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem\n\t\t\tname=\"This is an element with extra actions slot\"\n\t\t\tbold>\n\t\t\t<template #icon>\n\t\t\t\t<NcAvatar disable-menu :size=\"44\" user=\"janedoe\" display-name=\"Jane Doe\" />\n\t\t\t</template>\n\t\t\t<template #extra-actions>\n\t\t\t\t<NcButton variant=\"tertiary\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconPencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"tertiary\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconCog :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t\t<template #actions-icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton three\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t</div>\n</template>\n<script>\n\timport IconCog from 'vue-material-design-icons/Cog.vue'\n\timport IconNoteText from 'vue-material-design-icons/NoteText.vue'\n\timport IconPencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconCog,\n\t\t\tIconNoteText,\n\t\t\tIconPencil,\n\t\t},\n\t}\n</script>\n```\n### NcListItem compact mode\n```vue\n<template>\n\t<ul style=\"width: 350px;\">\n\t\t<NcListItem active\n\t\t\tcompact\n\t\t\tname=\"Active item\">\n\t\t\t<template #icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem compact\n\t\t\tname=\"Name of the element\">\n\t\t\t<template #icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem compact\n\t\t\tname=\"Name of the element\"\n\t\t\t:counter-number=\"1\">\n\t\t\t<template #icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tThis one is with subname\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem compact\n\t\t\tname=\"Name of the element\"\n\t\t\t:counter-number=\"3\">\n\t\t\t<template #icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tThis one is with subname\n\t\t\t</template>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton one\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\tButton two\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcListItem>\n\t\t<NcListItem compact\n\t\t\tname=\"Name of the element\"\n\t\t\t:counter-number=\"4\"\n\t\t\thref=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<IconNoteText :size=\"20\" />\n\t\t\t</template>\n\t\t\t<template #subname>\n\t\t\t\tThis one is with an external link\n\t\t\t</template>\n\t\t</NcListItem>\n\t</ul>\n</template>\n<script>\n\timport IconNoteText from 'vue-material-design-icons/NoteText.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconNoteText,\n\t\t},\n\t}\n</script>\n```\n</docs>\n\n<template>\n\t<!-- This wrapper can be either a router link or a `<li>` -->\n\t<component\n\t\t:is=\"to ? 'router-link' : 'NcVNodes'\"\n\t\tv-slot=\"{ href: routerLinkHref, navigate, isActive }\"\n\t\tv-bind=\"{ ...to && { custom: true, to } }\">\n\t\t<li\n\t\t\tclass=\"list-item__wrapper\"\n\t\t\t:class=\"{ 'list-item__wrapper--active': active ?? isActive }\"\n\t\t\tv-bind=\"$attrs\">\n\t\t\t<div\n\t\t\t\tref=\"list-item\"\n\t\t\t\tclass=\"list-item\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'list-item--compact': compact,\n\t\t\t\t\t'list-item--one-line': oneLine,\n\t\t\t\t}\"\n\t\t\t\t@mouseover=\"handleMouseover\"\n\t\t\t\t@mouseleave=\"handleMouseleave\">\n\t\t\t\t<a\n\t\t\t\t\t:id=\"anchorId || undefined\"\n\t\t\t\t\t:aria-label=\"linkAriaLabel\"\n\t\t\t\t\tclass=\"list-item__anchor\"\n\t\t\t\t\t:href=\"routerLinkHref || href\"\n\t\t\t\t\t:target=\"target || (href === '#' ? undefined : '_blank')\"\n\t\t\t\t\t:rel=\"href === '#' ? undefined : 'noopener noreferrer'\"\n\t\t\t\t\t@focus=\"showActions\"\n\t\t\t\t\t@focusout=\"handleBlur\"\n\t\t\t\t\t@click=\"onClick($event, navigate, routerLinkHref)\"\n\t\t\t\t\t@keydown.esc=\"hideActions\">\n\t\t\t\t\t<!-- @slot This slot is used for the NcAvatar or icon, the content of this slot must not be interactive -->\n\t\t\t\t\t<slot name=\"icon\" />\n\n\t\t\t\t\t<!-- Main content -->\n\t\t\t\t\t<div class=\"list-item-content\">\n\t\t\t\t\t\t<div class=\"list-item-content__main\">\n\t\t\t\t\t\t\t<div class=\"list-item-content__name\">\n\t\t\t\t\t\t\t\t<!-- @slot Slot for the first line of the component. prop 'name' is used as a fallback is no slots are provided -->\n\t\t\t\t\t\t\t\t<slot name=\"name\">{{ name }}</slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tv-if=\"hasSubname\"\n\t\t\t\t\t\t\t\tclass=\"list-item-content__subname\"\n\t\t\t\t\t\t\t\t:class=\"{ 'list-item-content__subname--bold': bold }\">\n\t\t\t\t\t\t\t\t<!-- @slot Slot for the second line of the component -->\n\t\t\t\t\t\t\t\t<slot name=\"subname\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"list-item-content__details\">\n\t\t\t\t\t\t\t<div v-if=\"showDetails\" class=\"list-item-details__details\">\n\t\t\t\t\t\t\t\t<!-- @slot This slot is used for some details in form of icon (prop `details` as a fallback) -->\n\t\t\t\t\t\t\t\t<slot name=\"details\">{{ details }}</slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- Counter and indicator -->\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tv-if=\"counterNumber !== 0 || hasIndicator\"\n\t\t\t\t\t\t\t\tv-show=\"showAdditionalElements\"\n\t\t\t\t\t\t\t\tclass=\"list-item-details__extra\">\n\t\t\t\t\t\t\t\t<NcCounterBubble\n\t\t\t\t\t\t\t\t\tv-if=\"counterNumber !== 0\"\n\t\t\t\t\t\t\t\t\t:count=\"counterNumber\"\n\t\t\t\t\t\t\t\t\t:active=\"active ?? isActive\"\n\t\t\t\t\t\t\t\t\tclass=\"list-item-details__counter\"\n\t\t\t\t\t\t\t\t\t:type=\"counterType\" />\n\n\t\t\t\t\t\t\t\t<span v-if=\"hasIndicator\" class=\"list-item-details__indicator\">\n\t\t\t\t\t\t\t\t\t<!-- @slot This slot is used for some indicator in form of icon -->\n\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\n\t\t\t\t<div v-if=\"$slots['extra-actions']\" class=\"list-item-content__extra-actions\">\n\t\t\t\t\t<!-- @slot Extra elements next to the right side quick menu -->\n\t\t\t\t\t<slot name=\"extra-actions\" />\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Actions -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"forceDisplayActions || displayActionsOnHoverFocus\"\n\t\t\t\t\tclass=\"list-item-content__actions\"\n\t\t\t\t\t@focusout=\"handleBlur\">\n\t\t\t\t\t<NcActions\n\t\t\t\t\t\tref=\"actions\"\n\t\t\t\t\t\t:primary=\"active ?? isActive\"\n\t\t\t\t\t\t:force-menu=\"forceMenu\"\n\t\t\t\t\t\t:aria-label=\"actionsAriaLabel\"\n\t\t\t\t\t\t@update:open=\"handleActionsUpdateOpen\">\n\t\t\t\t\t\t<template v-if=\"$slots['actions-icon']\" #icon>\n\t\t\t\t\t\t\t<!-- @slot Provide the custom icon for the right side quick menu -->\n\t\t\t\t\t\t\t<slot name=\"actions-icon\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<!-- @slot Provide the actions for the right side quick menu -->\n\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t</NcActions>\n\t\t\t\t</div>\n\n\t\t\t\t<div v-if=\"$slots.extra\" class=\"list-item__extra\">\n\t\t\t\t\t<!-- @slot Extra elements below the item -->\n\t\t\t\t\t<slot name=\"extra\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t</component>\n</template>\n\n<script>\nimport NcActions from '../NcActions/index.js'\nimport NcCounterBubble from '../NcCounterBubble/index.ts'\nimport NcVNodes from '../NcVNodes/index.ts'\n\nexport default {\n\tname: 'NcListItem',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcCounterBubble,\n\t\tNcVNodes,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * The details text displayed in the upper right part of the component\n\t\t */\n\t\tdetails: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Name (first line of text)\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The route for the router link.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value for the external link\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: '#',\n\t\t},\n\n\t\t/**\n\t\t * The HTML target attribute used for the link\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Id for the `<a>` element\n\t\t */\n\t\tanchorId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Make subname bold\n\t\t */\n\t\tbold: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show the NcListItem in compact design\n\t\t */\n\t\tcompact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Toggle the active state of the component\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the wrapper element\n\t\t */\n\t\tlinkAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the actions toggle\n\t\t */\n\t\tactionsAriaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * If different from 0 this component will display the\n\t\t * NcCounterBubble component\n\t\t */\n\t\tcounterNumber: {\n\t\t\ttype: [Number, String],\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * Outlined or highlighted state of the counter\n\t\t */\n\t\tcounterType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['highlighted', 'outlined', ''].indexOf(value) !== -1\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * To be used only when the elements in the actions menu are very important\n\t\t */\n\t\tforceDisplayActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the actions to display in a three dot menu\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show the list component layout\n\t\t */\n\t\toneLine: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'click',\n\t\t'update:menuOpen',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t\thasActions: false,\n\t\t\thasSubname: false,\n\t\t\tdisplayActionsOnHoverFocus: false,\n\t\t\tmenuOpen: false,\n\t\t\thasIndicator: false,\n\t\t\thasDetails: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tshowAdditionalElements() {\n\t\t\treturn !this.displayActionsOnHoverFocus || this.forceDisplayActions\n\t\t},\n\n\t\tshowDetails() {\n\t\t\treturn (this.details !== '' || this.hasDetails)\n\t\t\t\t&& (!this.displayActionsOnHoverFocus || this.forceDisplayActions)\n\t\t},\n\t},\n\n\twatch: {\n\n\t\tmenuOpen(newValue) {\n\t\t\t// A click outside both the menu and the root element hides the actions again\n\t\t\tif (!newValue && !this.hovered) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkSlots()\n\t},\n\n\tupdated() {\n\t\tthis.checkSlots()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Handle link click\n\t\t *\n\t\t * @param {MouseEvent|KeyboardEvent} event - Native click or keydown event\n\t\t * @param {Function} [navigate] - VueRouter link's navigate if any\n\t\t * @param {string} [routerLinkHref] - VueRouter link's href\n\t\t */\n\t\tonClick(event, navigate, routerLinkHref) {\n\t\t\t// Always forward native event\n\t\t\tthis.$emit('click', event)\n\t\t\t// Do not navigate with control keys - it is opening in a new tab\n\t\t\tif (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Prevent default link behaviour if it's a router-link and navigate manually\n\t\t\tif (routerLinkHref) {\n\t\t\t\tnavigate?.(event)\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\n\t\tshowActions() {\n\t\t\tif (this.hasActions) {\n\t\t\t\tthis.displayActionsOnHoverFocus = true\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\thideActions() {\n\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t},\n\n\t\t/**\n\t\t * @param {FocusEvent} event UI event\n\t\t */\n\t\thandleBlur(event) {\n\t\t\t// do not hide if open\n\t\t\tif (this.menuOpen) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// do not hide if focus is kept within\n\t\t\t// On component unmounting Vue 3 resets the template ref to null,\n\t\t\t// so we can ignore this check\n\t\t\tif (this.$refs['list-item']?.contains(event.relatedTarget)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.hideActions()\n\t\t},\n\n\t\t/**\n\t\t * Hide the actions on mouseleave unless the menu is open\n\t\t */\n\t\thandleMouseleave() {\n\t\t\tif (!this.menuOpen) {\n\t\t\t\tthis.displayActionsOnHoverFocus = false\n\t\t\t}\n\t\t\tthis.hovered = false\n\t\t},\n\n\t\thandleMouseover() {\n\t\t\tthis.showActions()\n\t\t\tthis.hovered = true\n\t\t},\n\n\t\thandleActionsUpdateOpen(e) {\n\t\t\tthis.menuOpen = e\n\t\t\tthis.$emit('update:menuOpen', e)\n\t\t},\n\n\t\t// Check if subname and actions slots are populated\n\t\tcheckSlots() {\n\t\t\tif (this.hasActions !== !!this.$slots.actions) {\n\t\t\t\tthis.hasActions = !!this.$slots.actions\n\t\t\t}\n\t\t\tif (this.hasSubname !== !!this.$slots.subname) {\n\t\t\t\tthis.hasSubname = !!this.$slots.subname\n\t\t\t}\n\t\t\tif (this.hasIndicator !== !!this.$slots.indicator) {\n\t\t\t\tthis.hasIndicator = !!this.$slots.indicator\n\t\t\t}\n\t\t\tif (this.hasDetails !== !!this.$slots.details) {\n\t\t\t\tthis.hasDetails = !!this.$slots.details\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.list-item__wrapper {\n\tdisplay: flex;\n\tposition: relative;\n\twidth: 100%;\n\t// padding for the focus-visible styles. Width is reduced to compensate it\n\tpadding: 2px 4px;\n\t// The first and lastelement needs also padding for the box shadow of the focus-visible effect\n\t&:first-of-type {\n\t\tpadding-block-start: 4px;\n\t}\n\t&:last-of-type {\n\t\tpadding-block-end: 4px\n\t}\n\n\t&--active,\n\t&.active {\n\t\t.list-item {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\n\t\t\t&:hover,\n\t\t\t&:focus-within,\n\t\t\t&:has(:focus-visible),\n\t\t\t&:has(:active) {\n\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t}\n\t\t}\n\n\t\t.list-item-content__name,\n\t\t.list-item-content__subname,\n\t\t.list-item-content__details,\n\t\t.list-item-details__details {\n\t\t\tcolor: var(--color-primary-element-text) !important;\n\t\t}\n\t}\n\t.list-item-content__name,\n\t.list-item-content__subname,\n\t.list-item-content__details,\n\t.list-item-details__details {\n\t\twhite-space: nowrap;\n\t\tmargin-block: 0;\n\t\tmargin-inline: 0 auto;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.list-item-content__name {\n\tmin-width: 100px;\n\tflex: 1 1 10%;\n\tfont-weight: 500;\n}\n\n.list-item-content__subname {\n\tflex: 1 0;\n\tmin-width: 0;\n\tcolor: var(--color-text-maxcontrast);\n\t&--bold {\n\t\tfont-weight: 500;\n\t}\n}\n\n// NcListItem\n.list-item {\n\t--list-item-padding: var(--default-grid-baseline);\n\t// The content are two lines of text and respect the 1.5 line height\n\t--list-item-height: 2lh;\n\t--list-item-border-radius: var(--border-radius-element, 32px);\n\t// General styles\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tposition: relative;\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\tpadding: var(--list-item-padding);\n\twidth: 100%;\n\tborder-radius: var(--border-radius-element, 32px);\n\tcursor: pointer;\n\ttransition: background-color var(--animation-quick) ease-in-out;\n\tlist-style: none;\n\n\t&:hover,\n\t&:focus-within,\n\t&:has(:active),\n\t&:has(:focus-visible) {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t&:has(&__anchor:focus-visible) {\n\t\toutline: 2px solid var(--color-main-text);\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background);\n\t}\n\n\t&--compact {\n\t\t--list-item-padding: calc(0.5 * var(--default-grid-baseline)) var(--default-grid-baseline);\n\n\t\t&:not(:has(.list-item-content__subname)) {\n\t\t\t--list-item-height: var(--default-clickable-area);\n\t\t}\n\t}\n\n\t&--one-line {\n\t\t--list-item-height: var(--default-clickable-area);\n\t\t--list-item-border-radius: var(--border-radius-element, calc(var(--default-clickable-area) / 2));\n\t\t--list-item-padding: var(--default-grid-baseline);\n\n\t\t.list-item-content__main {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: start;\n\t\t\tgap: 12px;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.list-item-content__details {\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tjustify-content: end;\n\t\t}\n\t\t.list-item-content__name {\n\t\t\talign-self: center;\n\t\t\tmax-width: 300px;\n\t\t}\n\t}\n\n\t&__anchor {\n\t\tcolor: inherit;\n\t\tdisplay: flex;\n\t\tflex: 1 0 auto;\n\t\talign-items: center;\n\t\theight: var(--list-item-height);\n\t\tmin-width: 0;\n\n\t\t// This is handled by the parent container\n\t\t&:focus-visible {\n\t\t\toutline: none;\n\t\t}\n\t}\n\n\t&-content {\n\t\tdisplay: flex;\n\t\tflex: 1 0;\n\t\tjustify-content: space-between;\n\t\tpadding-inline-start: calc(2 * var(--default-grid-baseline));\n\t\tmin-width: 0;\n\n\t\t&__main {\n\t\t\tflex: 1 0;\n\t\t\twidth: 0;\n\t\t\tmargin: auto 0;\n\n\t\t\t&--oneline {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&__details {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: end;\n\t\t\talign-items: end;\n\t\t}\n\n\t\t&__actions,\n\t\t&__extra-actions {\n\t\t\tflex: 0 0 auto;\n\t\t\talign-self: center;\n\t\t\tjustify-content: center;\n\t\t\tmargin-inline-start: var(--default-grid-baseline);\n\t\t}\n\n\t\t&__extra-actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: var(--default-grid-baseline);\n\t\t}\n\t}\n\n\t&-details {\n\t\t&__details {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tmargin: 0 9px !important;\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t&__extra {\n\t\t\tmargin: 2px 4px 0 4px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t&__indicator {\n\t\t\tmargin: 0 5px;\n\t\t}\n\t}\n\n\t&__extra {\n\t\tmargin-top: var(--default-grid-baseline);\n\t}\n}\n\n</style>\n"],"names":["NcVNodes","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_createElementVNode","_mergeProps","_renderSlot","_createElementBlock","_normalizeClass","_withDirectives","_createVNode"],"mappings":";;;;;AAmiBA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA,UAAAA;AAAAA;EAGD,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,IAAI;AAAA,MACH,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA;;;;IAMV,MAAM;AAAA,MACL,MAAM;AAAA,MACN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AAM,OAAA;AAAA;kBAEI,MAAA,gBAAZD,aAAAS,mBAGO,QAHP,YAGO;AAAA,oBADND,WAAyB,KAAA,QAAA,aAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;0BAXlB,SAAA,sBAAsB;AAAA;;;;UAkBvB,KAAA,OAAM,eAAA,KAAjBR,aAAAS,mBAGM,OAHN,YAGM;AAAA,YADLD,WAA6B,KAAA,QAAA,iBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;UAKvB,OAAA,uBAAuB,MAAA,2CAD9BC,mBAiBM,OAAA;AAAA;YAfL,OAAM;AAAA,YACL,mDAAU,SAAA,cAAA,SAAA,WAAA,GAAA,IAAA;AAAA;YACXG,YAYY,sBAAA;AAAA,cAXX,KAAI;AAAA,cACH,SAAS,OAAA,UAAU;AAAA,cACnB,cAAY,OAAA;AAAA,cACZ,cAAY,OAAA;AAAA,cACZ,iBAAa,SAAA;AAAA;+BAMd,MAAuB;AAAA,gBAAvBJ,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;cALP,KAAA,OAAM,cAAA;sBAAmB;AAAA,4BAExC,MAA4B;AAAA,kBAA5BA,WAA4B,KAAA,QAAA,gBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;;UAOpB,KAAA,OAAO,SAAlBR,aAAAS,mBAGM,OAHN,aAGM;AAAA,YADLD,WAAqB,KAAA,QAAA,SAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcListItemIcon-BXVk-irh.mjs","sources":["../../src/components/NcListItemIcon/NcListItemIcon.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## This is used to display a avatar-name/subname + icon layout\nIt might be used for list rendering or within the multiselect for example\n\n> **Note:** Any binding will be forwarded on the Avatar component root\n\n```vue\n<NcListItemIcon name=\"User 1\" />\n<NcListItemIcon name=\"User 1\" subname=\"Hidden subname because size is too small\" :avatar-size=\"24\" />\n```\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"User 1\" :avatar-size=\"44\">\n\t\t\t<Account :size=\"20\" />\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Account from 'vue-material-design-icons/Account.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccount,\n\t\t},\n\t}\n\t</script>\n```\n\n### With icon\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Group 1\" subname=\"13 members\" :is-no-user=\"true\">\n\t\t\t<AccountMultiple :size=\"20\" />\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### Searching\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Testing admin\" subname=\"testme@example.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Test group 2\" subname=\"loremipsum@domain.com\" :is-no-user=\"true\" search=\"test\">\n\t\t\t<AccountMultiple :size=\"20\" />\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### With actions\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tEdit\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<span\n\t\t:id=\"id\"\n\t\tclass=\"option\"\n\t\t:class=\"{ 'option--compact': avatarSize < defaultSize }\"\n\t\t:style=\"cssVars\">\n\t\t<NcAvatar\n\t\t\tv-bind=\"$attrs\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:display-name=\"displayName || name\"\n\t\t\t:is-no-user=\"isNoUser\"\n\t\t\t:size=\"avatarSize\"\n\t\t\tclass=\"option__avatar\" />\n\t\t<div class=\"option__details\">\n\t\t\t<NcHighlight\n\t\t\t\tclass=\"option__lineone\"\n\t\t\t\t:text=\"name\"\n\t\t\t\t:search=\"searchParts[0]\" />\n\t\t\t<NcHighlight\n\t\t\t\tv-if=\"isValidSubname && isSizeBigEnough\"\n\t\t\t\tclass=\"option__linetwo\"\n\t\t\t\t:text=\"subname\"\n\t\t\t\t:search=\"searchParts[1]\" />\n\t\t\t<span v-else-if=\"hasStatus\">\n\t\t\t\t<span>{{ userStatus.icon }}</span>\n\t\t\t\t<span>{{ userStatus.message }}</span>\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- @slot use this slot to add a custom icon or actions -->\n\t\t<slot>\n\t\t\t<NcIconSvgWrapper\n\t\t\t\tv-if=\"hasIconSvg\"\n\t\t\t\tclass=\"option__icon\"\n\t\t\t\t:svg=\"iconSvg\"\n\t\t\t\t:name=\"iconName\" />\n\t\t\t<span\n\t\t\t\tv-else-if=\"hasIcon\"\n\t\t\t\tclass=\"icon option__icon\"\n\t\t\t\t:class=\"icon\"\n\t\t\t\t:aria-label=\"iconName\" />\n\t\t</slot>\n\t</span>\n</template>\n\n<script>\nimport { userStatus } from '../../mixins/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcHighlight from '../NcHighlight/index.ts'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.ts'\n\n// global margin, ^2 ratio\nconst margin = 8\nconst defaultSize = 32\n\nexport default {\n\tname: 'NcListItemIcon',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcHighlight,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [\n\t\tuserStatus,\n\t],\n\n\tprops: {\n\t\t/**\n\t\t * Default first line text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Secondary optional line\n\t\t * Only visible on size of 32 and above\n\t\t */\n\t\tsubname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Icon class to be displayed at the end of the component\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * SVG icon to be displayed at the end of the component\n\t\t */\n\t\ticonSvg: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Descriptive name for the icon\n\t\t */\n\t\ticonName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Search within the highlight of name/subname\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Set a size in px that will define the avatar height/width\n\t\t * and therefore, the height of the component\n\t\t */\n\t\tavatarSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: defaultSize,\n\t\t},\n\n\t\t/**\n\t\t * Disable the margins of this component.\n\t\t * Useful for integration in `NcSelect` for example\n\t\t */\n\t\tnoMargin: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) displayName prop\n\t\t * Fallback to name\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) isNoUser prop\n\t\t * Enable/disable the UserStatus fetching\n\t\t */\n\t\tisNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Unique list item ID\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tmargin,\n\t\t\tdefaultSize,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasIcon() {\n\t\t\treturn this.icon !== ''\n\t\t},\n\n\t\thasIconSvg() {\n\t\t\treturn this.iconSvg !== ''\n\t\t},\n\n\t\tisValidSubname() {\n\t\t\treturn this.subname?.trim?.() !== ''\n\t\t},\n\n\t\tisSizeBigEnough() {\n\t\t\treturn this.avatarSize >= 26 // the font sizes\n\t\t},\n\n\t\tcssVars() {\n\t\t\t// Don't use margin to calculate the height if noMargin\n\t\t\tconst margin = this.noMargin ? 0 : this.margin\n\n\t\t\treturn {\n\t\t\t\t'--height': this.avatarSize + 2 * margin + 'px',\n\t\t\t\t'--margin': this.margin + 'px',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Separates the search property into two parts, the first one is the search part on the name, the second on the subname.\n\t\t *\n\t\t * @return {[string, string]}\n\t\t */\n\t\tsearchParts() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/\n\n\t\t\tconst match = this.search.match(EMAIL_NOTATION)\n\t\t\tif (this.isNoUser || !match) {\n\t\t\t\treturn [this.search, this.search]\n\t\t\t}\n\t\t\treturn [match[1].trim(), match[2]]\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// If we don't have a subname and if this is a user\n\t\tif (!this.isNoUser && !this.subname) {\n\t\t\tthis.fetchUserStatus(this.user)\n\t\t}\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.option {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\theight: var(--height);\n\tcursor: inherit;\n\n\t&__avatar {\n\t\tmargin-inline-end: var(--margin);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-width: 0;\n\t}\n\n\t&__lineone {\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t&__linetwo {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__lineone,\n\t&__linetwo {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tline-height: 1.2;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n\n\t&--compact {\n\t\t.option {\n\t\t\t&__lineone {\n\t\t\t\tfont-size: 14px;\n\t\t\t}\n\t\t\t&__linetwo {\n\t\t\t\tfont-size: 11px;\n\t\t\t\tline-height: 1.5;\n\t\t\t\tmargin-top: -4px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: var(--default-clickable-area);\n\t\theight: var(--default-clickable-area);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t&.icon {\n\t\t\tflex: 0 0 var(--default-clickable-area);\n\t\t\topacity: $opacity_normal;\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: 16px;\n\t\t}\n\t}\n\n\t&__details,\n\t&__lineone,\n\t&__linetwo,\n\t&__icon {\n\t\tcursor: inherit;\n\t}\n}\n</style>\n"],"names":["NcHighlight","margin","_createElementBlock","_normalizeClass","_createVNode","_mergeProps","_createElementVNode","_createBlock","_toDisplayString","_renderSlot"],"m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