@salesforcedevs/dx-components 1.3.201 → 1.3.202-langpicker1-alpha

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.201",
3
+ "version": "1.3.202-langpicker1-alpha",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -43,6 +43,5 @@
43
43
  },
44
44
  "volta": {
45
45
  "node": "16.19.1"
46
- },
47
- "gitHead": "44f7095b8d28872147af92591561be6b10fcff5a"
46
+ }
48
47
  }
@@ -38,7 +38,7 @@
38
38
  }
39
39
 
40
40
  .option:active {
41
- background: var(--dx-g-blue-vibrant-95) !important;
41
+ background: var(--dx-g-cloud-blue-vibrant-95) !important;
42
42
  }
43
43
 
44
44
  .option:not(.option-active):hover {
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  .option-active {
49
- background: var(--dx-g-blue-vibrant-95);
49
+ background: var(--dx-g-cloud-blue-vibrant-95);
50
50
  }
51
51
 
52
52
  .option_details {
@@ -79,6 +79,21 @@
79
79
  -webkit-box-orient: vertical;
80
80
  }
81
81
 
82
+ .option-docoption {
83
+ align-items: center;
84
+ flex-direction: row;
85
+ }
86
+
87
+ .option-docoption .option_label {
88
+ color: var(--dx-g-gray-10);
89
+ font-weight: normal !important;
90
+ }
91
+
92
+ .option-docoption.option-active .option_label {
93
+ color: var(--dx-c-dropdown-option-label-color, var(--dx-g-blue-vibrant-50));
94
+ font-weight: var(--dx-g-font-bold);
95
+ }
96
+
82
97
  .option_label > *:last-child {
83
98
  margin-left: var(--dx-g-spacing-sm);
84
99
  }
@@ -31,7 +31,9 @@ export const generalLinksRaw: OptionWithRequiredNested[] = [
31
31
  id: "Lightning Design System"
32
32
  },
33
33
  {
34
- link: { href: "https://metamind.readme.io/" },
34
+ link: {
35
+ href: "/docs/analytics/einstein-vision-language/overview"
36
+ },
35
37
  label: "Einstein",
36
38
  id: "Einstein"
37
39
  },
@@ -79,6 +79,13 @@
79
79
  title="No Results"
80
80
  size="small"
81
81
  ></dx-empty-state>
82
+ <div if:true={hasSidebarFooter} class="footer-nav">
83
+ <doc-sidebar-footer-nav
84
+ lang-value-path={langValuePath}
85
+ language={language}
86
+ languages={languages}
87
+ ></doc-sidebar-footer-nav>
88
+ </div>
82
89
  </div>
83
90
  <div class="sidebar-content sidebar-content-tree">
84
91
  <dx-tree
@@ -92,5 +99,17 @@
92
99
  onselecteditemrendered={onSelectedItemRendered}
93
100
  ></dx-tree>
94
101
  </div>
102
+
103
+ <template if:true={hasSidebarFooter}>
104
+ <div class="footer-nav">
105
+ <doc-sidebar-footer-nav
106
+ lang-value-path={langValuePath}
107
+ language={language}
108
+ languages={languages}
109
+ bail-href={bailHref}
110
+ bail-label={bailLabel}
111
+ ></doc-sidebar-footer-nav>
112
+ </div>
113
+ </template>
95
114
  </div>
96
115
  </template>
@@ -5,6 +5,7 @@ import { getSidebarSearchParams } from "dxUtils/coveo";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import SidebarSearch from "dx/sidebarSearch";
7
7
  import { SidebarBase } from "dxBaseElements/sidebarBase";
8
+ import type { OptionWithLink } from "typings/custom";
8
9
 
9
10
  const MOBILE_SIZE_MATCH = "768px";
10
11
 
@@ -14,6 +15,11 @@ export default class Sidebar extends SidebarBase {
14
15
  @api coveoSearchHub!: string;
15
16
  @api coveoAdvancedQueryConfig!: string;
16
17
  @api header: string = "";
18
+ @api langValuePath: string = "id";
19
+ @api languages!: OptionWithLink[];
20
+ @api language!: string;
21
+ @api bailHref!: string;
22
+ @api bailLabel!: string;
17
23
 
18
24
  @api
19
25
  get value() {
@@ -256,4 +262,17 @@ export default class Sidebar extends SidebarBase {
256
262
  this.template.querySelector("dx-sidebar-search") as any
257
263
  )?.requestOpenDropdown(false);
258
264
  }
265
+
266
+ private get hasSidebarFooter(): boolean {
267
+ if (this.mobile) {
268
+ return (
269
+ !!(this.languages && toJson(this.languages).length > 1) &&
270
+ this.expanded
271
+ );
272
+ }
273
+ return !!(
274
+ (this.languages && toJson(this.languages).length > 1) ||
275
+ Boolean(this.bailHref)
276
+ );
277
+ }
259
278
  }
@@ -67,6 +67,25 @@
67
67
  title="No Results"
68
68
  if:false={anyResultMatch}
69
69
  ></dx-empty-state>
70
+ <div if:true={hasSidebarFooter} class="footer-nav">
71
+ <doc-sidebar-footer-nav
72
+ lang-value-path={langValuePath}
73
+ language={language}
74
+ languages={languages}
75
+ ></doc-sidebar-footer-nav>
76
+ </div>
77
+ </template>
78
+
79
+ <template if:true={hasSidebarFooter}>
80
+ <div class="footer-nav">
81
+ <doc-sidebar-footer-nav
82
+ lang-value-path={langValuePath}
83
+ language={language}
84
+ languages={languages}
85
+ bail-href={bailHref}
86
+ bail-label={bailLabel}
87
+ ></doc-sidebar-footer-nav>
88
+ </div>
70
89
  </template>
71
90
  </div>
72
91
  </template>
@@ -4,12 +4,18 @@ import { api } from "lwc";
4
4
  import { TreeNode } from "typings/custom";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import { SidebarBase } from "dxBaseElements/sidebarBase";
7
+ import type { OptionWithLink } from "typings/custom";
7
8
 
8
9
  const WAIT_TIME = 500;
9
10
  const MOBILE_SIZE_MATCH = "768px";
10
11
 
11
12
  export default class Sidebar extends SidebarBase {
12
13
  @api header: string = "";
14
+ @api langValuePath: string = "id";
15
+ @api languages!: OptionWithLink[];
16
+ @api language!: string;
17
+ @api bailHref!: string;
18
+ @api bailLabel!: string;
13
19
 
14
20
  @api
15
21
  get value() {
@@ -190,4 +196,14 @@ export default class Sidebar extends SidebarBase {
190
196
  node.children.forEach((child) => this.assignValueToLabel(child));
191
197
  }
192
198
  }
199
+
200
+ private get hasSidebarFooter(): boolean {
201
+ if (this.mobile) {
202
+ return !!(this.languages && toJson(this.languages).length > 1);
203
+ }
204
+ return !!(
205
+ (this.languages && toJson(this.languages).length > 1) ||
206
+ Boolean(this.bailHref)
207
+ );
208
+ }
193
209
  }
@@ -11,22 +11,13 @@ a {
11
11
  );
12
12
 
13
13
  position: relative;
14
- display: flex;
15
- align-items: center;
16
- height: var(--dx-g-spacing-xl);
17
- font-family: var(--dx-g-font-display);
18
- white-space: nowrap;
19
- color: var(--dx-g-blue-vibrant-20);
20
- transition: var(--dx-g-transition-hue-1x);
21
- cursor: pointer;
22
- outline-offset: -1px;
14
+ height: calc(var(--dx-g-spacing-3xl) - 4px);
23
15
  }
