@ilo-org/styles 1.12.0 → 1.13.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ilo-org/styles",
3
3
  "description": "Styles for products using ILO's Design System",
4
- "version": "1.12.0",
4
+ "version": "1.13.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/international-labour-organization/designsystem.git",
@@ -19,6 +19,10 @@
19
19
  display: inline-block;
20
20
  position: relative;
21
21
 
22
+ &__size__small {
23
+ --ilo-dropdown-height: #{px-to-rem(32px)};
24
+ }
25
+
22
26
  &:before {
23
27
  content: "";
24
28
  pointer-events: none;
@@ -67,16 +71,26 @@
67
71
  &:hover,
68
72
  &:focus,
69
73
  &:active {
70
- border-left-color: var(--ilo-color-blue);
71
- border-left-width: px-to-rem(3px);
72
- padding-left: calc(#{spacing(4)} - #{px-to-rem(1px)});
74
+ border-inline-start-color: var(--ilo-color-blue);
75
+ box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-blue);
73
76
  background-color: var(--ilo-dropdown-background-color-active);
74
77
  --ilo-dropdown-color: var(--ilo-color-gray-charcoal);
75
78
  }
76
79
 
80
+ [dir="rtl"] &:hover,
81
+ [dir="rtl"] &:focus,
82
+ [dir="rtl"] &:active {
83
+ box-shadow: inset px-to-rem(-1px) 0 0 0 var(--ilo-color-blue);
84
+ }
85
+
77
86
  option {
78
87
  width: 100%;
79
88
  text-overflow: ellipsis;
80
89
  overflow: hidden;
81
90
  }
91
+
92
+ &__size__small {
93
+ padding: 0 spacing(11) 0 spacing(3);
94
+ @include typography("body-xsmall");
95
+ }
82
96
  }
@@ -15,6 +15,10 @@
15
15
  grid-template-columns: auto;
16
16
  gap: spacing(2);
17
17
 
