@fluid-topics/ft-popover 1.1.116 → 1.1.118

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.
@@ -25,5 +25,6 @@ export declare class FtdsPopover extends FtLitElement implements FtdsPopoverProp
25
25
  open(): void;
26
26
  private watchFocusIn;
27
27
  private watchEscapeKey;
28
+ private closeAndFocusOpeningButton;
28
29
  private positionWrapper;
29
30
  }
@@ -22,7 +22,7 @@ class FtdsPopover extends FtLitElement {
22
22
  this.openButtonTooltipPosition = "bottom";
23
23
  this.opened = false;
24
24
  this.openButtonSize = DesignSystemSize.medium;
25
- this.openButtonFamily = DesignSystemFamily.brand;
25
+ this.openButtonFamily = DesignSystemFamily.info;
26
26
  this.watchFocusIn = (event) => {
27
27
  if (!event.composedPath().includes(this.popoverWrapper)) {
28
28
  this.close();
@@ -30,10 +30,13 @@ class FtdsPopover extends FtLitElement {
30
30
  };
31
31
  this.watchEscapeKey = (event) => {
32
32
  if (event.key === "Escape") {
33
- this.close();
34
- this.openingButton.focus();
33
+ this.closeAndFocusOpeningButton();
35
34
  }
36
35
  };
36
+ this.closeAndFocusOpeningButton = () => {
37
+ this.close();
38
+ this.openingButton.focus();
39
+ };
37
40
  }
38
41
  render() {
39
42
  const classes = {
@@ -83,7 +86,7 @@ class FtdsPopover extends FtLitElement {
83
86
  return html `
84
87
  <div class="ftds-popover--closing-button">
85
88
  <ftds-button icon="${FtIcons.CLOSE}" size="${DesignSystemSize.small}" family="${DesignSystemFamily.neutral}"
86
- part="closing-button" label="${this.closeButtonLabel}" @click=${this.close}></ftds-button>
89
+ part="closing-button" label="${this.closeButtonLabel}" @click=${this.closeAndFocusOpeningButton}></ftds-button>
87
90
  </div>
88
91
  `;
89
92
  }
@@ -41,7 +41,7 @@ export const styles = css `
41
41
  display: flex;
42
42
  flex-direction: column;
43
43
 
44
- max-width: 464px;
44
+ max-width: ${popover.maxWidth};
45
45
  width: max-content;
46
46
 
47
47
  padding-left: ${popover.horizontalPadding};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-popover",
3
- "version": "1.1.116",
3
+ "version": "1.1.118",
4
4
  "description": "A simple popover component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,12 +20,12 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "0.1.2",
23
- "@fluid-topics/ft-button": "1.1.116",
24
- "@fluid-topics/ft-icon": "1.1.116",
25
- "@fluid-topics/ft-link": "1.1.116",
26
- "@fluid-topics/ft-typography": "1.1.116",
27
- "@fluid-topics/ft-wc-utils": "1.1.116",
23
+ "@fluid-topics/ft-button": "1.1.118",
24
+ "@fluid-topics/ft-icon": "1.1.118",
25
+ "@fluid-topics/ft-link": "1.1.118",
26
+ "@fluid-topics/ft-typography": "1.1.118",
27
+ "@fluid-topics/ft-wc-utils": "1.1.118",
28
28
  "lit": "3.1.0"
29
29
  },
30
- "gitHead": "261937d678cb0ad3ae752ef48cde5e906123c3e2"
30
+ "gitHead": "b911f1ca9e8293dfc7aab79f00400056585e4f03"
31
31
  }