@salesforcedevs/dx-components 1.6.0 → 1.8.0
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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"volta": {
|
|
47
47
|
"node": "18.18.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f815557637c4491f90dd03643fb6af4d92d26d74"
|
|
50
50
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import "dxHelpers/text";
|
|
2
|
+
|
|
3
|
+
.eyebrow {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
8
|
+
color: white;
|
|
9
|
+
padding: 6px 40px;
|
|
10
|
+
gap: 4px;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.eyebrow.fixed {
|
|
15
|
+
position: fixed;
|
|
16
|
+
top: var(--dx-g-global-header-height, 0);
|
|
17
|
+
width: 100%;
|
|
18
|
+
z-index: var(--dx-g-z-index-max, 999);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.eyebrow > dx-icon {
|
|
22
|
+
padding-right: 5px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.eyebrow > span {
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.eyebrow > span > a {
|
|
30
|
+
color: white;
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (min-width: 768px) and (max-width: 1279px) {
|
|
35
|
+
.eyebrow {
|
|
36
|
+
padding: 6px 32px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (max-width: 767px) {
|
|
41
|
+
.eyebrow {
|
|
42
|
+
padding: 6px 24px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={className}>
|
|
3
|
+
<dx-icon
|
|
4
|
+
sprite={iconSprite}
|
|
5
|
+
symbol={iconSymbol}
|
|
6
|
+
size={iconSize}
|
|
7
|
+
></dx-icon>
|
|
8
|
+
<span>
|
|
9
|
+
{body}
|
|
10
|
+
<template lwc:if={hasCta}>
|
|
11
|
+
|
|
12
|
+
<a target={ctaTarget} href={ctaHref}>{ctaLabel}</a>
|
|
13
|
+
</template>
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
3
|
+
import { api, LightningElement } from "lwc";
|
|
4
|
+
import { IconSize, IconSprite, IconSymbol } from "typings/custom";
|
|
5
|
+
|
|
6
|
+
export default class Eyebrow extends LightningElement {
|
|
7
|
+
@api body = "";
|
|
8
|
+
@api ctaHref = "";
|
|
9
|
+
@api ctaLabel = "";
|
|
10
|
+
@api ctaTarget = "_blank";
|
|
11
|
+
@api iconSize: IconSize = "large";
|
|
12
|
+
@api iconSprite: IconSprite = "action";
|
|
13
|
+
@api iconSymbol: IconSymbol = "info";
|
|
14
|
+
|
|
15
|
+
@api
|
|
16
|
+
get fixed() {
|
|
17
|
+
return this._fixed;
|
|
18
|
+
}
|
|
19
|
+
set fixed(value: string | boolean) {
|
|
20
|
+
this._fixed = normalizeBoolean(value);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private _fixed: boolean = false;
|
|
24
|
+
|
|
25
|
+
get hasCta() {
|
|
26
|
+
return Boolean(this.ctaHref && this.ctaLabel);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get className() {
|
|
30
|
+
return cx("eyebrow", "dx-text-body-3", this.fixed && "fixed");
|
|
31
|
+
}
|
|
32
|
+
}
|