@salesforcedevs/dx-components 1.40.5-topic-alpha.7 → 1.40.5

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 (30) hide show
  1. package/LICENSE +12 -0
  2. package/lwc.config.json +0 -1
  3. package/package.json +3 -2
  4. package/src/modules/dx/button/button.css +4 -40
  5. package/src/modules/dx/checkboxGroup/checkboxGroup.css +0 -5
  6. package/src/modules/dx/dropdown/dropdown.css +16 -27
  7. package/src/modules/dx/dropdown/dropdown.html +1 -1
  8. package/src/modules/dx/dropdown/dropdown.ts +2 -18
  9. package/src/modules/dx/dropdownOption/dropdownOption.css +40 -59
  10. package/src/modules/dx/dropdownOption/dropdownOption.html +6 -23
  11. package/src/modules/dx/dropdownOption/dropdownOption.ts +6 -1
  12. package/src/modules/dx/popover/popover.css +1 -3
  13. package/src/modules/dx/popover/popover.ts +3 -25
  14. package/src/modules/dx/sidebarFooterNav/sidebarFooterNav.css +2 -0
  15. package/src/modules/dx/tabPanelList/tabPanelList.css +14 -0
  16. package/src/modules/dx/tabPanelList/tabPanelList.html +19 -10
  17. package/src/modules/dx/tabPanelList/tabPanelList.ts +4 -24
  18. package/src/modules/dx/tree/treeHandler.ts +10 -77
  19. package/src/modules/dx/treeItem/treeItem.css +0 -36
  20. package/src/modules/dx/treeItem/treeItem.html +2 -16
  21. package/src/modules/dx/treeItem/treeItem.ts +6 -91
  22. package/src/modules/dx/treeTile/treeTile.css +0 -52
  23. package/src/modules/dx/treeTile/treeTile.ts +1 -7
  24. package/src/modules/dx/typeBadge/typeBadge.ts +2 -23
  25. package/src/modules/dxBaseElements/headerBase/headerBase.ts +2 -1
  26. package/src/modules/dxConstants/brands/brands.ts +2 -1
  27. package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +16 -18
  28. package/src/modules/dxHelpers/commonTreeItem/commonTreeItem.css +0 -4
  29. package/src/modules/dxHelpers/typeBadge/typeBadge.css +0 -22
  30. package/src/modules/dxUtils/topicVersion/topicVersion.ts +0 -467
package/LICENSE ADDED
@@ -0,0 +1,12 @@
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.
package/lwc.config.json CHANGED
@@ -140,7 +140,6 @@
140
140
  "dxUtils/lwc",
141
141
  "dxUtils/urlWatcher",
142
142
  "dxUtils/normalizers",
143
- "dxUtils/topicVersion",
144
143
  "dxUtils/queryCoordinator",
145
144
  "dxUtils/recentSearches",
146
145
  "dxUtils/regexps",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.40.5-topic-alpha.7",
3
+ "version": "1.40.5",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -43,5 +43,6 @@
43
43
  "eventsourcemock": "2.0.0",
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
- }
46
+ },
47
+ "gitHead": "645cd46c7db5f9a93eb463205611c10f7f5f166b"
47
48
  }
@@ -20,11 +20,6 @@
20
20
  --dx-c-button-line-height: inherit;
21
21
  --dx-c-button-letter-spacing: inherit;
22
22
  --dx-c-button-display: flex;
23
-
24
- /* Keyboard focus ring (WES): a 2px white band, then a 2px blue outline. */
25
- --dx-c-button-focus-outline: 2px solid var(--dx-g-blue-vibrant-60);
26
- --dx-c-button-focus-offset: 2px;
27
- --dx-c-button-focus-shadow: 0 0 0 2px white;
28
23
  }
29
24
 
