@muraldevkit/ui-toolkit 2.3.0 → 2.4.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/dist/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
- package/dist/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.d.ts +26 -0
- package/dist/components/form/radio/MrlRadioButtonStandalone/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlRadioButtonStandalone/global.scss +21 -0
- package/dist/styles/MrlRadioButtonStandalone/module.scss +65 -0
- package/dist/styles/MrlRadioButtonStandalone/variables.scss +36 -0
- package/dist/styles/MrlTextarea/global.scss +1 -1
- package/dist/styles/form/variables.scss +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
2
|
+
|
|
3
|
+
.MrlRadioButtonStandalone-input {
|
|
4
|
+
@include mrl-focus(
|
|
5
|
+
$is-inline-element: 'true',
|
|
6
|
+
$element-radius: 'var(--mrl-border-radius-rounded)'
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
position: absolute;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.MrlRadioButtonStandalone-focus-indicator {
|
|
13
|
+
// Safari needs to have defined dimensions
|
|
14
|
+
height: var(--mrl-radio-button-height);
|
|
15
|
+
|
|
16
|
+
// Fixes FF display issue
|
|
17
|
+
left: 0;
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: auto;
|
|
20
|
+
width: var(--mrl-radio-button-width);
|
|
21
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Standalone radio button component styles
|
|
3
|
+
/// @group radio-button-standalone
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use '~@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
7
|
+
@use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
|
|
8
|
+
@use '../../forms.variables.scss';
|
|
9
|
+
@use './MrlRadioButtonStandalone.variables.scss';
|
|
10
|
+
|
|
11
|
+
.MrlRadioButtonStandalone {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
height: var(--mrl-radio-button-height);
|
|
14
|
+
margin: calc(var(--mrl-spacing-02) + var(--mrl-spacing-01));
|
|
15
|
+
margin-left: var(--mrl-spacing-01);
|
|
16
|
+
position: relative;
|
|
17
|
+
width: var(--mrl-radio-button-width);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.MrlRadioButtonStandalone-input {
|
|
21
|
+
appearance: none;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
height: var(--mrl-radio-button-height);
|
|
24
|
+
left: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
opacity: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
width: var(--mrl-radio-button-width);
|
|
32
|
+
z-index: $mrl-zIndex-focus;
|
|
33
|
+
|
|
34
|
+
&:disabled,
|
|
35
|
+
& ~ .MrlRadioButtonStandalone-faux-input {
|
|
36
|
+
cursor: default;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& ~ .MrlRadioButtonStandalone-faux-input {
|
|
41
|
+
background-color: var(--mrl-radio-button-background);
|
|
42
|
+
border-color: var(--mrl-radio-button-border-color);
|
|
43
|
+
border-radius: var(--mrl-radio-button-border-radius);
|
|
44
|
+
border-style: solid;
|
|
45
|
+
border-width: var(--mrl-radio-button-border-width);
|
|
46
|
+
height: var(--mrl-radio-button-height);
|
|
47
|
+
left: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
width: var(--mrl-radio-button-width);
|
|
51
|
+
|
|
52
|
+
&::before {
|
|
53
|
+
background-color: var(--mrl-radio-button-background);
|
|
54
|
+
border-radius: var(--mrl-border-radius-rounded);
|
|
55
|
+
content: '';
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
height: var(--mrl-radio-button-fill-size);
|
|
58
|
+
left: 50%;
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 50%;
|
|
61
|
+
transform: translate(-50%, -50%);
|
|
62
|
+
width: var(--mrl-radio-button-fill-size);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.MrlRadioButtonStandalone-input:focus-within ~ .MrlRadioButtonStandalone-faux-input {
|
|
2
|
+
--mrl-radio-button-border-color: var(--mrl-color-line-active);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.MrlRadioButtonStandalone-input:hover ~ .MrlRadioButtonStandalone-faux-input {
|
|
6
|
+
--mrl-radio-button-border-color: var(--mrl-color-line-hover);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.MrlRadioButtonStandalone-input:checked ~ .MrlRadioButtonStandalone-faux-input {
|
|
10
|
+
--mrl-radio-button-border-color: var(--mrl-radio-button-background-selected);
|
|
11
|
+
|
|
12
|
+
&::before {
|
|
13
|
+
--mrl-radio-button-background: var(--mrl-radio-button-background-selected);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.MrlRadioButtonStandalone-input:disabled ~ .MrlRadioButtonStandalone-faux-input {
|
|
18
|
+
--mrl-radio-button-border-color: var(--mrl-color-line-disabled);
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
--mrl-radio-button-background: var(--mrl-color-background-disabled);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Error states
|
|
26
|
+
.MrlRadioButtonStandalone-input.hasError ~ .MrlRadioButtonStandalone-faux-input,
|
|
27
|
+
.MrlRadioButtonStandalone-input.hasError:checked ~ .MrlRadioButtonStandalone-faux-input,
|
|
28
|
+
.MrlRadioButtonStandalone-input.hasError:hover ~ .MrlRadioButtonStandalone-faux-input {
|
|
29
|
+
--mrl-radio-button-border-color: var(--mrl-color-background-error);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.MrlRadioButtonStandalone-input.hasError:checked ~ .MrlRadioButtonStandalone-faux-input {
|
|
33
|
+
&::before {
|
|
34
|
+
--mrl-radio-button-background: var(--mrl-color-background-error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
--mrl-checkbox-input-color: var(--mrl-color-text-inverse);
|
|
40
40
|
--mrl-checkbox-input-border-width: var(--mrl-line-width-control);
|
|
41
41
|
--mrl-checkbox-input-border-radius: var(--mrl-border-radius-content);
|
|
42
|
+
|
|
43
|
+
// Radio button properties
|
|
44
|
+
--mrl-radio-button-height: var(--mrl-spacing-06);
|
|
45
|
+
--mrl-radio-button-width: var(--mrl-spacing-06);
|
|
46
|
+
--mrl-radio-button-fill-size: var(--mrl-spacing-04);
|
|
47
|
+
--mrl-radio-button-border-color: var(--mrl-color-line);
|
|
48
|
+
--mrl-radio-button-border-width: var(--mrl-line-width-border);
|
|
49
|
+
--mrl-radio-button-border-radius: var(--mrl-border-radius-rounded);
|
|
50
|
+
--mrl-radio-button-background: var(--mrl-color-background);
|
|
51
|
+
--mrl-radio-button-background-selected: var(--mrl-color-background-highlight-selected);
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
// State: selected (checked or indeterminate)
|