@linzjs/lui 12.0.0 → 12.0.1

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.
@@ -1,10 +1,13 @@
1
1
  @use '../../../Foundation/Variables/FormVars' as luiForms;
2
2
  @use '../../../Foundation/Variables/FontVars' as luiFonts;
3
3
  @use '../../../Foundation/Variables/LuiColors' as luiColors;
4
+ @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
5
+ @use '../../../Foundation/Variables/MiscVars' as MiscVars;
6
+ @use '../../../Foundation/Utilities/REM' as rem;
4
7
 
5
- .LuiSelect {
6
- margin-bottom: 24px;
7
- }
8
+
9
+ // No top or bottom margins set on the component at the LUI level as we never know what is coming before or after the component.
10
+ // Set spacing once you have it in your project
8
11
 
9
12
  .LuiSelect-label-text {
10
13
  @include luiForms.formLabel();
@@ -13,15 +16,15 @@
13
16
  .LuiSelect-select {
14
17
  @include luiFonts.font-regular();
15
18
  margin-bottom: 0;
16
- border: 1px solid #b2b2b2;
17
- border-radius: 4px;
19
+ border: 1px solid luiColors.$silver;
20
+ border-radius: MiscVars.$borderRadius;
18
21
  display: block;
19
- height: 48px;
20
- color: #000000;
21
- caret-color: #000000;
22
+ height: luiSpacing.$unit-xl;
23
+ color: luiColors.$charcoal;
24
+ caret-color: luiColors.$charcoal;
22
25
  padding: {
23
- right: 32px;
24
- left: 16px;
26
+ right: luiSpacing.$unit-lg;
27
+ left: luiSpacing.$base-unit * 2; // 16px
25
28
  }
26
29
  width: 100%;
27
30
  transition: all 0.15 ease-in-out;
@@ -29,24 +32,23 @@
29
32
 
30
33
  &:hover,
31
34
  &:active {
32
- border-color: #053d52;
35
+ border-color: luiColors.$input-focus;
33
36
  cursor: pointer;
34
37
  }
35
38
 
36
39
  &:focus {
37
40
  outline: none;
38
- border-color: #053d52;
41
+ border-color: luiColors.$input-focus;
39
42
  }
40
43
 
41
44
  .hasError & {
42
- border-color: #eb5757;
45
+ border-color: luiColors.$error;
43
46
  }
44
47
 
45
48
  .isDisabled & {
46
- border-color: #b2b2b2;
47
- background-color: #fff;
48
- color: #b2b2b2;
49
- opacity: 0.3;
49
+ border-color: luiColors.$silver;
50
+ background-color: luiColors.$lily;
51
+ color: luiColors.$charcoal;
50
52
  cursor: not-allowed;
51
53
  }
52
54
 
@@ -61,6 +63,20 @@
61
63
 
62
64
  .LuiSelect-wrapper {
63
65
  position: relative;
66
+ .hasError & {
67
+ &:before {
68
+ content: '';
69
+ display: block;
70
+ position: absolute;
71
+ width: luiSpacing.$unit-sm;
72
+ top: 0;
73
+ bottom: 0;
74
+ left: -6px;
75
+ background-color: luiColors.$error;
76
+ border-radius: MiscVars.$borderRadius 0 0 MiscVars.$borderRadius;
77
+ z-index: -1;
78
+ }
79
+ }
64
80
  }
65
81
 
66
82
  .LuiSelect-chevron-icon {
@@ -74,12 +90,13 @@
74
90
  .LuiSelect-error {
75
91
  position: relative;
76
92
  display: flex;
77
- color: #eb5757;
93
+ @include luiFonts.font-semibold;
94
+ color: luiColors.$error;
78
95
  text-align: left;
79
- padding-left: 22px;
80
- font-size: 14px;
81
- line-height: 20px;
82
- margin-top: 2px;
96
+ padding-left: luiSpacing.$unit-md;
97
+ font-size: rem.rem(14px);
98
+ line-height: rem.rem(20px);
99
+ margin-top: luiSpacing.$unit-xxs;
83
100
  }
84
101
 
85
102
  .LuiSelect-error-icon {
@@ -3,28 +3,39 @@
3
3
  @use '../../../Foundation/Utilities/FluidType' as luiFluidType;
4
4
  @use '../../../Foundation/Variables/BreakpointVars' as luiBreakpoints;
5
5
  @use '../../../Foundation/Variables/LuiColors' as luiColors;
6
+ @use '../../../Foundation/Variables/MiscVars' as luiMisc;
7
+ @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
8
+ @use '../../../Foundation/Utilities/REM' as rem;
9
+
6
10
 
7
11
  // =============================
8
12
  // TextArea
9
13
  // =============================
10
14
 
15
+ // No top or bottom margins set on the component at the LUI level as we never know what is coming before or after the component.
16
+ // Set spacing once you have it in your project
17
+
11
18
  .LuiTextAreaInput {
12
19
  width: 100%;
13
- margin-bottom: 24px;
14
20
  position: relative;
15
21
 
16
22
  textarea {
17
23
  @include luiFonts.font-regular;
18
- @include luiFluidType.fluidType--size(14px, 16px, 1px, luiBreakpoints.$breakpoint-xl);
24
+ @include luiFluidType.fluidType--size(
25
+ 14px,
26
+ 16px,
27
+ 1px,
28
+ luiBreakpoints.$breakpoint-xl
29
+ );
19
30
  @include luiForms.formPlaceholder;
20
- border-radius: 4px;
21
- border: solid 1px #b2b2b2;
22
- background: #fff;
31
+ border: solid 1px luiColors.$silver;
32
+ border-radius: luiMisc.$borderRadius;
33
+ background: luiColors.$white;
23
34
  padding: {
24
- top: 14px;
25
- right: 32px;
26
- bottom: 14px;
27
- left: 16px;
35
+ top: luiSpacing.$unit-sm;
36
+ right: luiSpacing.$unit-lg;
37
+ bottom: luiSpacing.$unit-sm;
38
+ left: luiSpacing.$unit-xs * 2;
28
39
  }
29
40
  box-sizing: border-box;
30
41
  width: 100%;
@@ -33,7 +44,7 @@
33
44
 
34
45
  &:focus {
35
46
  outline: none;
36
- border-color: #053d52;
47
+ border-color: luiColors.$input-focus;
37
48
  }
38
49
  }
39
50
 
@@ -43,21 +54,32 @@
43
54
  }
44
55
 
45
56
  &.hasError {
46
- textarea,
47
- select {
48
- border-color: #eb5757;
57
+ textarea {
58
+ border: 1px solid luiColors.$error;
59
+ }
60
+ .LuiTextAreaInput-wrapper {
61
+ position: relative;
62
+
63
+ &:before {
64
+ content: '';
65
+ display: block;
66
+ position: absolute;
67
+ width: luiSpacing.$unit-sm;
68
+ top: 0;
69
+ bottom: 0;
70
+ left: -6px;
71
+ background-color: luiColors.$error;
72
+ border-radius: luiMisc.$borderRadius 0 0 luiMisc.$borderRadius;
73
+ z-index: -1;
74
+ }
49
75
  }
50
76
  }
51
77
 
52
78
  &.isDisabled {
53
79
  textarea {
54
- border-color: #b2b2b2;
55
- background-color: #fff;
80
+ border-color: luiColors.$silver;
81
+ background-color: luiColors.$lily;
56
82
  cursor: not-allowed;
57
- opacity: 0.3;
58
- }
59
- label {
60
- opacity: 0.3;
61
83
  }
62
84
  }
63
85
  }
@@ -69,12 +91,13 @@
69
91
  .LuiTextAreaInput-error {
70
92
  position: relative;
71
93
  display: flex;
72
- color: #eb5757;
94
+ color: luiColors.$error;
95
+ @include luiFonts.font-semibold;
73
96
  text-align: left;
74
- padding-left: 22px;
75
- font-size: 14px;
76
- line-height: 20px;
77
- margin-top: 2px;
97
+ padding-left: luiSpacing.$unit-md;
98
+ font-size: rem.rem(14px);
99
+ line-height: rem.rem(20px);
100
+ margin-top: luiSpacing.$unit-xxs;
78
101
  }
79
102
 
80
103
  .LuiTextAreaInput-error-icon {
@@ -2,7 +2,8 @@
2
2
  @use '../../../Foundation/Variables/FontVars' as luiFonts;
3
3
  @use '../../../Foundation/Variables/LuiColors' as luiColors;
4
4
  @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
5
- @use '../../../Foundation/Utilities/REM.scss' as rem;
5
+ @use '../../../Foundation/Variables/MiscVars' as MiscVars;
6
+ @use '../../../Foundation/Utilities/REM' as rem;
6
7
 
7
8
  $input-spacing: luiSpacing.$unit-xs; // 8px
8
9
 
@@ -11,10 +12,6 @@ $label-line-height: luiSpacing.$unit-md;
11
12
 
12
13
  .LuiTextInput {
13
14
  margin-bottom: 24px;
14
-
15
- &--hasError {
16
-
17
- }
18
15
  }
19
16
 
20
17
  .LuiTextInput-label {
@@ -32,7 +29,7 @@ $label-line-height: luiSpacing.$unit-md;
32
29
  box-shadow: -1px 0 0 0 transparent;
33
30
  border-radius: 4px;
34
31
  transition: box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s,
35
- border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
32
+ border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
36
33
 
37
34
  .hasError & {
38
35
  box-shadow: -8px 0px 0 0 luiColors.$error;
@@ -60,16 +57,16 @@ $label-line-height: luiSpacing.$unit-md;
60
57
  @include luiFonts.font-regular();
61
58
  @include luiForms.formPlaceholder;
62
59
  margin-bottom: 0;
63
- border: 1px solid #b2b2b2;
64
- border-radius: 4px;
65
- height: 48px;
66
- color: #000000;
67
- caret-color: #000000;
60
+ border: 1px solid luiColors.$silver;
61
+ border-radius: MiscVars.$borderRadius;
62
+ height: luiSpacing.$unit-xl;
63
+ color: luiColors.$charcoal;
64
+ caret-color: luiColors.$charcoal;
68
65
  padding: {
69
- top: 14px;
70
- right: 32px;
71
- bottom: 14px;
72
- left: 16px;
66
+ top: luiSpacing.$unit-sm;
67
+ right: luiSpacing.$unit-lg;
68
+ bottom: luiSpacing.$unit-sm;
69
+ left: luiSpacing.$unit-xs * 2;
73
70
  }
74
71
  width: 100%;
75
72
  transition: all 0.15 ease-in-out;
@@ -77,12 +74,12 @@ $label-line-height: luiSpacing.$unit-md;
77
74
 
78
75
  &:hover,
79
76
  &:active {
80
- border-color: #053d52;
77
+ border-color: luiColors.$input-focus;
81
78
  }
82
79
 
83
80
  &:focus {
84
81
  outline: none;
85
- border-color: #053d52;
82
+ border-color: luiColors.$input-focus;
86
83
  }
87
84
 
88
85
  .hasError & {
@@ -17,7 +17,7 @@ $spray: #73c8e1;
17
17
  $polar: #e2f3f7;
18
18
  $linz-linear-gradient-blue: linear-gradient(70deg, $teal 12%, $sea 100%);
19
19
 
20
- // Tealsno
20
+ // Teals
21
21
  $sherpa: #004b50;
22
22
  $surfie: #017a76;
23
23
  $persian: #00a599;
@@ -128,6 +128,7 @@ $input-placeholder-when-disabled: $gray;
128
128
  $base-icon-color: $sea;
129
129
  $disabled-color: $gray;
130
130
  $disabled-color-dark: $gray;
131
+ $input-focus: $teal;
131
132
 
132
133
  //LINZ public site colour variables
133
134
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "12.0.0",
2
+ "version": "12.0.1",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",