maz-ui 3.47.2-beta.24 → 3.47.2-beta.25
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/components/MazAccordion.mjs +56 -56
- package/components/MazAnimatedCounter.mjs +7 -7
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBackdrop.mjs +9 -9
- package/components/MazBadge.mjs +2 -2
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCardSpotlight.mjs +7 -7
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.mjs +13 -13
- package/components/MazCheckbox.mjs +2 -2
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +11 -11
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +1 -1
- package/components/MazDropzone.mjs +1 -1
- package/components/MazExpandAnimation.mjs +8 -8
- package/components/MazFullscreenLoader.mjs +2 -40
- package/components/MazGallery.mjs +1 -1
- package/components/MazIcon.mjs +9 -8
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +2 -2
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLazyImg.mjs +1 -1
- package/components/MazLink.d.ts +2 -2
- package/components/MazLink.mjs +6 -6
- package/components/MazLoadingBar.mjs +17 -17
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazPullToRefresh.mjs +1 -1
- package/components/MazRadio.mjs +11 -11
- package/components/MazRadioButtons.mjs +2 -2
- package/components/MazReadingProgressBar.mjs +15 -15
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +31 -31
- package/components/MazSpinner.mjs +7 -7
- package/components/MazStepper.d.ts +1 -1
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +9 -9
- package/components/MazTable.mjs +1 -1
- package/components/MazTableCell.mjs +12 -12
- package/components/MazTableRow.mjs +6 -6
- package/components/MazTableTitle.mjs +11 -11
- package/components/MazTabs.d.ts +3 -3
- package/components/MazTabs.mjs +7 -7
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTabsContent.mjs +4 -4
- package/components/MazTabsContentItem.mjs +8 -8
- package/components/MazTextarea.mjs +2 -2
- package/components/MazTransitionExpand.mjs +10 -10
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAnimatedCounter.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazCardSpotlight.css +1 -1
- package/components/assets/MazCarousel.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazChecklist.css +1 -1
- package/components/assets/MazCircularProgressBar.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/assets/MazExpandAnimation.css +1 -1
- package/components/assets/MazFullscreenLoader.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputCode.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLazyImg.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazLoadingBar.css +1 -1
- package/components/assets/MazPagination.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazPullToRefresh.css +1 -1
- package/components/assets/MazRadio.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazReadingProgressBar.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSlider.css +1 -1
- package/components/assets/MazSpinner.css +1 -1
- package/components/assets/MazStepper.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTableCell.css +1 -1
- package/components/assets/MazTableRow.css +1 -1
- package/components/assets/MazTableTitle.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/assets/MazTabsContentItem.css +1 -1
- package/components/assets/MazTextarea.css +1 -1
- package/components/assets/MazTransitionExpand.css +1 -1
- package/components/chunks/{MazAvatar-CZzOIbzh.mjs → MazAvatar-CuOWgdVG.mjs} +18 -18
- package/components/chunks/{MazBadge-DCzaExPj.mjs → MazBadge-tPgFsG6Y.mjs} +6 -6
- package/components/chunks/{MazBottomSheet-DGsGO0zo.mjs → MazBottomSheet-CMqzf-dT.mjs} +15 -15
- package/components/chunks/MazBtn-B16x1gSu.mjs +103 -0
- package/components/chunks/MazBtn-BLSmc1v4.mjs +103 -0
- package/components/chunks/MazBtn-BcrrOaO_.mjs +103 -0
- package/components/chunks/MazBtn-Bje1xDu3.mjs +103 -0
- package/components/chunks/MazBtn-C5sb0470.mjs +103 -0
- package/components/chunks/MazBtn-CPwCJ1l-.mjs +103 -0
- package/components/chunks/{MazBtn-BS2kvd1Z.mjs → MazBtn-Cf-LPT5p.mjs} +4 -4
- package/components/chunks/MazBtn-DCyFSkZo.mjs +103 -0
- package/components/chunks/{MazBtn-oZhhJy09.mjs → MazBtn-DETtZdlj.mjs} +3 -3
- package/components/chunks/{MazBtn-B5o15XDU.mjs → MazBtn-DnJzOPh9.mjs} +4 -4
- package/components/chunks/{MazBtn-CM-xSnA5.mjs → MazBtn-DsGaq_eB.mjs} +3 -3
- package/components/chunks/{MazBtn-4-B-zs6Y.mjs → MazBtn-S7EnZYtZ.mjs} +4 -4
- package/components/chunks/MazBtn-iYAY4cer.mjs +103 -0
- package/components/chunks/MazBtn-v4i4k53h.mjs +103 -0
- package/components/chunks/{MazCard-98OuVlyK.mjs → MazCard-l54W3CUU.mjs} +3 -3
- package/components/chunks/{MazCarousel-COTaKhKF.mjs → MazCarousel-C16E1i1T.mjs} +3 -3
- package/components/chunks/{MazCheckbox-CbfTOJdy.mjs → MazCheckbox-C1nh-xQt.mjs} +7 -7
- package/components/chunks/{MazCheckbox-CCma_qyQ.mjs → MazCheckbox-CEsAHbdi.mjs} +7 -7
- package/components/chunks/{MazCheckbox-eOEEACaM.mjs → MazCheckbox-D-7-TdgO.mjs} +3 -3
- package/components/chunks/{MazChecklist-Bb_70sf5.mjs → MazChecklist-DSfD55m5.mjs} +125 -125
- package/components/chunks/{MazDialog-CVo6Lqqe.mjs → MazDialog-BjQ3ivmv.mjs} +17 -17
- package/components/chunks/{MazDialogPromise-CpVRFbno.mjs → MazDialogPromise-Bg3ZOsEI.mjs} +4 -4
- package/components/chunks/{MazDrawer-Bas9dy0D.mjs → MazDrawer-BqNLfW4e.mjs} +3 -3
- package/components/chunks/{MazDropdown-0r445NfW.mjs → MazDropdown-DNXKdC_3.mjs} +3 -2
- package/components/chunks/{MazDropzone-DKFkgqqD.mjs → MazDropzone-n0JE92da.mjs} +2 -2
- package/components/chunks/{MazExpandAnimation-Bdf0-L85.mjs → MazExpandAnimation-B04WMwpW.mjs} +8 -8
- package/components/chunks/MazFullscreenLoader-XF8wIEcL.mjs +48 -0
- package/components/chunks/{MazGallery-r8SBTCgJ.mjs → MazGallery-CzlKPQFX.mjs} +65 -65
- package/components/chunks/{MazGallery-xPp1apvO.mjs → MazGallery-DdZ3bFvX.mjs} +5 -5
- package/components/chunks/{MazIcon-_hN-Kivn.mjs → MazIcon-Cq1v4J3r.mjs} +9 -8
- package/components/chunks/{MazIcon-C-aPrqx2.mjs → MazIcon-DQXhsxp8.mjs} +11 -10
- package/{modules/chunks/MazIcon-CQd2Upkc.mjs → components/chunks/MazIcon-DR6-win-.mjs} +12 -11
- package/components/chunks/MazIcon-Gv6n6i4M.mjs +4 -0
- package/components/chunks/{MazInput-BM4n-byz.mjs → MazInput-BjnuoFvn.mjs} +26 -26
- package/components/chunks/{MazInput-BcutbP8N.mjs → MazInput-DB4HtpCQ.mjs} +4 -4
- package/components/chunks/{MazInput-C9Qh4Gt3.mjs → MazInput-yBii2AFS.mjs} +19 -19
- package/components/chunks/{MazInputNumber-DgjOMiOt.mjs → MazInputNumber-DqnLi9-C.mjs} +37 -37
- package/components/chunks/{MazInputPrice-D6fJN9yv.mjs → MazInputPrice-Ca8mL53M.mjs} +4 -4
- package/components/chunks/{MazInputTags-DthGSyHQ.mjs → MazInputTags-Bto9dVQq.mjs} +40 -40
- package/components/chunks/{MazLazyImg-DQLwaKKz.mjs → MazLazyImg-D9mlGTCs.mjs} +4 -4
- package/components/chunks/{MazLazyImg-B-6PQWEi.mjs → MazLazyImg-DnJyLBjr.mjs} +3 -3
- package/components/chunks/{MazLink-tud3eDgU.mjs → MazLink-DlUG7E5K.mjs} +3 -3
- package/components/chunks/{MazLoadingBar-C2qPjfEQ.mjs → MazLoadingBar-DBt1Ltm5.mjs} +8 -8
- package/components/chunks/{MazPagination-BSu0Ifkp.mjs → MazPagination-sxkvTajI.mjs} +49 -49
- package/components/chunks/{MazPhoneNumberInput-BAGcArnr.mjs → MazPhoneNumberInput-C3j3JyDI.mjs} +11 -11
- package/components/chunks/{MazPicker-BljfUneI.mjs → MazPicker-BUXJof_-.mjs} +9 -9
- package/components/chunks/{MazPickerMonthSwitcher-CEVb4BXw.mjs → MazPickerMonthSwitcher-DW2WfonJ.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-DayGMC9m.mjs → MazPickerShortcuts-fw4-dWSv.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DC1lFIbp.mjs → MazPickerYearSwitcher-aHvmQBF1.mjs} +1 -1
- package/components/chunks/{MazPullToRefresh-CFQX0soS.mjs → MazPullToRefresh-a1rT-zWr.mjs} +3 -3
- package/components/chunks/{MazSelect-CH3JdigO.mjs → MazSelect-BwahUlbE.mjs} +49 -49
- package/components/chunks/{MazSelect-D3KXcHJS.mjs → MazSelect-CBaOs6va.mjs} +44 -44
- package/components/chunks/MazSpinner-BVQYjLWp.mjs +34 -0
- package/components/chunks/{MazSpinner-yr9xVdAa.mjs → MazSpinner-BYlkcKf0.mjs} +6 -6
- package/components/chunks/MazSpinner-B_THFs0t.mjs +34 -0
- package/components/chunks/MazSpinner-Bb1BgWPD.mjs +34 -0
- package/components/chunks/MazSpinner-Bb4B4Nz8.mjs +34 -0
- package/components/chunks/{MazSpinner-B5JChIrj.mjs → MazSpinner-Bpkl7q5u.mjs} +7 -7
- package/components/chunks/MazSpinner-BtDo7ZEC.mjs +34 -0
- package/components/chunks/MazSpinner-C-DOH7ou.mjs +34 -0
- package/components/chunks/MazSpinner-C1Rr3w9l.mjs +34 -0
- package/components/chunks/MazSpinner-C47dmUu7.mjs +34 -0
- package/components/chunks/MazSpinner-C7_Q1K-e.mjs +34 -0
- package/components/chunks/MazSpinner-CBHbVSef.mjs +34 -0
- package/components/chunks/MazSpinner-CCThMV5o.mjs +34 -0
- package/components/chunks/MazSpinner-CizL97Q2.mjs +34 -0
- package/components/chunks/{MazSpinner-BIPm54-3.mjs → MazSpinner-Cmy2WyWY.mjs} +7 -7
- package/components/chunks/MazSpinner-CodOqnm1.mjs +34 -0
- package/components/chunks/MazSpinner-Cq0S_tbE.mjs +34 -0
- package/components/chunks/{MazSpinner-BBZoDxwq.mjs → MazSpinner-D6PdYOcD.mjs} +7 -7
- package/components/chunks/MazSpinner-DV9-beEc.mjs +34 -0
- package/components/chunks/MazSpinner-DoFpeVcl.mjs +34 -0
- package/components/chunks/MazSpinner-Dx-3_EFZ.mjs +34 -0
- package/components/chunks/MazSpinner-PVTrAf5V.mjs +34 -0
- package/components/chunks/MazSpinner-PXSS3XT3.mjs +34 -0
- package/components/chunks/MazSpinner-XZrAaGeE.mjs +34 -0
- package/components/chunks/{MazStepper-B3fuhbye.mjs → MazStepper-DtAqtJjn.mjs} +32 -32
- package/components/chunks/{MazTable-BU3Hluiu.mjs → MazTable-Soe-MrTW.mjs} +79 -74
- package/components/chunks/{MazTableCell-DKMZAanm.mjs → MazTableCell-DtoO9MOe.mjs} +6 -6
- package/components/chunks/MazTableRow-ChFMulaU.mjs +30 -0
- package/components/chunks/{MazTableTitle-BSFZ84Ob.mjs → MazTableTitle-D8El-v5p.mjs} +6 -6
- package/components/chunks/{MazTabsBar--Xq_cpuz.mjs → MazTabsBar-8wchBiYF.mjs} +20 -20
- package/components/chunks/{MazTransitionExpand-Cedz9Ree.mjs → MazTransitionExpand-CRArAQZu.mjs} +10 -10
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/MazSpinner.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-D0bVfaLm.cjs +1 -0
- package/{components/chunks/MazBtn-BVWOyFm-.mjs → modules/chunks/MazBtn-Z86MClP9.mjs} +4 -4
- package/modules/chunks/{MazIcon-yWU14J0C.cjs → MazIcon-BwgJhGLT.cjs} +1 -1
- package/{components/chunks/MazIcon-BSUswKRF.mjs → modules/chunks/MazIcon-XtyPgbu6.mjs} +12 -11
- package/{components/chunks/MazSpinner-5S6Sn-lq.mjs → modules/chunks/MazSpinner-BfUXTY7m.mjs} +7 -7
- package/modules/chunks/MazSpinner-C5Fi9q_G.cjs +1 -0
- package/modules/chunks/index-Bq5KVBKA.cjs +124 -0
- package/modules/chunks/{index-2pl8TbAm.mjs → index-YwIF5a3Q.mjs} +19 -18
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/tailwindcss/tailwind.css +0 -6
- package/tailwindcss/variables/utilities.ts +3 -0
- package/types/components/MazLink.vue.d.ts +2 -2
- package/types/components/MazStepper.vue.d.ts +1 -1
- package/types/components/MazTabs.vue.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormField.d.ts +56 -16
- package/types/modules/composables/useFormValidator/utils.d.ts +6 -6
- package/types/tailwindcss/variables/utilities.d.ts +3 -0
- package/components/chunks/MazBtn-C60T0UDa.mjs +0 -103
- package/components/chunks/MazBtn-C6zsmGnw.mjs +0 -103
- package/components/chunks/MazBtn-CC9H3U2X.mjs +0 -103
- package/components/chunks/MazBtn-D-lSRE8n.mjs +0 -103
- package/components/chunks/MazBtn-D1jMqwE1.mjs +0 -103
- package/components/chunks/MazBtn-DAXwt847.mjs +0 -103
- package/components/chunks/MazBtn-DOWVQgpN.mjs +0 -103
- package/components/chunks/MazBtn-DZaVjTvW.mjs +0 -103
- package/components/chunks/MazIcon-BoTByt7n.mjs +0 -4
- package/components/chunks/MazSpinner-BlbTztM3.mjs +0 -34
- package/components/chunks/MazSpinner-Bn4pnCJx.mjs +0 -34
- package/components/chunks/MazSpinner-C-ln9ldX.mjs +0 -34
- package/components/chunks/MazSpinner-C11EOZZd.mjs +0 -34
- package/components/chunks/MazSpinner-C6h03sqc.mjs +0 -34
- package/components/chunks/MazSpinner-CCc9ajpj.mjs +0 -34
- package/components/chunks/MazSpinner-CgKOIkQQ.mjs +0 -34
- package/components/chunks/MazSpinner-Cp_nPioh.mjs +0 -34
- package/components/chunks/MazSpinner-CwdlrYSt.mjs +0 -34
- package/components/chunks/MazSpinner-DOPjHhPx.mjs +0 -34
- package/components/chunks/MazSpinner-DjM6ktPY.mjs +0 -34
- package/components/chunks/MazSpinner-DjUU4G1h.mjs +0 -34
- package/components/chunks/MazSpinner-DqD51Fb6.mjs +0 -34
- package/components/chunks/MazSpinner-Du5o8JC_.mjs +0 -38
- package/components/chunks/MazSpinner-QfPXLpa_.mjs +0 -34
- package/components/chunks/MazSpinner-XB6tX3Ld.mjs +0 -34
- package/components/chunks/MazSpinner-ZFhNCy24.mjs +0 -34
- package/components/chunks/MazSpinner-b90e3OQK.mjs +0 -34
- package/components/chunks/MazSpinner-f6pBzqbu.mjs +0 -34
- package/components/chunks/MazTableRow-CDHpmXfw.mjs +0 -30
- package/modules/chunks/MazBtn-BB46O5je.mjs +0 -103
- package/modules/chunks/MazBtn-CZT-LQS2.cjs +0 -1
- package/modules/chunks/MazSpinner-C2h_t5PV.mjs +0 -34
- package/modules/chunks/MazSpinner-D8KHXwFm.cjs +0 -1
- package/modules/chunks/index-DwaxfXYQ.cjs +0 -124
package/tailwindcss/tailwind.css
CHANGED
|
@@ -47,7 +47,7 @@ declare function __VLS_template(): {
|
|
|
47
47
|
rootEl: HTMLDivElement;
|
|
48
48
|
};
|
|
49
49
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
50
|
-
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
51
|
"update:model-value": (value: number) => any;
|
|
52
52
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
53
53
|
"onUpdate:model-value"?: ((value: number) => any) | undefined;
|
|
@@ -16,10 +16,10 @@ declare function __VLS_template(): {
|
|
|
16
16
|
rootEl: HTMLDivElement;
|
|
17
17
|
};
|
|
18
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
-
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
-
"update:model-value": (
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:model-value": (value: number) => any;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
-
"onUpdate:model-value"?: ((
|
|
22
|
+
"onUpdate:model-value"?: ((value: number) => any) | undefined;
|
|
23
23
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
25
|
export default _default;
|
|
@@ -1,16 +1,56 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import type { ComputedRef, WritableComputedRef } from 'vue';
|
|
2
|
+
import type { BaseFormPayload, ExtractModelKey, FormFieldOptions, FormSchema, ValidationIssues } from './types';
|
|
3
|
+
import { getValidationEvents } from './utils';
|
|
4
|
+
interface UseFormFieldReturn<FieldType> {
|
|
5
|
+
/**
|
|
6
|
+
* Indicates if the field has an error
|
|
7
|
+
*/
|
|
8
|
+
hasError: ComputedRef<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Errors of the field
|
|
11
|
+
*/
|
|
12
|
+
errors: ComputedRef<ValidationIssues>;
|
|
13
|
+
/**
|
|
14
|
+
* Error message of the field
|
|
15
|
+
* It's the first error of the field
|
|
16
|
+
*/
|
|
17
|
+
errorMessage: ComputedRef<string | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates if the field is valid
|
|
20
|
+
*/
|
|
21
|
+
isValid: ComputedRef<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates if the field has been modified
|
|
24
|
+
*/
|
|
25
|
+
isDirty: ComputedRef<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates if the field has been blurred
|
|
28
|
+
*/
|
|
29
|
+
isBlurred: ComputedRef<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates if the field has been validated
|
|
32
|
+
*/
|
|
33
|
+
isValidated: ComputedRef<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Indicates if the field is validating
|
|
36
|
+
*/
|
|
37
|
+
isValidating: ComputedRef<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Validation mode of the field
|
|
40
|
+
*/
|
|
41
|
+
mode: ComputedRef<FormFieldOptions<FieldType>['mode']>;
|
|
42
|
+
/**
|
|
43
|
+
* Value of the field
|
|
44
|
+
*/
|
|
45
|
+
value: WritableComputedRef<FieldType>;
|
|
46
|
+
/**
|
|
47
|
+
* Validation events of the field
|
|
48
|
+
*/
|
|
49
|
+
validationEvents: ComputedRef<ReturnType<typeof getValidationEvents>>;
|
|
50
|
+
/**
|
|
51
|
+
* Function to handle the blur event of the field
|
|
52
|
+
*/
|
|
53
|
+
onBlur: () => void;
|
|
54
|
+
}
|
|
55
|
+
export declare function useFormField<FieldType extends Model[ExtractModelKey<FormSchema<Model>>], Model extends BaseFormPayload = BaseFormPayload>(name: ExtractModelKey<FormSchema<Model>>, options?: FormFieldOptions<FieldType>): UseFormFieldReturn<FieldType>;
|
|
56
|
+
export {};
|
|
@@ -46,14 +46,14 @@ export declare function updateFieldState<Model extends BaseFormPayload, ModelKey
|
|
|
46
46
|
}): FieldState<Model>;
|
|
47
47
|
export declare function getFieldsErrors<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(fieldsStates: FieldsStates<Model>): Record<ModelKey, ValidationIssues>;
|
|
48
48
|
export declare function findInteractiveElements(el: HTMLElement): (HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement)[];
|
|
49
|
-
export declare function addEventToInteractiveElements({ interactiveElements,
|
|
49
|
+
export declare function addEventToInteractiveElements({ interactiveElements, onBlur, mode, }: {
|
|
50
50
|
interactiveElements: HTMLElement[];
|
|
51
|
-
|
|
51
|
+
onBlur: () => void;
|
|
52
52
|
mode: StrictOptions['mode'];
|
|
53
53
|
}): void;
|
|
54
|
-
export declare function removeEventFromInteractiveElements({ interactiveElements,
|
|
54
|
+
export declare function removeEventFromInteractiveElements({ interactiveElements, onBlur, }: {
|
|
55
55
|
interactiveElements: HTMLElement[];
|
|
56
|
-
|
|
56
|
+
onBlur: () => void;
|
|
57
57
|
}): void;
|
|
58
58
|
export declare function getFieldValidationResult<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>(name: ModelKey, schema: FormSchema<Model>, value: Model[ModelKey]): Promise<{
|
|
59
59
|
result: import("valibot").SafeParseResult<FormSchema<Model>[ModelKey]>;
|
|
@@ -102,10 +102,10 @@ export declare function handleFieldInput<Model extends BaseFormPayload, ModelKey
|
|
|
102
102
|
}): Promise<void> | undefined;
|
|
103
103
|
export declare function getInstance<Model extends BaseFormPayload>(composableName: string): CustomInstance<Model>;
|
|
104
104
|
export declare function getContext<Model extends BaseFormPayload>(identifier: string | symbol | InjectionKey<FormContext<Model>>, composableName: string): FormContext<Model, Extract<keyof { [K in Extract<keyof Model, string> as Model[K] extends Required<Model>[K] ? K : never]: import("./types").ValidationAsync; }, string> | Extract<keyof { [K_1 in Extract<keyof Model, string> as Model[K_1] extends Required<Model>[K_1] ? never : K_1]?: import("./types").ValidationAsync | undefined; }, string>>;
|
|
105
|
-
export declare function getValidationEvents<Model extends BaseFormPayload>({ ref, fieldState,
|
|
105
|
+
export declare function getValidationEvents<Model extends BaseFormPayload>({ ref, fieldState, onBlur, }: {
|
|
106
106
|
ref?: string;
|
|
107
107
|
fieldState: FieldState<Model>;
|
|
108
|
-
|
|
108
|
+
onBlur: () => void;
|
|
109
109
|
}): {
|
|
110
110
|
onBlur: () => void;
|
|
111
111
|
} | undefined;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./MazBottomSheet-DGsGO0zo.mjs";
|
|
3
|
-
import '../assets/MazBtn.css';const O = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-btn-loader-container"
|
|
6
|
-
}, A = /* @__PURE__ */ C({
|
|
7
|
-
__name: "MazBtn",
|
|
8
|
-
props: {
|
|
9
|
-
variant: { default: "button" },
|
|
10
|
-
size: { default: "md" },
|
|
11
|
-
color: { default: "primary" },
|
|
12
|
-
type: { default: "button" },
|
|
13
|
-
rounded: { type: Boolean },
|
|
14
|
-
roundedSize: { default: "lg" },
|
|
15
|
-
noRounded: { type: Boolean },
|
|
16
|
-
outline: { type: Boolean },
|
|
17
|
-
pastel: { type: Boolean },
|
|
18
|
-
block: { type: Boolean },
|
|
19
|
-
noUnderline: { type: Boolean },
|
|
20
|
-
loading: { type: Boolean },
|
|
21
|
-
disabled: { type: Boolean },
|
|
22
|
-
fab: { type: Boolean },
|
|
23
|
-
icon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
-
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
-
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
26
|
-
noPadding: { type: Boolean },
|
|
27
|
-
noElevation: { type: Boolean },
|
|
28
|
-
justify: { default: "center" }
|
|
29
|
-
},
|
|
30
|
-
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-ZFhNCy24.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
|
-
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "maz-text-xl");
|
|
34
|
-
return (e, D) => (t(), l(r(f.value), {
|
|
35
|
-
disabled: p.value || void 0,
|
|
36
|
-
class: a(["m-btn", [
|
|
37
|
-
`--${e.size}`,
|
|
38
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
39
|
-
g.value,
|
|
40
|
-
B.value,
|
|
41
|
-
k.value,
|
|
42
|
-
{
|
|
43
|
-
"--block": e.block,
|
|
44
|
-
"--no-underline": e.noUnderline,
|
|
45
|
-
"--fab": e.fab,
|
|
46
|
-
"--loading": e.loading,
|
|
47
|
-
"--disabled": p.value,
|
|
48
|
-
"--rounded": e.rounded,
|
|
49
|
-
"--no-rounded": e.noRounded,
|
|
50
|
-
"--no-padding": e.noPadding,
|
|
51
|
-
"--no-elevation": e.noElevation
|
|
52
|
-
}
|
|
53
|
-
]]),
|
|
54
|
-
style: S([`--justify: ${e.justify}`]),
|
|
55
|
-
type: h.value
|
|
56
|
-
}, {
|
|
57
|
-
default: j(() => [
|
|
58
|
-
i(e.$slots, "left-icon", {}, () => [
|
|
59
|
-
typeof e.leftIcon == "string" ? (t(), l(u(c), {
|
|
60
|
-
key: 0,
|
|
61
|
-
name: e.leftIcon,
|
|
62
|
-
class: a([s.value])
|
|
63
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(r(e.leftIcon), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: a([s.value])
|
|
66
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
67
|
-
], !0),
|
|
68
|
-
i(e.$slots, "icon", {}, () => [
|
|
69
|
-
typeof e.icon == "string" ? (t(), l(u(c), {
|
|
70
|
-
key: 0,
|
|
71
|
-
name: e.icon,
|
|
72
|
-
class: a([s.value])
|
|
73
|
-
}, null, 8, ["name", "class"])) : e.icon ? (t(), l(r(e.icon), {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: a([s.value])
|
|
76
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
77
|
-
], !0),
|
|
78
|
-
i(e.$slots, "default", {}, void 0, !0),
|
|
79
|
-
i(e.$slots, "right-icon", {}, () => [
|
|
80
|
-
typeof e.rightIcon == "string" ? (t(), l(u(c), {
|
|
81
|
-
key: 0,
|
|
82
|
-
name: e.rightIcon,
|
|
83
|
-
class: a([s.value])
|
|
84
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(r(e.rightIcon), {
|
|
85
|
-
key: 1,
|
|
86
|
-
class: a([s.value])
|
|
87
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
88
|
-
], !0),
|
|
89
|
-
I.value ? (t(), M("div", O, [
|
|
90
|
-
E(u(v), {
|
|
91
|
-
size: "2em",
|
|
92
|
-
color: e.color
|
|
93
|
-
}, null, 8, ["color"])
|
|
94
|
-
])) : d("v-if", !0)
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
/* FORWARDED */
|
|
98
|
-
}, 8, ["disabled", "class", "style", "type"]));
|
|
99
|
-
}
|
|
100
|
-
}), R = /* @__PURE__ */ F(A, [["__scopeId", "data-v-bee684ff"]]);
|
|
101
|
-
export {
|
|
102
|
-
R as default
|
|
103
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./MazSelect-CH3JdigO.mjs";
|
|
3
|
-
import '../assets/MazBtn.css';const O = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-btn-loader-container"
|
|
6
|
-
}, A = /* @__PURE__ */ C({
|
|
7
|
-
__name: "MazBtn",
|
|
8
|
-
props: {
|
|
9
|
-
variant: { default: "button" },
|
|
10
|
-
size: { default: "md" },
|
|
11
|
-
color: { default: "primary" },
|
|
12
|
-
type: { default: "button" },
|
|
13
|
-
rounded: { type: Boolean },
|
|
14
|
-
roundedSize: { default: "lg" },
|
|
15
|
-
noRounded: { type: Boolean },
|
|
16
|
-
outline: { type: Boolean },
|
|
17
|
-
pastel: { type: Boolean },
|
|
18
|
-
block: { type: Boolean },
|
|
19
|
-
noUnderline: { type: Boolean },
|
|
20
|
-
loading: { type: Boolean },
|
|
21
|
-
disabled: { type: Boolean },
|
|
22
|
-
fab: { type: Boolean },
|
|
23
|
-
icon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
-
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
-
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
26
|
-
noPadding: { type: Boolean },
|
|
27
|
-
noElevation: { type: Boolean },
|
|
28
|
-
justify: { default: "center" }
|
|
29
|
-
},
|
|
30
|
-
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-BIPm54-3.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
|
-
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "maz-text-xl");
|
|
34
|
-
return (e, D) => (t(), l(r(f.value), {
|
|
35
|
-
disabled: p.value || void 0,
|
|
36
|
-
class: a(["m-btn", [
|
|
37
|
-
`--${e.size}`,
|
|
38
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
39
|
-
g.value,
|
|
40
|
-
B.value,
|
|
41
|
-
k.value,
|
|
42
|
-
{
|
|
43
|
-
"--block": e.block,
|
|
44
|
-
"--no-underline": e.noUnderline,
|
|
45
|
-
"--fab": e.fab,
|
|
46
|
-
"--loading": e.loading,
|
|
47
|
-
"--disabled": p.value,
|
|
48
|
-
"--rounded": e.rounded,
|
|
49
|
-
"--no-rounded": e.noRounded,
|
|
50
|
-
"--no-padding": e.noPadding,
|
|
51
|
-
"--no-elevation": e.noElevation
|
|
52
|
-
}
|
|
53
|
-
]]),
|
|
54
|
-
style: S([`--justify: ${e.justify}`]),
|
|
55
|
-
type: h.value
|
|
56
|
-
}, {
|
|
57
|
-
default: j(() => [
|
|
58
|
-
i(e.$slots, "left-icon", {}, () => [
|
|
59
|
-
typeof e.leftIcon == "string" ? (t(), l(u(c), {
|
|
60
|
-
key: 0,
|
|
61
|
-
name: e.leftIcon,
|
|
62
|
-
class: a([s.value])
|
|
63
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(r(e.leftIcon), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: a([s.value])
|
|
66
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
67
|
-
], !0),
|
|
68
|
-
i(e.$slots, "icon", {}, () => [
|
|
69
|
-
typeof e.icon == "string" ? (t(), l(u(c), {
|
|
70
|
-
key: 0,
|
|
71
|
-
name: e.icon,
|
|
72
|
-
class: a([s.value])
|
|
73
|
-
}, null, 8, ["name", "class"])) : e.icon ? (t(), l(r(e.icon), {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: a([s.value])
|
|
76
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
77
|
-
], !0),
|
|
78
|
-
i(e.$slots, "default", {}, void 0, !0),
|
|
79
|
-
i(e.$slots, "right-icon", {}, () => [
|
|
80
|
-
typeof e.rightIcon == "string" ? (t(), l(u(c), {
|
|
81
|
-
key: 0,
|
|
82
|
-
name: e.rightIcon,
|
|
83
|
-
class: a([s.value])
|
|
84
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(r(e.rightIcon), {
|
|
85
|
-
key: 1,
|
|
86
|
-
class: a([s.value])
|
|
87
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
88
|
-
], !0),
|
|
89
|
-
I.value ? (t(), M("div", O, [
|
|
90
|
-
E(u(v), {
|
|
91
|
-
size: "2em",
|
|
92
|
-
color: e.color
|
|
93
|
-
}, null, 8, ["color"])
|
|
94
|
-
])) : d("v-if", !0)
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
/* FORWARDED */
|
|
98
|
-
}, 8, ["disabled", "class", "style", "type"]));
|
|
99
|
-
}
|
|
100
|
-
}), R = /* @__PURE__ */ F(A, [["__scopeId", "data-v-bee684ff"]]);
|
|
101
|
-
export {
|
|
102
|
-
R as default
|
|
103
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./MazPhoneNumberInput-BAGcArnr.mjs";
|
|
3
|
-
import '../assets/MazBtn.css';const O = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-btn-loader-container"
|
|
6
|
-
}, A = /* @__PURE__ */ C({
|
|
7
|
-
__name: "MazBtn",
|
|
8
|
-
props: {
|
|
9
|
-
variant: { default: "button" },
|
|
10
|
-
size: { default: "md" },
|
|
11
|
-
color: { default: "primary" },
|
|
12
|
-
type: { default: "button" },
|
|
13
|
-
rounded: { type: Boolean },
|
|
14
|
-
roundedSize: { default: "lg" },
|
|
15
|
-
noRounded: { type: Boolean },
|
|
16
|
-
outline: { type: Boolean },
|
|
17
|
-
pastel: { type: Boolean },
|
|
18
|
-
block: { type: Boolean },
|
|
19
|
-
noUnderline: { type: Boolean },
|
|
20
|
-
loading: { type: Boolean },
|
|
21
|
-
disabled: { type: Boolean },
|
|
22
|
-
fab: { type: Boolean },
|
|
23
|
-
icon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
-
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
-
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
26
|
-
noPadding: { type: Boolean },
|
|
27
|
-
noElevation: { type: Boolean },
|
|
28
|
-
justify: { default: "center" }
|
|
29
|
-
},
|
|
30
|
-
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-DOPjHhPx.mjs")), c = m(() => import("./MazIcon-BSUswKRF.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
|
-
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "maz-text-xl");
|
|
34
|
-
return (e, D) => (t(), l(r(f.value), {
|
|
35
|
-
disabled: p.value || void 0,
|
|
36
|
-
class: a(["m-btn", [
|
|
37
|
-
`--${e.size}`,
|
|
38
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
39
|
-
g.value,
|
|
40
|
-
B.value,
|
|
41
|
-
k.value,
|
|
42
|
-
{
|
|
43
|
-
"--block": e.block,
|
|
44
|
-
"--no-underline": e.noUnderline,
|
|
45
|
-
"--fab": e.fab,
|
|
46
|
-
"--loading": e.loading,
|
|
47
|
-
"--disabled": p.value,
|
|
48
|
-
"--rounded": e.rounded,
|
|
49
|
-
"--no-rounded": e.noRounded,
|
|
50
|
-
"--no-padding": e.noPadding,
|
|
51
|
-
"--no-elevation": e.noElevation
|
|
52
|
-
}
|
|
53
|
-
]]),
|
|
54
|
-
style: S([`--justify: ${e.justify}`]),
|
|
55
|
-
type: h.value
|
|
56
|
-
}, {
|
|
57
|
-
default: j(() => [
|
|
58
|
-
i(e.$slots, "left-icon", {}, () => [
|
|
59
|
-
typeof e.leftIcon == "string" ? (t(), l(u(c), {
|
|
60
|
-
key: 0,
|
|
61
|
-
name: e.leftIcon,
|
|
62
|
-
class: a([s.value])
|
|
63
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(r(e.leftIcon), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: a([s.value])
|
|
66
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
67
|
-
], !0),
|
|
68
|
-
i(e.$slots, "icon", {}, () => [
|
|
69
|
-
typeof e.icon == "string" ? (t(), l(u(c), {
|
|
70
|
-
key: 0,
|
|
71
|
-
name: e.icon,
|
|
72
|
-
class: a([s.value])
|
|
73
|
-
}, null, 8, ["name", "class"])) : e.icon ? (t(), l(r(e.icon), {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: a([s.value])
|
|
76
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
77
|
-
], !0),
|
|
78
|
-
i(e.$slots, "default", {}, void 0, !0),
|
|
79
|
-
i(e.$slots, "right-icon", {}, () => [
|
|
80
|
-
typeof e.rightIcon == "string" ? (t(), l(u(c), {
|
|
81
|
-
key: 0,
|
|
82
|
-
name: e.rightIcon,
|
|
83
|
-
class: a([s.value])
|
|
84
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(r(e.rightIcon), {
|
|
85
|
-
key: 1,
|
|
86
|
-
class: a([s.value])
|
|
87
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
88
|
-
], !0),
|
|
89
|
-
I.value ? (t(), M("div", O, [
|
|
90
|
-
E(u(v), {
|
|
91
|
-
size: "2em",
|
|
92
|
-
color: e.color
|
|
93
|
-
}, null, 8, ["color"])
|
|
94
|
-
])) : d("v-if", !0)
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
/* FORWARDED */
|
|
98
|
-
}, 8, ["disabled", "class", "style", "type"]));
|
|
99
|
-
}
|
|
100
|
-
}), R = /* @__PURE__ */ F(A, [["__scopeId", "data-v-bee684ff"]]);
|
|
101
|
-
export {
|
|
102
|
-
R as default
|
|
103
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, defineAsyncComponent as m, useAttrs as $, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as r, normalizeClass as a, normalizeStyle as S, withCtx as j, renderSlot as i, unref as u, createCommentVNode as d, createElementBlock as M, createVNode as E } from "vue";
|
|
2
|
-
import { _ as F } from "./MazDialogPromise-CpVRFbno.mjs";
|
|
3
|
-
import '../assets/MazBtn.css';const O = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-btn-loader-container"
|
|
6
|
-
}, A = /* @__PURE__ */ C({
|
|
7
|
-
__name: "MazBtn",
|
|
8
|
-
props: {
|
|
9
|
-
variant: { default: "button" },
|
|
10
|
-
size: { default: "md" },
|
|
11
|
-
color: { default: "primary" },
|
|
12
|
-
type: { default: "button" },
|
|
13
|
-
rounded: { type: Boolean },
|
|
14
|
-
roundedSize: { default: "lg" },
|
|
15
|
-
noRounded: { type: Boolean },
|
|
16
|
-
outline: { type: Boolean },
|
|
17
|
-
pastel: { type: Boolean },
|
|
18
|
-
block: { type: Boolean },
|
|
19
|
-
noUnderline: { type: Boolean },
|
|
20
|
-
loading: { type: Boolean },
|
|
21
|
-
disabled: { type: Boolean },
|
|
22
|
-
fab: { type: Boolean },
|
|
23
|
-
icon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
-
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
-
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
26
|
-
noPadding: { type: Boolean },
|
|
27
|
-
noElevation: { type: Boolean },
|
|
28
|
-
justify: { default: "center" }
|
|
29
|
-
},
|
|
30
|
-
setup(y) {
|
|
31
|
-
const n = y, v = m(() => import("./MazSpinner-Bn4pnCJx.mjs")), c = m(() => import("./MazIcon-_hN-Kivn.mjs")), { href: b, to: z } = $(), f = o(() => b ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), p = o(
|
|
32
|
-
() => (n.loading || n.disabled) && f.value === "button"
|
|
33
|
-
), B = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), h = o(() => f.value === "button" ? n.type : void 0), s = o(() => n.size === "xl" ? "maz-text-3xl" : n.size === "lg" ? "maz-text-2xl" : n.size === "md" ? "maz-text-xl" : n.size === "sm" ? "maz-text-lg" : n.size === "xs" ? "maz-text-base" : n.size === "mini" ? "maz-text-sm" : "maz-text-xl");
|
|
34
|
-
return (e, D) => (t(), l(r(f.value), {
|
|
35
|
-
disabled: p.value || void 0,
|
|
36
|
-
class: a(["m-btn", [
|
|
37
|
-
`--${e.size}`,
|
|
38
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
39
|
-
g.value,
|
|
40
|
-
B.value,
|
|
41
|
-
k.value,
|
|
42
|
-
{
|
|
43
|
-
"--block": e.block,
|
|
44
|
-
"--no-underline": e.noUnderline,
|
|
45
|
-
"--fab": e.fab,
|
|
46
|
-
"--loading": e.loading,
|
|
47
|
-
"--disabled": p.value,
|
|
48
|
-
"--rounded": e.rounded,
|
|
49
|
-
"--no-rounded": e.noRounded,
|
|
50
|
-
"--no-padding": e.noPadding,
|
|
51
|
-
"--no-elevation": e.noElevation
|
|
52
|
-
}
|
|
53
|
-
]]),
|
|
54
|
-
style: S([`--justify: ${e.justify}`]),
|
|
55
|
-
type: h.value
|
|
56
|
-
}, {
|
|
57
|
-
default: j(() => [
|
|
58
|
-
i(e.$slots, "left-icon", {}, () => [
|
|
59
|
-
typeof e.leftIcon == "string" ? (t(), l(u(c), {
|
|
60
|
-
key: 0,
|
|
61
|
-
name: e.leftIcon,
|
|
62
|
-
class: a([s.value])
|
|
63
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(r(e.leftIcon), {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: a([s.value])
|
|
66
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
67
|
-
], !0),
|
|
68
|
-
i(e.$slots, "icon", {}, () => [
|
|
69
|
-
typeof e.icon == "string" ? (t(), l(u(c), {
|
|
70
|
-
key: 0,
|
|
71
|
-
name: e.icon,
|
|
72
|
-
class: a([s.value])
|
|
73
|
-
}, null, 8, ["name", "class"])) : e.icon ? (t(), l(r(e.icon), {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: a([s.value])
|
|
76
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
77
|
-
], !0),
|
|
78
|
-
i(e.$slots, "default", {}, void 0, !0),
|
|
79
|
-
i(e.$slots, "right-icon", {}, () => [
|
|
80
|
-
typeof e.rightIcon == "string" ? (t(), l(u(c), {
|
|
81
|
-
key: 0,
|
|
82
|
-
name: e.rightIcon,
|
|
83
|
-
class: a([s.value])
|
|
84
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(r(e.rightIcon), {
|
|
85
|
-
key: 1,
|
|
86
|
-
class: a([s.value])
|
|
87
|
-
}, null, 8, ["class"])) : d("v-if", !0)
|
|
88
|
-
], !0),
|
|
89
|
-
I.value ? (t(), M("div", O, [
|
|
90
|
-
E(u(v), {
|
|
91
|
-
size: "2em",
|
|
92
|
-
color: e.color
|
|
93
|
-
}, null, 8, ["color"])
|
|
94
|
-
])) : d("v-if", !0)
|
|
95
|
-
]),
|
|
96
|
-
_: 3
|
|
97
|
-
/* FORWARDED */
|
|
98
|
-
}, 8, ["disabled", "class", "style", "type"]));
|
|
99
|
-
}
|
|
100
|
-
}), R = /* @__PURE__ */ F(A, [["__scopeId", "data-v-bee684ff"]]);
|
|
101
|
-
export {
|
|
102
|
-
R as default
|
|
103
|
-
};
|