@zeedhi/zd-avatar-vue 1.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.
@@ -0,0 +1,304 @@
1
+ import { Prop, Component } from 'vue-property-decorator';
2
+ import { PropWatch, ZdComponentRender } from '@zeedhi/vuetify';
3
+ import { Avatar } from '@zeedhi/zd-avatar-common';
4
+
5
+ /*! *****************************************************************************
6
+ Copyright (c) Microsoft Corporation.
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any
9
+ purpose with or without fee is hereby granted.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ ***************************************************************************** */
19
+
20
+ function __decorate(decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ }
26
+
27
+ function __metadata(metadataKey, metadataValue) {
28
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
29
+ }
30
+
31
+ let ZdAvatar = class ZdAvatar extends ZdComponentRender {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.instanceType = Avatar;
35
+ }
36
+ };
37
+ __decorate([
38
+ PropWatch({ type: [String, Number], default: 48 }),
39
+ __metadata("design:type", Object)
40
+ ], ZdAvatar.prototype, "size", void 0);
41
+ __decorate([
42
+ PropWatch({ type: [String, Boolean], default: false }),
43
+ __metadata("design:type", Boolean)
44
+ ], ZdAvatar.prototype, "tile", void 0);
45
+ __decorate([
46
+ Prop({ type: [String, Array], default: () => ([]) }),
47
+ __metadata("design:type", Array)
48
+ ], ZdAvatar.prototype, "avatarSlot", void 0);
49
+ __decorate([
50
+ PropWatch({ type: [String], default: '' }),
51
+ __metadata("design:type", String)
52
+ ], ZdAvatar.prototype, "color", void 0);
53
+ __decorate([
54
+ PropWatch({ type: [String, Boolean], default: false }),
55
+ __metadata("design:type", Boolean)
56
+ ], ZdAvatar.prototype, "rounded", void 0);
57
+ __decorate([
58
+ PropWatch({ type: [String, Number] }),
59
+ __metadata("design:type", Object)
60
+ ], ZdAvatar.prototype, "height", void 0);
61
+ __decorate([
62
+ PropWatch({ type: [String, Number] }),
63
+ __metadata("design:type", Object)
64
+ ], ZdAvatar.prototype, "minHeight", void 0);
65
+ __decorate([
66
+ PropWatch({ type: [String, Number] }),
67
+ __metadata("design:type", Object)
68
+ ], ZdAvatar.prototype, "maxHeight", void 0);
69
+ __decorate([
70
+ PropWatch({ type: [String, Number] }),
71
+ __metadata("design:type", Object)
72
+ ], ZdAvatar.prototype, "width", void 0);
73
+ __decorate([
74
+ PropWatch({ type: [String, Number] }),
75
+ __metadata("design:type", Object)
76
+ ], ZdAvatar.prototype, "minWidth", void 0);
77
+ __decorate([
78
+ PropWatch({ type: [String, Number] }),
79
+ __metadata("design:type", Object)
80
+ ], ZdAvatar.prototype, "maxWidth", void 0);
81
+ ZdAvatar = __decorate([
82
+ Component
83
+ ], ZdAvatar);
84
+ var script = ZdAvatar;
85
+
86
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
87
+ if (typeof shadowMode !== 'boolean') {
88
+ createInjectorSSR = createInjector;
89
+ createInjector = shadowMode;
90
+ shadowMode = false;
91
+ }
92
+ // Vue.extend constructor export interop.
93
+ const options = typeof script === 'function' ? script.options : script;
94
+ // render functions
95
+ if (template && template.render) {
96
+ options.render = template.render;
97
+ options.staticRenderFns = template.staticRenderFns;
98
+ options._compiled = true;
99
+ // functional template
100
+ if (isFunctionalTemplate) {
101
+ options.functional = true;
102
+ }
103
+ }
104
+ // scopedId
105
+ if (scopeId) {
106
+ options._scopeId = scopeId;
107
+ }
108
+ let hook;
109
+ if (moduleIdentifier) {
110
+ // server build
111
+ hook = function (context) {
112
+ // 2.3 injection
113
+ context =
114
+ context || // cached call
115
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
116
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
117
+ // 2.2 with runInNewContext: true
118
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
119
+ context = __VUE_SSR_CONTEXT__;
120
+ }
121
+ // inject component styles
122
+ if (style) {
123
+ style.call(this, createInjectorSSR(context));
124
+ }
125
+ // register component module identifier for async chunk inference
126
+ if (context && context._registeredComponents) {
127
+ context._registeredComponents.add(moduleIdentifier);
128
+ }
129
+ };
130
+ // used by ssr in case component is cached and beforeCreate
131
+ // never gets called
132
+ options._ssrRegister = hook;
133
+ }
134
+ else if (style) {
135
+ hook = shadowMode
136
+ ? function (context) {
137
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
138
+ }
139
+ : function (context) {
140
+ style.call(this, createInjector(context));
141
+ };
142
+ }
143
+ if (hook) {
144
+ if (options.functional) {
145
+ // register for functional component in vue file
146
+ const originalRender = options.render;
147
+ options.render = function renderWithStyleInjection(h, context) {
148
+ hook.call(context);
149
+ return originalRender(h, context);
150
+ };
151
+ }
152
+ else {
153
+ // inject component registration as beforeCreate hook
154
+ const existing = options.beforeCreate;
155
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
156
+ }
157
+ }
158
+ return script;
159
+ }
160
+
161
+ const isOldIE = typeof navigator !== 'undefined' &&
162
+ /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
163
+ function createInjector(context) {
164
+ return (id, style) => addStyle(id, style);
165
+ }
166
+ let HEAD;
167
+ const styles = {};
168
+ function addStyle(id, css) {
169
+ const group = isOldIE ? css.media || 'default' : id;
170
+ const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
171
+ if (!style.ids.has(id)) {
172
+ style.ids.add(id);
173
+ let code = css.source;
174
+ if (css.map) {
175
+ // https://developer.chrome.com/devtools/docs/javascript-debugging
176
+ // this makes source maps inside style tags work properly in Chrome
177
+ code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
178
+ // http://stackoverflow.com/a/26603875
179
+ code +=
180
+ '\n/*# sourceMappingURL=data:application/json;base64,' +
181
+ btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
182
+ ' */';
183
+ }
184
+ if (!style.element) {
185
+ style.element = document.createElement('style');
186
+ style.element.type = 'text/css';
187
+ if (css.media)
188
+ style.element.setAttribute('media', css.media);
189
+ if (HEAD === undefined) {
190
+ HEAD = document.head || document.getElementsByTagName('head')[0];
191
+ }
192
+ HEAD.appendChild(style.element);
193
+ }
194
+ if ('styleSheet' in style.element) {
195
+ style.styles.push(code);
196
+ style.element.styleSheet.cssText = style.styles
197
+ .filter(Boolean)
198
+ .join('\n');
199
+ }
200
+ else {
201
+ const index = style.ids.size - 1;
202
+ const textNode = document.createTextNode(code);
203
+ const nodes = style.element.childNodes;
204
+ if (nodes[index])
205
+ style.element.removeChild(nodes[index]);
206
+ if (nodes.length)
207
+ style.element.insertBefore(textNode, nodes[index]);
208
+ else
209
+ style.element.appendChild(textNode);
210
+ }
211
+ }
212
+ }
213
+
214
+ /* script */
215
+ const __vue_script__ = script;
216
+
217
+ /* template */
218
+ var __vue_render__ = function () {
219
+ var _vm = this;
220
+ var _h = _vm.$createElement;
221
+ var _c = _vm._self._c || _h;
222
+ return _c(
223
+ "v-avatar",
224
+ _vm._g(
225
+ {
226
+ directives: [
227
+ {
228
+ name: "show",
229
+ rawName: "v-show",
230
+ value: _vm.instance.isVisible,
231
+ expression: "instance.isVisible",
232
+ },
233
+ ],
234
+ class: [
235
+ _vm.instance.cssClass,
236
+ "zd-avatar",
237
+ { "zd-avatar--link": !!_vm.instance.events.click },
238
+ ],
239
+ style: _vm.instance.cssStyle,
240
+ attrs: {
241
+ size: _vm.instance.size,
242
+ tile: _vm.instance.tile,
243
+ color: _vm.instance.color,
244
+ rounded: _vm.instance.rounded,
245
+ height: _vm.instance.height,
246
+ minHeight: _vm.instance.minHeight,
247
+ maxHeight: _vm.instance.maxHeight,
248
+ width: _vm.instance.width,
249
+ minWidth: _vm.instance.minWidth,
250
+ maxWidth: _vm.instance.maxWidth,
251
+ },
252
+ on: { click: _vm.click },
253
+ },
254
+ Object.assign({}, _vm.$attrs["dropdown-activator"])
255
+ ),
256
+ _vm._l(_vm.instance.avatarSlot, function (comp, index) {
257
+ return _c(
258
+ comp.component,
259
+ _vm._b(
260
+ { key: index, tag: "component", attrs: { parent: _vm.instance } },
261
+ "component",
262
+ comp,
263
+ false
264
+ )
265
+ )
266
+ }),
267
+ 1
268
+ )
269
+ };
270
+ var __vue_staticRenderFns__ = [];
271
+ __vue_render__._withStripped = true;
272
+
273
+ /* style */
274
+ const __vue_inject_styles__ = function (inject) {
275
+ if (!inject) return
276
+ inject("data-v-6452bf7f_0", { source: ".zd-avatar--link {\n cursor: pointer;\n}", map: undefined, media: undefined });
277
+
278
+ };
279
+ /* scoped */
280
+ const __vue_scope_id__ = undefined;
281
+ /* module identifier */
282
+ const __vue_module_identifier__ = undefined;
283
+ /* functional template */
284
+ const __vue_is_functional_template__ = false;
285
+ /* style inject SSR */
286
+
287
+ /* style inject shadow dom */
288
+
289
+
290
+
291
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
292
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
293
+ __vue_inject_styles__,
294
+ __vue_script__,
295
+ __vue_scope_id__,
296
+ __vue_is_functional_template__,
297
+ __vue_module_identifier__,
298
+ false,
299
+ createInjector,
300
+ undefined,
301
+ undefined
302
+ );
303
+
304
+ export { __vue_component__ as ZdAvatar, script as ZdAvatarClass };
@@ -0,0 +1,311 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue-property-decorator'), require('@zeedhi/vuetify'), require('@zeedhi/zd-avatar-common')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vue-property-decorator', '@zeedhi/vuetify', '@zeedhi/zd-avatar-common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-avatar-vue"] = {}, global["vue-property-decorator"], global["@zeedhi/vuetify"], global["@zeedhi/zd-avatar-common"]));
5
+ })(this, (function (exports, vuePropertyDecorator, vuetify, zdAvatarCommon) { 'use strict';
6
+
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+
22
+ function __decorate(decorators, target, key, desc) {
23
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
26
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
27
+ }
28
+
29
+ function __metadata(metadataKey, metadataValue) {
30
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
31
+ }
32
+
33
+ let ZdAvatar = class ZdAvatar extends vuetify.ZdComponentRender {
34
+ constructor() {
35
+ super(...arguments);
36
+ this.instanceType = zdAvatarCommon.Avatar;
37
+ }
38
+ };
39
+ __decorate([
40
+ vuetify.PropWatch({ type: [String, Number], default: 48 }),
41
+ __metadata("design:type", Object)
42
+ ], ZdAvatar.prototype, "size", void 0);
43
+ __decorate([
44
+ vuetify.PropWatch({ type: [String, Boolean], default: false }),
45
+ __metadata("design:type", Boolean)
46
+ ], ZdAvatar.prototype, "tile", void 0);
47
+ __decorate([
48
+ vuePropertyDecorator.Prop({ type: [String, Array], default: () => ([]) }),
49
+ __metadata("design:type", Array)
50
+ ], ZdAvatar.prototype, "avatarSlot", void 0);
51
+ __decorate([
52
+ vuetify.PropWatch({ type: [String], default: '' }),
53
+ __metadata("design:type", String)
54
+ ], ZdAvatar.prototype, "color", void 0);
55
+ __decorate([
56
+ vuetify.PropWatch({ type: [String, Boolean], default: false }),
57
+ __metadata("design:type", Boolean)
58
+ ], ZdAvatar.prototype, "rounded", void 0);
59
+ __decorate([
60
+ vuetify.PropWatch({ type: [String, Number] }),
61
+ __metadata("design:type", Object)
62
+ ], ZdAvatar.prototype, "height", void 0);
63
+ __decorate([
64
+ vuetify.PropWatch({ type: [String, Number] }),
65
+ __metadata("design:type", Object)
66
+ ], ZdAvatar.prototype, "minHeight", void 0);
67
+ __decorate([
68
+ vuetify.PropWatch({ type: [String, Number] }),
69
+ __metadata("design:type", Object)
70
+ ], ZdAvatar.prototype, "maxHeight", void 0);
71
+ __decorate([
72
+ vuetify.PropWatch({ type: [String, Number] }),
73
+ __metadata("design:type", Object)
74
+ ], ZdAvatar.prototype, "width", void 0);
75
+ __decorate([
76
+ vuetify.PropWatch({ type: [String, Number] }),
77
+ __metadata("design:type", Object)
78
+ ], ZdAvatar.prototype, "minWidth", void 0);
79
+ __decorate([
80
+ vuetify.PropWatch({ type: [String, Number] }),
81
+ __metadata("design:type", Object)
82
+ ], ZdAvatar.prototype, "maxWidth", void 0);
83
+ ZdAvatar = __decorate([
84
+ vuePropertyDecorator.Component
85
+ ], ZdAvatar);
86
+ var script = ZdAvatar;
87
+
88
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
89
+ if (typeof shadowMode !== 'boolean') {
90
+ createInjectorSSR = createInjector;
91
+ createInjector = shadowMode;
92
+ shadowMode = false;
93
+ }
94
+ // Vue.extend constructor export interop.
95
+ const options = typeof script === 'function' ? script.options : script;
96
+ // render functions
97
+ if (template && template.render) {
98
+ options.render = template.render;
99
+ options.staticRenderFns = template.staticRenderFns;
100
+ options._compiled = true;
101
+ // functional template
102
+ if (isFunctionalTemplate) {
103
+ options.functional = true;
104
+ }
105
+ }
106
+ // scopedId
107
+ if (scopeId) {
108
+ options._scopeId = scopeId;
109
+ }
110
+ let hook;
111
+ if (moduleIdentifier) {
112
+ // server build
113
+ hook = function (context) {
114
+ // 2.3 injection
115
+ context =
116
+ context || // cached call
117
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
118
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
119
+ // 2.2 with runInNewContext: true
120
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
121
+ context = __VUE_SSR_CONTEXT__;
122
+ }
123
+ // inject component styles
124
+ if (style) {
125
+ style.call(this, createInjectorSSR(context));
126
+ }
127
+ // register component module identifier for async chunk inference
128
+ if (context && context._registeredComponents) {
129
+ context._registeredComponents.add(moduleIdentifier);
130
+ }
131
+ };
132
+ // used by ssr in case component is cached and beforeCreate
133
+ // never gets called
134
+ options._ssrRegister = hook;
135
+ }
136
+ else if (style) {
137
+ hook = shadowMode
138
+ ? function (context) {
139
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
140
+ }
141
+ : function (context) {
142
+ style.call(this, createInjector(context));
143
+ };
144
+ }
145
+ if (hook) {
146
+ if (options.functional) {
147
+ // register for functional component in vue file
148
+ const originalRender = options.render;
149
+ options.render = function renderWithStyleInjection(h, context) {
150
+ hook.call(context);
151
+ return originalRender(h, context);
152
+ };
153
+ }
154
+ else {
155
+ // inject component registration as beforeCreate hook
156
+ const existing = options.beforeCreate;
157
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
158
+ }
159
+ }
160
+ return script;
161
+ }
162
+
163
+ const isOldIE = typeof navigator !== 'undefined' &&
164
+ /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
165
+ function createInjector(context) {
166
+ return (id, style) => addStyle(id, style);
167
+ }
168
+ let HEAD;
169
+ const styles = {};
170
+ function addStyle(id, css) {
171
+ const group = isOldIE ? css.media || 'default' : id;
172
+ const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
173
+ if (!style.ids.has(id)) {
174
+ style.ids.add(id);
175
+ let code = css.source;
176
+ if (css.map) {
177
+ // https://developer.chrome.com/devtools/docs/javascript-debugging
178
+ // this makes source maps inside style tags work properly in Chrome
179
+ code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
180
+ // http://stackoverflow.com/a/26603875
181
+ code +=
182
+ '\n/*# sourceMappingURL=data:application/json;base64,' +
183
+ btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
184
+ ' */';
185
+ }
186
+ if (!style.element) {
187
+ style.element = document.createElement('style');
188
+ style.element.type = 'text/css';
189
+ if (css.media)
190
+ style.element.setAttribute('media', css.media);
191
+ if (HEAD === undefined) {
192
+ HEAD = document.head || document.getElementsByTagName('head')[0];
193
+ }
194
+ HEAD.appendChild(style.element);
195
+ }
196
+ if ('styleSheet' in style.element) {
197
+ style.styles.push(code);
198
+ style.element.styleSheet.cssText = style.styles
199
+ .filter(Boolean)
200
+ .join('\n');
201
+ }
202
+ else {
203
+ const index = style.ids.size - 1;
204
+ const textNode = document.createTextNode(code);
205
+ const nodes = style.element.childNodes;
206
+ if (nodes[index])
207
+ style.element.removeChild(nodes[index]);
208
+ if (nodes.length)
209
+ style.element.insertBefore(textNode, nodes[index]);
210
+ else
211
+ style.element.appendChild(textNode);
212
+ }
213
+ }
214
+ }
215
+
216
+ /* script */
217
+ const __vue_script__ = script;
218
+
219
+ /* template */
220
+ var __vue_render__ = function () {
221
+ var _vm = this;
222
+ var _h = _vm.$createElement;
223
+ var _c = _vm._self._c || _h;
224
+ return _c(
225
+ "v-avatar",
226
+ _vm._g(
227
+ {
228
+ directives: [
229
+ {
230
+ name: "show",
231
+ rawName: "v-show",
232
+ value: _vm.instance.isVisible,
233
+ expression: "instance.isVisible",
234
+ },
235
+ ],
236
+ class: [
237
+ _vm.instance.cssClass,
238
+ "zd-avatar",
239
+ { "zd-avatar--link": !!_vm.instance.events.click },
240
+ ],
241
+ style: _vm.instance.cssStyle,
242
+ attrs: {
243
+ size: _vm.instance.size,
244
+ tile: _vm.instance.tile,
245
+ color: _vm.instance.color,
246
+ rounded: _vm.instance.rounded,
247
+ height: _vm.instance.height,
248
+ minHeight: _vm.instance.minHeight,
249
+ maxHeight: _vm.instance.maxHeight,
250
+ width: _vm.instance.width,
251
+ minWidth: _vm.instance.minWidth,
252
+ maxWidth: _vm.instance.maxWidth,
253
+ },
254
+ on: { click: _vm.click },
255
+ },
256
+ Object.assign({}, _vm.$attrs["dropdown-activator"])
257
+ ),
258
+ _vm._l(_vm.instance.avatarSlot, function (comp, index) {
259
+ return _c(
260
+ comp.component,
261
+ _vm._b(
262
+ { key: index, tag: "component", attrs: { parent: _vm.instance } },
263
+ "component",
264
+ comp,
265
+ false
266
+ )
267
+ )
268
+ }),
269
+ 1
270
+ )
271
+ };
272
+ var __vue_staticRenderFns__ = [];
273
+ __vue_render__._withStripped = true;
274
+
275
+ /* style */
276
+ const __vue_inject_styles__ = function (inject) {
277
+ if (!inject) return
278
+ inject("data-v-6452bf7f_0", { source: ".zd-avatar--link {\n cursor: pointer;\n}", map: undefined, media: undefined });
279
+
280
+ };
281
+ /* scoped */
282
+ const __vue_scope_id__ = undefined;
283
+ /* module identifier */
284
+ const __vue_module_identifier__ = undefined;
285
+ /* functional template */
286
+ const __vue_is_functional_template__ = false;
287
+ /* style inject SSR */
288
+
289
+ /* style inject shadow dom */
290
+
291
+
292
+
293
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
294
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
295
+ __vue_inject_styles__,
296
+ __vue_script__,
297
+ __vue_scope_id__,
298
+ __vue_is_functional_template__,
299
+ __vue_module_identifier__,
300
+ false,
301
+ createInjector,
302
+ undefined,
303
+ undefined
304
+ );
305
+
306
+ exports.ZdAvatar = __vue_component__;
307
+ exports.ZdAvatarClass = script;
308
+
309
+ Object.defineProperty(exports, '__esModule', { value: true });
310
+
311
+ }));
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@zeedhi/zd-avatar-vue",
3
+ "version": "1.0.0",
4
+ "description": "Implementation of Avatar component using Zeedhi library",
5
+ "main": "dist/avatar-vue.umd.js",
6
+ "module": "dist/avatar-vue.esm.js",
7
+ "typings": "types/index.d.ts",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "scripts": {
12
+ "build": "rollup -c",
13
+ "lint": "eslint . --ext .ts --fix",
14
+ "watch": "rollup -cw"
15
+ },
16
+ "peerDependencies": {
17
+ "@zeedhi/common": "^1.0.0",
18
+ "@zeedhi/vuetify": "^1.0.0",
19
+ "@zeedhi/zd-avatar-common": "*",
20
+ "vue": "^2.6.12",
21
+ "vue-class-component": "^7.2.6",
22
+ "vue-property-decorator": "^9.1.2"
23
+ },
24
+ "gitHead": "58a9171c63c0077a6c0edfc2b8d3eef70b435beb"
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": [
4
+ "./src/**/*.ts",
5
+ "./tests/**/*.ts"
6
+ ],
7
+ "exclude": [
8
+ "node_modules"
9
+ ]
10
+ }
@@ -0,0 +1,18 @@
1
+ import { ZdComponentRender } from '@zeedhi/vuetify';
2
+ import { Avatar as AvatarClass } from '@zeedhi/zd-avatar-common';
3
+ import { IComponentRender } from '@zeedhi/common';
4
+ export default class ZdAvatar extends ZdComponentRender {
5
+ instance: AvatarClass;
6
+ instanceType: typeof AvatarClass;
7
+ size: number | string;
8
+ tile: boolean;
9
+ avatarSlot: IComponentRender[];
10
+ color: string;
11
+ rounded: boolean;
12
+ height?: number | string;
13
+ minHeight?: number | string;
14
+ maxHeight?: number | string;
15
+ width?: number | string;
16
+ minWidth?: number | string;
17
+ maxWidth?: number | string;
18
+ }
@@ -0,0 +1,3 @@
1
+ import ZdAvatar from './Avatar.vue';
2
+ import ZdAvatarClass from './Avatar';
3
+ export { ZdAvatar, ZdAvatarClass };