@ilo-org/styles 0.8.3 → 0.9.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/build/css/components/index.css +460 -277
- package/build/css/components/index.css.map +1 -1
- package/build/css/global.css +1 -1
- package/build/css/global.css.map +1 -1
- package/build/css/index.css +460 -277
- package/build/css/index.css.map +1 -1
- package/build/css/monorepo.css +460 -277
- package/build/css/monorepo.css.map +1 -1
- package/build/minified/index.css +1 -1
- package/build/minified/index.css.map +1 -1
- package/build/minified/monorepo.css +1 -1
- package/build/minified/monorepo.css.map +1 -1
- package/css/components/cardgroup.css +1 -1
- package/css/components/checkbox.css +1 -1
- package/css/components/datepicker.css +1 -1
- package/css/components/fieldset.css +1 -1
- package/css/components/file-upload.css +1 -1
- package/css/components/form.css +1 -1
- package/css/components/formcontrol.css +1 -0
- package/css/components/hero.css +1 -1
- package/css/components/navigation.css +1 -1
- package/css/components/radio.css +1 -1
- package/css/components/textarea.css +1 -1
- package/css/components/textinput.css +1 -0
- package/css/components/toggle.css +1 -0
- package/css/global.css.map +1 -1
- package/css/index.css +1 -1
- package/css/index.css.map +1 -1
- package/css/monorepo.css +1 -1
- package/css/monorepo.css.map +1 -1
- package/package.json +3 -3
- package/scss/components/_cardgroup.scss +12 -43
- package/scss/components/_checkbox.scss +5 -36
- package/scss/components/_datepicker.scss +3 -23
- package/scss/components/_fieldset.scss +74 -53
- package/scss/components/_file-upload.scss +26 -57
- package/scss/components/_form.scss +37 -16
- package/scss/components/_formcontrol.scss +137 -0
- package/scss/components/_hero.scss +1 -0
- package/scss/components/_navigation.scss +4 -0
- package/scss/components/_radio.scss +4 -52
- package/scss/components/_textarea.scss +2 -2
- package/scss/components/_textinput.scss +65 -0
- package/scss/components/_toggle.scss +135 -0
- package/scss/components/index.scss +3 -1
|
@@ -367,6 +367,7 @@
|
|
|
367
367
|
background-position: calc(100% - 16px) 55%;
|
|
368
368
|
background-repeat: no-repeat;
|
|
369
369
|
background-size: 24px;
|
|
370
|
+
background-position-y: center;
|
|
370
371
|
border: none;
|
|
371
372
|
color: $brand-ilo-dark-blue;
|
|
372
373
|
cursor: pointer;
|
|
@@ -374,6 +375,7 @@
|
|
|
374
375
|
font-family: $fonts-display;
|
|
375
376
|
font-weight: 500;
|
|
376
377
|
padding: 16px 36px 16px 8px;
|
|
378
|
+
line-height: 24px;
|
|
377
379
|
text-align: left;
|
|
378
380
|
transition: all 150ms ease-out;
|
|
379
381
|
width: 100%;
|
|
@@ -554,6 +556,7 @@
|
|
|
554
556
|
background-position: calc(100% - 16px) 55%;
|
|
555
557
|
background-repeat: no-repeat;
|
|
556
558
|
background-size: 16px;
|
|
559
|
+
background-position-y: center;
|
|
557
560
|
border: none;
|
|
558
561
|
color: $brand-ilo-dark-blue;
|
|
559
562
|
cursor: pointer;
|
|
@@ -561,6 +564,7 @@
|
|
|
561
564
|
font-family: $fonts-display;
|
|
562
565
|
font-weight: 500;
|
|
563
566
|
padding: 16px 36px 16px 8px;
|
|
567
|
+
line-height: 16px;
|
|
564
568
|
text-align: left;
|
|
565
569
|
transition: all 150ms ease-out;
|
|
566
570
|
width: 100%;
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
@import "../mixins";
|
|
4
4
|
|
|
5
5
|
.ilo--radio {
|
|
6
|
-
-webkit-appearance: none;
|
|
7
|
-
-moz-appearance: none;
|
|
8
6
|
border: none;
|
|
9
7
|
display: grid;
|
|
10
8
|
height: px-to-rem(24px);
|
|
11
9
|
margin: 0;
|
|
12
|
-
order: 1;
|
|
13
10
|
position: relative;
|
|
14
11
|
place-content: center;
|
|
15
12
|
width: px-to-rem(24px);
|
|
13
|
+
cursor: pointer;
|
|
16
14
|
|
|
17
15
|
&:before {
|
|
18
16
|
content: "";
|
|
@@ -25,6 +23,7 @@
|
|
|
25
23
|
top: px-to-rem(3px);
|
|
26
24
|
width: px-to-rem(18px);
|
|
27
25
|
z-index: 1;
|
|
26
|
+
pointer-events: none;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
&:after {
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
top: 0;
|
|
38
37
|
width: px-to-rem(24px);
|
|
39
38
|
z-index: 0;
|
|
39
|
+
pointer-events: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&:checked {
|
|
@@ -54,13 +54,6 @@
|
|
|
54
54
|
&:after {
|
|
55
55
|
background-color: $color-base-yellow;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
&:checked {
|
|
59
|
-
&:before {
|
|
60
|
-
border-color: $color-base-blue-dark;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
57
|
outline: none;
|
|
65
58
|
}
|
|
66
59
|
|
|
@@ -70,8 +63,7 @@
|
|
|
70
63
|
}
|
|
71
64
|
|
|
72
65
|
&:invalid,
|
|
73
|
-
|
|
74
|
-
.error & {
|
|
66
|
+
&__error {
|
|
75
67
|
&:after {
|
|
76
68
|
background-color: $color-base-red-medium;
|
|
77
69
|
}
|
|
@@ -83,43 +75,3 @@
|
|
|
83
75
|
}
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
|
-
|
|
87
|
-
.ilo--fieldset--input--radio {
|
|
88
|
-
align-items: center;
|
|
89
|
-
clear: both;
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-wrap: wrap;
|
|
92
|
-
justify-content: flex-start;
|
|
93
|
-
margin-bottom: px-to-rem(22px);
|
|
94
|
-
|
|
95
|
-
.ilo--fieldset--label {
|
|
96
|
-
color: $color-base-neutrals-black;
|
|
97
|
-
font-family: $fonts-copy;
|
|
98
|
-
font-weight: 400;
|
|
99
|
-
font-size: 14.9px;
|
|
100
|
-
margin-bottom: 0;
|
|
101
|
-
margin-left: px-to-rem($spacing-padding-1);
|
|
102
|
-
margin-top: 2px;
|
|
103
|
-
order: 2;
|
|
104
|
-
|
|
105
|
-
.right-to-left & {
|
|
106
|
-
margin-left: 0;
|
|
107
|
-
margin-right: px-to-rem($spacing-padding-1);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.ilo--fieldset--error,
|
|
112
|
-
.ilo--fieldset--helper {
|
|
113
|
-
order: 3;
|
|
114
|
-
width: 100%;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.right-to-left & {
|
|
118
|
-
direction: rtl;
|
|
119
|
-
|
|
120
|
-
.ilo--fieldset--label {
|
|
121
|
-
margin-left: 0;
|
|
122
|
-
margin-right: px-to-rem($spacing-padding-1);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use "../tokens" as *;
|
|
2
|
+
@use "../functions" as *;
|
|
3
|
+
@import "../mixins";
|
|
4
|
+
|
|
5
|
+
.ilo--text-input {
|
|
6
|
+
-webkit-appearance: none;
|
|
7
|
+
-moz-appearance: none;
|
|
8
|
+
appearance: none;
|
|
9
|
+
background-color: map-get(
|
|
10
|
+
$color,
|
|
11
|
+
"formelements",
|
|
12
|
+
"input",
|
|
13
|
+
"default",
|
|
14
|
+
"background"
|
|
15
|
+
);
|
|
16
|
+
@include bordervalues("input", "formelements");
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
font-family: $fonts-copy;
|
|
19
|
+
font-weight: map-get($type, "weights", "section");
|
|
20
|
+
@include font-styles("label-medium");
|
|
21
|
+
height: px-to-rem(
|
|
22
|
+
map-get($spacing, "formelements", "input", "default", "height")
|
|
23
|
+
);
|
|
24
|
+
@include spacingvalues("margin", "input", "formelements");
|
|
25
|
+
outline: none;
|
|
26
|
+
@include spacingvalues("padding", "input", "formelements");
|
|
27
|
+
width: map-get($spacing, "formelements", "input", "default", "width");
|
|
28
|
+
|
|
29
|
+
&:focus {
|
|
30
|
+
background-color: map-get(
|
|
31
|
+
$color,
|
|
32
|
+
"formelements",
|
|
33
|
+
"input",
|
|
34
|
+
"focus",
|
|
35
|
+
"background"
|
|
36
|
+
);
|
|
37
|
+
@include bordervalues("input", "formelements", "focus");
|
|
38
|
+
padding-left: calc($spacing-formelements-input-default-padding-left - 1px);
|
|
39
|
+
outline: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:disabled {
|
|
43
|
+
opacity: 45%;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:invalid,
|
|
48
|
+
&__error {
|
|
49
|
+
background-color: map-get(
|
|
50
|
+
$color,
|
|
51
|
+
"formelements",
|
|
52
|
+
"input",
|
|
53
|
+
"error",
|
|
54
|
+
"background"
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:invalid {
|
|
59
|
+
@include bordervalues("input", "formelements", "invalid");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__error {
|
|
63
|
+
@include bordervalues("input", "formelements", "error");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@use "../tokens" as *;
|
|
2
|
+
@use "../functions" as *;
|
|
3
|
+
@import "../animations";
|
|
4
|
+
|
|
5
|
+
.ilo--input--toggle {
|
|
6
|
+
$c: &;
|
|
7
|
+
|
|
8
|
+
grid-area: input;
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: var(--toggle-width);
|
|
12
|
+
height: var(--toggle-height);
|
|
13
|
+
|
|
14
|
+
--base-toggle-width: #{px-to-rem(
|
|
15
|
+
map-get($spacing, "formelements", "toggle", "base", "width")
|
|
16
|
+
)};
|
|
17
|
+
|
|
18
|
+
--base-toggle-height: #{px-to-rem(
|
|
19
|
+
map-get($spacing, "formelements", "toggle", "base", "height")
|
|
20
|
+
)};
|
|
21
|
+
|
|
22
|
+
&__size__small {
|
|
23
|
+
--toggle-width: var(--base-toggle-width);
|
|
24
|
+
--toggle-height: var(--base-toggle-height);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__size__medium {
|
|
28
|
+
--toggle-width: calc(var(--base-toggle-width) * 1.5);
|
|
29
|
+
--toggle-height: calc(var(--base-toggle-height) * 1.5);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__size__large {
|
|
33
|
+
--toggle-width: calc(var(--base-toggle-width) * 2);
|
|
34
|
+
--toggle-height: calc(var(--base-toggle-height) * 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__disabled {
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__error {
|
|
43
|
+
#{$c}--slider {
|
|
44
|
+
outline-color: map-get(
|
|
45
|
+
$color,
|
|
46
|
+
"formelements",
|
|
47
|
+
"toggle",
|
|
48
|
+
"error",
|
|
49
|
+
"border"
|
|
50
|
+
) !important;
|
|
51
|
+
outline-width: calc(var(--toggle-height) / 8);
|
|
52
|
+
outline-style: solid;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
input[type="checkbox"] {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
padding: 0;
|
|
61
|
+
margin: 0;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--slider {
|
|
66
|
+
position: absolute;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
top: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
bottom: 0;
|
|
72
|
+
background-color: map-get(
|
|
73
|
+
$color,
|
|
74
|
+
"formelements",
|
|
75
|
+
"toggle",
|
|
76
|
+
"unchecked",
|
|
77
|
+
"background"
|
|
78
|
+
);
|
|
79
|
+
border-radius: calc(var(--toggle-height) / 2);
|
|
80
|
+
@include globaltransition("background");
|
|
81
|
+
|
|
82
|
+
&::before {
|
|
83
|
+
position: absolute;
|
|
84
|
+
content: "";
|
|
85
|
+
height: calc(var(--toggle-height) - var(--toggle-height) / 3);
|
|
86
|
+
width: calc(var(--toggle-height) - var(--toggle-height) / 3);
|
|
87
|
+
left: calc(var(--toggle-height) / 6);
|
|
88
|
+
bottom: calc(var(--toggle-height) / 6);
|
|
89
|
+
background-color: map-get(
|
|
90
|
+
$color,
|
|
91
|
+
"formelements",
|
|
92
|
+
"toggle",
|
|
93
|
+
"unchecked",
|
|
94
|
+
"slider",
|
|
95
|
+
"color"
|
|
96
|
+
);
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
@include globaltransition("transform, background");
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
input[type="checkbox"]:checked + &--slider {
|
|
103
|
+
background-color: map-get(
|
|
104
|
+
$color,
|
|
105
|
+
"formelements",
|
|
106
|
+
"toggle",
|
|
107
|
+
"checked",
|
|
108
|
+
"background"
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
input[type="checkbox"]:focus + &--slider {
|
|
113
|
+
outline-color: map-get(
|
|
114
|
+
$color,
|
|
115
|
+
"formelements",
|
|
116
|
+
"toggle",
|
|
117
|
+
"active",
|
|
118
|
+
"border"
|
|
119
|
+
);
|
|
120
|
+
outline-width: calc(var(--toggle-height) / 8);
|
|
121
|
+
outline-style: solid;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
input:checked + &--slider:before {
|
|
125
|
+
transform: translateX(calc(var(--toggle-width) - var(--toggle-height)));
|
|
126
|
+
background-color: map-get(
|
|
127
|
+
$color,
|
|
128
|
+
"formelements",
|
|
129
|
+
"toggle",
|
|
130
|
+
"checked",
|
|
131
|
+
"slider",
|
|
132
|
+
"color"
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@use "fieldset";
|
|
22
22
|
@use "file-upload";
|
|
23
23
|
@use "form";
|
|
24
|
-
@use "
|
|
24
|
+
@use "formcontrol";
|
|
25
25
|
@use "footer";
|
|
26
26
|
@use "heading";
|
|
27
27
|
@use "hero";
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
@use "tableofcontents";
|
|
49
49
|
@use "textarea";
|
|
50
50
|
@use "tag";
|
|
51
|
+
@use "textinput";
|
|
52
|
+
@use "toggle";
|
|
51
53
|
@use "tooltip";
|
|
52
54
|
@use "video";
|
|
53
55
|
@use "socialmedia";
|