@1024pix/pix-ui 54.1.1 → 54.3.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/components/pix-button/pix-button-content.hbs +17 -0
- package/addon/components/pix-button-link.hbs +16 -2
- package/addon/components/pix-button-link.js +1 -1
- package/addon/components/pix-button.hbs +8 -17
- package/addon/components/pix-select-list.hbs +16 -14
- package/addon/styles/_pix-select-list.scss +23 -30
- package/addon/styles/_pix-select.scss +1 -1
- package/addon/styles/_pix-structure-switcher.scss +0 -1
- package/app/components/pix-button-content.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{#if @iconBefore}}
|
|
2
|
+
<PixIcon
|
|
3
|
+
class="pix-button__icon pix-button__icon--before"
|
|
4
|
+
@ariaHidden={{true}}
|
|
5
|
+
@name={{@iconBefore}}
|
|
6
|
+
@plainIcon={{@plainIconBefore}}
|
|
7
|
+
/>
|
|
8
|
+
{{/if}}
|
|
9
|
+
{{yield}}
|
|
10
|
+
{{#if @iconAfter}}
|
|
11
|
+
<PixIcon
|
|
12
|
+
class="pix-button__icon pix-button__icon--after"
|
|
13
|
+
@name={{@iconAfter}}
|
|
14
|
+
@ariaHidden={{true}}
|
|
15
|
+
@plainIcon={{@plainIconAfter}}
|
|
16
|
+
/>
|
|
17
|
+
{{/if}}
|
|
@@ -7,10 +7,24 @@
|
|
|
7
7
|
class={{this.className}}
|
|
8
8
|
...attributes
|
|
9
9
|
>
|
|
10
|
-
|
|
10
|
+
<PixButtonContent
|
|
11
|
+
@iconBefore={{@iconBefore}}
|
|
12
|
+
@iconAfter={{@iconAfter}}
|
|
13
|
+
@plainIconAfter={{@plainIconAfter}}
|
|
14
|
+
@plainIconBefore={{@plainIconBefore}}
|
|
15
|
+
>
|
|
16
|
+
{{yield}}
|
|
17
|
+
</PixButtonContent>
|
|
11
18
|
</LinkTo>
|
|
12
19
|
{{else}}
|
|
13
20
|
<a href={{@href}} class={{this.className}} ...attributes>
|
|
14
|
-
|
|
21
|
+
<PixButtonContent
|
|
22
|
+
@iconBefore={{@iconBefore}}
|
|
23
|
+
@iconAfter={{@iconAfter}}
|
|
24
|
+
@plainIconAfter={{@plainIconAfter}}
|
|
25
|
+
@plainIconBefore={{@plainIconBefore}}
|
|
26
|
+
>
|
|
27
|
+
{{yield}}
|
|
28
|
+
</PixButtonContent>
|
|
15
29
|
</a>
|
|
16
30
|
{{/if}}
|
|
@@ -14,22 +14,13 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
<span class="loader__not-visible-text">{{yield}}</span>
|
|
16
16
|
{{else}}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{{yield}}
|
|
26
|
-
{{#if @iconAfter}}
|
|
27
|
-
<PixIcon
|
|
28
|
-
class="pix-button__icon pix-button__icon--after"
|
|
29
|
-
@name={{@iconAfter}}
|
|
30
|
-
@ariaHidden={{true}}
|
|
31
|
-
@plainIcon={{@plainIconAfter}}
|
|
32
|
-
/>
|
|
33
|
-
{{/if}}
|
|
17
|
+
<PixButtonContent
|
|
18
|
+
@iconBefore={{@iconBefore}}
|
|
19
|
+
@iconAfter={{@iconAfter}}
|
|
20
|
+
@plainIconAfter={{@plainIconAfter}}
|
|
21
|
+
@plainIconBefore={{@plainIconBefore}}
|
|
22
|
+
>
|
|
23
|
+
{{yield}}
|
|
24
|
+
</PixButtonContent>
|
|
34
25
|
{{/if}}
|
|
35
26
|
</button>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<ul role="listbox" id={{@listId}} class="pix-select_list" ...attributes>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
{{#if @displayDefaultOption}}
|
|
3
|
+
<li
|
|
4
|
+
class="pix-select-list-category__option{{unless
|
|
5
|
+
@value
|
|
6
|
+
' pix-select-list-category__option--selected'
|
|
7
|
+
}}"
|
|
8
|
+
role="option"
|
|
9
|
+
tabindex={{if this.isDefaultOptionHidden "-1" "0"}}
|
|
10
|
+
aria-selected={{if @value "false" "true"}}
|
|
11
|
+
{{on "click" (fn @onChange @defaultOption)}}
|
|
12
|
+
{{on-enter-action (fn @onChange @defaultOption)}}
|
|
13
|
+
{{on-space-action (fn @onChange @defaultOption)}}
|
|
14
|
+
>
|
|
15
|
+
{{@defaultOptionValue}}
|
|
16
|
+
</li>
|
|
17
|
+
{{/if}}
|
|
16
18
|
{{#if this.results}}
|
|
17
19
|
{{#if this.displayCategory}}
|
|
18
20
|
{{#each this.results as |element index|}}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
@use "pix-design-tokens/typography";
|
|
2
2
|
|
|
3
3
|
.pix-select_list {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--pix-spacing-1x);
|
|
7
|
+
padding: var(--pix-spacing-2x) var(--pix-spacing-1x);
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
.pix-select-list-category {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--pix-spacing-1x);
|
|
12
14
|
margin: 0;
|
|
13
15
|
padding: 0;
|
|
14
16
|
list-style: none;
|
|
@@ -16,26 +18,30 @@
|
|
|
16
18
|
&__name {
|
|
17
19
|
@extend %pix-body-s;
|
|
18
20
|
|
|
19
|
-
padding: var(--pix-spacing-
|
|
20
|
-
color: var(--pix-neutral-
|
|
21
|
-
|
|
21
|
+
padding: var(--pix-spacing-1x) var(--pix-spacing-3x);
|
|
22
|
+
color: var(--pix-neutral-800);
|
|
23
|
+
font-weight: var(--pix-font-bold);
|
|
24
|
+
text-transform: capitalize;
|
|
25
|
+
background-color: var(--pix-neutral-20);
|
|
26
|
+
border-radius: 0.25rem;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
&__option {
|
|
25
30
|
@extend %pix-body-s;
|
|
26
31
|
|
|
27
32
|
position: relative;
|
|
28
|
-
padding: var(--pix-spacing-2x) var(--pix-spacing-
|
|
33
|
+
padding: var(--pix-spacing-2x) var(--pix-spacing-10x) var(--pix-spacing-2x) var(--pix-spacing-3x);
|
|
29
34
|
color: var(--pix-neutral-900);
|
|
30
|
-
border-radius:
|
|
35
|
+
border-radius: 0.25rem;
|
|
31
36
|
|
|
32
|
-
&:
|
|
33
|
-
background-color: var(--pix-neutral-
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: rgba(var(--pix-neutral-100-inline), 0.60);
|
|
39
|
+
outline: none;
|
|
40
|
+
cursor: pointer;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
&:hover,
|
|
37
43
|
&:focus {
|
|
38
|
-
background-color: var(--pix-primary-
|
|
44
|
+
background-color: var(--pix-primary-100);
|
|
39
45
|
outline: none;
|
|
40
46
|
cursor: pointer;
|
|
41
47
|
}
|
|
@@ -43,27 +49,14 @@
|
|
|
43
49
|
svg {
|
|
44
50
|
position: absolute;
|
|
45
51
|
top: 50%;
|
|
46
|
-
right: var(--pix-spacing-
|
|
52
|
+
right: var(--pix-spacing-3x);
|
|
47
53
|
transform: translateY(-50%);
|
|
48
|
-
visibility: hidden;
|
|
49
|
-
opacity: 0;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
&--selected {
|
|
53
|
-
|
|
57
|
+
color: var(--pix-primary-900);
|
|
58
|
+
font-weight: var(--pix-font-bold);
|
|
54
59
|
background-color: var(--pix-primary-10);
|
|
55
|
-
|
|
56
|
-
svg {
|
|
57
|
-
visibility: visible;
|
|
58
|
-
opacity: 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&--hidden {
|
|
63
|
-
height: 0;
|
|
64
|
-
padding-top: 0;
|
|
65
|
-
padding-bottom: 0;
|
|
66
|
-
visibility: hidden;
|
|
67
60
|
}
|
|
68
61
|
}
|
|
69
62
|
}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
&__search {
|
|
66
66
|
display: flex;
|
|
67
|
-
margin: var(--pix-spacing-
|
|
67
|
+
margin: var(--pix-spacing-2x) var(--pix-spacing-3x);
|
|
68
68
|
color: var(--pix-neutral-100);
|
|
69
69
|
border-bottom: 2px solid var(--pix-neutral-100);
|
|
70
70
|
border-radius: var(--pix-spacing-1x) var(--pix-spacing-1x) 0 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@1024pix/pix-ui/components/pix-button/pix-button-content';
|