@momentum-ui/web-components 2.23.6 → 2.23.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/index.js CHANGED
@@ -1 +1 @@
1
- require("./7678"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./4977"),require("./3135"),require("./1598"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6700"),require("./6795"),require("./528"),require("./4548"),require("./76"),require("./1392"),require("./9164"),require("./8004"),require("./1214"),require("./1625"),require("./3625"),require("./6067"),require("./8841"),require("./3112"),require("./3866"),require("./1107"),require("./7330"),require("./7092"),require("./9719"),require("./6979"),require("./9130"),require("./6273"),require("./8612"),require("./9618"),require("./8521"),require("./2019"),require("./779"),require("./573"),require("./5801"),require("./2043"),require("./8171"),require("./2798"),require("./5467"),require("./2984"),require("./1869"),require("./2215"),require("./4392"),require("./630"),require("./3604"),require("./8728"),require("./8227"),require("./1250"),require("./1705"),require("./7997"),require("./6953"),require("./7875"),require("./7833"),require("./6400"),require("./587"),require("./6441"),require("./6015"),require("./3663"),module.exports=require("./index-entry");
1
+ require("./7678"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./4977"),require("./3135"),require("./1598"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6877"),require("./6700"),require("./6795"),require("./8923"),require("./4548"),require("./76"),require("./1392"),require("./9164"),require("./8004"),require("./1214"),require("./1625"),require("./3625"),require("./6067"),require("./8841"),require("./3112"),require("./3866"),require("./1107"),require("./7330"),require("./7092"),require("./9719"),require("./6979"),require("./9130"),require("./6273"),require("./8612"),require("./9618"),require("./8521"),require("./2019"),require("./779"),require("./573"),require("./5801"),require("./2043"),require("./8171"),require("./2798"),require("./5467"),require("./2984"),require("./1869"),require("./2215"),require("./4392"),require("./630"),require("./3604"),require("./8728"),require("./8227"),require("./1250"),require("./1705"),require("./7997"),require("./6953"),require("./7875"),require("./7833"),require("./6400"),require("./587"),require("./6441"),require("./6015"),require("./3663"),module.exports=require("./index-entry");
@@ -5,15 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import "@/components/avatar/Presence";
9
8
  import "@/components/icon/Icon";
10
9
  import "@/components/loading/Loading";
10
+ import "@/components/presence/Presence";
11
11
  import { LitElement, PropertyValues } from "lit-element";
12
+ import { PresenceState } from "../presence/Presence.utils";
12
13
  import { AvatarChannelType, AvatarSize, AvatarState, AvatarStyle, AvatarType } from "./Avatar.constants";