30
25
  .button {
@@ -37,8 +32,7 @@
37
32
  user-select: none;
38
33
  white-space: nowrap;
39
34
  font-size: var(--dx-c-button-font-size);
40
- transition: var(--dx-g-transition-hue-1x),
41
- var(--dx-g-transition-box-shadow-1x);
35
+ transition: var(--dx-g-transition-hue-1x);
42
36
  padding: var(--dx-c-button-vertical-spacing, 0)
43
37
  var(--dx-c-button-horizontal-spacing, var(--dx-g-spacing-md));
44
38
  border-radius: var(--dx-g-spacing-xs);
@@ -66,11 +60,7 @@
66
60
  display: inline;
67
61
  vertical-align: var(--dx-c-button-icon-vertical-align, unset);
68
62
 
69
- /* Component hook first; the global stays as the fallback for dark mode. */
70
- --dx-c-icon-color: var(
71
- --dx-c-button-icon-color,
72
- var(--dx-g-button-icon-color, currentcolor)
73
- );
63
+ --dx-c-icon-color: var(--dx-g-button-icon-color, currentcolor);
74
64
  }
75
65
 
76
66
  .button.variant_inline dx-icon,
@@ -96,11 +86,11 @@
96
86
  }
97
87
 
98
88
  .button.icon-right:not(.slot-empty) > *:nth-child(2) {
99
- margin-left: var(--dx-c-button-icon-gap, var(--dx-g-spacing-sm));
89
+ margin-left: var(--dx-g-spacing-sm);
100
90
  }
101
91
 
102
92
  .button.icon-left:not(.slot-empty) > *:nth-child(2) {
103
- margin-right: var(--dx-c-button-icon-gap, var(--dx-g-spacing-sm));
93
+ margin-right: var(--dx-g-spacing-sm);
104
94
  }
105
95
 
106
96
  .button.style-icon.slot-empty {
@@ -201,7 +191,6 @@
201
191
  }
202
192
 
203
193
  .button.variant_primary:hover,
