@momentum-ui/web-components 3.2.5 → 3.2.7

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.
Files changed (34) hide show
  1. package/dist/2492.js +1 -1
  2. package/dist/708.js +2 -2
  3. package/dist/9146.js +1 -1
  4. package/dist/953.js +5 -5
  5. package/dist/comp/md-coachmark-popover-entry.js +4 -4
  6. package/dist/comp/md-menu-overlay-entry.js +2 -2
  7. package/dist/comp/md-popover-entry.js +2 -2
  8. package/dist/esm/2492.js +1 -1
  9. package/dist/esm/405.js +2 -2
  10. package/dist/esm/708.js +4 -4
  11. package/dist/esm/9146.js +1 -1
  12. package/dist/esm/953.js +5 -5
  13. package/dist/esm/comp/md-coachmark-popover-entry.js +4 -4
  14. package/dist/esm/comp/md-menu-overlay-entry.js +3 -3
  15. package/dist/esm/index-entry.js +1 -1
  16. package/dist/index-entry.js +237 -237
  17. package/dist/types/[sandbox]/examples/editable-field.d.ts +1 -1
  18. package/dist/types/[sandbox]/examples/popover.d.ts +2 -0
  19. package/dist/types/components/avatar/Avatar.d.ts +3 -3
  20. package/dist/types/components/badge/Badge.d.ts +1 -1
  21. package/dist/types/components/button/Button.d.ts +2 -2
  22. package/dist/types/components/chip/Chip.d.ts +3 -3
  23. package/dist/types/components/combobox/ComboBox.d.ts +3 -3
  24. package/dist/types/components/dropdown/Dropdown.d.ts +2 -2
  25. package/dist/types/components/editable-textfield/EditableTextfield.d.ts +1 -1
  26. package/dist/types/components/input/Input.d.ts +5 -5
  27. package/dist/types/components/popover/Popover.constants.d.ts +3 -0
  28. package/dist/types/components/popover/Popover.d.ts +29 -0
  29. package/dist/types/components/popover/Popover.test.d.ts +1 -0
  30. package/dist/types/components/radio/Radio.d.ts +1 -1
  31. package/dist/types/components/taskitem/TaskItem.utils.d.ts +1 -1
  32. package/dist/types/internal-components/color-table/ColorTable.d.ts +1 -1
  33. package/dist/types/mixins/FocusTrapMixin.d.ts +2 -0
  34. package/package.json +1 -1
@@ -10,7 +10,7 @@ export declare class EditableFieldTemplateSandbox extends LitElement {
10
10
  disconnectedCallback(): void;
11
11
  setErrorMessage: () => void;
12
12
  resetErrorMessage: () => void;
13
- renderErrorMessage(): import("lit-html").TemplateResult<1> | typeof nothing;
13
+ renderErrorMessage(): typeof nothing | import("lit-html").TemplateResult<1>;
14
14
  render(): import("lit-html").TemplateResult<1>;
15
15
  }
16
16
  export declare const editableField: import("lit-html").TemplateResult<1>;
@@ -4,6 +4,7 @@ import "../../components/coachmark-popover/CoachmarkPopover";
4
4
  import "../../components/icon/Icon";
5
5
  import "../../components/list/List";
6
6
  import "../../components/list/ListItem";
7
+ import "../../components/modal/Modal";
7
8
  import "../../components/popover/Popover";
8
9
  import "../../components/radio/Radio";
9
10
  import "../../components/radio/RadioGroup";
