@1024pix/pix-ui 57.0.1 → 57.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.
@@ -75,33 +75,35 @@ export default class PixSegmentedControl extends Component {
75
75
  </PixLabel>
76
76
 
77
77
  <div class="pix-segmented-control__radio">
78
- <input
79
- {{on "change" this.onChange}}
80
- id={{this.idViewA}}
81
- type="radio"
82
- name={{this.toggleName}}
83
- value="viewA"
84
- checked={{this.stateViewA}}
85
- />
86
- <label for={{this.idViewA}}>
78
+ <label class="pix-segmented-control__radio-label" for={{this.idViewA}}>
87
79
  {{#if @iconA}}
88
80
  <PixIcon @name={{@iconA}} @plainIcon={{this.stateViewA}} @ariaHidden={{true}} />
89
81
  {{/if}}
90
82
  {{yield to="viewA"}}
83
+ <input
84
+ class="screen-reader-only"
85
+ {{on "change" this.onChange}}
86
+ id={{this.idViewA}}
87
+ type="radio"
88
+ name={{this.toggleName}}
89
+ value="viewA"
90
+ checked={{this.stateViewA}}
91
+ />
91
92
  </label>
92
- <input
93
- {{on "change" this.onChange}}
94
- id={{this.idViewB}}
95
- type="radio"
96
- name={{this.toggleName}}
97
- value="viewB"
98
- checked={{this.stateViewB}}
99
- />
100
- <label for={{this.idViewB}}>
93
+ <label class="pix-segmented-control__radio-label" for={{this.idViewB}}>
101
94
  {{#if @iconB}}
102
95
  <PixIcon @name={{@iconB}} @plainIcon={{this.stateViewB}} @ariaHidden={{true}} />
103
96
  {{/if}}
104
97
  {{yield to="viewB"}}
98
+ <input
99
+ class="screen-reader-only"
100
+ {{on "change" this.onChange}}
101
+ id={{this.idViewB}}
102
+ type="radio"
103
+ name={{this.toggleName}}
104
+ value="viewB"
105
+ checked={{this.stateViewB}}
106
+ />
105
107
  </label>
106
108
  </div>
107
109
  </fieldset>
@@ -9,18 +9,19 @@
9
9
  left: 50%;
10
10
  width: min(32rem, calc(100% - var(--pix-spacing-4x)));
11
11
  margin-block: auto;
12
- background-color: var(--pix-neutral-20);
13
- border-radius: 4px;
12
+ background-color: var(--pix-neutral-0);
13
+ border-radius: var(--pix-spacing-4x);
14
14
  transform: translateX(-50%);
15
15
 
16
16
  &__header {
17
17
  display: flex;
18
18
  align-items: flex-start;
19
19
  justify-content: space-between;
20
- padding: var(--pix-spacing-6x);
20
+ padding: var(--pix-spacing-6x) var(--pix-spacing-4x) var(--pix-spacing-6x) var(--pix-spacing-6x);
21
21
  color: var(--pix-neutral-900);
22
22
  background: var(--pix-neutral-0);
23
- border-bottom: 1px solid var(--pix-neutral-20);
23
+ border-top-left-radius: var(--pix-spacing-4x) var(--pix-spacing-4x);
24
+ border-top-right-radius: var(--pix-spacing-4x) var(--pix-spacing-4x);
24
25
  }
25
26
 
26
27
  &__close-button {
@@ -48,9 +49,9 @@
48
49
  &__content {
49
50
  @extend %pix-body-s;
50
51
 
51
- padding: var(--pix-spacing-6x);
52
+ padding: var(--pix-spacing-4x) var(--pix-spacing-6x);
52
53
  color: var(--pix-neutral-900);
53
- background-color:var(--pix-neutral-20);
54
+ background-color:var(--pix-neutral-0);
54
55
 
55
56
  p:last-child {
56
57
  margin-bottom: 0;
@@ -58,7 +59,9 @@
58
59
  }
59
60
 
60
61
  &__footer {
61
- padding: 0 var(--pix-spacing-6x) var(--pix-spacing-2x);
62
- background-color:var(--pix-neutral-20);
62
+ padding: var(--pix-spacing-6x) var(--pix-spacing-6x) var(--pix-spacing-4x) var(--pix-spacing-6x);
63
+ background-color:var(--pix-neutral-0);
64
+ border-bottom-right-radius: var(--pix-spacing-4x) var(--pix-spacing-4x);
65
+ border-bottom-left-radius: var(--pix-spacing-4x) var(--pix-spacing-4x);
63
66
  }
64
67
  }
@@ -7,6 +7,12 @@
7
7
  color: var(--pix-neutral-900);
8
8
  font-size: 1rem;
9
9
 
10
+ &--inline {
11
+ flex-direction: row;
12
+ gap: var(--pix-spacing-2x);
13
+ align-items: center;
14
+ }
15
+
10
16
  &--primary .pix-segmented-control__radio {
11
17
  background-color: rgb(var(--pix-primary-100-inline), 0.50);
12
18
  }
@@ -26,40 +32,29 @@
26
32
  align-items: flex-start;
27
33
  padding: var(--pix-spacing-1x, 4px);
28
34
  border-radius: 8px;
35
+ }
29
36
 
30
- :hover {
31
- cursor: pointer;
32
- }
33
-
34
- input[type="radio"], input[type="radio"]:checked, input[type="radio"]:focus-visible {
35
- position: absolute;
36
- outline: none;
37
- appearance: none;
38
- }
39
-
40
- label {
41
- display: flex;
42
- gap: 10px;
43
- align-items: center;
44
- justify-content: center;
45
- padding: var(--pix-spacing-1x, 4px) 8px;
46
- border: 1px solid transparent;
47
- border-radius: 8px;
48
- }
37
+ &__radio-label {
38
+ display: flex;
39
+ flex-grow: 1;
40
+ gap: var(--pix-spacing-3x);
41
+ align-items: center;
42
+ justify-content: center;
43
+ padding: var(--pix-spacing-1x, 4px) 8px;
44
+ border: 1px solid transparent;
45
+ border-radius: 8px;
49
46
 
50
- input[type="radio"]:checked + label {
51
- font-weight: var(--pix-font-bold);
52
- background: var(--pix-neutral-0);
53
- }
47
+ &:hover {
48
+ cursor: pointer;
49
+ }
54
50
 
55
- input[type="radio"]:focus + label {
56
- border-color: var(--pix-neutral-900);
57
- }
51
+ &:has(input[type="radio"]:checked) {
52
+ font-weight: var(--pix-font-bold);
53
+ background: var(--pix-neutral-0);
58
54
  }
59
55
 
60
- &--inline {
61
- flex-direction: row;
62
- gap: var(--pix-spacing-2x);
63
- align-items: center;
56
+ &:has(input[type="radio"]:focus) {
57
+ border-color: var(--pix-neutral-900);
58
+ }
64
59
  }
65
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "57.0.1",
3
+ "version": "57.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"