@1024pix/pix-ui 57.0.1 → 57.0.2
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
|
-
<
|
|
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
|
-
<
|
|
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>
|
|
@@ -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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
47
|
+
&:hover {
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
align-items: center;
|
|
56
|
+
&:has(input[type="radio"]:focus) {
|
|
57
|
+
border-color: var(--pix-neutral-900);
|
|
58
|
+
}
|
|
64
59
|
}
|
|
65
60
|
}
|