@1024pix/pix-ui 59.0.0 → 60.0.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.
|
@@ -8,9 +8,15 @@ export default class PixLabelWrapped extends Component {
|
|
|
8
8
|
|
|
9
9
|
if (this.args.inlineLabel) classes.push('pix-label--inline-label');
|
|
10
10
|
if (this.args.isDisabled) classes.push('pix-label-wrapped--disabled');
|
|
11
|
-
if (this.args.variant === '
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if (this.args.variant === 'modulix') {
|
|
12
|
+
classes.push('pix-label-wrapped--variant-modulix');
|
|
13
|
+
if (this.args.state === 'success') classes.push('pix-label-wrapped--state-modulix-success');
|
|
14
|
+
if (this.args.state === 'error') classes.push('pix-label-wrapped--state-modulix-error');
|
|
15
|
+
if (this.args.state === 'neutral') classes.push('pix-label-wrapped--state-modulix-neutral');
|
|
16
|
+
} else {
|
|
17
|
+
if (this.args.state === 'success') classes.push('pix-label-wrapped--state-success');
|
|
18
|
+
if (this.args.state === 'error') classes.push('pix-label-wrapped--state-error');
|
|
19
|
+
}
|
|
14
20
|
|
|
15
21
|
const size = ['small', 'large'].includes(this.args.size) ? this.args.size : 'default';
|
|
16
22
|
|
|
@@ -10,10 +10,6 @@ import PixLabelWrapped from './pix-label-wrapped';
|
|
|
10
10
|
export default class PixRadioButton extends Component {
|
|
11
11
|
text = 'pix-radio-button';
|
|
12
12
|
|
|
13
|
-
get stateWarning() {
|
|
14
|
-
return Boolean(this.isDisabled) && (!this.hasErrorState || !this.hasSuccessState);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
get id() {
|
|
18
14
|
return this.args.id || guidFor(this);
|
|
19
15
|
}
|
|
@@ -49,6 +45,10 @@ export default class PixRadioButton extends Component {
|
|
|
49
45
|
classes.push(`${classes[0]}--state`);
|
|
50
46
|
}
|
|
51
47
|
|
|
48
|
+
if (this.args.variant === 'modulix') {
|
|
49
|
+
classes.push('pix-radio-button__input--variant-modulix');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
return classes.join(' ');
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
|
|
7
|
-
&--variant-
|
|
7
|
+
&--variant-modulix {
|
|
8
8
|
position: relative;
|
|
9
9
|
z-index: -2;
|
|
10
10
|
padding: var(--pix-spacing-3x) var(--pix-spacing-4x);
|
|
@@ -41,6 +41,20 @@
|
|
|
41
41
|
color: var(--pix-error-700);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
&.pix-label-wrapped--state-modulix-error {
|
|
45
|
+
--state-border-color: var(--pix-warning-700);
|
|
46
|
+
--state-background-color: var(--pix-warning-50);
|
|
47
|
+
|
|
48
|
+
color: var(--pix-warning-700);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.pix-label-wrapped--state-modulix-success {
|
|
52
|
+
--state-border-color: var(--pix-success-700);
|
|
53
|
+
--state-background-color: var(--pix-success-50);
|
|
54
|
+
|
|
55
|
+
color: var(--pix-success-700);
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
& .pix-label-wrapped__state-icon {
|
|
45
59
|
z-index: 1;
|
|
46
60
|
width: 1rem;
|
|
@@ -92,4 +92,14 @@
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
&__input--variant-modulix, svg:has(+ .pix-radio-button__input--variant-modulix) {
|
|
97
|
+
position: absolute;
|
|
98
|
+
clip-path: polygon(0 0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.pix-label-wrapped--state-modulix-neutral:has(input:checked):not(.pix-label-wrapped--disabled) {
|
|
102
|
+
border: 1px solid var(--pix-primary-500);
|
|
103
|
+
outline: 2px solid var(--pix-primary-300);
|
|
104
|
+
}
|
|
95
105
|
}
|