@fluid-topics/ft-popover 1.1.115
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/README.md +42 -0
- package/build/ft-popover.light.js +959 -0
- package/build/ft-popover.min.js +1188 -0
- package/build/ftds-popover.d.ts +29 -0
- package/build/ftds-popover.js +169 -0
- package/build/ftds-popover.properties.d.ts +8 -0
- package/build/ftds-popover.properties.js +1 -0
- package/build/ftds-popover.styles.d.ts +1 -0
- package/build/ftds-popover.styles.js +83 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +6 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
A popover component.
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```shell
|
|
6
|
+
npm install @fluid-topics/ftds-popover
|
|
7
|
+
yarn add @fluid-topics/ftds-popover
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { html } from "lit"
|
|
14
|
+
import { customElement, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
15
|
+
import "@fluid-topics/ft-link"
|
|
16
|
+
import "@fluid-topics/ft-popover"
|
|
17
|
+
|
|
18
|
+
@customElement("my-element")
|
|
19
|
+
class MyElement extends FtLitElement {
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return html`
|
|
23
|
+
<ftds-popover
|
|
24
|
+
heading="Popover heading"
|
|
25
|
+
?opened="false"
|
|
26
|
+
closeButtonLabel="close info"
|
|
27
|
+
openButtonLabel="more info"
|
|
28
|
+
openButtonTooltipPosition="bottom"
|
|
29
|
+
openButtonFamily="brand"
|
|
30
|
+
openButtonSize="medium"
|
|
31
|
+
@opened-changed=${ (e: CustomEvent<{
|
|
32
|
+
opened: boolean
|
|
33
|
+
}>) => console.log("opened changed ", e.detail) }
|
|
34
|
+
>
|
|
35
|
+
Exemple popover content
|
|
36
|
+
<ftds-link slot="link" href="" variant="body-2-medium" family="brand" underlined>Example popover link</ftds-link>
|
|
37
|
+
</ftds-popover>
|
|
38
|
+
`
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
```
|