@1024pix/pix-ui 50.0.0 → 50.1.0

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,20 +1,21 @@
1
1
  import Component from '@glimmer/component';
2
+ import { warn } from '@ember/debug';
2
3
 
3
4
  export default class PixReturnTo extends Component {
4
5
  text = 'pix-return-to';
5
- availableShade = ['black', 'white', 'blue'];
6
+ availableShades = ['neutral-dark', 'neutral-light'];
6
7
  defaultModel = [];
7
8
 
8
9
  get route() {
9
10
  const routeParam = this.args.route;
10
- if (routeParam == undefined || routeParam.trim() == '') {
11
- throw new Error('ERROR in PixReturnTo component, @route param is not provided');
12
- }
11
+ warn('PixReturnTo: @route param is not provided', routeParam !== undefined, {
12
+ id: 'pix-ui.returnTo.route.required',
13
+ });
13
14
  return routeParam;
14
15
  }
15
16
 
16
17
  get shade() {
17
18
  const shadeParam = this.args.shade;
18
- return this.availableShade.includes(shadeParam) ? shadeParam : this.availableShade[0];
19
+ return this.availableShades.includes(shadeParam) ? shadeParam : this.availableShades[0];
19
20
  }
20
21
  }
@@ -23,31 +23,41 @@
23
23
  cursor: pointer;
24
24
  }
25
25
 
26
- @mixin coloriseLink($defaultColor, $arrowHoverColor, $arrowBgColor) {
26
+ @mixin coloriseLink($defaultColor, $focusColor) {
27
27
  color: $defaultColor;
28
28
 
29
- &:focus,
30
- &:hover,
31
- &:active {
29
+ &:hover {
30
+ .pix-return-to__icon {
31
+ color: var(--pix-neutral-900);
32
+ background-color: var(--pix-neutral-20);
33
+ border-radius: 50%;
34
+ }
35
+ }
36
+
37
+ &:focus {
32
38
  .pix-return-to__icon {
33
- background-color: $arrowBgColor;
39
+ color: $focusColor;
40
+ background-color: $defaultColor;
34
41
  border-radius: 50%;
35
- outline: 1px solid var(--pix-neutral-0);
42
+ outline: 1px solid $focusColor;
36
43
  outline-offset: -3px;
37
- fill: $arrowHoverColor;
38
44
  }
39
45
  }
40
- }
41
46
 
42
- &--white, &--neutral-light {
43
- @include coloriseLink(var(--pix-neutral-20), var(--pix-neutral-0), var(--pix-neutral-20));
47
+ &:active {
48
+ .pix-return-to__icon {
49
+ color: var(--pix-neutral-900);
50
+ background-color: var(--pix-neutral-100);
51
+ border-radius: 50%;
52
+ }
53
+ }
44
54
  }
45
55
 
46
- &--black, &--neutral-dark {
47
- @include coloriseLink(var(--pix-neutral-900), var(--pix-neutral-0), var(--pix-neutral-900));
56
+ &--neutral-light {
57
+ @include coloriseLink(var(--pix-neutral-20), var(--pix-neutral-900));
48
58
  }
49
59
 
50
- &--blue, &--primary {
51
- @include coloriseLink(var(--pix-primary-900), var(--pix-neutral-0), var(--pix-primary-900));
60
+ &--neutral-dark {
61
+ @include coloriseLink(var(--pix-neutral-900), var(--pix-neutral-0));
52
62
  }
53
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "50.0.0",
3
+ "version": "50.1.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"