@salesforcedevs/dx-components 0.0.0-alpha.26 → 0.0.0-alpha.28
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 +4 -1
- package/package.json +1 -1
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +40 -0
- package/src/modules/dx/banner/banner.ts +1 -1
- package/src/modules/dx/button/button.css +0 -6
- package/src/modules/dx/buttonToggle/buttonToggle.html +2 -1
- package/src/modules/dx/cardEvent/cardEvent.html +1 -2
- package/src/modules/dx/cardEvent/cardEvent.ts +1 -1
- package/src/modules/dx/cardExpanded/cardExpanded.html +1 -6
- package/src/modules/dx/cardExpanded/cardExpanded.ts +2 -2
- package/src/modules/dx/cardMinimal/cardMinimal.html +1 -6
- package/src/modules/dx/cardTrial/cardTrial.css +3 -1
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.css +2 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +1 -4
- package/src/modules/dx/featuresList/featuresList.css +1 -1
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -0
- package/src/modules/dx/headerSearch/headerSearch.html +2 -0
- package/src/modules/dx/headerSearch/headerSearch.ts +1 -0
- package/src/modules/dx/hr/hr.css +2 -3
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +0 -1
- package/src/modules/dx/input/input.ts +2 -0
- package/src/modules/dx/logo/logo.css +0 -1
- package/src/modules/dx/metadataBadge/metadataBadge.css +41 -0
- package/src/modules/dx/metadataBadge/metadataBadge.html +5 -0
- package/src/modules/dx/metadataBadge/metadataBadge.ts +24 -0
- package/src/modules/dx/modal/modal.html +1 -1
- package/src/modules/dx/modal/modal.ts +4 -5
- package/src/modules/dx/modalDrawer/modalDrawer.html +1 -1
- package/src/modules/dx/pagination/pagination.css +1 -2
- package/src/modules/dx/sidebarSearch/sidebarSearch.html +1 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +1 -0
- package/src/modules/dx/tab/tab.css +0 -4
- package/src/modules/dx/treeItem/treeItem.html +1 -0
- package/src/modules/dx/treeTile/treeTile.css +17 -17
- package/src/modules/dx/treeTile/treeTile.html +5 -4
- package/src/modules/dx/treeTile/treeTile.ts +17 -3
- package/src/modules/dx/typeBadge/typeBadge.css +15 -56
- package/src/modules/dx/typeBadge/typeBadge.html +6 -0
- package/src/modules/dx/typeBadge/typeBadge.ts +142 -46
- package/src/modules/dxBaseElements/archiveCard/archiveCard.ts +2 -6
- package/src/modules/dxBaseElements/headerBase/headerBase.ts +1 -1
- package/src/modules/dxConstants/brands/brands.ts +14 -0
- package/src/modules/dxConstants/colors/colors.ts +14 -0
- package/src/modules/dxConstants/contentTypes/contentTypes.ts +10 -0
- package/src/modules/dxHelpers/card/card.css +1 -1
- package/src/modules/dxHelpers/commonHeader/commonHeader.css +0 -1
- package/src/modules/dxUtils/css/css.ts +10 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +0 -12
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +0 -11
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +0 -18
package/lwc.config.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"dx/input",
|
|
50
50
|
"dx/logo",
|
|
51
51
|
"dx/modal",
|
|
52
|
+
"dx/metadataBadge",
|
|
52
53
|
"dx/modalDrawer",
|
|
53
54
|
"dx/pagination",
|
|
54
55
|
"dx/podcastHost",
|
|
@@ -72,10 +73,12 @@
|
|
|
72
73
|
"dx/tooltip",
|
|
73
74
|
"dx/tree",
|
|
74
75
|
"dx/typeBadge",
|
|
75
|
-
"dx/typeBadgeGroup",
|
|
76
76
|
"dx/vimeoPlayer",
|
|
77
77
|
"dxBaseElements/headerBase",
|
|
78
78
|
"dxBaseElements/matchMediaElement",
|
|
79
|
+
"dxConstants/brands",
|
|
80
|
+
"dxConstants/colors",
|
|
81
|
+
"dxConstants/contentTypes",
|
|
79
82
|
"dxHelpers/animations",
|
|
80
83
|
"dxHelpers/button",
|
|
81
84
|
"dxHelpers/card",
|
package/package.json
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<symbol id="net-zero" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path class="acls-1"
|
|
5
|
+
d="M44.61 39H51a2 2 0 0 0 1.71-3l-19-31a2 2 0 0 0-3.42 0l-19 31A2 2 0 0 0 13 39h6.39L11.3 51.94a2 2 0 0 0-.05 2A2 2 0 0 0 13 55h17v3a2 2 0 0 0 4 0v-3h17a2 2 0 0 0 1.75-1 2 2 0 0 0 0-2zM34 51V37a2 2 0 0 0-4 0v14H16.61l8.09-12.94a2 2 0 0 0 .05-2A2 2 0 0 0 23 35h-6.43L32 9.83 47.43 35H41a2 2 0 0 0-1.75 1 2 2 0 0 0 0 2l8.14 13z"
|
|
6
|
+
fill="#194e31" />
|
|
7
|
+
<path class="acls-1"
|
|
8
|
+
d="M32.88 19.3a2 2 0 0 0-2.75.66l-5.47 8.94a2 2 0 0 0 .66 2.75 2 2 0 0 0 1 .29 2 2 0 0 0 1.71-1L33.5 22a2 2 0 0 0-.62-2.7z"
|
|
9
|
+
fill="#194e31" />
|
|
10
|
+
</symbol>
|
|
11
|
+
<symbol id="education" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<path fill-rule="evenodd" class="aa"
|
|
13
|
+
d="M59.4 26.2c0 .8-.5 1.5-1.2 1.8l-7.7 3.4V42c0 .6-.3 1.1-.7 1.5-6 5.3-11.7 7-16.6 7-9.9 0-16.7-7-16.8-7.1-.3-.4-.5-.9-.5-1.4V31.5l-4.3-1.9v6.8l2.6 4.4c.6.9.2 2.1-.7 2.7-.3.2-.6.3-1 .3-.7 0-1.3-.4-1.7-1l-1.2-2-1.2 2c-.4.7-1 1-1.7 1-.3 0-.7-.1-1-.3-1-.5-1.3-1.8-.7-2.7l2.6-4.4v-8.7c-.5-.4-.7-.9-.7-1.5 0-.8.5-1.5 1.2-1.8l24.2-10.7c.5-.2 1.1-.2 1.6 0l24.3 10.7c.7.3 1.2 1 1.2 1.8zm-6.9 0l-19.3-8.5-19.3 8.5 4 1.7 15.3 6.7 15.3-6.7zm-6.1 14.9v-7.9l-12.5 5.5c-.3.1-.5.2-.8.2-.3 0-.5-.1-.8-.2l-12.5-5.5v8c2.5 2.3 13.5 10.8 26.7-.1z"
|
|
14
|
+
fill="#481a54" />
|
|
15
|
+
</symbol>
|
|
16
|
+
<symbol id="automotive" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path class="aa"
|
|
18
|
+
d="M51.4 14.5c1.3 2 2.3 4.4 3.1 7l-5.7 3.3-10.1-3.7h-.1c-.6-2.5-1.5-4.8-2.6-6.9l9.5 2.7c.1.1.3.1.5.1.3 0 .6-.1.9-.2zM50 40.8l5.7-3.1c-.5 2.7-1.2 5.4-2.1 7.7l-7.5 2.5-8-3.2c.7-2.4 1.3-5 1.6-7.7l8.5 3.8c.2.1.5.2.8.2.3 0 .7-.1 1-.2zM50 28.7l5.4-3c.3 2.1.5 4.2.5 6.4v.8l-7.1 3.9-8.9-4.1V32c0-2.2-.1-4.3-.4-6.3l8.8 3.2c.2.1.5.1.7.1.4 0 .7-.1 1-.3zM22 40c-2.2 0-4-3.6-4-8s1.8-8 4-8 4 3.6 4 8-1.8 8-4 8zM32.4 9c-.3-.3-.6-.7-1-1H42c2.5 0 4.9 1.2 6.8 3.3l-3.1 1.6-13.2-3.8-.1-.1zM46.7 52l4.1-1.4c-2.4 3.4-5.5 5.5-8.8 5.5H31.4c2.1-2 3.9-4.5 5.3-7.6l8.6 3.4c.2.1.4.1.7.1h.7z"
|
|
19
|
+
fill="none" />
|
|
20
|
+
<path class="aa"
|
|
21
|
+
d="M22 56C14.4 56 8 45 8 32S14.4 8 22 8s14 11 14 24-6.4 24-14 24zm-8-24c0-6.7 3.5-12 8-12s8 5.3 8 12-3.5 12-8 12-8-5.3-8-12z"
|
|
22
|
+
fill="none" />
|
|
23
|
+
<path fill-rule="evenodd" class="ab"
|
|
24
|
+
d="M22 44c-4.5 0-8-5.3-8-12s3.5-12 8-12 8 5.3 8 12-3.5 12-8 12zm0-4c1.9 0 4-3.4 4-8s-2.1-8-4-8-4 3.4-4 8 2.1 8 4 8z"
|
|
25
|
+
fill="#481a54" />
|
|
26
|
+
<path fill-rule="evenodd" class="ab"
|
|
27
|
+
d="M60 32c0 15.7-7.9 28-18 28H22C11.9 60 4 47.7 4 32S11.9 4 22 4h20c10.1 0 18 12.3 18 28zm-4.6 5.7l-5.6 3.1c-.3.1-.7.2-1 .2-.3 0-.5-.1-.8-.2L39.6 37c-.3 2.7-.8 5.3-1.6 7.7l8 3.2 7.5-2.5c1-2.3 1.7-5 1.9-7.7zm.1-12.1L50 28.7c-.3.2-.6.3-1 .3-.2 0-.5 0-.6-.1l-8.8-3.2c.2 2 .4 4.1.4 6.3v.7l8.9 4 7.1-3.9V32c0-2.2-.2-4.3-.5-6.4zm-.9-4.1c-.8-2.6-1.8-5-3.1-7l-4.6 2.3c-.3.1-.6.2-.9.2-.2 0-.4 0-.6-.1L36 14.2c1 2.1 1.9 4.4 2.6 6.9h.1l10.1 3.7zM42 8.1H31.4c.3.3.7.6 1 1h.1l13.3 3.8 3.1-1.6C46.9 9.2 44.5 8 42 8zM22 56c7.6 0 14-11 14-24S29.6 8 22 8 8 19 8 32s6.4 24 14 24zm28.7-5.5l-4.1 1.4c-.2.1-.4.1-.6.1-.3 0-.5 0-.7-.2l-8.6-3.4c-1.4 3.1-3.2 5.7-5.3 7.6H42c3.3 0 6.4-2.1 8.7-5.5z"
|
|
28
|
+
fill="#481a54" />
|
|
29
|
+
</symbol>
|
|
30
|
+
<symbol id="nonprofit" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
|
31
|
+
<path fill-rule="evenodd" class="aa"
|
|
32
|
+
d="M59.5 44.4c-.3.8-.9 1.6-1.5 2.2l-8.6 8.6c-.4.3-.9.5-1.4.5-.5.1-1-.1-1.4-.5L45 53.6c-4.2 2.8-9.3 4.5-14.7 4.5h-.4C15.6 57.9 4.1 46.3 4.1 32c0-14.2 11.4-25.8 25.6-26.1h.5c14.4 0 26.1 11.7 26.1 26.1 0 1.3-.1 2.5-.3 3.7 3.3 1.5 4.8 5.3 3.5 8.7zm-4.4-.7c1.1-1 1.1-2.7 0-3.8l-.1-.1c-.5-.5-1.1-.7-1.8-.7h-.5c-.6.1-1.1.4-1.5.8l-2 2c-.4.4-.9.6-1.4.6-.5 0-1-.2-1.4-.6l-2-2c-.3-.4-.7-.6-1.1-.7-.2-.1-.5-.1-.8-.1-.7 0-1.4.3-1.9.8-1.1 1-1.1 2.7 0 3.8l5.7 5.6 1.6 1.6zm-15.2-8c0-.6.1-1.1.1-1.7h-8.1v8.2c1.4 0 2.8.2 4 .4-.4-2.8 1.2-5.7 4-6.9zm-8.1-12.5v6.7h8.1c-.1-2.9-.5-5.5-1.2-7.7-.2.1-.4.1-.6.2-1.8.5-3.9.8-6.3.8zm5.5-4.7c-1.7-3.4-3.7-5.7-5.4-7v7.8c2-.1 3.8-.4 5.4-.8zM47.4 37l.3.4.2.2.5-.5c1-1 2.2-1.7 3.6-1.9.1-.4.2-.8.2-1.2H44c0 .4-.1.8-.1 1.2 1.3.2 2.5.9 3.5 1.8zm.1-18.8c-.9.6-2.6 1.7-5 2.7.8 2.6 1.4 5.6 1.5 9.1h8.2c-.4-4.4-2.1-8.5-4.7-11.8zm-2.9-2.9c-2.2-1.9-4.7-3.4-7.5-4.3 1.4 1.6 2.8 3.6 4 6.2 1.6-.7 2.8-1.4 3.5-1.9zM31.9 52.5c1.4-1.2 3.2-3 4.7-5.7-1.4-.3-3-.5-4.7-.6zM42 50.7l-1.9-1.9q-1.5 2.5-3 4.2c1.7-.6 3.3-1.4 4.9-2.3zm-14.1-8.4V34h-7.8c.2 3.7.9 6.8 1.8 9.4 2.1-.5 4.1-.9 6-1.1zm-4.2 4.8c1.3 2.3 2.9 4 4.2 5.1v-5.9c-1.4.2-2.8.4-4.2.8zm-4 1.2c-.9.4-1.8.8-2.8 1.3 1.8 1.4 3.8 2.4 5.9 3.2-1-1.2-2.1-2.7-3.1-4.5zM27.8 30v-6.8c-2-.2-4.1-.6-6.4-1.3-.7 2.3-1.2 5-1.3 8.1zm-5-18.9c-2.6 1-5 2.3-7 4.1 1.1.6 2.2 1.1 3.3 1.6 1.1-2.3 2.4-4.1 3.7-5.7zM13 18.2c-2.7 3.3-4.4 7.4-4.8 11.8h7.9c.2-3.6.8-6.7 1.6-9.4-1.6-.7-3.2-1.5-4.7-2.4zM8.2 34c.4 4.9 2.5 9.3 5.6 12.8 1.4-.8 2.9-1.5 4.3-2.1-1-2.9-1.8-6.4-2-10.7zm19.7-22.3c-1.6 1.4-3.5 3.4-5 6.5 1.8.5 3.4.8 5 1z"
|
|
33
|
+
fill="#481a54" />
|
|
34
|
+
</symbol>
|
|
35
|
+
<symbol id="public-sector" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
+
<path class="aa"
|
|
37
|
+
d="M41.8 28.5v18h-3.2c-.1-1.1-.4-2.2-.8-3.2V28.5zM45.8 28.5h4v18h-4zM33.8 30.2v7.2c-1.2-1.1-2.5-2.1-4-2.8 1.7-1.1 3.1-2.7 4-4.4zM51.8 50.5h2v4H38.9v-4h4.9zM30.1 13.8c1.8-.8 3.7-1.3 5.8-1.3 7.1 0 12.9 5.2 13.9 12H35.4v-.4c0-4.3-2.1-8-5.3-10.3z"
|
|
38
|
+
fill="none" />
|
|
39
|
+
<path fill-rule="evenodd" class="ab"
|
|
40
|
+
d="M57.9 48.5v8c0 1.1-.9 2-2 2H8.2c-1.1 0-2-.9-2-2V49c0-6.3 3.7-11.8 9-14.4-3.3-2.3-5.5-6.2-5.5-10.5 0-7.1 5.7-12.8 12.8-12.8 1.1 0 2.1.2 3.1.4 2.4-1.7 5.2-2.8 8.2-3.1V7.5c0-1.1.9-2 2-2s2 .9 2 2v1.1c8.3.9 15 7.6 15.9 15.9h2.1c1.1 0 2 .9 2 2s-.9 2-2 2h-2v18h2c1.1 0 2 .9 2.1 2zm-16-2v-18h-4v14.8c.3 1 .6 2.1.8 3.2zm-24.1 8.1h17.1v-5.5c0-.9-.1-1.7-.3-2.5-.2-.8-.5-1.6-.8-2.4-.9-2-2.3-3.7-4-4.9-1.2-.9-2.5-1.5-4-1.9-1.1-.3-2.2-.5-3.3-.5h-.7c-1.4.1-2.8.4-4 .9-4.5 1.8-7.7 6.2-7.7 11.2v5.5h7.7zm-3-26.3c.7 1.3 1.7 2.4 3 3.2 1.2.8 2.5 1.3 4 1.4h.7q1.8 0 3.3-.6c1.6-.6 3-1.8 4-3.2.1-.1.2-.3.3-.5.7-1.2 1.1-2.5 1.2-4v-.4c0-3.5-2.1-6.5-5-7.9-1.1-.6-2.4-.9-3.8-.9h-.8c-4.4.4-7.9 4.1-7.9 8.7 0 .6.1 1.1.2 1.7.1.9.4 1.7.8 2.5zm19 9v-7.2c-1 1.8-2.3 3.4-4 4.5 1.5.7 2.8 1.7 4 2.7zm12 9.2h4v-18h-4zM30 13.8c3.2 2.3 5.3 6.1 5.3 10.3v.4h14.4c-1-6.8-6.9-12-13.9-12-2 0-4 .5-5.8 1.3zm23.8 36.7H38.9v4h14.9z"
|
|
41
|
+
fill="#481a54" />
|
|
42
|
+
</symbol>
|
|
3
43
|
<symbol viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" id="analytics">
|
|
4
44
|
<g id="Atoms" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
45
|
<g id="ICONS-symbols" transform="translate(-1849.000000, -3.000000)" fill-rule="nonzero">
|
|
@@ -3,7 +3,7 @@ import { setContainerInnerHtml } from "dxUtils/lwc";
|
|
|
3
3
|
|
|
4
4
|
export default class Banner extends LightningElement {
|
|
5
5
|
@api bannerMarkup =
|
|
6
|
-
'<span><a href="https://forms.gle/
|
|
6
|
+
'Thank you for visiting the Salesforce Developers website! <span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">We value your feedback</a></span>';
|
|
7
7
|
|
|
8
8
|
renderedCallback() {
|
|
9
9
|
const container = this.template.querySelector(".info-container");
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
.button.variant_inline dx-icon,
|
|
56
56
|
.button.variant_inline-inherit dx-icon {
|
|
57
57
|
display: inline-block;
|
|
58
|
-
transform: translate(0, -2px);
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
.button > span {
|
|
@@ -68,11 +67,6 @@
|
|
|
68
67
|
font-family: var(--dx-g-font-display);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
.button.font-display:not(.variant_inline):not(.variant_inline-inherit) > span {
|
|
72
|
-
/* offset accounts for display font's ghost padding */
|
|
73
|
-
margin-top: 5px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
70
|
.button.font-sans {
|
|
77
71
|
font-family: var(--dx-g-font-sans);
|
|
78
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
+
aria-labelledby="label"
|
|
3
4
|
class={className}
|
|
4
5
|
onclick={handleMouseEvent}
|
|
5
6
|
onmouseenter={handleMouseEvent}
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
disabled={disabled}
|
|
10
11
|
>
|
|
11
12
|
<div class="label-container">
|
|
12
|
-
<span>{label}</span>
|
|
13
|
+
<span id="label">{label}</span>
|
|
13
14
|
<dx-icon sprite="utility" symbol={symbol} size="small"></dx-icon>
|
|
14
15
|
</div>
|
|
15
16
|
</button>
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class={containerClass}>
|
|
3
|
-
<dx-type-badge
|
|
4
|
-
color={badgeColor}
|
|
5
|
-
type="content-type"
|
|
6
|
-
value={contentType}
|
|
7
|
-
size={badgeSize}
|
|
8
|
-
></dx-type-badge>
|
|
3
|
+
<dx-type-badge variant={contentType} size={badgeSize}></dx-type-badge>
|
|
9
4
|
<dx-card-title
|
|
10
5
|
if:true={title}
|
|
11
6
|
href={href}
|
|
@@ -10,8 +10,8 @@ export default class ExpandedCard extends ArchiveCard {
|
|
|
10
10
|
@api authorImgSrc?: string | null = null;
|
|
11
11
|
@api length?: string;
|
|
12
12
|
|
|
13
|
-
private get isBlog() {
|
|
14
|
-
return this.contentType === "
|
|
13
|
+
private get isBlog(): boolean {
|
|
14
|
+
return this.contentType === "blog";
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
private get hasAuthor(): boolean {
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
<a class="dx-text-truncate" href={href} target={target}>
|
|
4
4
|
<h4>{title}</h4>
|
|
5
5
|
</a>
|
|
6
|
-
<dx-type-badge
|
|
7
|
-
color={badgeColor}
|
|
8
|
-
size={badgeSize}
|
|
9
|
-
type="content-type"
|
|
10
|
-
value={contentType}
|
|
11
|
-
></dx-type-badge>
|
|
6
|
+
<dx-type-badge variant={contentType} size={badgeSize}></dx-type-badge>
|
|
12
7
|
</div>
|
|
13
8
|
</template>
|
|
@@ -40,6 +40,7 @@ dx-card-title {
|
|
|
40
40
|
|
|
41
41
|
dx-hr {
|
|
42
42
|
--dx-c-hr-padding-horizontal: 0;
|
|
43
|
+
|
|
43
44
|
width: 100%;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -99,12 +100,13 @@ dx-button {
|
|
|
99
100
|
|
|
100
101
|
.recommended-border {
|
|
101
102
|
border: 3px solid var(--dx-g-blue-vibrant-50);
|
|
103
|
+
|
|
102
104
|
/* overwrite inherited border-radius */
|
|
103
105
|
border-radius: 0 0 var(--dx-g-card-border-radius)
|
|
104
106
|
var(--dx-g-card-border-radius) !important;
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
.
|
|
109
|
+
.top-text .recommended-border {
|
|
108
110
|
margin-top: var(--dx-g-spacing-mlg);
|
|
109
111
|
}
|
|
110
112
|
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
.button-cta {
|
|
34
34
|
--dx-c-button-font-size: var(--dx-g-text-base);
|
|
35
35
|
--dx-c-button-font-weight: var(--dx-g-font-bold);
|
|
36
|
+
|
|
36
37
|
margin-top: 15px;
|
|
37
38
|
width: 100%;
|
|
38
39
|
}
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
|
|
53
54
|
.button-close {
|
|
54
55
|
--dx-c-button-background-color: white;
|
|
56
|
+
|
|
55
57
|
margin-left: auto;
|
|
56
58
|
pointer-events: all;
|
|
57
59
|
}
|
|
@@ -254,12 +254,9 @@
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
.custom-bg-big-moon::after {
|
|
258
|
-
background-image: url(/assets/svg/big-moon.svg);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
257
|
.custom-bg-big-moon::after {
|
|
262
258
|
content: "";
|
|
259
|
+
background-image: url(/assets/svg/big-moon.svg);
|
|
263
260
|
background-position: top right;
|
|
264
261
|
background-repeat: no-repeat;
|
|
265
262
|
position: absolute;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
onclear={onInputEscape}
|
|
21
21
|
onsubmit={onInputSubmit}
|
|
22
22
|
onfocus={openDropdown}
|
|
23
|
+
onblur={onDropdownRequestClose}
|
|
23
24
|
placeholder="Search"
|
|
24
25
|
size="override"
|
|
25
26
|
type="search"
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
onclear={onInputEscape}
|
|
52
53
|
onsubmit={onInputSubmit}
|
|
53
54
|
onfocus={openDropdown}
|
|
55
|
+
onblur={onDropdownRequestClose}
|
|
54
56
|
placeholder="Search"
|
|
55
57
|
shortcut-key="k"
|
|
56
58
|
size="small"
|
package/src/modules/dx/hr/hr.css
CHANGED
|
@@ -13,7 +13,7 @@ h2 {
|
|
|
13
13
|
font-family: var(--dx-g-font-display);
|
|
14
14
|
font-size: var(--dx-g-text-sm);
|
|
15
15
|
color: var(--dx-g-blue-vibrant-20);
|
|
16
|
-
text-transform:
|
|
16
|
+
text-transform: capitalize;
|
|
17
17
|
letter-spacing: 0;
|
|
18
18
|
line-height: 18px;
|
|
19
19
|
}
|
|
@@ -22,7 +22,6 @@ p::before,
|
|
|
22
22
|
h2::before,
|
|
23
23
|
p::after,
|
|
24
24
|
h2::after {
|
|
25
|
-
transform: translateY(-2px); /* offset for display font ghost padding */
|
|
26
25
|
content: "";
|
|
27
26
|
flex: 1 1;
|
|
28
27
|
border-bottom: 2px solid var(--dx-g-gray-95);
|
|
@@ -42,7 +41,7 @@ h2::after {
|
|
|
42
41
|
dx-button {
|
|
43
42
|
display: flex;
|
|
44
43
|
width: 100%;
|
|
45
|
-
text-transform:
|
|
44
|
+
text-transform: capitalize;
|
|
46
45
|
padding: 0 var(--dx-c-hr-padding-horizontal);
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
|
|
3
|
+
.badge {
|
|
4
|
+
--background: var(--dx-g-cloud-blue-natural-90);
|
|
5
|
+
--border-radius: var(--dx-g-spacing-xs);
|
|
6
|
+
--color: var(--dx-g-blue-vibrant-20);
|
|
7
|
+
--height: var(--dx-g-spacing-lg);
|
|
8
|
+
--horizontal-spacing: var(--dx-g-spacing-sm);
|
|
9
|
+
|
|
10
|
+
color: var(--dx-c-metadata-badge-color, var(--color));
|
|
11
|
+
background: var(--dx-c-metadata-badge-background, var(--background));
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
height: var(--height);
|
|
16
|
+
width: min-content;
|
|
17
|
+
padding: 0 var(--horizontal-spacing);
|
|
18
|
+
border-radius: var(--border-radius);
|
|
19
|
+
font-family: var(--dx-g-font-display);
|
|
20
|
+
font-size: 10px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
letter-spacing: 0.6px;
|
|
23
|
+
text-transform: uppercase;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.badge.size-small {
|
|
28
|
+
--height: var(--dx-g-spacing-md);
|
|
29
|
+
--horizontal-spacing: var(--dx-g-spacing-xs);
|
|
30
|
+
|
|
31
|
+
font-size: 8px;
|
|
32
|
+
letter-spacing: 0.5px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media screen and (max-width: 768px) {
|
|
36
|
+
.badge:not(.size-small) {
|
|
37
|
+
height: var(--dx-g-spacing-lg);
|
|
38
|
+
padding: 0 var(--dx-g-spacing-sm);
|
|
39
|
+
font-size: var(--dx-g-text-2xs);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { Color, TypeBadgeSize } from "typings/custom";
|
|
4
|
+
import { colorToDxColors, buildStyleColorVariables } from "dxUtils/css";
|
|
5
|
+
|
|
6
|
+
export default class MetadataBadge extends LightningElement {
|
|
7
|
+
@api size: TypeBadgeSize = "default";
|
|
8
|
+
@api color?: Color;
|
|
9
|
+
@api value!: string;
|
|
10
|
+
|
|
11
|
+
private get className(): string {
|
|
12
|
+
return cx("badge", `size-${this.size}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private get style(): string {
|
|
16
|
+
if (this.color) {
|
|
17
|
+
const variables = colorToDxColors(this.color as Color);
|
|
18
|
+
if (variables) {
|
|
19
|
+
return buildStyleColorVariables(variables);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -27,11 +27,10 @@ export default class Modal extends LightningElement {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
connectedCallback(): void {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
document.removeEventListener("keydown", this.handleKeyDown);
|
|
30
|
+
this.template.addEventListener(
|
|
31
|
+
"keydown",
|
|
32
|
+
this.handleKeyDown.bind(this)
|
|
33
|
+
);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
focusFirstElement(): void {
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.dx-pagination-pages button {
|
|
30
|
-
padding: var(--dx-g-spacing-
|
|
31
|
-
var(--dx-g-spacing-2xs) var(--dx-g-spacing-md);
|
|
30
|
+
padding: var(--dx-g-spacing-xs) var(--dx-g-spacing-md);
|
|
32
31
|
border-radius: var(--dx-g-spacing-lg);
|
|
33
32
|
font-family: var(--dx-g-font-display);
|
|
34
33
|
font-size: var(--dx-g-text-sm);
|
|
@@ -422,6 +422,7 @@ export default class SidebarSearch extends LightningElement {
|
|
|
422
422
|
switch (e.detail as PopoverRequestCloseType) {
|
|
423
423
|
case "interact-outside":
|
|
424
424
|
case "keypress-escape":
|
|
425
|
+
case "input-blur":
|
|
425
426
|
this.dropdownRequestedOpen = false;
|
|
426
427
|
break;
|
|
427
428
|
default:
|
|
@@ -145,33 +145,33 @@
|
|
|
145
145
|
--indentation: calc(20 * var(--base-indentation));
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
dx-
|
|
149
|
-
--dx-c-
|
|
148
|
+
dx-metadata-badge {
|
|
149
|
+
--dx-c-metadata-badge-text-width: 21px;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
dx-
|
|
153
|
-
--dx-c-
|
|
154
|
-
--dx-c-
|
|
152
|
+
dx-metadata-badge.get {
|
|
153
|
+
--dx-c-metadata-badge-color: var(--dx-g-blue-vibrant-50);
|
|
154
|
+
--dx-c-metadata-badge-background: var(--dx-g-blue-vibrant-90);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
dx-
|
|
158
|
-
--dx-c-
|
|
159
|
-
--dx-c-
|
|
157
|
+
dx-metadata-badge.put {
|
|
158
|
+
--dx-c-metadata-badge-color: var(--dx-g-yellow-vibrant-40);
|
|
159
|
+
--dx-c-metadata-badge-background: var(--dx-g-yellow-vibrant-90);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
dx-
|
|
163
|
-
--dx-c-
|
|
164
|
-
--dx-c-
|
|
162
|
+
dx-metadata-badge.post {
|
|
163
|
+
--dx-c-metadata-badge-color: var(--dx-g-green-vibrant-40);
|
|
164
|
+
--dx-c-metadata-badge-background: var(--dx-g-green-vibrant-90);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
dx-
|
|
168
|
-
--dx-c-
|
|
169
|
-
--dx-c-
|
|
167
|
+
dx-metadata-badge.patch {
|
|
168
|
+
--dx-c-metadata-badge-color: var(--dx-g-teal-vibrant-40);
|
|
169
|
+
--dx-c-metadata-badge-background: var(--dx-g-teal-vibrant-90);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
dx-
|
|
173
|
-
--dx-c-
|
|
174
|
-
--dx-c-
|
|
172
|
+
dx-metadata-badge.delete {
|
|
173
|
+
--dx-c-metadata-badge-color: var(--dx-g-red-vibrant-40);
|
|
174
|
+
--dx-c-metadata-badge-background: var(--dx-g-hot-orange-vibrant-90);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
a {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a href={href} class={tileClass}>
|
|
2
|
+
<a href={href} class={tileClass} target={target}>
|
|
3
3
|
<div class="flex indentation" aria-level={tileAriaLevel}>
|
|
4
4
|
<span
|
|
5
5
|
class="tile-label sidebar-item-truncate-text"
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
onclick={onClickIcon}
|
|
17
17
|
></dx-icon>
|
|
18
18
|
</div>
|
|
19
|
-
<dx-
|
|
19
|
+
<dx-metadata-badge
|
|
20
20
|
if:true={showMethod}
|
|
21
|
-
class=
|
|
21
|
+
class="flex tile-icon"
|
|
22
22
|
size="small"
|
|
23
23
|
value={methodText}
|
|
24
|
-
|
|
24
|
+
color={metadataBadgeColor}
|
|
25
|
+
></dx-metadata-badge>
|
|
25
26
|
</div>
|
|
26
27
|
</a>
|
|
27
28
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
|
-
import { InternalTreeNode } from "typings/custom";
|
|
3
|
+
import { Color, InternalTreeNode } from "typings/custom";
|
|
4
4
|
|
|
5
5
|
const methodTextMap: {
|
|
6
6
|
[key: string]: string;
|
|
@@ -12,6 +12,16 @@ const methodTextMap: {
|
|
|
12
12
|
delete: "DELE"
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
const metadataBadgeColorMap: {
|
|
16
|
+
[key: string]: Color;
|
|
17
|
+
} = {
|
|
18
|
+
get: "blue",
|
|
19
|
+
put: "yellow",
|
|
20
|
+
post: "green",
|
|
21
|
+
patch: "teal",
|
|
22
|
+
delete: "red"
|
|
23
|
+
};
|
|
24
|
+
|
|
15
25
|
export default class TreeTile extends LightningElement {
|
|
16
26
|
@api isRoot = false;
|
|
17
27
|
@api treeNode!: InternalTreeNode;
|
|
@@ -20,6 +30,7 @@ export default class TreeTile extends LightningElement {
|
|
|
20
30
|
@api isSelected = false;
|
|
21
31
|
@api href!: string;
|
|
22
32
|
@api showArrow = false;
|
|
33
|
+
@api target!: string;
|
|
23
34
|
|
|
24
35
|
get tileAriaLevel() {
|
|
25
36
|
return this.treeNode.level + 2;
|
|
@@ -29,8 +40,11 @@ export default class TreeTile extends LightningElement {
|
|
|
29
40
|
return this.isRoot ? "small" : "xsmall";
|
|
30
41
|
}
|
|
31
42
|
|
|
32
|
-
private get
|
|
33
|
-
|
|
43
|
+
private get metadataBadgeColor(): string | undefined {
|
|
44
|
+
if (this.treeNode.method) {
|
|
45
|
+
return metadataBadgeColorMap[this.treeNode.method];
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
private get showMethod() {
|
|
@@ -1,33 +1,6 @@
|
|
|
1
1
|
@import "dxHelpers/reset";
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
align-items: center;
|
|
5
|
-
background: var(--dx-c-type-badge-background, var(--background));
|
|
6
|
-
border-radius: var(--dx-c-type-badge-border-radius, var(--border-radius));
|
|
7
|
-
color: var(--dx-c-type-badge-color, var(--color));
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
height: var(--dx-c-type-badge-height, var(--height));
|
|
11
|
-
text-align: center;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
width: min-content;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.typebadge.typebadge_metadata {
|
|
17
|
-
--background: var(--dx-g-cloud-blue-natural-90);
|
|
18
|
-
--border-radius: var(--dx-g-spacing-xs);
|
|
19
|
-
--color: var(--dx-g-blue-vibrant-20);
|
|
20
|
-
--height: var(--dx-g-spacing-md);
|
|
21
|
-
--horizontal-spacing: var(--dx-g-spacing-sm);
|
|
22
|
-
|
|
23
|
-
font-family: var(--dx-g-font-display);
|
|
24
|
-
font-size: 10px;
|
|
25
|
-
letter-spacing: 0.6px;
|
|
26
|
-
text-transform: var(--dx-c-type-badge-text-transform, uppercase);
|
|
27
|
-
padding: 0 var(--horizontal-spacing);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.typebadge.typebadge_content-type {
|
|
3
|
+
.badge {
|
|
31
4
|
--background: var(--sds-g-gray-3);
|
|
32
5
|
--border-radius: var(--dx-g-spacing-smd);
|
|
33
6
|
--color: var(--sds-g-gray-10);
|
|
@@ -35,40 +8,26 @@
|
|
|
35
8
|
--horizontal-spacing: var(--dx-g-spacing-smd);
|
|
36
9
|
--vertical-spacing: var(--dx-g-spacing-xs);
|
|
37
10
|
|
|
11
|
+
color: var(--dx-c-type-badge-color, var(--color));
|
|
12
|
+
background: var(--dx-c-type-badge-background, var(--background));
|
|
13
|
+
border-radius: var(--border-radius);
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
height: var(--height);
|
|
18
|
+
width: min-content;
|
|
19
|
+
text-align: center;
|
|
20
|
+
white-space: nowrap;
|
|
38
21
|
font-family: var(--dx-g-font-sans);
|
|
39
|
-
font-size:
|
|
22
|
+
font-size: 10px;
|
|
40
23
|
font-weight: var(--dx-g-font-bold);
|
|
41
24
|
padding: var(--vertical-spacing) var(--horizontal-spacing);
|
|
42
25
|
}
|
|
43
26
|
|
|
44
|
-
.
|
|
27
|
+
.badge.size-small {
|
|
45
28
|
--height: var(--dx-g-spacing-mlg);
|
|
46
|
-
--horizontal-spacing: var(--dx-g-spacing-sm);
|
|
47
|
-
|
|
48
|
-
font-size: 10px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.typebadge.typebadge_metadata.size-small {
|
|
52
|
-
--height: var(--dx-g-spacing-md);
|
|
53
|
-
--horizontal-spacing: var(--dx-g-spacing-xs);
|
|
54
|
-
|
|
55
|
-
font-size: 8px;
|
|
56
|
-
letter-spacing: 0.5px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.typebadge.typebadge_metadata span {
|
|
60
|
-
transform: translateY(2px);
|
|
61
|
-
width: var(--dx-c-type-badge-text-width, unset);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.typebadge.typebadge_metadata.size-small span {
|
|
65
|
-
transform: translateY(1px);
|
|
66
29
|
}
|
|
67
30
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
height: var(--dx-g-spacing-lg);
|
|
71
|
-
padding: 0 var(--dx-g-spacing-sm);
|
|
72
|
-
font-size: var(--dx-g-text-2xs);
|
|
73
|
-
}
|
|
31
|
+
dx-icon {
|
|
32
|
+
margin-right: var(--dx-g-spacing-sm);
|
|
74
33
|
}
|
|
@@ -1,65 +1,161 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
Brand,
|
|
5
5
|
Color,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
ContentType,
|
|
7
|
+
IconSprite,
|
|
8
|
+
IconSymbol,
|
|
9
|
+
TypeBadgeSize
|
|
9
10
|
} from "typings/custom";
|
|
10
|
-
import { colorToDxColors } from "dxUtils/css";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
import { colorToDxColors, buildStyleColorVariables } from "dxUtils/css";
|
|
12
|
+
import { BRANDS } from "dxConstants/brands";
|
|
13
|
+
import { CONTENT_TYPES } from "dxConstants/contentTypes";
|
|
14
|
+
|
|
15
|
+
const contentTypeLabels = {
|
|
16
|
+
documentation: "Documentation",
|
|
17
|
+
trailhead: "Trailhead",
|
|
18
|
+
blog: "Blog",
|
|
19
|
+
forum: "Forum",
|
|
20
|
+
api: "API",
|
|
21
|
+
event: "Event",
|
|
22
|
+
website: "Website",
|
|
23
|
+
podcast: "Podcast"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type IconData = {
|
|
27
|
+
iconSymbol: IconSymbol;
|
|
28
|
+
iconSprite: IconSprite;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const contentTypeIcons: {
|
|
32
|
+
[K in ContentType]: IconData;
|
|
33
|
+
} = {
|
|
34
|
+
documentation: {
|
|
35
|
+
iconSprite: "utility",
|
|
36
|
+
iconSymbol: "knowledge_base"
|
|
37
|
+
},
|
|
38
|
+
trailhead: {
|
|
39
|
+
iconSprite: "salesforcebrand",
|
|
40
|
+
iconSymbol: "learning"
|
|
41
|
+
},
|
|
42
|
+
blog: {
|
|
43
|
+
iconSprite: "utility",
|
|
44
|
+
iconSymbol: "comments"
|
|
45
|
+
},
|
|
46
|
+
forum: {
|
|
47
|
+
iconSprite: "general",
|
|
48
|
+
iconSymbol: "question-circle"
|
|
49
|
+
},
|
|
50
|
+
api: {
|
|
51
|
+
iconSprite: "utility",
|
|
52
|
+
iconSymbol: "settings"
|
|
53
|
+
},
|
|
54
|
+
event: {
|
|
55
|
+
iconSprite: "utility",
|
|
56
|
+
iconSymbol: "event"
|
|
57
|
+
},
|
|
58
|
+
website: {
|
|
59
|
+
iconSprite: "utility",
|
|
60
|
+
iconSymbol: "home"
|
|
61
|
+
},
|
|
62
|
+
podcast: {
|
|
63
|
+
iconSprite: "utility",
|
|
64
|
+
iconSymbol: "unmuted"
|
|
65
|
+
}
|
|
66
|
+
};
|
|
27
67
|
|
|
28
68
|
export default class TypeBadge extends LightningElement {
|
|
29
69
|
@api size: TypeBadgeSize = "default";
|
|
30
|
-
@api
|
|
31
|
-
@api color?:
|
|
32
|
-
|
|
70
|
+
@api variant?: Brand | ContentType = "default";
|
|
71
|
+
@api color?: Color;
|
|
72
|
+
|
|
73
|
+
@api
|
|
74
|
+
get iconSymbol(): IconSymbol | undefined {
|
|
75
|
+
return this.variantIconData
|
|
76
|
+
? this.variantIconData.iconSymbol
|
|
77
|
+
: this._iconSymbol;
|
|
78
|
+
}
|
|
79
|
+
set iconSymbol(value: IconSymbol | undefined) {
|
|
80
|
+
if (value) {
|
|
81
|
+
this._iconSymbol = value;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@api
|
|
86
|
+
get iconSprite(): IconSprite | undefined {
|
|
87
|
+
return this.variantIconData
|
|
88
|
+
? this.variantIconData.iconSprite
|
|
89
|
+
: this._iconSprite;
|
|
90
|
+
}
|
|
91
|
+
set iconSprite(value: IconSprite | undefined) {
|
|
92
|
+
if (value) {
|
|
93
|
+
this._iconSprite = value;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@api
|
|
98
|
+
get value(): string {
|
|
99
|
+
return this._value || this.variantLabel || "";
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
set value(value) {
|
|
103
|
+
if (value) {
|
|
104
|
+
this._value = value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private _value?: string;
|
|
109
|
+
private _iconSprite?: IconSprite;
|
|
110
|
+
private _iconSymbol?: IconSymbol;
|
|
111
|
+
|
|
112
|
+
private get variantIconData(): IconData | null {
|
|
113
|
+
if (this.variant && this.variant in contentTypeIcons) {
|
|
114
|
+
return contentTypeIcons[this.variant as ContentType];
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private get variantLabel(): string | null {
|
|
120
|
+
if (this.isContentType) {
|
|
121
|
+
return contentTypeLabels[this.variant as ContentType];
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private get variantColorScope(): string | null {
|
|
127
|
+
if (this.isContentType) {
|
|
128
|
+
return "content-type";
|
|
129
|
+
}
|
|
130
|
+
if (this.isBrand) {
|
|
131
|
+
return "brand";
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private get isContentType(): boolean {
|
|
137
|
+
return CONTENT_TYPES.includes(this.variant as ContentType);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private get isBrand(): boolean {
|
|
141
|
+
return BRANDS.includes(this.variant as ContentType);
|
|
142
|
+
}
|
|
33
143
|
|
|
34
144
|
private get className(): string {
|
|
35
|
-
return cx(
|
|
36
|
-
"typebadge",
|
|
37
|
-
`size-${this.size}`,
|
|
38
|
-
(this.type && `typebadge_${this.type}`) || DEFAULT_TYPE
|
|
39
|
-
);
|
|
145
|
+
return cx("badge", `size-${this.size}`);
|
|
40
146
|
}
|
|
41
147
|
|
|
42
148
|
private get style(): string {
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
background: `--dx-g
|
|
46
|
-
color: `--dx-g
|
|
149
|
+
if (this.variantColorScope) {
|
|
150
|
+
return buildStyleColorVariables({
|
|
151
|
+
background: `--dx-g-${this.variantColorScope}-${this.variant}-color-background`,
|
|
152
|
+
color: `--dx-g-${this.variantColorScope}-${this.variant}-color`
|
|
47
153
|
});
|
|
48
154
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
155
|
+
if (this.color) {
|
|
156
|
+
const variables = colorToDxColors(this.color as Color);
|
|
157
|
+
return buildStyleColorVariables(variables);
|
|
52
158
|
}
|
|
53
159
|
return "";
|
|
54
160
|
}
|
|
55
|
-
|
|
56
|
-
private buildStyleString({
|
|
57
|
-
background,
|
|
58
|
-
color
|
|
59
|
-
}: {
|
|
60
|
-
background: string;
|
|
61
|
-
color: string;
|
|
62
|
-
}): string {
|
|
63
|
-
return `--color: var(${color}); --background: var(${background})`;
|
|
64
|
-
}
|
|
65
161
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { LinkTarget,
|
|
2
|
+
import { LinkTarget, ContentType } from "typings/custom";
|
|
3
3
|
|
|
4
4
|
const MOBILE_QUERY = "(max-width: 640px)";
|
|
5
5
|
|
|
6
6
|
export abstract class ArchiveCard extends LightningElement {
|
|
7
|
-
@api contentType
|
|
7
|
+
@api contentType!: ContentType;
|
|
8
8
|
@api href!: string;
|
|
9
9
|
@api title!: string;
|
|
10
10
|
@api target: LinkTarget = "_self";
|
|
@@ -12,10 +12,6 @@ export abstract class ArchiveCard extends LightningElement {
|
|
|
12
12
|
private matchMedia!: MediaQueryList;
|
|
13
13
|
protected mobile = false;
|
|
14
14
|
|
|
15
|
-
protected get badgeColor(): Color {
|
|
16
|
-
return this.contentType === "Blog" ? "teal" : "blue";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
15
|
connectedCallback(): void {
|
|
20
16
|
this.matchMedia = window.matchMedia(MOBILE_QUERY);
|
|
21
17
|
this.onMediaChange(this.matchMedia);
|
|
@@ -42,7 +42,7 @@ export abstract class HeaderBase extends LightningElement {
|
|
|
42
42
|
@api title: string = "Salesforce";
|
|
43
43
|
@api version?: string | null = null;
|
|
44
44
|
@api bannerMarkup =
|
|
45
|
-
'<span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">
|
|
45
|
+
'Thank you for visiting the Salesforce Developers website! <span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">We value your feedback</a></span>';
|
|
46
46
|
|
|
47
47
|
@api
|
|
48
48
|
get navItems() {
|
|
@@ -170,7 +170,7 @@ a.dx-card-base:hover a.dx-card-base_borderless-image_link {
|
|
|
170
170
|
dx-card-title:hover,
|
|
171
171
|
.dx-card-base_link-hovered dx-card-title,
|
|
172
172
|
a.dx-card-base:hover dx-card-title {
|
|
173
|
-
--dx-c-card-title-color: var(--dx-g-
|
|
173
|
+
--dx-c-card-title-color: var(--dx-g-blue-vibrant-50);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/* Line Limits */
|
|
@@ -41,3 +41,13 @@ export const colorToDxColors = (
|
|
|
41
41
|
|
|
42
42
|
export const toDxColor = (color: string) =>
|
|
43
43
|
["white", "transparent"].includes(color) ? color : `var(--dx-g-${color})`;
|
|
44
|
+
|
|
45
|
+
export const buildStyleColorVariables = ({
|
|
46
|
+
background,
|
|
47
|
+
color
|
|
48
|
+
}: {
|
|
49
|
+
background: string;
|
|
50
|
+
color: string;
|
|
51
|
+
}): string => {
|
|
52
|
+
return `--color: var(${color}); --background: var(${background})`;
|
|
53
|
+
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { normalizeToArray } from "dxUtils/normalizers";
|
|
3
|
-
import { TypeBadgeSize } from "typings/custom";
|
|
4
|
-
|
|
5
|
-
export default class TypeBadgeGroup extends LightningElement {
|
|
6
|
-
@api size: TypeBadgeSize = "medium";
|
|
7
|
-
|
|
8
|
-
@api
|
|
9
|
-
get badges() {
|
|
10
|
-
return this._badges;
|
|
11
|
-
}
|
|
12
|
-
set badges(value: string[] | string | null) {
|
|
13
|
-
this._badges = normalizeToArray(value);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// can be an array of strings or a comma delimited string
|
|
17
|
-
private _badges!: string | string[] | null;
|
|
18
|
-
}
|