@momentum-ui/web-components 2.17.13 → 2.17.14

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,16 +1,18 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[60],{119:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatMessage",(function(){return a}));var a,o=s(6),i=s(5),c=s(0),m=c.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-chat-message) .md-chat-message{color:var(--chat-message-color,#1c1c1c);display:flex;font-size:.875rem;line-height:1.375rem;margin:.75rem 0}:host(md-chat-message) .md-chat-message_content{display:flex;flex-direction:column;padding-left:.75rem}:host(md-chat-message) .md-chat-message_heading{color:var(--chat-message-color-heading,#3b3b3b);display:flex;flex:0 1 auto;font-size:.75rem;line-height:.75rem;margin-bottom:calc(.75rem*.5)}:host(md-chat-message) .md-chat-message_title{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;flex:0 1 auto}:host(md-chat-message) .md-chat-message_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;display:block}:host(md-chat-message) .md-chat-message_time{margin-left:calc(.75rem*1.5)}:host(md-chat-message) .md-chat-message_status{margin-left:calc(.75rem*1.5)}:host(md-chat-message) .md-chat-message_custom_content{margin-left:calc(.75rem*1)}@media(forced-colors:active){.md-alert__icon{background-color:Canvas}}`,r=(s(54),s(3)),l=function(e,t,s,a){var o,i=arguments.length,c=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,s,a);else for(var m=e.length-1;m>=0;m--)(o=e[m])&&(c=(i<3?o(c):i>3?o(t,s,c):o(t,s))||c);return i>3&&c&&Object.defineProperty(t,s,c),c};!function(e){let t=class extends c.LitElement{constructor(){super(...arguments),this.title="",this.src="",this.time="",this.label="Avatar",this.self=!1,this.status=""}static get styles(){return[o.a,m]}render(){return c.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[60],{119:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatMessage",(function(){return a}));s(54);var a,i=s(5),o=s(6),r=s(0),c=s(3),l=r.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-chat-message) .md-chat-message{color:var(--chat-message-color,#1c1c1c);display:flex;font-size:.875rem;line-height:1.375rem;margin:.75rem 0}:host(md-chat-message) .md-chat-message_content{display:flex;flex-direction:column;padding-left:.75rem}:host(md-chat-message) .md-chat-message_heading{color:var(--chat-message-color-heading,#3b3b3b);display:flex;flex:0 1 auto;font-size:.75rem;line-height:.75rem;margin-bottom:calc(.75rem*.5)}:host(md-chat-message) .md-chat-message_title{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;flex:0 1 auto}:host(md-chat-message) .md-chat-message_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;display:block}:host(md-chat-message) .md-chat-message_time{margin-left:calc(.75rem*1.5)}:host(md-chat-message) .md-chat-message_status{margin-left:calc(.75rem*1.5)}:host(md-chat-message) .md-chat-message_custom_content{margin-left:calc(.75rem*1)}@media(forced-colors:active){.md-alert__icon{background-color:Canvas}}`,m=function(e,t,s,a){var i,o=arguments.length,r=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,a);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(r=(o<3?i(r):o>3?i(t,s,r):i(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r};!function(e){let t=class extends r.LitElement{constructor(){super(...arguments),this.title="",this.src="",this.time="",this.label="Avatar",this.status="",this.self=!1}get computedAvatarType(){return void 0!==this.avatarType?this.avatarType:this.self?"self":void 0}get computedYouLabel(){return this.selfLabel||"You"}get isSelfType(){return void 0===this.avatarType?this.self:"self"===this.avatarType}static get styles(){return[o.a,l]}render(){return r.html`
2
2
  <div class="md-chat-message">
3
3
  <md-avatar
4
- type=${Object(r.ifDefined)(this.self?"self":void 0)}
4
+ type=${Object(c.ifDefined)(this.computedAvatarType)}
5
5
  title=${this.self?"self":this.title}
6
6
  label="${this.label}"
7
- src=${Object(r.ifDefined)(this.self?void 0:this.src)}
7
+ src=${Object(c.ifDefined)(this.self?void 0:this.src)}
8
+ color=${Object(c.ifDefined)(this.avatarColor)}
9
+ size=${Object(c.ifDefined)(this.avatarSize)}
8
10
  ></md-avatar>
9
11
 
10
12
  <div class="md-chat-message_content">
11
13
  <div class="md-chat-message_heading">
12
14
  <div class="md-chat-message_title">
13
- <span>${this.self?"You":this.title}</span>
15
+ <span>${this.isSelfType?this.computedYouLabel:this.title}</span>
14
16
  </div>
15
17
  <div class="md-chat-message_time">${this.time}</div>
16
18
  <div class="md-chat-message_status">${this.status}</div>
@@ -23,4 +25,4 @@
23
25
  </div>
24
26
  </div>
25
27
  </div>
26
- `}};l([Object(c.property)({type:String})],t.prototype,"title",void 0),l([Object(c.property)({type:String})],t.prototype,"src",void 0),l([Object(c.property)({type:String})],t.prototype,"time",void 0),l([Object(c.property)({type:String})],t.prototype,"label",void 0),l([Object(c.property)({type:Boolean})],t.prototype,"self",void 0),l([Object(c.property)({type:String})],t.prototype,"status",void 0),t=l([Object(i.a)("md-chat-message")],t),e.ELEMENT=t}(a||(a={}))}}]);
28
+ `}};m([Object(r.property)({type:String})],t.prototype,"title",void 0),m([Object(r.property)({type:String})],t.prototype,"src",void 0),m([Object(r.property)({type:String})],t.prototype,"time",void 0),m([Object(r.property)({type:String})],t.prototype,"label",void 0),m([Object(r.property)({type:String})],t.prototype,"status",void 0),m([Object(r.property)({type:String,reflect:!0,attribute:"self-label"})],t.prototype,"selfLabel",void 0),m([Object(r.property)({type:Boolean})],t.prototype,"self",void 0),m([Object(r.property)({type:String,reflect:!0,attribute:"avatar-color"})],t.prototype,"avatarColor",void 0),m([Object(r.property)({type:String,reflect:!0,attribute:"avatar-type"})],t.prototype,"avatarType",void 0),m([Object(r.property)({type:Number,reflect:!0,attribute:"avatar-size"})],t.prototype,"avatarSize",void 0),t=m([Object(i.a)("md-chat-message")],t),e.ELEMENT=t}(a||(a={}))}}]);
@@ -1,13 +1,21 @@
1
- import { LitElement } from "lit-element";
2
1
  import "@/components/avatar/Avatar";
