@salesforcedevs/dx-components 0.56.1 → 0.56.2-example

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.
Files changed (135) hide show
  1. package/lwc.config.json +18 -3
  2. package/package.json +18 -6
  3. package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +492 -111
  4. package/src/assets/svg/big-moon.svg +1 -0
  5. package/src/assets/svg/blue-circle.svg +3 -0
  6. package/src/assets/svg/login-widget-bg.png +0 -0
  7. package/src/assets/svg/subscribe-background-left.svg +14 -0
  8. package/src/assets/svg/subscribe-background-right.svg +11 -0
  9. package/src/assets/svg/trial-left.svg +6 -0
  10. package/src/assets/svg/trial-right.svg +26 -0
  11. package/src/modules/dx/banner/banner (1).ts +12 -0
  12. package/src/modules/dx/banner/banner.ts +3 -5
  13. package/src/modules/dx/button/button.css +10 -9
  14. package/src/modules/dx/buttonToggle/buttonToggle.css +50 -0
  15. package/src/modules/dx/buttonToggle/buttonToggle.html +17 -0
  16. package/src/modules/dx/buttonToggle/buttonToggle.ts +75 -0
  17. package/src/modules/dx/cardCallout/cardCallout.ts +8 -4
  18. package/src/modules/dx/cardContent/cardContent.html +4 -1
  19. package/src/modules/dx/cardDocs/cardDocs.html +4 -1
  20. package/src/modules/dx/cardEvent/cardEvent.html +1 -2
  21. package/src/modules/dx/cardEvent/cardEvent.ts +1 -1
  22. package/src/modules/dx/cardExpanded/cardExpanded.html +1 -6
  23. package/src/modules/dx/cardExpanded/cardExpanded.ts +2 -2
  24. package/src/modules/dx/cardMinimal/cardMinimal.html +1 -6
  25. package/src/modules/dx/cardTrial/cardTrial.css +63 -4
  26. package/src/modules/dx/cardTrial/cardTrial.html +96 -12
  27. package/src/modules/dx/cardTrial/cardTrial.ts +70 -2
  28. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.css +149 -0
  29. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.html +85 -0
  30. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.ts +67 -0
  31. package/src/modules/dx/checkbox/checkbox.css +4 -0
  32. package/src/modules/dx/codeBlock/codeBlock.ts +5 -1
  33. package/src/modules/dx/dropdown/dropdown.html +5 -1
  34. package/src/modules/dx/dropdown/dropdown.ts +13 -3
  35. package/src/modules/dx/dropdownOption/dropdownOption.css +119 -1
  36. package/src/modules/dx/dropdownOption/dropdownOption.html +4 -0
  37. package/src/modules/dx/dropdownOption/dropdownOption.ts +20 -7
  38. package/src/modules/dx/feature/feature.ts +3 -3
  39. package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +84 -18
  40. package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -99
  41. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +27 -7
  42. package/src/modules/dx/featuresList/featuresList.css +1 -1
  43. package/src/modules/dx/filterMenu/filterMenu.css +26 -8
  44. package/src/modules/dx/filterMenu/filterMenu.html +24 -8
  45. package/src/modules/dx/filterMenu/filterMenu.ts +1 -0
  46. package/src/modules/dx/footer/footer.css +1 -1
  47. package/src/modules/dx/footer/footer.html +25 -20
  48. package/src/modules/dx/footer/footer.ts +19 -15
  49. package/src/modules/dx/footer/links.ts +115 -39
  50. package/src/modules/dx/formattedDateTime/formattedDateTime.ts +8 -3
  51. package/src/modules/dx/header/header.html +10 -3
  52. package/src/modules/dx/header/header.ts +4 -0
  53. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -0
  54. package/src/modules/dx/headerSearch/headerSearch.html +0 -1
  55. package/src/modules/dx/hr/hr.css +2 -4
  56. package/src/modules/dx/iconBadge/iconBadge.css +12 -0
  57. package/src/modules/dx/iconBadge/iconBadge.html +2 -7
  58. package/src/modules/dx/iconBadge/iconBadge.ts +15 -5
  59. package/src/modules/dx/imageAndLabel/imageAndLabel.css +0 -1
  60. package/src/modules/dx/input/input.css +17 -1
  61. package/src/modules/dx/input/input.html +5 -1
  62. package/src/modules/dx/input/input.ts +8 -0
  63. package/src/modules/dx/interactiveImage/interactiveImage.css +59 -0
  64. package/src/modules/dx/interactiveImage/interactiveImage.html +32 -0
  65. package/src/modules/dx/interactiveImage/interactiveImage.ts +71 -0
  66. package/src/modules/dx/logo/logo.css +0 -1
  67. package/src/modules/dx/logo/logo.ts +1 -1
  68. package/src/modules/dx/metadataBadge/metadataBadge.css +41 -0
  69. package/src/modules/dx/metadataBadge/metadataBadge.html +5 -0
  70. package/src/modules/dx/metadataBadge/metadataBadge.ts +24 -0
  71. package/src/modules/dx/modal/modal.css +40 -0
  72. package/src/modules/dx/modal/modal.html +10 -0
  73. package/src/modules/dx/modal/modal.ts +50 -0
  74. package/src/modules/dx/modalDrawer/modalDrawer.html +2 -2
  75. package/src/modules/dx/modalDrawer/modalDrawer.ts +7 -1
  76. package/src/modules/dx/pagination/pagination.css +1 -2
  77. package/src/modules/dx/popover/popover.css +28 -3
  78. package/src/modules/dx/popover/popover.html +1 -0
  79. package/src/modules/dx/popover/popover.ts +83 -44
  80. package/src/modules/dx/searchResults/coveo.css +18989 -0
  81. package/src/modules/dx/searchResults/searchResults.css +387 -0
  82. package/src/modules/dx/searchResults/searchResults.html +104 -0
  83. package/src/modules/dx/searchResults/searchResults.ts +187 -0
  84. package/src/modules/dx/section/section.css +10 -1
  85. package/src/modules/dx/section/section.ts +1 -1
  86. package/src/modules/dx/select/select.css +7 -3
  87. package/src/modules/dx/sidebar/sidebar.css +1 -145
  88. package/src/modules/dx/sidebar/sidebar.ts +2 -0
  89. package/src/modules/dx/sidebarOld/sidebarOld.css +1 -145
  90. package/src/modules/dx/sidebarOld/sidebarOld.ts +2 -0
  91. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +23 -3
  92. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +1 -1
  93. package/src/modules/dx/tab/tab.css +0 -4
  94. package/src/modules/dx/tabPanel/tabPanel.css +20 -0
  95. package/src/modules/dx/tabPanel/tabPanel.html +13 -0
  96. package/src/modules/dx/tabPanel/tabPanel.ts +27 -0
  97. package/src/modules/dx/tabPanelItem/tabPanelItem.css +39 -0
  98. package/src/modules/dx/tabPanelItem/tabPanelItem.html +15 -0
  99. package/src/modules/dx/tabPanelItem/tabPanelItem.ts +39 -0
  100. package/src/modules/dx/tabPanelList/tabPanelList.css +35 -0
  101. package/src/modules/dx/tabPanelList/tabPanelList.html +47 -0
  102. package/src/modules/dx/tabPanelList/tabPanelList.ts +164 -0
  103. package/src/modules/dx/tabPanelList/uniqueId.ts +6 -0
  104. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +33 -0
  105. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.html +53 -0
  106. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +440 -0
  107. package/src/modules/dx/toc/toc.css +1 -0
  108. package/src/modules/dx/toc/toc.ts +13 -0
  109. package/src/modules/dx/treeItem/treeItem.html +2 -0
  110. package/src/modules/dx/treeItem/treeItem.ts +8 -6
  111. package/src/modules/dx/treeTile/treeTile.css +18 -18
  112. package/src/modules/dx/treeTile/treeTile.html +5 -4
  113. package/src/modules/dx/treeTile/treeTile.ts +17 -3
  114. package/src/modules/dx/typeBadge/typeBadge.css +15 -56
  115. package/src/modules/dx/typeBadge/typeBadge.html +6 -0
  116. package/src/modules/dx/typeBadge/typeBadge.ts +149 -46
  117. package/src/modules/dxBaseElements/archiveCard/archiveCard.ts +2 -6
  118. package/src/modules/dxBaseElements/headerBase/headerBase.ts +11 -1
  119. package/src/modules/dxConstants/brands/brands.ts +14 -0
  120. package/src/modules/dxConstants/colors/colors.ts +14 -0
  121. package/src/modules/dxConstants/contentTypes/contentTypes.ts +10 -0
  122. package/src/modules/dxHelpers/card/card.css +1 -1
  123. package/src/modules/dxHelpers/commonHeader/commonHeader.css +4 -3
  124. package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +145 -0
  125. package/src/modules/dxHelpers/{sidebar/sidebar.css → commonTreeItem/commonTreeItem.css} +0 -0
  126. package/src/modules/dxUtils/async/async.ts +45 -0
  127. package/src/modules/dxUtils/constants/constants.ts +0 -13
  128. package/src/modules/dxUtils/css/css.ts +10 -0
  129. package/src/modules/dxUtils/lwc/lwc.ts +9 -0
  130. package/src/modules/dxUtils/prismjs/prismjs.ts +347 -9
  131. package/src/modules/dxUtils/queryCoordinator/queryCoordinator.ts +37 -11
  132. package/LICENSE +0 -12
  133. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +0 -12
  134. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +0 -11
  135. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +0 -18
