@nextcloud/vue 9.3.1 → 9.3.2
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 +12 -0
- package/README.md +44 -44
- package/dist/assets/{NcCheckboxRadioSwitch-C_70VMQr.css → NcCheckboxRadioSwitch-DpYt0YbL.css} +13 -12
- package/dist/assets/{NcFormBoxSwitch-BmyNQCbA.css → NcFormBoxSwitch-DScgbxtv.css} +2 -8
- package/dist/assets/NcIconToggleSwitch-C29S_5Rp.css +30 -0
- package/dist/assets/{NcModal-DLWvQ8EA.css → NcModal-Du-f0B7Y.css} +61 -61
- package/dist/chunks/{NcActionButton-pKOSrlGE.mjs → NcActionButton-BHXE4UKQ.mjs} +4 -4
- package/dist/chunks/{NcActionButton-pKOSrlGE.mjs.map → NcActionButton-BHXE4UKQ.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-D1cYCNRq.mjs → NcActionButtonGroup-B2MGnwK_.mjs} +3 -3
- package/dist/chunks/{NcActionButtonGroup-D1cYCNRq.mjs.map → NcActionButtonGroup-B2MGnwK_.mjs.map} +1 -1
- package/dist/chunks/{NcActionCaption-Fumfjzxj.mjs → NcActionCaption-Cgd3J8jw.mjs} +2 -2
- package/dist/chunks/{NcActionCaption-Fumfjzxj.mjs.map → NcActionCaption-Cgd3J8jw.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-CwrO3g3I.mjs → NcActionCheckbox-BTHrh-Mu.mjs} +2 -2
- package/dist/chunks/{NcActionCheckbox-CwrO3g3I.mjs.map → NcActionCheckbox-BTHrh-Mu.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-uL5aa-A2.mjs → NcActionInput-D1uLWx4N.mjs} +5 -5
- package/dist/chunks/{NcActionInput-uL5aa-A2.mjs.map → NcActionInput-D1uLWx4N.mjs.map} +1 -1
- package/dist/chunks/{NcActionLink-vEvKSV4N.mjs → NcActionLink-Cd69py4e.mjs} +3 -3
- package/dist/chunks/{NcActionLink-vEvKSV4N.mjs.map → NcActionLink-Cd69py4e.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-ByCpOD0q.mjs → NcActionRadio-BM24rDbc.mjs} +2 -2
- package/dist/chunks/{NcActionRadio-ByCpOD0q.mjs.map → NcActionRadio-BM24rDbc.mjs.map} +1 -1
- package/dist/chunks/{NcActionRouter-oT-YU_jf.mjs → NcActionRouter-DtxPh20B.mjs} +3 -3
- package/dist/chunks/{NcActionRouter-oT-YU_jf.mjs.map → NcActionRouter-DtxPh20B.mjs.map} +1 -1
- package/dist/chunks/{NcActionText-uKvLcEY6.mjs → NcActionText-Bd1fgVqA.mjs} +3 -3
- package/dist/chunks/{NcActionText-uKvLcEY6.mjs.map → NcActionText-Bd1fgVqA.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-CoYA6jeC.mjs → NcActionTextEditable-DAMWWXnR.mjs} +3 -3
- package/dist/chunks/{NcActionTextEditable-CoYA6jeC.mjs.map → NcActionTextEditable-DAMWWXnR.mjs.map} +1 -1
- package/dist/chunks/{NcActions-DWmvh7-Y.mjs → NcActions-4R7icatI.mjs} +4 -4
- package/dist/chunks/{NcActions-DWmvh7-Y.mjs.map → NcActions-4R7icatI.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-CTpYDkuT.mjs → NcAppContent-DFbY2ERd.mjs} +5 -5
- package/dist/chunks/{NcAppContent-CTpYDkuT.mjs.map → NcAppContent-DFbY2ERd.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-NSjIVdnb.mjs → NcAppNavigation-CjnufbC2.mjs} +6 -6
- package/dist/chunks/{NcAppNavigation-NSjIVdnb.mjs.map → NcAppNavigation-CjnufbC2.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-D4yUe1MX.mjs → NcAppNavigationCaption-DiLoiMN5.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-D4yUe1MX.mjs.map → NcAppNavigationCaption-DiLoiMN5.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-hKUS0nZj.mjs → NcAppNavigationItem-B307vBI9.mjs} +6 -6
- package/dist/chunks/{NcAppNavigationItem-hKUS0nZj.mjs.map → NcAppNavigationItem-B307vBI9.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-CuwqNksa.mjs → NcAppNavigationNew-WS0F9mau.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-CuwqNksa.mjs.map → NcAppNavigationNew-WS0F9mau.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-IzXE-EEq.mjs → NcAppNavigationNewItem-DYH3Gimz.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-IzXE-EEq.mjs.map → NcAppNavigationNewItem-DYH3Gimz.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-DCgwKEm9.mjs → NcAppNavigationSearch-Bi367hd4.mjs} +4 -4
- package/dist/chunks/{NcAppNavigationSearch-DCgwKEm9.mjs.map → NcAppNavigationSearch-Bi367hd4.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-T04pqKfn.mjs → NcAppNavigationSettings-CaTjgcVj.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-T04pqKfn.mjs.map → NcAppNavigationSettings-CaTjgcVj.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-BCVofwA8.mjs → NcAppSettingsDialog-NlVP7Fo7.mjs} +5 -5
- package/dist/chunks/{NcAppSettingsDialog-BCVofwA8.mjs.map → NcAppSettingsDialog-NlVP7Fo7.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsSection-B9R7enkC.mjs → NcAppSettingsSection-B2pFK0UK.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsSection-B9R7enkC.mjs.map → NcAppSettingsSection-B2pFK0UK.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsShortcutsSection-QPGGYtbC.mjs → NcAppSettingsShortcutsSection-DDmDMMsF.mjs} +4 -4
- package/dist/chunks/{NcAppSettingsShortcutsSection-QPGGYtbC.mjs.map → NcAppSettingsShortcutsSection-DDmDMMsF.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BvBvQsXb.mjs → NcAppSidebar-as8lzUZp.mjs} +5 -5
- package/dist/chunks/{NcAppSidebar-BvBvQsXb.mjs.map → NcAppSidebar-as8lzUZp.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-CjpLsI1X.mjs → NcAssistantButton-DqXCpiMp.mjs} +4 -4
- package/dist/chunks/{NcAssistantButton-CjpLsI1X.mjs.map → NcAssistantButton-DqXCpiMp.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-BMDc4udc.mjs → NcAssistantIcon-PMYKxGuH.mjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-BMDc4udc.mjs.map → NcAssistantIcon-PMYKxGuH.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-DmUGApWA.mjs → NcAvatar-S8EJR2BK.mjs} +9 -9
- package/dist/chunks/{NcAvatar-DmUGApWA.mjs.map → NcAvatar-S8EJR2BK.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-Bwkn3eve.mjs → NcBreadcrumb-ChYVw5CP.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-Bwkn3eve.mjs.map → NcBreadcrumb-ChYVw5CP.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-PN5_hHQn.mjs → NcBreadcrumbs-DHS31Ax7.mjs} +6 -6
- package/dist/chunks/{NcBreadcrumbs-PN5_hHQn.mjs.map → NcBreadcrumbs-DHS31Ax7.mjs.map} +1 -1
- package/dist/chunks/{NcButton-Dc8V4Urj.mjs → NcButton-CzpKEx4V.mjs} +2 -2
- package/dist/chunks/{NcButton-Dc8V4Urj.mjs.map → NcButton-CzpKEx4V.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-BCSKF7Tk.mjs → NcCheckboxRadioSwitch-DisCqPZK.mjs} +38 -119
- package/dist/chunks/NcCheckboxRadioSwitch-DisCqPZK.mjs.map +1 -0
- package/dist/chunks/{NcChip-D8tGFzRl.mjs → NcChip-QHPd3nMF.mjs} +6 -6
- package/dist/chunks/{NcChip-D8tGFzRl.mjs.map → NcChip-QHPd3nMF.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-C-Zxsdgw.mjs → NcCollectionList-ByFl0-ca.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-C-Zxsdgw.mjs.map → NcCollectionList-ByFl0-ca.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-Kc0JqRtp.mjs → NcColorPicker-DpSDaGrh.mjs} +6 -6
- package/dist/chunks/{NcColorPicker-Kc0JqRtp.mjs.map → NcColorPicker-DpSDaGrh.mjs.map} +1 -1
- package/dist/chunks/{NcContent-BR_nMwKN.mjs → NcContent-BrRHLO19.mjs} +5 -5
- package/dist/chunks/{NcContent-BR_nMwKN.mjs.map → NcContent-BrRHLO19.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-Bz1t6sj0.mjs → NcDashboardWidget-CIUrPOLo.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-Bz1t6sj0.mjs.map → NcDashboardWidget-CIUrPOLo.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-C_xl9X2u.mjs → NcDashboardWidgetItem-DdYM1QYk.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-C_xl9X2u.mjs.map → NcDashboardWidgetItem-DdYM1QYk.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-DTf51PD8.mjs → NcDateTimePicker-DtQaoKbG.mjs} +6 -6
- package/dist/chunks/{NcDateTimePicker-DTf51PD8.mjs.map → NcDateTimePicker-DtQaoKbG.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-DXF3-uR3.mjs → NcDateTimePickerNative-Dr8_mGlQ.mjs} +3 -3
- package/dist/chunks/{NcDateTimePickerNative-DXF3-uR3.mjs.map → NcDateTimePickerNative-Dr8_mGlQ.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-CM7SCS7Z.mjs → NcDialog-BTmnYNeo.mjs} +3 -3
- package/dist/chunks/{NcDialog-CM7SCS7Z.mjs.map → NcDialog-BTmnYNeo.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-BBumVVme.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs} +4 -4
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-BBumVVme.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-pM4Pg2yq.mjs → NcEmojiPicker-U5k_zceS.mjs} +6 -6
- package/dist/chunks/{NcEmojiPicker-pM4Pg2yq.mjs.map → NcEmojiPicker-U5k_zceS.mjs.map} +1 -1
- package/dist/chunks/{NcFormBox-K2tCRm3B.mjs → NcFormBox-CkgY7Tif.mjs} +2 -2
- package/dist/chunks/{NcFormBox-K2tCRm3B.mjs.map → NcFormBox-CkgY7Tif.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxButton-7jokSLLb.mjs → NcFormBoxButton-Bptd324P.mjs} +3 -3
- package/dist/chunks/{NcFormBoxButton-7jokSLLb.mjs.map → NcFormBoxButton-Bptd324P.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-B7dsN2G5.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhnfC18v.mjs} +3 -3
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-B7dsN2G5.mjs.map → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhnfC18v.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxItem-BBP76Mkf.mjs → NcFormBoxItem-vnU0KmUL.mjs} +2 -2
- package/dist/chunks/{NcFormBoxItem-BBP76Mkf.mjs.map → NcFormBoxItem-vnU0KmUL.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxSwitch-UJwYMQPm.mjs → NcFormBoxSwitch-DGcRJH9Q.mjs} +10 -15
- package/dist/chunks/NcFormBoxSwitch-DGcRJH9Q.mjs.map +1 -0
- package/dist/chunks/{NcHeaderButton-CA17OV7l.mjs → NcHeaderButton-CIb5SvFk.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-CA17OV7l.mjs.map → NcHeaderButton-CIb5SvFk.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-CdlSBOyC.mjs → NcHeaderMenu-CeJZT5-m.mjs} +2 -2
- package/dist/chunks/{NcHeaderMenu-CdlSBOyC.mjs.map → NcHeaderMenu-CeJZT5-m.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-KGHPzHBJ.mjs → NcHotkey-BMbdzaIs.mjs} +2 -2
- package/dist/chunks/{NcHotkey-KGHPzHBJ.mjs.map → NcHotkey-BMbdzaIs.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-BBE5BqwB.mjs → NcHotkeyList-67NnF26Y.mjs} +3 -3
- package/dist/chunks/{NcHotkeyList-BBE5BqwB.mjs.map → NcHotkeyList-67NnF26Y.mjs.map} +1 -1
- package/dist/chunks/NcIconToggleSwitch-DNEYngCw.mjs +50 -0
- package/dist/chunks/NcIconToggleSwitch-DNEYngCw.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-CSO9hp4z.mjs → NcInputConfirmCancel-DjMO3Xyv.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-CSO9hp4z.mjs.map → NcInputConfirmCancel-DjMO3Xyv.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-Bwsh2aHY.mjs → NcInputField-D7Nv5QhT.mjs} +3 -3
- package/dist/chunks/{NcInputField-Bwsh2aHY.mjs.map → NcInputField-D7Nv5QhT.mjs.map} +1 -1
- package/dist/chunks/{NcKbd-D3YSTteg.mjs → NcKbd-CZdynD1d.mjs} +3 -3
- package/dist/chunks/{NcKbd-D3YSTteg.mjs.map → NcKbd-CZdynD1d.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-BHmdTInS.mjs → NcListItem-Bx93C7tP.mjs} +2 -2
- package/dist/chunks/{NcListItem-BHmdTInS.mjs.map → NcListItem-Bx93C7tP.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-8fWhyS_R.mjs → NcListItemIcon-IJLXY-te.mjs} +2 -2
- package/dist/chunks/{NcListItemIcon-8fWhyS_R.mjs.map → NcListItemIcon-IJLXY-te.mjs.map} +1 -1
- package/dist/chunks/{NcModal-MC_HktJd.mjs → NcModal-DSCYMxfe.mjs} +9 -9
- package/dist/chunks/{NcModal-MC_HktJd.mjs.map → NcModal-DSCYMxfe.mjs.map} +1 -1
- package/dist/chunks/{NcNoteCard-CVhtNL04.mjs → NcNoteCard-BUg07N13.mjs} +2 -2
- package/dist/chunks/{NcNoteCard-CVhtNL04.mjs.map → NcNoteCard-BUg07N13.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-djttkA5Q.mjs → NcPasswordField-CTuWpUWd.mjs} +5 -5
- package/dist/chunks/{NcPasswordField-djttkA5Q.mjs.map → NcPasswordField-CTuWpUWd.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroup-CLtk-WPR.mjs → NcRadioGroup-HorQ2m39.mjs} +3 -3
- package/dist/chunks/{NcRadioGroup-CLtk-WPR.mjs.map → NcRadioGroup-HorQ2m39.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-CDA5i7Dq.mjs → NcRadioGroupButton-CAisx7g4.mjs} +3 -3
- package/dist/chunks/{NcRadioGroupButton-CDA5i7Dq.mjs.map → NcRadioGroupButton-CAisx7g4.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-BVGAmIja.mjs → NcRelatedResourcesPanel-Dtxd3-o1.mjs} +3 -3
- package/dist/chunks/{NcRelatedResourcesPanel-BVGAmIja.mjs.map → NcRelatedResourcesPanel-Dtxd3-o1.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-0w6dbJeG.mjs → NcRichContenteditable-Bq1NOBCE.mjs} +11 -11
- package/dist/chunks/{NcRichContenteditable-0w6dbJeG.mjs.map → NcRichContenteditable-Bq1NOBCE.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-CBMtJzE_.mjs → NcRichText-B6VwyPUp.mjs} +5 -5
- package/dist/chunks/{NcRichText-CBMtJzE_.mjs.map → NcRichText-B6VwyPUp.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-Czzsi3P_.mjs → NcSelect-Cc9_a8nG.mjs} +2 -2
- package/dist/chunks/{NcSelect-Czzsi3P_.mjs.map → NcSelect-Cc9_a8nG.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-DJwqmQ7_.mjs → NcSelectTags-JyyA4W_e.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-DJwqmQ7_.mjs.map → NcSelectTags-JyyA4W_e.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-DVTI1DIZ.mjs → NcSelectUsers-CiTKYuOb.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-DVTI1DIZ.mjs.map → NcSelectUsers-CiTKYuOb.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DYXU4pOK.mjs → NcSettingsSection-BcLE6UnZ.mjs} +3 -3
- package/dist/chunks/{NcSettingsSection-DYXU4pOK.mjs.map → NcSettingsSection-BcLE6UnZ.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-CuRTrvVN.mjs → NcSettingsSelectGroup-CUU-GWYl.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-CuRTrvVN.mjs.map → NcSettingsSelectGroup-CUU-GWYl.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CdtxX_QJ.mjs → NcTextArea-2CifgNom.mjs} +2 -2
- package/dist/chunks/{NcTextArea-CdtxX_QJ.mjs.map → NcTextArea-2CifgNom.mjs.map} +1 -1
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-D1y_LfGJ.mjs → NcTextField.vue_vue_type_script_setup_true_lang-BfjSL2EJ.mjs} +5 -5
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-D1y_LfGJ.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-BfjSL2EJ.mjs.map} +1 -1
- package/dist/chunks/{NcThemeProvider.vue_vue_type_script_setup_true_lang-nUDJsDGI.mjs → NcThemeProvider.vue_vue_type_script_setup_true_lang-DWn1DRTx.mjs} +2 -2
- package/dist/chunks/{NcThemeProvider.vue_vue_type_script_setup_true_lang-nUDJsDGI.mjs.map → NcThemeProvider.vue_vue_type_script_setup_true_lang-DWn1DRTx.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-CGFRZR-3.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs} +4 -4
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-CGFRZR-3.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DPAmU2_J.mjs → NcUserBubble-CiB-Lu5C.mjs} +2 -2
- package/dist/chunks/{NcUserBubble-DPAmU2_J.mjs.map → NcUserBubble-CiB-Lu5C.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-CGEf7fej.mjs → NcUserStatusIcon-BgElapLh.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-CGEf7fej.mjs.map → NcUserStatusIcon-BgElapLh.mjs.map} +1 -1
- package/dist/chunks/{_l10n-DrTiip5c.mjs → _l10n-CgsPi8nC.mjs} +76 -38
- package/dist/chunks/_l10n-CgsPi8nC.mjs.map +1 -0
- package/dist/chunks/{actionText-DYzDdbVe.mjs → actionText-BXR0sWNu.mjs} +2 -2
- package/dist/chunks/{actionText-DYzDdbVe.mjs.map → actionText-BXR0sWNu.mjs.map} +1 -1
- package/dist/chunks/{colors-Go3zmZRD.mjs → colors-CL_wvNtd.mjs} +2 -2
- package/dist/chunks/{colors-Go3zmZRD.mjs.map → colors-CL_wvNtd.mjs.map} +1 -1
- package/dist/chunks/constants-Ciwvl5xb.mjs +11 -0
- package/dist/chunks/{constants-DrSznhwy.mjs.map → constants-Ciwvl5xb.mjs.map} +1 -1
- package/dist/chunks/{constants-Bls5liKo.mjs → constants-wIEKSp2G.mjs} +2 -2
- package/dist/chunks/{constants-Bls5liKo.mjs.map → constants-wIEKSp2G.mjs.map} +1 -1
- package/dist/chunks/{mdi-XFJRiRqJ.mjs → mdi-DvQxv1t7.mjs} +20 -24
- package/dist/chunks/{mdi-XFJRiRqJ.mjs.map → mdi-DvQxv1t7.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-DmD3-xYB.mjs → referencePickerModal-CDHqLZC-.mjs} +8 -8
- package/dist/chunks/{referencePickerModal-DmD3-xYB.mjs.map → referencePickerModal-CDHqLZC-.mjs.map} +1 -1
- package/dist/chunks/useAppSettingsDialog-C73Wx6iQ.mjs +12 -0
- package/dist/chunks/{useAppSettingsDialog-DbtEkXa4.mjs.map → useAppSettingsDialog-C73Wx6iQ.mjs.map} +1 -1
- package/dist/chunks/{useCopy-7FVrniF_.mjs → useCopy-D3yAxBJi.mjs} +3 -3
- package/dist/chunks/{useCopy-7FVrniF_.mjs.map → useCopy-D3yAxBJi.mjs.map} +1 -1
- package/dist/chunks/useNcActions-BzPO2c4h.mjs +7 -0
- package/dist/chunks/{useNcActions-CiGWxAJE.mjs.map → useNcActions-BzPO2c4h.mjs.map} +1 -1
- package/dist/chunks/{useNcFormBox-DA9iwXWY.mjs → useNcFormBox-Djlh582y.mjs} +2 -2
- package/dist/chunks/{useNcFormBox-DA9iwXWY.mjs.map → useNcFormBox-Djlh582y.mjs.map} +1 -1
- package/dist/chunks/{useNcRadioGroup-DaZbEKbf.mjs → useNcRadioGroup-D6llQmAl.mjs} +2 -2
- package/dist/chunks/{useNcRadioGroup-DaZbEKbf.mjs.map → useNcRadioGroup-D6llQmAl.mjs.map} +1 -1
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionCaption/index.mjs +1 -1
- package/dist/components/NcActionCheckbox/index.mjs +1 -1
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionLink/index.mjs +1 -1
- package/dist/components/NcActionRadio/index.mjs +1 -1
- package/dist/components/NcActionRouter/index.mjs +1 -1
- package/dist/components/NcActionText/index.mjs +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- 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/index.mjs +1 -1
- 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/index.mjs +1 -1
- package/dist/components/NcAppSettingsSection/index.mjs +1 -1
- package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
- package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
- 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/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- 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/index.mjs +1 -1
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +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/NcFormBox/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/NcIconToggleSwitch/NcIconToggleSwitch.vue.d.ts +16 -0
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/index.mjs +1 -1
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- 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/NcRadioGroup/index.mjs +1 -1
- package/dist/components/NcRadioGroupButton/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/index.mjs +3 -3
- package/dist/components/NcSelect/index.mjs +1 -1
- 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/index.mjs +1 -1
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/index.mjs +1 -1
- package/dist/components/NcThemeProvider/index.mjs +1 -1
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/composables/useIsDarkTheme/index.mjs +1 -1
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +73 -73
- package/package.json +16 -16
- package/dist/chunks/NcCheckboxRadioSwitch-BCSKF7Tk.mjs.map +0 -1
- package/dist/chunks/NcFormBoxSwitch-UJwYMQPm.mjs.map +0 -1
- package/dist/chunks/_l10n-DrTiip5c.mjs.map +0 -1
- package/dist/chunks/constants-DrSznhwy.mjs +0 -11
- package/dist/chunks/useAppSettingsDialog-DbtEkXa4.mjs +0 -12
- package/dist/chunks/useNcActions-CiGWxAJE.mjs +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionButton-pKOSrlGE.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconTrashCanOutline,\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\n\timport IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconTrashCanOutline,\n\t\t\tIconPencilOutline,\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackLeftOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackRightOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconHandBackLeftOutline from 'vue-material-design-icons/HandBackLeftOutline.vue'\nimport IconHandBackRightOutline from 'vue-material-design-icons/HandBackRightOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconHandBackLeftOutline,\n\t\tIconHandBackRightOutline,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton v-model=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<IconFullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconFullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton v-model=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackLeftOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton v-model=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<IconFullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconHandBackLeftOutline from 'vue-material-design-icons/HandBackLeftOutline.vue'\nimport IconFullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconHandBackLeftOutline,\n\t\tIconFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton v-model=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconCash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton v-model=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconCreditCardOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport IconCash from 'vue-material-design-icons/Cash.vue'\nimport IconCreditCardOutline from 'vue-material-design-icons/CreditCardOutline.vue'\nimport IconFormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport IconFormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport IconFormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconCash,\n\t\tIconCreditCardOutline,\n\t\tIconFormatAlignLeft,\n\t\tIconFormatAlignCenter,\n\t\tIconFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\tclass=\"action-button button-vue\"\n\t\t\t:class=\"{\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong\n\t\t\t\t\tv-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span\n\t\t\t\t\tv-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper\n\t\t\t\tv-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:modelValue'],\n\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t *\n\t\t * @param {MouseEvent} event - The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_mergeProps","_renderSlot","_normalizeStyle","_toDisplayString","_createBlock","_openBlock"],"mappings":";;;;;;AA6YA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA;EAGD,QAAQ,CAAC,eAAe;AAAA,EAExB,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,UAAU;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOV,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;IAQV,MAAM;AAAA,M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;AAAA,UAF1B,OAAKI,eAAA,EAAA,iBAAqB,KAAA,YAAS,OAAU,KAAA,IAAI,MAAA,KAAA,CAAA;AAAA,UAClD,eAAY;AAAA;;MAKdH,mBAsBO,QAtBP,YAsBO;AAAA,QApBC,KAAA,qBADPF,mBAIS,UAJT,YAISM,gBADL,KAAA,IAAI,GAAA,CAAA;QAKD,KAAA,2BADPN,mBAGiB,QAAA;AAAA;UADhB,OAAM;AAAA,UACN,aAAAM,gBAAa,KAAL,IAAI;AAAA,iDAEbN,mBAIO,QAJP,YAIOM,gBADH,KAAA,IAAI,GAAA,CAAA;AAAA,QAGD,OAAA,4BADPN,mBAGwB,QAAA;AAAA;UADvB,OAAM;AAAA,UACN,aAAAM,gBAAoB,OAAZ,WAAW;AAAA;;MAKd,OAAA,uBADPC,YAI2B,6BAAA;AAAA;QAF1B,OAAM;AAAA,QACN,aAAA;AAAA,QACC,MAAM,OAAA;AAAA,+BACqB,SAAA,0BAA7BA,YAA+F,6BAAA;AAAA;QAAtD,MAAM,OAAA;AAAA,QAAU,OAAM;AAAA,+BAE9C,SAAA,cAAS,SAA1BC,aAAAR,mBAAiG,QAAjG,UAAiG;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcActionButton-BHXE4UKQ.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconTrashCanOutline,\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconTrashCanOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\n\timport IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconTrashCanOutline,\n\t\t\tIconPencilOutline,\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackLeftOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackRightOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconHandBackLeftOutline from 'vue-material-design-icons/HandBackLeftOutline.vue'\nimport IconHandBackRightOutline from 'vue-material-design-icons/HandBackRightOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconHandBackLeftOutline,\n\t\tIconHandBackRightOutline,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton v-model=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<IconFullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconFullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton v-model=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<IconHandBackLeftOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton v-model=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<IconFullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport IconHandBackLeftOutline from 'vue-material-design-icons/HandBackLeftOutline.vue'\nimport IconFullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconHandBackLeftOutline,\n\t\tIconFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton v-model=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconCash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton v-model=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconCreditCardOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport IconCash from 'vue-material-design-icons/Cash.vue'\nimport IconCreditCardOutline from 'vue-material-design-icons/CreditCardOutline.vue'\nimport IconFormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport IconFormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport IconFormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconCash,\n\t\tIconCreditCardOutline,\n\t\tIconFormatAlignLeft,\n\t\tIconFormatAlignCenter,\n\t\tIconFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\tclass=\"action-button button-vue\"\n\t\t\t:class=\"{\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong\n\t\t\t\t\tv-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span\n\t\t\t\t\tv-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper\n\t\t\t\tv-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:modelValue'],\n\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t *\n\t\t * @param {MouseEvent} event - The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_mergeProps","_renderSlot","_normalizeStyle","_toDisplayString","_createBlock","_openBlock"],"mappings":";;;;;;AA6YA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA;EAGD,QAAQ,CAAC,eAAe;AAAA,EAExB,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAA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;AAAA;MAERC,WAMO,yBANP,MAMO;AAAA,QALNF,mBAI+B,QAAA;AAAA,UAH7B,OAAKD,eAAA,CAAA,CAAG,KAAA,YAAS,6BAAgC,KAAA,IAAI,GAGhD,qBAAqB,CAAA;AAAA,UAF1B,OAAKI,eAAA,EAAA,iBAAqB,KAAA,YAAS,OAAU,KAAA,IAAI,MAAA,KAAA,CAAA;AAAA,UAClD,eAAY;AAAA;;MAKdH,mBAsBO,QAtBP,YAsBO;AAAA,QApBC,KAAA,qBADPF,mBAIS,UAJT,YAISM,gBADL,KAAA,IAAI,GAAA,CAAA;QAKD,KAAA,2BADPN,mBAGiB,QAAA;AAAA;UADhB,OAAM;AAAA,UACN,aAAAM,gBAAa,KAAL,IAAI;AAAA,iDAEbN,mBAIO,QAJP,YAIOM,gBADH,KAAA,IAAI,GAAA,CAAA;AAAA,QAGD,OAAA,4BADPN,mBAGwB,QAAA;AAAA;UADvB,OAAM;AAAA,UACN,aAAAM,gBAAoB,OAAZ,WAAW;AAAA;;MAKd,OAAA,uBADPC,YAI2B,6BAAA;AAAA;QAF1B,OAAM;AAAA,QACN,aAAA;AAAA,QACC,MAAM,OAAA;AAAA,+BACqB,SAAA,0BAA7BA,YAA+F,6BAAA;AAAA;QAAtD,MAAM,OAAA;AAAA,QAAU,OAAM;AAAA,+BAE9C,SAAA,cAAS,SAA1BC,aAAAR,mBAAiG,QAAjG,UAAiG;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../assets/NcActionButtonGroup-Bt8kRk79.css';
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
3
|
-
import { r as register, a as t } from "./_l10n-
|
|
3
|
+
import { r as register, a as t } from "./_l10n-CgsPi8nC.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
5
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
register();
|
|
8
8
|
const _sfc_main = defineComponent({
|
|
@@ -57,4 +57,4 @@ const NcActionButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _
|
|
|
57
57
|
export {
|
|
58
58
|
NcActionButtonGroup as N
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=NcActionButtonGroup-
|
|
60
|
+
//# sourceMappingURL=NcActionButtonGroup-B2MGnwK_.mjs.map
|
package/dist/chunks/{NcActionButtonGroup-D1cYCNRq.mjs.map → NcActionButtonGroup-B2MGnwK_.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionButtonGroup-
|
|
1
|
+
{"version":3,"file":"NcActionButtonGroup-B2MGnwK_.mjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\tv-model=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconAlignHorizontalLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\tv-model=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconAlignHorizontalCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\tv-model=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconAlignHorizontalRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport IconAlignHorizontalLeft from 'vue-material-design-icons/AlignHorizontalLeft.vue'\nimport IconAlignHorizontalRight from 'vue-material-design-icons/AlignHorizontalRight.vue'\nimport IconAlignHorizontalCenter from 'vue-material-design-icons/AlignHorizontalCenter.vue'\nimport IconPlus from 'vue-material-design-icons/Plus.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconAlignHorizontalLeft,\n\t\tIconAlignHorizontalRight,\n\t\tIconAlignHorizontalCenter,\n\t\tIconPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: createElementId(),\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\" scoped>\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\t:slotted(li) {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t:deep(.action-button) {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-element);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_renderSlot"],"mappings":";;;;;;AAgGA,MAAK,YAAa,gBAAa;AAAA,EAC9B,MAAM;AAAA,EAEN,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,UAAU;AAAA,MACV,SAAS;AAAA,MACT,MAAM;AAAA;;EAIR,QAAQ;AACP,WAAO;AAAA,MACN,SAAS,gBAAe;AAAA,IACzB;AAAA,EACD;AAAA,EAEA,SAAS;AAAA,IACR;AAAA;AAEF,CAAC;;;;;sBAjDAA,mBAOK,MAAA;AAAA,IAPD,OAAM;AAAA,IAAwB,MAAM,KAAA,oBAAgB;AAAA;IAC5C,KAAA,qBAAXA,mBAEM,OAAA;AAAA;MAFY,IAAI,KAAA;AAAA,uBAClB,KAAA,IAAI,GAAA,GAAA,UAAA;IAERC,mBAEK,MAAA;AAAA,MAFD,OAAM;AAAA,MAA0B,MAAK;AAAA,MAAS,mBAAiB,KAAA,OAAO,KAAA,UAAU;AAAA;MACnFC,WAAQ,KAAA,QAAA,SAAA;AAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcActionCaption-DnG2OyWa.css';
|
|
2
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
2
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
3
3
|
import { createElementBlock, openBlock, toDisplayString } from "vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
5
|
const _sfc_main = {
|
|
@@ -31,4 +31,4 @@ const NcActionCaption = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_
|
|
|
31
31
|
export {
|
|
32
32
|
NcActionCaption as N
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=NcActionCaption-
|
|
34
|
+
//# sourceMappingURL=NcActionCaption-Cgd3J8jw.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionCaption-
|
|
1
|
+
{"version":3,"file":"NcActionCaption-Cgd3J8jw.mjs","sources":["../../src/components/NcActionCaption/NcActionCaption.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<NcActions>\n\t\t<NcActionCaption name=\"Test caption\" />\n\t\t<NcActionCaption name=\"Test caption 2\" />\n\t</NcActions>\n```\n</docs>\n\n<template>\n\t<li class=\"app-navigation-caption\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t{{ name }}\n\t</li>\n</template>\n\n<script>\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\nexport default {\n\tname: 'NcActionCaption',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The caption's text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t.app-navigation-caption {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tline-height: var(--default-clickable-area);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tbox-shadow: none !important;\n\t\tuser-select: none;\n\t\tpointer-events: none;\n\t\tmargin-inline-start: 12px;\n\t\tpadding-inline-end: 14px;\n\t\theight: var(--default-clickable-area);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n</style>\n"],"names":["_createElementBlock"],"mappings":";;;AAyBA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA;;AAGb;;;sBA3BCA,mBAEK,MAAA;AAAA,IAFD,OAAM;AAAA,IAA0B,MAAM,SAAA,oBAAgB;AAAA,qBACtD,OAAA,IAAI,GAAA,GAAA,UAAA;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/NcActionCheckbox-BeT6fCCy.css';
|
|
2
2
|
import { A as ActionGlobalMixin } from "./actionGlobal-BZFdtdJL.mjs";
|
|
3
3
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
4
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
4
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
5
5
|
import { createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, withKeys, withModifiers, toDisplayString } from "vue";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
const _sfc_main = {
|
|
@@ -124,4 +124,4 @@ const NcActionCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc
|
|
|
124
124
|
export {
|
|
125
125
|
NcActionCheckbox as N
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=NcActionCheckbox-
|
|
127
|
+
//# sourceMappingURL=NcActionCheckbox-BTHrh-Mu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionCheckbox-
|
|
1
|
+
{"version":3,"file":"NcActionCheckbox-BTHrh-Mu.mjs","sources":["../../src/components/NcActionCheckbox/NcActionCheckbox.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<NcActions>\n\t\t<NcActionCheckbox @change=\"alert('(un)checked !')\">First choice</NcActionCheckbox>\n\t\t<NcActionCheckbox value=\"second\" @change=\"alert('(un)checked !')\">Second choice</NcActionCheckbox>\n\t\t<NcActionCheckbox :model-value=\"true\" @change=\"alert('(un)checked !')\">Third choice (checked)</NcActionCheckbox>\n\t\t<NcActionCheckbox :disabled=\"true\" @change=\"alert('(un)checked !')\">Second choice (disabled)</NcActionCheckbox>\n\t</NcActions>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<span class=\"action-checkbox\" :role=\"isInSemanticMenu && 'menuitemcheckbox'\" :aria-checked=\"ariaChecked\">\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"checkbox\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:checked=\"modelValue\"\n\t\t\t\t:value=\"value\"\n\t\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tclass=\"checkbox action-checkbox__checkbox\"\n\t\t\t\t@keydown.enter.exact.prevent=\"checkInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<label ref=\"label\" :for=\"id\" class=\"action-checkbox__label\">{{ text }}</label>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\nexport default {\n\tname: 'NcActionCheckbox',\n\n\tmixins: [ActionGlobalMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the checkbox element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * checked state of the the checkbox element\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * value of the checkbox input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the checkbox element\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'change',\n\t\t'check',\n\t\t'uncheck',\n\t\t'update:modelValue',\n\t],\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * aria-checked attribute for role=\"menuitemcheckbox\"\n\t\t *\n\t\t * @return {'true'|'false'|undefined} aria-checked value if needed\n\t\t */\n\t\tariaChecked() {\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\treturn this.modelValue ? 'true' : 'false'\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\t},\n\n\tmethods: {\n\t\tcheckInput(/* event */) {\n\t\t\t// by clicking we also trigger the change event\n\t\t\tthis.$refs.label.click()\n\t\t},\n\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted when the checkbox state is changed\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', this.$refs.checkbox.checked)\n\n\t\t\t/**\n\t\t\t * Emitted when the checkbox state is changed\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\n\t\t\tif (this.$refs.checkbox.checked) {\n\t\t\t\t/**\n\t\t\t\t * Emitted when the checkbox is checked\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('check')\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Emitted when the checkbox is unchecked\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('uncheck')\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n\n.action-checkbox {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\tline-height: var(--default-clickable-area);\n\n\t/* checkbox/radio fixes */\n\t&__checkbox {\n\t\tposition: absolute;\n\t\tinset-inline-start: 0 !important;\n\t\tz-index: -1;\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\talign-items: center; // align checkbox to text\n\n\t\twidth: 100%;\n\t\tpadding: 0 !important;\n\t\tpadding-inline-end: $icon-margin !important;\n\n\t\t&::before {\n\t\t\tmargin-block: 0 !important;\n\t\t\tmargin-inline: calc((var(--default-clickable-area) - 14px) / 2) !important;\n\t\t}\n\t}\n\n\t&--disabled {\n\t\t&,\n\t\t.action-checkbox__label {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode"],"mappings":";;;;;AA6CA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,QAAQ,CAAC,iBAAiB;AAAA,EAE1B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mB,MAAM,SAAA,oBAAgB;AAAA,MAAyB,gBAAc,SAAA;AAAA;MAC3FA,mBAUoB,SAAA;AAAA,QATlB,IAAI,OAAA;AAAA,QACL,KAAI;AAAA,QACH,UAAU,OAAA;AAAA,QACV,SAAS,OAAA;AAAA,QACT,OAAO,OAAA;AAAA,QACP,OAAKD,eAAA,CAAA,EAAA,WAAe,SAAA,YAAW,GAE1B,oCAAoC,CAAA;AAAA,QAD1C,MAAK;AAAA,QAEJ,yEAA6B,SAAA,cAAA,SAAA,WAAA,GAAA,IAAA,GAAU,CAAA,SAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA,QACvC,iDAAQ,SAAA,YAAA,SAAA,SAAA,GAAA,IAAA;AAAA;MACVC,mBAA8E,SAAA;AAAA,QAAvE,KAAI;AAAA,QAAS,KAAK,OAAA;AAAA,QAAI,OAAM;AAAA,yBAA4B,KAAA,IAAI,GAAA,GAAA,UAAA;AAAA;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '../assets/NcActionInput-BxRA_Skn.css';
|
|
2
2
|
import { defineAsyncComponent, resolveComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, normalizeStyle, withModifiers, createCommentVNode, toDisplayString, createBlock, mergeProps, createVNode, withCtx } from "vue";
|
|
3
|
-
import { r as register,
|
|
3
|
+
import { r as register, l as t48, a as t } from "./_l10n-CgsPi8nC.mjs";
|
|
4
4
|
import { A as ActionGlobalMixin } from "./actionGlobal-BZFdtdJL.mjs";
|
|
5
5
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
6
|
-
import { N as NcDateTimePickerNative } from "./NcDateTimePickerNative-
|
|
7
|
-
import { N as NcPasswordField } from "./NcPasswordField-
|
|
8
|
-
import { _ as _sfc_main$1 } from "./NcTextField.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { N as NcDateTimePickerNative } from "./NcDateTimePickerNative-Dr8_mGlQ.mjs";
|
|
7
|
+
import { N as NcPasswordField } from "./NcPasswordField-CTuWpUWd.mjs";
|
|
8
|
+
import { _ as _sfc_main$1 } from "./NcTextField.vue_vue_type_script_setup_true_lang-BfjSL2EJ.mjs";
|
|
9
9
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
10
10
|
register(t48);
|
|
11
11
|
const _sfc_main = {
|
|
@@ -349,4 +349,4 @@ const NcActionInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_re
|
|
|
349
349
|
export {
|
|
350
350
|
NcActionInput as N
|
|
351
351
|
};
|
|
352
|
-
//# sourceMappingURL=NcActionInput-
|
|
352
|
+
//# sourceMappingURL=NcActionInput-D1uLWx4N.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionInput-uL5aa-A2.mjs","sources":["../../src/components/NcActionInput/NcActionInput.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nAll undocumented attributes will be bound to the input, the datepicker or the select component, e.g. `maxlength`, `not-before`.\nFor the `NcSelect` component, all events will be passed through. Please see the `NcSelect` component's documentation for more details and examples.\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionInput v-model=\"text\" :label-outside=\"true\" label=\"Label outside the input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput v-model=\"text\" :show-trailing-button=\"false\" label=\"Input without trailing button\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput v-model=\"text\" label=\"Input with placeholder\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis is the placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" v-model=\"text\" label=\"Password with visible label\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconKeyOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" v-model=\"text\" :show-trailing-button=\"false\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconKeyOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"color\" v-model=\"color\" label=\"Favorite color\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconEyedropper :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tColor placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput label=\"Visible label\" v-model=\"text\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tInput with visible label\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :disabled=\"true\" label=\"This is a disabled input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" label=\"Native date picker\" isNativePicker v-model=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" v-model=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tinput-label=\"Fruit selection\"\n\t\t\t\t:options=\"['Apple', 'Banana', 'Cherry']\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\tv-model=\"multiSelected\"\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tinput-label=\"Fruit selection\"\n\t\t\t\ttrack-by=\"id\"\n\t\t\t\t:append-to-body=\"true\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:options=\"[{label:'Apple', id: 'apple'}, {label:'Banana', id: 'banana'}, {label:'Cherry', id: 'cherry'}]\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit object\n\t\t\t</NcActionInput>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconClose from 'vue-material-design-icons/Close.vue'\n\timport IconEyedropper from 'vue-material-design-icons/Eyedropper.vue'\n\timport IconKeyOutline from 'vue-material-design-icons/KeyOutline.vue'\n\timport IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconClose,\n\t\t\tIconEyedropper,\n\t\t\tIconKeyOutline,\n\t\t\tIconPencilOutline,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tcolor: '#0082C9',\n\t\t\t\tdate: new Date(),\n\t\t\t\ttext: 'This is the input text',\n\t\t\t\tmultiSelected: [],\n\t\t\t}\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"[{ 'action--disabled': disabled }, $props.class]\">\n\t\t<span\n\t\t\tclass=\"action-input\"\n\t\t\t:class=\"{\n\t\t\t\t'action-input-picker--disabled': disabled,\n\t\t\t\t'action-input--visible-label': labelOutside && label,\n\t\t\t}\"\n\t\t\t@mouseleave=\"onLeave\">\n\t\t\t<span class=\"action-input__icon-wrapper\">\n\t\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t\t<slot name=\"icon\">\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"action-input__icon\"\n\t\t\t\t\t\t:class=\"[isIconUrl ? 'action-input__icon--url' : icon]\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\" />\n\t\t\t\t</slot>\n\t\t\t</span>\n\n\t\t\t<!-- form and input -->\n\t\t\t<form\n\t\t\t\tref=\"form\"\n\t\t\t\tclass=\"action-input__form\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@submit.prevent=\"onSubmit\">\n\t\t\t\t<div class=\"action-input__container\">\n\t\t\t\t\t<label\n\t\t\t\t\t\tv-if=\"label && labelOutside && !isNativePicker\"\n\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside }\"\n\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"action-input__input-container\">\n\n\t\t\t\t\t\t<NcDateTimePicker\n\t\t\t\t\t\t\tv-if=\"datePickerType\"\n\t\t\t\t\t\t\tref=\"datetimepicker\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\tstyle=\"z-index: 99999999999;\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:type=\"datePickerType\"\n\t\t\t\t\t\t\t:input-class=\"['mx-input', { focusable: isFocusable }]\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tappend-to-body\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcDateTimePickerNative\n\t\t\t\t\t\t\tv-else-if=\"isNativePicker\"\n\t\t\t\t\t\t\t:id=\"idNativeDateTimePicker\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:type=\"nativeDatePickerType\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\tv-else-if=\"isMultiselectType\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:append-to-body=\"false\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__multi\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcPasswordField\n\t\t\t\t\t\t\tv-else-if=\"type === 'password'\"\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<div v-else-if=\"type === 'color'\" class=\"action-input__container\">\n\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\tv-if=\"label && type === 'color'\"\n\t\t\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside }\"\n\t\t\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<div class=\"action-input__input-container\">\n\t\t\t\t\t\t\t\t<NcColorPicker\n\t\t\t\t\t\t\t\t\tid=\"inputId\"\n\t\t\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t\t\tclass=\"colorpicker__trigger\"\n\t\t\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\"\n\t\t\t\t\t\t\t\t\t@submit=\"$refs.form.requestSubmit()\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass=\"colorpicker__preview\"\n\t\t\t\t\t\t\t\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t\t\t\t:style=\"{ 'background-color': modelValue }\" />\n\t\t\t\t\t\t\t\t</NcColorPicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:type=\"type\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"arrowRight\"\n\t\t\t\t\t\t\t:trailing-button-label=\"trailingButtonLabel\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@trailing-button-click=\"$refs.form.requestSubmit()\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport { defineAsyncComponent } from 'vue'\nimport { t } from '../../l10n.ts'\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcDateTimePickerNative from '../NcDateTimePickerNative/index.ts'\nimport NcPasswordField from '../NcPasswordField/index.ts'\nimport NcTextField from '../NcTextField/index.ts'\n\nexport default {\n\tname: 'NcActionInput',\n\n\tcomponents: {\n\t\tNcDateTimePickerNative,\n\t\tNcPasswordField,\n\t\tNcTextField,\n\t\t// Lazy load components with more than 50kB bundle size impact\n\t\tNcColorPicker: defineAsyncComponent(() => import('../NcColorPicker/index.ts')),\n\t\tNcDateTimePicker: defineAsyncComponent(() => import('../NcDateTimePicker/index.js')),\n\t\tNcSelect: defineAsyncComponent(() => import('../NcSelect/index.js')),\n\t},\n\n\tmixins: [ActionGlobalMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the checkbox element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the text input element\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-input-' + createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * Icon to show with the action, can be either a CSS class or an URL\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 * type attribute of the input field\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator(type) {\n\t\t\t\treturn [\n\t\t\t\t\t'date',\n\t\t\t\t\t'datetime-local',\n\t\t\t\t\t'month',\n\t\t\t\t\t'multiselect',\n\t\t\t\t\t'number',\n\t\t\t\t\t'password',\n\t\t\t\t\t'search',\n\t\t\t\t\t'tel',\n\t\t\t\t\t'text',\n\t\t\t\t\t'time',\n\t\t\t\t\t'url',\n\t\t\t\t\t'week',\n\t\t\t\t\t'color',\n\t\t\t\t\t'email',\n\t\t\t\t].includes(type)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * id attribute for the native date time picker\n\t\t */\n\t\tidNativeDateTimePicker: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date-time-picker_id',\n\t\t},\n\n\t\t/**\n\t\t * Flag to use a native date time picker\n\t\t */\n\t\tisNativePicker: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The visible input label for accessibility purposes.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * If you want to show the label just above the\n\t\t * input field, pass in `true` to this prop.\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * value attribute of the input field\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [String, Date, Number, Array],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * aria-label attribute of the input field\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Attribute forwarded to the underlying NcPasswordField and NcTextField\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Trailing button label forwarded to the underlying NcTextField\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Submit'),\n\t\t},\n\n\t\t/**\n\t\t * CSS class to apply to the root element.\n\t\t */\n\t\tclass: {\n\t\t\ttype: [String, Array, Object],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'submit',\n\t\t'update:modelValue',\n\t],\n\n\tcomputed: {\n\t\tisIconUrl() {\n\t\t\ttry {\n\t\t\t\treturn new URL(this.icon)\n\t\t\t} catch {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tisMultiselectType() {\n\t\t\treturn this.type === 'multiselect'\n\t\t},\n\n\t\tnativeDatePickerType() {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'month':\n\t\t\t\tcase 'time':\n\t\t\t\tcase 'week':\n\t\t\t\tcase 'datetime-local':\n\t\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tdatePickerType() {\n\t\t\tif (!this.isNativePicker) {\n\t\t\t\tswitch (this.type) {\n\t\t\t\t\tcase 'date':\n\t\t\t\t\tcase 'month':\n\t\t\t\t\tcase 'time':\n\t\t\t\t\t\treturn this.type\n\n\t\t\t\t\tcase 'datetime-local':\n\t\t\t\t\t\treturn 'datetime'\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// closing datepicker popup on mouseleave = unfocus\n\t\tonLeave() {\n\t\t\tif (this.$refs.datetimepicker && this.$refs.datetimepicker.$refs.datepicker) {\n\t\t\t\tthis.$refs.datetimepicker.$refs.datepicker.closePopup()\n\t\t\t}\n\t\t},\n\n\t\tonSubmit(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t} else {\n\t\t\t\t// ignore submit\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tonUpdateModelValue(event) {\n\t\t\t/**\n\t\t\t * Emitted on update of the model value\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/inputs.scss';\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n\n$input-margin: 4px;\n\n.action-input {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\n\t&__icon-wrapper {\n\t\tdisplay: flex;\n\t\talign-self: center;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\t&:deep(.material-design-icon) {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\topacity: $opacity_full;\n\n\t\t\t.material-design-icon__svg {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > span {\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t}\n\n\t&__icon {\n\t\tmin-width: 0; /* Overwrite icons*/\n\t\tmin-height: 0;\n\t\t// Keep padding to define the width to assure correct position of a possible text\n\t\tpadding: calc(var(--default-clickable-area) / 2) 0 calc(var(--default-clickable-area) / 2) var(--default-clickable-area);\n\n\t\tbackground-position: #{$icon-margin} center;\n\t\tbackground-size: $icon-size;\n\t}\n\n\t// Forms & text inputs\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex: 1 1 auto;\n\n\t\tmargin: $input-margin 0;\n\t\tpadding-inline-end: $icon-margin;\n\t}\n\n\t&__container {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t}\n\n\t&__input-container {\n\t\tdisplay: flex;\n\n\t\t.colorpicker {\n\t\t\t&__trigger,\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 36px;\n\t\t\t\tborder-radius: var(--border-radius-element);\n\t\t\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__text-label {\n\t\tpadding: 4px 0;\n\t\tdisplay: block;\n\n\t\t&--hidden {\n\t\t\tposition: absolute;\n\t\t\tinset-inline-start: 0;\n\t\t\twidth: 1px;\n\t\t\theight: 1px;\n\t\t\toverflow: hidden;\n\t\t\tz-index: -1;\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t&__datetimepicker {\n\t\twidth: 100%;\n\n\t\t:deep(.mx-input) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t&__multi {\n\t\twidth: 100%;\n\t}\n}\n\n// if a form is the last of the list\n// add the same bottomMargin as the right padding\n// for visual balance\nli:last-child > .action-input {\n\tpadding-bottom: calc($icon-margin - $input-margin);\n}\n\n// same for first item\nli:first-child > .action-input:not(.action-input--visible-label) {\n\tpadding-top: calc($icon-margin - $input-margin);\n}\n\n</style>\n"],"names":["NcTextField","_createElementBlock","_createElementVNode","_renderSlot","_normalizeClass","_normalizeStyle","_openBlock","_createBlock","_mergeProps","_createVNode"],"mappings":";;;;;;;;;AAwQA,MAAK,YAAU;AAAA,EACd,MAAM;A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AAA;AAAA,cACb,OAAO,OAAA;AAAA,cACP,iBAAa,CAAG,OAAA,SAAS,OAAA;AAAA,cACzB,aAAa,KAAA;AAAA,cACb,UAAU,OAAA;AAAA,cACV,4BAA0B,SAAA,YAAW;AAAA,cACrC,MAAM,OAAA;AAAA,cACP,wBAAqB;AAAA,cACpB,yBAAuB,OAAA;AAAA,cACvB,wBAAsB,OAAA,sBAAkB,CAAK,OAAA;AAAA,eACtC,KAAA,QAAM;AAAA,cACb,uBAAqB,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAM,KAAK,cAAa;AAAA,cAC/C,uBAAoB,SAAA;AAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcActionInput-D1uLWx4N.mjs","sources":["../../src/components/NcActionInput/NcActionInput.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nAll undocumented attributes will be bound to the input, the datepicker or the select component, e.g. `maxlength`, `not-before`.\nFor the `NcSelect` component, all events will be passed through. Please see the `NcSelect` component's documentation for more details and examples.\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionInput v-model=\"text\" :label-outside=\"true\" label=\"Label outside the input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput v-model=\"text\" :show-trailing-button=\"false\" label=\"Input without trailing button\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput v-model=\"text\" label=\"Input with placeholder\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis is the placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" v-model=\"text\" label=\"Password with visible label\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconKeyOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" v-model=\"text\" :show-trailing-button=\"false\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconKeyOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"color\" v-model=\"color\" label=\"Favorite color\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconEyedropper :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tColor placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput label=\"Visible label\" v-model=\"text\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tInput with visible label\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :disabled=\"true\" label=\"This is a disabled input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" label=\"Native date picker\" isNativePicker v-model=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" v-model=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tinput-label=\"Fruit selection\"\n\t\t\t\t:options=\"['Apple', 'Banana', 'Cherry']\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\tv-model=\"multiSelected\"\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tinput-label=\"Fruit selection\"\n\t\t\t\ttrack-by=\"id\"\n\t\t\t\t:append-to-body=\"true\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:options=\"[{label:'Apple', id: 'apple'}, {label:'Banana', id: 'banana'}, {label:'Cherry', id: 'cherry'}]\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconPencilOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit object\n\t\t\t</NcActionInput>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport IconClose from 'vue-material-design-icons/Close.vue'\n\timport IconEyedropper from 'vue-material-design-icons/Eyedropper.vue'\n\timport IconKeyOutline from 'vue-material-design-icons/KeyOutline.vue'\n\timport IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconClose,\n\t\t\tIconEyedropper,\n\t\t\tIconKeyOutline,\n\t\t\tIconPencilOutline,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tcolor: '#0082C9',\n\t\t\t\tdate: new Date(),\n\t\t\t\ttext: 'This is the input text',\n\t\t\t\tmultiSelected: [],\n\t\t\t}\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"[{ 'action--disabled': disabled }, $props.class]\">\n\t\t<span\n\t\t\tclass=\"action-input\"\n\t\t\t:class=\"{\n\t\t\t\t'action-input-picker--disabled': disabled,\n\t\t\t\t'action-input--visible-label': labelOutside && label,\n\t\t\t}\"\n\t\t\t@mouseleave=\"onLeave\">\n\t\t\t<span class=\"action-input__icon-wrapper\">\n\t\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t\t<slot name=\"icon\">\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"action-input__icon\"\n\t\t\t\t\t\t:class=\"[isIconUrl ? 'action-input__icon--url' : icon]\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\" />\n\t\t\t\t</slot>\n\t\t\t</span>\n\n\t\t\t<!-- form and input -->\n\t\t\t<form\n\t\t\t\tref=\"form\"\n\t\t\t\tclass=\"action-input__form\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@submit.prevent=\"onSubmit\">\n\t\t\t\t<div class=\"action-input__container\">\n\t\t\t\t\t<label\n\t\t\t\t\t\tv-if=\"label && labelOutside && !isNativePicker\"\n\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside }\"\n\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"action-input__input-container\">\n\n\t\t\t\t\t\t<NcDateTimePicker\n\t\t\t\t\t\t\tv-if=\"datePickerType\"\n\t\t\t\t\t\t\tref=\"datetimepicker\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\tstyle=\"z-index: 99999999999;\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:type=\"datePickerType\"\n\t\t\t\t\t\t\t:input-class=\"['mx-input', { focusable: isFocusable }]\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tappend-to-body\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcDateTimePickerNative\n\t\t\t\t\t\t\tv-else-if=\"isNativePicker\"\n\t\t\t\t\t\t\t:id=\"idNativeDateTimePicker\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:type=\"nativeDatePickerType\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\tv-else-if=\"isMultiselectType\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:append-to-body=\"false\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__multi\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<NcPasswordField\n\t\t\t\t\t\t\tv-else-if=\"type === 'password'\"\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\n\t\t\t\t\t\t<div v-else-if=\"type === 'color'\" class=\"action-input__container\">\n\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\tv-if=\"label && type === 'color'\"\n\t\t\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside }\"\n\t\t\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<div class=\"action-input__input-container\">\n\t\t\t\t\t\t\t\t<NcColorPicker\n\t\t\t\t\t\t\t\t\tid=\"inputId\"\n\t\t\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t\t\tclass=\"colorpicker__trigger\"\n\t\t\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\"\n\t\t\t\t\t\t\t\t\t@submit=\"$refs.form.requestSubmit()\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass=\"colorpicker__preview\"\n\t\t\t\t\t\t\t\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t\t\t\t:style=\"{ 'background-color': modelValue }\" />\n\t\t\t\t\t\t\t\t</NcColorPicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:type=\"type\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"arrowRight\"\n\t\t\t\t\t\t\t:trailing-button-label=\"trailingButtonLabel\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@trailing-button-click=\"$refs.form.requestSubmit()\"\n\t\t\t\t\t\t\t@update:model-value=\"onUpdateModelValue\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport { defineAsyncComponent } from 'vue'\nimport { t } from '../../l10n.ts'\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcDateTimePickerNative from '../NcDateTimePickerNative/index.ts'\nimport NcPasswordField from '../NcPasswordField/index.ts'\nimport NcTextField from '../NcTextField/index.ts'\n\nexport default {\n\tname: 'NcActionInput',\n\n\tcomponents: {\n\t\tNcDateTimePickerNative,\n\t\tNcPasswordField,\n\t\tNcTextField,\n\t\t// Lazy load components with more than 50kB bundle size impact\n\t\tNcColorPicker: defineAsyncComponent(() => import('../NcColorPicker/index.ts')),\n\t\tNcDateTimePicker: defineAsyncComponent(() => import('../NcDateTimePicker/index.js')),\n\t\tNcSelect: defineAsyncComponent(() => import('../NcSelect/index.js')),\n\t},\n\n\tmixins: [ActionGlobalMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the checkbox element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the text input element\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-input-' + createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * Icon to show with the action, can be either a CSS class or an URL\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 * type attribute of the input field\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator(type) {\n\t\t\t\treturn [\n\t\t\t\t\t'date',\n\t\t\t\t\t'datetime-local',\n\t\t\t\t\t'month',\n\t\t\t\t\t'multiselect',\n\t\t\t\t\t'number',\n\t\t\t\t\t'password',\n\t\t\t\t\t'search',\n\t\t\t\t\t'tel',\n\t\t\t\t\t'text',\n\t\t\t\t\t'time',\n\t\t\t\t\t'url',\n\t\t\t\t\t'week',\n\t\t\t\t\t'color',\n\t\t\t\t\t'email',\n\t\t\t\t].includes(type)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * id attribute for the native date time picker\n\t\t */\n\t\tidNativeDateTimePicker: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date-time-picker_id',\n\t\t},\n\n\t\t/**\n\t\t * Flag to use a native date time picker\n\t\t */\n\t\tisNativePicker: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The visible input label for accessibility purposes.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * If you want to show the label just above the\n\t\t * input field, pass in `true` to this prop.\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * value attribute of the input field\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [String, Date, Number, Array],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * aria-label attribute of the input field\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Attribute forwarded to the underlying NcPasswordField and NcTextField\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Trailing button label forwarded to the underlying NcTextField\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Submit'),\n\t\t},\n\n\t\t/**\n\t\t * CSS class to apply to the root element.\n\t\t */\n\t\tclass: {\n\t\t\ttype: [String, Array, Object],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: [\n\t\t'submit',\n\t\t'update:modelValue',\n\t],\n\n\tcomputed: {\n\t\tisIconUrl() {\n\t\t\ttry {\n\t\t\t\treturn new URL(this.icon)\n\t\t\t} catch {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tisMultiselectType() {\n\t\t\treturn this.type === 'multiselect'\n\t\t},\n\n\t\tnativeDatePickerType() {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'month':\n\t\t\t\tcase 'time':\n\t\t\t\tcase 'week':\n\t\t\t\tcase 'datetime-local':\n\t\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tdatePickerType() {\n\t\t\tif (!this.isNativePicker) {\n\t\t\t\tswitch (this.type) {\n\t\t\t\t\tcase 'date':\n\t\t\t\t\tcase 'month':\n\t\t\t\t\tcase 'time':\n\t\t\t\t\t\treturn this.type\n\n\t\t\t\t\tcase 'datetime-local':\n\t\t\t\t\t\treturn 'datetime'\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// closing datepicker popup on mouseleave = unfocus\n\t\tonLeave() {\n\t\t\tif (this.$refs.datetimepicker && this.$refs.datetimepicker.$refs.datepicker) {\n\t\t\t\tthis.$refs.datetimepicker.$refs.datepicker.closePopup()\n\t\t\t}\n\t\t},\n\n\t\tonSubmit(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t} else {\n\t\t\t\t// ignore submit\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tonUpdateModelValue(event) {\n\t\t\t/**\n\t\t\t * Emitted on update of the model value\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/inputs.scss';\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n\n$input-margin: 4px;\n\n.action-input {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\n\t&__icon-wrapper {\n\t\tdisplay: flex;\n\t\talign-self: center;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\t&:deep(.material-design-icon) {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\topacity: $opacity_full;\n\n\t\t\t.material-design-icon__svg {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > span {\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t}\n\n\t&__icon {\n\t\tmin-width: 0; /* Overwrite icons*/\n\t\tmin-height: 0;\n\t\t// Keep padding to define the width to assure correct position of a possible text\n\t\tpadding: calc(var(--default-clickable-area) / 2) 0 calc(var(--default-clickable-area) / 2) var(--default-clickable-area);\n\n\t\tbackground-position: #{$icon-margin} center;\n\t\tbackground-size: $icon-size;\n\t}\n\n\t// Forms & text inputs\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex: 1 1 auto;\n\n\t\tmargin: $input-margin 0;\n\t\tpadding-inline-end: $icon-margin;\n\t}\n\n\t&__container {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t}\n\n\t&__input-container {\n\t\tdisplay: flex;\n\n\t\t.colorpicker {\n\t\t\t&__trigger,\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 36px;\n\t\t\t\tborder-radius: var(--border-radius-element);\n\t\t\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__text-label {\n\t\tpadding: 4px 0;\n\t\tdisplay: block;\n\n\t\t&--hidden {\n\t\t\tposition: absolute;\n\t\t\tinset-inline-start: 0;\n\t\t\twidth: 1px;\n\t\t\theight: 1px;\n\t\t\toverflow: hidden;\n\t\t\tz-index: -1;\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t&__datetimepicker {\n\t\twidth: 100%;\n\n\t\t:deep(.mx-input) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t&__multi {\n\t\twidth: 100%;\n\t}\n}\n\n// if a form is the last of the list\n// add the same bottomMargin as the right padding\n// for visual balance\nli:last-child > .action-input {\n\tpadding-bottom: calc($icon-margin - $input-margin);\n}\n\n// same for first item\nli:first-child > .action-input:not(.action-input--visible-label) {\n\tpadding-top: calc($icon-margin - $input-margin);\n}\n\n</style>\n"],"names":["NcTextField","_createElementBlock","_createElementVNode","_renderSlot","_normalizeClass","_normalizeStyle","_openBlock","_createBlock","_mergeProps","_createVNode"],"mappings":";;;;;;;;;AAwQA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,iBACA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G,OAAA,SAAS,OAAA;AAAA,cACzB,aAAa,KAAA;AAAA,cACb,UAAU,OAAA;AAAA,cACV,4BAA0B,SAAA,YAAW;AAAA,cACrC,MAAM,OAAA;AAAA,cACP,wBAAqB;AAAA,cACpB,yBAAuB,OAAA;AAAA,cACvB,wBAAsB,OAAA,sBAAkB,CAAK,OAAA;AAAA,eACtC,KAAA,QAAM;AAAA,cACb,uBAAqB,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAM,KAAK,cAAa;AAAA,cAC/C,uBAAoB,SAAA;AAAA;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcActionLink-DAEr-vmd.css';
|
|
2
|
-
import { A as ActionTextMixin } from "./actionText-
|
|
3
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
2
|
+
import { A as ActionTextMixin } from "./actionText-BXR0sWNu.mjs";
|
|
3
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
4
4
|
import { createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
const _sfc_main = {
|
|
@@ -109,4 +109,4 @@ const NcActionLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_ren
|
|
|
109
109
|
export {
|
|
110
110
|
NcActionLink as N
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=NcActionLink-
|
|
112
|
+
//# sourceMappingURL=NcActionLink-Cd69py4e.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionLink-
|
|
1
|
+
{"version":3,"file":"NcActionLink-Cd69py4e.mjs","sources":["../../src/components/NcActionLink/NcActionLink.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconOpenInNew :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tNextcloud website\n\t\t\t</NcActionLink>\n\t\t</NcActions>\n\n\t\t<NcActions>\n\t\t\t<NcActionLink href=\"https://www.gnu.org/licenses/gpl.odt\"\n\t\t\t\t download=\"AGPL License text.odt\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconDownloadOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDownload AGPL license text\n\t\t\t</NcActionLink>\n\t\t</NcActions>\n\n\t\t<NcActions>\n\t\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconOpenInNew :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tNextcloud website\n\t\t\t</NcActionLink>\n\t\t\t<NcActionLink href=\"https://www.gnu.org/licenses/gpl.odt\"\n\t\t\t\t download=\"AGPL License text.odt\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconDownloadOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDownload AGPL license text\n\t\t\t</NcActionLink>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport IconDownloadOutline from 'vue-material-design-icons/DownloadOutline.vue'\nimport IconOpenInNew from 'vue-material-design-icons/OpenInNew.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconDownloadOutline,\n\t\tIconOpenInNew,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<a\n\t\t\t:download=\"download\"\n\t\t\t:href=\"href\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:target=\"target\"\n\t\t\t:title=\"title\"\n\t\t\tclass=\"action-link focusable\"\n\t\t\trel=\"nofollow noreferrer noopener\"\n\t\t\t:role=\"isInSemanticMenu && 'menuitem'\"\n\t\t\t@click=\"onClick\">\n\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-link__icon\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-link__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span\n\t\t\t\tv-if=\"name\"\n\t\t\t\tclass=\"action-link__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-link__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-link__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span\n\t\t\t\tv-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-link__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-link__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</a>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\nexport default {\n\tname: 'NcActionLink',\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * destionation to link to\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tvalidator: (value) => {\n\t\t\t\t// href is either an anchor or a valid url starting with a scheme or a relative path\n\t\t\t\ttry {\n\t\t\t\t\treturn new URL(value)\n\t\t\t\t} catch {\n\t\t\t\t\treturn value.startsWith('#') || value.startsWith('/')\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * download the link instead of opening\n\t\t */\n\t\tdownload: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * target to open the link\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '_self',\n\t\t\tvalidator: (value) => {\n\t\t\t\treturn value && (!value.startsWith('_') || ['_blank', '_self', '_parent', '_top'].indexOf(value) > -1)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Declares a native tooltip when not null\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action-item('link');\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_renderSlot","_normalizeClass","_normalizeStyle","_openBlock","_toDisplayString"],"mappings":";;;;AAqHA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,QAAQ,CAAC,eAAe;AAAA,EAExB,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW,CAAC,UAAU;AAErB,YAAI;AACH,iBAAO,IAAI,IAAI,KAAK;AAAA,QACrB,QAAQ;AACP,iBAAO,MAAM,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D,QAAA;AAAA,UAA9C,OAAM;AAAA,UAAwB,aAAAK,gBAAa,KAAL,IAAI;AAAA;YAOrC,KAAA,2BADZN,mBAGiB,QAAA;AAAA;QADhB,OAAM;AAAA,QACN,aAAAM,gBAAa,KAAL,IAAI;AAAA,+CAGbN,mBAAwD,QAAxD,YAAwDM,gBAAd,KAAA,IAAI,GAAA,CAAA;AAAA;;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../assets/NcActionRadio-DgdLD238.css';
|
|
|
2
2
|
import { createElementBlock, openBlock, normalizeClass, createElementVNode, withDirectives, createCommentVNode, withKeys, withModifiers, vModelRadio, toDisplayString, useModel } from "vue";
|
|
3
3
|
import { A as ActionGlobalMixin } from "./actionGlobal-BZFdtdJL.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
5
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
name: "NcActionRadio",
|
|
@@ -133,4 +133,4 @@ const NcActionRadio = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_re
|
|
|
133
133
|
export {
|
|
134
134
|
NcActionRadio as N
|
|
135
135
|
};
|
|
136
|
-
//# sourceMappingURL=NcActionRadio-
|
|
136
|
+
//# sourceMappingURL=NcActionRadio-BM24rDbc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionRadio-
|
|
1
|
+
{"version":3,"file":"NcActionRadio-BM24rDbc.mjs","sources":["../../src/components/NcActionRadio/NcActionRadio.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\nUsually, you will provide a name prop to bind the radio together.\nSo that only one of each name set can be selected at the same time.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionRadio v-for=\"option in radioOptions\"\n\t\t\t\t:key=\"option.value\"\n\t\t\t\t:value=\"option.value\"\n\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\tname=\"uniqueId\"\n\t\t\t\tv-model=\"radioValue\">\n\t\t\t\t{{ option.label }}\n\t\t\t</NcActionRadio>\n\t\t</NcActions>\n\t\t<span>Selected value: {{ radioValue }}</span>\n\t</div>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tradioOptions: [\n\t\t\t\t\t{ value: 'first', label: 'First choise', disabled: false },\n\t\t\t\t\t{ value: 'second', label: 'Second choise', disabled: false },\n\t\t\t\t\t{ value: 'third', label: 'Third choise', disabled: false },\n\t\t\t\t\t{ value: 'fourth', label: 'Fourth choise (disabled)', disabled: true },\n\t\t\t\t],\n\t\t\t\tradioValue: 'first',\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<span class=\"action-radio\" role=\"menuitemradio\" :aria-checked=\"ariaChecked\">\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"radio\"\n\t\t\t\tv-model=\"model\"\n\t\t\t\tclass=\"radio action-radio__radio\"\n\t\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:value=\"value\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t@keydown.enter.exact.prevent=\"toggleInput\"\n\t\t\t\t@change=\"onChange\">\n\t\t\t<label ref=\"label\" :for=\"id\" class=\"action-radio__label\">{{ text }}</label>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport { useModel } from 'vue'\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\nexport default {\n\tname: 'NcActionRadio',\n\n\tmixins: [ActionGlobalMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the radio element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * checked state of the radio element\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Define if this radio is part of a set.\n\t\t * Checking the radio will disable all the\n\t\t * others with the same name.\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 * value of the radio input\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the radio element\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'change',\n\t\t'update:modelValue',\n\t],\n\n\tsetup(props) {\n\t\treturn {\n\t\t\tmodel: useModel(props, 'modelValue'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * aria-checked attribute for role=\"menuitemcheckbox\"\n\t\t *\n\t\t * @return {'true'|'false'|undefined} aria-checked value if needed\n\t\t */\n\t\tariaChecked() {\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\treturn this.modelValue === this.value ? 'true' : 'false'\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\t},\n\n\tmethods: {\n\t\ttoggleInput(/* event */) {\n\t\t\t// by clicking we also trigger the change event\n\t\t\tthis.$refs.label.click()\n\t\t},\n\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted when the radio state is changed\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action--disabled;\n\n.action-radio {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\tline-height: var(--default-clickable-area);\n\n\t/* checkbox/radio fixes */\n\t&__radio {\n\t\tposition: absolute;\n\t\tinset-inline-start: 0 !important;\n\t\tz-index: -1;\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\talign-items: center; // align radio to text\n\n\t\twidth: 100%;\n\t\tpadding: 0 !important;\n\t\tpadding-inline-end: $icon-margin !important;\n\n\t\t// (34 -14) / 2 = 10 same as ncactioncheckbox\n\t\t&::before {\n\t\t\tmargin: calc((var(--default-clickable-area) - 14px) / 2) !important;\n\t\t}\n\t}\n\n\t&--disabled {\n\t\t&,\n\t\t.action-radio__label {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode"],"mappings":";;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AM,SAAA,oBAAgB;AAAA;IACnFC,mBAiBO,QAAA;AAAA,MAjBD,OAAM;AAAA,MAAe,MAAK;AAAA,MAAiB,gBAAc,SAAA;AAAA;qBAC9DA,mBAWoB,SAAA;AAAA,QAVlB,IAAI,OAAA;AAAA,QACL,KAAI;AAAA,qEACK,OAAA,QAAK;AAAA,QACd,OAAKD,eAAA,CAAC,6BAA2B,EAAA,WACZ,SAAA,YAAW,CAAA,CAAA;AAAA,QAC/B,UAAU,OAAA;AAAA,QACV,MAAM,OAAA;AAAA,QACN,OAAO,OAAA;AAAA,QACR,MAAK;AAAA,QACJ,yEAA6B,SAAA,eAAA,SAAA,YAAA,GAAA,IAAA,GAAW,CAAA,SAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA,QACxC,iDAAQ,SAAA,YAAA,SAAA,SAAA,GAAA,IAAA;AAAA;sBARA,OAAA,KAAK;AAAA;MASfC,mBAA2E,SAAA;AAAA,QAApE,KAAI;AAAA,QAAS,KAAK,OAAA;AAAA,QAAI,OAAM;AAAA,yBAAyB,KAAA,IAAI,GAAA,GAAA,UAAA;AAAA;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcActionRouter-DeYzeM5W.css';
|
|
2
|
-
import { A as ActionTextMixin } from "./actionText-
|
|
3
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
2
|
+
import { A as ActionTextMixin } from "./actionText-BXR0sWNu.mjs";
|
|
3
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
4
4
|
import { resolveComponent, createElementBlock, openBlock, createVNode, withCtx, renderSlot, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
const _sfc_main = {
|
|
@@ -79,4 +79,4 @@ const NcActionRouter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_r
|
|
|
79
79
|
export {
|
|
80
80
|
NcActionRouter as N
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=NcActionRouter-
|
|
82
|
+
//# sourceMappingURL=NcActionRouter-DtxPh20B.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionRouter-
|
|
1
|
+
{"version":3,"file":"NcActionRouter-DtxPh20B.mjs","sources":["../../src/components/NcActionRouter/NcActionRouter.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=\"action\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<RouterLink\n\t\t\t:aria-label\n\t\t\tclass=\"action-router focusable\"\n\t\t\trel=\"nofollow noreferrer noopener\"\n\t\t\t:role=\"isInSemanticMenu && 'menuitem'\"\n\t\t\t:title\n\t\t\t:to\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-router__icon\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-router__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span\n\t\t\t\tv-if=\"name\"\n\t\t\t\tclass=\"action-router__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-router__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-router__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span\n\t\t\t\tv-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-router__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-router__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</RouterLink>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { NC_ACTIONS_IS_SEMANTIC_MENU } from '../NcActions/useNcActions.ts'\n\nexport default {\n\tname: 'NcActionRouter',\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: NC_ACTIONS_IS_SEMANTIC_MENU,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * router-link to prop [https://router.vuejs.org/api/#to](https://router.vuejs.org/api/#to)\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../../assets/action.scss' as *;\n@include action-active;\n@include action-item('router');\n@include action--disabled;\n</style>\n"],"names":["_createElementBlock","_createVNode","_renderSlot","_createElementVNode","_normalizeClass","_normalizeStyle","_openBlock","_toDisplayString"],"mappings":";;;;AA0DA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,QAAQ,CAAC,eAAe;AAAA,EAExB,QAAQ;AAAA,IACP,kBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,IAAI;AAAA,MACH,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,UAAU;AAAA;;AAGb;;;;EApDI,OAAM;;AACE,MAAA,aAAA,EAAA,OAAM,sBAAqB;;;;;EAkBvB,OAAM;;;;sBAxCrBA,mBA6CK,MAAA;AAAA,IA7CD,OAAM;AAAA,IAAU,MAAM,SAAA,oBAAgB;AAAA;IACzCC,YA2Ca,uBAAA;AAAA,MA1CX,cAAA,KAAA;AAAA,MACD,OAAM;AAAA,MACN,KAAI;AAAA,MACH,MAAM,SAAA,oBAAgB;AAAA,MACtB,OAAA,KAAA;AAAA,MACA,IAAA,OAAA;AAAA,MACA,SAAO,KAAA;AAAA;uBAER,MAMO;AAAA,QANPC,WAMO,yBANP,MAMO;AAAA,UALNC,mBAImE,QAAA;AAAA,YAHlE,eAAY;AAAA,YACZ,OAAKC,eAAA,CAAC,uBAAqB,CAClB,KAAA,yCAAyC,KAAA,IAAI,CAAA,CAAA;AAAA,YACrD,OAAKC,eAAA,EAAA,iBAAqB,KAAA,YAAS,OAAU,KAAA,IAAI,MAAA,KAAA,CAAA;AAAA;;QAK7C,KAAA,QADPC,aAAAN,mBAUO,QAVP,YAUO;AAAA,UAPNG,mBAES,UAFT,YAESI,gBADL,KAAA,IAAI,GAAA,CAAA;AAAA,oCAERJ,mBAAI,MAAA,MAAA,MAAA,EAAA;AAAA,UAGJA,mBAAsD,QAAA;AAAA,YAAhD,OAAM;AAAA,YAA0B,aAAAI,gBAAa,KAAL,IAAI;AAAA;cAOvC,KAAA,2BADZP,mBAGiB,QAAA;AAAA;UADhB,OAAM;AAAA,UACN,aAAAO,gBAAa,KAAL,IAAI;AAAA,iDAGbP,mBAA0D,QAA1D,YAA0DO,gBAAd,KAAA,IAAI,GAAA,CAAA;AAAA;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcActionText-D9InmayH.css';
|
|
2
|
-
import { A as ActionTextMixin } from "./actionText-
|
|
3
|
-
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-
|
|
2
|
+
import { A as ActionTextMixin } from "./actionText-BXR0sWNu.mjs";
|
|
3
|
+
import { a as NC_ACTIONS_IS_SEMANTIC_MENU } from "./useNcActions-BzPO2c4h.mjs";
|
|
4
4
|
import { createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
const _sfc_main = {
|
|
@@ -61,4 +61,4 @@ const NcActionText = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_ren
|
|
|
61
61
|
export {
|
|
62
62
|
NcActionText as N
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=NcActionText-
|
|
64
|
+
//# sourceMappingURL=NcActionText-Bd1fgVqA.mjs.map
|