@salesforcedevs/dx-components 1.3.133 → 1.3.134
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/lwc.config.json +1 -0
- package/package.json +2 -2
- package/src/modules/dx/faq/faq.css +49 -0
- package/src/modules/dx/faq/faq.html +32 -0
- package/src/modules/dx/faq/faq.ts +16 -0
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.134",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "b60c5fed152e5fe403577993093487128c5ea88b"
|
|
44
44
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
details summary {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
list-style: none;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
details summary::-webkit-details-marker {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
details summary > * {
|
|
16
|
+
display: inline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* hide '-' when collapsed & '+' when expanded */
|
|
20
|
+
details > summary > .expanded,
|
|
21
|
+
details[open] > summary > .collapsed {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* show '-' when expanded */
|
|
26
|
+
details[open] > summary > .expanded {
|
|
27
|
+
display: inline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
details:not(:first-of-type) {
|
|
31
|
+
margin-top: var(--dx-g-spacing-lg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.container {
|
|
35
|
+
max-width: 840px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.faq-title {
|
|
39
|
+
text-align: center;
|
|
40
|
+
margin-bottom: var(--dx-g-spacing-lg);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.faq-content {
|
|
44
|
+
padding: var(--dx-g-spacing-xl) 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.faq-body {
|
|
48
|
+
margin: var(--dx-g-spacing-lg) 0;
|
|
49
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<h2 class="faq-title dx-text-display-4">{title}</h2>
|
|
4
|
+
<div class="faq-content">
|
|
5
|
+
<template iterator:it={options}>
|
|
6
|
+
<details key={it.value.title} open={it.first}>
|
|
7
|
+
<summary class="dx-text-display-7">
|
|
8
|
+
{it.value.title}
|
|
9
|
+
<dx-icon-badge
|
|
10
|
+
class="collapsed"
|
|
11
|
+
icon-size="small"
|
|
12
|
+
background-color="cloud-blue-vibrant-95"
|
|
13
|
+
background-size="small"
|
|
14
|
+
symbol="add"
|
|
15
|
+
color="blue-vibrant-20"
|
|
16
|
+
></dx-icon-badge>
|
|
17
|
+
<dx-icon-badge
|
|
18
|
+
class="expanded"
|
|
19
|
+
icon-size="small"
|
|
20
|
+
background-color="cloud-blue-vibrant-95"
|
|
21
|
+
background-size="small"
|
|
22
|
+
symbol="dash"
|
|
23
|
+
color="blue-vibrant-20"
|
|
24
|
+
></dx-icon-badge>
|
|
25
|
+
</summary>
|
|
26
|
+
<p class="faq-body dx-text-body-2">{it.value.body}</p>
|
|
27
|
+
<dx-hr no-padding="true"></dx-hr>
|
|
28
|
+
</details>
|
|
29
|
+
</template>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { toJson } from "dxUtils/normalizers";
|
|
3
|
+
|
|
4
|
+
export default class Faq extends LightningElement {
|
|
5
|
+
@api title!: string;
|
|
6
|
+
|
|
7
|
+
@api
|
|
8
|
+
get options() {
|
|
9
|
+
return this._options;
|
|
10
|
+
}
|
|
11
|
+
set options(value: any) {
|
|
12
|
+
this._options = toJson(value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private _options = [];
|
|
16
|
+
}
|