13
- import { PresenceType } from "./Presence.utils";
14
- import { TaskItem } from "../taskitem/TaskItem";
15
14
  export declare namespace Avatar {
16
- type PresenceState = (typeof PresenceType)[number] | TaskItem.TaskItemStatus;
17
15
  type ChannelType = (typeof AvatarChannelType)[number];
18
16
  type Type = (typeof AvatarType)[number] | PresenceState | ChannelType;
19
17
  type Size = (typeof AvatarSize)[number];
@@ -60,10 +58,7 @@ export declare namespace Avatar {
60
58
  state: State;
61
59
  private imageLoaded;
62
60
  private imageErrored;
63
- private presenceColor;
64
- private presenceIcon;
65
61
  static get styles(): import("lit-element").CSSResult[];
66
- private isPresenceType;
67
62
  firstUpdated(): void;
68
63
  updated(changedProperties: PropertyValues): void;
69
64
  private get avatarClassMap();
@@ -74,6 +69,7 @@ export declare namespace Avatar {
74
69
  private readonly iconNameMap;
75
70
  private getIconName;
76
71
  private get chatIconSize();
72
+ private get presenceSize();
77
73
  private get iconSize();
78
74
  get renderIsTyping(): {};
79
75
  private get avatarLetter();
@@ -11,7 +11,7 @@ export declare const buttonSize: readonly ["20", "24", "28", "32", "36", "40", "
11
11
  export declare const buttonTag: readonly ["button", "input", "a"];
12
12
  export declare const buttonType: readonly ["button", "reset", "submit"];
13
13
  export declare const buttonRoles: readonly ["button", "checkbox", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "switch", "tab"];
14
- export declare const buttonVariant: readonly ["primary", "secondary", "red", "green", "ghost", "ghostInheritTextColor", "white", "darkGrey", "promotional", "tab", "available", "unavailable", "engaged", "idle", "inverted-primary", "inverted-secondary", "dropdown", "secondary-negative", "secondary-positive", "secondary-accent"];
14
+ export declare const buttonVariant: readonly ["primary", "secondary", "red", "green", "ghost", "ghostInheritTextColor", "white", "darkGrey", "promotional", "tab", "available", "unavailable", "engaged", "idle", "inverted-primary", "inverted-secondary", "inverted-ghost", "dropdown", "secondary-negative", "secondary-positive", "secondary-accent"];
15
15
  export declare const buttonColor: readonly ["blue", "red", "green", "orange", "yellow", "mint", "purple", "pink", "cyan", "white", "dark-gray", "duck-egg", "violet", "color-none", ""];
16
16
  export declare const buttonAriaLive: readonly ["", "off", "polite", "assertive"];
17
17
  export declare namespace Button {
@@ -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
  }
@@ -1,14 +1,18 @@
1
1
  import "@/components/icon/Icon";
2
2
  import { LitElement } from "lit-element";
3
- import { AvatarSize } from "./Avatar.constants";
3
+ import { PresenceState } from "./Presence.utils";
4
4
  export declare namespace Presence {
5
- type Size = (typeof AvatarSize)[number];
6
5
  class ELEMENT extends LitElement {
7
- name: string;
8
- size: Size;
6
+ size: number;
9
7
  title: string;
10
- color: string;
8
+ presenceType: PresenceState;
9
+ newMomentum: boolean;
10
+ failurePresence: boolean;
11
+ avatarLinked: boolean;
12
+ private presenceColor;
13
+ private presenceIcon;
11
14
  static get styles(): import("lit-element").CSSResult[];
15
+ private get presenceClassMap();
12
16
  render(): import("lit-element").TemplateResult;
13
17
  }
14
18
  }
@@ -1,9 +1,10 @@
1
1
  import { TaskItem } from "../taskitem/TaskItem";
2
+ export type PresenceState = (typeof PresenceType)[number] | TaskItem.TaskItemStatus;
2
3
  type ReturnType = {
3
4
  presenceIcon: string | undefined;
4
5
  presenceColor: string | undefined;
5
6
  };
6
7
  export declare const PresenceType: readonly ["active", "meeting", "schedule", "call", "dnd", "presenting", "quiet-hours", "away", "idle", "inactive", "away-calling", "ooo", "busy", "on-mobile", "on-device", "on-hold", "engaged", "rona", ""];
7
- export declare const getPresenceIconColor: (presenceType: (typeof PresenceType)[number] | TaskItem.TaskItemStatus, failureBadge: boolean, isMomentumDesign?: boolean) => ReturnType;
8
- export declare function getPresenceSize(size: number): number;
8
+ export declare const isPresenceType: (value: string) => value is PresenceState;
9
+ export declare const getPresenceIconColor: (presenceType: PresenceState, failureBadge: boolean, isMomentumDesign?: boolean) => ReturnType;
9
10
  export {};
@@ -65,6 +65,7 @@ export { Modal } from "./components/modal/Modal";
65
65
  export { Pagination } from "./components/pagination/Pagination";
66
66
  export { PhoneInput } from "./components/phone-input/PhoneInput";
67
67
  export { Popover, PopoverController } from "./components/popover/Popover";
68
+ export { Presence } from "./components/presence/Presence";
68
69
  export { ProgressBar } from "./components/progress-bar/ProgressBar";
69
70
  export { Radio } from "./components/radio/Radio";
70
71
  export { RadioGroup } from "./components/radio/RadioGroup";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.23.6",
3
+ "version": "2.23.8",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",
package/dist/528.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[528],{22887:(e,a,r)=>{r.d(a,{D8:()=>s,E0:()=>c,eO:()=>n});var t=r(31465);const n=["active","meeting","schedule","call","dnd","presenting","quiet-hours","away","idle","inactive","away-calling","ooo","busy","on-mobile","on-device","on-hold","engaged","rona",""],c=(e,a,r=!1)=>{let n="",c="";if(a)n="warning-badge-filled",c="var(--mds-color-theme-indicator-attention)";else{if(!e)return{presenceIcon:void 0,presenceColor:void 0};switch(e){case"active":n="active-presence-small-filled",c="var(--avatar-presence-active)";break;case"meeting":n=r?"camera-presence-filled":"camera-presence_14",c="var(--avatar-presence-unstable)";break;case"schedule":n=r?"meetings-presence-badge-filled":"meetings-presence_14",c="var(--avatar-presence-unstable)";break;case"call":n=r?"handset-filled":"handset-active_16",c="var(--avatar-presence-unstable)";break;case"dnd":n=r?"dnd-presence-badge-filled":"dnd-presence_14",c="var(--avatar-presence-dnd)";break;case"presenting":n=r?"share-screen-badge-filled":"content-share_14",c="var(--avatar-presence-dnd)";break;case"quiet-hours":n="quiet-hours-presence-filled",c="var(--avatar-presence-inactive)";break;case"away":case"idle":case"inactive":n=r?"recents-presence-badge-filled":"recents-presence_14",c="var(--avatar-presence-inactive)";break;case"away-calling":n="away-calling-presence-filled",c="var(--avatar-presence-inactive)";break;case"ooo":n="pto-presence-filled",c="var(--avatar-presence-inactive)";break;case"busy":n="busy-presence-bold",c="var(--avatar-presence-unstable)";break;case"on-mobile":n="phone-filled",c="var(--avatar-presence-inactive)";break;case"on-device":n=r?"generic-device-video-filled":"generic-device-video_16",c="var(--avatar-presence-inactive)";break;case"on-hold":case t.j.HOLD:n="pause-badge-filled",c="var(--avatar-presence-inactive)";break;case"engaged":n="busy-presence-bold",c="var(--avatar-presence-engaged)";break;case"rona":n="dnd-presence-badge-filled",c="var(--avatar-presence-rona)";break;case t.j.CONSULTING:n="headset-bold",c="var(--avatar-presence-inactive)";break;case t.j.PLAY:n="play-bold",c="var(--avatar-presence-inactive)";break;case t.j.CONFERENCE:n="meet-bold",c="var(--avatar-presence-inactive)";break;case t.j.TRANSFERED:n="assign-privilege-bold",c="var(--avatar-presence-inactive)";break;case t.j.COURTESY_CALLBACK:n="callrate-bold",c="var(--avatar-presence-inactive)";break;case t.j.CAMPAIGN:n="announcement-bold",c="var(--avatar-presence-inactive)"}}return{presenceColor:c,presenceIcon:n}};function s(e){return e<=24?10.5:e<=32?14:e<=48?13.94:e<=64?18.58:e<=72?20.9:e<=88?25.55:36}},80528:(e,a,r)=>{r(61200);var t,n=r(31890),c=r(26272),s=r(41488),i=r(22887),o=r(3553),l=function(e,a,r,t){var n,c=arguments.length,s=c<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,a,r,t);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(s=(c<3?n(s):c>3?n(a,r,s):n(a,r))||s);return c>3&&s&&Object.defineProperty(a,r,s),s};!function(e){let a=class extends s.LitElement{constructor(){super(...arguments),this.name="",this.size=48,this.title="",this.color=""}static get styles(){return[c.A,o.A]}render(){const e=(0,i.D8)(this.size);return s.html`
2
- <div class="avatar-presence-wrapper" data-size=${this.size} data-icon-size=${e}>
3
- <md-icon
4
- name="${this.name}"
5
- color="${this.color}"
6
- size=${e}
7
- title="${this.title}"
8
- .iconSet=${"momentumDesign"}
9
- >
10
- </md-icon>
11
- </div>
12
- `}};l([(0,s.property)({type:String})],a.prototype,"name",void 0),l([(0,s.property)({type:Number})],a.prototype,"size",void 0),l([(0,s.property)({type:String})],a.prototype,"title",void 0),l([(0,s.property)({type:String})],a.prototype,"color",void 0),a=l([(0,n.w)("md-presence")],a),e.ELEMENT=a}(t||(t={}))}}]);
package/dist/9788.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9788],{69788:(t,s,n)=>{var i,a=n(31890),e=n(26272),o=n(41488),l=n(17518),r=n(76700),c=function(t,s,n,i){var a,e=arguments.length,o=e<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,n,i);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(o=(e<3?a(o):e>3?a(s,n,o):a(s,n))||o);return e>3&&o&&Object.defineProperty(s,n,o),o};!function(t){let s=class extends o.LitElement{constructor(){super(...arguments),this.size="",this.isAnimating=!1,this.animationFrameId=null}static get styles(){return[e.A,r.A]}firstUpdated(t){super.firstUpdated(t),this.isAnimating=!0,this.startAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.isAnimating=!1,this.stopAnimation()}startAnimation(){var t;const s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".md-loading__icon");if(!s)return;let n=null;const i=1400,a=t=>{if(!this.isAnimating)return;n||(n=t);const e=(t-n)%i;s.forEach(((t,s)=>{const n=(e-200*s+i)%i;let a=0,o=.1;if(n<280){const t=.1+n/280*.9;a=t,o=t}else if(n<1400){const t=Math.min((n-280)/1120*2,1);a=Math.max(1-.9*t,.9),o=Math.max(1-.9*t,.2)}t.style.transform=`scale(${a})`,t.style.opacity=`${o}`})),this.animationFrameId=requestAnimationFrame(a)};this.animationFrameId=requestAnimationFrame(a)}stopAnimation(){var t;null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null);const s=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".md-loading__icon");s&&s.forEach((t=>{t.style.transform="scale(0, 0)",t.style.opacity="0.1"}))}get loadingClassMap(){return{[`md-loading--${this.size}`]:!!this.size}}get loadingIconClassMap(){return{"md-loading__icon":!0}}render(){return o.html`
2
- <div class="md-loading ${(0,l.classMap)(this.loadingClassMap)}">
3
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
4
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
5
- <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
6
- </div>
7
- `}};c([(0,o.property)({type:String})],s.prototype,"size",void 0),s=c([(0,a.w)("md-loading")],s),t.ELEMENT=s}(i||(i={}))}}]);