@salesforcedevs/dx-components 1.3.160 → 1.3.162

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.160",
3
+ "version": "1.3.162",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -41,5 +41,5 @@
41
41
  "eventsourcemock": "^2.0.0",
42
42
  "luxon": "^3.1.0"
43
43
  },
44
- "gitHead": "cba7e68142d03e2a299dfb8354a50732b20ad77c"
44
+ "gitHead": "45d6002680edaf34e755c2d9a509fc2fba9ca97e"
45
45
  }
@@ -2,6 +2,7 @@ import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import {
4
4
  ButtonTextColor,
5
+ ButtonTarget,
5
6
  ButtonVariant,
6
7
  ButtonSize,
7
8
  IconSprite,
@@ -31,7 +32,7 @@ export default class Button extends LightningElement {
31
32
  // link props
32
33
  @api href: string | null = null;
33
34
  @api download: string | null = null;
34
- @api target: "_self" | "_blank" | "_parent" | "_top" | null = null;
35
+ @api target: ButtonTarget = null;
35
36
  @api rel: string | null = null;
36
37
 
37
38
  @api focus() {
@@ -13,6 +13,7 @@
13
13
  symbol="play"
14
14
  background-color="white"
15
15
  slot="image-badge"
16
+ alt="Play episode"
16
17
  ></dx-icon-badge>
17
18
  </a>
18
19
  </div>
@@ -1,11 +1,22 @@
1
1
  <template>
2
- <svg
3
- aria-hidden="true"
4
- style={style}
5
- xmlns="http://www.w3.org/2000/svg"
6
- if:true={symbol}
7
- part="svg"
8
- >
9
- <use xlink:href={href}></use>
10
- </svg>
2
+ <template if:true={symbol}>
3
+ <svg
4
+ if:true={hasAlt}
5
+ style={style}
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ part="svg"
8
+ alt={alt}
9
+ >
10
+ <use xlink:href={href}></use>
11
+ </svg>
12
+ <svg
13
+ if:false={hasAlt}
14
+ style={style}
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ part="svg"
17
+ aria-hidden="true"
18
+ >
19
+ <use xlink:href={href}></use>
20
+ </svg>
21
+ </template>
11
22
  </template>
@@ -18,9 +18,14 @@ export default class Icon extends LightningElement {
18
18
  @api size: IconSize = "small";
19
19
  @api symbol!: IconSymbol;
20
20
  @api color?: string;
21
+ @api alt: string = "";
21
22
 
22
23
  private node: SVGSymbolElement | undefined;
23
24
 
25
+ private get hasAlt() {
26
+ return !!this.alt;
27
+ }
28
+
24
29
  private get style() {
25
30
  let stylestr = "";
26
31
  if (this.size !== "override" && this.size in sizeMap) {
@@ -1,5 +1,10 @@
1
1
  <template>
2
2
  <div class={className} style={style} part="badge">
3
- <dx-icon symbol={symbol} sprite={sprite} size={iconSize}></dx-icon>
3
+ <dx-icon
4
+ symbol={symbol}
5
+ sprite={sprite}
6
+ size={iconSize}
7
+ alt={alt}
8
+ ></dx-icon>
4
9
  </div>
5
10
  </template>
@@ -12,6 +12,7 @@ export default class IconBadge extends LightningElement {
12
12
  @api backgroundColor?: string;
13
13
  @api backgroundSize?: string;
14
14
  @api iconSize?: string = "override";
15
+ @api alt: string = "";
15
16
 
16
17
  _shape: IconBadgeShape = "circle";
17
18
  @api