@nextcloud/vue 8.31.0 → 8.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/Components/NcActionButton.cjs +1 -1
- package/dist/Components/NcActionButton.mjs +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +1 -1
- package/dist/Components/NcActionCheckbox.cjs +1 -1
- package/dist/Components/NcActionCheckbox.mjs +1 -1
- package/dist/Components/NcActionInput.cjs +1 -1
- package/dist/Components/NcActionInput.mjs +1 -1
- package/dist/Components/NcActionLink.cjs +3 -3
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +3 -3
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +1 -1
- package/dist/Components/NcActionRadio.mjs +1 -1
- package/dist/Components/NcActionRouter.cjs +2 -2
- package/dist/Components/NcActionRouter.mjs +2 -2
- package/dist/Components/NcActionText.cjs +2 -2
- package/dist/Components/NcActionText.mjs +2 -2
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/NcAppNavigationNew.cjs +1 -1
- package/dist/Components/NcAppNavigationNew.mjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSearch.cjs +1 -1
- package/dist/Components/NcAppNavigationSearch.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +1 -1
- package/dist/Components/NcAppSettingsSection.cjs +2 -63
- package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
- package/dist/Components/NcAppSettingsSection.mjs +2 -63
- package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.mjs +1 -1
- package/dist/Components/NcAppSidebarTab.cjs +3 -2
- package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
- package/dist/Components/NcAppSidebarTab.mjs +3 -2
- package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
- package/dist/Components/NcAssistantButton.cjs +1 -1
- package/dist/Components/NcAssistantButton.mjs +1 -1
- package/dist/Components/NcAssistantIcon.cjs +1 -1
- package/dist/Components/NcAssistantIcon.mjs +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcBreadcrumb.cjs +1 -1
- package/dist/Components/NcBreadcrumb.mjs +1 -1
- package/dist/Components/NcBreadcrumbs.cjs +1 -1
- package/dist/Components/NcBreadcrumbs.mjs +1 -1
- package/dist/Components/NcButton.cjs +1 -1
- package/dist/Components/NcButton.mjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +14 -8
- package/dist/Components/NcChip.cjs.map +1 -1
- package/dist/Components/NcChip.mjs +14 -8
- package/dist/Components/NcChip.mjs.map +1 -1
- package/dist/Components/NcCollectionList.cjs +1 -1
- package/dist/Components/NcCollectionList.mjs +1 -1
- package/dist/Components/NcColorPicker.cjs +1 -1
- package/dist/Components/NcColorPicker.mjs +1 -1
- package/dist/Components/NcContent.cjs +1 -1
- package/dist/Components/NcContent.mjs +1 -1
- package/dist/Components/NcCounterBubble.cjs +1 -1
- package/dist/Components/NcCounterBubble.mjs +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +32 -19
- package/dist/Components/NcDateTimePicker.cjs.map +1 -1
- package/dist/Components/NcDateTimePicker.mjs +32 -19
- package/dist/Components/NcDateTimePicker.mjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.cjs +32 -14
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +32 -14
- package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
- package/dist/Components/NcDialog.cjs +1 -1
- package/dist/Components/NcDialog.mjs +1 -1
- package/dist/Components/NcDialogButton.cjs +1 -1
- package/dist/Components/NcDialogButton.mjs +1 -1
- package/dist/Components/NcEllipsisedOption.cjs +1 -1
- package/dist/Components/NcEllipsisedOption.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcEmptyContent.cjs +2 -1
- package/dist/Components/NcEmptyContent.cjs.map +1 -1
- package/dist/Components/NcEmptyContent.mjs +2 -1
- package/dist/Components/NcEmptyContent.mjs.map +1 -1
- package/dist/Components/NcHeaderButton.cjs +1 -1
- package/dist/Components/NcHeaderButton.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcHighlight.cjs +1 -1
- package/dist/Components/NcHighlight.mjs +1 -1
- package/dist/Components/NcIconSvgWrapper.cjs +1 -1
- package/dist/Components/NcIconSvgWrapper.mjs +1 -1
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.mjs +1 -1
- package/dist/Components/NcKbd.cjs +1 -1
- package/dist/Components/NcKbd.mjs +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +1 -1
- package/dist/Components/NcListItemIcon.mjs +1 -1
- package/dist/Components/NcModal.cjs +33 -18
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +33 -18
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcNoteCard.cjs +2 -2
- package/dist/Components/NcNoteCard.mjs +2 -2
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/NcProgressBar.cjs +1 -1
- package/dist/Components/NcProgressBar.mjs +1 -1
- package/dist/Components/NcRadioGroup.cjs +1 -1
- package/dist/Components/NcRadioGroup.mjs +1 -1
- package/dist/Components/NcRadioGroupButton.cjs +1 -1
- package/dist/Components/NcRadioGroupButton.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +2 -2
- package/dist/Components/NcRichContenteditable.mjs +2 -2
- package/dist/Components/NcRichText.cjs +3 -3
- package/dist/Components/NcRichText.mjs +4 -4
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSelectUsers.cjs +1 -1
- package/dist/Components/NcSelectUsers.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +1 -1
- package/dist/Components/NcTextArea.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcThemeProvider.cjs +1 -1
- package/dist/Components/NcThemeProvider.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Components/NcVNodes.cjs +2 -1
- package/dist/Components/NcVNodes.cjs.map +1 -1
- package/dist/Components/NcVNodes.mjs +2 -1
- package/dist/Components/NcVNodes.mjs.map +1 -1
- package/dist/Composables/useFormatDateTime.cjs +27 -12
- package/dist/Composables/useFormatDateTime.cjs.map +1 -1
- package/dist/Composables/useFormatDateTime.mjs +27 -12
- package/dist/Composables/useFormatDateTime.mjs.map +1 -1
- package/dist/Composables/useHotKey.cjs +2 -1
- package/dist/Composables/useHotKey.cjs.map +1 -1
- package/dist/Composables/useHotKey.mjs +2 -1
- package/dist/Composables/useHotKey.mjs.map +1 -1
- package/dist/Composables/useIsDarkTheme.cjs +5 -2
- package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
- package/dist/Composables/useIsDarkTheme.mjs +5 -2
- package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
- package/dist/Composables/useIsMobile.cjs.map +1 -1
- package/dist/Composables/useIsMobile.mjs.map +1 -1
- package/dist/Directives/Linkify.cjs +2 -1
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +2 -1
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Functions/contactsMenu.cjs +3 -2
- package/dist/Functions/contactsMenu.cjs.map +1 -1
- package/dist/Functions/contactsMenu.mjs +3 -2
- package/dist/Functions/contactsMenu.mjs.map +1 -1
- package/dist/Functions/dialog.cjs +20 -5
- package/dist/Functions/dialog.cjs.map +1 -1
- package/dist/Functions/dialog.mjs +20 -5
- package/dist/Functions/dialog.mjs.map +1 -1
- package/dist/Functions/emoji.cjs +1 -1
- package/dist/Functions/emoji.mjs +1 -1
- package/dist/Functions/reference.cjs +2 -2
- package/dist/Functions/reference.mjs +2 -2
- package/dist/Functions/registerReference.cjs +1 -1
- package/dist/Functions/registerReference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +2 -2
- package/dist/Functions/usernameToColor.cjs.map +1 -1
- package/dist/Functions/usernameToColor.mjs +2 -2
- package/dist/Functions/usernameToColor.mjs.map +1 -1
- package/dist/Mixins/isMobile.cjs.map +1 -1
- package/dist/Mixins/isMobile.mjs.map +1 -1
- package/dist/Mixins/richEditor.cjs +1 -1
- package/dist/Mixins/richEditor.mjs +1 -1
- package/dist/assets/{NcActionInput-DXZaAilC.css → NcActionInput-DsGwr3wt.css} +65 -65
- package/dist/assets/{NcAppContent-DerHKU6P.css → NcAppContent-BpjG38I8.css} +23 -23
- package/dist/assets/{NcAppNavigation-R4E_wTZ-.css → NcAppNavigation-Bg4Oe7WC.css} +12 -12
- package/dist/assets/{NcAppNavigationItem-Kua1hP7u.css → NcAppNavigationItem-UaB3qdsS.css} +36 -36
- package/dist/assets/{NcAppSettingsDialog-DiJpVNeb.css → NcAppSettingsDialog-DH3DIIwL.css} +10 -10
- package/dist/assets/{NcAppSettingsSection-IzrCzLDw.css → NcAppSettingsSection-Dq0eTGEp.css} +3 -3
- package/dist/assets/{NcAppSidebar-CJYtNcF0.css → NcAppSidebar-Bd2cj1W-.css} +44 -44
- package/dist/assets/{NcAvatar-BdAXbXdR.css → NcAvatar-Cm4kVIfS.css} +24 -24
- package/dist/assets/{NcButton-D8AOCliw.css → NcButton-uQUvp7DS.css} +46 -46
- package/dist/assets/{NcCollectionList-DInDhsAS.css → NcCollectionList-hRgvNUMR.css} +15 -15
- package/dist/assets/{NcColorPicker-CGI9ElwB.css → NcColorPicker-CCqpXoam.css} +43 -35
- package/dist/assets/{NcContent-BedDNXST.css → NcContent-IIXgAj_u.css} +10 -10
- package/dist/assets/{NcDateTimePicker-4Zw7r2r4.css → NcDateTimePicker-C6sMtYzL.css} +13 -13
- package/dist/assets/{NcEmojiPicker-CrjOSMLF.css → NcEmojiPicker-B-iLLj37.css} +122 -122
- package/dist/assets/{NcModal-BzkYPomo.css → NcModal-4ZPVUmG2.css} +62 -62
- package/dist/assets/{NcRadioGroupButton-B1hPj4B8.css → NcRadioGroupButton-6mf16D0h.css} +16 -15
- package/dist/assets/{NcRelatedResourcesPanel-d2OxhjiL.css → NcRelatedResourcesPanel-BgMc8bue.css} +17 -17
- package/dist/assets/{NcRichContenteditable-BoM95AVW.css → NcRichContenteditable-Ds_cptgr.css} +11 -11
- package/dist/assets/{NcRichText-BDx2fupZ.css → NcRichText-CVy4zTPr.css} +2 -2
- package/dist/assets/{referencePickerModal-CTpc6_U6.css → referencePickerModal-CGtNx7ew.css} +6 -6
- package/dist/chunks/{NcActionButton-CVW8aRkE.mjs → NcActionButton-CZsSFAT4.mjs} +5 -5
- package/dist/chunks/{NcActionButton-CVW8aRkE.mjs.map → NcActionButton-CZsSFAT4.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-CFXzNoFT.cjs → NcActionButton-lJ0IA3IS.cjs} +5 -5
- package/dist/chunks/{NcActionButton-CFXzNoFT.cjs.map → NcActionButton-lJ0IA3IS.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs → NcActionButtonGroup-CIvAeDpU.mjs} +3 -3
- package/dist/chunks/{NcActionButtonGroup-BOr5Of3k.mjs.map → NcActionButtonGroup-CIvAeDpU.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs → NcActionButtonGroup-CQZL14Nz.cjs} +3 -3
- package/dist/chunks/{NcActionButtonGroup-Bwuy2WZQ.cjs.map → NcActionButtonGroup-CQZL14Nz.cjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs → NcActionCheckbox-BAuN4ZMC.mjs} +2 -2
- package/dist/chunks/{NcActionCheckbox-C05ls65i.mjs.map → NcActionCheckbox-BAuN4ZMC.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs → NcActionCheckbox-BvMmq0jL.cjs} +2 -2
- package/dist/chunks/{NcActionCheckbox-Dg_1Ovt0.cjs.map → NcActionCheckbox-BvMmq0jL.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-CoG-fZq9.mjs → NcActionInput-CfznemNH.mjs} +9 -9
- package/dist/chunks/{NcActionInput-CoG-fZq9.mjs.map → NcActionInput-CfznemNH.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs → NcActionInput-DfjLV0Gg.cjs} +9 -9
- package/dist/chunks/{NcActionInput-iIJpNS_Q.cjs.map → NcActionInput-DfjLV0Gg.cjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs → NcActionRadio-Bg5VuF7I.mjs} +2 -2
- package/dist/chunks/{NcActionRadio-Bpbs2dPm.mjs.map → NcActionRadio-Bg5VuF7I.mjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs → NcActionRadio-CBh6AlC4.cjs} +2 -2
- package/dist/chunks/{NcActionRadio-Dtrwffyh.cjs.map → NcActionRadio-CBh6AlC4.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-BpahzGpr.cjs → NcActionTextEditable-BhucWrOO.cjs} +6 -6
- package/dist/chunks/{NcActionTextEditable-BpahzGpr.cjs.map → NcActionTextEditable-BhucWrOO.cjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs → NcActionTextEditable-CSP4OjpU.mjs} +6 -6
- package/dist/chunks/{NcActionTextEditable-DRwDJjPd.mjs.map → NcActionTextEditable-CSP4OjpU.mjs.map} +1 -1
- package/dist/chunks/{NcActions-C832pWHO.mjs → NcActions-A918mfXE.mjs} +82 -64
- package/dist/chunks/{NcActions-C832pWHO.mjs.map → NcActions-A918mfXE.mjs.map} +1 -1
- package/dist/chunks/{NcActions-B7oXbiVt.cjs → NcActions-D3N_As6c.cjs} +82 -64
- package/dist/chunks/{NcActions-B7oXbiVt.cjs.map → NcActions-D3N_As6c.cjs.map} +1 -1
- package/dist/chunks/{NcAppContent-Djy38ou2.cjs → NcAppContent-CCyPMvUa.cjs} +27 -31
- package/dist/chunks/NcAppContent-CCyPMvUa.cjs.map +1 -0
- package/dist/chunks/{NcAppContent-C9NGJE6n.mjs → NcAppContent-DFlcxER-.mjs} +27 -31
- package/dist/chunks/NcAppContent-DFlcxER-.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs → NcAppNavigation-CCHYn0D6.cjs} +7 -6
- package/dist/chunks/{NcAppNavigation-C0Oc0gQ6.cjs.map → NcAppNavigation-CCHYn0D6.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs → NcAppNavigation-CLF6-i2t.mjs} +7 -6
- package/dist/chunks/{NcAppNavigation-DjtmN3dS.mjs.map → NcAppNavigation-CLF6-i2t.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs → NcAppNavigationCaption-CsG8P-1P.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-CsoHaLXg.mjs.map → NcAppNavigationCaption-CsG8P-1P.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs → NcAppNavigationCaption-DhW300oH.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-D4-hEmCi.cjs.map → NcAppNavigationCaption-DhW300oH.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs → NcAppNavigationItem-CwuKVEUN.mjs} +9 -9
- package/dist/chunks/{NcAppNavigationItem-DvVYHshm.mjs.map → NcAppNavigationItem-CwuKVEUN.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs → NcAppNavigationItem-HZVy5JEa.cjs} +9 -9
- package/dist/chunks/{NcAppNavigationItem-ZOXUMmX5.cjs.map → NcAppNavigationItem-HZVy5JEa.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs → NcAppNavigationNew-DbqusDUV.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-AiFYSCW1.mjs.map → NcAppNavigationNew-DbqusDUV.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs → NcAppNavigationNew-T56pahiu.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-BqNIa8N9.cjs.map → NcAppNavigationNew-T56pahiu.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs → NcAppNavigationNewItem-BsnZWCLW.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-CdlWkGU3.mjs.map → NcAppNavigationNewItem-BsnZWCLW.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs → NcAppNavigationNewItem-DMRZwa_y.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-BuEkCd2H.cjs.map → NcAppNavigationNewItem-DMRZwa_y.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs → NcAppNavigationSearch-BlG1xMok.cjs} +9 -5
- package/dist/chunks/{NcAppNavigationSearch-BXjB3FEJ.cjs.map → NcAppNavigationSearch-BlG1xMok.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs → NcAppNavigationSearch-DCMN2cWp.mjs} +9 -5
- package/dist/chunks/{NcAppNavigationSearch-CsIzwF6F.mjs.map → NcAppNavigationSearch-DCMN2cWp.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-CkFZMLtH.cjs → NcAppNavigationSettings-DlIDzhxh.cjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-CkFZMLtH.cjs.map → NcAppNavigationSettings-DlIDzhxh.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-Dq2O3kRz.mjs → NcAppNavigationSettings-n8OaxTbE.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-Dq2O3kRz.mjs.map → NcAppNavigationSettings-n8OaxTbE.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs → NcAppNavigationToggle-ClYKr8Zn.mjs} +14 -13
- package/dist/chunks/{NcAppNavigationToggle-DlWpnYdz.mjs.map → NcAppNavigationToggle-ClYKr8Zn.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs → NcAppNavigationToggle-Cn1UvxNP.cjs} +14 -13
- package/dist/chunks/{NcAppNavigationToggle-C2vtZ3uV.cjs.map → NcAppNavigationToggle-Cn1UvxNP.cjs.map} +1 -1
- package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs +132 -0
- package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs.map +1 -0
- package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs +134 -0
- package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs.map +1 -0
- package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs +88 -0
- package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs.map +1 -0
- package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs +87 -0
- package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs.map +1 -0
- package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs → NcAppSidebar-CVcOP4bk.mjs} +20 -17
- package/dist/chunks/{NcAppSidebar-Bda_fc-F.mjs.map → NcAppSidebar-CVcOP4bk.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs → NcAppSidebar-Ddt82bsA.cjs} +20 -17
- package/dist/chunks/{NcAppSidebar-Cx2ZxU4N.cjs.map → NcAppSidebar-Ddt82bsA.cjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs → NcAssistantButton-WQvWhoAr.cjs} +5 -5
- package/dist/chunks/{NcAssistantButton-zriu0Kiz.cjs.map → NcAssistantButton-WQvWhoAr.cjs.map} +1 -1
- package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs → NcAssistantButton-lDdWOemf.mjs} +5 -5
- package/dist/chunks/{NcAssistantButton-Dk28Wilk.mjs.map → NcAssistantButton-lDdWOemf.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs → NcAssistantIcon-BTjYuSQ9.mjs} +5 -5
- package/dist/chunks/{NcAssistantIcon-CtEF1hjA.mjs.map → NcAssistantIcon-BTjYuSQ9.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs → NcAssistantIcon-RDQ8YhZE.cjs} +5 -5
- package/dist/chunks/{NcAssistantIcon-B-Udgta_.cjs.map → NcAssistantIcon-RDQ8YhZE.cjs.map} +1 -1
- package/dist/chunks/{NcAvatar-CuYtFEdJ.mjs → NcAvatar-Cupl4prm.mjs} +31 -29
- package/dist/chunks/NcAvatar-Cupl4prm.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-bd-5zXWN.cjs → NcAvatar-D_0Aw88L.cjs} +31 -29
- package/dist/chunks/NcAvatar-D_0Aw88L.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs → NcBreadcrumb-FbePEaGS.cjs} +22 -6
- package/dist/chunks/{NcBreadcrumb-ChxXdE2m.cjs.map → NcBreadcrumb-FbePEaGS.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs → NcBreadcrumb-VJGW992x.mjs} +22 -6
- package/dist/chunks/{NcBreadcrumb-D1106x4x.mjs.map → NcBreadcrumb-VJGW992x.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs → NcBreadcrumbs-CrNBCyUa.cjs} +47 -29
- package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs.map → NcBreadcrumbs-CrNBCyUa.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-C9Zo0nca.mjs → NcBreadcrumbs-DJSAcn8x.mjs} +47 -29
- package/dist/chunks/{NcBreadcrumbs-XAvQ1MIp.cjs.map → NcBreadcrumbs-DJSAcn8x.mjs.map} +1 -1
- package/dist/chunks/{NcButton-CWPBzbcC.mjs → NcButton-D3CaJu1f.mjs} +38 -22
- package/dist/chunks/{NcButton-CWPBzbcC.mjs.map → NcButton-D3CaJu1f.mjs.map} +1 -1
- package/dist/chunks/{NcButton-DOsCAjiE.cjs → NcButton-DK7bNZIL.cjs} +38 -22
- package/dist/chunks/{NcButton-DOsCAjiE.cjs.map → NcButton-DK7bNZIL.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs → NcCheckboxRadioSwitch-CDFUoj2J.cjs} +8 -8
- package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs.map → NcCheckboxRadioSwitch-CDFUoj2J.cjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs → NcCheckboxRadioSwitch-ezquUuPz.mjs} +8 -8
- package/dist/chunks/{NcCheckboxRadioSwitch-CLnWsBwK.mjs.map → NcCheckboxRadioSwitch-ezquUuPz.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs → NcCollectionList-w-7M5HGN.mjs} +17 -16
- package/dist/chunks/{NcCollectionList-5_ghrfiE.mjs.map → NcCollectionList-w-7M5HGN.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs → NcCollectionList-zAI6Ysc0.cjs} +17 -16
- package/dist/chunks/{NcCollectionList-DZh_7a3g.cjs.map → NcCollectionList-zAI6Ysc0.cjs.map} +1 -1
- package/dist/chunks/NcColorPicker-DpLU-oKM.mjs +157 -0
- package/dist/chunks/NcColorPicker-DpLU-oKM.mjs.map +1 -0
- package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs +156 -0
- package/dist/chunks/NcColorPicker-F-UP8OaJ.cjs.map +1 -0
- package/dist/chunks/{NcContent-CGBJ782F.mjs → NcContent-C0_AA_wt.mjs} +7 -7
- package/dist/chunks/{NcContent-CGBJ782F.mjs.map → NcContent-C0_AA_wt.mjs.map} +1 -1
- package/dist/chunks/{NcContent-I3cwZc0Z.cjs → NcContent-DITvuNbF.cjs} +7 -7
- package/dist/chunks/{NcContent-I3cwZc0Z.cjs.map → NcContent-DITvuNbF.cjs.map} +1 -1
- package/dist/chunks/{NcCounterBubble-oxV8oMlX.mjs → NcCounterBubble-BKPpoBiy.mjs} +6 -4
- package/dist/chunks/{NcCounterBubble-oxV8oMlX.mjs.map → NcCounterBubble-BKPpoBiy.mjs.map} +1 -1
- package/dist/chunks/{NcCounterBubble-hyvazclA.cjs → NcCounterBubble-B_H3NCef.cjs} +6 -4
- package/dist/chunks/{NcCounterBubble-hyvazclA.cjs.map → NcCounterBubble-B_H3NCef.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs → NcDashboardWidget--n1nzfhg.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-DKUU16oT.cjs.map → NcDashboardWidget--n1nzfhg.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs → NcDashboardWidget-CEL-DhKX.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-_Bi63nDZ.mjs.map → NcDashboardWidget-CEL-DhKX.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs → NcDashboardWidgetItem-DeQtScn8.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-D4q57Lg_.mjs.map → NcDashboardWidgetItem-DeQtScn8.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs → NcDashboardWidgetItem-loanO02A.cjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-BhGOOhKF.cjs.map → NcDashboardWidgetItem-loanO02A.cjs.map} +1 -1
- package/dist/chunks/{NcDialog-Du-BeUCp.mjs → NcDialog-BM_wTqUn.mjs} +3 -3
- package/dist/chunks/{NcDialog-Du-BeUCp.mjs.map → NcDialog-BM_wTqUn.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-B2tW1DtP.cjs → NcDialog-CG2sufkb.cjs} +3 -3
- package/dist/chunks/{NcDialog-B2tW1DtP.cjs.map → NcDialog-CG2sufkb.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-DtGSMhif.mjs → NcDialogButton-Cr0wVMne.mjs} +6 -5
- package/dist/chunks/{NcDialogButton-DtGSMhif.mjs.map → NcDialogButton-Cr0wVMne.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-BB84DliS.cjs → NcDialogButton-DkfxsIhv.cjs} +6 -5
- package/dist/chunks/{NcDialogButton-BB84DliS.cjs.map → NcDialogButton-DkfxsIhv.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-B2SLfIBu.mjs → NcEmojiPicker-BV_iVlIv.mjs} +14 -13
- package/dist/chunks/NcEmojiPicker-BV_iVlIv.mjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-q_n1Rd8U.cjs → NcEmojiPicker-fgsuVz7X.cjs} +20 -19
- package/dist/chunks/NcEmojiPicker-fgsuVz7X.cjs.map +1 -0
- package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs → NcHeaderButton-CNQVz4QP.cjs} +2 -2
- package/dist/chunks/{NcHeaderButton-AKzxd51V.cjs.map → NcHeaderButton-CNQVz4QP.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs → NcHeaderButton-TJML067P.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-BORaK-yT.mjs.map → NcHeaderButton-TJML067P.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs → NcHeaderMenu-BzyFhg55.cjs} +10 -8
- package/dist/chunks/{NcHeaderMenu-CBP4SYca.cjs.map → NcHeaderMenu-BzyFhg55.cjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs → NcHeaderMenu-D5ddiKnF.mjs} +10 -8
- package/dist/chunks/{NcHeaderMenu-CkD6cjnH.mjs.map → NcHeaderMenu-D5ddiKnF.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-BreCg8pX.mjs → NcIconSvgWrapper-BCVwmZN2.mjs} +2 -2
- package/dist/chunks/{NcIconSvgWrapper-BreCg8pX.mjs.map → NcIconSvgWrapper-BCVwmZN2.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-D-aKMbf3.cjs → NcIconSvgWrapper-DoVPfeNg.cjs} +2 -2
- package/dist/chunks/{NcIconSvgWrapper-D-aKMbf3.cjs.map → NcIconSvgWrapper-DoVPfeNg.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs → NcInputConfirmCancel-C8WnMK2V.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-21vM2JHp.mjs.map → NcInputConfirmCancel-C8WnMK2V.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs → NcInputConfirmCancel-DVVTaxWi.cjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-BqZm3WBG.cjs.map → NcInputConfirmCancel-DVVTaxWi.cjs.map} +1 -1
- package/dist/chunks/{NcInputField-kKgY_2GV.mjs → NcInputField-1ujONIvp.mjs} +8 -7
- package/dist/chunks/{NcInputField-kKgY_2GV.mjs.map → NcInputField-1ujONIvp.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-Dry3uU_8.cjs → NcInputField-LBv3nCrt.cjs} +8 -7
- package/dist/chunks/{NcInputField-Dry3uU_8.cjs.map → NcInputField-LBv3nCrt.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-D_-a7WR9.cjs → NcListItem-DFEvD1TA.cjs} +9 -7
- package/dist/chunks/{NcListItem-D_-a7WR9.cjs.map → NcListItem-DFEvD1TA.cjs.map} +1 -1
- package/dist/chunks/{NcListItem-B3ETbT9w.mjs → NcListItem-DNMfT12A.mjs} +9 -7
- package/dist/chunks/{NcListItem-B3ETbT9w.mjs.map → NcListItem-DNMfT12A.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs → NcListItemIcon-OzD38-2R.cjs} +6 -5
- package/dist/chunks/{NcListItemIcon-CYR8eKOU.cjs.map → NcListItemIcon-OzD38-2R.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs → NcListItemIcon-PNp6Wael.mjs} +6 -5
- package/dist/chunks/{NcListItemIcon-bQZej-L0.mjs.map → NcListItemIcon-PNp6Wael.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs → NcPasswordField-D2iDTTpp.mjs} +29 -16
- package/dist/chunks/{NcPasswordField-9LYKS0t_.mjs.map → NcPasswordField-D2iDTTpp.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs → NcPasswordField-lqTDeja4.cjs} +29 -16
- package/dist/chunks/{NcPasswordField-DPGGwGEl.cjs.map → NcPasswordField-lqTDeja4.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-DkX3Esbr.cjs → NcPopover-DrXnNOgM.cjs} +14 -10
- package/dist/chunks/{NcPopover-DMUA5d7U.mjs.map → NcPopover-DrXnNOgM.cjs.map} +1 -1
- package/dist/chunks/{NcPopover-DMUA5d7U.mjs → NcPopover-nzbq2IjT.mjs} +14 -10
- package/dist/chunks/{NcPopover-DkX3Esbr.cjs.map → NcPopover-nzbq2IjT.mjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-D7zYeXBH.mjs → NcProgressBar-BwnuvxiZ.mjs} +2 -2
- package/dist/chunks/{NcProgressBar-D7zYeXBH.mjs.map → NcProgressBar-BwnuvxiZ.mjs.map} +1 -1
- package/dist/chunks/{NcProgressBar-DvxA9bq5.cjs → NcProgressBar-D10gQgAY.cjs} +2 -2
- package/dist/chunks/{NcProgressBar-DvxA9bq5.cjs.map → NcProgressBar-D10gQgAY.cjs.map} +1 -1
- package/dist/chunks/{NcRadioGroup-BZ-humrK.cjs → NcRadioGroup-DsnIVQZJ.cjs} +23 -5
- package/dist/chunks/{NcRadioGroup-VKZJ0Vnh.mjs.map → NcRadioGroup-DsnIVQZJ.cjs.map} +1 -1
- package/dist/chunks/{NcRadioGroup-VKZJ0Vnh.mjs → NcRadioGroup-sZaH_3Y0.mjs} +23 -5
- package/dist/chunks/{NcRadioGroup-BZ-humrK.cjs.map → NcRadioGroup-sZaH_3Y0.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs → NcRadioGroupButton-B6m10k9G.mjs} +9 -9
- package/dist/chunks/{NcRadioGroupButton-QLL4wM7A.mjs.map → NcRadioGroupButton-B6m10k9G.mjs.map} +1 -1
- package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs → NcRadioGroupButton-CDf_01-t.cjs} +9 -9
- package/dist/chunks/{NcRadioGroupButton-7UZaDiJ2.cjs.map → NcRadioGroupButton-CDf_01-t.cjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-jvOEQWWO.mjs → NcRelatedResourcesPanel-Q6jZk-Pm.mjs} +49 -40
- package/dist/chunks/NcRelatedResourcesPanel-Q6jZk-Pm.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-jHQ2bRko.cjs → NcRelatedResourcesPanel-bfv-6W_Z.cjs} +50 -41
- package/dist/chunks/NcRelatedResourcesPanel-bfv-6W_Z.cjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs → NcRichContenteditable-8_poOeSx.mjs} +54 -31
- package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs.map → NcRichContenteditable-8_poOeSx.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-BILbjzSU.cjs → NcRichContenteditable-CtLNSs0S.cjs} +54 -31
- package/dist/chunks/{NcRichContenteditable-iQhj1-AH.mjs.map → NcRichContenteditable-CtLNSs0S.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-DYcfsH5s.cjs → NcRichText-CEsiozf5.cjs} +112 -121
- package/dist/chunks/NcRichText-CEsiozf5.cjs.map +1 -0
- package/dist/chunks/{NcRichText-B7M7rNqC.mjs → NcRichText-Dnx5x9WS.mjs} +114 -121
- package/dist/chunks/NcRichText-Dnx5x9WS.mjs.map +1 -0
- package/dist/chunks/{NcSelect-PvjbF3jF.mjs → NcSelect-TjZw7TJ_.mjs} +41 -24
- package/dist/chunks/{NcSelect-PvjbF3jF.mjs.map → NcSelect-TjZw7TJ_.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-s3_u0qvy.cjs → NcSelect-bo6wla87.cjs} +41 -24
- package/dist/chunks/{NcSelect-s3_u0qvy.cjs.map → NcSelect-bo6wla87.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-DYUCDZ_e.mjs → NcSelectTags-CytnLDOw.mjs} +52 -31
- package/dist/chunks/NcSelectTags-CytnLDOw.mjs.map +1 -0
- package/dist/chunks/{NcSelectTags-e4Gjcx_7.cjs → NcSelectTags-D2OSaAfO.cjs} +52 -31
- package/dist/chunks/NcSelectTags-D2OSaAfO.cjs.map +1 -0
- package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs → NcSelectUsers-Bm0877Tm.mjs} +7 -6
- package/dist/chunks/{NcSelectUsers-CMF_h9c0.mjs.map → NcSelectUsers-Bm0877Tm.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs → NcSelectUsers-wcRyExkC.cjs} +7 -6
- package/dist/chunks/{NcSelectUsers-Bmwhu14K.cjs.map → NcSelectUsers-wcRyExkC.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs → NcSettingsInputText-DPAtsY2T.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-BQVh24zT.mjs.map → NcSettingsInputText-DPAtsY2T.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs → NcSettingsInputText-DaFMiOS6.cjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-DWihH7ke.cjs.map → NcSettingsInputText-DaFMiOS6.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs → NcSettingsSection-CX5q924g.mjs} +4 -3
- package/dist/chunks/{NcSettingsSection-evNvfEg2.mjs.map → NcSettingsSection-CX5q924g.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs → NcSettingsSection-r4NOxKIz.cjs} +4 -3
- package/dist/chunks/{NcSettingsSection-Dgc7SEuu.cjs.map → NcSettingsSection-r4NOxKIz.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs → NcSettingsSelectGroup-CR4XLrgs.mjs} +25 -9
- package/dist/chunks/{NcSettingsSelectGroup-C-YAk1f8.mjs.map → NcSettingsSelectGroup-CR4XLrgs.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs → NcSettingsSelectGroup-DYYAPkgp.cjs} +25 -9
- package/dist/chunks/{NcSettingsSelectGroup-X1pBwmAZ.cjs.map → NcSettingsSelectGroup-DYYAPkgp.cjs.map} +1 -1
- package/dist/chunks/{NcTextArea-DHmD6-6s.mjs → NcTextArea-If_ygOSv.mjs} +5 -5
- package/dist/chunks/{NcTextArea-DHmD6-6s.mjs.map → NcTextArea-If_ygOSv.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-DkVtHTpD.cjs → NcTextArea-iDhGI-Ko.cjs} +5 -5
- package/dist/chunks/{NcTextArea-DkVtHTpD.cjs.map → NcTextArea-iDhGI-Ko.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-D_IMz2MR.mjs → NcTextField-BE9R1pLt.mjs} +31 -17
- package/dist/chunks/{NcTextField-D_IMz2MR.mjs.map → NcTextField-BE9R1pLt.mjs.map} +1 -1
- package/dist/chunks/{NcTextField-Cp3tulze.cjs → NcTextField-OPiMgNR7.cjs} +31 -17
- package/dist/chunks/{NcTextField-Cp3tulze.cjs.map → NcTextField-OPiMgNR7.cjs.map} +1 -1
- package/dist/chunks/{NcThemeProvider-BqGPTeWg.cjs → NcThemeProvider-DbNRSwkX.cjs} +2 -2
- package/dist/chunks/{NcThemeProvider-BqGPTeWg.cjs.map → NcThemeProvider-DbNRSwkX.cjs.map} +1 -1
- package/dist/chunks/{NcThemeProvider-25ResoIv.mjs → NcThemeProvider-E_S5rhIQ.mjs} +2 -2
- package/dist/chunks/{NcThemeProvider-25ResoIv.mjs.map → NcThemeProvider-E_S5rhIQ.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs → NcTimezonePicker-D4y736xC.mjs} +5 -5
- package/dist/chunks/{NcTimezonePicker-Cu1FrSIX.mjs.map → NcTimezonePicker-D4y736xC.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs → NcTimezonePicker-DPpWz5fa.cjs} +5 -5
- package/dist/chunks/{NcTimezonePicker-Co7jDP7N.cjs.map → NcTimezonePicker-DPpWz5fa.cjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs → NcUserBubble-8Mts76ii.mjs} +7 -6
- package/dist/chunks/{NcUserBubble-Be2B8iJY.mjs.map → NcUserBubble-8Mts76ii.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs → NcUserBubble-Bb9WBP1S.cjs} +7 -6
- package/dist/chunks/{NcUserBubble-CdX6H9-M.cjs.map → NcUserBubble-Bb9WBP1S.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs → NcUserStatusIcon-BWxo_etm.mjs} +11 -8
- package/dist/chunks/{NcUserStatusIcon-C83nB_8T.mjs.map → NcUserStatusIcon-BWxo_etm.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs → NcUserStatusIcon-DV2H-KfR.cjs} +11 -8
- package/dist/chunks/{NcUserStatusIcon-DhZabBIY.cjs.map → NcUserStatusIcon-DV2H-KfR.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs → ScopeComponent-CDX-s-IV.cjs} +2 -2
- package/dist/chunks/{ScopeComponent-9wtS_FpN.cjs.map → ScopeComponent-CDX-s-IV.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-305QOaqN.mjs → ScopeComponent-DsONbC6w.mjs} +2 -2
- package/dist/chunks/{ScopeComponent-305QOaqN.mjs.map → ScopeComponent-DsONbC6w.mjs.map} +1 -1
- package/dist/chunks/{_l10n-DM-VRK9x.cjs → _l10n-9b4TMo5Q.cjs} +2 -6
- package/dist/chunks/{_l10n-DM-VRK9x.cjs.map → _l10n-9b4TMo5Q.cjs.map} +1 -1
- package/dist/chunks/{_l10n-BEfeU7gr.mjs → _l10n-DSLCwJSN.mjs} +41 -45
- package/dist/chunks/_l10n-DSLCwJSN.mjs.map +1 -0
- package/dist/chunks/{actionText-D2-z0ud3.cjs → actionText-D_3-6fCH.cjs} +2 -2
- package/dist/chunks/{actionText-D2-z0ud3.cjs.map → actionText-D_3-6fCH.cjs.map} +1 -1
- package/dist/chunks/{actionText-BMig9Egt.mjs → actionText-ZM1k96ts.mjs} +2 -2
- package/dist/chunks/{actionText-BMig9Egt.mjs.map → actionText-ZM1k96ts.mjs.map} +1 -1
- package/dist/chunks/{GenColors-DIH749TS.mjs → colors-BMiIMYXK.mjs} +42 -48
- package/dist/chunks/colors-BMiIMYXK.mjs.map +1 -0
- package/dist/chunks/{GenColors-BVouTbTJ.cjs → colors-DcbJ13is.cjs} +41 -47
- package/dist/chunks/colors-DcbJ13is.cjs.map +1 -0
- package/dist/chunks/createElementId-5skgwxOP.mjs +9 -0
- package/dist/chunks/{createElementId-DhjFt1I9.mjs.map → createElementId-5skgwxOP.mjs.map} +1 -1
- package/dist/chunks/createElementId-DaJhnLzq.cjs +8 -0
- package/dist/chunks/{createElementId-lalylSCf.cjs.map → createElementId-DaJhnLzq.cjs.map} +1 -1
- package/dist/chunks/{customPickerElements-DLFtgReB.mjs → customPickerElements-BPROmh4T.mjs} +43 -21
- package/dist/chunks/{customPickerElements-DLFtgReB.mjs.map → customPickerElements-BPROmh4T.mjs.map} +1 -1
- package/dist/chunks/{customPickerElements-GyIIOHiQ.cjs → customPickerElements-DBEOrbce.cjs} +43 -21
- package/dist/chunks/{customPickerElements-GyIIOHiQ.cjs.map → customPickerElements-DBEOrbce.cjs.map} +1 -1
- package/dist/chunks/{emoji-VgSjNTd5.cjs → emoji-BCCCB3t3.cjs} +4 -3
- package/dist/chunks/{emoji-VgSjNTd5.cjs.map → emoji-BCCCB3t3.cjs.map} +1 -1
- package/dist/chunks/{emoji-BY_D0V5K.mjs → emoji-V6ytyzoR.mjs} +4 -3
- package/dist/chunks/{emoji-BY_D0V5K.mjs.map → emoji-V6ytyzoR.mjs.map} +1 -1
- package/dist/chunks/{focusTrap-HJQ4pqHV.mjs → focusTrap-BibOtksr.mjs} +3 -2
- package/dist/chunks/{focusTrap-DUTqW_IG.cjs.map → focusTrap-BibOtksr.mjs.map} +1 -1
- package/dist/chunks/{focusTrap-DUTqW_IG.cjs → focusTrap-DhhUL4JZ.cjs} +3 -2
- package/dist/chunks/{focusTrap-HJQ4pqHV.mjs.map → focusTrap-DhhUL4JZ.cjs.map} +1 -1
- package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs +16 -0
- package/dist/chunks/{getAvatarUrl-IhLacDEr.mjs.map → getAvatarUrl-C8Q41hfR.mjs.map} +1 -1
- package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs +15 -0
- package/dist/chunks/{getAvatarUrl-Du9Y3cPO.cjs.map → getAvatarUrl-DwWyuiUZ.cjs.map} +1 -1
- package/dist/chunks/{index-TmAR7I2T.mjs → index-BsEMR4S4.mjs} +9 -9
- package/dist/chunks/{index-TmAR7I2T.mjs.map → index-BsEMR4S4.mjs.map} +1 -1
- package/dist/chunks/{index-Dr9k4hIP.cjs → index-CmwBGDjr.cjs} +22 -4
- package/dist/chunks/{index-CxTT94_h.mjs.map → index-CmwBGDjr.cjs.map} +1 -1
- package/dist/chunks/{index-CgkN1xho.cjs → index-D_jGr37E.cjs} +9 -9
- package/dist/chunks/{index-CgkN1xho.cjs.map → index-D_jGr37E.cjs.map} +1 -1
- package/dist/chunks/{index-CxTT94_h.mjs → index-JArK0Dbx.mjs} +22 -4
- package/dist/chunks/{index-Dr9k4hIP.cjs.map → index-JArK0Dbx.mjs.map} +1 -1
- package/dist/chunks/legacy-DUgfmdiS.cjs +6 -0
- package/dist/chunks/{legacy-MK4GvP26.mjs.map → legacy-DUgfmdiS.cjs.map} +1 -1
- package/dist/chunks/legacy-NU_qxPFK.mjs +7 -0
- package/dist/chunks/{legacy-KBXhWdRy.cjs.map → legacy-NU_qxPFK.mjs.map} +1 -1
- package/dist/chunks/{mdi-DXu6GWVJ.mjs → mdi-CKSXwCsV.mjs} +8 -6
- package/dist/chunks/{mdi-DXu6GWVJ.mjs.map → mdi-CKSXwCsV.mjs.map} +1 -1
- package/dist/chunks/{mdi-BBwE-MZC.cjs → mdi-Nhb6SBw8.cjs} +3 -1
- package/dist/chunks/{mdi-BBwE-MZC.cjs.map → mdi-Nhb6SBw8.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-BcAnnsxZ.cjs → referencePickerModal-CusxgEsK.cjs} +66 -35
- package/dist/chunks/referencePickerModal-CusxgEsK.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-CN4C9eDc.mjs → referencePickerModal-DpJUQ5fq.mjs} +66 -35
- package/dist/chunks/referencePickerModal-DpJUQ5fq.mjs.map +1 -0
- package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs +9 -0
- package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -0
- package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs +10 -0
- package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -0
- package/dist/chunks/{useModelMigration-EhAWvqDD.mjs → useModelMigration-DBUi8saj.mjs} +2 -2
- package/dist/chunks/useModelMigration-DBUi8saj.mjs.map +1 -0
- package/dist/chunks/{useModelMigration-D5zhrNXr.cjs → useModelMigration-HPf30klj.cjs} +2 -2
- package/dist/chunks/useModelMigration-HPf30klj.cjs.map +1 -0
- package/dist/chunks/{useTrapStackControl-BnLfCgGU.mjs → useTrapStackControl-2gEo3rvr.mjs} +2 -2
- package/dist/chunks/{useTrapStackControl-BnLfCgGU.mjs.map → useTrapStackControl-2gEo3rvr.mjs.map} +1 -1
- package/dist/chunks/{useTrapStackControl-XYABY64G.cjs → useTrapStackControl-dthvITlQ.cjs} +2 -2
- package/dist/chunks/{useTrapStackControl-XYABY64G.cjs.map → useTrapStackControl-dthvITlQ.cjs.map} +1 -1
- package/dist/components/NcAppSettingsDialog/index.d.ts +5 -0
- package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +24 -0
- package/dist/components/NcColorPicker/index.d.ts +5 -0
- package/dist/composables/index.d.ts +9 -0
- package/dist/composables/useHotKey/index.d.ts +4 -2
- package/dist/composables/useIsMobile/index.d.ts +23 -0
- package/dist/composables/useModelMigration.d.ts +1 -1
- package/dist/index.cjs +67 -67
- package/dist/index.mjs +67 -67
- package/dist/utils/colors.d.ts +36 -0
- package/package.json +10 -10
- package/dist/chunks/GenColors-BVouTbTJ.cjs.map +0 -1
- package/dist/chunks/GenColors-DIH749TS.mjs.map +0 -1
- package/dist/chunks/NcAppContent-C9NGJE6n.mjs.map +0 -1
- package/dist/chunks/NcAppContent-Djy38ou2.cjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs +0 -223
- package/dist/chunks/NcAppSettingsDialog-DVFw09eD.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs +0 -225
- package/dist/chunks/NcAppSettingsDialog-DalEoC9H.cjs.map +0 -1
- package/dist/chunks/NcAvatar-CuYtFEdJ.mjs.map +0 -1
- package/dist/chunks/NcAvatar-bd-5zXWN.cjs.map +0 -1
- package/dist/chunks/NcColorPicker-Cae6XNoK.mjs +0 -255
- package/dist/chunks/NcColorPicker-Cae6XNoK.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs +0 -254
- package/dist/chunks/NcColorPicker-D-E2dT4Q.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-B2SLfIBu.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-q_n1Rd8U.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-jHQ2bRko.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-jvOEQWWO.mjs.map +0 -1
- package/dist/chunks/NcRichText-B7M7rNqC.mjs.map +0 -1
- package/dist/chunks/NcRichText-DYcfsH5s.cjs.map +0 -1
- package/dist/chunks/NcSelectTags-DYUCDZ_e.mjs.map +0 -1
- package/dist/chunks/NcSelectTags-e4Gjcx_7.cjs.map +0 -1
- package/dist/chunks/_l10n-BEfeU7gr.mjs.map +0 -1
- package/dist/chunks/createElementId-DhjFt1I9.mjs +0 -8
- package/dist/chunks/createElementId-lalylSCf.cjs +0 -7
- package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +0 -14
- package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +0 -15
- package/dist/chunks/legacy-KBXhWdRy.cjs +0 -5
- package/dist/chunks/legacy-MK4GvP26.mjs +0 -6
- package/dist/chunks/referencePickerModal-BcAnnsxZ.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-CN4C9eDc.mjs.map +0 -1
- package/dist/chunks/useModelMigration-D5zhrNXr.cjs.map +0 -1
- package/dist/chunks/useModelMigration-EhAWvqDD.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcButton-CWPBzbcC.mjs","sources":["../../src/components/NcButton/NcButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\nGeneral purpose button component. See props for different options.\n[Use material design icons only for icons](https://www.npmjs.com/package/vue-material-design-icons) and remember to set their size to 20.\n\n### Usage\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```\n<template>\n<div class=\"wrapper\">\n\t<!-- Style selector -->\n\t<div class=\"grid\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"text\" name=\"style\" type=\"radio\">Text only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icon\" name=\"style\" type=\"radio\">Icon only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icontext\" name=\"style\" type=\"radio\">Icon and text</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"disabled\" type=\"checkbox\">Disabled</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"small\" name=\"size\" type=\"radio\">Small</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"normal\" name=\"size\" type=\"radio\">Normal (default)</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"large\" name=\"size\" type=\"radio\">Large</NcCheckboxRadioSwitch>\n\t</div>\n\n\t<h5>Standard buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Tertiary, no background</p>\n\t\t<p>Tertiary</p>\n\t\t<p>Secondary</p>\n\t\t<p>Primary</p>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary-no-background\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"primary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t</div>\n\n\t<!-- Wide button -->\n\t<h5>Wide button</h5>\n\t<NcButton\n\t\t:disabled=\"disabled\"\n\t\t:size=\"size\"\n\t\t:wide=\"true\"\n\t\ttext=\"Example text\">\n\t\t<template #icon>\n\t\t\t<Video\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t\tExample text\n\t</NcButton>\n\n\t<!-- Special buttons -->\n\t<h5>Special buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Success</p>\n\t\t<p>Warning</p>\n\t\t<p>Error</p>\n\t\t<p> - </p>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"success\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"warning\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"error\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<p> - </p>\n\t</div>\n</div>\n\n</template>\n<script>\nimport Video from 'vue-material-design-icons/Video.vue'\n\nexport default {\n\tcomponents: {\n\t\tVideo,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false,\n\t\t\tdisabled: false,\n\t\t\tsize: 'normal',\n\t\t\tstyle: 'icontext',\n\t\t}\n\t}\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tpadding: 0 12px;\n}\n\n.grid {\n\tdisplay: grid;\n\tgap: 12px;\n\tgrid-template-columns: 1fr 1fr 1fr 1fr;\n\tgrid-template-rows: repeat(auto-fill, auto);\n\tposition: relative;\n\tmargin: 12px 0;\n}\n\nh5 {\n\tfont-weight: bold;\n\tmargin: 40px 0 20px 0;\n}\n\np {\n\ttext-align: center;\n\tmargin: 4px 0 12px 0;\n\tcolor: var(--color-text-maxcontrast)\n}\n\nbutton {\n\tmargin: auto;\n}\n</style>\n```\n\n### Alignment\nSometimes it is required to change the icon alignment on the button, like for switching between pages as in following example:\n\n```vue\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n\t\t<NcButton aria-label=\"center (default)\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter (default)\n\t\t</NcButton>\n\t\t<NcButton alignment=\"center-reverse\" aria-label=\"center-reverse\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter-reverse\n\t\t</NcButton>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"start\" aria-label=\"start\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"start-reverse\" aria-label=\"start-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"end\" aria-label=\"end\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"end-reverse\" aria-label=\"end-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport IconRight from 'vue-material-design-icons/ArrowRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconLeft,\n\t\tIconRight,\n\t},\n}\n</script>\n```\n\n### Pressed state\n\nIt is possible to make the button stateful by adding a pressed state, e.g. if you like to create a favorite button.\nThe button will have the required `aria` attribute for accessibility and visual style (`primary` when pressed, and the configured variant otherwise).\n\nDo not change `text` or `aria-label` of the pressed/unpressed button. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed\n\n```vue\n<template>\n\t<div>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\" variant=\"tertiary-no-background\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" variant=\"tertiary\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tFavorite\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<div>\n\t\t\tIt is {{ isFavorite ? 'a' : 'not a' }} favorite.\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconStar from 'vue-material-design-icons/Star.vue'\nimport IconStarOutline from 'vue-material-design-icons/StarOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconStar,\n\t\tIconStarOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisFavorite: false,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggleFavorite() {\n\t\t\tthis.isFavorite = !this.isFavorite\n\t\t},\n\t},\n}\n</script>\n```\n\n### Usage example: Sorting table columns\nThe standard way to implement sortable table column headers should be like this:\n\n```vue\n<template>\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th :aria-sorted=\"sortedName\" class=\"row-name\">\n\t\t\t\t\t<NcButton alignment=\"start-reverse\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortName\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedName === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedName === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Name</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t\t<th :aria-sorted=\"sortedSize\" class=\"row-size\">\n\t\t\t\t\t<NcButton alignment=\"end\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortSize\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedSize === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedSize === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Size</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\"row-name\">Lorem ipsum</td>\n\t\t\t\t<td class=\"row-size\">8 MiB</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</template>\n<script>\nimport IconUp from 'vue-material-design-icons/MenuUp.vue'\nimport IconDown from 'vue-material-design-icons/MenuDown.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconUp,\n\t\tIconDown,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsortedName: null,\n\t\t\tsortedSize: null,\n\t\t}\n\t},\n\tmethods: {\n\t\tsortName() {\n\t\t\tif (this.sortedName === 'ascending') {\n\t\t\t\tthis.sortedName = 'descending'\n\t\t\t} else if (this.sortedName === 'descending') {\n\t\t\t\tthis.sortedName = null\n\t\t\t} else {\n\t\t\t\tthis.sortedName = 'ascending'\n\t\t\t}\n\t\t},\n\t\tsortSize() {\n\t\t\tif (this.sortedSize === 'ascending') {\n\t\t\t\tthis.sortedSize = 'descending'\n\t\t\t} else if (this.sortedSize === 'descending') {\n\t\t\t\tthis.sortedSize = null\n\t\t\t} else {\n\t\t\t\tthis.sortedSize = 'ascending'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style>\ntable {\n\ttable-layout: fixed;\n\twidth: 300px;\n}\n\ntd.row-name {\n\tpadding-inline-start: 16px;\n}\n\ntd.row-size {\n\ttext-align: end;\n\tpadding-inline-end: 16px;\n}\n\n.table-header {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.sort-icon {\n\tcolor: var(--color-text-maxcontrast);\n\tposition: relative;\n\tinset-inline: -10px;\n}\n\n.row-size .sort-icon {\n\tinset-inline: 10px;\n}\n</style>\n```\n\n</docs>\n\n<script>\nimport { isLegacy32 } from '../../utils/legacy.ts'\nimport { logger } from '../../utils/logger.ts'\n\nexport default {\n\tname: 'NcButton',\n\n\tinject: {\n\t\tgetNcPopoverTriggerAttrs: {\n\t\t\tfrom: 'NcPopover:trigger:attrs',\n\t\t\tdefault: () => () => ({}),\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Set the text and icon alignment\n\t\t *\n\t\t * @default 'center'\n\t\t */\n\t\talignment: {\n\t\t\ttype: String,\n\t\t\tdefault: 'center',\n\t\t\tvalidator: (alignment) => ['start', 'start-reverse', 'center', 'center-reverse', 'end', 'end-reverse'].includes(alignment),\n\t\t},\n\n\t\t/**\n\t\t * Toggles the disabled state of the button on and off.\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 * Specify the button size\n\t\t * Accepted values: `'small'`, `'normal'` (default), `'large'`\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'normal',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'normal', 'large'].includes(value)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Specifies the HTML button type.\n\t\t * Accepted values: submit, reset, button.\n\t\t *\n\t\t * For legacy reasons this can also be used to set the variant of the button (color schema).\n\t\t * This is discouraged but the accepted values are:\n\t\t * primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary' (will change with v9)\n\t\t * @deprecated The behavior will change in v9 to only allow the native HTML button types - use `variant` instead for setting the appearance of the button.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t\t\t|| ['submit', 'reset', 'button'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button native type\n\t\t * Accepted values: submit, reset, button. If left empty,\n\t\t * the default \"button\" type will be used.\n\t\t *\n\t\t * @deprecated use `type` instead - will be removed with v9\n\t\t */\n\t\tnativeType: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['submit', 'reset', 'button'].indexOf(value) !== -1\n\t\t\t},\n\n\t\t\tdefault: 'button',\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the button should span all the available width.\n\t\t * By default, buttons span the whole width of the container.\n\t\t */\n\t\twide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Always try to provide an aria-label to your button. Make it more\n\t\t * specific than the button's name by provide some more context. E.g. if\n\t\t * the name of the button is \"send\" in the Mail app, the aria label could\n\t\t * be \"Send email\".\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Providing the href attribute turns the button component into an `a`\n\t\t * element.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Target for the `a` element if `href` is set.\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '_self',\n\t\t},\n\n\t\t/**\n\t\t * Providing the download attribute with href downloads file when clicking.\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 * Providing the to attribute turns the button component into a `router-link`\n\t\t * element. Takes precedence over the href attribute.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behaviour of `router-link` to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The pressed state of the button if it has a checked state\n\t\t * This will add the `aria-pressed` attribute and for the button to have the primary style in checked state.\n\t\t *\n\t\t * Pressed state is not supported for links\n\t\t */\n\t\tpressed: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button variant.\n\t\t *\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary'\n\t\t * @since 8.24.0\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\t},\n\n\temits: ['update:pressed', 'click'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The real type to be used for the button, enforces `primary` for pressed state and, if stateful button, any other type for not pressed state\n\t\t * Otherwise the type property is used.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealVariant() {\n\t\t\t// Force *primary* when pressed\n\t\t\tif (this.pressed) {\n\t\t\t\treturn 'primary'\n\t\t\t}\n\t\t\t// If not pressed but button is configured as stateful button then the type must not be primary\n\t\t\tif (this.pressed === false && (this.type === 'primary' || this.variant === 'primary')) {\n\t\t\t\treturn 'secondary'\n\t\t\t}\n\t\t\t// handle legacy behavior\n\t\t\tif (this.type !== 'secondary' && ['primary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\t// otherwise use the configured variant\n\t\t\treturn this.variant\n\t\t},\n\n\t\t/**\n\t\t * The HTML button type\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealType() {\n\t\t\tif (typeof this.pressed === 'boolean') {\n\t\t\t\treturn 'button'\n\t\t\t}\n\t\t\t// Handle legacy behavior\n\t\t\tif (this.nativeType !== 'button') {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// Also handling legacy behavior: Ensure we do not conflict here\n\t\t\tif (['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// otherwise use the type\n\t\t\treturn this.type\n\t\t},\n\n\t\t/**\n\t\t * The variant is one of the tertiary- ones\n\t\t */\n\t\tisTertiary() {\n\t\t\treturn this.realVariant.startsWith('tertiary')\n\t\t},\n\n\t\t/**\n\t\t * The flexbox alignment of the button content\n\t\t */\n\t\tflexAlignment() {\n\t\t\treturn this.alignment.split('-')[0]\n\t\t},\n\n\t\t/**\n\t\t * If the button content should be reversed (icon on the end)\n\t\t */\n\t\tisReverseAligned() {\n\t\t\treturn this.alignment.includes('-')\n\t\t},\n\n\t\tncPopoverTriggerAttrs() {\n\t\t\treturn this.getNcPopoverTriggerAttrs()\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\tconst hasText = !!this.$slots.default\n\t\tconst hasIcon = this.$slots?.icon\n\n\t\t/**\n\t\t * Always fill either the text prop or the ariaLabel one.\n\t\t */\n\t\tif (!hasText && !this.ariaLabel) {\n\t\t\tlogger.warn('You need to fill either the text or the ariaLabel props in the button component.', {\n\t\t\t\ttext: this.$slots.default?.[0]?.text,\n\t\t\t\tariaLabel: this.ariaLabel,\n\t\t\t}, this)\n\t\t}\n\n\t\tconst isLink = (this.to || this.href)\n\n\t\tconst hasPressed = !isLink && typeof this.pressed === 'boolean'\n\n\t\tconst renderButton = ({ href, navigate, isActive, isExactActive } = {}) => h(\n\t\t\tisLink ? 'a' : 'button',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'button-vue',\n\t\t\t\t\t`button-vue--size-${this.size}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'button-vue--icon-only': hasIcon && !hasText,\n\t\t\t\t\t\t'button-vue--text-only': hasText && !hasIcon,\n\t\t\t\t\t\t'button-vue--icon-and-text': hasIcon && hasText,\n\t\t\t\t\t\t[`button-vue--vue-${this.realVariant}`]: this.realVariant,\n\t\t\t\t\t\t'button-vue--legacy': isLegacy32,\n\t\t\t\t\t\t'button-vue--tertiary': this.isTertiary,\n\t\t\t\t\t\t'button-vue--wide': this.wide,\n\t\t\t\t\t\t[`button-vue--${this.flexAlignment}`]: this.flexAlignment !== 'center',\n\t\t\t\t\t\t'button-vue--reverse': this.isReverseAligned,\n\t\t\t\t\t\tactive: isActive,\n\t\t\t\t\t\t'router-link-exact-active': isExactActive,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tattrs: {\n\t\t\t\t\t'aria-label': this.ariaLabel,\n\t\t\t\t\t'aria-pressed': hasPressed ? this.pressed.toString() : undefined,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\ttype: isLink ? null : this.realType,\n\t\t\t\t\trole: isLink ? 'button' : null,\n\t\t\t\t\thref: this.to ? href : (this.href || null),\n\t\t\t\t\ttarget: isLink ? (this.target || '_self') : null,\n\t\t\t\t\trel: isLink ? 'nofollow noreferrer noopener' : null,\n\t\t\t\t\tdownload: (!this.to && this.href && this.download) ? this.download : null,\n\t\t\t\t\t// If this button is used as a popover trigger, we need to apply trigger attrs, e.g. aria attributes\n\t\t\t\t\t...this.ncPopoverTriggerAttrs,\n\t\t\t\t\t// Inherit all the component attrs\n\t\t\t\t\t...this.$attrs,\n\t\t\t\t},\n\t\t\t\ton: {\n\t\t\t\t\t...this.$listeners,\n\t\t\t\t\tclick: ($event) => {\n\t\t\t\t\t\tif (hasPressed) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Update the current pressed state of the button (if the `pressed` property was configured)\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @property {boolean} newValue The new `pressed`-state\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tthis.$emit('update:pressed', !this.pressed)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We have to both navigate and emit the click event\n\t\t\t\t\t\tthis.$emit('click', $event)\n\t\t\t\t\t\tnavigate?.($event)\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\th('span', { class: 'button-vue__wrapper' }, [\n\t\t\t\t\thasIcon\n\t\t\t\t\t\t? h('span', {\n\t\t\t\t\t\t\t\tclass: 'button-vue__icon',\n\t\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\t\t'aria-hidden': 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}, [this.$slots.icon])\n\t\t\t\t\t\t: null,\n\t\t\t\t\thasText ? h('span', { class: 'button-vue__text' }, [this.$slots.default]) : null,\n\t\t\t\t]),\n\t\t\t],\n\t\t)\n\n\t\t// If we have a router-link, we wrap the button in it\n\t\tif (this.to) {\n\t\t\treturn h('router-link', {\n\t\t\t\tprops: {\n\t\t\t\t\tcustom: true,\n\t\t\t\t\tto: this.to,\n\t\t\t\t\texact: this.exact,\n\t\t\t\t},\n\t\t\t\tscopedSlots: {\n\t\t\t\t\tdefault: renderButton,\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t\t// Otherwise we simply return the button\n\t\treturn renderButton()\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.button-vue {\n\t--button-size: var(--default-clickable-area);\n\t--button-inner-size: calc(var(--button-size) - 4px); // without the outer border\n\t--button-radius: var(--border-radius-element, calc(var(--button-size) / 2));\n\t--button-padding-default: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t--button-padding: var(--default-grid-baseline) var(--button-padding-default);\n\n\t// General styles\n\t// by default use secondary styling\n\tcolor: var(--color-primary-element-light-text);\n\tbackground-color: var(--color-primary-element-light);\n\tborder: 1px solid var(--color-primary-element-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--button-radius);\n\tbox-sizing: border-box;\n\t// adjust position and size\n\tposition: relative;\n\twidth: fit-content;\n\toverflow: hidden;\n\tpadding-block: 1px 0; // center the content as border is 1px top and 2px bottom\n\tpadding-inline: var(--button-padding);\n\tmin-height: var(--button-size);\n\tmin-width: var(--button-size);\n\t// display setup\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: 0.1s;\n\ttransition-timing-function: linear;\n\tcursor: pointer;\n\tfont-size: var(--default-font-size);\n\tfont-weight: bold;\n\n\t&--size-small {\n\t\t--button-size: var(--clickable-area-small, 24px);\n\t\t--button-radius: var(--border-radius); // make the border radius even smaller for small buttons\n\t}\n\n\t&--size-large {\n\t\t--button-size: var(--clickable-area-large, 48px);\n\t}\n\n\t// Cursor pointer on element and all children\n\t&,\n\t& :deep(*) {\n\t\tcursor: pointer;\n\t}\n\n\t// No outline feedback for focus. Handled with a toggled class in js (see data)\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t&:disabled {\n\t\tcursor: default;\n\t\topacity: $opacity_disabled;\n\t\t// Gives a wash out effect\n\t\tfilter: saturate($opacity_normal);\n\n\t\t& :deep(*) {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\t// Default button type\n\t&:hover:not(:disabled) {\n\t\tbackground-color: var(--color-primary-element-light-hover);\n\t}\n\n\t// Back to the default color for this button when active\n\t// TODO: add ripple effect\n\t&:active {\n\t\tbackground-color: var(--color-primary-element-light);\n\t}\n\n\t&__wrapper {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n\n\t&--end &__wrapper {\n\t\tjustify-content: end;\n\t}\n\t&--start &__wrapper {\n\t\tjustify-content: start;\n\t}\n\t&--reverse &__wrapper {\n\t\tflex-direction: row-reverse;\n\t}\n\n\t&--reverse#{&}--icon-and-text {\n\t\t--button-padding: var(--button-padding-default) var(--default-grid-baseline);\n\t}\n\n\t&__icon {\n\t\t--default-clickable-area: var(--button-inner-size); // ensure icons align with current button size\n\t\theight: var(--button-inner-size);\n\t\twidth: var(--button-inner-size);\n\t\tmin-height: var(--button-inner-size);\n\t\tmin-width: var(--button-inner-size);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n\n\t// For small buttons we need to adjust the icon size\n\t&--size-small &__icon {\n\t\t:deep(> *) {\n\t\t\tmax-height: 16px;\n\t\t\tmax-width: 16px;\n\t\t}\n\t\t:deep(svg) {\n\t\t\theight: 16px;\n\t\t\twidth: 16px;\n\t\t}\n\t}\n\n\t&__text {\n\t\tfont-weight: bold;\n\t\tmargin-bottom: 1px;\n\t\tpadding: 2px 0;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t// Icon-only button\n\t&--icon-only {\n\t\t--button-padding: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t\tline-height: 1;\n\t\twidth: var(--button-size) !important;\n\t}\n\n\t// Text-only button\n\t&--text-only {\n\t\t--button-padding: var(--button-padding-default);\n\n\t\t& .button-vue__text {\n\t\t\tmargin-inline: 4px;\n\t\t}\n\t}\n\n\t// Wide button spans the whole width of the container\n\t&--wide {\n\t\twidth: 100%;\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--color-main-text) !important;\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background) !important;\n\t\t&.button-vue--vue-tertiary-on-primary {\n\t\t\toutline: 2px solid var(--color-primary-element-text);\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius));\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Button types\n\n\t// Primary\n\t&--vue-primary {\n\t\tbackground-color: var(--color-primary-element);\n\t\tborder-color: var(--color-primary-element-hover);\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\t}\n\n\t// Secondary\n\t&--vue-secondary {\n\t\tbackground-color: var(--color-primary-element-light);\n\t\tborder-color: var(--color-primary-element-light-hover);\n\t\tcolor: var(--color-primary-element-light-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tcolor: var(--color-primary-element-light-text);\n\t\t\tbackground-color: var(--color-primary-element-light-hover);\n\t\t}\n\t}\n\n\t// Tertiary\n\t&--tertiary,\n\t&--vue-tertiary {\n\t\tbackground-color: transparent;\n\t\tborder-color: transparent;\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Tertiary, no background\n\t&--vue-tertiary-no-background {\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Tertiary on primary color (like the header)\n\t&--vue-tertiary-on-primary {\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Success\n\t&--vue-success {\n\t\tbackground-color: var(--color-success);\n\t\tborder-color: var(--color-success-hover);\n\t\tcolor: var(--color-success-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-success-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// : add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-success);\n\t\t}\n\t}\n\n\t// Warning\n\t&--vue-warning {\n\t\tbackground-color: var(--color-warning);\n\t\tborder-color: var(--color-warning-hover);\n\t\tcolor: var(--color-warning-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-warning-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-warning);\n\t\t}\n\t}\n\n\t// Error\n\t&--vue-error {\n\t\tbackground-color: var(--color-error);\n\t\tborder-color: var(--color-error-hover);\n\t\tcolor: var(--color-error-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-error-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-error);\n\t\t}\n\t}\n\n\t// before Nextcloud 32\n\t&--legacy {\n\t\t--button-inner-size: var(--button-size);\n\t\tborder: none;\n\t\tpadding-block: 0;\n\n\t\t&.button-vue--vue-error,\n\t\t&.button-vue--vue-success,\n\t\t&.button-vue--vue-warning {\n\t\t\tcolor: white;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":[],"mappings":";;;AA0aA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,OAAA;IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,cAAA,CAAA,SAAA,iBAAA,UAAA,kBAAA,OAAA,aAAA,EAAA,SAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,M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sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\nGeneral purpose button component. See props for different options.\n[Use material design icons only for icons](https://www.npmjs.com/package/vue-material-design-icons) and remember to set their size to 20.\n\n### Usage\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```\n<template>\n<div class=\"wrapper\">\n\t<!-- Style selector -->\n\t<div class=\"grid\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"text\" name=\"style\" type=\"radio\">Text only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icon\" name=\"style\" type=\"radio\">Icon only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icontext\" name=\"style\" type=\"radio\">Icon and text</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"disabled\" type=\"checkbox\">Disabled</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"small\" name=\"size\" type=\"radio\">Small</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"normal\" name=\"size\" type=\"radio\">Normal (default)</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"large\" name=\"size\" type=\"radio\">Large</NcCheckboxRadioSwitch>\n\t</div>\n\n\t<h5>Standard buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Tertiary, no background</p>\n\t\t<p>Tertiary</p>\n\t\t<p>Secondary</p>\n\t\t<p>Primary</p>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary-no-background\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"primary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t</div>\n\n\t<!-- Wide button -->\n\t<h5>Wide button</h5>\n\t<NcButton\n\t\t:disabled=\"disabled\"\n\t\t:size=\"size\"\n\t\t:wide=\"true\"\n\t\ttext=\"Example text\">\n\t\t<template #icon>\n\t\t\t<Video\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t\tExample text\n\t</NcButton>\n\n\t<!-- Special buttons -->\n\t<h5>Special buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Success</p>\n\t\t<p>Warning</p>\n\t\t<p>Error</p>\n\t\t<p> - </p>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"success\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"warning\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"error\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<p> - </p>\n\t</div>\n</div>\n\n</template>\n<script>\nimport Video from 'vue-material-design-icons/Video.vue'\n\nexport default {\n\tcomponents: {\n\t\tVideo,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false,\n\t\t\tdisabled: false,\n\t\t\tsize: 'normal',\n\t\t\tstyle: 'icontext',\n\t\t}\n\t}\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tpadding: 0 12px;\n}\n\n.grid {\n\tdisplay: grid;\n\tgap: 12px;\n\tgrid-template-columns: 1fr 1fr 1fr 1fr;\n\tgrid-template-rows: repeat(auto-fill, auto);\n\tposition: relative;\n\tmargin: 12px 0;\n}\n\nh5 {\n\tfont-weight: bold;\n\tmargin: 40px 0 20px 0;\n}\n\np {\n\ttext-align: center;\n\tmargin: 4px 0 12px 0;\n\tcolor: var(--color-text-maxcontrast)\n}\n\nbutton {\n\tmargin: auto;\n}\n</style>\n```\n\n### Alignment\nSometimes it is required to change the icon alignment on the button, like for switching between pages as in following example:\n\n```vue\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n\t\t<NcButton aria-label=\"center (default)\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter (default)\n\t\t</NcButton>\n\t\t<NcButton alignment=\"center-reverse\" aria-label=\"center-reverse\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter-reverse\n\t\t</NcButton>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"start\" aria-label=\"start\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"start-reverse\" aria-label=\"start-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"end\" aria-label=\"end\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"end-reverse\" aria-label=\"end-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport IconRight from 'vue-material-design-icons/ArrowRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconLeft,\n\t\tIconRight,\n\t},\n}\n</script>\n```\n\n### Pressed state\n\nIt is possible to make the button stateful by adding a pressed state, e.g. if you like to create a favorite button.\nThe button will have the required `aria` attribute for accessibility and visual style (`primary` when pressed, and the configured variant otherwise).\n\nDo not change `text` or `aria-label` of the pressed/unpressed button. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed\n\n```vue\n<template>\n\t<div>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\" variant=\"tertiary-no-background\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" variant=\"tertiary\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tFavorite\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<div>\n\t\t\tIt is {{ isFavorite ? 'a' : 'not a' }} favorite.\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconStar from 'vue-material-design-icons/Star.vue'\nimport IconStarOutline from 'vue-material-design-icons/StarOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconStar,\n\t\tIconStarOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisFavorite: false,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggleFavorite() {\n\t\t\tthis.isFavorite = !this.isFavorite\n\t\t},\n\t},\n}\n</script>\n```\n\n### Usage example: Sorting table columns\nThe standard way to implement sortable table column headers should be like this:\n\n```vue\n<template>\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th :aria-sorted=\"sortedName\" class=\"row-name\">\n\t\t\t\t\t<NcButton alignment=\"start-reverse\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortName\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedName === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedName === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Name</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t\t<th :aria-sorted=\"sortedSize\" class=\"row-size\">\n\t\t\t\t\t<NcButton alignment=\"end\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortSize\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedSize === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedSize === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Size</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\"row-name\">Lorem ipsum</td>\n\t\t\t\t<td class=\"row-size\">8 MiB</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</template>\n<script>\nimport IconUp from 'vue-material-design-icons/MenuUp.vue'\nimport IconDown from 'vue-material-design-icons/MenuDown.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconUp,\n\t\tIconDown,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsortedName: null,\n\t\t\tsortedSize: null,\n\t\t}\n\t},\n\tmethods: {\n\t\tsortName() {\n\t\t\tif (this.sortedName === 'ascending') {\n\t\t\t\tthis.sortedName = 'descending'\n\t\t\t} else if (this.sortedName === 'descending') {\n\t\t\t\tthis.sortedName = null\n\t\t\t} else {\n\t\t\t\tthis.sortedName = 'ascending'\n\t\t\t}\n\t\t},\n\t\tsortSize() {\n\t\t\tif (this.sortedSize === 'ascending') {\n\t\t\t\tthis.sortedSize = 'descending'\n\t\t\t} else if (this.sortedSize === 'descending') {\n\t\t\t\tthis.sortedSize = null\n\t\t\t} else {\n\t\t\t\tthis.sortedSize = 'ascending'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style>\ntable {\n\ttable-layout: fixed;\n\twidth: 300px;\n}\n\ntd.row-name {\n\tpadding-inline-start: 16px;\n}\n\ntd.row-size {\n\ttext-align: end;\n\tpadding-inline-end: 16px;\n}\n\n.table-header {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.sort-icon {\n\tcolor: var(--color-text-maxcontrast);\n\tposition: relative;\n\tinset-inline: -10px;\n}\n\n.row-size .sort-icon {\n\tinset-inline: 10px;\n}\n</style>\n```\n\n</docs>\n\n<script>\nimport { isLegacy32 } from '../../utils/legacy.ts'\nimport { logger } from '../../utils/logger.ts'\n\nexport default {\n\tname: 'NcButton',\n\n\tinject: {\n\t\tgetNcPopoverTriggerAttrs: {\n\t\t\tfrom: 'NcPopover:trigger:attrs',\n\t\t\tdefault: () => () => ({}),\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Set the text and icon alignment\n\t\t *\n\t\t * @default 'center'\n\t\t */\n\t\talignment: {\n\t\t\ttype: String,\n\t\t\tdefault: 'center',\n\t\t\tvalidator: (alignment) => ['start', 'start-reverse', 'center', 'center-reverse', 'end', 'end-reverse'].includes(alignment),\n\t\t},\n\n\t\t/**\n\t\t * Toggles the disabled state of the button on and off.\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 * Specify the button size\n\t\t * Accepted values: `'small'`, `'normal'` (default), `'large'`\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'normal',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'normal', 'large'].includes(value)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Specifies the HTML button type.\n\t\t * Accepted values: submit, reset, button.\n\t\t *\n\t\t * For legacy reasons this can also be used to set the variant of the button (color schema).\n\t\t * This is discouraged but the accepted values are:\n\t\t * primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary' (will change with v9)\n\t\t * @deprecated The behavior will change in v9 to only allow the native HTML button types - use `variant` instead for setting the appearance of the button.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t\t\t|| ['submit', 'reset', 'button'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button native type\n\t\t * Accepted values: submit, reset, button. If left empty,\n\t\t * the default \"button\" type will be used.\n\t\t *\n\t\t * @deprecated use `type` instead - will be removed with v9\n\t\t */\n\t\tnativeType: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['submit', 'reset', 'button'].indexOf(value) !== -1\n\t\t\t},\n\n\t\t\tdefault: 'button',\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the button should span all the available width.\n\t\t * By default, buttons span the whole width of the container.\n\t\t */\n\t\twide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Always try to provide an aria-label to your button. Make it more\n\t\t * specific than the button's name by provide some more context. E.g. if\n\t\t * the name of the button is \"send\" in the Mail app, the aria label could\n\t\t * be \"Send email\".\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Providing the href attribute turns the button component into an `a`\n\t\t * element.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Target for the `a` element if `href` is set.\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '_self',\n\t\t},\n\n\t\t/**\n\t\t * Providing the download attribute with href downloads file when clicking.\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 * Providing the to attribute turns the button component into a `router-link`\n\t\t * element. Takes precedence over the href attribute.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behaviour of `router-link` to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The pressed state of the button if it has a checked state\n\t\t * This will add the `aria-pressed` attribute and for the button to have the primary style in checked state.\n\t\t *\n\t\t * Pressed state is not supported for links\n\t\t */\n\t\tpressed: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button variant.\n\t\t *\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary'\n\t\t * @since 8.24.0\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\t},\n\n\temits: ['update:pressed', 'click'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The real type to be used for the button, enforces `primary` for pressed state and, if stateful button, any other type for not pressed state\n\t\t * Otherwise the type property is used.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealVariant() {\n\t\t\t// Force *primary* when pressed\n\t\t\tif (this.pressed) {\n\t\t\t\treturn 'primary'\n\t\t\t}\n\t\t\t// If not pressed but button is configured as stateful button then the type must not be primary\n\t\t\tif (this.pressed === false && (this.type === 'primary' || this.variant === 'primary')) {\n\t\t\t\treturn 'secondary'\n\t\t\t}\n\t\t\t// handle legacy behavior\n\t\t\tif (this.type !== 'secondary' && ['primary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\t// otherwise use the configured variant\n\t\t\treturn this.variant\n\t\t},\n\n\t\t/**\n\t\t * The HTML button type\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealType() {\n\t\t\tif (typeof this.pressed === 'boolean') {\n\t\t\t\treturn 'button'\n\t\t\t}\n\t\t\t// Handle legacy behavior\n\t\t\tif (this.nativeType !== 'button') {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// Also handling legacy behavior: Ensure we do not conflict here\n\t\t\tif (['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// otherwise use the type\n\t\t\treturn this.type\n\t\t},\n\n\t\t/**\n\t\t * The variant is one of the tertiary- ones\n\t\t */\n\t\tisTertiary() {\n\t\t\treturn this.realVariant.startsWith('tertiary')\n\t\t},\n\n\t\t/**\n\t\t * The flexbox alignment of the button content\n\t\t */\n\t\tflexAlignment() {\n\t\t\treturn this.alignment.split('-')[0]\n\t\t},\n\n\t\t/**\n\t\t * If the button content should be reversed (icon on the end)\n\t\t */\n\t\tisReverseAligned() {\n\t\t\treturn this.alignment.includes('-')\n\t\t},\n\n\t\tncPopoverTriggerAttrs() {\n\t\t\treturn this.getNcPopoverTriggerAttrs()\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\tconst hasText = !!this.$slots.default\n\t\tconst hasIcon = this.$slots?.icon\n\n\t\t/**\n\t\t * Always fill either the text prop or the ariaLabel one.\n\t\t */\n\t\tif (!hasText && !this.ariaLabel) {\n\t\t\tlogger.warn('You need to fill either the text or the ariaLabel props in the button component.', {\n\t\t\t\ttext: this.$slots.default?.[0]?.text,\n\t\t\t\tariaLabel: this.ariaLabel,\n\t\t\t\tinstance: this,\n\t\t\t})\n\t\t}\n\n\t\tconst isLink = (this.to || this.href)\n\n\t\tconst hasPressed = !isLink && typeof this.pressed === 'boolean'\n\n\t\tconst renderButton = ({ href, navigate, isActive, isExactActive } = {}) => h(\n\t\t\tisLink ? 'a' : 'button',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'button-vue',\n\t\t\t\t\t`button-vue--size-${this.size}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'button-vue--icon-only': hasIcon && !hasText,\n\t\t\t\t\t\t'button-vue--text-only': hasText && !hasIcon,\n\t\t\t\t\t\t'button-vue--icon-and-text': hasIcon && hasText,\n\t\t\t\t\t\t[`button-vue--vue-${this.realVariant}`]: this.realVariant,\n\t\t\t\t\t\t'button-vue--legacy': isLegacy32,\n\t\t\t\t\t\t'button-vue--tertiary': this.isTertiary,\n\t\t\t\t\t\t'button-vue--wide': this.wide,\n\t\t\t\t\t\t[`button-vue--${this.flexAlignment}`]: this.flexAlignment !== 'center',\n\t\t\t\t\t\t'button-vue--reverse': this.isReverseAligned,\n\t\t\t\t\t\tactive: isActive,\n\t\t\t\t\t\t'router-link-exact-active': isExactActive,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tattrs: {\n\t\t\t\t\t'aria-label': this.ariaLabel,\n\t\t\t\t\t'aria-pressed': hasPressed ? this.pressed.toString() : undefined,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\ttype: isLink ? null : this.realType,\n\t\t\t\t\trole: isLink ? 'button' : null,\n\t\t\t\t\thref: this.to ? href : (this.href || null),\n\t\t\t\t\ttarget: isLink ? (this.target || '_self') : null,\n\t\t\t\t\trel: isLink ? 'nofollow noreferrer noopener' : null,\n\t\t\t\t\tdownload: (!this.to && this.href && this.download) ? this.download : null,\n\t\t\t\t\t// If this button is used as a popover trigger, we need to apply trigger attrs, e.g. aria attributes\n\t\t\t\t\t...this.ncPopoverTriggerAttrs,\n\t\t\t\t\t// Inherit all the component attrs\n\t\t\t\t\t...this.$attrs,\n\t\t\t\t},\n\t\t\t\ton: {\n\t\t\t\t\t...this.$listeners,\n\t\t\t\t\tclick: ($event) => {\n\t\t\t\t\t\tif (hasPressed) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Update the current pressed state of the button (if the `pressed` property was configured)\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @property {boolean} newValue The new `pressed`-state\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tthis.$emit('update:pressed', !this.pressed)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We have to both navigate and emit the click event\n\t\t\t\t\t\tthis.$emit('click', $event)\n\t\t\t\t\t\tnavigate?.($event)\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\th('span', { class: 'button-vue__wrapper' }, [\n\t\t\t\t\thasIcon\n\t\t\t\t\t\t? h('span', {\n\t\t\t\t\t\t\t\tclass: 'button-vue__icon',\n\t\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\t\t'aria-hidden': 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}, [this.$slots.icon])\n\t\t\t\t\t\t: null,\n\t\t\t\t\thasText ? h('span', { class: 'button-vue__text' }, [this.$slots.default]) : null,\n\t\t\t\t]),\n\t\t\t],\n\t\t)\n\n\t\t// If we have a router-link, we wrap the button in it\n\t\tif (this.to) {\n\t\t\treturn h('router-link', {\n\t\t\t\tprops: {\n\t\t\t\t\tcustom: true,\n\t\t\t\t\tto: this.to,\n\t\t\t\t\texact: this.exact,\n\t\t\t\t},\n\t\t\t\tscopedSlots: {\n\t\t\t\t\tdefault: renderButton,\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t\t// Otherwise we simply return the button\n\t\treturn renderButton()\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.button-vue {\n\t--button-size: var(--default-clickable-area);\n\t--button-inner-size: calc(var(--button-size) - 4px); // without the outer border\n\t--button-radius: var(--border-radius-element, calc(var(--button-size) / 2));\n\t--button-padding-default: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t--button-padding: var(--default-grid-baseline) var(--button-padding-default);\n\n\t// General styles\n\t// by default use secondary styling\n\tcolor: var(--color-primary-element-light-text);\n\tbackground-color: var(--color-primary-element-light);\n\tborder: 1px solid var(--color-primary-element-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--button-radius);\n\tbox-sizing: border-box;\n\t// adjust position and size\n\tposition: relative;\n\twidth: fit-content;\n\toverflow: hidden;\n\tpadding-block: 1px 0; // center the content as border is 1px top and 2px bottom\n\tpadding-inline: var(--button-padding);\n\tmin-height: var(--button-size);\n\tmin-width: var(--button-size);\n\t// display setup\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: 0.1s;\n\ttransition-timing-function: linear;\n\tcursor: pointer;\n\tfont-size: var(--default-font-size);\n\tfont-weight: bold;\n\n\t&--size-small {\n\t\t--button-size: var(--clickable-area-small, 24px);\n\t\t--button-radius: var(--border-radius); // make the border radius even smaller for small buttons\n\t}\n\n\t&--size-large {\n\t\t--button-size: var(--clickable-area-large, 48px);\n\t}\n\n\t// Cursor pointer on element and all children\n\t&,\n\t& :deep(*) {\n\t\tcursor: pointer;\n\t}\n\n\t// No outline feedback for focus. Handled with a toggled class in js (see data)\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t&:disabled {\n\t\tcursor: default;\n\t\topacity: $opacity_disabled;\n\t\t// Gives a wash out effect\n\t\tfilter: saturate($opacity_normal);\n\n\t\t& :deep(*) {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\t// Default button type\n\t&:hover:not(:disabled) {\n\t\tbackground-color: var(--color-primary-element-light-hover);\n\t}\n\n\t// Back to the default color for this button when active\n\t// TODO: add ripple effect\n\t&:active {\n\t\tbackground-color: var(--color-primary-element-light);\n\t}\n\n\t&__wrapper {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n\n\t&--end &__wrapper {\n\t\tjustify-content: end;\n\t}\n\t&--start &__wrapper {\n\t\tjustify-content: start;\n\t}\n\t&--reverse &__wrapper {\n\t\tflex-direction: row-reverse;\n\t}\n\n\t&--reverse#{&}--icon-and-text {\n\t\t--button-padding: var(--button-padding-default) var(--default-grid-baseline);\n\t}\n\n\t&__icon {\n\t\t--default-clickable-area: var(--button-inner-size); // ensure icons align with current button size\n\t\theight: var(--button-inner-size);\n\t\twidth: var(--button-inner-size);\n\t\tmin-height: var(--button-inner-size);\n\t\tmin-width: var(--button-inner-size);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n\n\t// For small buttons we need to adjust the icon size\n\t&--size-small &__icon {\n\t\t:deep(> *) {\n\t\t\tmax-height: 16px;\n\t\t\tmax-width: 16px;\n\t\t}\n\t\t:deep(svg) {\n\t\t\theight: 16px;\n\t\t\twidth: 16px;\n\t\t}\n\t}\n\n\t&__text {\n\t\tfont-weight: bold;\n\t\tmargin-bottom: 1px;\n\t\tpadding: 2px 0;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t// Icon-only button\n\t&--icon-only {\n\t\t--button-padding: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t\tline-height: 1;\n\t\twidth: var(--button-size) !important;\n\t}\n\n\t// Text-only button\n\t&--text-only {\n\t\t--button-padding: var(--button-padding-default);\n\n\t\t& .button-vue__text {\n\t\t\tmargin-inline: 4px;\n\t\t}\n\t}\n\n\t// Wide button spans the whole width of the container\n\t&--wide {\n\t\twidth: 100%;\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--color-main-text) !important;\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background) !important;\n\t\t&.button-vue--vue-tertiary-on-primary {\n\t\t\toutline: 2px solid var(--color-primary-element-text);\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius));\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Button types\n\n\t// Primary\n\t&--vue-primary {\n\t\tbackground-color: var(--color-primary-element);\n\t\tborder-color: var(--color-primary-element-hover);\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\t}\n\n\t// Secondary\n\t&--vue-secondary {\n\t\tbackground-color: var(--color-primary-element-light);\n\t\tborder-color: var(--color-primary-element-light-hover);\n\t\tcolor: var(--color-primary-element-light-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tcolor: var(--color-primary-element-light-text);\n\t\t\tbackground-color: var(--color-primary-element-light-hover);\n\t\t}\n\t}\n\n\t// Tertiary\n\t&--tertiary,\n\t&--vue-tertiary {\n\t\tbackground-color: transparent;\n\t\tborder-color: transparent;\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Tertiary, no background\n\t&--vue-tertiary-no-background {\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Tertiary on primary color (like the header)\n\t&--vue-tertiary-on-primary {\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Success\n\t&--vue-success {\n\t\tbackground-color: var(--color-success);\n\t\tborder-color: var(--color-success-hover);\n\t\tcolor: var(--color-success-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-success-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// : add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-success);\n\t\t}\n\t}\n\n\t// Warning\n\t&--vue-warning {\n\t\tbackground-color: var(--color-warning);\n\t\tborder-color: var(--color-warning-hover);\n\t\tcolor: var(--color-warning-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-warning-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-warning);\n\t\t}\n\t}\n\n\t// Error\n\t&--vue-error {\n\t\tbackground-color: var(--color-error);\n\t\tborder-color: var(--color-error-hover);\n\t\tcolor: var(--color-error-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-error-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-error);\n\t\t}\n\t}\n\n\t// before Nextcloud 32\n\t&--legacy {\n\t\t--button-inner-size: var(--button-size);\n\t\tborder: none;\n\t\tpadding-block: 0;\n\n\t\t&.button-vue--vue-error,\n\t\t&.button-vue--vue-success,\n\t\t&.button-vue--vue-warning {\n\t\t\tcolor: white;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0aA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,OAAA;IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,cAAA,CAAA,SAAA,iBAAA,UAAA,kBAAA,OAAA,aAAA,EAAA,SAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,OAAA;AACA,eAAA,CAAA,SAAA,UAAA,OAAA,EAAA,SAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA,OAAA;AACA,eAAA,CAAA,WAAA,aAAA,YAAA,0BAAA,uBAAA,SAAA,WAAA,SAAA,E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,WAAA;AAAA,WAEA,KAAA,wBAEA,KAAA;AAAA,QAEA,IAAA,iCACA,KAAA,aADA;AAAA,UAEA,OAAA,CAAA,WAAA;AACA,gBAAA,YAAA;AAMA,mBAAA,MAAA,kBAAA,CAAA,KAAA,OAAA;AAAA,YACA;AAEA,iBAAA,MAAA,SAAA,MAAA;AACA,iDAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,MACA;AAAA,QACA,EAAA,QAAA,EAAA,OAAA,sBAAA,GAAA;AAAA,UACA,UACA,EAAA,QAAA;AAAA,YACA,OAAA;AAAA,YACA,OAAA;AAAA,cACA,eAAA;AAAA,YACA;AAAA,UACA,GAAA,CAAA,KAAA,OAAA,IAAA,CAAA,IACA;AAAA,UACA,UAAA,EAAA,QAAA,EAAA,OAAA,sBAAA,CAAA,KAAA,OAAA,OAAA,CAAA,IAAA;AAAA,QACA,CAAA;AAAA,MACA;AAAA,IACA;AAGA,QAAA,KAAA,IAAA;AACA,aAAA,EAAA,eAAA;AAAA,QACA,OAAA;AAAA,UACA,QAAA;AAAA,UACA,IAAA,KAAA;AAAA,UACA,OAAA,KAAA;AAAA,QACA;AAAA,QACA,aAAA;AAAA,UACA,SAAA;AAAA,QACA;AAAA,MACA,CAAA;AAAA,IACA;AAEA,WAAA,aAAA;AAAA,EACA;AACA;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
require('../assets/NcButton-
|
|
1
|
+
require('../assets/NcButton-uQUvp7DS.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
const legacy = require("./legacy-DUgfmdiS.cjs");
|
|
4
23
|
const logger = require("./logger-3HuiEIF6.cjs");
|
|
5
24
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
6
25
|
const _sfc_main = {
|
|
@@ -231,13 +250,15 @@ const _sfc_main = {
|
|
|
231
250
|
* @return {object|undefined} The created VNode
|
|
232
251
|
*/
|
|
233
252
|
render(h) {
|
|
253
|
+
var _a, _b, _c;
|
|
234
254
|
const hasText = !!this.$slots.default;
|
|
235
|
-
const hasIcon = this.$slots
|
|
255
|
+
const hasIcon = (_a = this.$slots) == null ? void 0 : _a.icon;
|
|
236
256
|
if (!hasText && !this.ariaLabel) {
|
|
237
257
|
logger.logger.warn("You need to fill either the text or the ariaLabel props in the button component.", {
|
|
238
|
-
text: this.$slots.default
|
|
239
|
-
ariaLabel: this.ariaLabel
|
|
240
|
-
|
|
258
|
+
text: (_c = (_b = this.$slots.default) == null ? void 0 : _b[0]) == null ? void 0 : _c.text,
|
|
259
|
+
ariaLabel: this.ariaLabel,
|
|
260
|
+
instance: this
|
|
261
|
+
});
|
|
241
262
|
}
|
|
242
263
|
const isLink = this.to || this.href;
|
|
243
264
|
const hasPressed = !isLink && typeof this.pressed === "boolean";
|
|
@@ -246,22 +267,22 @@ const _sfc_main = {
|
|
|
246
267
|
{
|
|
247
268
|
class: [
|
|
248
269
|
"button-vue",
|
|
249
|
-
|
|
270
|
+
"button-vue--size-".concat(this.size),
|
|
250
271
|
{
|
|
251
272
|
"button-vue--icon-only": hasIcon && !hasText,
|
|
252
273
|
"button-vue--text-only": hasText && !hasIcon,
|
|
253
274
|
"button-vue--icon-and-text": hasIcon && hasText,
|
|
254
|
-
[
|
|
275
|
+
["button-vue--vue-".concat(this.realVariant)]: this.realVariant,
|
|
255
276
|
"button-vue--legacy": legacy.isLegacy32,
|
|
256
277
|
"button-vue--tertiary": this.isTertiary,
|
|
257
278
|
"button-vue--wide": this.wide,
|
|
258
|
-
[
|
|
279
|
+
["button-vue--".concat(this.flexAlignment)]: this.flexAlignment !== "center",
|
|
259
280
|
"button-vue--reverse": this.isReverseAligned,
|
|
260
281
|
active: isActive,
|
|
261
282
|
"router-link-exact-active": isExactActive
|
|
262
283
|
}
|
|
263
284
|
],
|
|
264
|
-
attrs: {
|
|
285
|
+
attrs: __spreadValues(__spreadValues({
|
|
265
286
|
"aria-label": this.ariaLabel,
|
|
266
287
|
"aria-pressed": hasPressed ? this.pressed.toString() : void 0,
|
|
267
288
|
disabled: this.disabled,
|
|
@@ -270,22 +291,17 @@ const _sfc_main = {
|
|
|
270
291
|
href: this.to ? href : this.href || null,
|
|
271
292
|
target: isLink ? this.target || "_self" : null,
|
|
272
293
|
rel: isLink ? "nofollow noreferrer noopener" : null,
|
|
273
|
-
download: !this.to && this.href && this.download ? this.download : null
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
// Inherit all the component attrs
|
|
277
|
-
...this.$attrs
|
|
278
|
-
},
|
|
279
|
-
on: {
|
|
280
|
-
...this.$listeners,
|
|
294
|
+
download: !this.to && this.href && this.download ? this.download : null
|
|
295
|
+
}, this.ncPopoverTriggerAttrs), this.$attrs),
|
|
296
|
+
on: __spreadProps(__spreadValues({}, this.$listeners), {
|
|
281
297
|
click: ($event) => {
|
|
282
298
|
if (hasPressed) {
|
|
283
299
|
this.$emit("update:pressed", !this.pressed);
|
|
284
300
|
}
|
|
285
301
|
this.$emit("click", $event);
|
|
286
|
-
navigate
|
|
302
|
+
navigate == null ? void 0 : navigate($event);
|
|
287
303
|
}
|
|
288
|
-
}
|
|
304
|
+
})
|
|
289
305
|
},
|
|
290
306
|
[
|
|
291
307
|
h("span", { class: "button-vue__wrapper" }, [
|
|
@@ -322,8 +338,8 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
322
338
|
_sfc_staticRenderFns,
|
|
323
339
|
false,
|
|
324
340
|
null,
|
|
325
|
-
"
|
|
341
|
+
"bfde1a98"
|
|
326
342
|
);
|
|
327
343
|
const NcButton = __component__.exports;
|
|
328
344
|
exports.NcButton = NcButton;
|
|
329
|
-
//# sourceMappingURL=NcButton-
|
|
345
|
+
//# sourceMappingURL=NcButton-DK7bNZIL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcButton-DOsCAjiE.cjs","sources":["../../src/components/NcButton/NcButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\nGeneral purpose button component. See props for different options.\n[Use material design icons only for icons](https://www.npmjs.com/package/vue-material-design-icons) and remember to set their size to 20.\n\n### Usage\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```\n<template>\n<div class=\"wrapper\">\n\t<!-- Style selector -->\n\t<div class=\"grid\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"text\" name=\"style\" type=\"radio\">Text only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icon\" name=\"style\" type=\"radio\">Icon only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icontext\" name=\"style\" type=\"radio\">Icon and text</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"disabled\" type=\"checkbox\">Disabled</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"small\" name=\"size\" type=\"radio\">Small</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"normal\" name=\"size\" type=\"radio\">Normal (default)</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"large\" name=\"size\" type=\"radio\">Large</NcCheckboxRadioSwitch>\n\t</div>\n\n\t<h5>Standard buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Tertiary, no background</p>\n\t\t<p>Tertiary</p>\n\t\t<p>Secondary</p>\n\t\t<p>Primary</p>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary-no-background\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"primary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t</div>\n\n\t<!-- Wide button -->\n\t<h5>Wide button</h5>\n\t<NcButton\n\t\t:disabled=\"disabled\"\n\t\t:size=\"size\"\n\t\t:wide=\"true\"\n\t\ttext=\"Example text\">\n\t\t<template #icon>\n\t\t\t<Video\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t\tExample text\n\t</NcButton>\n\n\t<!-- Special buttons -->\n\t<h5>Special buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Success</p>\n\t\t<p>Warning</p>\n\t\t<p>Error</p>\n\t\t<p> - </p>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"success\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"warning\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"error\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<p> - </p>\n\t</div>\n</div>\n\n</template>\n<script>\nimport Video from 'vue-material-design-icons/Video.vue'\n\nexport default {\n\tcomponents: {\n\t\tVideo,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false,\n\t\t\tdisabled: false,\n\t\t\tsize: 'normal',\n\t\t\tstyle: 'icontext',\n\t\t}\n\t}\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tpadding: 0 12px;\n}\n\n.grid {\n\tdisplay: grid;\n\tgap: 12px;\n\tgrid-template-columns: 1fr 1fr 1fr 1fr;\n\tgrid-template-rows: repeat(auto-fill, auto);\n\tposition: relative;\n\tmargin: 12px 0;\n}\n\nh5 {\n\tfont-weight: bold;\n\tmargin: 40px 0 20px 0;\n}\n\np {\n\ttext-align: center;\n\tmargin: 4px 0 12px 0;\n\tcolor: var(--color-text-maxcontrast)\n}\n\nbutton {\n\tmargin: auto;\n}\n</style>\n```\n\n### Alignment\nSometimes it is required to change the icon alignment on the button, like for switching between pages as in following example:\n\n```vue\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n\t\t<NcButton aria-label=\"center (default)\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter (default)\n\t\t</NcButton>\n\t\t<NcButton alignment=\"center-reverse\" aria-label=\"center-reverse\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter-reverse\n\t\t</NcButton>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"start\" aria-label=\"start\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"start-reverse\" aria-label=\"start-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"end\" aria-label=\"end\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"end-reverse\" aria-label=\"end-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport IconRight from 'vue-material-design-icons/ArrowRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconLeft,\n\t\tIconRight,\n\t},\n}\n</script>\n```\n\n### Pressed state\n\nIt is possible to make the button stateful by adding a pressed state, e.g. if you like to create a favorite button.\nThe button will have the required `aria` attribute for accessibility and visual style (`primary` when pressed, and the configured variant otherwise).\n\nDo not change `text` or `aria-label` of the pressed/unpressed button. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed\n\n```vue\n<template>\n\t<div>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\" variant=\"tertiary-no-background\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" variant=\"tertiary\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tFavorite\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<div>\n\t\t\tIt is {{ isFavorite ? 'a' : 'not a' }} favorite.\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconStar from 'vue-material-design-icons/Star.vue'\nimport IconStarOutline from 'vue-material-design-icons/StarOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconStar,\n\t\tIconStarOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisFavorite: false,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggleFavorite() {\n\t\t\tthis.isFavorite = !this.isFavorite\n\t\t},\n\t},\n}\n</script>\n```\n\n### Usage example: Sorting table columns\nThe standard way to implement sortable table column headers should be like this:\n\n```vue\n<template>\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th :aria-sorted=\"sortedName\" class=\"row-name\">\n\t\t\t\t\t<NcButton alignment=\"start-reverse\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortName\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedName === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedName === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Name</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t\t<th :aria-sorted=\"sortedSize\" class=\"row-size\">\n\t\t\t\t\t<NcButton alignment=\"end\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortSize\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedSize === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedSize === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Size</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\"row-name\">Lorem ipsum</td>\n\t\t\t\t<td class=\"row-size\">8 MiB</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</template>\n<script>\nimport IconUp from 'vue-material-design-icons/MenuUp.vue'\nimport IconDown from 'vue-material-design-icons/MenuDown.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconUp,\n\t\tIconDown,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsortedName: null,\n\t\t\tsortedSize: null,\n\t\t}\n\t},\n\tmethods: {\n\t\tsortName() {\n\t\t\tif (this.sortedName === 'ascending') {\n\t\t\t\tthis.sortedName = 'descending'\n\t\t\t} else if (this.sortedName === 'descending') {\n\t\t\t\tthis.sortedName = null\n\t\t\t} else {\n\t\t\t\tthis.sortedName = 'ascending'\n\t\t\t}\n\t\t},\n\t\tsortSize() {\n\t\t\tif (this.sortedSize === 'ascending') {\n\t\t\t\tthis.sortedSize = 'descending'\n\t\t\t} else if (this.sortedSize === 'descending') {\n\t\t\t\tthis.sortedSize = null\n\t\t\t} else {\n\t\t\t\tthis.sortedSize = 'ascending'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style>\ntable {\n\ttable-layout: fixed;\n\twidth: 300px;\n}\n\ntd.row-name {\n\tpadding-inline-start: 16px;\n}\n\ntd.row-size {\n\ttext-align: end;\n\tpadding-inline-end: 16px;\n}\n\n.table-header {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.sort-icon {\n\tcolor: var(--color-text-maxcontrast);\n\tposition: relative;\n\tinset-inline: -10px;\n}\n\n.row-size .sort-icon {\n\tinset-inline: 10px;\n}\n</style>\n```\n\n</docs>\n\n<script>\nimport { isLegacy32 } from '../../utils/legacy.ts'\nimport { logger } from '../../utils/logger.ts'\n\nexport default {\n\tname: 'NcButton',\n\n\tinject: {\n\t\tgetNcPopoverTriggerAttrs: {\n\t\t\tfrom: 'NcPopover:trigger:attrs',\n\t\t\tdefault: () => () => ({}),\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Set the text and icon alignment\n\t\t *\n\t\t * @default 'center'\n\t\t */\n\t\talignment: {\n\t\t\ttype: String,\n\t\t\tdefault: 'center',\n\t\t\tvalidator: (alignment) => ['start', 'start-reverse', 'center', 'center-reverse', 'end', 'end-reverse'].includes(alignment),\n\t\t},\n\n\t\t/**\n\t\t * Toggles the disabled state of the button on and off.\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 * Specify the button size\n\t\t * Accepted values: `'small'`, `'normal'` (default), `'large'`\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'normal',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'normal', 'large'].includes(value)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Specifies the HTML button type.\n\t\t * Accepted values: submit, reset, button.\n\t\t *\n\t\t * For legacy reasons this can also be used to set the variant of the button (color schema).\n\t\t * This is discouraged but the accepted values are:\n\t\t * primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary' (will change with v9)\n\t\t * @deprecated The behavior will change in v9 to only allow the native HTML button types - use `variant` instead for setting the appearance of the button.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t\t\t|| ['submit', 'reset', 'button'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button native type\n\t\t * Accepted values: submit, reset, button. If left empty,\n\t\t * the default \"button\" type will be used.\n\t\t *\n\t\t * @deprecated use `type` instead - will be removed with v9\n\t\t */\n\t\tnativeType: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['submit', 'reset', 'button'].indexOf(value) !== -1\n\t\t\t},\n\n\t\t\tdefault: 'button',\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the button should span all the available width.\n\t\t * By default, buttons span the whole width of the container.\n\t\t */\n\t\twide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Always try to provide an aria-label to your button. Make it more\n\t\t * specific than the button's name by provide some more context. E.g. if\n\t\t * the name of the button is \"send\" in the Mail app, the aria label could\n\t\t * be \"Send email\".\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Providing the href attribute turns the button component into an `a`\n\t\t * element.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Target for the `a` element if `href` is set.\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '_self',\n\t\t},\n\n\t\t/**\n\t\t * Providing the download attribute with href downloads file when clicking.\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 * Providing the to attribute turns the button component into a `router-link`\n\t\t * element. Takes precedence over the href attribute.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behaviour of `router-link` to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The pressed state of the button if it has a checked state\n\t\t * This will add the `aria-pressed` attribute and for the button to have the primary style in checked state.\n\t\t *\n\t\t * Pressed state is not supported for links\n\t\t */\n\t\tpressed: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button variant.\n\t\t *\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary'\n\t\t * @since 8.24.0\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\t},\n\n\temits: ['update:pressed', 'click'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The real type to be used for the button, enforces `primary` for pressed state and, if stateful button, any other type for not pressed state\n\t\t * Otherwise the type property is used.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealVariant() {\n\t\t\t// Force *primary* when pressed\n\t\t\tif (this.pressed) {\n\t\t\t\treturn 'primary'\n\t\t\t}\n\t\t\t// If not pressed but button is configured as stateful button then the type must not be primary\n\t\t\tif (this.pressed === false && (this.type === 'primary' || this.variant === 'primary')) {\n\t\t\t\treturn 'secondary'\n\t\t\t}\n\t\t\t// handle legacy behavior\n\t\t\tif (this.type !== 'secondary' && ['primary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\t// otherwise use the configured variant\n\t\t\treturn this.variant\n\t\t},\n\n\t\t/**\n\t\t * The HTML button type\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealType() {\n\t\t\tif (typeof this.pressed === 'boolean') {\n\t\t\t\treturn 'button'\n\t\t\t}\n\t\t\t// Handle legacy behavior\n\t\t\tif (this.nativeType !== 'button') {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// Also handling legacy behavior: Ensure we do not conflict here\n\t\t\tif (['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// otherwise use the type\n\t\t\treturn this.type\n\t\t},\n\n\t\t/**\n\t\t * The variant is one of the tertiary- ones\n\t\t */\n\t\tisTertiary() {\n\t\t\treturn this.realVariant.startsWith('tertiary')\n\t\t},\n\n\t\t/**\n\t\t * The flexbox alignment of the button content\n\t\t */\n\t\tflexAlignment() {\n\t\t\treturn this.alignment.split('-')[0]\n\t\t},\n\n\t\t/**\n\t\t * If the button content should be reversed (icon on the end)\n\t\t */\n\t\tisReverseAligned() {\n\t\t\treturn this.alignment.includes('-')\n\t\t},\n\n\t\tncPopoverTriggerAttrs() {\n\t\t\treturn this.getNcPopoverTriggerAttrs()\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\tconst hasText = !!this.$slots.default\n\t\tconst hasIcon = this.$slots?.icon\n\n\t\t/**\n\t\t * Always fill either the text prop or the ariaLabel one.\n\t\t */\n\t\tif (!hasText && !this.ariaLabel) {\n\t\t\tlogger.warn('You need to fill either the text or the ariaLabel props in the button component.', {\n\t\t\t\ttext: this.$slots.default?.[0]?.text,\n\t\t\t\tariaLabel: this.ariaLabel,\n\t\t\t}, this)\n\t\t}\n\n\t\tconst isLink = (this.to || this.href)\n\n\t\tconst hasPressed = !isLink && typeof this.pressed === 'boolean'\n\n\t\tconst renderButton = ({ href, navigate, isActive, isExactActive } = {}) => h(\n\t\t\tisLink ? 'a' : 'button',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'button-vue',\n\t\t\t\t\t`button-vue--size-${this.size}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'button-vue--icon-only': hasIcon && !hasText,\n\t\t\t\t\t\t'button-vue--text-only': hasText && !hasIcon,\n\t\t\t\t\t\t'button-vue--icon-and-text': hasIcon && hasText,\n\t\t\t\t\t\t[`button-vue--vue-${this.realVariant}`]: this.realVariant,\n\t\t\t\t\t\t'button-vue--legacy': isLegacy32,\n\t\t\t\t\t\t'button-vue--tertiary': this.isTertiary,\n\t\t\t\t\t\t'button-vue--wide': this.wide,\n\t\t\t\t\t\t[`button-vue--${this.flexAlignment}`]: this.flexAlignment !== 'center',\n\t\t\t\t\t\t'button-vue--reverse': this.isReverseAligned,\n\t\t\t\t\t\tactive: isActive,\n\t\t\t\t\t\t'router-link-exact-active': isExactActive,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tattrs: {\n\t\t\t\t\t'aria-label': this.ariaLabel,\n\t\t\t\t\t'aria-pressed': hasPressed ? this.pressed.toString() : undefined,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\ttype: isLink ? null : this.realType,\n\t\t\t\t\trole: isLink ? 'button' : null,\n\t\t\t\t\thref: this.to ? href : (this.href || null),\n\t\t\t\t\ttarget: isLink ? (this.target || '_self') : null,\n\t\t\t\t\trel: isLink ? 'nofollow noreferrer noopener' : null,\n\t\t\t\t\tdownload: (!this.to && this.href && this.download) ? this.download : null,\n\t\t\t\t\t// If this button is used as a popover trigger, we need to apply trigger attrs, e.g. aria attributes\n\t\t\t\t\t...this.ncPopoverTriggerAttrs,\n\t\t\t\t\t// Inherit all the component attrs\n\t\t\t\t\t...this.$attrs,\n\t\t\t\t},\n\t\t\t\ton: {\n\t\t\t\t\t...this.$listeners,\n\t\t\t\t\tclick: ($event) => {\n\t\t\t\t\t\tif (hasPressed) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Update the current pressed state of the button (if the `pressed` property was configured)\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @property {boolean} newValue The new `pressed`-state\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tthis.$emit('update:pressed', !this.pressed)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We have to both navigate and emit the click event\n\t\t\t\t\t\tthis.$emit('click', $event)\n\t\t\t\t\t\tnavigate?.($event)\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\th('span', { class: 'button-vue__wrapper' }, [\n\t\t\t\t\thasIcon\n\t\t\t\t\t\t? h('span', {\n\t\t\t\t\t\t\t\tclass: 'button-vue__icon',\n\t\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\t\t'aria-hidden': 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}, [this.$slots.icon])\n\t\t\t\t\t\t: null,\n\t\t\t\t\thasText ? h('span', { class: 'button-vue__text' }, [this.$slots.default]) : null,\n\t\t\t\t]),\n\t\t\t],\n\t\t)\n\n\t\t// If we have a router-link, we wrap the button in it\n\t\tif (this.to) {\n\t\t\treturn h('router-link', {\n\t\t\t\tprops: {\n\t\t\t\t\tcustom: true,\n\t\t\t\t\tto: this.to,\n\t\t\t\t\texact: this.exact,\n\t\t\t\t},\n\t\t\t\tscopedSlots: {\n\t\t\t\t\tdefault: renderButton,\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t\t// Otherwise we simply return the button\n\t\treturn renderButton()\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.button-vue {\n\t--button-size: var(--default-clickable-area);\n\t--button-inner-size: calc(var(--button-size) - 4px); // without the outer border\n\t--button-radius: var(--border-radius-element, calc(var(--button-size) / 2));\n\t--button-padding-default: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t--button-padding: var(--default-grid-baseline) var(--button-padding-default);\n\n\t// General styles\n\t// by default use secondary styling\n\tcolor: var(--color-primary-element-light-text);\n\tbackground-color: var(--color-primary-element-light);\n\tborder: 1px solid var(--color-primary-element-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--button-radius);\n\tbox-sizing: border-box;\n\t// adjust position and size\n\tposition: relative;\n\twidth: fit-content;\n\toverflow: hidden;\n\tpadding-block: 1px 0; // center the content as border is 1px top and 2px bottom\n\tpadding-inline: var(--button-padding);\n\tmin-height: var(--button-size);\n\tmin-width: var(--button-size);\n\t// display setup\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: 0.1s;\n\ttransition-timing-function: linear;\n\tcursor: pointer;\n\tfont-size: var(--default-font-size);\n\tfont-weight: bold;\n\n\t&--size-small {\n\t\t--button-size: var(--clickable-area-small, 24px);\n\t\t--button-radius: var(--border-radius); // make the border radius even smaller for small buttons\n\t}\n\n\t&--size-large {\n\t\t--button-size: var(--clickable-area-large, 48px);\n\t}\n\n\t// Cursor pointer on element and all children\n\t&,\n\t& :deep(*) {\n\t\tcursor: pointer;\n\t}\n\n\t// No outline feedback for focus. Handled with a toggled class in js (see data)\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t&:disabled {\n\t\tcursor: default;\n\t\topacity: $opacity_disabled;\n\t\t// Gives a wash out effect\n\t\tfilter: saturate($opacity_normal);\n\n\t\t& :deep(*) {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\t// Default button type\n\t&:hover:not(:disabled) {\n\t\tbackground-color: var(--color-primary-element-light-hover);\n\t}\n\n\t// Back to the default color for this button when active\n\t// TODO: add ripple effect\n\t&:active {\n\t\tbackground-color: var(--color-primary-element-light);\n\t}\n\n\t&__wrapper {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n\n\t&--end &__wrapper {\n\t\tjustify-content: end;\n\t}\n\t&--start &__wrapper {\n\t\tjustify-content: start;\n\t}\n\t&--reverse &__wrapper {\n\t\tflex-direction: row-reverse;\n\t}\n\n\t&--reverse#{&}--icon-and-text {\n\t\t--button-padding: var(--button-padding-default) var(--default-grid-baseline);\n\t}\n\n\t&__icon {\n\t\t--default-clickable-area: var(--button-inner-size); // ensure icons align with current button size\n\t\theight: var(--button-inner-size);\n\t\twidth: var(--button-inner-size);\n\t\tmin-height: var(--button-inner-size);\n\t\tmin-width: var(--button-inner-size);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n\n\t// For small buttons we need to adjust the icon size\n\t&--size-small &__icon {\n\t\t:deep(> *) {\n\t\t\tmax-height: 16px;\n\t\t\tmax-width: 16px;\n\t\t}\n\t\t:deep(svg) {\n\t\t\theight: 16px;\n\t\t\twidth: 16px;\n\t\t}\n\t}\n\n\t&__text {\n\t\tfont-weight: bold;\n\t\tmargin-bottom: 1px;\n\t\tpadding: 2px 0;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t// Icon-only button\n\t&--icon-only {\n\t\t--button-padding: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t\tline-height: 1;\n\t\twidth: var(--button-size) !important;\n\t}\n\n\t// Text-only button\n\t&--text-only {\n\t\t--button-padding: var(--button-padding-default);\n\n\t\t& .button-vue__text {\n\t\t\tmargin-inline: 4px;\n\t\t}\n\t}\n\n\t// Wide button spans the whole width of the container\n\t&--wide {\n\t\twidth: 100%;\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--color-main-text) !important;\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background) !important;\n\t\t&.button-vue--vue-tertiary-on-primary {\n\t\t\toutline: 2px solid var(--color-primary-element-text);\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius));\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Button types\n\n\t// Primary\n\t&--vue-primary {\n\t\tbackground-color: var(--color-primary-element);\n\t\tborder-color: var(--color-primary-element-hover);\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\t}\n\n\t// Secondary\n\t&--vue-secondary {\n\t\tbackground-color: var(--color-primary-element-light);\n\t\tborder-color: var(--color-primary-element-light-hover);\n\t\tcolor: var(--color-primary-element-light-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tcolor: var(--color-primary-element-light-text);\n\t\t\tbackground-color: var(--color-primary-element-light-hover);\n\t\t}\n\t}\n\n\t// Tertiary\n\t&--tertiary,\n\t&--vue-tertiary {\n\t\tbackground-color: transparent;\n\t\tborder-color: transparent;\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Tertiary, no background\n\t&--vue-tertiary-no-background {\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Tertiary on primary color (like the header)\n\t&--vue-tertiary-on-primary {\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Success\n\t&--vue-success {\n\t\tbackground-color: var(--color-success);\n\t\tborder-color: var(--color-success-hover);\n\t\tcolor: var(--color-success-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-success-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// : add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-success);\n\t\t}\n\t}\n\n\t// Warning\n\t&--vue-warning {\n\t\tbackground-color: var(--color-warning);\n\t\tborder-color: var(--color-warning-hover);\n\t\tcolor: var(--color-warning-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-warning-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-warning);\n\t\t}\n\t}\n\n\t// Error\n\t&--vue-error {\n\t\tbackground-color: var(--color-error);\n\t\tborder-color: var(--color-error-hover);\n\t\tcolor: var(--color-error-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-error-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-error);\n\t\t}\n\t}\n\n\t// before Nextcloud 32\n\t&--legacy {\n\t\t--button-inner-size: var(--button-size);\n\t\tborder: none;\n\t\tpadding-block: 0;\n\n\t\t&.button-vue--vue-error,\n\t\t&.button-vue--vue-success,\n\t\t&.button-vue--vue-warning {\n\t\t\tcolor: white;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["logger","isLegacy32"],"mappings":";;;;AA0aA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAA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AA,KAAA,OAAA,OAAA,CAAA,IAAA;AAAA,QACA,CAAA;AAAA,MACA;AAAA,IACA;AAGA,QAAA,KAAA,IAAA;AACA,aAAA,EAAA,eAAA;AAAA,QACA,OAAA;AAAA,UACA,QAAA;AAAA,UACA,IAAA,KAAA;AAAA,UACA,OAAA,KAAA;AAAA,QACA;AAAA,QACA,aAAA;AAAA,UACA,SAAA;AAAA,QACA;AAAA,MACA,CAAA;AAAA,IACA;AAEA,WAAA,aAAA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcButton-DK7bNZIL.cjs","sources":["../../src/components/NcButton/NcButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\nGeneral purpose button component. See props for different options.\n[Use material design icons only for icons](https://www.npmjs.com/package/vue-material-design-icons) and remember to set their size to 20.\n\n### Usage\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```\n<template>\n<div class=\"wrapper\">\n\t<!-- Style selector -->\n\t<div class=\"grid\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"text\" name=\"style\" type=\"radio\">Text only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icon\" name=\"style\" type=\"radio\">Icon only</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"style\" value=\"icontext\" name=\"style\" type=\"radio\">Icon and text</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"disabled\" type=\"checkbox\">Disabled</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"small\" name=\"size\" type=\"radio\">Small</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"normal\" name=\"size\" type=\"radio\">Normal (default)</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"size\" value=\"large\" name=\"size\" type=\"radio\">Large</NcCheckboxRadioSwitch>\n\t</div>\n\n\t<h5>Standard buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Tertiary, no background</p>\n\t\t<p>Tertiary</p>\n\t\t<p>Secondary</p>\n\t\t<p>Primary</p>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary-no-background\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"tertiary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\taria-label=\"Example text\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"primary\">\n\t\t\t<template v-if=\"style.indexOf('icon') !== -1\" #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\t<template v-if=\"style.indexOf('text') !== -1\">Example text</template>\n\t\t</NcButton>\n\t</div>\n\n\t<!-- Wide button -->\n\t<h5>Wide button</h5>\n\t<NcButton\n\t\t:disabled=\"disabled\"\n\t\t:size=\"size\"\n\t\t:wide=\"true\"\n\t\ttext=\"Example text\">\n\t\t<template #icon>\n\t\t\t<Video\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t\tExample text\n\t</NcButton>\n\n\t<!-- Special buttons -->\n\t<h5>Special buttons</h5>\n\t<div class=\"grid\">\n\t\t<p>Success</p>\n\t\t<p>Warning</p>\n\t\t<p>Error</p>\n\t\t<p> - </p>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"success\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"warning\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<NcButton\n\t\t\t:disabled=\"disabled\"\n\t\t\t:size=\"size\"\n\t\t\tvariant=\"error\">\n\t\t\t<template #icon>\n\t\t\t\t<Video\n\t\t\t\t\t:size=\"20\" />\n\t\t\t</template>\n\t\t\tExample text\n\t\t</NcButton>\n\t\t<p> - </p>\n\t</div>\n</div>\n\n</template>\n<script>\nimport Video from 'vue-material-design-icons/Video.vue'\n\nexport default {\n\tcomponents: {\n\t\tVideo,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false,\n\t\t\tdisabled: false,\n\t\t\tsize: 'normal',\n\t\t\tstyle: 'icontext',\n\t\t}\n\t}\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.wrapper {\n\tpadding: 0 12px;\n}\n\n.grid {\n\tdisplay: grid;\n\tgap: 12px;\n\tgrid-template-columns: 1fr 1fr 1fr 1fr;\n\tgrid-template-rows: repeat(auto-fill, auto);\n\tposition: relative;\n\tmargin: 12px 0;\n}\n\nh5 {\n\tfont-weight: bold;\n\tmargin: 40px 0 20px 0;\n}\n\np {\n\ttext-align: center;\n\tmargin: 4px 0 12px 0;\n\tcolor: var(--color-text-maxcontrast)\n}\n\nbutton {\n\tmargin: auto;\n}\n</style>\n```\n\n### Alignment\nSometimes it is required to change the icon alignment on the button, like for switching between pages as in following example:\n\n```vue\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n\t\t<NcButton aria-label=\"center (default)\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter (default)\n\t\t</NcButton>\n\t\t<NcButton alignment=\"center-reverse\" aria-label=\"center-reverse\" variant=\"secondary\" wide>\n\t\t\t<template #icon>\n\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tcenter-reverse\n\t\t</NcButton>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"start\" aria-label=\"start\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"start-reverse\" aria-label=\"start-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tstart-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<div style=\"display: flex; flex-direction: column; gap: 12px; flex: 1\">\n\t\t\t\t<NcButton alignment=\"end\" aria-label=\"end\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton alignment=\"end-reverse\" aria-label=\"end-reverse\" variant=\"secondary\" wide>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tend-reverse\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport IconRight from 'vue-material-design-icons/ArrowRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconLeft,\n\t\tIconRight,\n\t},\n}\n</script>\n```\n\n### Pressed state\n\nIt is possible to make the button stateful by adding a pressed state, e.g. if you like to create a favorite button.\nThe button will have the required `aria` attribute for accessibility and visual style (`primary` when pressed, and the configured variant otherwise).\n\nDo not change `text` or `aria-label` of the pressed/unpressed button. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed\n\n```vue\n<template>\n\t<div>\n\t\t<div style=\"display: flex; gap: 12px;\">\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\" variant=\"tertiary-no-background\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" variant=\"tertiary\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tFavorite\n\t\t\t</NcButton>\n\n\t\t\t<NcButton :pressed.sync=\"isFavorite\" aria-label=\"Favorite\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconStar v-if=\"isFavorite\" :size=\"20\" />\n\t\t\t\t\t<IconStarOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<div>\n\t\t\tIt is {{ isFavorite ? 'a' : 'not a' }} favorite.\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport IconStar from 'vue-material-design-icons/Star.vue'\nimport IconStarOutline from 'vue-material-design-icons/StarOutline.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconStar,\n\t\tIconStarOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisFavorite: false,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggleFavorite() {\n\t\t\tthis.isFavorite = !this.isFavorite\n\t\t},\n\t},\n}\n</script>\n```\n\n### Usage example: Sorting table columns\nThe standard way to implement sortable table column headers should be like this:\n\n```vue\n<template>\n\t<table>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th :aria-sorted=\"sortedName\" class=\"row-name\">\n\t\t\t\t\t<NcButton alignment=\"start-reverse\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortName\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedName === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedName === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Name</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t\t<th :aria-sorted=\"sortedSize\" class=\"row-size\">\n\t\t\t\t\t<NcButton alignment=\"end\"\n\t\t\t\t\t\t:wide=\"true\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"sortSize\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconDown v-if=\"sortedSize === 'ascending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<IconUp v-else-if=\"sortedSize === 'descending'\" class=\"sort-icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span class=\"table-header\">Size</span>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\"row-name\">Lorem ipsum</td>\n\t\t\t\t<td class=\"row-size\">8 MiB</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</template>\n<script>\nimport IconUp from 'vue-material-design-icons/MenuUp.vue'\nimport IconDown from 'vue-material-design-icons/MenuDown.vue'\n\nexport default {\n\tcomponents: {\n\t\tIconUp,\n\t\tIconDown,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsortedName: null,\n\t\t\tsortedSize: null,\n\t\t}\n\t},\n\tmethods: {\n\t\tsortName() {\n\t\t\tif (this.sortedName === 'ascending') {\n\t\t\t\tthis.sortedName = 'descending'\n\t\t\t} else if (this.sortedName === 'descending') {\n\t\t\t\tthis.sortedName = null\n\t\t\t} else {\n\t\t\t\tthis.sortedName = 'ascending'\n\t\t\t}\n\t\t},\n\t\tsortSize() {\n\t\t\tif (this.sortedSize === 'ascending') {\n\t\t\t\tthis.sortedSize = 'descending'\n\t\t\t} else if (this.sortedSize === 'descending') {\n\t\t\t\tthis.sortedSize = null\n\t\t\t} else {\n\t\t\t\tthis.sortedSize = 'ascending'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style>\ntable {\n\ttable-layout: fixed;\n\twidth: 300px;\n}\n\ntd.row-name {\n\tpadding-inline-start: 16px;\n}\n\ntd.row-size {\n\ttext-align: end;\n\tpadding-inline-end: 16px;\n}\n\n.table-header {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.sort-icon {\n\tcolor: var(--color-text-maxcontrast);\n\tposition: relative;\n\tinset-inline: -10px;\n}\n\n.row-size .sort-icon {\n\tinset-inline: 10px;\n}\n</style>\n```\n\n</docs>\n\n<script>\nimport { isLegacy32 } from '../../utils/legacy.ts'\nimport { logger } from '../../utils/logger.ts'\n\nexport default {\n\tname: 'NcButton',\n\n\tinject: {\n\t\tgetNcPopoverTriggerAttrs: {\n\t\t\tfrom: 'NcPopover:trigger:attrs',\n\t\t\tdefault: () => () => ({}),\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Set the text and icon alignment\n\t\t *\n\t\t * @default 'center'\n\t\t */\n\t\talignment: {\n\t\t\ttype: String,\n\t\t\tdefault: 'center',\n\t\t\tvalidator: (alignment) => ['start', 'start-reverse', 'center', 'center-reverse', 'end', 'end-reverse'].includes(alignment),\n\t\t},\n\n\t\t/**\n\t\t * Toggles the disabled state of the button on and off.\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 * Specify the button size\n\t\t * Accepted values: `'small'`, `'normal'` (default), `'large'`\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'normal',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'normal', 'large'].includes(value)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Specifies the HTML button type.\n\t\t * Accepted values: submit, reset, button.\n\t\t *\n\t\t * For legacy reasons this can also be used to set the variant of the button (color schema).\n\t\t * This is discouraged but the accepted values are:\n\t\t * primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary' (will change with v9)\n\t\t * @deprecated The behavior will change in v9 to only allow the native HTML button types - use `variant` instead for setting the appearance of the button.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t\t\t|| ['submit', 'reset', 'button'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button native type\n\t\t * Accepted values: submit, reset, button. If left empty,\n\t\t * the default \"button\" type will be used.\n\t\t *\n\t\t * @deprecated use `type` instead - will be removed with v9\n\t\t */\n\t\tnativeType: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['submit', 'reset', 'button'].indexOf(value) !== -1\n\t\t\t},\n\n\t\t\tdefault: 'button',\n\t\t},\n\n\t\t/**\n\t\t * Specifies whether the button should span all the available width.\n\t\t * By default, buttons span the whole width of the container.\n\t\t */\n\t\twide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Always try to provide an aria-label to your button. Make it more\n\t\t * specific than the button's name by provide some more context. E.g. if\n\t\t * the name of the button is \"send\" in the Mail app, the aria label could\n\t\t * be \"Send email\".\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Providing the href attribute turns the button component into an `a`\n\t\t * element.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Target for the `a` element if `href` is set.\n\t\t */\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\tdefault: '_self',\n\t\t},\n\n\t\t/**\n\t\t * Providing the download attribute with href downloads file when clicking.\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 * Providing the to attribute turns the button component into a `router-link`\n\t\t * element. Takes precedence over the href attribute.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Pass in `true` if you want the matching behaviour of `router-link` to\n\t\t * be non-inclusive: https://router.vuejs.org/api/#exact\n\t\t */\n\t\texact: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The pressed state of the button if it has a checked state\n\t\t * This will add the `aria-pressed` attribute and for the button to have the primary style in checked state.\n\t\t *\n\t\t * Pressed state is not supported for links\n\t\t */\n\t\tpressed: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button variant.\n\t\t *\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success.\n\t\t *\n\t\t * @default 'secondary'\n\t\t * @since 8.24.0\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(value)\n\t\t\t},\n\n\t\t\tdefault: 'secondary',\n\t\t},\n\t},\n\n\temits: ['update:pressed', 'click'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The real type to be used for the button, enforces `primary` for pressed state and, if stateful button, any other type for not pressed state\n\t\t * Otherwise the type property is used.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealVariant() {\n\t\t\t// Force *primary* when pressed\n\t\t\tif (this.pressed) {\n\t\t\t\treturn 'primary'\n\t\t\t}\n\t\t\t// If not pressed but button is configured as stateful button then the type must not be primary\n\t\t\tif (this.pressed === false && (this.type === 'primary' || this.variant === 'primary')) {\n\t\t\t\treturn 'secondary'\n\t\t\t}\n\t\t\t// handle legacy behavior\n\t\t\tif (this.type !== 'secondary' && ['primary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\t// otherwise use the configured variant\n\t\t\treturn this.variant\n\t\t},\n\n\t\t/**\n\t\t * The HTML button type\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\trealType() {\n\t\t\tif (typeof this.pressed === 'boolean') {\n\t\t\t\treturn 'button'\n\t\t\t}\n\t\t\t// Handle legacy behavior\n\t\t\tif (this.nativeType !== 'button') {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// Also handling legacy behavior: Ensure we do not conflict here\n\t\t\tif (['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].includes(this.type)) {\n\t\t\t\treturn this.nativeType\n\t\t\t}\n\t\t\t// otherwise use the type\n\t\t\treturn this.type\n\t\t},\n\n\t\t/**\n\t\t * The variant is one of the tertiary- ones\n\t\t */\n\t\tisTertiary() {\n\t\t\treturn this.realVariant.startsWith('tertiary')\n\t\t},\n\n\t\t/**\n\t\t * The flexbox alignment of the button content\n\t\t */\n\t\tflexAlignment() {\n\t\t\treturn this.alignment.split('-')[0]\n\t\t},\n\n\t\t/**\n\t\t * If the button content should be reversed (icon on the end)\n\t\t */\n\t\tisReverseAligned() {\n\t\t\treturn this.alignment.includes('-')\n\t\t},\n\n\t\tncPopoverTriggerAttrs() {\n\t\t\treturn this.getNcPopoverTriggerAttrs()\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\tconst hasText = !!this.$slots.default\n\t\tconst hasIcon = this.$slots?.icon\n\n\t\t/**\n\t\t * Always fill either the text prop or the ariaLabel one.\n\t\t */\n\t\tif (!hasText && !this.ariaLabel) {\n\t\t\tlogger.warn('You need to fill either the text or the ariaLabel props in the button component.', {\n\t\t\t\ttext: this.$slots.default?.[0]?.text,\n\t\t\t\tariaLabel: this.ariaLabel,\n\t\t\t\tinstance: this,\n\t\t\t})\n\t\t}\n\n\t\tconst isLink = (this.to || this.href)\n\n\t\tconst hasPressed = !isLink && typeof this.pressed === 'boolean'\n\n\t\tconst renderButton = ({ href, navigate, isActive, isExactActive } = {}) => h(\n\t\t\tisLink ? 'a' : 'button',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'button-vue',\n\t\t\t\t\t`button-vue--size-${this.size}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'button-vue--icon-only': hasIcon && !hasText,\n\t\t\t\t\t\t'button-vue--text-only': hasText && !hasIcon,\n\t\t\t\t\t\t'button-vue--icon-and-text': hasIcon && hasText,\n\t\t\t\t\t\t[`button-vue--vue-${this.realVariant}`]: this.realVariant,\n\t\t\t\t\t\t'button-vue--legacy': isLegacy32,\n\t\t\t\t\t\t'button-vue--tertiary': this.isTertiary,\n\t\t\t\t\t\t'button-vue--wide': this.wide,\n\t\t\t\t\t\t[`button-vue--${this.flexAlignment}`]: this.flexAlignment !== 'center',\n\t\t\t\t\t\t'button-vue--reverse': this.isReverseAligned,\n\t\t\t\t\t\tactive: isActive,\n\t\t\t\t\t\t'router-link-exact-active': isExactActive,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tattrs: {\n\t\t\t\t\t'aria-label': this.ariaLabel,\n\t\t\t\t\t'aria-pressed': hasPressed ? this.pressed.toString() : undefined,\n\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\ttype: isLink ? null : this.realType,\n\t\t\t\t\trole: isLink ? 'button' : null,\n\t\t\t\t\thref: this.to ? href : (this.href || null),\n\t\t\t\t\ttarget: isLink ? (this.target || '_self') : null,\n\t\t\t\t\trel: isLink ? 'nofollow noreferrer noopener' : null,\n\t\t\t\t\tdownload: (!this.to && this.href && this.download) ? this.download : null,\n\t\t\t\t\t// If this button is used as a popover trigger, we need to apply trigger attrs, e.g. aria attributes\n\t\t\t\t\t...this.ncPopoverTriggerAttrs,\n\t\t\t\t\t// Inherit all the component attrs\n\t\t\t\t\t...this.$attrs,\n\t\t\t\t},\n\t\t\t\ton: {\n\t\t\t\t\t...this.$listeners,\n\t\t\t\t\tclick: ($event) => {\n\t\t\t\t\t\tif (hasPressed) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Update the current pressed state of the button (if the `pressed` property was configured)\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @property {boolean} newValue The new `pressed`-state\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tthis.$emit('update:pressed', !this.pressed)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We have to both navigate and emit the click event\n\t\t\t\t\t\tthis.$emit('click', $event)\n\t\t\t\t\t\tnavigate?.($event)\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[\n\t\t\t\th('span', { class: 'button-vue__wrapper' }, [\n\t\t\t\t\thasIcon\n\t\t\t\t\t\t? h('span', {\n\t\t\t\t\t\t\t\tclass: 'button-vue__icon',\n\t\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\t\t'aria-hidden': 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}, [this.$slots.icon])\n\t\t\t\t\t\t: null,\n\t\t\t\t\thasText ? h('span', { class: 'button-vue__text' }, [this.$slots.default]) : null,\n\t\t\t\t]),\n\t\t\t],\n\t\t)\n\n\t\t// If we have a router-link, we wrap the button in it\n\t\tif (this.to) {\n\t\t\treturn h('router-link', {\n\t\t\t\tprops: {\n\t\t\t\t\tcustom: true,\n\t\t\t\t\tto: this.to,\n\t\t\t\t\texact: this.exact,\n\t\t\t\t},\n\t\t\t\tscopedSlots: {\n\t\t\t\t\tdefault: renderButton,\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t\t// Otherwise we simply return the button\n\t\treturn renderButton()\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n.button-vue {\n\t--button-size: var(--default-clickable-area);\n\t--button-inner-size: calc(var(--button-size) - 4px); // without the outer border\n\t--button-radius: var(--border-radius-element, calc(var(--button-size) / 2));\n\t--button-padding-default: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t--button-padding: var(--default-grid-baseline) var(--button-padding-default);\n\n\t// General styles\n\t// by default use secondary styling\n\tcolor: var(--color-primary-element-light-text);\n\tbackground-color: var(--color-primary-element-light);\n\tborder: 1px solid var(--color-primary-element-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--button-radius);\n\tbox-sizing: border-box;\n\t// adjust position and size\n\tposition: relative;\n\twidth: fit-content;\n\toverflow: hidden;\n\tpadding-block: 1px 0; // center the content as border is 1px top and 2px bottom\n\tpadding-inline: var(--button-padding);\n\tmin-height: var(--button-size);\n\tmin-width: var(--button-size);\n\t// display setup\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: 0.1s;\n\ttransition-timing-function: linear;\n\tcursor: pointer;\n\tfont-size: var(--default-font-size);\n\tfont-weight: bold;\n\n\t&--size-small {\n\t\t--button-size: var(--clickable-area-small, 24px);\n\t\t--button-radius: var(--border-radius); // make the border radius even smaller for small buttons\n\t}\n\n\t&--size-large {\n\t\t--button-size: var(--clickable-area-large, 48px);\n\t}\n\n\t// Cursor pointer on element and all children\n\t&,\n\t& :deep(*) {\n\t\tcursor: pointer;\n\t}\n\n\t// No outline feedback for focus. Handled with a toggled class in js (see data)\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t&:disabled {\n\t\tcursor: default;\n\t\topacity: $opacity_disabled;\n\t\t// Gives a wash out effect\n\t\tfilter: saturate($opacity_normal);\n\n\t\t& :deep(*) {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\t// Default button type\n\t&:hover:not(:disabled) {\n\t\tbackground-color: var(--color-primary-element-light-hover);\n\t}\n\n\t// Back to the default color for this button when active\n\t// TODO: add ripple effect\n\t&:active {\n\t\tbackground-color: var(--color-primary-element-light);\n\t}\n\n\t&__wrapper {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n\n\t&--end &__wrapper {\n\t\tjustify-content: end;\n\t}\n\t&--start &__wrapper {\n\t\tjustify-content: start;\n\t}\n\t&--reverse &__wrapper {\n\t\tflex-direction: row-reverse;\n\t}\n\n\t&--reverse#{&}--icon-and-text {\n\t\t--button-padding: var(--button-padding-default) var(--default-grid-baseline);\n\t}\n\n\t&__icon {\n\t\t--default-clickable-area: var(--button-inner-size); // ensure icons align with current button size\n\t\theight: var(--button-inner-size);\n\t\twidth: var(--button-inner-size);\n\t\tmin-height: var(--button-inner-size);\n\t\tmin-width: var(--button-inner-size);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n\n\t// For small buttons we need to adjust the icon size\n\t&--size-small &__icon {\n\t\t:deep(> *) {\n\t\t\tmax-height: 16px;\n\t\t\tmax-width: 16px;\n\t\t}\n\t\t:deep(svg) {\n\t\t\theight: 16px;\n\t\t\twidth: 16px;\n\t\t}\n\t}\n\n\t&__text {\n\t\tfont-weight: bold;\n\t\tmargin-bottom: 1px;\n\t\tpadding: 2px 0;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t// Icon-only button\n\t&--icon-only {\n\t\t--button-padding: clamp(var(--default-grid-baseline), var(--button-radius), calc(var(--default-grid-baseline) * 4));\n\t\tline-height: 1;\n\t\twidth: var(--button-size) !important;\n\t}\n\n\t// Text-only button\n\t&--text-only {\n\t\t--button-padding: var(--button-padding-default);\n\n\t\t& .button-vue__text {\n\t\t\tmargin-inline: 4px;\n\t\t}\n\t}\n\n\t// Wide button spans the whole width of the container\n\t&--wide {\n\t\twidth: 100%;\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid var(--color-main-text) !important;\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background) !important;\n\t\t&.button-vue--vue-tertiary-on-primary {\n\t\t\toutline: 2px solid var(--color-primary-element-text);\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius));\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Button types\n\n\t// Primary\n\t&--vue-primary {\n\t\tbackground-color: var(--color-primary-element);\n\t\tborder-color: var(--color-primary-element-hover);\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-element);\n\t\t}\n\t}\n\n\t// Secondary\n\t&--vue-secondary {\n\t\tbackground-color: var(--color-primary-element-light);\n\t\tborder-color: var(--color-primary-element-light-hover);\n\t\tcolor: var(--color-primary-element-light-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tcolor: var(--color-primary-element-light-text);\n\t\t\tbackground-color: var(--color-primary-element-light-hover);\n\t\t}\n\t}\n\n\t// Tertiary\n\t&--tertiary,\n\t&--vue-tertiary {\n\t\tbackground-color: transparent;\n\t\tborder-color: transparent;\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Tertiary, no background\n\t&--vue-tertiary-no-background {\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Tertiary on primary color (like the header)\n\t&--vue-tertiary-on-primary {\n\t\tcolor: var(--color-primary-element-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: transparent;\n\t\t}\n\t}\n\n\t// Success\n\t&--vue-success {\n\t\tbackground-color: var(--color-success);\n\t\tborder-color: var(--color-success-hover);\n\t\tcolor: var(--color-success-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-success-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// : add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-success);\n\t\t}\n\t}\n\n\t// Warning\n\t&--vue-warning {\n\t\tbackground-color: var(--color-warning);\n\t\tborder-color: var(--color-warning-hover);\n\t\tcolor: var(--color-warning-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-warning-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-warning);\n\t\t}\n\t}\n\n\t// Error\n\t&--vue-error {\n\t\tbackground-color: var(--color-error);\n\t\tborder-color: var(--color-error-hover);\n\t\tcolor: var(--color-error-text);\n\n\t\t&:hover:not(:disabled) {\n\t\t\tbackground-color: var(--color-error-hover);\n\t\t}\n\t\t// Back to the default color for this button when active\n\t\t// TODO: add ripple effect\n\t\t&:active {\n\t\t\tbackground-color: var(--color-error);\n\t\t}\n\t}\n\n\t// before Nextcloud 32\n\t&--legacy {\n\t\t--button-inner-size: var(--button-size);\n\t\tborder: none;\n\t\tpadding-block: 0;\n\n\t\t&.button-vue--vue-error,\n\t\t&.button-vue--vue-success,\n\t\t&.button-vue--vue-warning {\n\t\t\tcolor: white;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["logger","isLegacy32"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0aA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,OAAA;IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,cAAA,CAAA,SAAA,iBAAA,UAAA,kBAAA,OAAA,aAAA,EAAA,SAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,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AAA,aAAA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
|
package/dist/chunks/{NcCheckboxRadioSwitch-yVj7slxL.cjs → NcCheckboxRadioSwitch-CDFUoj2J.cjs}
RENAMED
|
@@ -3,8 +3,8 @@ require('../assets/NcCheckboxRadioSwitch-BcHKt-lf.css');
|
|
|
3
3
|
const Vue = require("vue");
|
|
4
4
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
5
5
|
const Components_NcLoadingIcon = require("../Components/NcLoadingIcon.cjs");
|
|
6
|
-
const useModelMigration = require("./useModelMigration-
|
|
7
|
-
const _l10n = require("./_l10n-
|
|
6
|
+
const useModelMigration = require("./useModelMigration-HPf30klj.cjs");
|
|
7
|
+
const _l10n = require("./_l10n-9b4TMo5Q.cjs");
|
|
8
8
|
const GenRandomId = require("./GenRandomId-D7iOvpZS.cjs");
|
|
9
9
|
const useNcRadioGroup = require("./useNcRadioGroup-Djvu7bo0.cjs");
|
|
10
10
|
const _sfc_main$8 = {
|
|
@@ -553,18 +553,18 @@ const __default__ = {
|
|
|
553
553
|
],
|
|
554
554
|
setup(props) {
|
|
555
555
|
const radioGroup = useNcRadioGroup.useInsideRadioGroup();
|
|
556
|
-
const internalType = Vue.computed(() => radioGroup
|
|
557
|
-
Vue.onMounted(() => radioGroup
|
|
556
|
+
const internalType = Vue.computed(() => (radioGroup == null ? void 0 : radioGroup.value) ? TYPE_RADIO : props.type);
|
|
557
|
+
Vue.onMounted(() => radioGroup == null ? void 0 : radioGroup.value.register(false));
|
|
558
558
|
const model = useModelMigration.useModelMigration("checked", "update:checked");
|
|
559
559
|
const internalModelValue = Vue.computed({
|
|
560
560
|
get() {
|
|
561
|
-
if (radioGroup
|
|
561
|
+
if (radioGroup == null ? void 0 : radioGroup.value) {
|
|
562
562
|
return radioGroup.value.modelValue;
|
|
563
563
|
}
|
|
564
564
|
return model.value;
|
|
565
565
|
},
|
|
566
566
|
set(value) {
|
|
567
|
-
if (radioGroup
|
|
567
|
+
if (radioGroup == null ? void 0 : radioGroup.value) {
|
|
568
568
|
radioGroup.value.onUpdate(value);
|
|
569
569
|
} else {
|
|
570
570
|
model.value = value;
|
|
@@ -728,7 +728,7 @@ var _sfc_render = function render9() {
|
|
|
728
728
|
"checkbox-radio-switch--button-variant-v-grouped": _vm.buttonVariant && _vm.buttonVariantGrouped === "vertical",
|
|
729
729
|
"checkbox-radio-switch--button-variant-h-grouped": _vm.buttonVariant && _vm.buttonVariantGrouped === "horizontal",
|
|
730
730
|
"button-vue": _vm.isButtonType
|
|
731
|
-
}, attrs: { "id": _vm.wrapperId, "aria-label": _vm.isButtonType && _vm.ariaLabel ? _vm.ariaLabel : void 0, "type": _vm.isButtonType ? "button" : null } }, "component", _vm.isButtonType ? _vm.$attrs : _vm.dataAttrs, false), _vm.isButtonType ? _vm.listeners : null), [!_vm.isButtonType ? _c("input", _vm._g(_vm._b({ staticClass: "checkbox-radio-switch__input", attrs: { "id": _vm.id, "aria-labelledby": !_vm.isButtonType && !_vm.ariaLabel ? _vm.labelId : null, "aria-describedby": !_vm.isButtonType && (_vm.description || _vm.$slots.description) ? _vm.descriptionId : _vm.nonDataAttrs["aria-describedby"], "aria-label": _vm.ariaLabel || void 0, "disabled": _vm.disabled, "type": _vm.inputType, "required": _vm.required, "name": _vm.name }, domProps: { "value": _vm.value, "checked": _vm.isChecked, "indeterminate": _vm.hasIndeterminate ? _vm.indeterminate : null } }, "input", _vm.nonDataAttrs, false), _vm.listeners)) : _vm._e(), _c("NcCheckboxContent", { staticClass: "checkbox-radio-switch__content", attrs: { "id": !_vm.isButtonType ?
|
|
731
|
+
}, attrs: { "id": _vm.wrapperId, "aria-label": _vm.isButtonType && _vm.ariaLabel ? _vm.ariaLabel : void 0, "type": _vm.isButtonType ? "button" : null } }, "component", _vm.isButtonType ? _vm.$attrs : _vm.dataAttrs, false), _vm.isButtonType ? _vm.listeners : null), [!_vm.isButtonType ? _c("input", _vm._g(_vm._b({ staticClass: "checkbox-radio-switch__input", attrs: { "id": _vm.id, "aria-labelledby": !_vm.isButtonType && !_vm.ariaLabel ? _vm.labelId : null, "aria-describedby": !_vm.isButtonType && (_vm.description || _vm.$slots.description) ? _vm.descriptionId : _vm.nonDataAttrs["aria-describedby"], "aria-label": _vm.ariaLabel || void 0, "disabled": _vm.disabled, "type": _vm.inputType, "required": _vm.required, "name": _vm.name }, domProps: { "value": _vm.value, "checked": _vm.isChecked, "indeterminate": _vm.hasIndeterminate ? _vm.indeterminate : null } }, "input", _vm.nonDataAttrs, false), _vm.listeners)) : _vm._e(), _c("NcCheckboxContent", { staticClass: "checkbox-radio-switch__content", attrs: { "id": !_vm.isButtonType ? "".concat(_vm.id, "-label") : void 0, "icon-class": "checkbox-radio-switch__icon", "text-class": "checkbox-radio-switch__text", "type": _vm.internalType, "indeterminate": _vm.hasIndeterminate ? _vm.indeterminate : false, "button-variant": _vm.buttonVariant, "is-checked": _vm.isChecked, "loading": _vm.loading, "label-id": _vm.labelId, "description-id": _vm.descriptionId, "icon-size": _vm.iconSize }, nativeOn: { "click": function($event) {
|
|
732
732
|
return _vm.onToggle.apply(null, arguments);
|
|
733
733
|
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
734
734
|
return [_vm._t("icon")];
|
|
@@ -749,4 +749,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
749
749
|
);
|
|
750
750
|
const NcCheckboxRadioSwitch = __component__.exports;
|
|
751
751
|
exports.NcCheckboxRadioSwitch = NcCheckboxRadioSwitch;
|
|
752
|
-
//# sourceMappingURL=NcCheckboxRadioSwitch-
|
|
752
|
+
//# sourceMappingURL=NcCheckboxRadioSwitch-CDFUoj2J.cjs.map
|