maz-ui 3.47.2-beta.19 → 3.47.2-beta.20

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.
Files changed (50) hide show
  1. package/components/MazBackdrop.d.ts +21 -13
  2. package/components/MazBackdrop.mjs +107 -82
  3. package/components/MazBottomSheet.d.ts +11 -24
  4. package/components/MazBottomSheet.mjs +1 -1
  5. package/components/MazDialog.d.ts +20 -31
  6. package/components/MazDialog.mjs +1 -1
  7. package/components/MazDialogPromise.d.ts +3 -3
  8. package/components/MazDialogPromise.mjs +1 -1
  9. package/components/MazDrawer.d.ts +7 -4
  10. package/components/MazDrawer.mjs +2 -194
  11. package/components/assets/MazBackdrop.css +1 -1
  12. package/components/assets/MazBottomSheet.css +1 -1
  13. package/components/assets/MazDialog.css +1 -1
  14. package/components/assets/MazDialogPromise.css +1 -1
  15. package/components/assets/MazDrawer.css +1 -1
  16. package/components/chunks/MazBottomSheet-DGsGO0zo.mjs +224 -0
  17. package/components/chunks/{MazBtn-ZigrzA2_.mjs → MazBtn-BS2kvd1Z.mjs} +2 -2
  18. package/components/chunks/{MazBtn-BDrYYq_W.mjs → MazBtn-C60T0UDa.mjs} +2 -2
  19. package/components/chunks/{MazBtn-BQwIuO_Q.mjs → MazBtn-CsLtHm4K.mjs} +2 -2
  20. package/components/chunks/MazBtn-ZAcYNusG.mjs +103 -0
  21. package/components/chunks/MazDialog-Ca3jJ12T.mjs +297 -0
  22. package/components/chunks/MazDialogPromise-DOnmLhui.mjs +551 -0
  23. package/components/chunks/MazDrawer-Bas9dy0D.mjs +226 -0
  24. package/components/chunks/{MazSpinner-1F6A6qVD.mjs → MazSpinner-C6h03sqc.mjs} +1 -1
  25. package/components/chunks/{MazSpinner-Cc-KlPEG.mjs → MazSpinner-D5Sbo759.mjs} +1 -1
  26. package/components/chunks/{MazSpinner-DzFcVNs_.mjs → MazSpinner-DPur0-r-.mjs} +1 -1
  27. package/components/chunks/{MazSpinner-wQasUhyI.mjs → MazSpinner-ZFhNCy24.mjs} +1 -1
  28. package/css/main.css +1 -1
  29. package/modules/assets/index.css +1 -1
  30. package/modules/chunks/{MazBtn-DZ5uD4Ie.cjs → MazBtn-CFge_w1W.cjs} +1 -1
  31. package/modules/chunks/{MazBtn-C2iBdVnK.mjs → MazBtn-yNCoLFA6.mjs} +2 -2
  32. package/modules/chunks/{MazIcon-trV1gyry.mjs → MazIcon-C3__MBEL.mjs} +1 -1
  33. package/modules/chunks/{MazIcon-BYvF8LQu.cjs → MazIcon-CqhvM2xp.cjs} +1 -1
  34. package/modules/chunks/{MazSpinner-Dxfnhjcc.mjs → MazSpinner-C4XtaFJk.mjs} +1 -1
  35. package/modules/chunks/{MazSpinner-2MEHiA8E.cjs → MazSpinner-DkJAN36F.cjs} +1 -1
  36. package/modules/chunks/{index-BjpJ5NSX.cjs → index-Bawg2UGE.cjs} +2 -2
  37. package/modules/chunks/{index-C3k5P1Gx.mjs → index-CXu9R01-.mjs} +900 -837
  38. package/modules/index.cjs +1 -1
  39. package/modules/index.mjs +1 -1
  40. package/nuxt/index.json +1 -1
  41. package/package.json +1 -1
  42. package/types/components/MazBackdrop.vue.d.ts +21 -13
  43. package/types/components/MazBottomSheet.vue.d.ts +11 -24
  44. package/types/components/MazDialog.vue.d.ts +20 -31
  45. package/types/components/MazDialogPromise.vue.d.ts +3 -3
  46. package/types/components/MazDrawer.vue.d.ts +7 -4
  47. package/components/chunks/MazBottomSheet-B1cqFZxd.mjs +0 -208
  48. package/components/chunks/MazBtn-CIAdgMGr.mjs +0 -111
  49. package/components/chunks/MazDialog-C3h6Ydey.mjs +0 -237
  50. package/components/chunks/MazDialogPromise-BZm1F0X2.mjs +0 -488
