@salesforcedevs/dx-components 1.3.335 → 1.3.337

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.335",
3
+ "version": "1.3.337",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -46,5 +46,5 @@
46
46
  "volta": {
47
47
  "node": "18.18.0"
48
48
  },
49
- "gitHead": "2862c96ace8525a40000901f23ef6ede22b269e9"
49
+ "gitHead": "604c4f8536df2795687fa98f1eb2cd0c81bc4edc"
50
50
  }
@@ -95,11 +95,6 @@ dx-button {
95
95
  color: var(--dx-g-blue-vibrant-50);
96
96
  }
97
97
 
98
- .dismissible-icon {
99
- margin-left: auto;
100
- cursor: pointer;
101
- }
102
-
103
98
  /* Small Devices */
104
99
  @media screen and (max-width: 480px) {
105
100
  .alert-container {
@@ -10,21 +10,22 @@
10
10
  ></dx-icon>
11
11
  <p class="alert-title dx-text-body-3">{alertTitle}</p>
12
12
  <dx-button
13
- if:true={hideable}
13
+ lwc:if={hideable}
14
14
  variant="inline"
15
15
  onclick={onShowHide}
16
16
  aria-label={hideBodyText}
17
17
  >
18
18
  {hideBodyText}
19
19
  </dx-button>
20
- <dx-icon
21
- class="dismissible-icon"
20
+ <dx-button
21
+ lwc:if={dismissible}
22
+ aria-label="Dismiss"
23
+ icon-color="status-icon-color"
24
+ icon-size="large"
25
+ icon-symbol="close"
22
26
  onclick={onDismiss}
23
- if:true={dismissible}
24
- symbol="close"
25
- size="large"
26
- color="status-icon-color"
27
- ></dx-icon>
27
+ variant="icon-only"
28
+ ></dx-button>
28
29
  </div>
29
30
  <!--
30
31
  NOTE: Here we are rendering mark up using lwc:dom & innerHTML
@@ -54,7 +54,8 @@
54
54
  }
55
55
 
56
56
  .button.variant_inline dx-icon,
57
- .button.variant_inline-inherit dx-icon {
57
+ .button.variant_inline-inherit dx-icon,
58
+ .button.variant_icon-only dx-icon {
58
59
  display: inline-block;
59
60
  }
60
61
 
@@ -196,16 +197,26 @@
196
197
  pointer-events: none;
197
198
  }
198
199
 
199
- /* custom */
200
+ /* custom and icon-only */
201
+ .button.variant_icon-only {
202
+ padding: 0;
203
+ height: unset;
204
+ width: unset;
205
+ }
206
+
200
207
  .button.variant_custom,
201
- .button.variant_custom:hover.state-disabled {
208
+ .button.variant_icon-only,
209
+ .button.variant_custom:hover.state-disabled,
210
+ .button.variant_icon-only:hover.state-disabled {
202
211
  color: var(--dx-c-button-custom-color);
203
212
  background: var(--dx-c-button-custom-background);
204
213
  border: 1px solid var(--dx-c-button-custom-border);
205
214
  }
206
215
 
207
216
  .button.variant_custom:hover,
208
- :host([aria-expanded="true"]) .button.variant_custom {
217
+ .button.variant_icon-only:hover,
218
+ :host([aria-expanded="true"]) .button.variant_custom,
219
+ :host([aria-expanded="true"]) .button.variant_icon-only {
209
220
  color: var(--dx-c-button-custom-color-hover);
210
221
  background: var(--dx-c-button-custom-background-hover);
211
222
  border-color: var(--dx-c-button-custom-border-hover);
@@ -12,6 +12,7 @@
12
12
  </span>
13
13
  <dx-icon
14
14
  if:true={showIcon}
15
+ color={iconColor}
15
16
  sprite={iconSprite}
16
17
  size={iconSize}
17
18
  symbol={iconSymbol}
@@ -34,6 +35,7 @@
34
35
  </span>
35
36
  <dx-icon
36
37
  if:true={showIcon}
38
+ color={iconColor}
37
39
  sprite={iconSprite}
38
40
  size={iconSize}
39
41
  symbol={iconSymbol}
@@ -7,14 +7,14 @@ import {
7
7
  ButtonSize,
8
8
  IconSprite,
9
9
  IconSize,
10
- IconSymbol,
11
- LightningSlotElement
10
+ IconSymbol
12
11
  } from "typings/custom";
13
12
 
14
13
  export default class Button extends LightningElement {
15
14
  private _didSetFormAttribute = false;
16
15
  @api ariaLabel: string = "";
17
16
  @api disabled: boolean | null = null;
17
+ @api iconColor?: string;
18
18
  @api iconSize?: IconSize = "small";
19
19
  @api iconSprite?: IconSprite = "utility";
20
20
  @api iconSymbol?: IconSymbol;
@@ -51,17 +51,22 @@ export default class Button extends LightningElement {
51
51
  }
52
52
 
53
53
  private get className(): string {
54
+ const isIconOnly = this.variant === "icon-only";
55
+ const iconPositionClassName = `icon-${this.iconPosition || "left"}`;
56
+ const inlineTextColorClassName = `${this.inlineTextColor}-text`;
54
57
  return cx(
55
58
  "button",
56
- this.variant === "inline" && `${this.inlineTextColor}-text`,
57
- this.disabled && "state-disabled",
58
- `variant_${this.variant}`,
59
- this.loading && "state-loading",
60
- `size-${this.size}`,
61
- !!this.iconSymbol && "style-icon",
62
- this.isSlotEmpty && !this.loading && "slot-empty",
63
59
  `font-${this.font}`,
64
- this.iconPosition === "right" ? "icon-right" : "icon-left"
60
+ `size-${this.size}`,
61
+ `variant_${this.variant}`,
62
+ {
63
+ "slot-empty": !isIconOnly && !this.loading && this.isSlotEmpty,
64
+ "state-disabled": this.disabled,
65
+ "state-loading": this.loading,
66
+ "style-icon": !!this.iconSymbol,
67
+ [iconPositionClassName]: !isIconOnly,
68
+ [inlineTextColorClassName]: this.variant === "inline"
69
+ }
65
70
  );
66
71
  }
67
72
 
@@ -78,8 +83,8 @@ export default class Button extends LightningElement {
78
83
  }
79
84
  }
80
85
 
81
- private onSlotChange(e: LightningSlotElement) {
82
- const slot = e.target;
86
+ private onSlotChange(e: Event) {
87
+ const slot = e.target as HTMLSlotElement;
83
88
  this.isSlotEmpty = slot.assignedNodes().length === 0;
84
89
  }
85
90
  }
@@ -210,6 +210,7 @@ footer.signup-variant-no-signup {
210
210
 
211
211
  .terms a {
212
212
  color: var(--dx-g-blue-vibrant-70);
213
+ text-decoration: underline;
213
214
  }
214
215
 
215
216
  .terms > span,