@salesforcedevs/dx-components 1.40.0-docs-feedback-3 → 1.40.0-tlv-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.40.0-docs-feedback-3",
3
+ "version": "1.40.0-tlv-alpha",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -43,6 +43,5 @@
43
43
  "eventsourcemock": "2.0.0",
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
- },
47
- "stableVersion": "1.40.0"
46
+ }
48
47
  }
@@ -86,11 +86,11 @@
86
86
  }
87
87
 
88
88
  .button.icon-right:not(.slot-empty) > *:nth-child(2) {
89
- margin-left: var(--dx-g-spacing-sm);
89
+ margin-left: var(--dx-c-button-icon-gap, var(--dx-g-spacing-sm));
90
90
  }
91
91
 
92
92
  .button.icon-left:not(.slot-empty) > *:nth-child(2) {
93
- margin-right: var(--dx-g-spacing-sm);
93
+ margin-right: var(--dx-c-button-icon-gap, var(--dx-g-spacing-sm));
94
94
  }
95
95
 
96
96
  .button.style-icon.slot-empty {
@@ -25,9 +25,14 @@
25
25
  display: flex;
26
26
  font-family: var(--dx-g-font-sans);
27
27
  width: 100%;
28
- padding: var(--dx-g-spacing-sm);
28
+
29
+ /* Opt-in hooks; defaults preserve today's look. */
30
+ padding: var(--dx-c-dropdown-option-padding, var(--dx-g-spacing-sm));
29
31
  font-size: var(--dx-g-text-sm);
30
- border-radius: var(--dx-g-spacing-xs);
32
+ border-radius: var(
33
+ --dx-c-dropdown-option-border-radius,
34
+ var(--dx-g-spacing-xs)
35
+ );
31
36
  transition: var(--dx-g-transition-hue-1x);
32
37
  align-items: center;
33
38
  outline: none !important;
@@ -71,6 +76,13 @@
71
76
  align-items: center;
72
77
  font-weight: var(--dx-c-dropdown-option-font-weight, var(--dx-g-font-bold));
73
78
  font-size: var(--dx-c-dropdown-option-font-size, var(--dx-g-text-base));
79
+
80
+ /* Opt-in truncation: consumers set --dx-c-dropdown-option-white-space:
81
+ nowrap to truncate labels with an ellipsis instead of wrapping.
82
+ Defaults preserve today's wrapping behavior. */
83
+ white-space: var(--dx-c-dropdown-option-white-space, normal);
84
+ overflow: var(--dx-c-dropdown-option-overflow, visible);
85
+ text-overflow: var(--dx-c-dropdown-option-text-overflow, clip);
74
86
  }
75
87
 
76
88
  .option-indented .option_label {
@@ -65,8 +65,7 @@ export class TreeHandler {
65
65
  isChildrenLoading: node.isChildrenLoading || false,
66
66
  link: node.link,
67
67
  method: node.method,
68
- showForwardArrow: node.showForwardArrow,
69
- redirectToChild: node.redirectToChild
68
+ showForwardArrow: node.showForwardArrow
70
69
  };
71
70
 
72
71
  const mapItem = { node: convertedNode, parent };
@@ -49,10 +49,6 @@ export default class TreeItem extends LightningElement {
49
49
  return this.hasChildren || this.isChildrenLoading;
50
50
  }
51
51
 
52
- private get isContentlessParent(): boolean {
53
- return this.isParent && !!this._treeNode?.redirectToChild;
54
- }
55
-
56
52
  private get showChildren(): boolean {
57
53
  return this.isExpanded && this.hasChildren;
58
54
  }
@@ -144,18 +140,6 @@ export default class TreeItem extends LightningElement {
144
140
  private onLinkClick(event: Event): void {
145
141
  this.preventDefaultLinkBehavior(event);
146
142
 
147
- /**
148
- * A content-less parent is redirected to its first content child, so it
149
- * navigates like a normal link. Navigation handles selection and
150
- * ancestor expansion, avoiding flicker caused by manual toggling.
151
- */
152
- if (this.isContentlessParent) {
153
- if (this._treeNode.link?.href) {
154
- this.sendGtm(event);
155
- return;
156
- }
157
- }
158
-
159
143
  if (this.isParent) {
160
144
  const isSelectAction = true;
161
145
  this.doExpand(isSelectAction);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a href={href} class={tileClass} target={target} aria-label={linkAriaLabel}>
2
+ <a href={href} class={tileClass} target={target}>
3
3
  <div class="flex indentation" role="heading" aria-level={tileAriaLevel}>
4
4
  <div class="flex tile-expand-icon tile-icon" if:true={showArrow}>
5
5
  <dx-icon
@@ -37,28 +37,6 @@ export default class TreeTile extends LightningElement {
37
37
  return this.treeNode.level + 2;
38
38
  }
39
39
 
40
- /**
41
- * Accessible name for the link. If a parent redirects to its first child,
42
- * include both the parent and child labels so the destination is clear to
43
- * screen reader users (WCAG 2.4.4)
44
- */
45
- get linkAriaLabel(): string | null {
46
- if (!this.treeNode.redirectToChild || !this.treeNode.link?.href) {
47
- return null;
48
- }
49
- /**
50
- * TThe redirect can target a deep descendant, so walk the first-child
51
- * chain to the node that owns the destination link and name it.
52
- */
53
- let destination = this.treeNode.children?.[0];
54
- while (destination?.redirectToChild) {
55
- destination = destination.children?.[0];
56
- }
57
- return destination?.link?.href === this.treeNode.link.href
58
- ? `${this.treeNode.label}, opens ${destination.label}`
59
- : null;
60
- }
61
-
62
40
  private get iconSize() {
63
41
  return "xsmall";
64
42
  }