package/modules/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-BjpJ5NSX.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.iso6391Codes=e.iso6391Codes;exports.languageCodes=e.languageCodes;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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-Bawg2UGE.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.iso6391Codes=e.iso6391Codes;exports.languageCodes=e.languageCodes;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 { Z as e, a1 as l, P as i, T as t, V as n, a4 as o, Y as r, a7 as u, I as d, M as c, N as m, J as g, K as I, O as v, $ as T, i as p, a0 as y, a2 as C, t as F, H as b, a3 as S, a6 as h, Q as z, g as A, l as D, R as H, S as k, L as w, U as L, W as U, X as W, u as V, a as O, b as Z, c as f, d as j, e as q, f as x, h as B, j as M, k as N, m as R, n as E, o as G, p as J, q as K, r as P, s as Q, v as X, w as Y, x as $, y as _, C as aa, B as sa, E as ea, D as la, z as ia, A as ta, G as na, F as oa, a5 as ra } from "./chunks/index-C3k5P1Gx.mjs";
1
+ import { Z as e, a1 as l, P as i, T as t, V as n, a4 as o, Y as r, a7 as u, I as d, M as c, N as m, J as g, K as I, O as v, $ as T, i as p, a0 as y, a2 as C, t as F, H as b, a3 as S, a6 as h, Q as z, g as A, l as D, R as H, S as k, L as w, U as L, W as U, X as W, u as V, a as O, b as Z, c as f, d as j, e as q, f as x, h as B, j as M, k as N, m as R, n as E, o as G, p as J, q as K, r as P, s as Q, v as X, w as Y, x as $, y as _, C as aa, B as sa, E as ea, D as la, z as ia, A as ta, G as na, F as oa, a5 as ra } from "./chunks/index-CXu9R01-.mjs";
2
2
  export {
3
3
  e as AosHandler,
4
4
  l as DialogHandler,
package/nuxt/index.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "3.47.2-beta.19",
7
+ "version": "3.47.2-beta.20",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "3.47.2-beta.19",
4
+ "version": "3.47.2-beta.20",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -1,13 +1,29 @@
1
1
  import { type HTMLAttributes } from 'vue';
2
- export interface Props {
2
+ export interface MazBackdropProps {
3
+ /** @model Modal's model value */
3
4
  modelValue?: boolean;
5
+ /** Teleport selector */
4
6
  teleportSelector?: string;
7
+ /** Function called before modal is close */
5
8
  beforeClose?: () => Promise<void> | void;
9
+ /** Persistent dialog (not closable by clicking outside and remove close button) */
6
10
  persistent?: boolean;
11
+ /** Prevent close on escape key */
7
12
  noCloseOnEscKey?: boolean;
13
+ /** Transition name */
8
14
  transitionName?: string;
15
+ /** Backdrop class */
9
16
  backdropClass?: HTMLAttributes['class'];
17
+ /** Backdrop content class */
10
18
  backdropContentClass?: HTMLAttributes['class'];
19
+ /** Add padding to the content */
20
+ contentPadding?: boolean;
21
+ /** Justify content */
22
+ justify?: 'center' | 'end' | 'start' | 'space-between' | 'space-around' | 'none';
23
+ /** Align content */
24
+ align?: 'center' | 'end' | 'start' | 'none';
25
+ /** Variant */
26
+ variant?: 'bottom-sheet' | 'dialog' | 'drawer';
11
27
  }
12
28
  declare function close(): void;
13
29
  declare function toggleModal(value: any): Promise<void>;
@@ -20,13 +36,14 @@ declare function __VLS_template(): {
20
36
  slots: {
21
37
  default?(_: {
22
38
  close: typeof close;
39
+ onBackdropClicked: typeof onBackdropClicked;
23
40
  }): any;
24
41
  };
25
42
  refs: {};
26
43
  rootEl: any;
27
44
  };
28
45
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
- declare const __VLS_component: import("vue").DefineComponent<Props, {
46
+ declare const __VLS_component: import("vue").DefineComponent<MazBackdropProps, {
30
47
  onBackdropAnimationEnter: typeof onBackdropAnimationEnter;
31
48
  onBackdropAnimationLeave: typeof onBackdropAnimationLeave;
32
49
  onBackdropClicked: typeof onBackdropClicked;
@@ -39,21 +56,12 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
39
56
  open: (value: void) => any;
40
57
  "update:model-value": (value: boolean) => any;
41
58
  "before-close": (value: void) => any;
42
- }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
59
+ }, string, import("vue").PublicProps, Readonly<MazBackdropProps> & Readonly<{
43
60
  onClose?: ((value?: void | undefined) => any) | undefined;
44
61
  onOpen?: ((value?: void | undefined) => any) | undefined;
45
62
  "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
46
63
  "onBefore-close"?: ((value?: void | undefined) => any) | undefined;
47
- }>, {
48
- modelValue: boolean;
49
- teleportSelector: string;
50
- beforeClose: () => Promise<void> | void;
51
- persistent: boolean;
52
- noCloseOnEscKey: boolean;
53
- transitionName: string;
54
- backdropClass: HTMLAttributes["class"];
55
- backdropContentClass: HTMLAttributes["class"];
56
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
64
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
57
65
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
58
66
  export default _default;
59
67
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,3 +1,11 @@
1
+ type __VLS_Props = {
2
+ /** @model Modal's model value */
3
+ modelValue?: boolean;
4
+ /** Remove the close button */
5
+ noClose?: boolean;
6
+ /** Remove the padding on the container */
7
+ noPadding?: boolean;
8
+ };
1
9
  declare function __VLS_template(): {
2
10
  attrs: Partial<{}>;
3
11
  slots: {
@@ -9,36 +17,15 @@ declare function __VLS_template(): {
9
17
  rootEl: any;
10
18
  };
11
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
- noClose: {
14
- type: BooleanConstructor;
15
- default: boolean;
16
- };
17
- noPadding: {
18
- type: BooleanConstructor;
19
- default: boolean;
20
- };
21
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
21
  close: (...args: any[]) => void;
23
22
  open: (...args: any[]) => void;
24
23
  "update:model-value": (...args: any[]) => void;
25
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
- noClose: {
27
- type: BooleanConstructor;
28
- default: boolean;
29
- };
30
- noPadding: {
31
- type: BooleanConstructor;
32
- default: boolean;
33
- };
34
- }>> & Readonly<{
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
35
25
  onClose?: ((...args: any[]) => any) | undefined;
36
26
  onOpen?: ((...args: any[]) => any) | undefined;
37
27
  "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
38
- }>, {
39
- noPadding: boolean;
40
- noClose: boolean;
41
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
30
  export default _default;
44
31
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { ComponentPublicInstance, HTMLAttributes } from 'vue';
2
- import { type Props as MazBackdropProps } from './MazBackdrop.vue';
2
+ import { nextTick } from 'vue';
3
+ import { type MazBackdropProps } from './MazBackdrop.vue';
3
4
  export interface InternalProps {
4
5
  /** @model Modal's model value */
5
6
  modelValue?: boolean;
@@ -7,31 +8,32 @@ export interface InternalProps {
7
8
  title?: string;
8
9
  /** Remove the close button in header */
9
10
  noClose?: boolean;
10
- /** Modal's width */
11
- width?: string;
12
11
  /** Modal's max-width */
13
12
  maxWidth?: string;
14
- /** Modal's max-height */
15
- maxHeight?: string;
13
+ /** Modal's min-width */
14
+ minWidth?: string;
16
15
  /** Modal's content becomes scrollable - warning: a overflow is applied */
17
16
  scrollable?: boolean;
18
17
  /** Persistent dialog (not closable by clicking outside and remove close button) */
19
18
  persistent?: boolean;
20
19
  }
21
- export type Props = InternalProps & MazBackdropProps;
22
- type __VLS_Props = Props & MazBackdropProps;
20
+ export type MazDialogProps = InternalProps & MazBackdropProps;
21
+ type __VLS_Props = InternalProps & MazBackdropProps;
23
22
  declare function __VLS_template(): {
24
23
  attrs: Partial<{}>;
25
24
  slots: {
26
25
  header?(_: {
27
26
  close: () => void;
27
+ onBackdropClicked: () => void;
28
28
  }): any;
29
29
  title?(_: {}): any;
30
30
  default?(_: {
31
31
  close: () => void;
32
+ onBackdropClicked: () => void;
32
33
  }): any;
33
34
  footer?(_: {
34
35
  close: () => void;
36
+ onBackdropClicked: () => void;
35
37
  }): any;
36
38
  };
37
39
  refs: {
@@ -47,6 +49,10 @@ declare function __VLS_template(): {
47
49
  readonly transitionName?: string | undefined;
48
50
  readonly backdropClass?: HTMLAttributes["class"];
49
51
  readonly backdropContentClass?: HTMLAttributes["class"];
52
+ readonly contentPadding?: boolean | undefined;
53
+ readonly justify?: ("center" | "end" | "start" | "space-between" | "space-around" | "none") | undefined;
54
+ readonly align?: ("center" | "end" | "start" | "none") | undefined;
55
+ readonly variant?: ("bottom-sheet" | "dialog" | "drawer") | undefined;
50
56
  readonly onClose?: ((value?: void | undefined) => any) | undefined;
51
57
  readonly onOpen?: ((value?: void | undefined) => any) | undefined;
52
58
  readonly "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
@@ -84,16 +90,7 @@ declare function __VLS_template(): {
84
90
  open: (value: void) => any;
85
91
  "update:model-value": (value: boolean) => any;
86
92
  "before-close": (value: void) => any;
87
- }, string, {
88
- modelValue: boolean;
89
- teleportSelector: string;
90
- beforeClose: () => Promise<void> | void;
91
- persistent: boolean;
92
- noCloseOnEscKey: boolean;
93
- transitionName: string;
94
- backdropClass: HTMLAttributes["class"];
95
- backdropContentClass: HTMLAttributes["class"];
96
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
93
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
97
94
  beforeCreate?: (() => void) | (() => void)[];
98
95
  created?: (() => void) | (() => void)[];
99
96
  beforeMount?: (() => void) | (() => void)[];
@@ -111,23 +108,14 @@ declare function __VLS_template(): {
111
108
  errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
112
109
  };
113
110
  $forceUpdate: () => void;
114
- $nextTick: typeof import("vue").nextTick;
111
+ $nextTick: typeof nextTick;
115
112
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
116
- } & Readonly<{
117
- modelValue: boolean;
118
- teleportSelector: string;
119
- beforeClose: () => Promise<void> | void;
120
- persistent: boolean;
121
- noCloseOnEscKey: boolean;
122
- transitionName: string;
123
- backdropClass: HTMLAttributes["class"];
124
- backdropContentClass: HTMLAttributes["class"];
125
- }> & Omit<Readonly<MazBackdropProps> & Readonly<{
113
+ } & Readonly<{}> & Omit<Readonly<MazBackdropProps> & Readonly<{
126
114
  onClose?: ((value?: void | undefined) => any) | undefined;
127
115
  onOpen?: ((value?: void | undefined) => any) | undefined;
128
116
  "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
129
117
  "onBefore-close"?: ((value?: void | undefined) => any) | undefined;
130
- }>, "close" | "onBackdropAnimationEnter" | "onBackdropAnimationLeave" | "onBackdropClicked" | "present" | "toggleModal" | "onKeyPress" | ("modelValue" | "teleportSelector" | "beforeClose" | "persistent" | "noCloseOnEscKey" | "transitionName" | "backdropClass" | "backdropContentClass")> & import("vue").ShallowUnwrapRef<{
118
+ }>, "close" | "onBackdropAnimationEnter" | "onBackdropAnimationLeave" | "onBackdropClicked" | "present" | "toggleModal" | "onKeyPress"> & import("vue").ShallowUnwrapRef<{
131
119
  onBackdropAnimationEnter: () => void;
132
120
  onBackdropAnimationLeave: () => void;
133
121
  onBackdropClicked: () => void;
@@ -139,9 +127,11 @@ declare function __VLS_template(): {
139
127
  $slots: {
140
128
  default?(_: {
141
129
  close: () => void;
130
+ onBackdropClicked: () => void;
142
131
  }): any;
143
132
  };
144
133
  }) | null;
134
+ dialogContent: HTMLDivElement;
145
135
  };
146
136
  rootEl: any;
147
137
  };
@@ -158,11 +148,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
158
148
  "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
159
149
  }>, {
160
150
  title: string;
161
- width: string;
162
151
  persistent: boolean;
163
152
  noClose: boolean;
164
153
  maxWidth: string;
165
- maxHeight: string;
154
+ minWidth: string;
166
155
  scrollable: boolean;
167
156
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
168
157
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,5 +1,5 @@
1
1
  import type { DialogCustomButton, DialogData } from './MazDialogPromise/useMazDialogPromise';
2
- import { type Props as MazDialogProps } from './MazDialog.vue';
2
+ import { type MazDialogProps } from './MazDialog.vue';
3
3
  export interface MazDialogPromiseProps {
4
4
  /** Dialog Data - @type DialogData */
5
5
  data?: DialogData;
@@ -13,12 +13,12 @@ export interface MazDialogPromiseProps {
13
13
  export type Props = MazDialogPromiseProps & MazDialogProps & DialogData;
14
14
  export { useMazDialogPromise } from './MazDialogPromise/useMazDialogPromise';
15
15
  export type { ActionButton, DialogButton, DialogCustomButton, DialogData, DialogState, PromiseButton } from './MazDialogPromise/useMazDialogPromise';
16
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").Props & DialogData, {
16
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").MazBackdropProps & DialogData, {
17
17
  close: () => any;
18
18
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
19
  close: (value: void) => any;
20
20
  open: (value: void) => any;
21
- }, string, import("vue").PublicProps, Readonly<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").Props & DialogData> & Readonly<{
21
+ }, string, import("vue").PublicProps, Readonly<MazDialogPromiseProps & import("./MazDialog.vue").InternalProps & import("./MazBackdrop.vue").MazBackdropProps & DialogData> & Readonly<{
22
22
  onClose?: ((value?: void | undefined) => any) | undefined;
23
23
  onOpen?: ((value?: void | undefined) => any) | undefined;
24
24
  }>, {
@@ -1,7 +1,10 @@
1
- export interface Props {
1
+ export interface MazDrawerProps {
2
2
  /** The title of the drawer */
3
3
  title?: string;
4
- /** The variant of the drawer */
4
+ /**
5
+ * The variant of the drawer
6
+ * @values 'right', 'top', 'left', 'bottom'
7
+ */
5
8
  variant?: 'right' | 'top' | 'left' | 'bottom';
6
9
  /** The size of the drawer */
7
10
  size?: string;
@@ -24,12 +27,12 @@ declare function __VLS_template(): {
24
27
  rootEl: any;
25
28
  };
26
29
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
- declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
+ declare const __VLS_component: import("vue").DefineComponent<MazDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
28
31
  close: () => any;
29
32
  open: () => any;
30
33
  "update:model-value": (value: boolean) => any;
31
34
  "before-close": () => any;
32
- }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
35
+ }, string, import("vue").PublicProps, Readonly<MazDrawerProps> & Readonly<{
33
36
  onClose?: (() => any) | undefined;
34
37
  onOpen?: (() => any) | undefined;
35
38
  "onUpdate:model-value"?: ((value: boolean) => any) | undefined;
@@ -1,208 +0,0 @@
1
- import { openBlock as i, createElementBlock as h, createElementVNode as d, defineComponent as M, ref as S, onMounted as V, watch as D, createBlock as k, Teleport as P, createVNode as A, Transition as N, withCtx as v, normalizeClass as b, withModifiers as O, mergeProps as $, renderSlot as z, createCommentVNode as L, defineAsyncComponent as T, unref as w } from "vue";
2
- import '../assets/MazBottomSheet.css';const x = {
3
- xmlns: "http://www.w3.org/2000/svg",
4
- width: "1em",
5
- height: "1em",
6
- fill: "none",
7
- viewBox: "0 0 24 24"
8
- };
9
- function K(a, l) {
10
- return i(), h("svg", x, l[0] || (l[0] = [
11
- d(
12
- "path",
13
- {
14
- stroke: "currentColor",
15
- "stroke-linecap": "round",
16
- "stroke-linejoin": "round",
17
- "stroke-width": "1.5",
18
- d: "M6 18 18 6M6 6l12 12"
19
- },
20
- null,
21
- -1
22
- /* HOISTED */
23
- )
24
- ]));
25
- }
26
- const F = { render: K }, _ = "--backdrop-present", I = /* @__PURE__ */ M({
27
- inheritAttrs: !1,
28
- __name: "MazBackdrop",
29
- props: {
30
- modelValue: { type: Boolean, default: !1 },
31
- teleportSelector: { default: "body" },
32
- beforeClose: { type: Function, default: void 0 },
33
- persistent: { type: Boolean, default: !1 },
34
- noCloseOnEscKey: { type: Boolean, default: !1 },
35
- transitionName: { default: "backdrop-anim" },
36
- backdropClass: { default: void 0 },
37
- backdropContentClass: { default: void 0 }
38
- },
39
- emits: ["open", "close", "update:model-value", "before-close"],
40
- setup(a, { expose: l, emit: r }) {
41
- const o = a, t = r;
42
- function n() {
43
- document.documentElement.classList.add(_);
44
- }
45
- function s() {
46
- document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(_);
47
- }
48
- const c = S(o.modelValue);
49
- function m() {
50
- C(!1);
51
- }
52
- async function C(e) {
53
- var f;
54
- e || (t("before-close"), await ((f = o.beforeClose) == null ? void 0 : f.call(o))), c.value = e;
55
- }
56
- function y() {
57
- t("open");
58
- }
59
- function B() {
60
- t("update:model-value", !1), t("close"), p();
61
- }
62
- function E() {
63
- o.persistent || m();
64
- }
65
- function u(e) {
66
- !o.noCloseOnEscKey && e.key === "Escape" && !o.persistent && m();
67
- }
68
- function g() {
69
- n(), document.addEventListener("keyup", u, !1);
70
- }
71
- function p() {
72
- document.removeEventListener("keyup", u), s();
73
- }
74
- return V(() => {
75
- o.modelValue ? g() : p();
76
- }), D(
77
- () => o.modelValue,
78
- (e) => {
79
- c.value = e, e ? g() : p();
80
- }
81
- ), l({
82
- onBackdropAnimationEnter: y,
83
- onBackdropAnimationLeave: B,
84
- onBackdropClicked: E,
85
- close: m,
86
- present: c,
87
- toggleModal: C,
88
- onKeyPress: u
89
- }), (e, f) => (i(), k(P, { to: e.teleportSelector }, [
90
- A(N, {
91
- appear: "",
92
- name: e.transitionName,
93
- onAfterEnter: y,
94
- onAfterLeave: B
95
- }, {
96
- default: v(() => [
97
- c.value ? (i(), h(
98
- "div",
99
- {
100
- key: 0,
101
- class: b(["m-backdrop --present", [e.backdropClass]]),
102
- tabindex: "-1",
103
- role: "dialog"
104
- },
105
- [
106
- d(
107
- "button",
108
- {
109
- class: b(["m-backdrop-overlay", { "--disabled": e.persistent }]),
110
- tabindex: "-1",
111
- onClick: O(E, ["self"])
112
- },
113
- null,
114
- 2
115
- /* CLASS */
116
- ),
117
- d(
118
- "div",
119
- $({
120
- class: ["m-backdrop-content", e.backdropContentClass]
121
- }, e.$attrs, {
122
- role: "document",
123
- tabindex: "0"
124
- }),
125
- [
126
- z(e.$slots, "default", { close: m })
127
- ],
128
- 16
129
- /* FULL_PROPS */
130
- )
131
- ],
132
- 2
133
- /* CLASS */
134
- )) : L("v-if", !0)
135
- ]),
136
- _: 3
137
- /* FORWARDED */
138
- }, 8, ["name"])
139
- ], 8, ["to"]));
140
- }
141
- }), j = /* @__PURE__ */ M({
142
- __name: "MazBottomSheet",
143
- props: {
144
- noClose: { type: Boolean, default: !1 },
145
- noPadding: { type: Boolean, default: !1 }
146
- },
147
- emits: ["update:model-value", "open", "close"],
148
- setup(a, { emit: l }) {
149
- const r = l, o = T(() => import("./MazBtn-BDrYYq_W.mjs"));
150
- return (t, n) => (i(), k(I, {
151
- "transition-name": "bottom-sheet-anim",
152
- "backdrop-class": "--bottom-sheet",
153
- onClose: n[0] || (n[0] = (s) => t.$emit("close", s)),
154
- onOpen: n[1] || (n[1] = (s) => t.$emit("open", s)),
155
- "onUpdate:modelValue": n[2] || (n[2] = (s) => r("update:model-value", s))
156
- }, {
157
- default: v(({ close: s }) => [
158
- d(
159
- "div",
160
- {
161
- class: b(["m-bottom-sheet__container", {
162
- "maz-py-6": !a.noPadding
163
- }])
164
- },
165
- [
166
- z(t.$slots, "default", { close: s }, () => [
167
- n[3] || (n[3] = d(
168
- "div",
169
- { class: "m-bottom-sheet__content-wrapper" },
170
- [
171
- d("p", null, "Default content")
172
- ],
173
- -1
174
- /* HOISTED */
175
- ))
176
- ], !0),
177
- a.noClose ? L("v-if", !0) : (i(), k(w(o), {
178
- key: 0,
179
- size: "sm",
180
- class: "m-bottom-sheet__close",
181
- color: "transparent",
182
- onClick: s
183
- }, {
184
- default: v(() => [
185
- A(w(F), { class: "maz-text-lg" })
186
- ]),
187
- _: 2
188
- /* DYNAMIC */
189
- }, 1032, ["onClick"]))
190
- ],
191
- 2
192
- /* CLASS */
193
- )
194
- ]),
195
- _: 3
196
- /* FORWARDED */
197
- }));
198
- }
199
- }), q = (a, l) => {
200
- const r = a.__vccOpts || a;
201
- for (const [o, t] of l)
202
- r[o] = t;
203
- return r;
204
- }, X = /* @__PURE__ */ q(j, [["__scopeId", "data-v-96281a7e"]]);
205
- export {
206
- X as M,
207
- q as _
208
- };
@@ -1,111 +0,0 @@
1
- import { defineComponent as $, defineAsyncComponent as b, useAttrs as h, computed as o, openBlock as t, createBlock as l, resolveDynamicComponent as d, normalizeClass as a, normalizeStyle as C, withCtx as j, renderSlot as c, unref as f, createCommentVNode as p, createElementBlock as M, createVNode as O } from "vue";
2
- import '../assets/MazBtn.css';const E = {
3
- key: 0,
4
- class: "m-btn-loader-container"
5
- }, F = /* @__PURE__ */ $({
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(i) {
30
- const n = i, u = b(() => import("./MazSpinner-Cc-KlPEG.mjs")), s = b(() => import("./MazIcon-_hN-Kivn.mjs")), { href: y, to: z } = h(), m = o(() => y ? "a" : z ? "router-link" : "button"), g = o(() => n.pastel ? `--${n.color}-pastel` : n.outline ? `--${n.color}-outline` : `--${n.color}`), v = o(
31
- () => (n.loading || n.disabled) && m.value === "button"
32
- ), B = o(() => v.value ? "--cursor-default" : "--cursor-pointer"), k = o(() => `--is-${n.variant}`), I = o(() => n.loading && n.variant === "button"), S = o(() => m.value === "button" ? n.type : void 0), r = 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");
33
- return (e, D) => (t(), l(d(m.value), {
34
- disabled: v.value || void 0,
35
- class: a(["m-btn", [
36
- `--${e.size}`,
37
- !e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
38
- g.value,
39
- B.value,
40
- k.value,
41
- {
42
- "--block": e.block,
43
- "--no-underline": e.noUnderline,
44
- "--fab": e.fab,
45
- "--loading": e.loading,
46
- "--disabled": v.value,
47
- "--rounded": e.rounded,
48
- "--no-rounded": e.noRounded,
49
- "--no-padding": e.noPadding,
50
- "--no-elevation": e.noElevation
51
- }
52
- ]]),
53
- style: C([`--justify: ${e.justify}`]),
54
- type: S.value
55
- }, {
56
- default: j(() => [
57
- c(e.$slots, "left-icon", {}, () => [
58
- typeof e.leftIcon == "string" ? (t(), l(f(s), {
59
- key: 0,
60
- name: e.leftIcon,
61
- class: a([r.value])
62
- }, null, 8, ["name", "class"])) : e.leftIcon ? (t(), l(d(e.leftIcon), {
63
- key: 1,
64
- class: a([r.value])
65
- }, null, 8, ["class"])) : p("v-if", !0)
66
- ], !0),
67
- c(e.$slots, "icon", {}, () => [
68
- typeof e.icon == "string" ? (t(), l(f(s), {
69
- key: 0,
70
- name: e.icon,
71
- class: a([r.value])
72
- }, null, 8, ["name", "class"])) : e.icon ? (t(), l(d(e.icon), {
73
- key: 1,
74
- class: a([r.value])
75
- }, null, 8, ["class"])) : p("v-if", !0)
76
- ], !0),
77
- c(e.$slots, "default", {}, void 0, !0),
78
- c(e.$slots, "right-icon", {}, () => [
79
- typeof e.rightIcon == "string" ? (t(), l(f(s), {
80
- key: 0,
81
- name: e.rightIcon,
82
- class: a([r.value])
83
- }, null, 8, ["name", "class"])) : e.rightIcon ? (t(), l(d(e.rightIcon), {
84
- key: 1,
85
- class: a([r.value])
86
- }, null, 8, ["class"])) : p("v-if", !0)
87
- ], !0),
88
- I.value ? (t(), M("div", E, [
89
- O(f(u), {
90
- size: "2em",
91
- color: e.color
92
- }, null, 8, ["color"])
93
- ])) : p("v-if", !0)
94
- ]),
95
- _: 3
96
- /* FORWARDED */
97
- }, 8, ["disabled", "class", "style", "type"]));
98
- }
99
- }), P = (i, n) => {
100
- const u = i.__vccOpts || i;
101
- for (const [s, y] of n)
102
- u[s] = y;
103
- return u;
104
- }, A = /* @__PURE__ */ P(F, [["__scopeId", "data-v-bee684ff"]]), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
105
- __proto__: null,
106
- default: A
107
- }, Symbol.toStringTag, { value: "Module" }));
108
- export {
109
- R as M,
110
- P as _
111
- };