2
+ import { type Avatar } from "@/components/avatar/Avatar";
3
+ import { LitElement } from "lit-element";
3
4
  export declare namespace ChatMessage {
4
5
  class ELEMENT extends LitElement {
5
6
  title: string;
6
7
  src: string;
7
8
  time: string;
8
9
  label: string;
9
- self: boolean;
10
10
  status: string;
11
+ selfLabel?: string;
12
+ self: boolean;
13
+ avatarColor?: string;
14
+ avatarType?: Avatar.Type;
15
+ avatarSize?: Avatar.Size;
16
+ private get computedAvatarType();
17
+ private get computedYouLabel();
18
+ private get isSelfType();
11
19
  static get styles(): import("lit-element").CSSResult[];
12
20
  render(): import("lit-element").TemplateResult;
13
21
  }
@@ -204,7 +204,7 @@ export declare namespace ComboBox {
204
204
  checkForVirtualScroll(): boolean;
205
205
  rangeChanged(): void;
206
206
  getCustomErrorContent(): DocumentFragment;
207
- getCustomContent(option: string | OptionMember): TemplateResult | DocumentFragment;
207
+ getCustomContent(option: string | OptionMember): DocumentFragment | TemplateResult;
208
208
  renderGroupLabelHeader(option: OptionMember, optionIndex: number): TemplateResult;
209
209
  renderWithoutVirtualScroll(): import("lit-html").DirectiveFn;
210
210
  highlightingSearchedText(option: OptionMember | string): TemplateResult[];
@@ -81,7 +81,7 @@ export declare namespace Grabber {
81
81
  visible: boolean;
82
82
  };
83
83
  private get grabberContainerClassMap();
84
- get iconName(): "arrow-up-bold" | "arrow-down-bold" | "list-menu-bold" | "arrow-left-bold" | "arrow-right-bold";
84
+ get iconName(): "arrow-up-bold" | "arrow-down-bold" | "arrow-left-bold" | "arrow-right-bold" | "list-menu-bold";
85
85
  get iconSize(): "10" | "12";
86
86
  render(): import("lit-element").TemplateResult;
87
87
  }
@@ -37,7 +37,7 @@ export declare namespace TimePicker {
37
37
  handleTimeBlur(event: CustomEvent, unit: TimePicker.TimeUnit): void;
38
38
  static get styles(): import("lit-element").CSSResult[];
39
39
  formatTimeUnit: (unit: TimePicker.TimeUnit) => void;
40
- messageType: (isValid: boolean) => "" | "error";
40
+ messageType: (isValid: boolean) => "error" | "";
41
41
  generateTimeBox: (unit: TimePicker.TimeUnit) => import("lit-element").TemplateResult;
42
42
  generateAmPmComboBox: () => import("lit-element").TemplateResult;
43
43
  render(): import("lit-element").TemplateResult;
@@ -13,6 +13,7 @@ export declare const BarFormat: string[];
13
13
  export declare const BarType: string[];
14
14
  export declare const coachPlacement: string[];
15
15
  export declare const chipColor: string[];
16
+ export declare const avatarColorOptions: readonly ["purple", "mint", "slate", "gold", "lime", "darkmint", "green", "yellow", "red", "orange", "violet", "cyan", "cobalt", "pink"];
16
17
  export declare const TooltipDirection: string[];
17
18
  export declare const iconColorSample: string[];
18
19
  export declare const iconSamples: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.17.13",
3
+ "version": "2.17.14",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",