@1024pix/pix-ui 54.10.0 → 54.11.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.
package/addon/styles/addon.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<LinkTo
|
|
2
|
-
@route={{this.route}}
|
|
3
|
-
@models={{if @model (array @model) this.defaultModel}}
|
|
4
|
-
class="pix-return-to pix-return-to--{{this.shade}}"
|
|
5
|
-
...attributes
|
|
6
|
-
>
|
|
7
|
-
{{#if (has-block)}}
|
|
8
|
-
<PixIcon @name="arrowLeft" @ariaHidden={{true}} class="pix-return-to__icon" />
|
|
9
|
-
<span class="pix-return-to__text"> {{yield}} </span>
|
|
10
|
-
{{else}}
|
|
11
|
-
<PixIcon class="pix-return-to__icon" aria-label={{@arrowLabel}} @name="arrowLeft" />
|
|
12
|
-
{{/if}}
|
|
13
|
-
</LinkTo>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { warn } from '@ember/debug';
|
|
2
|
-
import Component from '@glimmer/component';
|
|
3
|
-
|
|
4
|
-
export default class PixReturnTo extends Component {
|
|
5
|
-
text = 'pix-return-to';
|
|
6
|
-
availableShades = ['neutral-dark', 'neutral-light'];
|
|
7
|
-
defaultModel = [];
|
|
8
|
-
|
|
9
|
-
get route() {
|
|
10
|
-
const routeParam = this.args.route;
|
|
11
|
-
warn('PixReturnTo: @route param is not provided', routeParam !== undefined, {
|
|
12
|
-
id: 'pix-ui.returnTo.route.required',
|
|
13
|
-
});
|
|
14
|
-
return routeParam;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get shade() {
|
|
18
|
-
const shadeParam = this.args.shade;
|
|
19
|
-
return this.availableShades.includes(shadeParam) ? shadeParam : this.availableShades[0];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
@use "pix-design-tokens/typography";
|
|
2
|
-
|
|
3
|
-
.pix-return-to {
|
|
4
|
-
@extend %pix-body-l;
|
|
5
|
-
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
gap: var(--pix-spacing-1x);
|
|
8
|
-
align-items: center;
|
|
9
|
-
text-decoration: none;
|
|
10
|
-
border-bottom: transparent solid 2px;
|
|
11
|
-
|
|
12
|
-
&__icon {
|
|
13
|
-
position: relative;
|
|
14
|
-
width: 2.3rem;
|
|
15
|
-
height: 2.3rem;
|
|
16
|
-
padding: var(--pix-spacing-1x) var(--pix-spacing-2x);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&:focus,
|
|
20
|
-
&:hover,
|
|
21
|
-
&:active {
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
border-bottom-color: transparent;
|
|
24
|
-
outline: 0;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@mixin coloriseLink($defaultColor, $focusColor) {
|
|
29
|
-
color: $defaultColor;
|
|
30
|
-
|
|
31
|
-
&:hover {
|
|
32
|
-
.pix-return-to__icon {
|
|
33
|
-
color: var(--pix-neutral-900);
|
|
34
|
-
background-color: var(--pix-neutral-20);
|
|
35
|
-
border-radius: 50%;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:focus {
|
|
40
|
-
.pix-return-to__icon {
|
|
41
|
-
color: $focusColor;
|
|
42
|
-
background-color: $defaultColor;
|
|
43
|
-
border-radius: 50%;
|
|
44
|
-
outline: 1px solid $focusColor;
|
|
45
|
-
outline-offset: -3px;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:active {
|
|
50
|
-
.pix-return-to__icon {
|
|
51
|
-
color: var(--pix-neutral-900);
|
|
52
|
-
background-color: var(--pix-neutral-100);
|
|
53
|
-
border-radius: 50%;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&--neutral-light {
|
|
59
|
-
@include coloriseLink(var(--pix-neutral-20), var(--pix-neutral-900));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&--neutral-dark {
|
|
63
|
-
@include coloriseLink(var(--pix-neutral-900), var(--pix-neutral-0));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@1024pix/pix-ui/components/pix-return-to';
|