@1024pix/pix-ui 55.12.1 → 55.13.1

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,7 +1,6 @@
1
1
  <button
2
2
  type="button"
3
- class="pix-icon-button pix-icon-button--{{this.size}}
4
- {{if @withBackground ' pix-icon-button--background'}}"
3
+ class="pix-icon-button pix-icon-button--{{this.size}}"
5
4
  {{on "click" this.triggerAction}}
6
5
  ...attributes
7
6
  >
@@ -0,0 +1,74 @@
1
+ import { array } from '@ember/helper';
2
+ import { LinkTo } from '@ember/routing';
3
+ import { service } from '@ember/service';
4
+ import Component from '@glimmer/component';
5
+
6
+ import PixIcon from './pix-icon';
7
+
8
+ export default class PixNavigationButton extends Component {
9
+ defaultParams = {};
10
+ defaultModel = [];
11
+ @service router;
12
+
13
+ get isActiveRoute() {
14
+ return this.args.route === this.router.currentRouteName;
15
+ }
16
+
17
+ get isLinkOpenInANewWindow() {
18
+ return this.args?.target === '_blank';
19
+ }
20
+
21
+ <template>
22
+ {{#if @route}}
23
+ <LinkTo
24
+ @route={{@route}}
25
+ @models={{if @model (array @model) this.defaultModel}}
26
+ @query={{if @query @query this.defaultParams}}
27
+ class="pix-navigation-button"
28
+ target={{if this.isLinkOpenInANewWindow "_blank"}}
29
+ ...attributes
30
+ >
31
+ {{#if @icon}}
32
+ <PixIcon
33
+ class="pix-navigation-button__icon"
34
+ @ariaHidden={{true}}
35
+ @name={{@icon}}
36
+ @plainIcon={{if this.isActiveRoute true false}}
37
+ />
38
+ {{/if}}
39
+ {{yield}}
40
+ {{#if this.isLinkOpenInANewWindow}}
41
+ <PixIcon
42
+ class="pix-navigation-button__external-icon"
43
+ @ariaHidden={{true}}
44
+ @name="openNew"
45
+ />
46
+ {{/if}}
47
+ </LinkTo>
48
+ {{else}}
49
+ {{! template-lint-disable link-href-attributes }}
50
+ <a
51
+ class="pix-navigation-button"
52
+ target={{if this.isLinkOpenInANewWindow "_blank"}}
53
+ ...attributes
54
+ >
55
+ {{#if @icon}}
56
+ <PixIcon
57
+ class="pix-navigation-button__icon"
58
+ @ariaHidden={{true}}
59
+ @name={{@icon}}
60
+ @plainIcon={{@iconPlain}}
61
+ />
62
+ {{/if}}
63
+ {{yield}}
64
+ {{#if this.isLinkOpenInANewWindow}}
65
+ <PixIcon
66
+ class="pix-navigation-button__external-icon"
67
+ @ariaHidden={{true}}
68
+ @name="openNew"
69
+ />
70
+ {{/if}}
71
+ </a>
72
+ {{/if}}
73
+ </template>
74
+ }
@@ -46,10 +46,6 @@
46
46
  outline: 0;
47
47
  }
48
48
 
49
- &--background {
50
- background-color: var(--pix-neutral-20);
51
- }
52
-
53
49
  &--small {
54
50
  width: 2rem;
55
51
  min-width: 2rem;
@@ -21,7 +21,6 @@
21
21
  position: absolute;
22
22
  top:0;
23
23
  left: 0;
24
- z-index: -1;
25
24
  width: 100%;
26
25
  height: 100%;
27
26
  background-color: currentcolor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "55.12.1",
3
+ "version": "55.13.1",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -1,39 +0,0 @@
1
- {{#if @route}}
2
- <LinkTo
3
- @route={{@route}}
4
- @models={{if @model (array @model) this.defaultModel}}
5
- @query={{if @query @query this.defaultParams}}
6
- class="pix-navigation-button"
7
- target={{if this.isLinkOpenInANewWindow "_blank"}}
8
- ...attributes
9
- >
10
- {{#if @icon}}
11
- <PixIcon
12
- class="pix-navigation-button__icon"
13
- @ariaHidden={{true}}
14
- @name={{@icon}}
15
- @plainIcon={{@iconPlain}}
16
- />
17
- {{/if}}
18
- {{yield}}
19
- {{#if this.isLinkOpenInANewWindow}}
20
- <PixIcon class="pix-navigation-button__external-icon" @ariaHidden={{true}} @name="openNew" />
21
- {{/if}}
22
- </LinkTo>
23
- {{else}}
24
- {{! template-lint-disable link-href-attributes }}
25
- <a class="pix-navigation-button" target={{if this.isLinkOpenInANewWindow "_blank"}} ...attributes>
26
- {{#if @icon}}
27
- <PixIcon
28
- class="pix-navigation-button__icon"
29
- @ariaHidden={{true}}
30
- @name={{@icon}}
31
- @plainIcon={{@iconPlain}}
32
- />
33
- {{/if}}
34
- {{yield}}
35
- {{#if this.isLinkOpenInANewWindow}}
36
- <PixIcon class="pix-navigation-button__external-icon" @ariaHidden={{true}} @name="openNew" />
37
- {{/if}}
38
- </a>
39
- {{/if}}
@@ -1,10 +0,0 @@
1
- import Component from '@glimmer/component';
2
-
3
- export default class PixNavigationButton extends Component {
4
- defaultParams = {};
5
- defaultModel = [];
6
-
7
- get isLinkOpenInANewWindow() {
8
- return this.args?.target === '_blank';
9
- }
10
- }