@mekari/pixel3-avatar 0.0.0
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/dist/avatar-excess.d.mts +8 -0
- package/dist/avatar-excess.d.ts +8 -0
- package/dist/avatar-excess.js +42 -0
- package/dist/avatar-excess.mjs +7 -0
- package/dist/avatar-fallback.d.mts +8 -0
- package/dist/avatar-fallback.d.ts +8 -0
- package/dist/avatar-fallback.js +45 -0
- package/dist/avatar-fallback.mjs +7 -0
- package/dist/avatar-group.d.mts +54 -0
- package/dist/avatar-group.d.ts +54 -0
- package/dist/avatar-group.js +166 -0
- package/dist/avatar-group.mjs +13 -0
- package/dist/avatar-image.d.mts +8 -0
- package/dist/avatar-image.d.ts +8 -0
- package/dist/avatar-image.js +37 -0
- package/dist/avatar-image.mjs +7 -0
- package/dist/avatar.d.mts +102 -0
- package/dist/avatar.d.ts +102 -0
- package/dist/avatar.js +284 -0
- package/dist/avatar.mjs +14 -0
- package/dist/chunk-43VB6T4V.mjs +36 -0
- package/dist/chunk-4VNSI4PL.mjs +13 -0
- package/dist/chunk-CY2Z6I23.mjs +18 -0
- package/dist/chunk-ITYXDMOF.mjs +74 -0
- package/dist/chunk-JVROEGO3.mjs +52 -0
- package/dist/chunk-NKXS73IR.mjs +21 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-RTYPPBOR.mjs +44 -0
- package/dist/chunk-U4MXRXR7.mjs +56 -0
- package/dist/chunk-ZK47OSEJ.mjs +26 -0
- package/dist/chunk-ZMUFXMG4.mjs +118 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +406 -0
- package/dist/index.mjs +19 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/avatar.connects.d.mts +11 -0
- package/dist/modules/avatar.connects.d.ts +11 -0
- package/dist/modules/avatar.connects.js +148 -0
- package/dist/modules/avatar.connects.mjs +10 -0
- package/dist/modules/avatar.hooks.d.mts +8 -0
- package/dist/modules/avatar.hooks.d.ts +8 -0
- package/dist/modules/avatar.hooks.js +234 -0
- package/dist/modules/avatar.hooks.mjs +12 -0
- package/dist/modules/avatar.machines.d.mts +14 -0
- package/dist/modules/avatar.machines.d.ts +14 -0
- package/dist/modules/avatar.machines.js +78 -0
- package/dist/modules/avatar.machines.mjs +9 -0
- package/dist/modules/avatar.props.d.mts +71 -0
- package/dist/modules/avatar.props.d.ts +71 -0
- package/dist/modules/avatar.props.js +101 -0
- package/dist/modules/avatar.props.mjs +13 -0
- package/dist/modules/avatar.types.d.mts +65 -0
- package/dist/modules/avatar.types.d.ts +65 -0
- package/dist/modules/avatar.types.js +18 -0
- package/dist/modules/avatar.types.mjs +0 -0
- package/dist/modules/avatar.utils.d.mts +8 -0
- package/dist/modules/avatar.utils.d.ts +8 -0
- package/dist/modules/avatar.utils.js +49 -0
- package/dist/modules/avatar.utils.mjs +11 -0
- package/package.json +50 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarExcess component used to display more label counter.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarExcess: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarExcess };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarExcess component used to display more label counter.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarExcess: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarExcess };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/avatar-excess.tsx
|
|
21
|
+
var avatar_excess_exports = {};
|
|
22
|
+
__export(avatar_excess_exports, {
|
|
23
|
+
MpAvatarExcess: () => MpAvatarExcess
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(avatar_excess_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var MpAvatarExcess = (0, import_vue2.defineComponent)({
|
|
29
|
+
name: "MpAvatarExcess",
|
|
30
|
+
setup(_, {
|
|
31
|
+
slots
|
|
32
|
+
}) {
|
|
33
|
+
return () => {
|
|
34
|
+
var _a;
|
|
35
|
+
return (0, import_vue.createVNode)("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
MpAvatarExcess
|
|
42
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarFallback component used to display fallback icon.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarFallback: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarFallback };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarFallback component used to display fallback icon.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarFallback: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarFallback };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/avatar-fallback.tsx
|
|
21
|
+
var avatar_fallback_exports = {};
|
|
22
|
+
__export(avatar_fallback_exports, {
|
|
23
|
+
MpAvatarFallback: () => MpAvatarFallback
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(avatar_fallback_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var MpAvatarFallback = (0, import_vue2.defineComponent)({
|
|
29
|
+
name: "MpAvatarFallback",
|
|
30
|
+
setup() {
|
|
31
|
+
return () => (0, import_vue.createVNode)("div", null, [(0, import_vue.createVNode)("svg", {
|
|
32
|
+
"fill": "#ffffff",
|
|
33
|
+
"viewBox": "0 0 128 128",
|
|
34
|
+
"role": "img"
|
|
35
|
+
}, [(0, import_vue.createVNode)("path", {
|
|
36
|
+
"d": "M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"
|
|
37
|
+
}, null), (0, import_vue.createVNode)("path", {
|
|
38
|
+
"d": "M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"
|
|
39
|
+
}, null)])]);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
MpAvatarFallback
|
|
45
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { AvatarSize } from './modules/avatar.types.mjs';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MpAvatarGroup used to combines multiple avatars into a stack.
|
|
7
|
+
*/
|
|
8
|
+
declare const MpAvatarGroup: vue.DefineComponent<{
|
|
9
|
+
id: {
|
|
10
|
+
type: vue.PropType<string | undefined>;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
max: {
|
|
17
|
+
type: vue.PropType<number | undefined>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
spacing: {
|
|
21
|
+
type: vue.PropType<number | undefined>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
borderColor: {
|
|
25
|
+
type: vue.PropType<string | undefined>;
|
|
26
|
+
};
|
|
27
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "click"[], "click", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
28
|
+
id: {
|
|
29
|
+
type: vue.PropType<string | undefined>;
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
max: {
|
|
36
|
+
type: vue.PropType<number | undefined>;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
spacing: {
|
|
40
|
+
type: vue.PropType<number | undefined>;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
borderColor: {
|
|
44
|
+
type: vue.PropType<string | undefined>;
|
|
45
|
+
};
|
|
46
|
+
}>> & {
|
|
47
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
size: AvatarSize | undefined;
|
|
50
|
+
spacing: number | undefined;
|
|
51
|
+
max: number | undefined;
|
|
52
|
+
}, {}>;
|
|
53
|
+
|
|
54
|
+
export { MpAvatarGroup };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { AvatarSize } from './modules/avatar.types.js';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MpAvatarGroup used to combines multiple avatars into a stack.
|
|
7
|
+
*/
|
|
8
|
+
declare const MpAvatarGroup: vue.DefineComponent<{
|
|
9
|
+
id: {
|
|
10
|
+
type: vue.PropType<string | undefined>;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
max: {
|
|
17
|
+
type: vue.PropType<number | undefined>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
spacing: {
|
|
21
|
+
type: vue.PropType<number | undefined>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
borderColor: {
|
|
25
|
+
type: vue.PropType<string | undefined>;
|
|
26
|
+
};
|
|
27
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "click"[], "click", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
28
|
+
id: {
|
|
29
|
+
type: vue.PropType<string | undefined>;
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
max: {
|
|
36
|
+
type: vue.PropType<number | undefined>;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
spacing: {
|
|
40
|
+
type: vue.PropType<number | undefined>;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
borderColor: {
|
|
44
|
+
type: vue.PropType<string | undefined>;
|
|
45
|
+
};
|
|
46
|
+
}>> & {
|
|
47
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
size: AvatarSize | undefined;
|
|
50
|
+
spacing: number | undefined;
|
|
51
|
+
max: number | undefined;
|
|
52
|
+
}, {}>;
|
|
53
|
+
|
|
54
|
+
export { MpAvatarGroup };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/avatar-group.tsx
|
|
22
|
+
var avatar_group_exports = {};
|
|
23
|
+
__export(avatar_group_exports, {
|
|
24
|
+
MpAvatarGroup: () => MpAvatarGroup
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(avatar_group_exports);
|
|
27
|
+
var import_vue6 = require("vue");
|
|
28
|
+
var import_vue7 = require("vue");
|
|
29
|
+
var import_pixel3_utils3 = require("@mekari/pixel3-utils");
|
|
30
|
+
|
|
31
|
+
// src/modules/avatar.props.ts
|
|
32
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
33
|
+
var avatarGroupProps = {
|
|
34
|
+
id: {
|
|
35
|
+
type: String
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "md"
|
|
40
|
+
},
|
|
41
|
+
max: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 3
|
|
44
|
+
},
|
|
45
|
+
spacing: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: -2
|
|
48
|
+
},
|
|
49
|
+
borderColor: {
|
|
50
|
+
type: String
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var avatarEmits = (0, import_pixel3_utils.declareEmit)(["click"]);
|
|
54
|
+
var avatarGroupEmits = (0, import_pixel3_utils.declareEmit)(["click"]);
|
|
55
|
+
|
|
56
|
+
// src/modules/avatar.hooks.ts
|
|
57
|
+
var import_vue2 = require("vue");
|
|
58
|
+
var import_vue3 = require("@xstate/vue");
|
|
59
|
+
var import_pixel3_utils2 = require("@mekari/pixel3-utils");
|
|
60
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
61
|
+
|
|
62
|
+
// src/modules/avatar.machines.ts
|
|
63
|
+
var import_xstate = require("xstate");
|
|
64
|
+
function avatarGroupMachine(context) {
|
|
65
|
+
return (0, import_xstate.createMachine)({
|
|
66
|
+
/** @xstate-layout N4IgpgJg5mDOIC5gF8A0IB2B7CdGgEMA3AgFwICcBaKCrAVwAd8RGtYBLUjrDFgD0QBGAEzoAnsJHIZyIA */
|
|
67
|
+
id: "avatar-group",
|
|
68
|
+
context,
|
|
69
|
+
predictableActionArguments: true
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
__name(avatarGroupMachine, "avatarGroupMachine");
|
|
73
|
+
|
|
74
|
+
// src/modules/avatar.connects.ts
|
|
75
|
+
var import_vue = require("vue");
|
|
76
|
+
var import_tokens = require("@mekari/pixel3-styled-system/tokens");
|
|
77
|
+
function avatarGroupConnect(state, send, classes) {
|
|
78
|
+
const {
|
|
79
|
+
id,
|
|
80
|
+
onClick
|
|
81
|
+
} = state.context;
|
|
82
|
+
const isClickable = (0, import_vue.computed)(() => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
return !!((_b = (_a = (0, import_vue.getCurrentInstance)()) == null ? void 0 : _a.vnode.props) == null ? void 0 : _b.onClick);
|
|
85
|
+
}).value;
|
|
86
|
+
return {
|
|
87
|
+
rootProps: {
|
|
88
|
+
id,
|
|
89
|
+
class: classes.root,
|
|
90
|
+
"data-pixel-component": "MpAvatarGroup"
|
|
91
|
+
},
|
|
92
|
+
excessProps: {
|
|
93
|
+
id: `${id}-excess`,
|
|
94
|
+
onClick,
|
|
95
|
+
class: classes.excess,
|
|
96
|
+
style: {
|
|
97
|
+
"--mp-avatar-group--cursor": isClickable ? "pointer" : void 0
|
|
98
|
+
},
|
|
99
|
+
"data-pixel-component": "MpAvatarExcess"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
__name(avatarGroupConnect, "avatarGroupConnect");
|
|
104
|
+
|
|
105
|
+
// src/modules/avatar.hooks.ts
|
|
106
|
+
var useAvatarGroup = /* @__PURE__ */ __name((props, emit) => {
|
|
107
|
+
var _a;
|
|
108
|
+
const context = (0, import_vue2.ref)(props);
|
|
109
|
+
const {
|
|
110
|
+
state,
|
|
111
|
+
send
|
|
112
|
+
} = (0, import_vue3.useMachine)(avatarGroupMachine({
|
|
113
|
+
...context.value,
|
|
114
|
+
id: (_a = context.value.id) != null ? _a : `mp-avatar-group-${(0, import_pixel3_utils2.useId)()}`,
|
|
115
|
+
onClick: (evt) => emit("click", evt)
|
|
116
|
+
}));
|
|
117
|
+
const [avatarGroupProps2] = import_recipes.avatarGroupSlotRecipe.splitVariantProps(context.value);
|
|
118
|
+
const classes = (0, import_recipes.avatarGroupSlotRecipe)(avatarGroupProps2);
|
|
119
|
+
return (0, import_vue2.computed)(() => avatarGroupConnect(state.value, send, classes));
|
|
120
|
+
}, "useAvatarGroup");
|
|
121
|
+
|
|
122
|
+
// src/avatar-excess.tsx
|
|
123
|
+
var import_vue4 = require("vue");
|
|
124
|
+
var import_vue5 = require("vue");
|
|
125
|
+
var MpAvatarExcess = (0, import_vue5.defineComponent)({
|
|
126
|
+
name: "MpAvatarExcess",
|
|
127
|
+
setup(_, {
|
|
128
|
+
slots
|
|
129
|
+
}) {
|
|
130
|
+
return () => {
|
|
131
|
+
var _a;
|
|
132
|
+
return (0, import_vue4.createVNode)("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// src/avatar-group.tsx
|
|
138
|
+
var MpAvatarGroup = (0, import_vue7.defineComponent)({
|
|
139
|
+
name: "MpAvatarGroup",
|
|
140
|
+
props: avatarGroupProps,
|
|
141
|
+
emits: avatarGroupEmits,
|
|
142
|
+
setup(props, {
|
|
143
|
+
slots,
|
|
144
|
+
emit
|
|
145
|
+
}) {
|
|
146
|
+
const api = useAvatarGroup(props, emit);
|
|
147
|
+
const children = (0, import_vue7.computed)(() => (0, import_pixel3_utils3.getChildren)(slots));
|
|
148
|
+
const count = (0, import_vue7.computed)(() => children.value.length - (props.max || 0));
|
|
149
|
+
const cloneChildren = (0, import_vue7.computed)(() => (0, import_vue7.computed)(() => children.value.slice(0, props.max)).value.map((vnode, index) => {
|
|
150
|
+
const overrideProps = (0, import_pixel3_utils3.objectFilterUndefined)({
|
|
151
|
+
size: props.size,
|
|
152
|
+
spacing: index === 0 ? 0 : props.spacing,
|
|
153
|
+
hasBorder: true,
|
|
154
|
+
borderColor: props.borderColor
|
|
155
|
+
});
|
|
156
|
+
return (0, import_vue7.cloneVNode)(vnode, overrideProps);
|
|
157
|
+
}));
|
|
158
|
+
return () => (0, import_vue6.createVNode)("div", api.value.rootProps, [cloneChildren.value, count.value > 0 && props.max !== 0 && (0, import_vue6.createVNode)(MpAvatarExcess, api.value.excessProps, {
|
|
159
|
+
default: () => [`+${count.value}`]
|
|
160
|
+
})]);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
164
|
+
0 && (module.exports = {
|
|
165
|
+
MpAvatarGroup
|
|
166
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MpAvatarGroup
|
|
3
|
+
} from "./chunk-RTYPPBOR.mjs";
|
|
4
|
+
import "./chunk-CY2Z6I23.mjs";
|
|
5
|
+
import "./chunk-ITYXDMOF.mjs";
|
|
6
|
+
import "./chunk-JVROEGO3.mjs";
|
|
7
|
+
import "./chunk-U4MXRXR7.mjs";
|
|
8
|
+
import "./chunk-ZMUFXMG4.mjs";
|
|
9
|
+
import "./chunk-ZK47OSEJ.mjs";
|
|
10
|
+
import "./chunk-QZ7VFGWC.mjs";
|
|
11
|
+
export {
|
|
12
|
+
MpAvatarGroup
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarImage component used to display profile image.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarImage: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarImage };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MpAvatarImage component used to display profile image.
|
|
5
|
+
*/
|
|
6
|
+
declare const MpAvatarImage: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
+
|
|
8
|
+
export { MpAvatarImage };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/avatar-image.tsx
|
|
21
|
+
var avatar_image_exports = {};
|
|
22
|
+
__export(avatar_image_exports, {
|
|
23
|
+
MpAvatarImage: () => MpAvatarImage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(avatar_image_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var MpAvatarImage = (0, import_vue2.defineComponent)({
|
|
29
|
+
name: "MpAvatarImage",
|
|
30
|
+
setup() {
|
|
31
|
+
return () => (0, import_vue.createVNode)("img", null, null);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
MpAvatarImage
|
|
37
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { AvatarSize, AvatarVariant, AvatarVariantColor } from './modules/avatar.types.mjs';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MpAvatar component used to display profile image, initial or fallback icon.
|
|
7
|
+
*/
|
|
8
|
+
declare const MpAvatar: vue.DefineComponent<{
|
|
9
|
+
id: {
|
|
10
|
+
type: vue.PropType<string | undefined>;
|
|
11
|
+
};
|
|
12
|
+
name: {
|
|
13
|
+
type: vue.PropType<string | undefined>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: vue.PropType<AvatarVariant | undefined>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
variantColor: {
|
|
25
|
+
type: vue.PropType<AvatarVariantColor | undefined>;
|
|
26
|
+
};
|
|
27
|
+
hasBorder: {
|
|
28
|
+
type: vue.PropType<boolean | undefined>;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
borderColor: {
|
|
32
|
+
type: vue.PropType<string | undefined>;
|
|
33
|
+
};
|
|
34
|
+
src: {
|
|
35
|
+
type: vue.PropType<string | undefined>;
|
|
36
|
+
};
|
|
37
|
+
icon: {
|
|
38
|
+
type: vue.PropType<string | undefined>;
|
|
39
|
+
};
|
|
40
|
+
iconVariant: {
|
|
41
|
+
type: vue.PropType<string | undefined>;
|
|
42
|
+
};
|
|
43
|
+
iconColor: {
|
|
44
|
+
type: vue.PropType<string | undefined>;
|
|
45
|
+
};
|
|
46
|
+
spacing: {
|
|
47
|
+
type: vue.PropType<number | undefined>;
|
|
48
|
+
default: number;
|
|
49
|
+
};
|
|
50
|
+
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "click"[], "click", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
51
|
+
id: {
|
|
52
|
+
type: vue.PropType<string | undefined>;
|
|
53
|
+
};
|
|
54
|
+
name: {
|
|
55
|
+
type: vue.PropType<string | undefined>;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
type: vue.PropType<AvatarSize | undefined>;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
variant: {
|
|
63
|
+
type: vue.PropType<AvatarVariant | undefined>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
variantColor: {
|
|
67
|
+
type: vue.PropType<AvatarVariantColor | undefined>;
|
|
68
|
+
};
|
|
69
|
+
hasBorder: {
|
|
70
|
+
type: vue.PropType<boolean | undefined>;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
borderColor: {
|
|
74
|
+
type: vue.PropType<string | undefined>;
|
|
75
|
+
};
|
|
76
|
+
src: {
|
|
77
|
+
type: vue.PropType<string | undefined>;
|
|
78
|
+
};
|
|
79
|
+
icon: {
|
|
80
|
+
type: vue.PropType<string | undefined>;
|
|
81
|
+
};
|
|
82
|
+
iconVariant: {
|
|
83
|
+
type: vue.PropType<string | undefined>;
|
|
84
|
+
};
|
|
85
|
+
iconColor: {
|
|
86
|
+
type: vue.PropType<string | undefined>;
|
|
87
|
+
};
|
|
88
|
+
spacing: {
|
|
89
|
+
type: vue.PropType<number | undefined>;
|
|
90
|
+
default: number;
|
|
91
|
+
};
|
|
92
|
+
}>> & {
|
|
93
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
name: string | undefined;
|
|
96
|
+
size: AvatarSize | undefined;
|
|
97
|
+
variant: AvatarVariant | undefined;
|
|
98
|
+
hasBorder: boolean | undefined;
|
|
99
|
+
spacing: number | undefined;
|
|
100
|
+
}, {}>;
|
|
101
|
+
|
|
102
|
+
export { MpAvatar };
|