maz-ui 3.29.0 → 3.29.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/MazAvatar.d.ts +11 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBadge.d.ts +3 -3
- package/components/MazBadge.mjs +1 -1
- package/components/MazDropdown.mjs +59 -55
- package/components/MazFullscreenLoader.mjs +19 -10
- package/components/MazPullToRefresh.d.ts +88 -0
- package/components/MazPullToRefresh.mjs +4 -0
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazFullscreenLoader.css +1 -0
- package/components/assets/MazPullToRefresh.css +1 -0
- package/components/chunks/MazAvatar-0JzIvOc4.mjs +134 -0
- package/components/chunks/{MazLazyImg-65QIsZ1B.mjs → MazLazyImg-evGMN9Pe.mjs} +2 -2
- package/components/chunks/MazPullToRefresh-l6zWVzfv.mjs +183 -0
- package/components/chunks/{MazSpinner-W3TVtT8l.mjs → MazSpinner-J65FS2NQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f5zcetJO.mjs +38 -0
- package/components/index.d.ts +1 -0
- package/components/index.mjs +1 -0
- package/modules/chunks/{MazBtn-OU9ti0GG.mjs → MazBtn-23G6MO1u.mjs} +2 -2
- package/modules/chunks/{MazBtn-5jYVOHi5.cjs → MazBtn-BVge7L6B.cjs} +1 -1
- package/modules/chunks/{MazIcon-mIVA-wm3.mjs → MazIcon-3ecUGYyh.mjs} +1 -1
- package/modules/chunks/{MazIcon-O-Sd2-b9.cjs → MazIcon-tK6rWxmD.cjs} +1 -1
- package/modules/chunks/{MazSpinner-Me_ta933.mjs → MazSpinner-CKpey7-9.mjs} +1 -1
- package/modules/chunks/{MazSpinner-ElCcZG5D.cjs → MazSpinner-Yp72xl7m.cjs} +1 -1
- package/modules/chunks/index-t7LFFnFX.cjs +124 -0
- package/modules/chunks/{index-AC4Cl2MH.mjs → index-w7bAz52b.mjs} +395 -347
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +24 -22
- package/nuxt/index.d.mts +10 -0
- package/nuxt/index.d.ts +10 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +14 -0
- package/package.json +1 -1
- package/tailwindcss/tailwind.config.ts +3 -1
- package/tailwindcss/utils/colors.ts +2 -1
- package/tailwindcss/variables/breakpoints.ts +14 -0
- package/tailwindcss/variables/utilities.ts +3 -1
- package/tailwindcss/variables/z-indexes.ts +2 -1
- package/types/components/MazAvatar.vue.d.ts +11 -0
- package/types/components/MazBadge.vue.d.ts +3 -3
- package/types/components/MazPullToRefresh.vue.d.ts +88 -0
- package/types/components/index.d.ts +1 -0
- package/types/modules/composables/index.d.ts +2 -0
- package/types/modules/composables/use-breakpoints.d.ts +38 -0
- package/types/modules/composables/use-window-size.d.ts +32 -0
- package/types/modules/helpers/is-standalone-mode.d.ts +1 -0
- package/types/tailwindcss/tailwind.config.d.ts +2 -0
- package/types/tailwindcss/variables/breakpoints.d.ts +1 -0
- package/components/chunks/MazAvatar-HJMP2asX.mjs +0 -127
- package/modules/chunks/index-f0w7PwtX.cjs +0 -124
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-t7LFFnFX.cjs");exports.AosHandler=e.AosHandler;exports.IdleTimeout=e.IdleTimeout;exports.ScriptLoader=e.ScriptLoader;exports.ToasterHandler=e.ToasterHandler;exports.UserVisibility=e.UserVisibility;exports.WaitHandler=e.WaitHandler;Object.defineProperty(exports,"aosInstance",{enumerable:!0,get:()=>e.instance$1});exports.capitalize=e.capitalize;exports.countryCodeToUnicodeFlag=e.countryCodeToUnicodeFlag;exports.currency=e.currency;exports.date=e.date;exports.debounce=e.debounce;exports.injectStrict=e.injectStrict;exports.installAos=e.plugin$5;exports.installDirectives=e.installDirectives;exports.installFilters=e.installFilters;exports.installToaster=e.installToaster;exports.installWait=e.plugin$4;exports.isClient=e.isClient;exports.mount=e.mount;exports.number=e.number;exports.sleep=e.sleep;Object.defineProperty(exports,"toastInstance",{enumerable:!0,get:()=>e.toastInstance});exports.truthyFilter=e.truthyFilter;exports.useAos=e.useAos;exports.useBreakpoints=e.useBreakpoints;exports.useIdleTimeout=e.useIdleTimeout;exports.useInstanceUniqId=e.useInstanceUniqId;exports.useMazDialogPromise=e.useMazDialogPromise;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;exports.vClosable=e.directive$1;exports.vClosableInstall=e.plugin$3;exports.vFullscreenImg=e.vFullscreenImg;exports.vFullscreenImgInstall=e.vFullscreenImgInstall;exports.vLazyImg=e.vLazyImg;exports.vLazyImgInstall=e.plugin$1;exports.vZoomImg=e.vZoomImg;exports.vZoomImgInstall=e.plugin$2;exports.waitInstance=e.instance;
|
package/modules/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, I as l, S as t, T as i, U as n, W as o, D as r, q as u, c, r as I, u as m, d, i as v, C as g, b as T, o as y, x as b, z as C, a as
|
|
1
|
+
import { B as e, I as l, S as t, T as i, U as n, W as o, D as r, q as u, c, r as I, u as m, d, i as v, C as g, b as T, o as y, x as b, z as C, a as p, m as z, w as F, s as H, y as U, t as W, G as k, O as A, K as L, F as S, M as h, E as w, N as D, J as O, L as f, H as j, P as q, e as x, p as B, l as M, n as P, j as V, k as Z, v as E, f as G, g as J, h as K, A as N } from "./chunks/index-w7bAz52b.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as AosHandler,
|
|
4
4
|
l as IdleTimeout,
|
|
@@ -18,30 +18,32 @@ export {
|
|
|
18
18
|
y as installFilters,
|
|
19
19
|
b as installToaster,
|
|
20
20
|
C as installWait,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
p as isClient,
|
|
22
|
+
z as mount,
|
|
23
|
+
F as number,
|
|
24
24
|
H as sleep,
|
|
25
25
|
U as toastInstance,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
W as truthyFilter,
|
|
27
|
+
k as useAos,
|
|
28
|
+
A as useBreakpoints,
|
|
29
|
+
L as useIdleTimeout,
|
|
30
|
+
S as useInstanceUniqId,
|
|
31
|
+
h as useMazDialogPromise,
|
|
32
|
+
w as useThemeHandler,
|
|
33
|
+
D as useTimer,
|
|
34
|
+
O as useToast,
|
|
35
|
+
f as useUserVisibility,
|
|
36
|
+
j as useWait,
|
|
37
|
+
q as useWindowSize,
|
|
38
|
+
x as vClickOutside,
|
|
39
|
+
B as vClickOutsideInstall,
|
|
38
40
|
M as vClosable,
|
|
39
|
-
|
|
41
|
+
P as vClosableInstall,
|
|
40
42
|
V as vFullscreenImg,
|
|
41
43
|
Z as vFullscreenImgInstall,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
E as vLazyImg,
|
|
45
|
+
G as vLazyImgInstall,
|
|
46
|
+
J as vZoomImg,
|
|
47
|
+
K as vZoomImgInstall,
|
|
48
|
+
N as waitInstance
|
|
47
49
|
};
|
package/nuxt/index.d.mts
CHANGED
|
@@ -53,6 +53,16 @@ interface MazUiNuxtOptions {
|
|
|
53
53
|
* @default false
|
|
54
54
|
*/
|
|
55
55
|
injectUseTimer?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Enable auto-import of useWindowSize composable
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
injectUseWindowSize?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Enable auto-import of useBreakpoints composable
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
injectUseBreakpoints?: boolean;
|
|
56
66
|
/**
|
|
57
67
|
* Globally install of v-zoom-img directive
|
|
58
68
|
* @default false
|
package/nuxt/index.d.ts
CHANGED
|
@@ -53,6 +53,16 @@ interface MazUiNuxtOptions {
|
|
|
53
53
|
* @default false
|
|
54
54
|
*/
|
|
55
55
|
injectUseTimer?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Enable auto-import of useWindowSize composable
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
injectUseWindowSize?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Enable auto-import of useBreakpoints composable
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
injectUseBreakpoints?: boolean;
|
|
56
66
|
/**
|
|
57
67
|
* Globally install of v-zoom-img directive
|
|
58
68
|
* @default false
|
package/nuxt/index.json
CHANGED
package/nuxt/index.mjs
CHANGED
|
@@ -170,6 +170,20 @@ const module = defineNuxtModule({
|
|
|
170
170
|
as: "useIdleTimeout"
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
+
if (moduleOptions.injectUseWindowSize) {
|
|
174
|
+
addImports({
|
|
175
|
+
from: "maz-ui",
|
|
176
|
+
name: "useWindowSize",
|
|
177
|
+
as: "useWindowSize"
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
if (moduleOptions.injectUseBreakpoints) {
|
|
181
|
+
addImports({
|
|
182
|
+
from: "maz-ui",
|
|
183
|
+
name: "useBreakpoints",
|
|
184
|
+
as: "useBreakpoints"
|
|
185
|
+
});
|
|
186
|
+
}
|
|
173
187
|
if (moduleOptions.injectUseUserVisibility) {
|
|
174
188
|
addImports({
|
|
175
189
|
from: "maz-ui",
|
package/package.json
CHANGED
|
@@ -5,10 +5,12 @@ import plugin from 'tailwindcss/plugin'
|
|
|
5
5
|
import type { Config } from 'tailwindcss'
|
|
6
6
|
|
|
7
7
|
import { utilities } from './variables/utilities'
|
|
8
|
-
import { screens } from './variables/breakpoints'
|
|
8
|
+
import { screens, getNumericScreensFromTailwind } from './variables/breakpoints'
|
|
9
9
|
import { zIndex } from './variables/z-indexes'
|
|
10
10
|
import { getColors } from './utils/colors'
|
|
11
11
|
|
|
12
|
+
export { getNumericScreensFromTailwind }
|
|
13
|
+
|
|
12
14
|
export default {
|
|
13
15
|
darkMode: ['class', '[class~="dark"]'],
|
|
14
16
|
content: [],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ThemeConfig } from 'tailwindcss/types/config'
|
|
1
2
|
import { baseColors, variations, variatingColors } from '../variables/colors'
|
|
2
3
|
|
|
3
4
|
export function getColors() {
|
|
@@ -15,5 +16,5 @@ export function getColors() {
|
|
|
15
16
|
}, {})
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
return colors
|
|
19
|
+
return colors satisfies ThemeConfig['colors']
|
|
19
20
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ThemeConfig } from 'tailwindcss/types/config'
|
|
2
|
+
|
|
1
3
|
export const screens = {
|
|
2
4
|
'mob-s': '320px',
|
|
3
5
|
'mob-m': '425px',
|
|
@@ -11,4 +13,16 @@ export const screens = {
|
|
|
11
13
|
'lap-xl': '1440px', // 2xl
|
|
12
14
|
'lap-2xl': '1680px',
|
|
13
15
|
'lap-3xl': '1920px',
|
|
16
|
+
} satisfies ThemeConfig['screens']
|
|
17
|
+
|
|
18
|
+
export function getNumericScreensFromTailwind<
|
|
19
|
+
T extends Record<string, string> | Record<string, number>,
|
|
20
|
+
>(inputScreens: T) {
|
|
21
|
+
const breakpoints: Record<string, number> = {}
|
|
22
|
+
|
|
23
|
+
for (const [key, value] of Object.entries(inputScreens)) {
|
|
24
|
+
breakpoints[key] = Number.parseInt(value, 10)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return breakpoints as Record<keyof T, number>
|
|
14
28
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ThemeConfig } from 'tailwindcss/types/config'
|
|
2
|
+
|
|
1
3
|
export const utilities = {
|
|
2
4
|
'.padded-container': {
|
|
3
5
|
width: '100%',
|
|
@@ -19,4 +21,4 @@ export const utilities = {
|
|
|
19
21
|
'.cap-f': {
|
|
20
22
|
'@apply first-letter:maz-capitalize': '',
|
|
21
23
|
},
|
|
22
|
-
}
|
|
24
|
+
} satisfies ThemeConfig['utilities']
|
|
@@ -71,6 +71,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
71
|
type: NumberConstructor;
|
|
72
72
|
default: undefined;
|
|
73
73
|
};
|
|
74
|
+
roundedSize: {
|
|
75
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "none" | "full">;
|
|
76
|
+
default: string;
|
|
77
|
+
validator: (value: string) => boolean;
|
|
78
|
+
};
|
|
74
79
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
75
80
|
click: (...args: any[]) => void;
|
|
76
81
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -143,6 +148,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
143
148
|
type: NumberConstructor;
|
|
144
149
|
default: undefined;
|
|
145
150
|
};
|
|
151
|
+
roundedSize: {
|
|
152
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "none" | "full">;
|
|
153
|
+
default: string;
|
|
154
|
+
validator: (value: string) => boolean;
|
|
155
|
+
};
|
|
146
156
|
}>> & {
|
|
147
157
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
148
158
|
}, {
|
|
@@ -163,6 +173,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
163
173
|
buttonColor: Color;
|
|
164
174
|
noClickableIcon: boolean;
|
|
165
175
|
letterCount: number;
|
|
176
|
+
roundedSize: "sm" | "md" | "lg" | "xl" | "none" | "full";
|
|
166
177
|
}, {}>, {
|
|
167
178
|
"round-text"?(_: {}): any;
|
|
168
179
|
icon?(_: {}): any;
|
|
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
26
|
roundedSize: {
|
|
27
|
-
type:
|
|
27
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "none" | "full">;
|
|
28
28
|
default: string;
|
|
29
29
|
validator: (value: string) => boolean;
|
|
30
30
|
};
|
|
@@ -51,7 +51,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
51
51
|
default: boolean;
|
|
52
52
|
};
|
|
53
53
|
roundedSize: {
|
|
54
|
-
type:
|
|
54
|
+
type: PropType<"sm" | "md" | "lg" | "xl" | "none" | "full">;
|
|
55
55
|
default: string;
|
|
56
56
|
validator: (value: string) => boolean;
|
|
57
57
|
};
|
|
@@ -60,8 +60,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
60
60
|
color: BadgeColor;
|
|
61
61
|
outline: boolean;
|
|
62
62
|
pastel: boolean;
|
|
63
|
+
roundedSize: "sm" | "md" | "lg" | "xl" | "none" | "full";
|
|
63
64
|
nowrap: boolean;
|
|
64
|
-
roundedSize: string;
|
|
65
65
|
}, {}>, {
|
|
66
66
|
default?(_: {}): any;
|
|
67
67
|
}>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Color } from './types';
|
|
2
|
+
export type { Color } from './types';
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
distance?: number | undefined;
|
|
5
|
+
offset?: number | undefined;
|
|
6
|
+
action?: (() => unknown) | undefined;
|
|
7
|
+
containerSelector?: string | undefined;
|
|
8
|
+
headerClass?: string | undefined;
|
|
9
|
+
spinnerColor?: Color | undefined;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
|
+
standaloneMode?: boolean | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
distance: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
action: undefined;
|
|
16
|
+
containerSelector: undefined;
|
|
17
|
+
headerClass: undefined;
|
|
18
|
+
spinnerColor: string;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
standaloneMode: boolean;
|
|
21
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
error: (...args: any[]) => void;
|
|
23
|
+
loaded: (...args: any[]) => void;
|
|
24
|
+
start: (...args: any[]) => void;
|
|
25
|
+
finish: (...args: any[]) => void;
|
|
26
|
+
response: (...args: any[]) => void;
|
|
27
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
28
|
+
distance?: number | undefined;
|
|
29
|
+
offset?: number | undefined;
|
|
30
|
+
action?: (() => unknown) | undefined;
|
|
31
|
+
containerSelector?: string | undefined;
|
|
32
|
+
headerClass?: string | undefined;
|
|
33
|
+
spinnerColor?: Color | undefined;
|
|
34
|
+
disabled?: boolean | undefined;
|
|
35
|
+
standaloneMode?: boolean | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
distance: number;
|
|
38
|
+
offset: number;
|
|
39
|
+
action: undefined;
|
|
40
|
+
containerSelector: undefined;
|
|
41
|
+
headerClass: undefined;
|
|
42
|
+
spinnerColor: string;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
standaloneMode: boolean;
|
|
45
|
+
}>>> & {
|
|
46
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
onLoaded?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
onStart?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
onFinish?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onResponse?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
action: () => unknown;
|
|
54
|
+
offset: number;
|
|
55
|
+
distance: number;
|
|
56
|
+
containerSelector: string;
|
|
57
|
+
headerClass: string;
|
|
58
|
+
spinnerColor: Color;
|
|
59
|
+
standaloneMode: boolean;
|
|
60
|
+
}, {}>, {
|
|
61
|
+
"pull-before"?(_: {}): any;
|
|
62
|
+
"pull-ready"?(_: {}): any;
|
|
63
|
+
"pull-loading"?(_: {}): any;
|
|
64
|
+
default?(_: {}): any;
|
|
65
|
+
}>;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
68
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
69
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
70
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
71
|
+
} : {
|
|
72
|
+
type: import('vue').PropType<T[K]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type __VLS_WithDefaults<P, D> = {
|
|
77
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
78
|
+
default: D[K];
|
|
79
|
+
}> : P[K];
|
|
80
|
+
};
|
|
81
|
+
type __VLS_Prettify<T> = {
|
|
82
|
+
[K in keyof T]: T[K];
|
|
83
|
+
} & {};
|
|
84
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
85
|
+
new (): {
|
|
86
|
+
$slots: S;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
@@ -25,6 +25,7 @@ export { default as MazInputTags } from './MazInputTags.vue';
|
|
|
25
25
|
export { default as MazLazyImg } from './MazLazyImg.vue';
|
|
26
26
|
export { default as MazPhoneNumberInput } from './MazPhoneNumberInput.vue';
|
|
27
27
|
export { default as MazPicker } from './MazPicker.vue';
|
|
28
|
+
export { default as MazPullToRefresh } from './MazPullToRefresh.vue';
|
|
28
29
|
export { default as MazRadio } from './MazRadio.vue';
|
|
29
30
|
export { default as MazRadioButtons } from './MazRadioButtons.vue';
|
|
30
31
|
export { default as MazSelect } from './MazSelect.vue';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type UseWindowSizeOptions } from './use-window-size';
|
|
2
|
+
export interface UseBreakpointsOptions extends UseWindowSizeOptions {
|
|
3
|
+
initialWidth?: number;
|
|
4
|
+
initialHeight?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Listen to window `orientationchange` event
|
|
7
|
+
*
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
listenOrientation?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the scrollbar should be included in the width and height
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
includeScrollbar?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* List of breakpoints in format `{ [key: string]: string }` (e.g. `{ 'sm': '640px', 'md': '768px' }`)
|
|
18
|
+
*/
|
|
19
|
+
breakpoints: Record<string, string> | Record<string, number>;
|
|
20
|
+
/**
|
|
21
|
+
* Is the breakpoint when the screen is considered not medium (tablet - e.g. `md`)
|
|
22
|
+
* @default 'md'
|
|
23
|
+
*/
|
|
24
|
+
mediumBreakPoint?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Is the breakpoint when the screen is considered not medium (laptop - e.g. `lg`)
|
|
27
|
+
* @default 'lg'
|
|
28
|
+
*/
|
|
29
|
+
largeBreakPoint?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function useBreakpoints({ initialWidth, initialHeight, includeScrollbar, internalWindow, listenOrientation, breakpoints, mediumBreakPoint, largeBreakPoint, }: UseBreakpointsOptions): {
|
|
32
|
+
width: import("vue").Ref<number>;
|
|
33
|
+
numericBreakpoints: Record<string, number>;
|
|
34
|
+
isSmallScreen: import("vue").ComputedRef<boolean>;
|
|
35
|
+
isLargeScreen: import("vue").ComputedRef<boolean>;
|
|
36
|
+
isMediumScreen: import("vue").ComputedRef<boolean>;
|
|
37
|
+
breakpoints: Record<string, string> | Record<string, number>;
|
|
38
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface UseWindowSizeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The window object to use
|
|
4
|
+
* @default window - in browser, undefined in SSR
|
|
5
|
+
*/
|
|
6
|
+
internalWindow?: Window | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Initial width of the window (useful in SSR)
|
|
9
|
+
* @default Number.POSITIVE_INFINITY
|
|
10
|
+
*/
|
|
11
|
+
initialWidth?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Initial height of the window (useful in SSR)
|
|
14
|
+
* @default Number.POSITIVE_INFINITY
|
|
15
|
+
*/
|
|
16
|
+
initialHeight?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Listen to window `orientationchange` event
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
listenOrientation?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the scrollbar should be included in the width and height
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
includeScrollbar?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function useWindowSize(options?: UseWindowSizeOptions): {
|
|
30
|
+
width: import("vue").Ref<number>;
|
|
31
|
+
height: import("vue").Ref<number>;
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isInStandaloneMode(): boolean;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import "../assets/MazAvatar.css";
|
|
2
|
-
import { defineComponent as S, defineAsyncComponent as f, computed as m, openBlock as c, createBlock as v, resolveDynamicComponent as w, normalizeStyle as y, normalizeClass as k, withCtx as $, createElementVNode as b, unref as g, createCommentVNode as l, renderSlot as u, toDisplayString as C, createElementBlock as h, createVNode as I } from "vue";
|
|
3
|
-
const L = ["tabindex"], x = { class: "m-avatar__initial" }, E = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "m-avatar__caption"
|
|
6
|
-
}, M = /* @__PURE__ */ S({
|
|
7
|
-
__name: "MazAvatar",
|
|
8
|
-
props: {
|
|
9
|
-
src: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: void 0
|
|
12
|
-
},
|
|
13
|
-
caption: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: void 0
|
|
16
|
-
},
|
|
17
|
-
href: { type: String, default: void 0 },
|
|
18
|
-
to: { type: Object, default: void 0 },
|
|
19
|
-
alt: { type: String, default: "avatar image" },
|
|
20
|
-
target: { type: String, default: "_self" },
|
|
21
|
-
size: { type: String, default: void 0 },
|
|
22
|
-
bordered: { type: Boolean, default: !1 },
|
|
23
|
-
clickable: { type: Boolean, default: !1 },
|
|
24
|
-
square: { type: Boolean, default: !1 },
|
|
25
|
-
noElevation: { type: Boolean, default: !1 },
|
|
26
|
-
showCaption: { type: Boolean, default: !1 },
|
|
27
|
-
imageHeightFull: { type: Boolean, default: !1 },
|
|
28
|
-
noLoader: { type: Boolean, default: !1 },
|
|
29
|
-
buttonColor: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "info"
|
|
32
|
-
},
|
|
33
|
-
/** Remove the icon on hover when component is clickable */
|
|
34
|
-
noClickableIcon: { type: Boolean, default: !1 },
|
|
35
|
-
letterCount: { type: Number, default: void 0 }
|
|
36
|
-
},
|
|
37
|
-
emits: ["click"],
|
|
38
|
-
setup(t) {
|
|
39
|
-
const r = f(() => import("./MazLazyImg-65QIsZ1B.mjs")), n = f(() => import("./pencil-laNW5qNQ.mjs")), e = t, s = m(() => e.to ? "RouterLink" : e.href ? "a" : "div"), d = m(() => !!e.to || !!e.href);
|
|
40
|
-
function z(a, o = e.letterCount) {
|
|
41
|
-
return a.split(" ").map((B) => B[0]).join("").slice(0, o);
|
|
42
|
-
}
|
|
43
|
-
return (a, o) => (c(), v(w(s.value), {
|
|
44
|
-
style: y({ fontSize: t.size }),
|
|
45
|
-
class: k(["m-avatar", [
|
|
46
|
-
{
|
|
47
|
-
"--has-link": d.value
|
|
48
|
-
}
|
|
49
|
-
]]),
|
|
50
|
-
href: t.href,
|
|
51
|
-
to: t.to,
|
|
52
|
-
target: d.value ? t.target : void 0
|
|
53
|
-
}, {
|
|
54
|
-
default: $(() => [
|
|
55
|
-
b("div", {
|
|
56
|
-
class: k(["m-avatar__wrapper", {
|
|
57
|
-
"--has-shadow": !t.noElevation,
|
|
58
|
-
"--bordered": t.bordered,
|
|
59
|
-
"--clickable": t.clickable,
|
|
60
|
-
"--square": t.square,
|
|
61
|
-
"--has-initial": !t.src && t.caption
|
|
62
|
-
}]),
|
|
63
|
-
tabindex: t.clickable ? 0 : -1
|
|
64
|
-
}, [
|
|
65
|
-
t.src ? (c(), v(g(r), {
|
|
66
|
-
key: 0,
|
|
67
|
-
class: "m-avatar__picture maz-max-w-full",
|
|
68
|
-
image: t.src,
|
|
69
|
-
alt: t.alt,
|
|
70
|
-
"image-height-full": "",
|
|
71
|
-
"no-loader": t.noLoader,
|
|
72
|
-
onClick: o[0] || (o[0] = (i) => t.clickable ? a.$emit("click", i) : null)
|
|
73
|
-
}, null, 8, ["image", "alt", "no-loader"])) : l("v-if", !0),
|
|
74
|
-
t.caption && !t.src ? u(a.$slots, "round-text", { key: 1 }, () => [
|
|
75
|
-
b(
|
|
76
|
-
"span",
|
|
77
|
-
x,
|
|
78
|
-
C(z(t.caption)),
|
|
79
|
-
1
|
|
80
|
-
/* TEXT */
|
|
81
|
-
)
|
|
82
|
-
], !0) : l("v-if", !0),
|
|
83
|
-
t.clickable ? (c(), h(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
key: 2,
|
|
87
|
-
type: "button",
|
|
88
|
-
tabindex: "-1",
|
|
89
|
-
class: "m-avatar__button",
|
|
90
|
-
style: y({
|
|
91
|
-
backgroundColor: t.src ? `var(--maz-color-${t.buttonColor}-alpha)` : `var(--maz-color-${t.buttonColor})`
|
|
92
|
-
}),
|
|
93
|
-
onClick: o[1] || (o[1] = (i) => a.$emit("click", i))
|
|
94
|
-
},
|
|
95
|
-
[
|
|
96
|
-
t.noClickableIcon ? l("v-if", !0) : u(a.$slots, "icon", { key: 0 }, () => [
|
|
97
|
-
I(g(n), { class: "m-avatar__button__icon" })
|
|
98
|
-
], !0)
|
|
99
|
-
],
|
|
100
|
-
4
|
|
101
|
-
/* STYLE */
|
|
102
|
-
)) : l("v-if", !0)
|
|
103
|
-
], 10, L),
|
|
104
|
-
u(a.$slots, "caption", {}, () => [
|
|
105
|
-
t.showCaption && t.caption ? (c(), h(
|
|
106
|
-
"p",
|
|
107
|
-
E,
|
|
108
|
-
C(t.caption),
|
|
109
|
-
1
|
|
110
|
-
/* TEXT */
|
|
111
|
-
)) : l("v-if", !0)
|
|
112
|
-
], !0)
|
|
113
|
-
]),
|
|
114
|
-
_: 3
|
|
115
|
-
/* FORWARDED */
|
|
116
|
-
}, 8, ["style", "class", "href", "to", "target"]));
|
|
117
|
-
}
|
|
118
|
-
}), N = (t, r) => {
|
|
119
|
-
const n = t.__vccOpts || t;
|
|
120
|
-
for (const [e, s] of r)
|
|
121
|
-
n[e] = s;
|
|
122
|
-
return n;
|
|
123
|
-
}, j = /* @__PURE__ */ N(M, [["__scopeId", "data-v-4d8e5551"]]);
|
|
124
|
-
export {
|
|
125
|
-
j as M,
|
|
126
|
-
N as _
|
|
127
|
-
};
|