@volverjs/ui-vue 0.0.6-beta.1 → 0.0.6-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/README.md +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +361 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +68 -0
- package/dist/components/VvAvatarGroup/index.d.ts +38 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +56 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/package.json +9 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +65 -0
- package/src/components/VvAvatarGroup/index.ts +28 -0
- package/src/stories/Avatar/Avatar.settings.ts +1 -9
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +60 -0
- package/src/stories/AvatarGroup/AvatarGroup.stories.mdx +30 -0
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +36 -0
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.mdx +24 -0
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.mdx +45 -0
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ The following features are planned for the next releases:
|
|
|
165
165
|
- [x] (v0.0.3) Rewrite of `VvDropdown` to get it applicable to any element;
|
|
166
166
|
- [x] (v0.0.5) Input masks for `VvInputText` component;
|
|
167
167
|
- [x] `VvAvatar` component;
|
|
168
|
-
- [
|
|
168
|
+
- [x] `VvAvatarGroup` component;
|
|
169
169
|
- [ ] Alerts, notifications and toasts with `VvAlert` and `VvToast` component;
|
|
170
170
|
- [ ] Loaders with `VvLoader` and `VvSkeleton`;
|
|
171
171
|
- [ ] Menus, navigation and tabs with `VvNav`;
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, createBlock, mergeProps, withCtx, toDisplayString, createTextVNode } from "vue";
|
|
2
|
+
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
|
+
Side2["left"] = "left";
|
|
4
|
+
Side2["right"] = "right";
|
|
5
|
+
Side2["top"] = "top";
|
|
6
|
+
Side2["bottom"] = "bottom";
|
|
7
|
+
return Side2;
|
|
8
|
+
})(Side || {});
|
|
9
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
10
|
+
Placement2["topStart"] = "top-start";
|
|
11
|
+
Placement2["topEnd"] = "top-end";
|
|
12
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
13
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
14
|
+
Placement2["leftStart"] = "left-start";
|
|
15
|
+
Placement2["leftEnd"] = "left-end";
|
|
16
|
+
Placement2["rightStart"] = "right-start";
|
|
17
|
+
Placement2["rightEnd"] = "right-end";
|
|
18
|
+
return Placement2;
|
|
19
|
+
})(Placement || {});
|
|
20
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
21
|
+
Position2["before"] = "before";
|
|
22
|
+
Position2["after"] = "after";
|
|
23
|
+
return Position2;
|
|
24
|
+
})(Position || {});
|
|
25
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
26
|
+
ButtonType2["button"] = "button";
|
|
27
|
+
ButtonType2["submit"] = "submit";
|
|
28
|
+
ButtonType2["reset"] = "reset";
|
|
29
|
+
return ButtonType2;
|
|
30
|
+
})(ButtonType || {});
|
|
31
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
32
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
33
|
+
AnchorTarget2["_self"] = "_self";
|
|
34
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
35
|
+
AnchorTarget2["_top"] = "_top";
|
|
36
|
+
return AnchorTarget2;
|
|
37
|
+
})(AnchorTarget || {});
|
|
38
|
+
const LinkProps = {
|
|
39
|
+
/**
|
|
40
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
41
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
42
|
+
*/
|
|
43
|
+
to: {
|
|
44
|
+
type: [String, Object]
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Anchor href
|
|
48
|
+
*/
|
|
49
|
+
href: String,
|
|
50
|
+
/**
|
|
51
|
+
* Anchor target
|
|
52
|
+
*/
|
|
53
|
+
target: {
|
|
54
|
+
type: String,
|
|
55
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Anchor rel
|
|
59
|
+
*/
|
|
60
|
+
rel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "noopener noreferrer"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const DisabledProps = {
|
|
66
|
+
/**
|
|
67
|
+
* Whether the form control is disabled
|
|
68
|
+
*/
|
|
69
|
+
disabled: Boolean
|
|
70
|
+
};
|
|
71
|
+
const ActiveProps = {
|
|
72
|
+
/**
|
|
73
|
+
* Whether the item is active
|
|
74
|
+
*/
|
|
75
|
+
active: Boolean
|
|
76
|
+
};
|
|
77
|
+
const PressedProps = {
|
|
78
|
+
/**
|
|
79
|
+
* Whether the item is pressed
|
|
80
|
+
*/
|
|
81
|
+
pressed: Boolean
|
|
82
|
+
};
|
|
83
|
+
const LabelProps = {
|
|
84
|
+
/**
|
|
85
|
+
* The item label
|
|
86
|
+
*/
|
|
87
|
+
label: [String, Number]
|
|
88
|
+
};
|
|
89
|
+
const ModifiersProps = {
|
|
90
|
+
/**
|
|
91
|
+
* Component BEM modifiers
|
|
92
|
+
*/
|
|
93
|
+
modifiers: [String, Array]
|
|
94
|
+
};
|
|
95
|
+
({
|
|
96
|
+
/**
|
|
97
|
+
* VvIcon name or props
|
|
98
|
+
* @see VVIcon
|
|
99
|
+
*/
|
|
100
|
+
icon: { type: [String, Object] },
|
|
101
|
+
/**
|
|
102
|
+
* VvIcon position
|
|
103
|
+
*/
|
|
104
|
+
iconPosition: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: Position.before,
|
|
107
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
({
|
|
111
|
+
/**
|
|
112
|
+
* Dropdown placement
|
|
113
|
+
*/
|
|
114
|
+
placement: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: Side.bottom,
|
|
117
|
+
validator: (value) => {
|
|
118
|
+
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Dropdown strategy
|
|
123
|
+
*/
|
|
124
|
+
strategy: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: "absolute",
|
|
127
|
+
validator: (value) => {
|
|
128
|
+
return ["fixed", "absolute"].includes(value);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Dropdown show / hide transition name
|
|
133
|
+
*/
|
|
134
|
+
transitionName: {
|
|
135
|
+
type: String
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Offset of the dropdown from the trigger
|
|
139
|
+
* @see https://floating-ui.com/docs/offset
|
|
140
|
+
*/
|
|
141
|
+
offset: {
|
|
142
|
+
type: [Number, String, Object],
|
|
143
|
+
default: 0
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Move dropdown to the side if there is no space in the default position
|
|
147
|
+
* @see https://floating-ui.com/docs/shift
|
|
148
|
+
*/
|
|
149
|
+
shift: {
|
|
150
|
+
type: [Boolean, Object],
|
|
151
|
+
default: false
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Flip dropdown position if there is no space in the default position
|
|
155
|
+
* @see https://floating-ui.com/docs/flip
|
|
156
|
+
*/
|
|
157
|
+
flip: {
|
|
158
|
+
type: [Boolean, Object],
|
|
159
|
+
default: true
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Size of the dropdown
|
|
163
|
+
* @see https://floating-ui.com/docs/size
|
|
164
|
+
*/
|
|
165
|
+
size: {
|
|
166
|
+
type: [Boolean, Object],
|
|
167
|
+
default: () => ({ padding: 10 })
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Automatically change the position of the dropdown
|
|
171
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
172
|
+
*/
|
|
173
|
+
autoPlacement: {
|
|
174
|
+
type: [Boolean, Object],
|
|
175
|
+
default: false
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
* Add arrow to the dropdown
|
|
179
|
+
* @see https://floating-ui.com/docs/arrow
|
|
180
|
+
*/
|
|
181
|
+
arrow: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Close dropdown on click outside
|
|
187
|
+
*/
|
|
188
|
+
autoClose: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: true
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Autofocus first item on dropdown open
|
|
194
|
+
*/
|
|
195
|
+
autofocusFirst: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: true
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* Set dropdown width to the same as the trigger
|
|
201
|
+
*/
|
|
202
|
+
triggerWidth: {
|
|
203
|
+
type: Boolean
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
({
|
|
207
|
+
...DisabledProps,
|
|
208
|
+
...LabelProps,
|
|
209
|
+
...PressedProps,
|
|
210
|
+
...ActiveProps,
|
|
211
|
+
...LinkProps,
|
|
212
|
+
/**
|
|
213
|
+
* Button type
|
|
214
|
+
*/
|
|
215
|
+
type: {
|
|
216
|
+
type: String,
|
|
217
|
+
default: ButtonType.button,
|
|
218
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
const VvAvatarGroupProps = {
|
|
222
|
+
...ModifiersProps,
|
|
223
|
+
/**
|
|
224
|
+
* avatar items
|
|
225
|
+
*/
|
|
226
|
+
items: {
|
|
227
|
+
type: Array,
|
|
228
|
+
default: () => [],
|
|
229
|
+
required: true
|
|
230
|
+
},
|
|
231
|
+
toShow: {
|
|
232
|
+
type: Number,
|
|
233
|
+
default: 3
|
|
234
|
+
},
|
|
235
|
+
totalItems: {
|
|
236
|
+
type: Number
|
|
237
|
+
},
|
|
238
|
+
avatarModifiers: [String, Array]
|
|
239
|
+
};
|
|
240
|
+
const VvAvatarProps = {
|
|
241
|
+
...ModifiersProps,
|
|
242
|
+
/**
|
|
243
|
+
* Image src for avatar
|
|
244
|
+
*/
|
|
245
|
+
imgSrc: String
|
|
246
|
+
};
|
|
247
|
+
function useModifiers(prefix, modifiers, others) {
|
|
248
|
+
return computed(() => {
|
|
249
|
+
const toReturn = {
|
|
250
|
+
[prefix]: true
|
|
251
|
+
};
|
|
252
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
253
|
+
if (modifiersArray) {
|
|
254
|
+
if (Array.isArray(modifiersArray)) {
|
|
255
|
+
modifiersArray.forEach((modifier) => {
|
|
256
|
+
if (modifier) {
|
|
257
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (others) {
|
|
263
|
+
Object.keys(others.value).forEach((key) => {
|
|
264
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return toReturn;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
const _hoisted_1$1 = ["role", "aria-label"];
|
|
271
|
+
const _hoisted_2 = ["src"];
|
|
272
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
273
|
+
__name: "VvAvatar",
|
|
274
|
+
props: VvAvatarProps,
|
|
275
|
+
setup(__props) {
|
|
276
|
+
const props = __props;
|
|
277
|
+
const { modifiers } = toRefs(props);
|
|
278
|
+
const bemCssClasses = useModifiers("vv-avatar", modifiers);
|
|
279
|
+
return (_ctx, _cache) => {
|
|
280
|
+
return openBlock(), createElementBlock("span", {
|
|
281
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
282
|
+
role: _ctx.imgSrc ? void 0 : "img",
|
|
283
|
+
"aria-label": _ctx.imgSrc ? void 0 : "avatar"
|
|
284
|
+
}, [
|
|
285
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
286
|
+
_ctx.imgSrc ? (openBlock(), createElementBlock("img", {
|
|
287
|
+
key: 0,
|
|
288
|
+
src: _ctx.imgSrc,
|
|
289
|
+
alt: "avatar"
|
|
290
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
291
|
+
])
|
|
292
|
+
], 10, _hoisted_1$1);
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
const _hoisted_1 = { key: 0 };
|
|
297
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
298
|
+
__name: "VvAvatarGroup",
|
|
299
|
+
props: VvAvatarGroupProps,
|
|
300
|
+
setup(__props) {
|
|
301
|
+
const props = __props;
|
|
302
|
+
const { modifiers, items, toShow, totalItems, avatarModifiers } = toRefs(props);
|
|
303
|
+
const bemCssClasses = useModifiers("vv-avatar-group", modifiers);
|
|
304
|
+
const stringModifiers = computed(() => {
|
|
305
|
+
if ((avatarModifiers == null ? void 0 : avatarModifiers.value) && Array.isArray(avatarModifiers == null ? void 0 : avatarModifiers.value)) {
|
|
306
|
+
return avatarModifiers.value.join(" ");
|
|
307
|
+
}
|
|
308
|
+
return (avatarModifiers == null ? void 0 : avatarModifiers.value) || "";
|
|
309
|
+
});
|
|
310
|
+
const avatarItems = computed(() => {
|
|
311
|
+
return items.value.slice(0, toShow.value).map((item, index) => {
|
|
312
|
+
let modifiers2 = [];
|
|
313
|
+
let itemModifiers = [];
|
|
314
|
+
if (avatarModifiers == null ? void 0 : avatarModifiers.value) {
|
|
315
|
+
modifiers2 = Array.isArray(avatarModifiers == null ? void 0 : avatarModifiers.value) ? avatarModifiers == null ? void 0 : avatarModifiers.value : [avatarModifiers == null ? void 0 : avatarModifiers.value];
|
|
316
|
+
}
|
|
317
|
+
if (item.modifiers) {
|
|
318
|
+
itemModifiers = Array.isArray(item.modifiers) ? item.modifiers : [item.modifiers];
|
|
319
|
+
}
|
|
320
|
+
return {
|
|
321
|
+
...item,
|
|
322
|
+
key: item.key || `${index}_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
323
|
+
modifiers: [...modifiers2, ...itemModifiers]
|
|
324
|
+
};
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
return (_ctx, _cache) => {
|
|
328
|
+
return openBlock(), createElementBlock("span", {
|
|
329
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
330
|
+
}, [
|
|
331
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
332
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(avatarItems), (avatarItem) => {
|
|
333
|
+
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
334
|
+
key: avatarItem.key
|
|
335
|
+
}, {
|
|
336
|
+
modifiers: avatarItem.modifiers,
|
|
337
|
+
imgSrc: avatarItem.imgSrc
|
|
338
|
+
}), {
|
|
339
|
+
default: withCtx(() => [
|
|
340
|
+
avatarItem.text ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(avatarItem.text), 1)) : createCommentVNode("", true)
|
|
341
|
+
]),
|
|
342
|
+
_: 2
|
|
343
|
+
}, 1040);
|
|
344
|
+
}), 128)),
|
|
345
|
+
(unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
346
|
+
key: 0,
|
|
347
|
+
modifiers: `${unref(stringModifiers)} surface bordered`
|
|
348
|
+
}, {
|
|
349
|
+
default: withCtx(() => [
|
|
350
|
+
createTextVNode(toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`), 1)
|
|
351
|
+
]),
|
|
352
|
+
_: 1
|
|
353
|
+
}, 8, ["modifiers"])) : createCommentVNode("", true)
|
|
354
|
+
])
|
|
355
|
+
], 2);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
export {
|
|
360
|
+
_sfc_main as default
|
|
361
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAvatarGroup=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),t=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(t||{});Boolean,Boolean,Boolean;const a={modifiers:[String,Array]};r.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,t.button;const l={...a,items:{type:Array,default:()=>[],required:!0},toShow:{type:Number,default:3},totalItems:{type:Number},avatarModifiers:[String,Array]},n={...a,imgSrc:String};function i(o,r,t){return e.computed((()=>{const a={[o]:!0},l="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(a[`${o}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((r=>{a[`${o}--${r}`]=e.unref(t.value[r])})),a}))}const u=["role","aria-label"],s=["src"],f=e.defineComponent({__name:"VvAvatar",props:n,setup(o){const r=o,{modifiers:t}=e.toRefs(r),a=i("vv-avatar",t);return(o,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,s)):e.createCommentVNode("",!0)]))],10,u))}}),m={key:0};return e.defineComponent({__name:"VvAvatarGroup",props:l,setup(o){const r=o,{modifiers:t,items:a,toShow:l,totalItems:n,avatarModifiers:u}=e.toRefs(r),s=i("vv-avatar-group",t),c=e.computed((()=>(null==u?void 0:u.value)&&Array.isArray(null==u?void 0:u.value)?u.value.join(" "):(null==u?void 0:u.value)||"")),d=e.computed((()=>a.value.slice(0,l.value).map(((e,o)=>{let r=[],t=[];return(null==u?void 0:u.value)&&(r=Array.isArray(null==u?void 0:u.value)?null==u?void 0:u.value:[null==u?void 0:u.value]),e.modifiers&&(t=Array.isArray(e.modifiers)?e.modifiers:[e.modifiers]),{...e,key:e.key||`${o}_${(new Date).getTime()}`,modifiers:[...r,...t]}}))));return(o,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(s))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(o=>(e.openBlock(),e.createBlock(f,e.mergeProps({key:o.key},{modifiers:o.modifiers,imgSrc:o.imgSrc}),{default:e.withCtx((()=>[o.text?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(o.text),1)):e.createCommentVNode("",!0)])),_:2},1040)))),128)),(e.unref(n)||e.unref(a).length)>e.unref(l)?(e.openBlock(),e.createBlock(f,{key:0,modifiers:`${e.unref(c)} surface bordered`},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString("+"+((e.unref(n)||e.unref(a).length)-e.unref(l))),1)])),_:1},8,["modifiers"])):e.createCommentVNode("",!0)]))],2))}})}));
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: {
|
|
4
|
+
(arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
5
|
+
(...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
6
|
+
new (arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
7
|
+
new (...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
8
|
+
isArray(arg: any): arg is any[];
|
|
9
|
+
readonly prototype: any[];
|
|
10
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
11
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
12
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
13
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
14
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
15
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
16
|
+
};
|
|
17
|
+
default: () => never[];
|
|
18
|
+
required: boolean;
|
|
19
|
+
};
|
|
20
|
+
toShow: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
totalItems: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
};
|
|
27
|
+
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
28
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
29
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
items: {
|
|
31
|
+
type: {
|
|
32
|
+
(arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
33
|
+
(...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
34
|
+
new (arrayLength: number): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
35
|
+
new (...items: import("@/components/VvAvatarGroup").AvatarItem[]): import("@/components/VvAvatarGroup").AvatarItem[];
|
|
36
|
+
isArray(arg: any): arg is any[];
|
|
37
|
+
readonly prototype: any[];
|
|
38
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
39
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
40
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
41
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
42
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
43
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
44
|
+
};
|
|
45
|
+
default: () => never[];
|
|
46
|
+
required: boolean;
|
|
47
|
+
};
|
|
48
|
+
toShow: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
totalItems: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
};
|
|
55
|
+
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
56
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
57
|
+
}>>, {
|
|
58
|
+
items: import("@/components/VvAvatarGroup").AvatarItem[];
|
|
59
|
+
toShow: number;
|
|
60
|
+
}>, {
|
|
61
|
+
default: (_: {}) => any;
|
|
62
|
+
}>;
|
|
63
|
+
export default _default;
|
|
64
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
65
|
+
new (): {
|
|
66
|
+
$slots: S;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type AvatarItem = {
|
|
2
|
+
key?: string;
|
|
3
|
+
text?: string;
|
|
4
|
+
imgSrc?: string;
|
|
5
|
+
modifiers?: string | string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const VvAvatarGroupProps: {
|
|
8
|
+
/**
|
|
9
|
+
* avatar items
|
|
10
|
+
*/
|
|
11
|
+
items: {
|
|
12
|
+
type: {
|
|
13
|
+
(arrayLength: number): AvatarItem[];
|
|
14
|
+
(...items: AvatarItem[]): AvatarItem[];
|
|
15
|
+
new (arrayLength: number): AvatarItem[];
|
|
16
|
+
new (...items: AvatarItem[]): AvatarItem[];
|
|
17
|
+
isArray(arg: any): arg is any[];
|
|
18
|
+
readonly prototype: any[];
|
|
19
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
20
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
21
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
22
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
23
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
24
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
25
|
+
};
|
|
26
|
+
default: () => never[];
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
toShow: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
totalItems: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
avatarModifiers: globalThis.PropType<string | string[]>;
|
|
37
|
+
modifiers: globalThis.PropType<string | string[]>;
|
|
38
|
+
};
|
package/dist/icons.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const prefix$2 = "normal";
|
|
2
|
-
const lastModified$2 =
|
|
2
|
+
const lastModified$2 = 1680170037;
|
|
3
3
|
const icons$3 = {
|
|
4
4
|
add: {
|
|
5
5
|
body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 12h16m-8-8v16"/>'
|
|
@@ -614,7 +614,7 @@ const normal = {
|
|
|
614
614
|
height: height$1
|
|
615
615
|
};
|
|
616
616
|
const prefix$1 = "detailed";
|
|
617
|
-
const lastModified$1 =
|
|
617
|
+
const lastModified$1 = 1680170037;
|
|
618
618
|
const icons$2 = {
|
|
619
619
|
add: {
|
|
620
620
|
body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M4 15.999h24m-12-12v24"/>'
|
|
@@ -1227,7 +1227,7 @@ const detailed = {
|
|
|
1227
1227
|
height
|
|
1228
1228
|
};
|
|
1229
1229
|
const prefix = "simple";
|
|
1230
|
-
const lastModified =
|
|
1230
|
+
const lastModified = 1680170037;
|
|
1231
1231
|
const icons$1 = {
|
|
1232
1232
|
add: {
|
|
1233
1233
|
body: '<path fill="none" stroke="currentColor" stroke-linecap="round" d="M.5 8h15M8 .5v15"/>'
|