@1024pix/pix-ui 48.0.2 → 48.0.4

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.
@@ -1,10 +1,15 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- alt={{this.alternativeText}}
4
- aria-hidden={{this.ariaHidden}}
5
- role="img"
6
- class="pix-icon"
7
- ...attributes
8
- >
9
- <use href="/@1024pix/pix-ui/svg/pix-sprite.svg#{{this.iconName}}" />
10
- </svg>
1
+ {{#let (unique-id) as |titleId|}}
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ aria-hidden={{this.ariaHidden}}
5
+ role="img"
6
+ class="pix-icon"
7
+ aria-describedby={{if this.title titleId}}
8
+ ...attributes
9
+ >
10
+ {{#if this.title}}
11
+ <title id={{titleId}}>{{this.title}}</title>
12
+ {{/if}}
13
+ <use href="/@1024pix/pix-ui/svg/pix-sprite.svg#{{this.iconName}}" />
14
+ </svg>
15
+ {{/let}}
@@ -3,8 +3,12 @@ import { warn } from '@ember/debug';
3
3
  import { ICONS } from '@1024pix/pix-ui/helpers/icons';
4
4
 
5
5
  export default class PixIcon extends Component {
6
- get alternativeText() {
7
- return this.args.alternativeText || '';
6
+ get title() {
7
+ warn('PixIcon: @alternativeText is deprecated use @title instead', !this.args.alternativeText, {
8
+ id: 'pix-ui.icon.alternativeText.deprecated',
9
+ });
10
+
11
+ return this.args.title || this.args.alternativeText || null;
8
12
  }
9
13
 
10
14
  get ariaHidden() {
@@ -1,4 +1,5 @@
1
1
  .pix-icon {
2
2
  width: 1.5rem;
3
3
  height: 1.5rem;
4
+ fill: currentcolor;
4
5
  }
@@ -7,12 +7,7 @@
7
7
  &__trigger-element {
8
8
  display: block;
9
9
  width: 100%;
10
-
11
- > svg {
12
- width: 1rem;
13
- height: 1rem;
14
- fill:var(--pix-neutral-500);
15
- }
10
+ color: var(--pix-neutral-500);
16
11
  }
17
12
 
18
13
  &__trigger-element:hover + .pix-tooltip__content {
@@ -55,11 +50,6 @@
55
50
  pointer-events: none;
56
51
  fill: var(--pix-neutral-0);
57
52
 
58
- > .pix-icon {
59
- width: 1rem;
60
- height: 1rem;
61
- }
62
-
63
53
  &--inline {
64
54
  white-space: nowrap;
65
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "48.0.2",
3
+ "version": "48.0.4",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"