24
16
 
25
17
  .nav-list-item_default {
26
- border: 0;
27
- border-radius: var(--dx-g-spacing-md);
28
- font-size: var(--dx-g-text-sm);
29
- padding: 0 var(--horizontal-spacing);
18
+ padding: calc(var(--dx-g-spacing-sm) + 2px) var(--dx-g-spacing-md);
19
+ justify-content: center;
20
+ display: flex;
30
21
  }
31
22
 
32
23
  .nav-list-item_small {
@@ -46,8 +37,6 @@ button.nav-list-item_small > dx-icon {
46
37
  margin-left: var(--dx-g-spacing-xs);
47
38
  }
48
39
 
49
- .nav-list-item_default:hover,
50
- .nav-list-item_default:active,
51
40
  :host([aria-expanded="true"]) button.nav-list-item_default {
52
41
  background: var(
53
42
  --dx-g-brand-current-button-color-background-inactive,
@@ -76,11 +65,10 @@ button.nav-list-item:active > dx-icon,
76
65
  }
77
66
 
78
67
  .nav-list-item_default.state-active {
79
- background: var(
80
- --dx-g-brand-current-button-color-background-active,
81
- var(--dx-g-brand-default-button-color-background-active)
82
- );
83
- color: var(--dx-g-brand-current-color, var(--dx-g-brand-default-color));
68
+ color: var(--dx-g-blue-vibrant-50);
69
+ font-family: var(--dx-g-font-sans);
70
+ font-size: var(--dx-g-text-base);
71
+ border-bottom: var(--dx-g-spacing-xs) solid var(--dx-g-blue-vibrant-50);
84
72
  }
85
73
 
86
74
  @media (max-width: 1160px) {
@@ -100,3 +88,10 @@ button.nav-list-item:active > dx-icon,
100
88
  );
101
89
  }
102
90
  }
