@momentum-ui/web-components 2.18.1 → 2.19.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.
@@ -1,4 +1,6 @@
1
1
  import "@/components/icon/Icon";
2
- declare const AvatarType: readonly ["active", "away", "away-calling", "busy", "bot", "call", "dnd", "group", "inactive", "meeting", "ooo", "on-mobile", "on-device", "on-hold", "presenting", "self", "schedule", "typing", "engaged", "idle", "rona", "quiet-hours", ""];
2
+ declare const AvatarState: readonly ["active", "rest"];
3
+ declare const AvatarStyle: readonly ["default", "table"];
4
+ declare const AvatarType: readonly ["active", "away", "away-calling", "busy", "bot", "call", "dnd", "group", "inactive", "meeting", "ooo", "on-mobile", "on-device", "on-hold", "presenting", "self", "schedule", "typing", "engaged", "idle", "rona", "quiet-hours", "channel-chat", "channel-sms-inbound", "channel-sms-outbound", "channel-email-inbound", "channel-email-outbound", "channel-call", "channel-callback", "channel-headset", "channel-campaign", "channel-emoji", "channel-webex", "channel-fb-messenger", "channel-apple-chat", "channel-line", "channel-twitter-x", "channel-viber", "channel-whats-app", "channel-we-chat", "channel-spam", "channel-custom", ""];
3
5
  declare const AvatarSize: number[];
4
- export { AvatarSize, AvatarType };
6
+ export { AvatarSize, AvatarState, AvatarStyle, AvatarType };
@@ -9,10 +9,12 @@ import "@/components/avatar/Presence";
9
9
  import "@/components/icon/Icon";
10
10
  import "@/components/loading/Loading";
11
11
  import { LitElement, PropertyValues } from "lit-element";
12
- import { AvatarSize, AvatarType } from "./Avatar.constants";
12
+ import { AvatarSize, AvatarState, AvatarStyle, AvatarType } from "./Avatar.constants";
13
13
  export declare namespace Avatar {
14
14
  type Type = (typeof AvatarType)[number];
15
15
  type Size = (typeof AvatarSize)[number];
16
+ type State = (typeof AvatarState)[number];
17
+ type Style = (typeof AvatarStyle)[number];
16
18
  type Role = "img" | "button";
17
19
  class ELEMENT extends LitElement {
18
20
  private _tabIndex;
@@ -34,6 +36,23 @@ export declare namespace Avatar {
34
36
  hasNotification: boolean;
35
37
  clickable: boolean;
36
38
  clickFunction?: () => void;
39
+ /**
40
+ * The style of the avatar based on where it is used.
41
+ * Currently only affects channel avatars.
42
+ * @type {Avatar.Style}
43
+ * @default "default"
44
+ * @property {Avatar.Style} avatarStyle - Options: "default" | "table"
45
+ */
46
+ avatarStyle: Style;
47
+ /**
48
+ * The state determines the background color of channel avatars,
49
+ * in combination with the avatar style.
50
+ * Currently only affects channel avatars.
51
+ * @type {Avatar.State}
52
+ * @default "rest"
53
+ * @property {Avatar.State} state - Options: "rest" | "active"
54
+ */
55
+ state: State;
37
56
  private imageLoaded;
38
57
  private imageErrored;
39
58
  private presenceColor;
@@ -46,6 +65,8 @@ export declare namespace Avatar {
46
65
  private get avatarStyleMap();
47
66
  private get pretifyTitle();
48
67
  private get chatIconName();
68
+ private readonly iconNameMap;
69
+ private getIconName;
49
70
  private get chatIconSize();
50
71
  private get iconSize();
51
72
  get renderIsTyping(): {};
@@ -57,8 +78,10 @@ export declare namespace Avatar {
57
78
  private handleImageError;
58
79
  handleKeyDown(event: KeyboardEvent): void;
59
80
  handleClick(event: MouseEvent): void;
81
+ private getBrandOrDesignIconSet;
60
82
  get avatarContent(): {};
61
83
  renderPresence(): {};
84
+ private renderAvatarContent;
62
85
  render(): import("lit-element").TemplateResult;
63
86
  }
64
87
  }
@@ -20,7 +20,7 @@ export declare namespace MenuOverlay {
20
20
  const ELEMENT_base: typeof LitElement & import("@/mixins/FocusTrapMixin").AnyConstructor<import("@/mixins/FocusTrapMixin").FocusTrapClass & import("@/mixins/FocusTrapMixin").FocusTrapInterface & import("../../mixins/FocusMixin").FocusClass>;
21
21
  export class ELEMENT extends ELEMENT_base {
22
22
  private _isOpen;
23
- private static activeOverlay;
23
+ private static readonly activeOverlay;
24
24
  get isOpen(): boolean;
25
25
  set isOpen(newValue: boolean);
26
26
  size: MenuOverlay.Size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.18.1",
3
+ "version": "2.19.0",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",