maz-ui 3.47.1 → 3.47.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +31 -54
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.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/MazLink.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-CTqI4qhg.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-CXQiXWFr.mjs} +267 -225
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-VTZUhBKC.mjs} +249 -207
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-DC3S-CVu.mjs} +43 -52
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-DzWkS-g8.mjs} +41 -50
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-NE6H-10w.mjs} +38 -47
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-Dj3sW-e5.mjs} +189 -209
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +503 -547
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-DwWiIYAR.mjs} +244 -265
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-BJ07NVXQ.mjs} +160 -180
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/MazSpinner-BymqEMBk.mjs +34 -0
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-DS58mtzm.mjs} +1 -1
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/MazSpinner-Dmkr_r9u.mjs +34 -0
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-CxFUggmu.mjs} +925 -931
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +31 -54
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BRnLMzhy.mjs +0 -118
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DlD5m7T4.mjs +0 -118
- package/components/chunks/MazBtn-Dt8lr0GH.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-Cg26sBU2.mjs +0 -34
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-DlMKBtyt.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-M4r0cykl.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-MZYefBb8.mjs +0 -204
- package/modules/chunks/MazBtn-D_CpNgpD.cjs +0 -9
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
package/modules/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CUNN0eIB.cjs");exports.AosHandler=e.AosHandler;exports.DialogHandler=e.DialogHandler;exports.IdleTimeout=e.IdleTimeout;exports.ScriptLoader=e.ScriptLoader;exports.Swipe=e.Swipe;exports.ToasterHandler=e.ToasterHandler;exports.UserVisibility=e.UserVisibility;exports.WaitHandler=e.WaitHandler;exports.capitalize=e.capitalize;exports.checkAvailability=e.checkAvailability;exports.countryCodeToUnicodeFlag=e.countryCodeToUnicodeFlag;exports.currency=e.currency;exports.date=e.date;exports.debounce=e.debounce;exports.getAosInstance=e.getInstance;exports.injectStrict=e.injectStrict;exports.installAos=e.plugin$7;exports.installDialog=e.installDialog;exports.installDirectives=e.plugin;exports.installFilters=e.installFilters;exports.installToaster=e.installToaster;exports.installWait=e.plugin$8;exports.isClient=e.isClient;exports.isoCodes=e.isoCodes;exports.mount=e.mount;exports.normalizeString=e.normalizeString;exports.number=e.number;exports.sleep=e.sleep;exports.throttle=e.throttle;exports.truthyFilter=e.truthyFilter;exports.useAos=e.useAos;exports.useBreakpoints=e.useBreakpoints;exports.useDialog=e.useDialog;exports.useFormField=e.useFormField;exports.useFormValidator=e.useFormValidator;exports.useIdleTimeout=e.useIdleTimeout;exports.useInstanceUniqId=e.useInstanceUniqId;exports.useLanguageDisplayNames=e.useLanguageDisplayNames;exports.useReadingTime=e.useReadingTime;exports.useStringMatching=e.useStringMatching;exports.useSwipe=e.useSwipe;exports.useThemeHandler=e.useThemeHandler;exports.useTimer=e.useTimer;exports.useToast=e.useToast;exports.useUserVisibility=e.useUserVisibility;exports.useWait=e.useWait;exports.useWindowSize=e.useWindowSize;exports.vClickOutside=e.directive;exports.vClickOutsideInstall=e.plugin$1;exports.vClosable=e.directive$1;exports.vClosableInstall=e.plugin$2;exports.vFullscreenImg=e.directive$3;exports.vFullscreenImgInstall=e.plugin$4;exports.vLazyImg=e.directive$4;exports.vLazyImgInstall=e.plugin$5;exports.vTooltip=e.directive$2;exports.vTooltipInstall=e.plugin$3;exports.vZoomImg=e.vZoomImg;exports.vZoomImgInstall=e.plugin$6;exports.waitInstance=e.instance;
|
package/modules/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as e, a0 as i, O as l, S as t, U as n, a3 as o, X as r, a6 as u, H as c, L as d, M as m, I, J as g, N as v, Z as T, i as p, $ as y, a1 as F, s as b, G as C, a2 as S, a5 as h, P as z, g as A, Q as D, R as H, K as k, T as w, V as L, W as U, u as W, a as V, b as O, c as Z, d as f, e as j, f as q, h as x, j as B, k as M, l as N, m as R, n as E, o as G, p as J, q as K, r as P, t as Q, v as X, w as Y, x as $, B as _, A as aa, D as sa, C as ea, y as ia, z as la, F as ta, E as na, a4 as oa } from "./chunks/index-
|
|
1
|
+
import { Y as e, a0 as i, O as l, S as t, U as n, a3 as o, X as r, a6 as u, H as c, L as d, M as m, I, J as g, N as v, Z as T, i as p, $ as y, a1 as F, s as b, G as C, a2 as S, a5 as h, P as z, g as A, Q as D, R as H, K as k, T as w, V as L, W as U, u as W, a as V, b as O, c as Z, d as f, e as j, f as q, h as x, j as B, k as M, l as N, m as R, n as E, o as G, p as J, q as K, r as P, t as Q, v as X, w as Y, x as $, B as _, A as aa, D as sa, C as ea, y as ia, z as la, F as ta, E as na, a4 as oa } from "./chunks/index-CxFUggmu.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as AosHandler,
|
|
4
4
|
i as DialogHandler,
|
package/nuxt/index.json
CHANGED
package/package.json
CHANGED
|
@@ -97,7 +97,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
97
97
|
};
|
|
98
98
|
}>> & Readonly<{}>, {
|
|
99
99
|
options: Record<string, any>;
|
|
100
|
-
updateMode: "reset" | "resize" | "default" | "none" | "
|
|
100
|
+
updateMode: "reset" | "resize" | "default" | "none" | "active" | "hide" | "show";
|
|
101
101
|
plugins: unknown[];
|
|
102
102
|
datasetIdKey: string;
|
|
103
103
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Color, Size } from './types';
|
|
2
2
|
import { type HTMLAttributes, type Ref, type StyleValue, type ThHTMLAttributes } from 'vue';
|
|
3
|
-
export type { Color, Size };
|
|
3
|
+
export type { Color, Size } from './types';
|
|
4
4
|
export interface HeadersEnriched {
|
|
5
5
|
label: string;
|
|
6
6
|
key?: string;
|
|
@@ -16,9 +16,9 @@ export interface HeadersEnriched {
|
|
|
16
16
|
colspan?: ThHTMLAttributes['colspan'];
|
|
17
17
|
headers?: ThHTMLAttributes['headers'];
|
|
18
18
|
}
|
|
19
|
-
export type Row = Record<string, any> & {
|
|
19
|
+
export type Row<T extends Row<T>> = Record<string, any> & {
|
|
20
20
|
selected?: boolean;
|
|
21
|
-
action?: (row:
|
|
21
|
+
action?: (row: T) => unknown;
|
|
22
22
|
classes?: HTMLAttributes['class'];
|
|
23
23
|
};
|
|
24
24
|
export type Header = string | HeadersEnriched;
|
|
@@ -32,7 +32,7 @@ export interface Translations {
|
|
|
32
32
|
paginationRowsPerPage?: string;
|
|
33
33
|
paginationOf?: string;
|
|
34
34
|
}
|
|
35
|
-
export interface MazTableProps {
|
|
35
|
+
export interface MazTableProps<T extends Row<T>> {
|
|
36
36
|
/** class of the table element */
|
|
37
37
|
tableClass?: HTMLAttributes['class'];
|
|
38
38
|
/** style of the table element */
|
|
@@ -59,7 +59,7 @@ export interface MazTableProps {
|
|
|
59
59
|
/** align all headers */
|
|
60
60
|
headersAlign?: ThHTMLAttributes['align'];
|
|
61
61
|
/** rows of the table - type: `Record<string, string | boolean | number>[]` ; */
|
|
62
|
-
rows?:
|
|
62
|
+
rows?: T[];
|
|
63
63
|
/** add hover effect on rows */
|
|
64
64
|
hoverable?: boolean;
|
|
65
65
|
/** enable search feature into the table header */
|
|
@@ -137,7 +137,15 @@ export interface MazTableProvide {
|
|
|
137
137
|
backgroundEven: Ref<boolean>;
|
|
138
138
|
backgroundOdd: Ref<boolean>;
|
|
139
139
|
}
|
|
140
|
-
declare
|
|
140
|
+
declare const _default: <T extends Row<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
141
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
142
|
+
readonly "onUpdate:model-value"?: ((value: (string | number | boolean | Row<T>)[] | undefined) => any) | undefined;
|
|
143
|
+
readonly "onUpdate:search-query"?: ((searchQuery: string | undefined) => any) | undefined;
|
|
144
|
+
readonly "onUpdate:page"?: ((page: number) => any) | undefined;
|
|
145
|
+
readonly "onUpdate:page-size"?: ((pageSize: number) => any) | undefined;
|
|
146
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:model-value" | "onUpdate:search-query" | "onUpdate:page" | "onUpdate:page-size"> & MazTableProps<T>> & import("vue").PublicProps;
|
|
147
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
148
|
+
attrs: any;
|
|
141
149
|
slots: Partial<Record<`header-label-${string}`, (_: {
|
|
142
150
|
header: {
|
|
143
151
|
label: string;
|
|
@@ -158,7 +166,7 @@ declare function __VLS_template(): {
|
|
|
158
166
|
};
|
|
159
167
|
label: string;
|
|
160
168
|
}) => any>> & Partial<Record<`cell-${string}`, (_: {
|
|
161
|
-
row:
|
|
169
|
+
row: T;
|
|
162
170
|
value: any;
|
|
163
171
|
}) => any>> & {
|
|
164
172
|
title?(_: {}): any;
|
|
@@ -187,62 +195,31 @@ declare function __VLS_template(): {
|
|
|
187
195
|
"actions-header"?(_: {}): any;
|
|
188
196
|
default?(_: {}): any;
|
|
189
197
|
select?(_: {
|
|
190
|
-
row:
|
|
198
|
+
row: T;
|
|
191
199
|
selected: boolean | undefined;
|
|
192
200
|
}): any;
|
|
193
201
|
cell?(_: {
|
|
194
|
-
row:
|
|
202
|
+
row: T;
|
|
195
203
|
value: any;
|
|
196
204
|
}): any;
|
|
197
205
|
actions?(_: {
|
|
198
|
-
row:
|
|
206
|
+
row: T;
|
|
199
207
|
}): any;
|
|
200
208
|
"no-results"?(_: {}): any;
|
|
201
209
|
"no-results-text"?(_: {}): any;
|
|
202
210
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"update:model-value": (value: (string | number | boolean | Row)[] | undefined) => any;
|
|
209
|
-
"update:search-query": (searchQuery: string | undefined) => any;
|
|
210
|
-
"update:page": (page: number) => any;
|
|
211
|
-
"update:page-size": (pageSize: number) => any;
|
|
212
|
-
}, string, import("vue").PublicProps, Readonly<MazTableProps> & Readonly<{
|
|
213
|
-
"onUpdate:model-value"?: ((value: (string | number | boolean | Row)[] | undefined) => any) | undefined;
|
|
214
|
-
"onUpdate:search-query"?: ((searchQuery: string | undefined) => any) | undefined;
|
|
215
|
-
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
216
|
-
"onUpdate:page-size"?: ((pageSize: number) => any) | undefined;
|
|
217
|
-
}>, {
|
|
218
|
-
caption: string;
|
|
219
|
-
title: string;
|
|
220
|
-
size: Size;
|
|
221
|
-
color: Color;
|
|
222
|
-
roundedSize: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
223
|
-
modelValue: (string | boolean | number)[];
|
|
224
|
-
page: number;
|
|
225
|
-
totalPages: number;
|
|
226
|
-
searchPlaceholder: string;
|
|
227
|
-
searchQuery: string;
|
|
228
|
-
captionSide: "top" | "bottom";
|
|
229
|
-
tableLayout: "auto" | "fixed";
|
|
230
|
-
tableClass: HTMLAttributes["class"];
|
|
231
|
-
tableStyle: string | false | import("vue").CSSProperties | StyleValue[] | null;
|
|
232
|
-
headers: Header[];
|
|
233
|
-
headersAlign: "center" | "left" | "right" | "justify" | "char";
|
|
234
|
-
rows: Row[];
|
|
235
|
-
searchByPlaceholder: string;
|
|
236
|
-
searchByAllLabel: string;
|
|
237
|
-
pageSize: number;
|
|
238
|
-
paginationAllLabel: string;
|
|
239
|
-
totalItems: number;
|
|
240
|
-
selectedKey: string;
|
|
241
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
242
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
243
|
-
export default _default;
|
|
244
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
245
|
-
new (): {
|
|
246
|
-
$slots: S;
|
|
211
|
+
emit: {
|
|
212
|
+
(event: "update:model-value", value: (Row<T> | string | number | boolean)[] | undefined): void;
|
|
213
|
+
(event: "update:search-query", searchQuery: string | undefined): void;
|
|
214
|
+
(event: "update:page", page: number): void;
|
|
215
|
+
(event: "update:page-size", pageSize: number): void;
|
|
247
216
|
};
|
|
217
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
218
|
+
[key: string]: any;
|
|
219
|
+
}> & {
|
|
220
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
248
221
|
};
|
|
222
|
+
export default _default;
|
|
223
|
+
type __VLS_PrettifyLocal<T> = {
|
|
224
|
+
[K in keyof T]: T[K];
|
|
225
|
+
} & {};
|
|
@@ -8,7 +8,11 @@ export type ValidationAsync = ValidationSync | BaseSchemaAsync<unknown, unknown,
|
|
|
8
8
|
export type Validation = ValidationAsync;
|
|
9
9
|
export type ValidationIssues = InferIssue<Validation>[];
|
|
10
10
|
export type ExtractModelKey<T> = Extract<keyof T, string>;
|
|
11
|
-
export type FormSchema<Model> =
|
|
11
|
+
export type FormSchema<Model> = {
|
|
12
|
+
[K in ExtractModelKey<Model> as Model[K] extends Required<Model>[K] ? K : never]: Validation;
|
|
13
|
+
} & {
|
|
14
|
+
[K in ExtractModelKey<Model> as Model[K] extends Required<Model>[K] ? never : K]?: Validation;
|
|
15
|
+
};
|
|
12
16
|
export type CustomInstance<Model extends BaseFormPayload> = ComponentInternalInstance & {
|
|
13
17
|
formContexts?: Map<string | symbol | InjectionKey<FormContext<Model>>, FormContext<Model>>;
|
|
14
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { BaseFormPayload, ExtractModelKey, FormFieldOptions } from './types';
|
|
2
|
-
export declare function useFormField<FieldType extends Model[ExtractModelKey<Model>], Model extends BaseFormPayload = BaseFormPayload>(name: ExtractModelKey<Model
|
|
1
|
+
import type { BaseFormPayload, ExtractModelKey, FormFieldOptions, FormSchema } from './types';
|
|
2
|
+
export declare function useFormField<FieldType extends Model[ExtractModelKey<Model>], Model extends BaseFormPayload = BaseFormPayload>(name: ExtractModelKey<FormSchema<Model>>, options?: FormFieldOptions<FieldType>): {
|
|
3
3
|
hasError: import("vue").ComputedRef<boolean>;
|
|
4
4
|
errors: import("vue").ComputedRef<import("./types").ValidationIssues>;
|
|
5
|
-
errorMessage: import("vue").ComputedRef<Record<Extract<keyof Model, string>, string | undefined>[
|
|
5
|
+
errorMessage: import("vue").ComputedRef<Record<Extract<keyof Model, string>, string | undefined>[ExtractModelKey<FormSchema<Model>>]>;
|
|
6
6
|
isValid: import("vue").ComputedRef<boolean>;
|
|
7
7
|
isDirty: import("vue").ComputedRef<boolean>;
|
|
8
8
|
isBlurred: import("vue").ComputedRef<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type { BaseFormPayload,
|
|
2
|
+
import type { BaseFormPayload, FieldsStates, FormValidatorOptions, UseFormValidatorParams } from './types';
|
|
3
3
|
import { scrollToError } from './utils';
|
|
4
|
-
export declare function useFormValidator<Model extends BaseFormPayload
|
|
4
|
+
export declare function useFormValidator<Model extends BaseFormPayload>({ schema, defaultValues, model, options }: UseFormValidatorParams<Model>): {
|
|
5
5
|
identifier: string | symbol;
|
|
6
6
|
isDirty: import("vue").ComputedRef<boolean>;
|
|
7
7
|
isSubmitting: Ref<boolean, boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey } from 'vue';
|
|
2
2
|
import type { BaseFormPayload, CustomInstance, ExtractModelKey, FieldsStates, FieldState, FormContext, FormFieldOptions, FormSchema, StrictOptions, ValidationIssues } from './index';
|
|
3
|
-
export declare function fieldHasValidation<Model extends BaseFormPayload
|
|
3
|
+
export declare function fieldHasValidation<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>>>(field: ModelKey, schema: FormSchema<Model>): boolean;
|
|
4
4
|
export declare function scrollToError(selector?: string): void;
|
|
5
5
|
export declare function getErrorMessages<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<Model> = ExtractModelKey<Model>>(errors: Record<ModelKey, ValidationIssues>, fieldsStates: FieldsStates<Model>): Record<ModelKey, string | undefined>;
|
|
6
6
|
export declare function isEmptyValue(value: unknown): value is "" | null | undefined;
|
|
@@ -10,33 +10,33 @@ export declare function getValidateFunction<Model extends BaseFormPayload, Model
|
|
|
10
10
|
debouncedFields?: StrictOptions<Model>['debouncedFields'];
|
|
11
11
|
throttledFields?: StrictOptions<Model>['throttledFields'];
|
|
12
12
|
}): ((args_0: {
|
|
13
|
-
name:
|
|
13
|
+
name: ExtractModelKey<FormSchema<Model>>;
|
|
14
14
|
fieldState: FieldState<Model, Model[Extract<keyof Model, string>]>;
|
|
15
15
|
schema: FormSchema<Model>;
|
|
16
16
|
payload: Model;
|
|
17
17
|
setError?: boolean;
|
|
18
18
|
setErrorIfInvalidAndNotEmpty?: boolean;
|
|
19
19
|
}) => Promise<void>) | undefined;
|
|
20
|
-
export declare function getFieldState<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
20
|
+
export declare function getFieldState<Model extends BaseFormPayload = BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, schema, initialValue, fieldState, options, }: {
|
|
21
21
|
name: ModelKey;
|
|
22
22
|
schema?: FormSchema<Model>;
|
|
23
23
|
initialValue?: Model[ModelKey];
|
|
24
24
|
fieldState: FieldState<Model>;
|
|
25
25
|
options?: Pick<StrictOptions<Model>, 'debouncedFields' | 'throttledFields' | 'mode'>;
|
|
26
26
|
}): FieldState<Model>;
|
|
27
|
-
export declare function getFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
27
|
+
export declare function getFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ schema, payload, options, }: {
|
|
28
28
|
schema: FormSchema<Model>;
|
|
29
29
|
payload: Partial<Model>;
|
|
30
30
|
options: StrictOptions<Model>;
|
|
31
31
|
}): FieldsStates<Model>;
|
|
32
|
-
export declare function updateFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
32
|
+
export declare function updateFieldsStates<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ fieldsStates, payload, schema, options, updateMode, }: {
|
|
33
33
|
fieldsStates: FieldsStates<Model>;
|
|
34
34
|
payload: Model;
|
|
35
35
|
schema: FormSchema<Model>;
|
|
36
36
|
options: StrictOptions<Model>;
|
|
37
37
|
updateMode?: boolean;
|
|
38
38
|
}): void;
|
|
39
|
-
export declare function updateFieldState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
39
|
+
export declare function updateFieldState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, fieldState, payload, schema, options, updateMode, }: {
|
|
40
40
|
name: ModelKey;
|
|
41
41
|
fieldState: FieldState<Model>;
|
|
42
42
|
payload: Model;
|
|
@@ -55,11 +55,11 @@ export declare function removeEventFromInteractiveElements({ interactiveElements
|
|
|
55
55
|
interactiveElements: HTMLElement[];
|
|
56
56
|
onBlurHandler: () => void;
|
|
57
57
|
}): void;
|
|
58
|
-
export declare function getFieldValidationResult<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
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]>;
|
|
60
60
|
isValid: boolean;
|
|
61
61
|
}>;
|
|
62
|
-
export declare function setFieldValidationState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
62
|
+
export declare function setFieldValidationState<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, fieldState, schema, payload, setError, setErrorIfInvalidAndNotEmpty, }: {
|
|
63
63
|
name: ModelKey;
|
|
64
64
|
fieldState: FieldState<Model>;
|
|
65
65
|
schema: FormSchema<Model>;
|
|
@@ -67,13 +67,13 @@ export declare function setFieldValidationState<Model extends BaseFormPayload, M
|
|
|
67
67
|
setError?: boolean;
|
|
68
68
|
setErrorIfInvalidAndNotEmpty?: boolean;
|
|
69
69
|
}): Promise<void>;
|
|
70
|
-
export declare function validateField<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
70
|
+
export declare function validateField<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, fieldState, payload, schema, }: {
|
|
71
71
|
name: ModelKey;
|
|
72
72
|
fieldState: FieldState<Model>;
|
|
73
73
|
payload: Model;
|
|
74
74
|
schema: FormSchema<Model>;
|
|
75
75
|
}): Promise<void> | undefined;
|
|
76
|
-
export declare function validateForm<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
76
|
+
export declare function validateForm<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ fieldsStates, payload, showErrors, schema, }: {
|
|
77
77
|
fieldsStates: FieldsStates<Model>;
|
|
78
78
|
showErrors?: boolean;
|
|
79
79
|
payload: Model;
|
|
@@ -84,7 +84,7 @@ export declare function canExecuteValidation<Model extends BaseFormPayload>({ ev
|
|
|
84
84
|
fieldState: FieldState<Model>;
|
|
85
85
|
isSubmitted: boolean;
|
|
86
86
|
}): boolean;
|
|
87
|
-
export declare function handleFieldBlur<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
87
|
+
export declare function handleFieldBlur<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, force, payload, fieldState, schema, isSubmitted, }: {
|
|
88
88
|
name: ModelKey;
|
|
89
89
|
payload: Model;
|
|
90
90
|
fieldState: FieldState<Model>;
|
|
@@ -92,7 +92,7 @@ export declare function handleFieldBlur<Model extends BaseFormPayload, ModelKey
|
|
|
92
92
|
isSubmitted: boolean;
|
|
93
93
|
force?: boolean;
|
|
94
94
|
}): Promise<void> | undefined;
|
|
95
|
-
export declare function handleFieldInput<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<Model
|
|
95
|
+
export declare function handleFieldInput<Model extends BaseFormPayload, ModelKey extends ExtractModelKey<FormSchema<Model>> = ExtractModelKey<FormSchema<Model>>>({ name, payload, fieldState, schema, isSubmitted, forceValidation, }: {
|
|
96
96
|
name: ModelKey;
|
|
97
97
|
payload: Model;
|
|
98
98
|
fieldState: FieldState<Model>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface MazFullscreenImgProps {
|
|
2
2
|
src: string;
|
|
3
3
|
clickedElementBounds?: {
|
|
4
4
|
top: number;
|
|
@@ -14,15 +14,15 @@ export interface Props {
|
|
|
14
14
|
openInstanceClass?: string;
|
|
15
15
|
clickedElement: HTMLElement;
|
|
16
16
|
destroy?: () => void;
|
|
17
|
-
alt?: string;
|
|
17
|
+
alt?: string | null;
|
|
18
18
|
zoom?: boolean;
|
|
19
19
|
}
|
|
20
|
-
declare const _default: import("vue").DefineComponent<
|
|
20
|
+
declare const _default: import("vue").DefineComponent<MazFullscreenImgProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
21
|
close: (...args: any[]) => void;
|
|
22
22
|
"before-close": (...args: any[]) => void;
|
|
23
23
|
previous: (...args: any[]) => void;
|
|
24
24
|
next: (...args: any[]) => void;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<MazFullscreenImgProps> & Readonly<{
|
|
26
26
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
27
27
|
"onBefore-close"?: ((...args: any[]) => any) | undefined;
|
|
28
28
|
onPrevious?: ((...args: any[]) => any) | undefined;
|
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
41
41
|
width: number;
|
|
42
42
|
};
|
|
43
43
|
openInstanceClass: string;
|
|
44
|
-
alt: string;
|
|
44
|
+
alt: string | null;
|
|
45
45
|
zoom: boolean;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
47
|
export default _default;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, defineAsyncComponent as g, useAttrs as F, useSlots as w, computed as t, openBlock as l, createBlock as a, resolveDynamicComponent as c, normalizeClass as s, withCtx as E, createCommentVNode as o, renderSlot as f, unref as y, createElementBlock as P, createVNode as R } from "vue";
|
|
2
|
-
import '../assets/MazBtn.css';const A = {
|
|
3
|
-
key: 2,
|
|
4
|
-
class: "m-btn-loader-container"
|
|
5
|
-
}, D = /* @__PURE__ */ T({
|
|
6
|
-
__name: "MazBtn",
|
|
7
|
-
props: {
|
|
8
|
-
variant: { default: "button" },
|
|
9
|
-
size: { default: "md" },
|
|
10
|
-
color: { default: "primary" },
|
|
11
|
-
type: { default: "button" },
|
|
12
|
-
rounded: { type: Boolean },
|
|
13
|
-
roundedSize: { default: "lg" },
|
|
14
|
-
noRounded: { type: Boolean },
|
|
15
|
-
outline: { type: Boolean },
|
|
16
|
-
pastel: { type: Boolean },
|
|
17
|
-
block: { type: Boolean },
|
|
18
|
-
noUnderline: { type: Boolean },
|
|
19
|
-
loading: { type: Boolean },
|
|
20
|
-
disabled: { type: Boolean },
|
|
21
|
-
fab: { type: Boolean },
|
|
22
|
-
icon: { type: [String, Function, Object], default: void 0 },
|
|
23
|
-
leftIcon: { type: [String, Function, Object], default: void 0 },
|
|
24
|
-
rightIcon: { type: [String, Function, Object], default: void 0 },
|
|
25
|
-
noPadding: { type: Boolean },
|
|
26
|
-
noElevation: { type: Boolean },
|
|
27
|
-
justify: { default: "center" }
|
|
28
|
-
},
|
|
29
|
-
setup(u) {
|
|
30
|
-
const n = u, d = g(() => import("./MazSpinner-Cb3_S0zT.mjs")), r = g(() => import("./MazIcon-BbvBov5G.mjs")), { href: p, to: h } = F(), v = w(), m = t(() => p ? "a" : h ? "router-link" : "button"), j = t(
|
|
31
|
-
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
32
|
-
), b = t(
|
|
33
|
-
() => (n.loading || n.disabled) && m.value === "button"
|
|
34
|
-
), I = t(() => b.value ? "--cursor-default" : "--cursor-pointer"), k = t(() => `--is-${n.variant}`), B = t(() => n.loading && n.variant === "button"), C = t(() => !!v["left-icon"] || n.leftIcon), z = t(() => !!v["right-icon"] || n.rightIcon), S = t(() => C.value || z.value), $ = t(() => n.icon || !!v.icon), M = t(() => m.value === "button" ? n.type : void 0), i = t(() => 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" : "md"), O = t(() => n.justify === "start" ? "maz-justify-start" : n.justify === "end" ? "maz-justify-end" : n.justify === "center" ? "maz-justify-center" : n.justify === "between" ? "maz-justify-between" : n.justify === "around" ? "maz-justify-around" : n.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
|
|
35
|
-
return (e, U) => (l(), a(c(m.value), {
|
|
36
|
-
disabled: b.value || void 0,
|
|
37
|
-
class: s(["m-btn", [
|
|
38
|
-
`--${e.size}`,
|
|
39
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
40
|
-
j.value,
|
|
41
|
-
I.value,
|
|
42
|
-
k.value,
|
|
43
|
-
O.value,
|
|
44
|
-
{
|
|
45
|
-
"--block": e.block,
|
|
46
|
-
"--no-underline": e.noUnderline,
|
|
47
|
-
"--fab": e.fab,
|
|
48
|
-
"--loading": e.loading,
|
|
49
|
-
"--disabled": b.value,
|
|
50
|
-
"--icon": S.value,
|
|
51
|
-
"--rounded": e.rounded,
|
|
52
|
-
"--no-rounded": e.noRounded,
|
|
53
|
-
"--no-padding": e.noPadding,
|
|
54
|
-
"--no-elevation": e.noElevation
|
|
55
|
-
}
|
|
56
|
-
]]),
|
|
57
|
-
type: M.value
|
|
58
|
-
}, {
|
|
59
|
-
default: E(() => [
|
|
60
|
-
o(`
|
|
61
|
-
@slot left-icon - The icon to display on the left of the button
|
|
62
|
-
`),
|
|
63
|
-
f(e.$slots, "left-icon", {}, () => [
|
|
64
|
-
typeof e.leftIcon == "string" ? (l(), a(y(r), {
|
|
65
|
-
key: 0,
|
|
66
|
-
name: e.leftIcon,
|
|
67
|
-
class: s([i.value])
|
|
68
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (l(), a(c(e.leftIcon), {
|
|
69
|
-
key: 1,
|
|
70
|
-
class: s([i.value])
|
|
71
|
-
}, null, 8, ["class"])) : o("v-if", !0)
|
|
72
|
-
], !0),
|
|
73
|
-
o(`
|
|
74
|
-
@slot icon - The icon to display on the fab button
|
|
75
|
-
`),
|
|
76
|
-
$.value ? f(e.$slots, "icon", { key: 0 }, () => [
|
|
77
|
-
typeof e.icon == "string" ? (l(), a(y(r), {
|
|
78
|
-
key: 0,
|
|
79
|
-
name: e.icon,
|
|
80
|
-
class: s([i.value])
|
|
81
|
-
}, null, 8, ["name", "class"])) : e.icon ? (l(), a(c(e.icon), {
|
|
82
|
-
key: 1,
|
|
83
|
-
class: s([i.value])
|
|
84
|
-
}, null, 8, ["class"])) : o("v-if", !0)
|
|
85
|
-
], !0) : o("v-if", !0),
|
|
86
|
-
o(`
|
|
87
|
-
@slot default - The content of the button
|
|
88
|
-
`),
|
|
89
|
-
f(e.$slots, "default", {}, void 0, !0),
|
|
90
|
-
o(`
|
|
91
|
-
@slot left-icon - The icon to display on the left of the button
|
|
92
|
-
`),
|
|
93
|
-
z.value ? f(e.$slots, "right-icon", { key: 1 }, () => [
|
|
94
|
-
typeof e.rightIcon == "string" ? (l(), a(y(r), {
|
|
95
|
-
key: 0,
|
|
96
|
-
name: e.rightIcon,
|
|
97
|
-
class: s([i.value])
|
|
98
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (l(), a(c(e.rightIcon), {
|
|
99
|
-
key: 1,
|
|
100
|
-
class: s([i.value])
|
|
101
|
-
}, null, 8, ["class"])) : o("v-if", !0)
|
|
102
|
-
], !0) : o("v-if", !0),
|
|
103
|
-
B.value ? (l(), P("div", A, [
|
|
104
|
-
R(y(d), {
|
|
105
|
-
size: "2em",
|
|
106
|
-
color: e.color
|
|
107
|
-
}, null, 8, ["color"])
|
|
108
|
-
])) : o("v-if", !0)
|
|
109
|
-
]),
|
|
110
|
-
_: 3
|
|
111
|
-
/* FORWARDED */
|
|
112
|
-
}, 8, ["disabled", "class", "type"]));
|
|
113
|
-
}
|
|
114
|
-
}), L = (u, n) => {
|
|
115
|
-
const d = u.__vccOpts || u;
|
|
116
|
-
for (const [r, p] of n)
|
|
117
|
-
d[r] = p;
|
|
118
|
-
return d;
|
|
119
|
-
}, N = /* @__PURE__ */ L(D, [["__scopeId", "data-v-d3a1ed01"]]), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
120
|
-
__proto__: null,
|
|
121
|
-
default: N
|
|
122
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
123
|
-
export {
|
|
124
|
-
q as M,
|
|
125
|
-
L as _
|
|
126
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, defineAsyncComponent as v, useAttrs as w, useSlots as E, computed as o, openBlock as l, createBlock as a, resolveDynamicComponent as r, normalizeClass as s, withCtx as O, createCommentVNode as t, renderSlot as u, unref as d, createElementBlock as R, createVNode as A } from "vue";
|
|
2
|
-
import { _ as D } from "./MazChecklist-BLxsNHMP.mjs";
|
|
3
|
-
import '../assets/MazBtn.css';const L = {
|
|
4
|
-
key: 2,
|
|
5
|
-
class: "m-btn-loader-container"
|
|
6
|
-
}, N = /* @__PURE__ */ M({
|
|
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(b) {
|
|
31
|
-
const n = b, z = v(() => import("./MazSpinner-Cg26sBU2.mjs")), c = v(() => import("./MazIcon-BbvBov5G.mjs")), { href: h, to: g } = w(), f = E(), y = o(() => h ? "a" : g ? "router-link" : "button"), j = o(
|
|
32
|
-
() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`
|
|
33
|
-
), p = o(
|
|
34
|
-
() => (n.loading || n.disabled) && y.value === "button"
|
|
35
|
-
), I = o(() => p.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), B = o(() => n.loading && n.variant === "button"), C = o(() => !!f["left-icon"] || n.leftIcon), m = o(() => !!f["right-icon"] || n.rightIcon), S = o(() => C.value || m.value), $ = o(() => n.icon || !!f.icon), T = o(() => y.value === "button" ? n.type : void 0), i = 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" : "md"), F = o(() => n.justify === "start" ? "maz-justify-start" : n.justify === "end" ? "maz-justify-end" : n.justify === "center" ? "maz-justify-center" : n.justify === "between" ? "maz-justify-between" : n.justify === "around" ? "maz-justify-around" : n.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
|
|
36
|
-
return (e, P) => (l(), a(r(y.value), {
|
|
37
|
-
disabled: p.value || void 0,
|
|
38
|
-
class: s(["m-btn", [
|
|
39
|
-
`--${e.size}`,
|
|
40
|
-
!e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
|
|
41
|
-
j.value,
|
|
42
|
-
I.value,
|
|
43
|
-
k.value,
|
|
44
|
-
F.value,
|
|
45
|
-
{
|
|
46
|
-
"--block": e.block,
|
|
47
|
-
"--no-underline": e.noUnderline,
|
|
48
|
-
"--fab": e.fab,
|
|
49
|
-
"--loading": e.loading,
|
|
50
|
-
"--disabled": p.value,
|
|
51
|
-
"--icon": S.value,
|
|
52
|
-
"--rounded": e.rounded,
|
|
53
|
-
"--no-rounded": e.noRounded,
|
|
54
|
-
"--no-padding": e.noPadding,
|
|
55
|
-
"--no-elevation": e.noElevation
|
|
56
|
-
}
|
|
57
|
-
]]),
|
|
58
|
-
type: T.value
|
|
59
|
-
}, {
|
|
60
|
-
default: O(() => [
|
|
61
|
-
t(`
|
|
62
|
-
@slot left-icon - The icon to display on the left of the button
|
|
63
|
-
`),
|
|
64
|
-
u(e.$slots, "left-icon", {}, () => [
|
|
65
|
-
typeof e.leftIcon == "string" ? (l(), a(d(c), {
|
|
66
|
-
key: 0,
|
|
67
|
-
name: e.leftIcon,
|
|
68
|
-
class: s([i.value])
|
|
69
|
-
}, null, 8, ["name", "class"])) : e.leftIcon ? (l(), a(r(e.leftIcon), {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: s([i.value])
|
|
72
|
-
}, null, 8, ["class"])) : t("v-if", !0)
|
|
73
|
-
], !0),
|
|
74
|
-
t(`
|
|
75
|
-
@slot icon - The icon to display on the fab button
|
|
76
|
-
`),
|
|
77
|
-
$.value ? u(e.$slots, "icon", { key: 0 }, () => [
|
|
78
|
-
typeof e.icon == "string" ? (l(), a(d(c), {
|
|
79
|
-
key: 0,
|
|
80
|
-
name: e.icon,
|
|
81
|
-
class: s([i.value])
|
|
82
|
-
}, null, 8, ["name", "class"])) : e.icon ? (l(), a(r(e.icon), {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: s([i.value])
|
|
85
|
-
}, null, 8, ["class"])) : t("v-if", !0)
|
|
86
|
-
], !0) : t("v-if", !0),
|
|
87
|
-
t(`
|
|
88
|
-
@slot default - The content of the button
|
|
89
|
-
`),
|
|
90
|
-
u(e.$slots, "default", {}, void 0, !0),
|
|
91
|
-
t(`
|
|
92
|
-
@slot left-icon - The icon to display on the left of the button
|
|
93
|
-
`),
|
|
94
|
-
m.value ? u(e.$slots, "right-icon", { key: 1 }, () => [
|
|
95
|
-
typeof e.rightIcon == "string" ? (l(), a(d(c), {
|
|
96
|
-
key: 0,
|
|
97
|
-
name: e.rightIcon,
|
|
98
|
-
class: s([i.value])
|
|
99
|
-
}, null, 8, ["name", "class"])) : e.rightIcon ? (l(), a(r(e.rightIcon), {
|
|
100
|
-
key: 1,
|
|
101
|
-
class: s([i.value])
|
|
102
|
-
}, null, 8, ["class"])) : t("v-if", !0)
|
|
103
|
-
], !0) : t("v-if", !0),
|
|
104
|
-
B.value ? (l(), R("div", L, [
|
|
105
|
-
A(d(z), {
|
|
106
|
-
size: "2em",
|
|
107
|
-
color: e.color
|
|
108
|
-
}, null, 8, ["color"])
|
|
109
|
-
])) : t("v-if", !0)
|
|
110
|
-
]),
|
|
111
|
-
_: 3
|
|
112
|
-
/* FORWARDED */
|
|
113
|
-
}, 8, ["disabled", "class", "type"]));
|
|
114
|
-
}
|
|
115
|
-
}), q = /* @__PURE__ */ D(N, [["__scopeId", "data-v-d3a1ed01"]]);
|
|
116
|
-
export {
|
|
117
|
-
q as default
|
|
118
|
-
};
|