91
+
92
+ @media (max-width: 768px) {
93
+ .nav-list-item {
94
+ height: var(--dx-g-spacing-3xl);
95
+ display: flex;
96
+ }
97
+ }
@@ -58,7 +58,7 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
58
58
  /* Second row */
59
59
 
60
60
  .header_l2 {
61
- background: var(--dx-g-brand-current-color-background);
61
+ background: white;
62
62
  padding: var(--dx-g-spacing-lg) var(--dx-g-global-header-padding-horizontal);
63
63
  }
64
64
 
@@ -70,6 +70,7 @@ header.state-show-mobile-nav .header_l2_group-nav_overflow {
70
70
 
71
71
  .header_l2_group-title {
72
72
  flex-shrink: 0;
73
+ padding-right: var(--dx-g-spacing-xl);
73
74
  }
74
75
 
75
76
  .header_l2_group-title
@@ -13,7 +13,12 @@
13
13
  --dx-c-sidebar-vertical-padding: var(--dx-g-spacing-md);
14
14
  }
15
15
 
16
- dx-tree:not(:last-child) {
16
+ dx-tree {
17
+ border-top: 1px solid var(--dx-g-gray-90);
18
+ }
19
+
20
+ dx-tree:last-child {
21
+ border-bottom: 1px solid var(--dx-g-gray-90);
17
22
  margin-bottom: var(--dx-g-spacing-sm);
18
23
  }
19
24
 
@@ -53,7 +58,7 @@ dx-tree:not(:last-child) {
53
58
  }
54
59
 
55
60
  .container {
56
- background-color: var(--dx-g-gray-95);
61
+ background-color: white;
57
62
  display: flex;
58
63
  flex-direction: column;
59
64
  height: var(--dx-c-sidebar-height);
@@ -66,10 +71,10 @@ dx-tree:not(:last-child) {
66
71
  var(--dx-c-sidebar-left-padding) - var(--dx-g-spacing-md)
67
72
  );
68
73
 
74
+ border-right: 1px solid var(--dx-g-gray-90);
69
75
  box-shadow: 2px 0 0 0 var(--border-color);
70
76
  min-height: var(--dx-c-sidebar-min-height);
71
- padding: var(--dx-c-sidebar-vertical-padding) 0
72
- var(--dx-c-sidebar-vertical-padding) var(--left-spacing);
77
+ padding: var(--dx-c-sidebar-vertical-padding) 0 var(--dx-g-spacing-2xs) 0;
73
78
  position: relative;
74
79
  }
75
80
 
@@ -127,9 +132,30 @@ dx-tree:not(:last-child) {
127
132
  white-space: nowrap;
128
133
  }
129
134
 
135
+ .footer-nav {
136
+ display: flex;
137
+ padding: 0 var(--dx-g-spacing-sm) 0 var(--dx-g-spacing-2xl);
138
+ position: fixed;
139
+ bottom: 0;
140
+ left: 0;
141
+ width: inherit;
142
+ background: white;
143
+ border-top: 1px solid var(--dx-g-gray-90);
144
+ border-right: 1px solid var(--dx-g-gray-90);
145
+ height: var(--dx-g-spacing-xl);
146
+ }
147
+
130
148
  @media screen and (max-width: 768px) {
131
149
  .padding-horizontal {
132
150
  padding-left: var(--dx-g-spacing-lg);
133
151
  padding-right: var(--dx-g-spacing-md);
134
152
  }
153
+
154
+ .header_l2_group-title .header_lang-dropdown {
155
+ margin-left: auto;
156
+ }
157
+
158
+ .header_lang-dropdown > dx-button {
159
+ padding: var(--dx-g-spacing-2xs) 0;
160
+ }
135
161
  }
@@ -8,14 +8,14 @@
8
8
 
9
9
  .sidebar-item-selected {
10
10
  background: var(--dx-g-cloud-blue-vibrant-95);
11
- box-shadow: inset var(--dx-g-spacing-xs) 0 0 0 var(--dx-g-blue-vibrant-60);
11
+ box-shadow: inset var(--dx-g-spacing-xs) 0 0 0 var(--dx-g-blue-vibrant-40);
12
12
  border-radius: 0;
13
13
  }
14
14
 
15
15
  .sidebar-item {
16
- padding: 6px var(--dx-g-spacing-md);
16
+ padding: 6px var(--dx-g-spacing-xl);
17
17
  }
18
18
 
19
19
  .sidebar-item:not(.sidebar-item-selected):hover {
20
- background-color: var(--dx-g-gray-90);
20
+ color: var(--dx-g-blue-vibrant-50);
21
21
  }
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.