204
- .button.variant_primary:focus-visible,
205
194
  :host([aria-expanded="true"]) .button.variant_primary {
206
195
  background: var(--dx-c-button-primary-color-hover);
207
196
  border-color: var(--dx-c-button-primary-color-hover);
@@ -226,8 +215,6 @@
226
215
 
227
216
  .button.variant_secondary:hover,
228
217
  .button.variant_quaternary:hover,
229
- .button.variant_secondary:focus-visible,
230
- .button.variant_quaternary:focus-visible,
231
218
  :host([aria-expanded="true"]) .button.variant_secondary,
232
219
  :host([aria-expanded="true"]) .button.variant_quaternary {
233
220
  background: var(--dx-c-button-secondary-color-hover);
@@ -247,7 +234,6 @@
247
234
  }
248
235
 
249
236
  .button.variant_tertiary:hover,
250
- .button.variant_tertiary:focus-visible,
251
237
  :host([aria-expanded="true"]) .button.variant_tertiary {
252
238
  background: var(--dx-c-button-secondary-color-hover);
253
239
  border-color: var(--dx-c-button-secondary-color-hover);
@@ -264,8 +250,6 @@
264
250
 
265
251
  .button.variant_inline:hover,
266
252
  .button.variant_inline-inherit:hover,
267
- .button.variant_inline:focus-visible,
268
- .button.variant_inline-inherit:focus-visible,
269
253
  :host([aria-expanded="true"])
270
254
  :is(.button.variant_inline, .button.variant_inline-inherit) {
271
255
  color: var(--dx-c-button-inline-color-hover);
@@ -293,30 +277,10 @@
293
277
  }
294
278
 
295
279
  .button.variant_custom:hover,
296
- .button.variant_custom:focus-visible,
297
280
  .button.variant_icon-only:hover,
298
- .button.variant_icon-only:focus-visible,
299
281
  :host([aria-expanded="true"]) .button.variant_custom,
300
282
  :host([aria-expanded="true"]) .button.variant_icon-only {
301
283
  color: var(--dx-c-button-custom-color-hover);
302
284
  background: var(--dx-c-button-custom-background-hover);
303
285
  border-color: var(--dx-c-button-custom-border-hover);
304
-
305
- /* An inset shadow can thicken the edge without resizing the button. */
306
- box-shadow: var(--dx-c-button-custom-border-shadow-hover, none);
307
- }
308
-
309
- /* Keyboard focus only; an open menu alone shows no ring. Keep last so it wins
310
- over hover and the open state (:host lifts it above the custom and icon-only
311
- hover rules). The outline survives Windows high-contrast mode; the white band
312
- does not. */
313
- :host .button:focus-visible,
314
- :host .button:focus-visible:hover,
315
- :host([aria-expanded="true"]) .button:focus-visible {
316
- outline: var(--dx-c-button-focus-outline);
317
- outline-offset: var(--dx-c-button-focus-offset);
318
- box-shadow: var(--dx-c-button-focus-shadow);
319
-
320
- /* The ring appears at once instead of fading in. */
321
- transition: var(--dx-g-transition-hue-1x);
322
286
  }
@@ -1,11 +1,6 @@
1
1
  @import "dxHelpers/reset";
2
2
 
3
3
  fieldset {
4
- /* No browser fieldset padding, border, or margin; the container sets the spacing. */
5
- margin: 0;
6
- padding: 0;
7
- border: 0;
8
- min-width: 0;
9
4
  display: grid;
10
5
  grid-template-rows: auto;
11
6
  grid-gap: 20px;
@@ -1,14 +1,5 @@
1
1
  @import "dxHelpers/reset";
2
2
 
3
- /* Options run edge to edge; the menu adds space above the first and below
4
- the last. */
5
- dx-popover {
6
- --dx-c-popover-padding: var(
7
- --dx-c-dropdown-padding,
8
- var(--dx-g-spacing-sm) 0
9
- );
10
- }
11
-
12
3
  .menu-nested:not(.menu-fit-content)::part(content) {
13
4
  padding-top: var(--dx-g-spacing-sm);
14
5
  width: 354px;
@@ -23,22 +14,12 @@ dx-popover {
23
14
  display: none;
24
15
  }
25
16
 
26
- /* fit-content and fit-end: the menu is as wide as its longest label. */
27
17
  .menu-fit-content {
28
18
  --dx-c-popover-width: max-content;
19
+ --dx-c-popover-padding: var(--dx-g-spacing-sm) 0;
29
20
  }
30
21
 
31
- /* fit-end also stops at --dx-c-dropdown-menu-max-width. Labels wrap only once
32
- the menu reaches that width. */
33
- .menu-fit-end::part(content) {
34
- box-sizing: border-box;
35
- max-width: var(
36
- --dx-c-dropdown-menu-max-width,
37
- calc(100vw - var(--dx-g-spacing-lg))
38
- );
39
- }
40
-
41
- .menu-fit-content.menu-nested .menu_list {
22
+ .menu-fit-content .menu_list {
42
23
  width: 100%;
43
24
  align-items: flex-start;
44
25
  gap: var(--dx-g-spacing-sm);
@@ -50,6 +31,15 @@ dx-popover {
50
31
  padding-top: var(--dx-g-spacing-sm);
51
32
  }
52
33
 
34
+ .menu-fit-content .menu_heading {
35
+ margin: 0;
36
+ padding: var(--dx-g-spacing-smd) var(--dx-g-spacing-lg);
37
+ font-family: var(--dx-g-font-sans);
38
+ line-height: var(--dx-g-spacing-mlg);
39
+ text-transform: none;
40
+ color: var(--dx-g-gray-10);
41
+ }
42
+
53
43
  @media screen and (max-width: 1000px) {
54
44
  .menu-nested .menu_option:not(:first-child) {
55
45
  border-top: var(--border);
@@ -101,13 +91,12 @@ dx-popover {
101
91
 
102
92
  .menu_heading {
103
93
  display: block;
104
- margin: 0;
105
- padding: var(--dx-g-spacing-smd) var(--dx-g-spacing-lg);
106
- color: var(--dx-g-gray-10);
107
- font-family: var(--dx-g-font-sans);
94
+ color: var(--dx-g-blue-vibrant-20);
95
+ font-family: var(--dx-g-font-display);
108
96
  font-size: var(--dx-g-text-sm);
109
97
  font-weight: bold;
110
- line-height: var(--dx-g-spacing-mlg);
98
+ text-transform: uppercase;
99
+ margin: var(--dx-g-spacing-sm);
111
100
  }
112
101
 
113
102
  .callout_link {
@@ -116,7 +105,7 @@ dx-popover {
116
105
  display: block;
117
106
  padding-top: var(--dx-g-spacing-xl);
118
107
  margin-top: auto;
119
- margin-left: var(--dx-g-spacing-lg);
108
+ margin-left: var(--dx-g-spacing-sm);
120
109
  }
121
110
 
122
111
  .empty {
@@ -9,7 +9,7 @@
9
9
  open-on-hover={openOnHover}
10
10
  open={open}
11
11
  page-padding={pagePadding}
12
- placement={effectivePlacement}
12
+ placement={placement}
13
13
  small={small}
14
14
  width={effectiveWidth}
15
15
  >
@@ -82,35 +82,20 @@ export default class Dropdown extends LightningElement {
82
82
  return this.areOptionsEmpty ? null : "menu";
83
83
  }
84
84
 
85
- // "fit-end" is fit-content, aligned to the trigger's end edge.
86
- // "full" matches the trigger width. "fixed" and "fit-content" are unchanged.
87
85
  private get isFitContent() {
88
- return this.widthMode === "fit-content" || this.widthMode === "fit-end";
86
+ return this.widthMode === "fit-content";
89
87
  }
90
88
 
91
- private get effectivePlacement(): PopperPlacement | undefined {
92
- return this.widthMode === "fit-end" ? "bottom-end" : this.placement;
93
- }
94
-
95
- // fit-content takes precedence; the misuse is surfaced in className() below.
96
89
  private get effectiveWidth() {
97
90
  return this.isFitContent ? null : this.width;
98
91
  }
99
92
 
100
93
  private get effectiveFullWidth() {
101
- if (this.widthMode === "full") {
102
- return true;
103
- }
104
94
  return this.isFitContent ? false : this.fullWidth;
105
95
  }
106
96
 
107
97
  private get className() {
108
98
  const fitContent = this.isFitContent;
109
- if (fitContent && (this.width || this.fullWidth)) {
110
- console.error(
111
- 'The "width-mode=fit-content" and "width"/"full-width" properties cannot be provided simultaneously. "width-mode=fit-content" is prioritized; "width"/"full-width" are ignored.'
112
- );
113
- }
114
99
  return cx(
115
100
  this.isNested && "menu-nested",
116
101
  this.isNested &&
@@ -119,8 +104,7 @@ export default class Dropdown extends LightningElement {
119
104
  "menu-nested-2-col",
120
105
  this.offset && `menu-offset-${this.offset}`,
121
106
  this.areOptionsEmpty && "menu-hidden",
122
- fitContent && "menu-fit-content",
123
- this.widthMode === "fit-end" && "menu-fit-end"
107
+ fitContent && "menu-fit-content"
124
108
  );
125
109
  }
126
110
 
@@ -12,16 +12,11 @@
12
12
  width: var(--shape-width);
13
13
  }
14
14
 
15
- /* The vertical stroke of the "L" runs up to the top edge of the option: the
16
- top padding plus the space above the shape inside the line box. */
17
15
  .indented-shape::after {
18
16
  background-color: var(--background);
19
17
  bottom: 0;
20
18
  content: "";
21
- height: calc(
22
- var(--dx-g-spacing-sm) +
23
- (var(--dx-g-spacing-lg) + var(--wide) - var(--dx-g-spacing-xs)) / 2
24
- );
19
+ height: 15px;
25
20
  position: absolute;
26
21
  width: var(--wide);
27
22
  }
@@ -30,12 +25,8 @@
30
25
  display: flex;
31
26
  font-family: var(--dx-g-font-sans);
32
27
  width: 100%;
33
- padding: var(
34
- --dx-c-dropdown-option-padding,
35
- var(--dx-g-spacing-sm) var(--dx-g-spacing-lg)
36
- );
28
+ padding: var(--dx-g-spacing-sm);
37
29
  font-size: var(--dx-g-text-sm);
38
- border-radius: var(--dx-c-dropdown-option-border-radius, 0);
39
30
  transition: var(--dx-g-transition-hue-1x);
40
31
  align-items: center;
41
32
  outline: none !important;
@@ -56,6 +47,8 @@
56
47
  }
57
48
 
58
49
  .option-active {
50
+ --dx-c-dropdown-option-label-color: var(--dx-g-blue-vibrant-50);
51
+
59
52
  background: var(--dx-g-cloud-blue-vibrant-95);
60
53
  }
61
54
 
@@ -63,10 +56,6 @@
63
56
  display: flex;
64
57
  flex-direction: column;
65
58
  justify-content: center;
66
- align-items: flex-start;
67
- gap: var(--dx-g-spacing-sm);
68
- flex: 1;
69
- min-width: 0;
70
59
  font-family: var(--dx-g-font-sans);
71
60
  font-size: var(--dx-g-text-sm);
72
61
  text-align: left;
@@ -75,30 +64,14 @@
75
64
  .option-indented .option_details {
76
65
  align-items: center;
77
66
  flex-direction: row;
78
- justify-content: flex-start;
79
- gap: 0;
80
67
  }
81
68
 
82
69
  .option_label {
83
- color: var(--dx-c-dropdown-option-label-color, var(--dx-g-text-body-color));
84
-
85
- /* Opt-in: set to block so text-overflow:ellipsis applies (ignored on flex). */
86
- display: var(--dx-c-dropdown-option-label-display, flex);
70
+ color: var(--dx-c-dropdown-option-label-color, var(--dx-g-blue-vibrant-50));
71
+ display: flex;
87
72
  align-items: center;
88
- font-weight: var(
89
- --dx-c-dropdown-option-font-weight,
90
- var(--dx-g-font-normal)
91
- );
73
+ font-weight: var(--dx-c-dropdown-option-font-weight, var(--dx-g-font-bold));
92
74
  font-size: var(--dx-c-dropdown-option-font-size, var(--dx-g-text-base));
93
- line-height: var(--dx-g-spacing-lg);
94
-
95
- /* Opt-in truncation: consumers set --dx-c-dropdown-option-white-space:
96
- nowrap to truncate labels with an ellipsis instead of wrapping.
97
- Defaults preserve today's wrapping behavior. */
98
- white-space: var(--dx-c-dropdown-option-white-space, normal);
99
- overflow: var(--dx-c-dropdown-option-overflow, visible);
100
- overflow-wrap: var(--dx-c-dropdown-option-overflow-wrap, normal);
101
- text-overflow: var(--dx-c-dropdown-option-text-overflow, clip);
102
75
  }
103
76
 
104
77
  .option-indented .option_label {
@@ -115,57 +88,65 @@
115
88
 
116
89
  .option_description {
117
90
  color: var(--dx-g-gray-30);
91
+ margin-top: var(--dx-g-spacing-xs);
118
92
  line-height: 18px;
119
93
  }
120
94
 
121
- /* An option can have a start icon (iconSymbol), an end icon (endIconSymbol),
122
- or both. */
123
95
  .option_icon {
124
- --dx-c-icon-size: var(--dx-g-icon-size-md);
125
- --dx-c-icon-color: var(--dx-g-gray-50);
126
-
96
+ margin-right: var(--dx-g-spacing-md);
127
97
  flex-shrink: 0;
128
98
  }
129
99
 
130
- .option_icon-start {
131
- margin-right: var(--dx-g-spacing-md);
100
+ .option-indented {
101
+ padding-top: var(--dx-g-spacing-xs);
102
+ padding-bottom: var(--dx-g-spacing-xs);
132
103
  }
133
104
 
134
- .option_icon-end {
135
- margin-left: var(--dx-g-spacing-2xl);
105
+ .option-fit-content {
106
+ min-width: 0;
107
+ padding: var(--dx-g-spacing-sm) var(--dx-g-spacing-lg);
136
108
  }
137
109
 
138
- /* Indented (breadcrumb hierarchy) menus keep their own selected label color. */
139
- .option-indented.option-active {
140
- --dx-c-dropdown-option-label-color: var(--dx-g-blue-vibrant-50);
110
+ .option-fit-content .option_details {
111
+ align-items: flex-start;
112
+ gap: var(--dx-g-spacing-sm);
113
+ min-width: 0;
114
+ flex: 1;
141
115
  }
142
116
 
143
- /* fit-content (toolbar): one line per label, truncated with an ellipsis. */
144
- .option-fit-content {
145
- min-width: 0;
117
+ .option-fit-content .option_description {
118
+ margin-top: 0;
146
119
  }
147
120
 
148
121
  .option-fit-content .option_label {
149
122
  display: block;
123
+ color: var(--dx-g-gray-10);
124
+ font-weight: var(--dx-g-font-normal);
125
+ line-height: var(--dx-g-spacing-lg);
150
126
  white-space: nowrap;
151
127
  overflow: hidden;
152
128
  text-overflow: ellipsis;
153
129
  max-width: calc(100vw - var(--dx-g-spacing-lg) * 4);
154
130
  }
155
131
 
156
- /* Each "L" starts xs past the first letter of the label above it. A label
157
- sits one shape plus its sm margin after its own "L", so each level steps in
158
- by that much plus xs. */
132
+ .option-fit-content.option-active .option_label {
133
+ color: var(--dx-g-blue-vibrant-50);
134
+ }
135
+
136
+ .option-fit-content .option_icon {
137
+ --dx-c-icon-size: var(--dx-g-icon-size-md);
138
+ --dx-c-icon-color: var(--dx-g-gray-50);
139
+
140
+ order: 1;
141
+ margin-right: 0;
142
+ margin-left: var(--dx-g-spacing-2xl);
143
+ }
144
+
159
145
  .option-indented:not([data-index="0"]) {
160
- --base-indentation: calc(
161
- var(--shape-width) + var(--dx-g-spacing-sm) + var(--dx-g-spacing-xs)
162
- );
146
+ --base-indentation: calc(var(--dx-g-spacing-md) + var(--shape-width));
163
147
  --shape-width: 8px;
164
148
 
165
- padding-left: calc(
166
- var(--indentation, 0px) + var(--dx-g-spacing-lg) +
167
- var(--dx-g-spacing-xs)
168
- );
149
+ padding-left: calc(var(--indentation, 0px) + var(--dx-g-spacing-md));
169
150
  }
170
151
 
171
152
  [data-index="2"] {
@@ -11,12 +11,11 @@
11
11
  onclick={onClick}
12
12
  >
13
13
  <dx-icon
14
- class="option_icon option_icon-start"
14
+ class="option_icon"
15
15
  symbol={option.iconSymbol}
16
16
  sprite={option.iconSprite}
17
- color={option.iconColor}
18
- lwc:if={option.iconSymbol}
19
- size="override"
17
+ if:true={option.iconSymbol}
18
+ size={optionIconSize}
20
19
  ></dx-icon>
21
20
  <div class="option_details">
22
21
  <div if:true={renderIndentedShape} class="indented-shape"></div>
@@ -31,14 +30,6 @@
31
30
  {option.description}
32
31
  </div>
33
32
  </div>
34
- <dx-icon
35
- class="option_icon option_icon-end"
36
- symbol={option.endIconSymbol}
37
- sprite={option.endIconSprite}
38
- color={option.endIconColor}
39
- lwc:if={option.endIconSymbol}
40
- size="override"
41
- ></dx-icon>
42
33
  </a>
43
34
  <button
44
35
  if:false={option.link}
@@ -49,12 +40,12 @@
49
40
  onclick={onClick}
50
41
  >
51
42
  <dx-icon
52
- class="option_icon option_icon-start"
43
+ class="option_icon"
53
44
  symbol={option.iconSymbol}
54
45
  sprite={option.iconSprite}
55
46
  color={option.iconColor}
56
- lwc:if={option.iconSymbol}
57
- size="override"
47
+ if:true={option.iconSymbol}
48
+ size={optionIconSize}
58
49
  ></dx-icon>
59
50
  <div class="option_details">
60
51
  <div if:true={renderIndentedShape} class="indented-shape"></div>
@@ -63,13 +54,5 @@
63
54
  {option.description}
64
55
  </div>
65
56
  </div>
66
- <dx-icon
67
- class="option_icon option_icon-end"
68
- symbol={option.endIconSymbol}
69
- sprite={option.endIconSprite}
70
- color={option.endIconColor}
71
- lwc:if={option.endIconSymbol}
72
- size="override"
73
- ></dx-icon>
74
57
  </button>
75
58
  </template>
@@ -4,7 +4,8 @@ import {
4
4
  OptionWithNested,
5
5
  AnalyticsPayload,
6
6
  DropdownVariant,
7
- DropdownWidthMode
7
+ DropdownWidthMode,
8
+ IconSize
8
9
  } from "typings/custom";
9
10
  import { track } from "dxUtils/analytics";
10
11
 
@@ -40,6 +41,10 @@ export default class DropdownOption extends LightningElement {
40
41
  return this.variant === "indented" && this.indexPosition >= 1;
41
42
  }
42
43
 
44
+ private get optionIconSize(): IconSize {
45
+ return this.widthMode === "fit-content" ? "override" : "large";
46
+ }
47
+
43
48
  private onClick(e: PointerEvent) {
44
49
  this.dispatchEvent(
45
50
  new CustomEvent("select", { detail: this.keyValue })
@@ -29,6 +29,7 @@
29
29
  padding: var(--popover-padding);
30
30
  overflow-y: auto;
31
31
  transition: var(--popover-transition);
32
+ transition-delay: 0.02s;
32
33
  transform: translateY(var(--dx-g-spacing-xs));
33
34
  opacity: 0;
34
35
  }
@@ -39,9 +40,6 @@
39
40
  }
40
41
 
41
42
  .popover-container_open .popover {
42
- /* Delay only on open. A closing delay keeps the menu visible for a frame
43
- after its container hides, while it moves (a flash above the trigger). */
44
- transition-delay: 0.02s;
45
43
  opacity: 1;
46
44
  transform: var(--popover-container-open-transform);
47
45
  }
@@ -106,11 +106,7 @@ export default class Popover extends LightningElement {
106
106
  if (this.control) {
107
107
  this.control.setAttribute("aria-expanded", "false");
108
108
  }
109
- document.removeEventListener(
110
- "click",
111
- this.interactOutsideListener,
112
- true
113
- );
109
+ document.removeEventListener("click", this.interactOutsideListener);
114
110
  document.removeEventListener("focusout", this.interactOutsideListener);
115
111
  if (this.openOnHover) {
116
112
  document.removeEventListener(
@@ -136,11 +132,7 @@ export default class Popover extends LightningElement {
136
132
  // LIFECYCLE METHODS
137
133
 
138
134
  disconnectedCallback() {
139
- document.removeEventListener(
140
- "click",
141
- this.interactOutsideListener,
142
- true
143
- );
135
+ document.removeEventListener("click", this.interactOutsideListener);
144
136
  document.removeEventListener("mousemove", this.interactOutsideListener);
145
137
  document.removeEventListener("focusout", this.interactOutsideListener);
146
138
  this.removeControlListeners();
@@ -240,16 +232,6 @@ export default class Popover extends LightningElement {
240
232
  this.dispatchEvent(new CustomEvent("controlarrowdown"));
241
233
  break;
242
234
  }
243
- // A mouse-opened menu leaves focus on the control, so Escape lands
244
- // here, not in the popover's own key handler.
245
- case "Esc":
246
- case "Escape": {
247
- if (this.open) {
248
- this.dispatchRequestCloseEvent("keypress-escape");
249
- this.closePopover(true);
250
- }
251
- break;
252
- }
253
235
  default:
254
236
  }
255
237
  };
@@ -313,11 +295,7 @@ export default class Popover extends LightningElement {
313
295
  }
314
296
 
315
297
  private attachListenersTopopover() {
316
- // Capture so a click still counts as outside when a descendant
317
- // calls stopPropagation (topic version pickers do, so the tree row
318
- // does not navigate). Without this, opening a second picker leaves
319
- // the first menu open.
320
- document.addEventListener("click", this.interactOutsideListener, true);
298
+ document.addEventListener("click", this.interactOutsideListener);
321
299
  document.addEventListener("focusout", this.interactOutsideListener);
322
300
  if (this.openOnHover) {
323
301
  document.addEventListener(
@@ -5,6 +5,8 @@
5
5
  --button-primary-color-hover: var(--dx-g-cloud-blue-vibrant-95);
6
6
  --popover-container-open-transform: translateX(-4px) translateY(-8px);
7
7
  --popover-transition: none;
8
+ --dx-c-dropdown-option-font-weight: normal;
9
+ --dx-c-dropdown-option-label-color: var(--dx-g-gray-10);
8
10
  }
9
11
 
10
12
  .footer-item {
@@ -12,6 +12,20 @@
12
12
  border-bottom: 1px solid var(--dx-g-gray-80);
13
13
  }
14
14
 
15
+ dx-popover {
16
+ --popover-padding: none;
17
+ }
18
+
19
+ .dropdown-item {
20
+ padding: var(--dx-g-spacing-sm);
21
+ }
22
+
23
+ .dropdown-item:hover {
24
+ cursor: pointer;
25
+ font-weight: var(--dx-g-font-bold);
26
+ background-color: var(--dx-g-blue-vibrant-95);
27
+ }
28
+
15
29
  .more-btn {
16
30
  display: flex;
17
31
  align-items: center;