@@ -19,6 +20,7 @@ export declare class PopoverTemplateSandbox extends LitElement {
19
20
  private thirdOpen;
20
21
  private fourthOpen;
21
22
  private isButtonWithTooltipPopoverOpen;
23
+ private isEscapeModalOpen;
22
24
  private openFirstCoach;
23
25
  private openSecondCoach;
24
26
  private openThirdCoach;
@@ -75,7 +75,7 @@ export declare namespace Avatar {
75
75
  private get chatIconSize();
76
76
  private get presenceSize();
77
77
  private get iconSize();
78
- get renderIsTyping(): import("lit-html").TemplateResult<1> | typeof nothing;
78
+ get renderIsTyping(): typeof nothing | import("lit-html").TemplateResult<1>;
79
79
  private get avatarLetter();
80
80
  private get avatarIcon();
81
81
  private get avatarImage();
@@ -85,8 +85,8 @@ export declare namespace Avatar {
85
85
  handleKeyDown(event: KeyboardEvent): void;
86
86
  handleClick(event: MouseEvent): void;
87
87
  private getBrandOrDesignIconSet;
88
- get avatarContent(): import("lit-html").TemplateResult<1> | typeof nothing;
89
- renderPresence(): import("lit-html").TemplateResult<1> | typeof nothing;
88
+ get avatarContent(): typeof nothing | import("lit-html").TemplateResult<1>;
89
+ renderPresence(): typeof nothing | import("lit-html").TemplateResult<1>;
90
90
  private renderAvatarContent;
91
91
  render(): import("lit-html").TemplateResult<1>;
92
92
  }
@@ -31,7 +31,7 @@ export declare namespace Badge {
31
31
  renderTextColor: () => string | typeof nothing;
32
32
  renderHeight: () => string | typeof nothing;
33
33
  renderWidth: () => string | typeof nothing;
34
- getStyles: () => import("lit-html").TemplateResult<1> | typeof nothing;
34
+ getStyles: () => typeof nothing | import("lit-html").TemplateResult<1>;
35
35
  static get styles(): import("lit").CSSResult[];
36
36
  private get computedAriaHiddenSplits();
37
37
  private get computedTabIndex();
@@ -129,10 +129,10 @@ export declare namespace Button {
129
129
  get slottedText(): string | undefined;
130
130
  get hasIcon(): boolean;
131
131
  iconTemplate: () => import("lit-html").TemplateResult<1>;
132
- textTemplate: () => import("lit-html").TemplateResult<1> | typeof nothing;
132
+ textTemplate: () => typeof nothing | import("lit-html").TemplateResult<1>;
133
133
  childrenTemplate(): import("lit-html").TemplateResult<1>;
134
134
  get computedAriaExpand(): "true" | "false" | undefined;
135
- buttonTemplate(tag: Button.Tag): import("lit-html").TemplateResult<1> | typeof nothing;
135
+ buttonTemplate(tag: Button.Tag): typeof nothing | import("lit-html").TemplateResult<1>;
136
136
  get buttonContainerClassMap(): {
137
137
  "md-button__container": boolean;
138
138
  "md-button__container--small": boolean;
@@ -52,10 +52,10 @@ export declare namespace Chip {
52
52
  protected renderBgColor: () => string | typeof nothing;
53
53
  protected renderTextColor: () => string | typeof nothing;
54
54
  protected renderHeight: () => string | typeof nothing;
55
- protected getStyles: () => import("lit-html").TemplateResult<1> | typeof nothing;
55
+ protected getStyles: () => typeof nothing | import("lit-html").TemplateResult<1>;
56
56
  static get styles(): import("lit").CSSResult[];
57
- protected loadingTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
58
- protected iconTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
57
+ protected loadingTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
58
+ protected iconTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
59
59
  getToolTipContent(): string;
60
60
  private get textContentClassMap();
61
61
  private get textContentTemplate();
@@ -199,7 +199,7 @@ export declare namespace ComboBox {
199
199
  arrowButtonTemplate(): TemplateResult<1>;
200
200
  groupArrowButtonTemplate(data: string): TemplateResult<1>;
201
201
  getSelectAllOption(): TemplateResult<1>;
202
- getSelctedCount(): TemplateResult<1> | typeof nothing;
202
+ getSelctedCount(): typeof nothing | TemplateResult<1>;
203
203
  checkForVirtualScroll(): boolean;
204
204
  rangeChanged(): void;
205
205
  getCustomErrorContent(): DocumentFragment;
@@ -210,8 +210,8 @@ export declare namespace ComboBox {
210
210
  addStyle(): import("lit-html/directive.js").DirectiveResult<typeof import("lit-html/directives/style-map.js").StyleMapDirective>;
211
211
  renderItem(option: OptionMember | string, index: number): TemplateResult;
212
212
  inputTitle(): string;
213
- helpTextTemplate(): TemplateResult<1> | typeof nothing;
214
- messagesTemplate(): TemplateResult<1> | typeof nothing;
213
+ helpTextTemplate(): typeof nothing | TemplateResult<1>;
214
+ messagesTemplate(): typeof nothing | TemplateResult<1>;
215
215
  get newArrowButtonTemplate(): TemplateResult<1>;
216
216
  get renderNewMomentumArrow(): TemplateResult;
217
217
  get renderTrailingInputControls(): TemplateResult;
@@ -138,8 +138,8 @@ export declare namespace Dropdown {
138
138
  };
139
139
  handleInput(event: Event): void;
140
140
  private notifyInputValueChanged;
141
- helpTextTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
142
- messagesTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
141
+ helpTextTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
142
+ messagesTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
143
143
  iconTemplate(): import("lit-html").TemplateResult<1>;
144
144
  clearButtonTemplate(): import("lit-html").TemplateResult<1>;
145
145
  arrowButtonTemplate(): import("lit-html").TemplateResult<1>;
@@ -40,7 +40,7 @@ export declare namespace EditableTextfield {
40
40
  showAlert(): void;
41
41
  static get styles(): CSSResultArray;
42
42
  get overflowStyles(): string | false | 0;
43
- messagesTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
43
+ messagesTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
44
44
  render(): import("lit-html").TemplateResult<1>;
45
45
  }
46
46
  }
@@ -161,15 +161,15 @@ export declare namespace Input {
161
161
  get ariaExpandedValue(): "true" | "false" | undefined;
162
162
  get hasRightIcon(): boolean;
163
163
  inputTemplate(): import("lit-html").TemplateResult<1>;
164
- inputLeftTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
164
+ inputLeftTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
165
165
  private get inputRightTemplateClassMap();
166
166
  inputRightTemplate(): import("lit-html").TemplateResult<1> | undefined;
167
167
  private get comboBoxButtonTemplate();
168
168
  private characterCountLabelTemplate;
169
- secondaryLabelTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
170
- helpTextTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
171
- messagesTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
172
- labelTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
169
+ secondaryLabelTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
170
+ helpTextTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
171
+ messagesTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
172
+ labelTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
173
173
  static get styles(): import("lit").CSSResult[];
174
174
  render(): import("lit-html").TemplateResult<1>;
175
175
  }
@@ -42,6 +42,9 @@ declare const DEFAULTS: {
42
42
  readonly HIDE_ON_BLUR: false;
43
43
  readonly HIDE_ON_WINDOW_BLUR: false;
44
44
  readonly HIDE_ON_CLICK_OUTSIDE: false;
45
+ readonly HIDE_ON_POINTER_DOWN_OUTSIDE: false;
46
+ readonly HIDE_ON_SCROLL: false;
47
+ readonly HIDE_ON_WHEEL: false;
45
48
  readonly FOCUS_BACK: false;
46
49
  readonly BACKDROP: false;
47
50
  readonly FLIP: true;
@@ -160,6 +160,21 @@ export declare class Popover extends Popover_base {
160
160
  * @default false
161
161
  */
162
162
  hideOnOutsideClick: boolean;
163
+ /**
164
+ * Hide on outside pointerdown of the popover.
165
+ * @default false
166
+ */
167
+ hideOnOutsidePointerDown: boolean;
168
+ /**
169
+ * Hide on scroll event outside popover/trigger.
170
+ * @default false
171
+ */
172
+ hideOnScroll: boolean;
173
+ /**
174
+ * Hide on wheel event outside popover/trigger.
175
+ * @default false
176
+ */
177
+ hideOnWheel: boolean;
163
178
  /**
164
179
  * The focus back to trigger after the popover hide.
165
180
  * @default false
@@ -273,6 +288,15 @@ export declare class Popover extends Popover_base {
273
288
  * @param event - The mouse event.
274
289
  */
275
290
  private readonly onOutsidePopoverClick;
291
+ /**
292
+ * Handles outside pointerdown to close the popover.
293
+ */
294
+ private readonly onOutsidePopoverPointerDown;
295
+ /**
296
+ * Handles outside scroll and wheel to close the popover.
297
+ */
298
+ private readonly onOutsidePopoverScrollOrWheel;
299
+ private shouldIgnoreDismissEvent;
276
300
  private readonly hideThisPopover;
277
301
  /**
278
302
  * Handles the escape keydown event to close the popover.
@@ -324,6 +348,11 @@ export declare class Popover extends Popover_base {
324
348
  private readonly onMouseEnterTrigger;
325
349
  private readonly onFocusInTrigger;
326
350
  private readonly onTriggerClick;
351
+ /**
352
+ * Bridges focus-trap keyboard handling when trigger receives Tab/Shift+Tab.
353
+ * Needed when append-to moves popover outside the trigger's DOM subtree.
354
+ */
355
+ private readonly onTriggerKeydown;
327
356
  private isRectOverTrigger;
328
357
  private isMouseOverTrigger;
329
358
  /**
@@ -0,0 +1 @@
1
+ import "./Popover";
@@ -23,7 +23,7 @@ export declare namespace Radio {
23
23
  private get inputAriaLabel();
24
24
  static get styles(): import("lit").CSSResult[];
25
25
  private get helpTextClassMap();
26
- messagesTemplate(): import("lit-html").TemplateResult<1> | typeof nothing;
26
+ messagesTemplate(): typeof nothing | import("lit-html").TemplateResult<1>;
27
27
  render(): import("lit-html").TemplateResult<1>;
28
28
  }
29
29
  export {};
@@ -6,5 +6,5 @@ export declare const getChannelAvatar: (selected: boolean, status: string | null
6
6
  export declare const renderTaskType: (mediaType: string, selected: boolean, status: string | null, iconSrc: string) => TemplateResult<1>;
7
7
  export declare const renderStatus: (status: string) => TemplateResult<1>;
8
8
  export declare const renderLegacyTaskType: (mediaType: string, selected: boolean, iconSrc: string) => TemplateResult<1>;
9
- export declare const renderChatCount: (quantity: number, isRestyle: boolean, element: HTMLElement) => TemplateResult<1> | typeof nothing;
9
+ export declare const renderChatCount: (quantity: number, isRestyle: boolean, element: HTMLElement) => typeof nothing | TemplateResult<1>;
10
10
  export {};
@@ -3,7 +3,7 @@ import { LitElement, nothing, PropertyValues } from "lit";
3
3
  export declare class ColorTableSandbox extends LitElement {
4
4
  private colorTokenTableData;
5
5
  firstUpdated(changedProperties: PropertyValues): void;
6
- renderColorTable(): import("lit-html").TemplateResult<1> | typeof nothing;
6
+ renderColorTable(): typeof nothing | import("lit-html").TemplateResult<1>;
7
7
  static get styles(): import("lit").CSSResult[];
8
8
  render(): import("lit-html").TemplateResult<1>;
9
9
  }
@@ -10,6 +10,7 @@ export interface FocusTrapClassInterface extends FocusClassInterface {
10
10
  preventClickOutside: boolean;
11
11
  preventScroll: boolean;
12
12
  focusTrapIndex: number;
13
+ handleKeydownFocusTrap: (event: KeyboardEvent) => void;
13
14
  }
14
15
  /**
15
16
  * Abstract class used internally for super calls within the mixin implementation.
@@ -20,6 +21,7 @@ export declare abstract class FocusTrapClass extends FocusClass {
20
21
  preventClickOutside: boolean;
21
22
  preventScroll: boolean;
22
23
  focusTrapIndex: number;
24
+ handleKeydownFocusTrap: (event: KeyboardEvent) => void;
23
25
  protected focusableElements?: HTMLElement[];
24
26
  protected initialFocusComplete?: boolean;
25
27
  protected deactivateFocusTrap?(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "3.2.5",
3
+ "version": "3.2.7",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",