@retailcrm/embed-ui-v1-components 0.5.7 → 0.5.8

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/host.cjs CHANGED
@@ -89,7 +89,7 @@ const _hoisted_6 = {
89
89
  key: 1,
90
90
  class: "ui-v1-avatar__label ui-v1-avatar__label_bad"
91
91
  };
92
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
92
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
93
93
  __name: "UiAvatar",
94
94
  props: {
95
95
  /** Путь к изображению */
@@ -196,6 +196,44 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
196
196
  };
197
197
  }
198
198
  });
199
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
200
+ __name: "UiAvatarList",
201
+ props: {
202
+ /** Список аватарок пользователей */
203
+ avatars: {
204
+ type: Array,
205
+ default: () => []
206
+ },
207
+ /** Размер аватарок */
208
+ size: {
209
+ type: String,
210
+ validator: (size) => Object.values(SIZE$5).includes(size),
211
+ default: SIZE$5.SM
212
+ }
213
+ },
214
+ setup(__props) {
215
+ const props = __props;
216
+ vue.provide(AvatarSizeKey, vue.computed(() => props.size));
217
+ return (_ctx, _cache) => {
218
+ return vue.openBlock(), vue.createElementBlock("div", {
219
+ class: vue.normalizeClass(["ui-v1-avatar-list", `ui-v1-avatar-list_${__props.size}`])
220
+ }, [
221
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.avatars, (avatar, index) => {
222
+ return vue.openBlock(), vue.createElementBlock("div", {
223
+ key: index,
224
+ class: "ui-v1-avatar-list__item"
225
+ }, [
226
+ vue.createVNode(_sfc_main$h, {
227
+ src: avatar.src,
228
+ name: avatar.name
229
+ }, null, 8, ["src", "name"])
230
+ ]);
231
+ }), 128)),
232
+ vue.renderSlot(_ctx.$slots, "default")
233
+ ], 2);
234
+ };
235
+ }
236
+ });
199
237
  const SHAPE_FLAG_ARRAY_CHILDREN = 16;
200
238
  const SHAPE_FLAG_TEXT = 8;
201
239
  const inlines = ["b", "i", "span", "strong"];
@@ -3664,7 +3702,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
3664
3702
  });
3665
3703
  exports.I18nPlugin = plugin;
3666
3704
  exports.ModalPlugin = plugin$1;
3667
- exports.UiAvatar = _sfc_main$g;
3705
+ exports.UiAvatar = _sfc_main$h;
3706
+ exports.UiAvatarList = _sfc_main$g;
3668
3707
  exports.UiButton = _sfc_main$f;
3669
3708
  exports.UiCheckbox = _sfc_main$e;
3670
3709
  exports.UiError = _sfc_main$d;
package/dist/host.d.ts CHANGED
@@ -316,6 +316,18 @@ export declare const UiAvatar: DefineComponent<
316
316
  UiAvatarProperties
317
317
  >;
318
318
 
319
+ export declare const UiAvatarList: DefineComponent<
320
+ UiAvatarListProperties
321
+ >;
322
+
323
+ declare type UiAvatarListProperties = {
324
+ avatars?: Array<{
325
+ src: string;
326
+ name: string;
327
+ }>;
328
+ size?: SIZE;
329
+ };
330
+
319
331
  declare type UiAvatarProperties = {
320
332
  src?: string;
321
333
  name?: string;
package/dist/host.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { openBlock, createElementBlock, createElementVNode, defineComponent, useSlots, ref, computed, inject, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createVNode, createCommentVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Text, Comment, h, Transition, normalizeProps, guardReactiveProps, normalizeStyle, reactive, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, useAttrs, Teleport, withDirectives, vShow, toHandlers, withModifiers, provide, createSlots } from "vue";
4
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, useSlots, ref, computed, inject, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createVNode, createCommentVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, provide, Fragment, renderList, Text, Comment, h, Transition, normalizeProps, guardReactiveProps, normalizeStyle, reactive, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, useAttrs, Teleport, withDirectives, vShow, toHandlers, withModifiers, createSlots } from "vue";
5
5
  const _hoisted_1$e = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  viewBox: "0 0 24 24"
@@ -87,7 +87,7 @@ const _hoisted_6 = {
87
87
  key: 1,
88
88
  class: "ui-v1-avatar__label ui-v1-avatar__label_bad"
89
89
  };
90
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
90
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
91
91
  __name: "UiAvatar",
92
92
  props: {
93
93
  /** Путь к изображению */
@@ -194,6 +194,44 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
194
194
  };
195
195
  }
196
196
  });
197
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
198
+ __name: "UiAvatarList",
199
+ props: {
200
+ /** Список аватарок пользователей */
201
+ avatars: {
202
+ type: Array,
203
+ default: () => []
204
+ },
205
+ /** Размер аватарок */
206
+ size: {
207
+ type: String,
208
+ validator: (size) => Object.values(SIZE$5).includes(size),
209
+ default: SIZE$5.SM
210
+ }
211
+ },
212
+ setup(__props) {
213
+ const props = __props;
214
+ provide(AvatarSizeKey, computed(() => props.size));
215
+ return (_ctx, _cache) => {
216
+ return openBlock(), createElementBlock("div", {
217
+ class: normalizeClass(["ui-v1-avatar-list", `ui-v1-avatar-list_${__props.size}`])
218
+ }, [
219
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.avatars, (avatar, index) => {
220
+ return openBlock(), createElementBlock("div", {
221
+ key: index,
222
+ class: "ui-v1-avatar-list__item"
223
+ }, [
224
+ createVNode(_sfc_main$h, {
225
+ src: avatar.src,
226
+ name: avatar.name
227
+ }, null, 8, ["src", "name"])
228
+ ]);
229
+ }), 128)),
230
+ renderSlot(_ctx.$slots, "default")
231
+ ], 2);
232
+ };
233
+ }
234
+ });
197
235
  const SHAPE_FLAG_ARRAY_CHILDREN = 16;
198
236
  const SHAPE_FLAG_TEXT = 8;
199
237
  const inlines = ["b", "i", "span", "strong"];
@@ -3663,7 +3701,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3663
3701
  export {
3664
3702
  plugin as I18nPlugin,
3665
3703
  plugin$1 as ModalPlugin,
3666
- _sfc_main$g as UiAvatar,
3704
+ _sfc_main$h as UiAvatar,
3705
+ _sfc_main$g as UiAvatarList,
3667
3706
  _sfc_main$f as UiButton,
3668
3707
  _sfc_main$e as UiCheckbox,
3669
3708
  _sfc_main$d as UiError,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui-v1-components",
3
3
  "type": "module",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "license": "MIT",
6
6
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
7
7
  "repository": "git@github.com:retailcrm/embed-ui.git",