@fluid-topics/ftds-popover 2.2.0 → 2.2.1
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/build/ftds-popover.js
CHANGED
|
@@ -19,13 +19,13 @@ export class FtdsPopover extends FtLitElement {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.closeButtonLabel = "close info";
|
|
22
|
-
this.openButtonIcon = FtdsIcons.
|
|
23
|
-
this.openButtonIconVariant = FtdsIconVariants.
|
|
22
|
+
this.openButtonIcon = FtdsIcons.QUESTION;
|
|
23
|
+
this.openButtonIconVariant = FtdsIconVariants.solid;
|
|
24
24
|
this.openButtonLabel = "more info";
|
|
25
25
|
this.openButtonTooltipPosition = "bottom";
|
|
26
26
|
this.opened = false;
|
|
27
27
|
this.hidden = false;
|
|
28
|
-
this.openButtonSize = DesignSystemSize.
|
|
28
|
+
this.openButtonSize = DesignSystemSize.small;
|
|
29
29
|
this.openButtonFamily = DesignSystemFamily.info;
|
|
30
30
|
this.isTriggerSlotAssigned = false;
|
|
31
31
|
this.heading = "";
|
|
@@ -105,6 +105,7 @@ export class FtdsPopover extends FtLitElement {
|
|
|
105
105
|
renderOpeningButton() {
|
|
106
106
|
return html `
|
|
107
107
|
<ftds-button @focusin=${this.close}
|
|
108
|
+
secondary
|
|
108
109
|
part="opening-button"
|
|
109
110
|
icon="${this.openButtonIcon}"
|
|
110
111
|
variant="${this.openButtonIconVariant}"
|
|
@@ -2083,7 +2083,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2083
2083
|
.hidden {
|
|
2084
2084
|
display: none;
|
|
2085
2085
|
}
|
|
2086
|
-
`;var ai=C(xr());var X=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},B=class extends ur.FtLitElement{constructor(){super(...arguments),this.closeButtonLabel="close info",this.openButtonIcon=p.
|
|
2086
|
+
`;var ai=C(xr());var X=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},B=class extends ur.FtLitElement{constructor(){super(...arguments),this.closeButtonLabel="close info",this.openButtonIcon=p.QUESTION,this.openButtonIconVariant=u.solid,this.openButtonLabel="more info",this.openButtonTooltipPosition="bottom",this.opened=!1,this.hidden=!1,this.openButtonSize=Te.small,this.openButtonFamily=Je.info,this.isTriggerSlotAssigned=!1,this.heading="",this.margins=en.default,this.wrapperId="ftds-popover-wrapper",this.headingId="ftds-popover-heading",this.contentId="ftds-popover-content",this.maxWidth=G.maxWidth,this.onTriggerSlotChange=()=>{var t,n;let o=(n=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements())!==null&&n!==void 0?n:[];this.isTriggerSlotAssigned=o.length>0},this.onTriggerKeydown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.open())},this.watchFocusIn=t=>{this.popoverWrapper&&!t.composedPath().includes(this.popoverWrapper)&&this.close()},this.watchEscapeKey=t=>{var n;t.key==="Escape"&&(this.close(),(n=this.openingElement)===null||n===void 0||n.focus())}}get openingElement(){var t;let n=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements();return n?.length&&n[0]instanceof HTMLElement?n[0]:this.openingButton}render(){let t={opened:this.opened};return this.hidden?Re.nothing:Re.html`
|
|
2087
2087
|
<div part="root-container" class="${(0,ai.classMap)(t)}">
|
|
2088
2088
|
<slot name="trigger"
|
|
2089
2089
|
@slotchange=${this.onTriggerSlotChange}
|
|
@@ -2109,6 +2109,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2109
2109
|
</div>
|
|
2110
2110
|
`:Re.nothing}renderOpeningButton(){return Re.html`
|
|
2111
2111
|
<ftds-button @focusin=${this.close}
|
|
2112
|
+
secondary
|
|
2112
2113
|
part="opening-button"
|
|
2113
2114
|
icon="${this.openButtonIcon}"
|
|
2114
2115
|
variant="${this.openButtonIconVariant}"
|
|
@@ -2163,7 +2163,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2163
2163
|
.hidden {
|
|
2164
2164
|
display: none;
|
|
2165
2165
|
}
|
|
2166
|
-
`;var ne=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Z=class extends q{constructor(){super(...arguments),this.closeButtonLabel="close info",this.openButtonIcon=h.
|
|
2166
|
+
`;var ne=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Z=class extends q{constructor(){super(...arguments),this.closeButtonLabel="close info",this.openButtonIcon=h.QUESTION,this.openButtonIconVariant=p.solid,this.openButtonLabel="more info",this.openButtonTooltipPosition="bottom",this.opened=!1,this.hidden=!1,this.openButtonSize=Le.small,this.openButtonFamily=Ue.info,this.isTriggerSlotAssigned=!1,this.heading="",this.margins=zo.default,this.wrapperId="ftds-popover-wrapper",this.headingId="ftds-popover-heading",this.contentId="ftds-popover-content",this.maxWidth=X.maxWidth,this.onTriggerSlotChange=()=>{var e,r;let o=(r=(e=this.triggerSlot)===null||e===void 0?void 0:e.assignedElements())!==null&&r!==void 0?r:[];this.isTriggerSlotAssigned=o.length>0},this.onTriggerKeydown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open())},this.watchFocusIn=e=>{this.popoverWrapper&&!e.composedPath().includes(this.popoverWrapper)&&this.close()},this.watchEscapeKey=e=>{var r;e.key==="Escape"&&(this.close(),(r=this.openingElement)===null||r===void 0||r.focus())}}get openingElement(){var e;let r=(e=this.triggerSlot)===null||e===void 0?void 0:e.assignedElements();return r?.length&&r[0]instanceof HTMLElement?r[0]:this.openingButton}render(){let e={opened:this.opened};return this.hidden?j:W`
|
|
2167
2167
|
<div part="root-container" class="${Pe(e)}">
|
|
2168
2168
|
<slot name="trigger"
|
|
2169
2169
|
@slotchange=${this.onTriggerSlotChange}
|
|
@@ -2189,6 +2189,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2189
2189
|
</div>
|
|
2190
2190
|
`:j}renderOpeningButton(){return W`
|
|
2191
2191
|
<ftds-button @focusin=${this.close}
|
|
2192
|
+
secondary
|
|
2192
2193
|
part="opening-button"
|
|
2193
2194
|
icon="${this.openButtonIcon}"
|
|
2194
2195
|
variant="${this.openButtonIconVariant}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ftds-popover",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "The design system popover component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@floating-ui/dom": "1.8.0",
|
|
23
23
|
"@fluid-topics/design-system-variables": "3.6.0",
|
|
24
|
-
"@fluid-topics/ft-tooltip": "2.2.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
26
|
-
"@fluid-topics/ftds-button": "2.2.
|
|
27
|
-
"@fluid-topics/ftds-icon": "2.2.
|
|
28
|
-
"@fluid-topics/ftds-typography": "2.2.
|
|
24
|
+
"@fluid-topics/ft-tooltip": "2.2.1",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "2.2.1",
|
|
26
|
+
"@fluid-topics/ftds-button": "2.2.1",
|
|
27
|
+
"@fluid-topics/ftds-icon": "2.2.1",
|
|
28
|
+
"@fluid-topics/ftds-typography": "2.2.1",
|
|
29
29
|
"lit": "3.3.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@fluid-topics/ft-wc-test-utils": "2.2.
|
|
32
|
+
"@fluid-topics/ft-wc-test-utils": "2.2.1"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "25fd63f06bb81a168e9dbd9356d8e3d86a925ad9"
|
|
35
35
|
}
|