18
+ &:has(#{$c}--label__size__small) {
19
+ gap: spacing(1);
20
+ }
21
+
18
22
  &__theme {
19
23
  &__light {
20
24
  --ilo-form-control-label-color: var(--ilo-color-gray-charcoal);
@@ -146,7 +150,7 @@
146
150
 
147
151
  &__size {
148
152
  &__small {
149
- @include typography("highlight-small-bold");
153
+ @include typography("body-xsmall");
150
154
  }
151
155
 
152
156
  &__medium {
@@ -1,37 +1,55 @@
1
1
  @use "../functions" as *;
2
2
  @import "../mixins";
3
3
 
4
+ // Base styles for the .ilo--input class, applied by TextInput, NumberPicker,
5
+ // DatePicker, and SearchField (and extended in _datepicker.scss). This is the
6
+ // shared form-input base — keep it even though there is no standalone Input
7
+ // component.
4
8
  .ilo--input {
5
9
  appearance: none;
6
10
  background-color: var(--ilo-color-white);
7
11
  border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
8
12
  box-sizing: border-box;
9
- font-family: var(--ilo-fonts-copy);
10
- font-weight: var(--ilo-font-weight-medium);
11
- @include typography("highlight-medium");
12
13
  height: px-to-rem(48px);
13
14
  margin: spacing(0);
14
15
  outline: none;
15
- padding: spacing(4) spacing(3) spacing(4) spacing(3);
16
+ padding: spacing(4) spacing(3);
16
17
  width: 100%;
18
+ @include typography("highlight-medium");
19
+
20
+ &__size__small {
21
+ height: px-to-rem(32px);
22
+ padding: spacing(2) spacing(3);
23
+ @include typography("body-xsmall");
24
+ }
17
25
 
18
26
  &:focus {
19
27
  background-color: var(--ilo-color-blue-lighter);
20
28
  border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
21
- padding-left: spacing(3);
29
+ border-inline-start-color: var(--ilo-color-blue);
30
+ box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-blue);
22
31
  outline: none;
23
32
  }
24
33
 
34
+ [dir="rtl"] &:focus {
35
+ box-shadow: inset px-to-rem(-1px) 0 0 0 var(--ilo-color-blue);
36
+ }
37
+
25
38
  &:disabled {
26
39
  opacity: 0.45;
27
40
  pointer-events: none;
28
41
  }
29
42
 
30
43
  &:invalid,
31
- &.error,
32
- .error & {
44
+ &__error {
33
45
  background-color: var(--ilo-color-white);
34
46
  border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
35
- border-left: px-to-rem(3px) solid var(--ilo-color-red-dark);
47
+ border-inline-start-color: var(--ilo-color-red-dark);
48
+ box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-red-dark);
49
+ }
50
+
51
+ [dir="rtl"] &:invalid,
52
+ [dir="rtl"] &__error {
53
+ box-shadow: inset px-to-rem(-1px) 0 0 0 var(--ilo-color-red-dark);
36
54
  }
37
55
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .ilo--input {
13
- padding-inline-end: spacing(14);
13
+ padding-inline-end: spacing(9);
14
14
  }
15
15
 
16
16
  &--button {
@@ -70,6 +70,34 @@
70
70
  }
71
71
  }
72
72
 
73
+ &__size__small {
74
+ .ilo--input {
75
+ padding-inline-end: spacing(4);
76
+ }
77
+
78
+ .ilo--searchfield--button {
79
+ width: px-to-rem(32px);
80
+
81
+ &:after {
82
+ height: px-to-rem(16px);
83
+ width: px-to-rem(16px);
84
+ }
85
+ }
86
+
87
+ .ilo--searchfield--clear-button {
88
+ svg {
89
+ display: block;
90
+ width: px-to-rem(16px);
91
+ height: px-to-rem(16px);
92
+ }
93
+
94
+ &.show {
95
+ top: 50%;
96
+ transform: translateY(-50%);
97
+ }
98
+ }
99
+ }
100
+
73
101
  // Remove the default clear button in search
74
102
  [type="search"]::-webkit-search-cancel-button {
75
103
  -webkit-appearance: none;
@@ -22,11 +22,15 @@
22
22
  &:focus {
23
23
  background-color: var(--ilo-color-blue-lighter);
24
24
  border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
25
- border-left: px-to-rem(3px) solid var(--ilo-color-blue-medium);
26
- padding-left: spacing(3);
25
+ border-inline-start-color: var(--ilo-color-blue-medium);
26
+ box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-blue-medium);
27
27
  outline: none;
28
28
  }
29
29
 
30
+ [dir="rtl"] &:focus {
31
+ box-shadow: inset px-to-rem(-1px) 0 0 0 var(--ilo-color-blue-medium);
32
+ }
33
+
30
34
  &:disabled {
31
35
  opacity: 0.45;
32
36
  pointer-events: none;
@@ -37,6 +41,13 @@
37
41
  &__error & {
38
42
  background-color: var(--ilo-color-white);
39
43
  border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
40
- border-left: px-to-rem(3px) solid var(--ilo-color-red-dark);
44
+ border-inline-start-color: var(--ilo-color-red-dark);
45
+ box-shadow: inset px-to-rem(1px) 0 0 0 var(--ilo-color-red-dark);
46
+ }
47
+
48
+ [dir="rtl"] &:invalid,
49
+ [dir="rtl"] &__error,
50
+ [dir="rtl"] &__error & {
51
+ box-shadow: inset px-to-rem(-1px) 0 0 0 var(--ilo-color-red-dark);
41
52
  }
42
53
  }
@@ -49,7 +49,6 @@
49
49
  @use "tableofcontents";
50
50
  @use "textarea";
51
51
  @use "tag";
52
- @use "textinput";
53
52
  @use "toggle";
54
53
  @use "tooltip";
55
54
  @use "video";
@@ -1 +0,0 @@
1
- @keyframes emptygradient{0%{opacity:1}to{opacity:0}}@keyframes spin{to{-moz-transform:rotate(1turn);-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDown{0%{opacity:0;transform:translateY(-30px)}to{opacity:1;transform:translateY(0)}}.ilo--text-input{appearance:none;background-color:var(--ilo-color-white);box-sizing:border-box;font-family:var(--ilo-fonts-copy);font-family:var(--ilo-fonts-display);font-size:var(--ilo-font-size-md);font-weight:var(--ilo-font-weight-medium);height:2.5723472669rem;letter-spacing:var(--ilo-letter-spacing-sm);line-height:var(--ilo-line-height-xlg);margin:calc(var(--ilo-spacing-base)*0);padding:calc(var(--ilo-spacing-base)*4) calc(var(--ilo-spacing-base)*3);width:100%}.ilo--text-input,.ilo--text-input:focus{border:var(--ilo-border-md) solid var(--ilo-color-gray-base);outline:0}.ilo--text-input:focus{background-color:var(--ilo-color-blue-lighter);border-left:.1607717042rem solid var(--ilo-color-blue);padding-left:calc(var(--ilo-spacing-base)*3)}.ilo--text-input:disabled{opacity:.45;pointer-events:none}.ilo--text-input:invalid,.ilo--text-input__error{background-color:var(--ilo-color-white);border:var(--ilo-border-md) solid var(--ilo-color-gray-base);border-left:.1607717042rem solid var(--ilo-color-red-dark)}
@@ -1,37 +0,0 @@
1
- @use "../functions" as *;
2
- @import "../mixins";
3
-
4
- .ilo--text-input {
5
- appearance: none;
6
- background-color: var(--ilo-color-white);
7
- border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
8
- box-sizing: border-box;
9
- font-family: var(--ilo-fonts-copy);
10
- font-weight: var(--ilo-font-weight-medium);
11
- @include typography("highlight-medium");
12
- height: px-to-rem(48px);
13
- margin: spacing(0);
14
- outline: none;
15
- padding: spacing(4) spacing(3);
16
- width: 100%;
17
-
18
- &:focus {
19
- background-color: var(--ilo-color-blue-lighter);
20
- border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
21
- border-left: px-to-rem(3px) solid var(--ilo-color-blue);
22
- padding-left: spacing(3);
23
- outline: none;
24
- }
25
-
26
- &:disabled {
27
- opacity: 0.45;
28
- pointer-events: none;
29
- }
30
-
31
- &:invalid,
32
- &__error {
33
- background-color: var(--ilo-color-white);
34
- border: var(--ilo-border-md) solid var(--ilo-color-gray-base);
35
- border-left: px-to-rem(3px) solid var(--ilo-color-red-dark);
36
- }
37
- }