@@ -1,33 +1,6 @@
1
1
  @import "dxHelpers/reset";
2
2
 
3
- .typebadge {
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: var(--dx-g-text-xs);
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
- .typebadge.typebadge_content-type.size-small {
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
- @media screen and (max-width: 768px) {
69
- .typebadge.typebadge_metadata:not(.size-small) {
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,5 +1,11 @@
1
1
  <template>
2
2
  <div class={className} style={style}>
3
+ <dx-icon
4
+ if:true={iconSymbol}
5
+ symbol={iconSymbol}
6
+ sprite={iconSprite}
7
+ size="xsmall"
8
+ ></dx-icon>
3
9
  <span>{value}</span>
4
10
  </div>
5
11
  </template>
@@ -1,65 +1,168 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import {
4
- TypeBadgeColor,
4
+ Brand,
5
5
  Color,
6
- TypeBadgeSize,
7
- BadgeType,
8
- Brand
6
+ ContentType,
7
+ IconSprite,
8
+ IconSymbol,
9
+ TypeBadgeSize
9
10
  } from "typings/custom";
10
- import { colorToDxColors } from "dxUtils/css";
11
-
12
- const DEFAULT_TYPE = "typebadge_metadata";
13
- const VALID_BRANDS: Array<Brand> = [
14
- "employees",
15
- "marketing",
16
- "partners",
17
- "commerce",
18
- "sales",
19
- "success",
20
- "integration",
21
- "platform",
22
- "industries",
23
- "learning",
24
- "service",
25
- "analytics"
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 value: string = "";
31
- @api color?: TypeBadgeColor = "default";
32
- @api type?: BadgeType = "metadata";
70
+ @api variant?: Brand | ContentType = "default";
71
+ @api color?: Color;
72
+ @api dark?: false;
73
+
74
+ @api
75
+ get iconSymbol(): IconSymbol | undefined {
76
+ return this.variantIconData
77
+ ? this.variantIconData.iconSymbol
78
+ : this._iconSymbol;
79
+ }
80
+ set iconSymbol(value: IconSymbol | undefined) {
81
+ if (value) {
82
+ this._iconSymbol = value;
83
+ }
84
+ }
85
+
86
+ @api
87
+ get iconSprite(): IconSprite | undefined {
88
+ return this.variantIconData
89
+ ? this.variantIconData.iconSprite
90
+ : this._iconSprite;
91
+ }
92
+ set iconSprite(value: IconSprite | undefined) {
93
+ if (value) {
94
+ this._iconSprite = value;
95
+ }
96
+ }
97
+
98
+ @api
99
+ get value(): string {
100
+ return this._value || this.variantLabel || "";
101
+ }
102
+
103
+ set value(value) {
104
+ if (value) {
105
+ this._value = value;
106
+ }
107
+ }
108
+
109
+ private _value?: string;
110
+ private _iconSprite?: IconSprite;
111
+ private _iconSymbol?: IconSymbol;
112
+
113
+ private get variantIconData(): IconData | null {
114
+ if (this.variant && this.variant in contentTypeIcons) {
115
+ return contentTypeIcons[this.variant as ContentType];
116
+ }
117
+ return null;
118
+ }
119
+
120
+ private get variantLabel(): string | null {
121
+ if (this.isContentType) {
122
+ return contentTypeLabels[this.variant as ContentType];
123
+ }
124
+ return null;
125
+ }
126
+
127
+ private get variantColorScope(): string | null {
128
+ if (this.isContentType) {
129
+ return "content-type";
130
+ }
131
+ if (this.isBrand) {
132
+ return "brand";
133
+ }
134
+ return null;
135
+ }
136
+
137
+ private get isContentType(): boolean {
138
+ return CONTENT_TYPES.includes(this.variant as ContentType);
139
+ }
140
+
141
+ private get isBrand(): boolean {
142
+ return BRANDS.includes(this.variant as ContentType);
143
+ }
33
144
 
34
145
  private get className(): string {
35
- return cx(
36
- "typebadge",
37
- `size-${this.size}`,
38
- (this.type && `typebadge_${this.type}`) || DEFAULT_TYPE
39
- );
146
+ return cx("badge", `size-${this.size}`);
40
147
  }
41
148
 
42
149
  private get style(): string {
43
- if (VALID_BRANDS.includes(this.color as Brand)) {
44
- return this.buildStyleString({
45
- background: `--dx-g-brand-${this.color}-color-background`,
46
- color: `--dx-g-brand-${this.color}-color`
150
+ if (this.dark) {
151
+ return buildStyleColorVariables({
152
+ background: "--dx-g-purple-vibrant-40",
153
+ color: "--dx-g-brand-default-color-background"
47
154
  });
48
155
  }
49
- const variables = colorToDxColors(this.color as Color);
50
- if (variables) {
51
- return this.buildStyleString(variables);
156
+ if (this.variantColorScope) {
157
+ return buildStyleColorVariables({
158
+ background: `--dx-g-${this.variantColorScope}-${this.variant}-color-background`,
159
+ color: `--dx-g-${this.variantColorScope}-${this.variant}-color`
160
+ });
161
+ }
162
+ if (this.color) {
163
+ const variables = colorToDxColors(this.color as Color);
164
+ return buildStyleColorVariables(variables);
52
165
  }
53
166
  return "";
54
167
  }
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
168
  }
@@ -1,10 +1,10 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import { LinkTarget, Color } from "typings/custom";
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: "Blog" | "Podcast" = "Blog";
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);
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { Brand, OptionWithLink, OptionWithNested } from "typings/custom";
4
- import { toJson } from "dxUtils/normalizers";
4
+ import { toJson, normalizeBoolean } from "dxUtils/normalizers";
5
5
  import { track } from "dxUtils/analytics";
6
6
 
7
7
  const VALID_BRANDS = [
@@ -61,6 +61,15 @@ export abstract class HeaderBase extends LightningElement {
61
61
  this._versions = toJson(value);
62
62
  }
63
63
 
64
+ @api
65
+ get showBanner() {
66
+ return this._showBanner && this.bannerMarkup;
67
+ }
68
+
69
+ set showBanner(value) {
70
+ this._showBanner = normalizeBoolean(value);
71
+ }
72
+
64
73
  private _navItems!: OptionWithNested[];
65
74
  private _versions!: OptionWithLink[];
66
75
  private matchMedia!: MediaQueryList;
@@ -69,6 +78,7 @@ export abstract class HeaderBase extends LightningElement {
69
78
  private showMobileNavMenu: boolean = false;
70
79
  private showNavScrollShadow: boolean = false;
71
80
  protected isSearchOpen: boolean = false;
81
+ private _showBanner?: boolean = false;
72
82
 
73
83
  get url() {
74
84
  return this.href ? new URL(this.href!) : window.location;
@@ -0,0 +1,14 @@
1
+ export const BRANDS = [
2
+ "employees",
3
+ "marketing",
4
+ "partners",
5
+ "commerce",
6
+ "sales",
7
+ "success",
8
+ "integration",
9
+ "platform",
10
+ "industries",
11
+ "learning",
12
+ "service",
13
+ "analytics"
14
+ ];
@@ -0,0 +1,14 @@
1
+ export const COLORS = [
2
+ "hot-orange",
3
+ "orange",
4
+ "yellow",
5
+ "green",
6
+ "teal",
7
+ "cloud-blue",
8
+ "blue",
9
+ "indigo",
10
+ "purple",
11
+ "violet",
12
+ "pink",
13
+ "red"
14
+ ];
@@ -0,0 +1,10 @@
1
+ export const CONTENT_TYPES = [
2
+ "documentation",
3
+ "trailhead",
4
+ "blog",
5
+ "forum",
6
+ "api",
7
+ "event",
8
+ "website",
9
+ "podcast"
10
+ ];
@@ -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-button-heading-color-hover);
173
+ --dx-c-card-title-color: var(--dx-g-blue-vibrant-50);
174
174
  }
175
175
 
176
176
  /* Line Limits */
@@ -83,7 +83,6 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
83
83
  }
84
84
 
85
85
  .header_l2_group-title .subtitle {
86
- transform: translateY(4px); /* ghost padding */
87
86
  margin-right: var(--dx-g-spacing-md);
88
87
  }
89
88
 
@@ -109,12 +108,14 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
109
108
  margin-left: var(--dx-g-spacing-sm);
110
109
  }
111
110
 
112
- .header-login-signup {
111
+ .header-login-signup,
112
+ .header-tbid-login {
113
113
  display: flex;
114
114
  align-items: center;
115
115
  }
116
116
 
117
- .header-login-signup dx-button {
117
+ .header-login-signup dx-button,
118
+ .header-tbid-login dw-tbid-login-menu {
118
119
  margin-left: var(--dx-g-spacing-smd);
119
120
  }
120
121
 
@@ -0,0 +1,145 @@
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+
4
+ :host {
5
+ --dx-c-sidebar-width: 275px;
6
+ --dx-c-sidebar-button-color: var(--dx-g-blue-vibrant-50);
7
+ --dx-c-sidebar-button-background: white;
8
+ --dx-c-sidebar-button-border: white;
9
+ --dx-c-sidebar-button-color-hover: white;
10
+ --dx-c-sidebar-button-background-hover: var(--dx-g-blue-vibrant-50);
11
+ --dx-c-sidebar-button-border-hover: var(--dx-g-blue-vibrant-50);
12
+ --dx-c-sidebar-left-padding: var(--dx-g-page-padding-horizontal);
13
+ --dx-c-sidebar-vertical-padding: var(--dx-g-spacing-md);
14
+ }
15
+
16
+ dx-tree:not(:last-child) {
17
+ margin-bottom: var(--dx-g-spacing-sm);
18
+ }
19
+
20
+ .header {
21
+ box-sizing: content-box;
22
+ display: flex;
23
+ line-height: var(--dx-g-spacing-xl);
24
+ margin-bottom: 12px;
25
+ }
26
+
27
+ .padding-horizontal {
28
+ padding-left: var(--dx-g-spacing-md);
29
+ padding-right: var(--dx-g-spacing-md);
30
+ }
31
+
32
+ .header-title {
33
+ line-height: inherit;
34
+ }
35
+
36
+ .header-toggle-button {
37
+ position: absolute;
38
+ right: calc((-1 * (var(--dx-g-spacing-xl) / 2)) - 1px);
39
+
40
+ --dx-c-button-opacity: 0;
41
+ --dx-c-button-custom-color: var(--dx-c-sidebar-button-color);
42
+ --dx-c-button-custom-background: var(--dx-c-sidebar-button-background);
43
+ --dx-c-button-custom-border: var(--dx-c-sidebar-button-border);
44
+ --dx-c-button-custom-color-hover: var(--dx-c-sidebar-button-color-hover);
45
+ --dx-c-button-custom-background-hover: var(
46
+ --dx-c-sidebar-button-background-hover
47
+ );
48
+ --dx-c-button-custom-border-hover: var(--dx-c-sidebar-button-border-hover);
49
+ }
50
+
51
+ .header-toggle-icon {
52
+ margin: auto 0 auto auto;
53
+ color: var(--dx-g-blue-vibrant-30);
54
+ }
55
+
56
+ .header-toggle-icon dx-icon {
57
+ transition: var(--dx-g-transition-transform-2x);
58
+ }
59
+
60
+ .container.collapsed {
61
+ width: var(--dx-g-spacing-xl);
62
+ }
63
+
64
+ .container {
65
+ background-color: var(--dx-g-gray-95);
66
+ display: flex;
67
+ flex-direction: column;
68
+ height: var(--dx-c-sidebar-height);
69
+ width: calc(var(--dx-c-sidebar-width) + var(--left-spacing));
70
+ }
71
+
72
+ .container:not(.container-mobile) {
73
+ --border-color: transparent;
74
+ --left-spacing: calc(
75
+ var(--dx-c-sidebar-left-padding) - var(--dx-g-spacing-md)
76
+ );
77
+
78
+ box-shadow: 2px 0 0 0 var(--border-color);
79
+ min-height: var(--dx-c-sidebar-min-height);
80
+ padding: var(--dx-c-sidebar-vertical-padding) 0
81
+ var(--dx-c-sidebar-vertical-padding) var(--left-spacing);
82
+ position: relative;
83
+ }
84
+
85
+ .collapsed.container:not(.container-mobile) {
86
+ background-color: transparent;
87
+ }
88
+
89
+ .collapsed.container:not(.container-border-active) {
90
+ --border-color: transparent;
91
+ }
92
+
93
+ .container:hover .header-toggle-button {
94
+ --dx-c-button-opacity: 1;
95
+ }
96
+
97
+ .container.container-mobile {
98
+ width: 100%;
99
+ }
100
+
101
+ .container.container-mobile .header {
102
+ cursor: pointer;
103
+ line-height: var(--dx-g-spacing-2xl);
104
+ }
105
+
106
+ .container.container-mobile:not(.collapsed) .header {
107
+ background-color: #dddbda;
108
+ }
109
+
110
+ .container.container-mobile .header-title {
111
+ color: var(--dx-g-gray-10);
112
+ font-family: var(--dx-g-font-sans);
113
+ font-size: var(--dx-g-text-sm);
114
+ }
115
+
116
+ .container.container-mobile.collapsed {
117
+ height: unset;
118
+ padding-bottom: 0;
119
+ }
120
+
121
+ .container.container-mobile.collapsed .header {
122
+ margin-bottom: 0;
123
+ }
124
+
125
+ .container.container-mobile.collapsed .header-toggle-icon dx-icon {
126
+ transform: rotateZ(-90deg);
127
+ }
128
+
129
+ .container.container-border-active {
130
+ --border-color: var(--dx-c-sidebar-button-color);
131
+ }
132
+
133
+ .search {
134
+ padding-bottom: var(--dx-g-spacing-md);
135
+ }
136
+
137
+ .search-box {
138
+ --dx-c-input-width: 100%;
139
+ }
140
+
141
+ .truncate {
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ white-space: nowrap;
145
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Checks whether a condition is satisfied at a specified interval, stopping after a maximum amount
3
+ * of time (if specified). Returns a Promise that resolves with `true` if the condition was
4
+ * satisfied during polling (if a maximum time is specified, it can resolve with false if the
5
+ * condition was not satisfied within the maximum time).
6
+ *
7
+ * Usage:
8
+ * await pollUntil(() => something.is.true, 200, 1000);
9
+ *
10
+ * @param {Function} condition the "check" callback that will be called to determine whether the
11
+ * condition has been satisfied (satisfied === callback returns truthy value)
12
+ * @param {number} atIntervalMs value in milliseconds specifying how often to poll
13
+ * @param {number} [forMaximumMs] value in milliseconds specifying the maximum time to poll
14
+ * @returns {Promise}
15
+ */
16
+ export function pollUntil(
17
+ condition: () => boolean,
18
+ atIntervalMs: number,
19
+ forMaximumMs?: number
20
+ ) {
21
+ return new Promise<boolean>((resolve) => {
22
+ let timeoutId: ReturnType<typeof setTimeout>;
23
+ const intervalId = setInterval(() => {
24
+ if (condition()) {
25
+ resolveWithCleanup(true);
26
+ }
27
+ }, atIntervalMs);
28
+ if (typeof forMaximumMs === "number") {
29
+ timeoutId = setTimeout(() => {
30
+ // One last check in case the condition was satisfied right before the end:
31
+ resolveWithCleanup(condition() || false);
32
+ }, forMaximumMs);
33
+ }
34
+ if (condition()) {
35
+ // Condition already fulfilled before intervals, no need to keep waiting!
36
+ resolveWithCleanup(true);
37
+ }
38
+
39
+ function resolveWithCleanup(success: boolean) {
40
+ clearInterval(intervalId);
41
+ clearTimeout(timeoutId);
42
+ resolve(success);
43
+ }
44
+ });
45
+ }
@@ -1,14 +1 @@
1
1
  export * from "./breakpoints";
2
-
3
- export const DEFAULT_LANGUAGES = [
4
- {
5
- id: "en-us",
6
- label: "language_english",
7
- displayText: "English"
8
- },
9
- {
10
- id: "ja-jp",
11
- label: "language_japanese",
12
- displayText: "日本語"
13
- }
14
- ];
@@ -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
+ };
@@ -0,0 +1,9 @@
1
+ export const setContainerInnerHtml = (
2
+ container: HTMLElement,
3
+ markup: string
4
+ ) => {
5
+ if (container && markup && markup !== "") {
6
+ // eslint-disable-next-line @lwc/lwc/no-inner-html
7
+ container.innerHTML = markup;
8
+ }
9
+ };