@nextcloud/vue 8.22.0 → 8.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/README.md +71 -65
- 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/NcActionCaption.cjs +2 -2
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +2 -2
- package/dist/Components/NcActionCaption.mjs.map +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 +1 -1
- package/dist/Components/NcActionLink.mjs +1 -1
- package/dist/Components/NcActionRadio.cjs +1 -1
- package/dist/Components/NcActionRadio.mjs +1 -1
- package/dist/Components/NcActionRouter.cjs +1 -1
- package/dist/Components/NcActionRouter.mjs +1 -1
- package/dist/Components/NcActionText.cjs +1 -1
- package/dist/Components/NcActionText.mjs +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +1 -1
- package/dist/Components/NcActions.mjs +1 -1
- package/dist/Components/NcAppContent.cjs +1 -1
- package/dist/Components/NcAppContent.mjs +1 -1
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationCaption.cjs +1 -1
- package/dist/Components/NcAppNavigationCaption.mjs +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +1 -1
- package/dist/Components/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/NcAppSidebar.cjs +1 -1
- package/dist/Components/NcAppSidebar.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 +2 -2
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +2 -2
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
- package/dist/Components/NcChip.cjs +3 -3
- package/dist/Components/NcChip.mjs +3 -3
- 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/NcDateTime.cjs +1 -1
- package/dist/Components/NcDateTime.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +5 -5
- package/dist/Components/NcDateTimePicker.mjs +5 -5
- package/dist/Components/NcDateTimePickerNative.cjs +22 -18
- package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +22 -18
- 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/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcHeaderButton.cjs +2 -2
- package/dist/Components/NcHeaderButton.cjs.map +1 -1
- package/dist/Components/NcHeaderButton.mjs +2 -2
- package/dist/Components/NcHeaderButton.mjs.map +1 -1
- package/dist/Components/NcHeaderMenu.cjs +1 -1
- package/dist/Components/NcHeaderMenu.mjs +1 -1
- package/dist/Components/NcInputField.cjs +1 -1
- package/dist/Components/NcInputField.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 +50 -20
- package/dist/Components/NcModal.cjs.map +1 -1
- package/dist/Components/NcModal.mjs +51 -21
- package/dist/Components/NcModal.mjs.map +1 -1
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcPopover.cjs +1 -1
- package/dist/Components/NcPopover.mjs +1 -1
- package/dist/Components/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 +2 -2
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +1 -1
- package/dist/Components/NcSelect.mjs +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextField.cjs +1 -1
- package/dist/Components/NcTextField.mjs +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Components/NcUserStatusIcon.cjs +1 -1
- package/dist/Components/NcUserStatusIcon.mjs +1 -1
- package/dist/Directives/Linkify.cjs +14 -2
- package/dist/Directives/Linkify.cjs.map +1 -1
- package/dist/Directives/Linkify.mjs +11 -1
- package/dist/Directives/Linkify.mjs.map +1 -1
- package/dist/Functions/reference.cjs +1 -1
- package/dist/Functions/reference.mjs +1 -1
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/richEditor.cjs +1 -2
- package/dist/Mixins/richEditor.cjs.map +1 -1
- package/dist/Mixins/richEditor.mjs +1 -2
- package/dist/Mixins/richEditor.mjs.map +1 -1
- package/dist/assets/{NcActionButton-BT4157Cp.css → NcActionButton-BYN2SUN0.css} +4 -2
- package/dist/assets/{NcActionCaption-JVhz4Wp7.css → NcActionCaption-BNDtcWJ7.css} +4 -4
- package/dist/assets/{NcActionCheckbox-DeW2CCVc.css → NcActionCheckbox-Dan0EvGm.css} +18 -18
- package/dist/assets/{NcActionInput-CNRERfyh.css → NcActionInput-Dz21fyVD.css} +69 -65
- package/dist/assets/{NcActionLink-BNtI-AlZ.css → NcActionLink-BG9B9dP4.css} +4 -2
- package/dist/assets/{NcActionRadio-DC7Wp9rR.css → NcActionRadio-C87waXE-.css} +18 -18
- package/dist/assets/{NcActionRouter-As2g7t6k.css → NcActionRouter-BAGuUfFu.css} +4 -2
- package/dist/assets/{NcActionText-NhGjKgRO.css → NcActionText-Cjp26Bn0.css} +4 -2
- package/dist/assets/{NcActionTextEditable-Cg16Q4zr.css → NcActionTextEditable-1TXeJ5zp.css} +68 -64
- package/dist/assets/{NcActions-DM_LoRlx.css → NcActions-C4SuFczn.css} +12 -15
- package/dist/assets/{NcAppContent-CsPEhdzg.css → NcAppContent-BO0ksFwD.css} +19 -19
- package/dist/assets/{NcAppNavigationCaption-Dt5K_hKD.css → NcAppNavigationCaption-DU9PxTvu.css} +9 -9
- package/dist/assets/{NcAppNavigationItem-DIv6Iu_R.css → NcAppNavigationItem-lh9Say1M.css} +9 -9
- package/dist/assets/{NcAppNavigationNewItem-CQ1f40wK.css → NcAppNavigationNewItem-fUP3wQTQ.css} +37 -37
- package/dist/assets/{NcAppNavigationSettings-BV_QS8jh.css → NcAppNavigationSettings-vd47rlNY.css} +14 -14
- package/dist/assets/{NcAvatar-DstXjzVh.css → NcAvatar-CcJlFpcI.css} +25 -25
- package/dist/assets/{NcButton-BHDLon1_.css → NcButton-CfOAX-eQ.css} +47 -47
- package/dist/assets/{NcColorPicker-Dw2wy2tU.css → NcColorPicker-C1DuuANb.css} +28 -28
- package/dist/assets/{NcCounterBubble-DdYmHnng.css → NcCounterBubble-CI-DxLjL.css} +7 -7
- package/dist/assets/{NcDateTimePicker-BmtdlJm4.css → NcDateTimePicker-BtV9Fz-n.css} +22 -17
- package/dist/assets/NcDateTimePickerNative-DVGEymgr.css +60 -0
- package/dist/assets/{NcEmojiPicker-BNCW1Q94.css → NcEmojiPicker-rk5qcSl7.css} +75 -57
- package/dist/assets/{NcHeaderButton-DH4Qtw3P.css → NcHeaderButton-BPkJ5wxD.css} +7 -7
- package/dist/assets/{NcHeaderMenu-C2XbJMYL.css → NcHeaderMenu-BYjnMPPl.css} +11 -11
- package/dist/assets/{NcInputField-CUsdr7lV.css → NcInputField-CzryIHRa.css} +32 -32
- package/dist/assets/{NcListItem-DQ2Dk7jn.css → NcListItem-GE5S37TT.css} +48 -47
- package/dist/assets/{NcMentionBubble-Bt71nB8X.css → NcMentionBubble-BL05HUeF.css} +12 -13
- package/dist/assets/{NcModal-IUKZfPNs.css → NcModal-ZfCDJxwd.css} +63 -61
- package/dist/assets/{NcPasswordField-B0VbIU2n.css → NcPasswordField-whtKJFcB.css} +2 -2
- package/dist/assets/{NcPopover-TS4CW9MJ.css → NcPopover-DpakVVxI.css} +16 -5
- package/dist/assets/{NcRelatedResourcesPanel-DIhZx6lY.css → NcRelatedResourcesPanel-DSf7TVcC.css} +14 -14
- package/dist/assets/{NcRichContenteditable-DoDTb8p_.css → NcRichContenteditable-BV6g3dmd.css} +41 -39
- package/dist/assets/NcRichText-zt8ALFHi.css +323 -0
- package/dist/assets/{NcUserBubble-CNid1YOT.css → NcUserBubble-BsTKRhKz.css} +11 -11
- package/dist/assets/{referencePickerModal-BhhuyO3J.css → referencePickerModal-CTumspFH.css} +46 -46
- package/dist/chunks/{GenColors-l51faA-J.mjs → GenColors-DfwXw1-o.mjs} +1 -1
- package/dist/chunks/{GenColors-l51faA-J.mjs.map → GenColors-DfwXw1-o.mjs.map} +1 -1
- package/dist/chunks/{GenColors-NLLtT2OM.cjs → GenColors-Di5GSft7.cjs} +1 -1
- package/dist/chunks/{GenColors-NLLtT2OM.cjs.map → GenColors-Di5GSft7.cjs.map} +1 -1
- package/dist/chunks/{NcActionButton-82_1gdid.mjs → NcActionButton-CEysTg4c.mjs} +1 -1
- package/dist/chunks/{NcActionButton-82_1gdid.mjs.map → NcActionButton-CEysTg4c.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-DHOce_KX.cjs → NcActionButton-DcpUnqA7.cjs} +1 -1
- package/dist/chunks/{NcActionButton-DHOce_KX.cjs.map → NcActionButton-DcpUnqA7.cjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BSh2wd9F.mjs → NcActionButtonGroup-3v-qy9C0.mjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-BSh2wd9F.mjs.map → NcActionButtonGroup-3v-qy9C0.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-MCHURlnG.cjs → NcActionButtonGroup-x6D7S13W.cjs} +1 -1
- package/dist/chunks/{NcActionButtonGroup-MCHURlnG.cjs.map → NcActionButtonGroup-x6D7S13W.cjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-C_wvm9IO.mjs → NcActionCheckbox-BnL71Qmi.mjs} +2 -2
- package/dist/chunks/{NcActionCheckbox-C_wvm9IO.mjs.map → NcActionCheckbox-BnL71Qmi.mjs.map} +1 -1
- package/dist/chunks/{NcActionCheckbox-DwU16qcU.cjs → NcActionCheckbox-Dd5Y6f63.cjs} +2 -2
- package/dist/chunks/{NcActionCheckbox-DwU16qcU.cjs.map → NcActionCheckbox-Dd5Y6f63.cjs.map} +1 -1
- package/dist/chunks/{NcActionInput-D1yrXgXY.mjs → NcActionInput-BAM8T3gm.mjs} +6 -6
- package/dist/chunks/{NcActionInput-D1yrXgXY.mjs.map → NcActionInput-BAM8T3gm.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-DlLBUp3P.cjs → NcActionInput-VR510EDJ.cjs} +6 -6
- package/dist/chunks/{NcActionInput-DlLBUp3P.cjs.map → NcActionInput-VR510EDJ.cjs.map} +1 -1
- package/dist/chunks/{NcActionRadio-vHwjWOHS.cjs → NcActionRadio-BQ0jAh5V.cjs} +16 -8
- package/dist/chunks/NcActionRadio-BQ0jAh5V.cjs.map +1 -0
- package/dist/chunks/{NcActionRadio-Dl6W62Vm.mjs → NcActionRadio-CCTupqRR.mjs} +14 -8
- package/dist/chunks/NcActionRadio-CCTupqRR.mjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-97R7dFen.cjs → NcActionTextEditable-C-ZP8_Tn.cjs} +8 -4
- package/dist/chunks/NcActionTextEditable-C-ZP8_Tn.cjs.map +1 -0
- package/dist/chunks/{NcActionTextEditable-DZCFtqIP.mjs → NcActionTextEditable-JRD-G0CT.mjs} +8 -4
- package/dist/chunks/NcActionTextEditable-JRD-G0CT.mjs.map +1 -0
- package/dist/chunks/{NcActions-BVdJOuja.mjs → NcActions-D3hGxwlc.mjs} +5 -30
- package/dist/chunks/{NcActions-Vrs_fNJp.cjs.map → NcActions-D3hGxwlc.mjs.map} +1 -1
- package/dist/chunks/{NcActions-Vrs_fNJp.cjs → NcActions-DTICeoTz.cjs} +5 -30
- package/dist/chunks/{NcActions-BVdJOuja.mjs.map → NcActions-DTICeoTz.cjs.map} +1 -1
- package/dist/chunks/{NcAppContent-BuY1ebnE.mjs → NcAppContent-BKQ-H04y.mjs} +14 -5
- package/dist/chunks/NcAppContent-BKQ-H04y.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-BhXzPGUR.cjs → NcAppContent-BOt6_YA7.cjs} +14 -5
- package/dist/chunks/NcAppContent-BOt6_YA7.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-Dgg_3EFP.mjs → NcAppNavigation-B_92V8o3.mjs} +1 -1
- package/dist/chunks/{NcAppNavigation-Dgg_3EFP.mjs.map → NcAppNavigation-B_92V8o3.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-3qOqHlZL.cjs → NcAppNavigation-D7W-4cVo.cjs} +1 -1
- package/dist/chunks/{NcAppNavigation-3qOqHlZL.cjs.map → NcAppNavigation-D7W-4cVo.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-BXzy7pSk.mjs → NcAppNavigationCaption-B3w692fN.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-BXzy7pSk.mjs.map → NcAppNavigationCaption-B3w692fN.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-BsR_h0__.cjs → NcAppNavigationCaption-BDqTyLIj.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationCaption-BsR_h0__.cjs.map → NcAppNavigationCaption-BDqTyLIj.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-C8Qq4tF5.mjs → NcAppNavigationItem-CpcFOmJR.mjs} +6 -6
- package/dist/chunks/NcAppNavigationItem-CpcFOmJR.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationItem-boljzMEm.cjs → NcAppNavigationItem-DL9OwWo-.cjs} +6 -6
- package/dist/chunks/NcAppNavigationItem-DL9OwWo-.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNewItem-DVPBJE3U.cjs → NcAppNavigationNewItem-BaKxxZqt.cjs} +3 -3
- package/dist/chunks/{NcAppNavigationNewItem-DVPBJE3U.cjs.map → NcAppNavigationNewItem-BaKxxZqt.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-B_xMcFfc.mjs → NcAppNavigationNewItem-BvQaVuL6.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationNewItem-B_xMcFfc.mjs.map → NcAppNavigationNewItem-BvQaVuL6.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-BcTPJyAH.cjs → NcAppNavigationSearch-Q0eMy5I2.cjs} +2 -2
- package/dist/chunks/{NcAppNavigationSearch-BcTPJyAH.cjs.map → NcAppNavigationSearch-Q0eMy5I2.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-C_TVvxZh.mjs → NcAppNavigationSearch-gytpBKme.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationSearch-C_TVvxZh.mjs.map → NcAppNavigationSearch-gytpBKme.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-CST0dabX.mjs → NcAppNavigationSettings-CZFm1d-N.mjs} +4 -5
- package/dist/chunks/{NcAppNavigationSettings-CST0dabX.mjs.map → NcAppNavigationSettings-CZFm1d-N.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-DO0f3tDe.cjs → NcAppNavigationSettings-CwwmvKYV.cjs} +4 -5
- package/dist/chunks/{NcAppNavigationSettings-DO0f3tDe.cjs.map → NcAppNavigationSettings-CwwmvKYV.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DC1ueYFW.cjs → NcAppNavigationToggle-Br1hcFGt.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-DC1ueYFW.cjs.map → NcAppNavigationToggle-Br1hcFGt.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-CyRacXd1.mjs → NcAppNavigationToggle-Pr8bEpDs.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-CyRacXd1.mjs.map → NcAppNavigationToggle-Pr8bEpDs.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-BW0P_DJq.mjs → NcAppSettingsDialog-JPB-srka.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsDialog-BW0P_DJq.mjs.map → NcAppSettingsDialog-JPB-srka.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-CcCa2tJf.cjs → NcAppSettingsDialog-z9v6V6ye.cjs} +2 -2
- package/dist/chunks/{NcAppSettingsDialog-CcCa2tJf.cjs.map → NcAppSettingsDialog-z9v6V6ye.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-Dq-zojSu.cjs → NcAppSidebar-BY33yoNX.cjs} +3 -3
- package/dist/chunks/{NcAppSidebar-Dq-zojSu.cjs.map → NcAppSidebar-BY33yoNX.cjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BC_h_duv.mjs → NcAppSidebar-cEQy8s50.mjs} +3 -3
- package/dist/chunks/{NcAppSidebar-BC_h_duv.mjs.map → NcAppSidebar-cEQy8s50.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-CT6DLUhQ.mjs → NcAvatar-BjwyJw34.mjs} +11 -12
- package/dist/chunks/NcAvatar-BjwyJw34.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-D4E0ptkW.cjs → NcAvatar-CQtsmbBW.cjs} +11 -12
- package/dist/chunks/NcAvatar-CQtsmbBW.cjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-B0-rwsl8.cjs → NcBreadcrumb-DrlhnNbV.cjs} +1 -1
- package/dist/chunks/{NcBreadcrumb-B0-rwsl8.cjs.map → NcBreadcrumb-DrlhnNbV.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-LVdLi11j.mjs → NcBreadcrumb-GHiD-Sw7.mjs} +1 -1
- package/dist/chunks/{NcBreadcrumb-LVdLi11j.mjs.map → NcBreadcrumb-GHiD-Sw7.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-C1L5IrRV.cjs → NcBreadcrumbs-Cde4tv8l.cjs} +3 -3
- package/dist/chunks/{NcBreadcrumbs-C1L5IrRV.cjs.map → NcBreadcrumbs-Cde4tv8l.cjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-BiRI0VOa.mjs → NcBreadcrumbs-D0Hhym9A.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumbs-BiRI0VOa.mjs.map → NcBreadcrumbs-D0Hhym9A.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Dm_27r-z.mjs → NcCheckboxRadioSwitch-CCuKA55c.mjs} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Dm_27r-z.mjs.map → NcCheckboxRadioSwitch-CCuKA55c.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-DP-rnk4f.cjs → NcCheckboxRadioSwitch-RjEq0SqY.cjs} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-DP-rnk4f.cjs.map → NcCheckboxRadioSwitch-RjEq0SqY.cjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-C4JoCivp.mjs → NcCollectionList-BNxu1MWE.mjs} +5 -5
- package/dist/chunks/{NcCollectionList-C4JoCivp.mjs.map → NcCollectionList-BNxu1MWE.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-tLuZ9fZk.cjs → NcCollectionList-fyDi2W_B.cjs} +5 -5
- package/dist/chunks/{NcCollectionList-tLuZ9fZk.cjs.map → NcCollectionList-fyDi2W_B.cjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-rWet3ND8.cjs → NcColorPicker-CTQlyVCL.cjs} +23 -18
- package/dist/chunks/NcColorPicker-CTQlyVCL.cjs.map +1 -0
- package/dist/chunks/{NcColorPicker-CODhE5KL.mjs → NcColorPicker-ph8Nubq7.mjs} +23 -18
- package/dist/chunks/NcColorPicker-ph8Nubq7.mjs.map +1 -0
- package/dist/chunks/{NcContent-CmCMVNVu.cjs → NcContent-CJNhr5lF.cjs} +1 -1
- package/dist/chunks/{NcContent-CmCMVNVu.cjs.map → NcContent-CJNhr5lF.cjs.map} +1 -1
- package/dist/chunks/{NcContent-D7q7hI8k.mjs → NcContent-RlppaZCX.mjs} +1 -1
- package/dist/chunks/{NcContent-D7q7hI8k.mjs.map → NcContent-RlppaZCX.mjs.map} +1 -1
- package/dist/chunks/{NcCounterBubble-DF2rwIo4.cjs → NcCounterBubble-BRrUO34D.cjs} +19 -8
- package/dist/chunks/{NcCounterBubble-DF2rwIo4.cjs.map → NcCounterBubble-BRrUO34D.cjs.map} +1 -1
- package/dist/chunks/{NcCounterBubble-M1q9GRkH.mjs → NcCounterBubble-CDfRYl8B.mjs} +19 -8
- package/dist/chunks/{NcCounterBubble-M1q9GRkH.mjs.map → NcCounterBubble-CDfRYl8B.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-DND0u_84.cjs → NcDashboardWidget-CirRHHmT.cjs} +3 -3
- package/dist/chunks/{NcDashboardWidget-DND0u_84.cjs.map → NcDashboardWidget-CirRHHmT.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-CU5MNmVJ.mjs → NcDashboardWidget-Dg12xu50.mjs} +3 -3
- package/dist/chunks/{NcDashboardWidget-CU5MNmVJ.mjs.map → NcDashboardWidget-Dg12xu50.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-DXmFRgPS.cjs → NcDashboardWidgetItem-COONyn0g.cjs} +3 -3
- package/dist/chunks/{NcDashboardWidgetItem-DXmFRgPS.cjs.map → NcDashboardWidgetItem-COONyn0g.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-D_LnB3eD.mjs → NcDashboardWidgetItem-DZGooEwA.mjs} +3 -3
- package/dist/chunks/{NcDashboardWidgetItem-D_LnB3eD.mjs.map → NcDashboardWidgetItem-DZGooEwA.mjs.map} +1 -1
- package/dist/chunks/{NcDateTime-DCay1-XL.cjs → NcDateTime-AFZif5Dn.cjs} +1 -1
- package/dist/chunks/{NcDateTime-DCay1-XL.cjs.map → NcDateTime-AFZif5Dn.cjs.map} +1 -1
- package/dist/chunks/{NcDateTime-rpYgoLDg.mjs → NcDateTime-DBZ-vBfi.mjs} +1 -1
- package/dist/chunks/{NcDateTime-rpYgoLDg.mjs.map → NcDateTime-DBZ-vBfi.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-CGqOzNXp.mjs → NcDialog-I_9fyJVt.mjs} +1 -1
- package/dist/chunks/{NcDialog-CGqOzNXp.mjs.map → NcDialog-I_9fyJVt.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-CBQgMh0l.cjs → NcDialog-mcbLFc8o.cjs} +1 -1
- package/dist/chunks/{NcDialog-CBQgMh0l.cjs.map → NcDialog-mcbLFc8o.cjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-C2I08MyR.mjs → NcDialogButton-DuJ3lE7e.mjs} +1 -1
- package/dist/chunks/{NcDialogButton-C2I08MyR.mjs.map → NcDialogButton-DuJ3lE7e.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton-F6xUMopP.cjs → NcDialogButton-FLqQdVLb.cjs} +1 -1
- package/dist/chunks/{NcDialogButton-F6xUMopP.cjs.map → NcDialogButton-FLqQdVLb.cjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-DrJqoYXz.cjs → NcEmojiPicker-B1ot5iNB.cjs} +69 -42
- package/dist/chunks/NcEmojiPicker-B1ot5iNB.cjs.map +1 -0
- package/dist/chunks/{NcEmojiPicker-CUVGh_eA.mjs → NcEmojiPicker-DDCgW2zQ.mjs} +69 -42
- package/dist/chunks/NcEmojiPicker-DDCgW2zQ.mjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-CzS2doDR.cjs → NcHeaderMenu-BaHhnhN0.cjs} +3 -4
- package/dist/chunks/NcHeaderMenu-BaHhnhN0.cjs.map +1 -0
- package/dist/chunks/{NcHeaderMenu-vLqcJ-_w.mjs → NcHeaderMenu-CLcpStap.mjs} +3 -4
- package/dist/chunks/NcHeaderMenu-CLcpStap.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-C6zlmXZ4.mjs → NcInputConfirmCancel-C7a7Nha7.mjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-C6zlmXZ4.mjs.map → NcInputConfirmCancel-C7a7Nha7.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-C8hLDujR.cjs → NcInputConfirmCancel-XzKuYi6L.cjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-C8hLDujR.cjs.map → NcInputConfirmCancel-XzKuYi6L.cjs.map} +1 -1
- package/dist/chunks/{NcInputField-ixTTHy3h.mjs → NcInputField-CU5a68Pc.mjs} +6 -7
- package/dist/chunks/NcInputField-CU5a68Pc.mjs.map +1 -0
- package/dist/chunks/{NcInputField-CbBdbdE8.cjs → NcInputField-DkhKrb8k.cjs} +6 -7
- package/dist/chunks/NcInputField-DkhKrb8k.cjs.map +1 -0
- package/dist/chunks/{NcListItem-P2z7dcyT.mjs → NcListItem-3e1MminS.mjs} +4 -4
- package/dist/chunks/{NcListItem-P2z7dcyT.mjs.map → NcListItem-3e1MminS.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-B5pTDywA.cjs → NcListItem-9w7m2lJ_.cjs} +4 -4
- package/dist/chunks/{NcListItem-B5pTDywA.cjs.map → NcListItem-9w7m2lJ_.cjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-B1wOr_AY.mjs → NcListItemIcon-7x7iDHYw.mjs} +2 -3
- package/dist/chunks/{NcListItemIcon-B1wOr_AY.mjs.map → NcListItemIcon-7x7iDHYw.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-CC-LU_U9.cjs → NcListItemIcon-pOj8Vr2H.cjs} +2 -3
- package/dist/chunks/{NcListItemIcon-CC-LU_U9.cjs.map → NcListItemIcon-pOj8Vr2H.cjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-D5Td9dcg.cjs → NcPasswordField-BS6bkHtv.cjs} +10 -6
- package/dist/chunks/NcPasswordField-BS6bkHtv.cjs.map +1 -0
- package/dist/chunks/{NcPasswordField-CZ94k5WH.mjs → NcPasswordField-Dpu9nI6h.mjs} +10 -6
- package/dist/chunks/NcPasswordField-Dpu9nI6h.mjs.map +1 -0
- package/dist/chunks/{NcPopover-MxwUgZu1.cjs → NcPopover-BKlH1mbx.cjs} +12 -13
- package/dist/chunks/NcPopover-BKlH1mbx.cjs.map +1 -0
- package/dist/chunks/{NcPopover-DzYbNu-I.mjs → NcPopover-DFCPlZpS.mjs} +12 -13
- package/dist/chunks/NcPopover-DFCPlZpS.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-BXztrC3l.cjs → NcRelatedResourcesPanel-BrkyIR3v.cjs} +8 -3
- package/dist/chunks/NcRelatedResourcesPanel-BrkyIR3v.cjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-DfYwqMxA.mjs → NcRelatedResourcesPanel-C6JIVMvN.mjs} +8 -3
- package/dist/chunks/NcRelatedResourcesPanel-C6JIVMvN.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-DS0VWcxG.mjs → NcRichContenteditable-3kkU0Uxu.mjs} +20 -20
- package/dist/chunks/NcRichContenteditable-3kkU0Uxu.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-fuOTy1W6.cjs → NcRichContenteditable-DJy0zZXx.cjs} +20 -20
- package/dist/chunks/NcRichContenteditable-DJy0zZXx.cjs.map +1 -0
- package/dist/chunks/{NcRichText-DA8kGDfO.mjs → NcRichText-C8SjsRK8.mjs} +29 -42
- package/dist/chunks/NcRichText-C8SjsRK8.mjs.map +1 -0
- package/dist/chunks/{NcRichText-B1WT1pJp.cjs → NcRichText-Ci72ylJ9.cjs} +28 -41
- package/dist/chunks/NcRichText-Ci72ylJ9.cjs.map +1 -0
- package/dist/chunks/{NcSelect-COvOHnPx.mjs → NcSelect-BQ-NFBXI.mjs} +2 -2
- package/dist/chunks/{NcSelect-COvOHnPx.mjs.map → NcSelect-BQ-NFBXI.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-B7KNWVHM.cjs → NcSelect-YHwbPAJD.cjs} +2 -2
- package/dist/chunks/{NcSelect-B7KNWVHM.cjs.map → NcSelect-YHwbPAJD.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-BBHWY-yn.cjs → NcSelectTags-BAMsfdw9.cjs} +2 -2
- package/dist/chunks/{NcSelectTags-BBHWY-yn.cjs.map → NcSelectTags-BAMsfdw9.cjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-CF2Cot8w.mjs → NcSelectTags-BKtOWgrz.mjs} +2 -2
- package/dist/chunks/{NcSelectTags-CF2Cot8w.mjs.map → NcSelectTags-BKtOWgrz.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-CeXJLtte.mjs → NcSettingsInputText-DC7H_6Uz.mjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-CeXJLtte.mjs.map → NcSettingsInputText-DC7H_6Uz.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-CxQDdc64.cjs → NcSettingsInputText-nb2XMaJW.cjs} +1 -1
- package/dist/chunks/{NcSettingsInputText-CxQDdc64.cjs.map → NcSettingsInputText-nb2XMaJW.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DFNuk8_l.cjs → NcSettingsSection-6Sc6GBsM.cjs} +1 -1
- package/dist/chunks/{NcSettingsSection-DFNuk8_l.cjs.map → NcSettingsSection-6Sc6GBsM.cjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DHX2Y1Ed.mjs → NcSettingsSection-BYKUjim0.mjs} +1 -1
- package/dist/chunks/{NcSettingsSection-DHX2Y1Ed.mjs.map → NcSettingsSection-BYKUjim0.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-BdBSXdjz.mjs → NcSettingsSelectGroup-CI2LoVeL.mjs} +2 -2
- package/dist/chunks/{NcSettingsSelectGroup-BdBSXdjz.mjs.map → NcSettingsSelectGroup-CI2LoVeL.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DMPDJo9p.cjs → NcSettingsSelectGroup-DX4AaRte.cjs} +2 -2
- package/dist/chunks/{NcSettingsSelectGroup-DMPDJo9p.cjs.map → NcSettingsSelectGroup-DX4AaRte.cjs.map} +1 -1
- package/dist/chunks/{NcTextField-gOk0FWcs.mjs → NcTextField-9gC8or6j.mjs} +8 -4
- package/dist/chunks/NcTextField-9gC8or6j.mjs.map +1 -0
- package/dist/chunks/{NcTextField-BUAXFTZf.cjs → NcTextField-Pbox9mQE.cjs} +8 -4
- package/dist/chunks/NcTextField-Pbox9mQE.cjs.map +1 -0
- package/dist/chunks/{NcTimezonePicker-BvdhhPdA.cjs → NcTimezonePicker-DIwsRdu2.cjs} +2 -2
- package/dist/chunks/{NcTimezonePicker-BvdhhPdA.cjs.map → NcTimezonePicker-DIwsRdu2.cjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker-BThg06Qu.mjs → NcTimezonePicker-xSXSuNHX.mjs} +2 -2
- package/dist/chunks/{NcTimezonePicker-BThg06Qu.mjs.map → NcTimezonePicker-xSXSuNHX.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DCy2g6yy.mjs → NcUserBubble-BFvEaXLr.mjs} +5 -5
- package/dist/chunks/{NcUserBubble-DCy2g6yy.mjs.map → NcUserBubble-BFvEaXLr.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-DgsM0rzH.cjs → NcUserBubble-rphdAcHS.cjs} +5 -5
- package/dist/chunks/{NcUserBubble-DgsM0rzH.cjs.map → NcUserBubble-rphdAcHS.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BKwkHHPs.cjs → NcUserStatusIcon-CFLiHFkC.cjs} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BKwkHHPs.cjs.map → NcUserStatusIcon-CFLiHFkC.cjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-CChMQi6E.mjs → NcUserStatusIcon-S5bBgRl6.mjs} +1 -1
- package/dist/chunks/{NcUserStatusIcon-CChMQi6E.mjs.map → NcUserStatusIcon-S5bBgRl6.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-B1fKsMww.cjs → ScopeComponent-B5vclUCV.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-B1fKsMww.cjs.map → ScopeComponent-B5vclUCV.cjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-9cgy2zGu.mjs → ScopeComponent-CEMLuQd5.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-9cgy2zGu.mjs.map → ScopeComponent-CEMLuQd5.mjs.map} +1 -1
- package/dist/chunks/_l10n-CjO_W5Dt.cjs +138 -0
- package/dist/chunks/{_l10n-ICucobx3.cjs.map → _l10n-CjO_W5Dt.cjs.map} +1 -1
- package/dist/chunks/_l10n-DDKxBWQL.mjs +139 -0
- package/dist/chunks/_l10n-DDKxBWQL.mjs.map +1 -0
- package/dist/chunks/{index-bI_wyL5-.cjs → index-BiECbTbJ.cjs} +3 -4
- package/dist/chunks/index-BiECbTbJ.cjs.map +1 -0
- package/dist/chunks/{index-bjwozrEX.mjs → index-G8WQDZ8G.mjs} +3 -4
- package/dist/chunks/index-G8WQDZ8G.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-C3zq9N4N.cjs → referencePickerModal-BkBu4cnq.cjs} +8 -8
- package/dist/chunks/referencePickerModal-BkBu4cnq.cjs.map +1 -0
- package/dist/chunks/{referencePickerModal-CwmjjIO7.mjs → referencePickerModal-CGG57Dy_.mjs} +8 -8
- package/dist/chunks/referencePickerModal-CGG57Dy_.mjs.map +1 -0
- package/dist/chunks/{usernameToColor-DNmwg81-.mjs → usernameToColor-BCZuxlEH.mjs} +1 -1
- package/dist/chunks/{usernameToColor-DNmwg81-.mjs.map → usernameToColor-BCZuxlEH.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor-CRPbtFBh.cjs → usernameToColor-cVFS7tET.cjs} +1 -1
- package/dist/chunks/{usernameToColor-CRPbtFBh.cjs.map → usernameToColor-cVFS7tET.cjs.map} +1 -1
- package/dist/composables/useFormatDateTime.d.ts +0 -1
- package/dist/composables/useIsDarkTheme/index.d.ts +0 -1
- package/dist/functions/dialog/index.d.ts +0 -1
- package/dist/index.cjs +51 -51
- package/dist/index.mjs +54 -54
- package/dist/plugin.d.ts +0 -1
- package/package.json +28 -11
- package/dist/assets/NcDateTimePickerNative-CwDQUAiQ.css +0 -47
- package/dist/assets/NcRichText-BlRmdWCX.css +0 -412
- package/dist/chunks/Linkify-BtgR-dXX.mjs +0 -14
- package/dist/chunks/Linkify-BtgR-dXX.mjs.map +0 -1
- package/dist/chunks/Linkify-yeOn5L6T.cjs +0 -15
- package/dist/chunks/Linkify-yeOn5L6T.cjs.map +0 -1
- package/dist/chunks/NcActionRadio-Dl6W62Vm.mjs.map +0 -1
- package/dist/chunks/NcActionRadio-vHwjWOHS.cjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-97R7dFen.cjs.map +0 -1
- package/dist/chunks/NcActionTextEditable-DZCFtqIP.mjs.map +0 -1
- package/dist/chunks/NcAppContent-BhXzPGUR.cjs.map +0 -1
- package/dist/chunks/NcAppContent-BuY1ebnE.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-C8Qq4tF5.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-boljzMEm.cjs.map +0 -1
- package/dist/chunks/NcAvatar-CT6DLUhQ.mjs.map +0 -1
- package/dist/chunks/NcAvatar-D4E0ptkW.cjs.map +0 -1
- package/dist/chunks/NcColorPicker-CODhE5KL.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-rWet3ND8.cjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-CUVGh_eA.mjs.map +0 -1
- package/dist/chunks/NcEmojiPicker-DrJqoYXz.cjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-CzS2doDR.cjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-vLqcJ-_w.mjs.map +0 -1
- package/dist/chunks/NcInputField-CbBdbdE8.cjs.map +0 -1
- package/dist/chunks/NcInputField-ixTTHy3h.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-CZ94k5WH.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-D5Td9dcg.cjs.map +0 -1
- package/dist/chunks/NcPopover-DzYbNu-I.mjs.map +0 -1
- package/dist/chunks/NcPopover-MxwUgZu1.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-BXztrC3l.cjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-DfYwqMxA.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-DS0VWcxG.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-fuOTy1W6.cjs.map +0 -1
- package/dist/chunks/NcRichText-B1WT1pJp.cjs.map +0 -1
- package/dist/chunks/NcRichText-DA8kGDfO.mjs.map +0 -1
- package/dist/chunks/NcTextField-BUAXFTZf.cjs.map +0 -1
- package/dist/chunks/NcTextField-gOk0FWcs.mjs.map +0 -1
- package/dist/chunks/_l10n-C6OUA0Ge.mjs +0 -130
- package/dist/chunks/_l10n-C6OUA0Ge.mjs.map +0 -1
- package/dist/chunks/_l10n-ICucobx3.cjs +0 -129
- package/dist/chunks/index-bI_wyL5-.cjs.map +0 -1
- package/dist/chunks/index-bjwozrEX.mjs.map +0 -1
- package/dist/chunks/referencePickerModal-C3zq9N4N.cjs.map +0 -1
- package/dist/chunks/referencePickerModal-CwmjjIO7.mjs.map +0 -1
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
/*
|
|
10
10
|
* Ensure proper alignment of the vue material icons
|
|
11
11
|
*/
|
|
12
|
-
.material-design-icon[data-v-
|
|
12
|
+
.material-design-icon[data-v-734d6ae9] {
|
|
13
13
|
display: flex;
|
|
14
14
|
align-self: center;
|
|
15
15
|
justify-self: center;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
}
|
|
19
|
-
.widget-custom[data-v-
|
|
19
|
+
.widget-custom[data-v-734d6ae9] {
|
|
20
20
|
width: 100%;
|
|
21
21
|
margin: auto;
|
|
22
22
|
margin-bottom: calc(var(--default-grid-baseline, 4px) * 3);
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
background-color: transparent;
|
|
28
28
|
display: flex;
|
|
29
29
|
}
|
|
30
|
-
.widget-custom.full-width[data-v-
|
|
30
|
+
.widget-custom.full-width[data-v-734d6ae9] {
|
|
31
31
|
width: var(--widget-full-width, 100%) !important;
|
|
32
|
-
|
|
32
|
+
inset-inline-start: calc((var(--widget-full-width, 100%) - 100%) / 2 * -1);
|
|
33
33
|
position: relative;
|
|
34
34
|
}
|
|
35
|
-
.widget-access[data-v-
|
|
35
|
+
.widget-access[data-v-734d6ae9] {
|
|
36
36
|
width: 100%;
|
|
37
37
|
margin: auto;
|
|
38
38
|
margin-bottom: calc(var(--default-grid-baseline, 4px) * 3);
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
display: flex;
|
|
45
45
|
padding: calc(var(--default-grid-baseline, 4px) * 3);
|
|
46
46
|
}
|
|
47
|
-
.widget-default[data-v-
|
|
47
|
+
.widget-default[data-v-734d6ae9] {
|
|
48
48
|
width: 100%;
|
|
49
49
|
margin: auto;
|
|
50
50
|
margin-bottom: calc(var(--default-grid-baseline, 4px) * 3);
|
|
@@ -55,42 +55,42 @@
|
|
|
55
55
|
background-color: transparent;
|
|
56
56
|
display: flex;
|
|
57
57
|
}
|
|
58
|
-
.widget-default--compact[data-v-
|
|
58
|
+
.widget-default--compact[data-v-734d6ae9] {
|
|
59
59
|
flex-direction: column;
|
|
60
60
|
}
|
|
61
|
-
.widget-default--compact .widget-default--image[data-v-
|
|
61
|
+
.widget-default--compact .widget-default--image[data-v-734d6ae9] {
|
|
62
62
|
width: 100%;
|
|
63
63
|
height: 150px;
|
|
64
64
|
}
|
|
65
|
-
.widget-default--compact .widget-default--details[data-v-
|
|
65
|
+
.widget-default--compact .widget-default--details[data-v-734d6ae9] {
|
|
66
66
|
width: 100%;
|
|
67
67
|
padding-top: calc(var(--default-grid-baseline, 4px) * 2);
|
|
68
68
|
padding-bottom: calc(var(--default-grid-baseline, 4px) * 2);
|
|
69
69
|
}
|
|
70
|
-
.widget-default--compact .widget-default--description[data-v-
|
|
70
|
+
.widget-default--compact .widget-default--description[data-v-734d6ae9] {
|
|
71
71
|
display: none;
|
|
72
72
|
}
|
|
73
|
-
.widget-default--image[data-v-
|
|
73
|
+
.widget-default--image[data-v-734d6ae9] {
|
|
74
74
|
width: 40%;
|
|
75
75
|
background-position: center;
|
|
76
76
|
background-size: cover;
|
|
77
77
|
background-repeat: no-repeat;
|
|
78
78
|
}
|
|
79
|
-
.widget-default--name[data-v-
|
|
79
|
+
.widget-default--name[data-v-734d6ae9] {
|
|
80
80
|
overflow: hidden;
|
|
81
81
|
text-overflow: ellipsis;
|
|
82
82
|
white-space: nowrap;
|
|
83
83
|
font-weight: bold;
|
|
84
84
|
}
|
|
85
|
-
.widget-default--details[data-v-
|
|
85
|
+
.widget-default--details[data-v-734d6ae9] {
|
|
86
86
|
padding: calc(var(--default-grid-baseline, 4px) * 3);
|
|
87
87
|
width: 60%;
|
|
88
88
|
}
|
|
89
|
-
.widget-default--details p[data-v-
|
|
89
|
+
.widget-default--details p[data-v-734d6ae9] {
|
|
90
90
|
margin: 0;
|
|
91
91
|
padding: 0;
|
|
92
92
|
}
|
|
93
|
-
.widget-default--description[data-v-
|
|
93
|
+
.widget-default--description[data-v-734d6ae9] {
|
|
94
94
|
overflow: hidden;
|
|
95
95
|
text-overflow: ellipsis;
|
|
96
96
|
display: -webkit-box;
|
|
@@ -98,19 +98,19 @@
|
|
|
98
98
|
line-clamp: 3;
|
|
99
99
|
-webkit-box-orient: vertical;
|
|
100
100
|
}
|
|
101
|
-
.widget-default--link[data-v-
|
|
101
|
+
.widget-default--link[data-v-734d6ae9] {
|
|
102
102
|
color: var(--color-text-maxcontrast);
|
|
103
103
|
overflow: hidden;
|
|
104
104
|
text-overflow: ellipsis;
|
|
105
105
|
white-space: nowrap;
|
|
106
106
|
}
|
|
107
|
-
.toggle-interactive[data-v-
|
|
107
|
+
.toggle-interactive[data-v-734d6ae9] {
|
|
108
108
|
position: relative;
|
|
109
109
|
}
|
|
110
|
-
.toggle-interactive .toggle-interactive--button[data-v-
|
|
110
|
+
.toggle-interactive .toggle-interactive--button[data-v-734d6ae9] {
|
|
111
111
|
position: absolute;
|
|
112
112
|
bottom: var(--default-grid-baseline);
|
|
113
|
-
|
|
113
|
+
inset-inline-end: var(--default-grid-baseline);
|
|
114
114
|
z-index: 10000;
|
|
115
115
|
}/**
|
|
116
116
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
@@ -140,40 +140,40 @@
|
|
|
140
140
|
/*
|
|
141
141
|
* Ensure proper alignment of the vue material icons
|
|
142
142
|
*/
|
|
143
|
-
.material-design-icon[data-v-
|
|
143
|
+
.material-design-icon[data-v-f03ee0c9] {
|
|
144
144
|
display: flex;
|
|
145
145
|
align-self: center;
|
|
146
146
|
justify-self: center;
|
|
147
147
|
align-items: center;
|
|
148
148
|
justify-content: center;
|
|
149
149
|
}
|
|
150
|
-
.provider-list[data-v-
|
|
150
|
+
.provider-list[data-v-f03ee0c9] {
|
|
151
151
|
width: 100%;
|
|
152
152
|
min-height: 400px;
|
|
153
153
|
padding: 0 16px 16px 16px;
|
|
154
154
|
display: flex;
|
|
155
155
|
flex-direction: column;
|
|
156
156
|
}
|
|
157
|
-
.provider-list--select[data-v-
|
|
157
|
+
.provider-list--select[data-v-f03ee0c9] {
|
|
158
158
|
width: 100%;
|
|
159
159
|
}
|
|
160
|
-
.provider-list--select .provider[data-v-
|
|
160
|
+
.provider-list--select .provider[data-v-f03ee0c9] {
|
|
161
161
|
display: flex;
|
|
162
162
|
align-items: center;
|
|
163
163
|
height: 28px;
|
|
164
164
|
overflow: hidden;
|
|
165
165
|
}
|
|
166
|
-
.provider-list--select .provider .link-icon[data-v-
|
|
167
|
-
margin-
|
|
166
|
+
.provider-list--select .provider .link-icon[data-v-f03ee0c9] {
|
|
167
|
+
margin-inline-end: 8px;
|
|
168
168
|
}
|
|
169
|
-
.provider-list--select .provider .provider-icon[data-v-
|
|
169
|
+
.provider-list--select .provider .provider-icon[data-v-f03ee0c9] {
|
|
170
170
|
width: 20px;
|
|
171
171
|
height: 20px;
|
|
172
172
|
object-fit: contain;
|
|
173
|
-
margin-
|
|
173
|
+
margin-inline-end: 8px;
|
|
174
174
|
filter: var(--background-invert-if-dark);
|
|
175
175
|
}
|
|
176
|
-
.provider-list--select .provider .option-text[data-v-
|
|
176
|
+
.provider-list--select .provider .option-text[data-v-f03ee0c9] {
|
|
177
177
|
overflow: hidden;
|
|
178
178
|
text-overflow: ellipsis;
|
|
179
179
|
white-space: nowrap;
|
|
@@ -228,35 +228,35 @@
|
|
|
228
228
|
/*
|
|
229
229
|
* Ensure proper alignment of the vue material icons
|
|
230
230
|
*/
|
|
231
|
-
.material-design-icon[data-v-
|
|
231
|
+
.material-design-icon[data-v-ff4bcbf3] {
|
|
232
232
|
display: flex;
|
|
233
233
|
align-self: center;
|
|
234
234
|
justify-self: center;
|
|
235
235
|
align-items: center;
|
|
236
236
|
justify-content: center;
|
|
237
237
|
}
|
|
238
|
-
.result[data-v-
|
|
238
|
+
.result[data-v-ff4bcbf3] {
|
|
239
239
|
display: flex;
|
|
240
240
|
align-items: center;
|
|
241
241
|
height: var(--default-clickable-area);
|
|
242
242
|
overflow: hidden;
|
|
243
243
|
}
|
|
244
|
-
.result--icon-class[data-v-
|
|
244
|
+
.result--icon-class[data-v-ff4bcbf3], .result--image[data-v-ff4bcbf3] {
|
|
245
245
|
width: 40px;
|
|
246
246
|
min-width: 40px;
|
|
247
247
|
height: 40px;
|
|
248
248
|
object-fit: contain;
|
|
249
249
|
}
|
|
250
|
-
.result--icon-class.rounded[data-v-
|
|
250
|
+
.result--icon-class.rounded[data-v-ff4bcbf3], .result--image.rounded[data-v-ff4bcbf3] {
|
|
251
251
|
border-radius: 50%;
|
|
252
252
|
}
|
|
253
|
-
.result--content[data-v-
|
|
253
|
+
.result--content[data-v-ff4bcbf3] {
|
|
254
254
|
display: flex;
|
|
255
255
|
flex-direction: column;
|
|
256
|
-
padding-
|
|
256
|
+
padding-inline-start: 10px;
|
|
257
257
|
overflow: hidden;
|
|
258
258
|
}
|
|
259
|
-
.result--content--name[data-v-
|
|
259
|
+
.result--content--name[data-v-ff4bcbf3], .result--content--subline[data-v-ff4bcbf3] {
|
|
260
260
|
overflow: hidden;
|
|
261
261
|
text-overflow: ellipsis;
|
|
262
262
|
white-space: nowrap;
|
|
@@ -378,14 +378,14 @@
|
|
|
378
378
|
/*
|
|
379
379
|
* Ensure proper alignment of the vue material icons
|
|
380
380
|
*/
|
|
381
|
-
.material-design-icon[data-v-
|
|
381
|
+
.material-design-icon[data-v-2aa8721d] {
|
|
382
382
|
display: flex;
|
|
383
383
|
align-self: center;
|
|
384
384
|
justify-self: center;
|
|
385
385
|
align-items: center;
|
|
386
386
|
justify-content: center;
|
|
387
387
|
}
|
|
388
|
-
.reference-picker-modal--content[data-v-
|
|
388
|
+
.reference-picker-modal--content[data-v-2aa8721d] {
|
|
389
389
|
width: 100%;
|
|
390
390
|
display: flex;
|
|
391
391
|
flex-direction: column;
|
|
@@ -393,21 +393,21 @@
|
|
|
393
393
|
justify-content: center;
|
|
394
394
|
overflow-y: auto;
|
|
395
395
|
}
|
|
396
|
-
.reference-picker-modal--content .close-button[data-v-
|
|
397
|
-
.reference-picker-modal--content .back-button[data-v-
|
|
396
|
+
.reference-picker-modal--content .close-button[data-v-2aa8721d],
|
|
397
|
+
.reference-picker-modal--content .back-button[data-v-2aa8721d] {
|
|
398
398
|
position: absolute;
|
|
399
399
|
top: 4px;
|
|
400
400
|
}
|
|
401
|
-
.reference-picker-modal--content .back-button[data-v-
|
|
402
|
-
|
|
401
|
+
.reference-picker-modal--content .back-button[data-v-2aa8721d] {
|
|
402
|
+
inset-inline-start: 4px;
|
|
403
403
|
}
|
|
404
|
-
.reference-picker-modal--content .close-button[data-v-
|
|
405
|
-
|
|
404
|
+
.reference-picker-modal--content .close-button[data-v-2aa8721d] {
|
|
405
|
+
inset-inline-end: 4px;
|
|
406
406
|
}
|
|
407
|
-
.reference-picker-modal--content > h2[data-v-
|
|
407
|
+
.reference-picker-modal--content > h2[data-v-2aa8721d] {
|
|
408
408
|
display: flex;
|
|
409
409
|
margin: 12px 0 20px 0;
|
|
410
410
|
}
|
|
411
|
-
.reference-picker-modal--content > h2 .icon[data-v-
|
|
412
|
-
margin-
|
|
411
|
+
.reference-picker-modal--content > h2 .icon[data-v-2aa8721d] {
|
|
412
|
+
margin-inline-end: 8px;
|
|
413
413
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenColors-
|
|
1
|
+
{"version":3,"file":"GenColors-DfwXw1-o.mjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenColors-
|
|
1
|
+
{"version":3,"file":"GenColors-Di5GSft7.cjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":["t"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../assets/NcActionButton-
|
|
1
|
+
import '../assets/NcActionButton-BYN2SUN0.css';
|
|
2
2
|
import { C as Check } from "./Check-BkThHPH7.mjs";
|
|
3
3
|
import { C as ChevronRight } from "./ChevronRight-BUv-PtHh.mjs";
|
|
4
4
|
import { C as ChevronLeft } from "./ChevronLeft-BK4j9oVH.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionButton-82_1gdid.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu && !isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<ChevronLeftIcon v-else-if=\"isMenu && isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<CheckIcon v-else-if=\"isChecked === true\" :size=\"20\" class=\"action-button__pressed-icon\" />\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport CheckIcon from 'vue-material-design-icons/Check.vue'\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ChevronLeftIcon from 'vue-material-design-icons/ChevronLeft.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { isRTL } from '@nextcloud/l10n'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tCheckIcon,\n\t\tChevronRightIcon,\n\t\tChevronLeftIcon,\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tisRTL: isRTL(),\n\t\t}\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\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\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button__pressed-icon {\n\tmargin-inline: auto calc($icon-margin * -1);\n}\n</style>\n"],"names":["CheckIcon","ChevronRightIcon","ChevronLeftIcon"],"mappings":";;;;;;AA0XA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,WAAAA;AAAAA,IACA,kBAAAC;AAAAA,IACA,iBAAAC;AAAAA,EACA;AAAA,EACA,QAAA;AACA,WAAA;AAAA,MACA,OAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,QAAA,CAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,aAAA,CAAA,UAAA,YAAA,SAAA,SAAA,QAAA,EAAA,SAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,YAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AACA,UAAA,KAAA,SAAA,WAAA,OAAA,KAAA,eAAA,WAAA;AACA,eAAA,KAAA,eAAA,KAAA;AAAA,MACA;AACA,aAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AACA,UAAA,KAAA,SAAA,YAAA,KAAA,SAAA,SAAA;AACA,eAAA,KAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAA;AACA,YAAA,aAAA,CAAA;AAEA,UAAA,KAAA,kBAAA;AAEA,mBAAA,OAAA;AAEA,YAAA,KAAA,SAAA,SAAA;AACA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,YAAA,SAAA;AAAA,QACA,WAAA,KAAA,SAAA,cAAA,KAAA,eAAA,YAAA,KAAA,eAAA,MAAA;AAEA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,eAAA,OAAA,UAAA,KAAA,aAAA,SAAA;AAAA,QACA;AAAA,MACA,WAAA,KAAA,eAAA,QAAA,KAAA,eAAA,UAAA;AAEA,mBAAA,cAAA,IAAA,KAAA,aAAA,SAAA;AAAA,MACA;AAEA,aAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,OAAA;AACA,WAAA,QAAA,KAAA;AAEA,UAAA,KAAA,eAAA,QAAA,KAAA,SAAA,UAAA;AACA,YAAA,KAAA,SAAA,SAAA;AACA,cAAA,OAAA,KAAA,eAAA,WAAA;AAEA,gBAAA,CAAA,KAAA,WAAA;AACA,mBAAA,MAAA,qBAAA,KAAA,KAAA;AAAA,YACA;AAAA,UACA,OAAA;AAEA,iBAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,UACA;AAAA,QACA,OAAA;AAEA,eAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcActionButton-CEysTg4c.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu && !isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<ChevronLeftIcon v-else-if=\"isMenu && isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<CheckIcon v-else-if=\"isChecked === true\" :size=\"20\" class=\"action-button__pressed-icon\" />\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport CheckIcon from 'vue-material-design-icons/Check.vue'\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ChevronLeftIcon from 'vue-material-design-icons/ChevronLeft.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { isRTL } from '@nextcloud/l10n'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tCheckIcon,\n\t\tChevronRightIcon,\n\t\tChevronLeftIcon,\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tisRTL: isRTL(),\n\t\t}\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\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\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button__pressed-icon {\n\tmargin-inline: auto calc($icon-margin * -1);\n}\n</style>\n"],"names":["CheckIcon","ChevronRightIcon","ChevronLeftIcon"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionButton-DHOce_KX.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu && !isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<ChevronLeftIcon v-else-if=\"isMenu && isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<CheckIcon v-else-if=\"isChecked === true\" :size=\"20\" class=\"action-button__pressed-icon\" />\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport CheckIcon from 'vue-material-design-icons/Check.vue'\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ChevronLeftIcon from 'vue-material-design-icons/ChevronLeft.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { isRTL } from '@nextcloud/l10n'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tCheckIcon,\n\t\tChevronRightIcon,\n\t\tChevronLeftIcon,\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tisRTL: isRTL(),\n\t\t}\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\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\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button__pressed-icon {\n\tmargin-inline: auto calc($icon-margin * -1);\n}\n</style>\n"],"names":["CheckIcon","ChevronRightIcon","ChevronLeftIcon","isRTL","ActionTextMixin"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"NcActionButton-DcpUnqA7.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu && !isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<ChevronLeftIcon v-else-if=\"isMenu && isRTL\" :size=\"20\" class=\"action-button__menu-icon\" />\n\t\t\t<CheckIcon v-else-if=\"isChecked === true\" :size=\"20\" class=\"action-button__pressed-icon\" />\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport CheckIcon from 'vue-material-design-icons/Check.vue'\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ChevronLeftIcon from 'vue-material-design-icons/ChevronLeft.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport { isRTL } from '@nextcloud/l10n'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tCheckIcon,\n\t\tChevronRightIcon,\n\t\tChevronLeftIcon,\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tisRTL: isRTL(),\n\t\t}\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\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\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button__pressed-icon {\n\tmargin-inline: auto calc($icon-margin * -1);\n}\n</style>\n"],"names":["CheckIcon","ChevronRightIcon","ChevronLeftIcon","isRTL","ActionTextMixin"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/NcActionButtonGroup-BND4GQdv.css';
|
|
2
2
|
import { defineComponent } from "vue";
|
|
3
3
|
import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
|
|
4
|
-
import { r as register, a as t } from "./_l10n-
|
|
4
|
+
import { r as register, a as t } from "./_l10n-DDKxBWQL.mjs";
|
|
5
5
|
import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
|
|
6
6
|
register();
|
|
7
7
|
const _sfc_main = defineComponent({
|
package/dist/chunks/{NcActionButtonGroup-BSh2wd9F.mjs.map → NcActionButtonGroup-3v-qy9C0.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionButtonGroup-
|
|
1
|
+
{"version":3,"file":"NcActionButtonGroup-3v-qy9C0.mjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport AlignLeft from 'vue-material-design-icons/AlignHorizontalLeft'\nimport AlignRight from 'vue-material-design-icons/AlignHorizontalRight'\nimport AlignCenter from 'vue-material-design-icons/AlignHorizontalCenter'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tAlignLeft,\n\t\tAlignRight,\n\t\tAlignCenter,\n\t\tPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: `nc-action-button-group-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\tli {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t.action-button {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;;AA+FA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,SAAA,0BAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ require('../assets/NcActionButtonGroup-BND4GQdv.css');
|
|
|
2
2
|
"use strict";
|
|
3
3
|
const Vue = require("vue");
|
|
4
4
|
const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
|
|
5
|
-
const _l10n = require("./_l10n-
|
|
5
|
+
const _l10n = require("./_l10n-CjO_W5Dt.cjs");
|
|
6
6
|
const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
|
|
7
7
|
_l10n.register();
|
|
8
8
|
const _sfc_main = Vue.defineComponent({
|