@linzjs/lui 16.2.1 → 16.2.4

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,4 +1,4 @@
1
- @use '../../Foundation/Variables/FormVars' as luiForms;
1
+ @use '../../Foundation/Variables/FormVars' as forms;
2
2
  @use "../../Foundation/Variables/MiscVars.scss" as misc;
3
3
  @use "../../Foundation/Variables/ColorVars.scss" as colors;
4
4
  @use '../../Foundation/Variables/FontVars.scss' as fonts;
@@ -1,14 +1,14 @@
1
- @use '../../Foundation/Variables/FormVars' as luiForms;
2
- @use '../../Foundation/Variables/SpacingVars' as luiSpacing;
1
+ @use '../../Foundation/Variables/FormVars' as forms;
2
+ @use '../../Foundation/Variables/SpacingVars' as spacing;
3
3
 
4
4
  .LuiError {
5
- @include luiForms.formLabel();
5
+ @include forms.formLabel();
6
6
 
7
7
  &-errorIcon {
8
8
  vertical-align: middle;
9
9
  display: inline-block;
10
10
  }
11
11
  &-errorText {
12
- margin-left: luiSpacing.$unit-xs;
12
+ margin-left: spacing.$unit-xs;
13
13
  }
14
- }
14
+ }
@@ -1,5 +1,7 @@
1
- @use '../../../Foundation/Variables/LuiColors' as luiColors;
2
- @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
1
+ @use '../../../Foundation/Variables/ColorVars' as colors;
2
+ @use '../../../Foundation/Variables/SpacingVars' as spacing;
3
+ @use '../../../Foundation/Variables/FontVars' as fonts;
4
+ @use '../../../Foundation/Variables/FormVars' as forms;
3
5
  @use '../../../Foundation/Variables/MiscVars' as misc;
4
6
  // Usage:
5
7
  // <label class="Checkbox" for="male">
@@ -18,6 +20,7 @@ $border-size: 2px;
18
20
  .LuiCheckboxInput {
19
21
  margin-bottom: 24px;
20
22
  box-sizing: border-box;
23
+ position: relative;
21
24
  }
22
25
 
23
26
  .LuiCheckboxInput-group {
@@ -37,6 +40,7 @@ $border-size: 2px;
37
40
 
38
41
  .LuiCheckboxInput--isDisabled & {
39
42
  cursor: not-allowed;
43
+ color: colors.$disabled-color;
40
44
  }
41
45
  }
42
46
 
@@ -56,22 +60,34 @@ $border-size: 2px;
56
60
  }
57
61
 
58
62
  .LuiCheckboxInput-errorText {
59
- color: luiColors.$error;
63
+ color: colors.$error;
60
64
  }
61
65
 
62
66
  .LuiCheckboxInput-errorIcon {
63
- margin-left: luiSpacing.$unit-lg;
67
+ margin-left: spacing.$unit-lg;
68
+ }
69
+
70
+ .LuiCheckboxInput-mandatory {
71
+ position: absolute;
72
+ left: -12px;
73
+ top: -4px;
74
+ @include fonts.font-semibold();
75
+ font-size: forms.$label-font-size;
76
+ color: colors.$error;
64
77
  }
65
78
 
66
79
  .LuiCheckboxInput-labelCheck {
67
80
  // position: relative;
68
- fill: rgba(luiColors.$snow, 0); // tick in checkbox default fill colour - make it transparent
69
- background-color: luiColors.$snow; // checkbox default bg colour
70
- border: $border-size solid luiColors.$sea;
81
+ fill: rgba(
82
+ colors.$snow,
83
+ 0
84
+ ); // tick in checkbox default fill colour - make it transparent
85
+ background-color: colors.$snow; // checkbox default bg colour
86
+ border: $border-size solid colors.$sea;
71
87
  border-radius: misc.$borderRadius;
72
88
  transition: background-color 0.3s ease-in-out;
73
89
  order: -1;
74
- margin-right: luiSpacing.$unit-xs;
90
+ margin-right: spacing.$unit-xs;
75
91
  svg {
76
92
  // with the borders on the span, we need to offset the SVG by Xpx to compensate and make it visually centred
77
93
  position: relative;
@@ -81,8 +97,8 @@ $border-size: 2px;
81
97
 
82
98
  .LuiCheckboxInput-input:checked &,
83
99
  .LuiCheckboxInput--isChecked & {
84
- background-color: luiColors.$sea;
85
- fill: rgba(luiColors.$snow, 1); // tick in checkbox now visible when checked
100
+ background-color: colors.$sea;
101
+ fill: rgba(colors.$snow, 1); // tick in checkbox now visible when checked
86
102
  }
87
103
  }
88
104
 
@@ -92,33 +108,33 @@ $border-size: 2px;
92
108
 
93
109
  // Error, unchecked
94
110
  .LuiCheckboxInput--hasError .LuiCheckboxInput-labelCheck {
95
- border-color: luiColors.$error;
111
+ border-color: colors.$error;
96
112
  }
97
113
 
98
114
  // Error, checked
99
115
  .LuiCheckboxInput--isChecked.LuiCheckboxInput--hasError
100
- .LuiCheckboxInput-labelCheck {
101
- background-color: luiColors.$error;
102
- border-color: luiColors.$error;
116
+ .LuiCheckboxInput-labelCheck {
117
+ background-color: colors.$error;
118
+ border-color: colors.$error;
103
119
  }
104
120
 
105
121
  // Disabled, unchecked
106
122
  .LuiCheckboxInput-input:disabled
107
- + .LuiCheckboxInput-label
108
- .LuiCheckboxInput-labelCheck,
123
+ + .LuiCheckboxInput-label
124
+ .LuiCheckboxInput-labelCheck,
109
125
  .LuiCheckboxInput--isDisabled .LuiCheckboxInput-labelCheck {
110
- border-color: luiColors.$disabled-color;
111
- background-color: luiColors.$disabled-bg-color;
126
+ border-color: colors.$disabled-color;
127
+ background-color: colors.$disabled-bg-color;
112
128
  }
113
129
 
114
130
  // Disabled, checked
115
131
  .LuiCheckboxInput-input:checked:disabled
116
- + .LuiCheckboxInput-label
117
- .LuiCheckboxInput-labelCheck,
132
+ + .LuiCheckboxInput-label
133
+ .LuiCheckboxInput-labelCheck,
118
134
  .LuiCheckboxInput--isChecked.LuiCheckboxInput--isDisabled
119
- .LuiCheckboxInput-labelCheck {
120
- background-color: luiColors.$disabled-color;
121
- border-color: luiColors.$disabled-color;
135
+ .LuiCheckboxInput-labelCheck {
136
+ background-color: colors.$disabled-color;
137
+ border-color: colors.$disabled-color;
122
138
  }
123
139
 
124
140
  // ============
@@ -131,4 +147,4 @@ $border-size: 2px;
131
147
  margin-bottom: 0;
132
148
  margin-right: 24px;
133
149
  }
134
- }
150
+ }
@@ -1,7 +1,7 @@
1
- @use '../../../scss/Foundation/Variables/LuiColors' as luiColors;
1
+ @use '../../../scss/Foundation/Variables/LuiColors' as colors;
2
2
 
3
3
  .LuiFileInputBox-upload {
4
- outline: 2px dashed luiColors.$lily;
4
+ outline: 2px dashed colors.$lily;
5
5
  color: dimgray;
6
6
  cursor: pointer;
7
7
  position: relative;
@@ -32,26 +32,26 @@
32
32
  }
33
33
 
34
34
  .LuiFileInputBox-upload-error {
35
- outline: 2px dashed luiColors.$error;
35
+ outline: 2px dashed colors.$error;
36
36
  }
37
37
 
38
38
  .LuiFileInputBox-upload-icon-success {
39
39
  width: 120px;
40
- fill: luiColors.$success;
40
+ fill: colors.$success;
41
41
  margin-left: auto;
42
42
  margin-right: auto;
43
43
  }
44
44
 
45
45
  .LuiFileInputBox-upload-icon-upload {
46
46
  width: 120px;
47
- fill: luiColors.$sea;
47
+ fill: colors.$sea;
48
48
  margin-left: auto;
49
49
  margin-right: auto;
50
50
  }
51
51
 
52
52
  .LuiFileInputBox-upload-icon-error {
53
53
  width: 168px;
54
- fill: luiColors.$error;
54
+ fill: colors.$error;
55
55
  margin-left: auto;
56
56
  margin-right: auto;
57
57
  }
@@ -61,7 +61,7 @@
61
61
  padding-top: 8px;
62
62
 
63
63
  span {
64
- color: luiColors.$info;
64
+ color: colors.$info;
65
65
  font-weight: 600;
66
66
  }
67
67
  }
@@ -1,7 +1,7 @@
1
- @use '../../../Foundation/Variables/FontVars' as luiFonts;
2
- @use '../../../Foundation/Variables/LuiColors' as luiColors;
3
- @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
4
- @use '../../../Foundation/Utilities/ScreenReadersOnly' as luiScreenReadersOnly;
1
+ @use '../../../Foundation/Variables/FontVars' as fonts;
2
+ @use '../../../Foundation/Variables/LuiColors' as colors;
3
+ @use '../../../Foundation/Variables/SpacingVars' as spacing;
4
+ @use '../../../Foundation/Utilities/ScreenReadersOnly' as screen;
5
5
 
6
6
  .LuiRadioInput-fieldset {
7
7
  border: none;
@@ -9,11 +9,11 @@
9
9
  }
10
10
 
11
11
  .LuiRadioInput-input {
12
- @include luiScreenReadersOnly.ScreenReadersOnly();
12
+ @include screen.ScreenReadersOnly();
13
13
  }
14
14
 
15
15
  .LuiRadioInput-legend {
16
- @include luiFonts.font-semibold;
16
+ @include fonts.font-semibold;
17
17
  }
18
18
 
19
19
  .LuiRadioInput-label {
@@ -22,20 +22,20 @@
22
22
  justify-content: flex-start;
23
23
  align-items: flex-start;
24
24
  cursor: pointer;
25
- padding: luiSpacing.$unit-xs 0 luiSpacing.$unit-xs luiSpacing.$unit-lg;
25
+ padding: spacing.$unit-xs 0 spacing.$unit-xs spacing.$unit-lg;
26
26
 
27
27
  &:before {
28
28
  content: '';
29
29
  height: 1.5rem; // 20px
30
30
  min-width: 1.5rem; // 20px
31
31
  width: 1.5rem; // 20px
32
- border: 2px solid luiColors.$sea;
32
+ border: 2px solid colors.$sea;
33
33
  border-radius: 50%;
34
34
  background-color: transparent;
35
35
  position: absolute;
36
36
  left: 0;
37
37
  top: 8px;
38
- margin-right: luiSpacing.$unit-sm;
38
+ margin-right: spacing.$unit-sm;
39
39
  }
40
40
 
41
41
  &:after {
@@ -57,33 +57,34 @@
57
57
  }
58
58
 
59
59
  &--isDisabled {
60
+ color: colors.$disabled-color;
60
61
  cursor: not-allowed;
61
62
 
62
63
  &:before {
63
- background-color: luiColors.$disabled-bg-color;
64
- border-color: luiColors.$disabled-color;
64
+ background-color: colors.$disabled-bg-color;
65
+ border-color: colors.$disabled-color;
65
66
  }
66
67
  &:after {
67
- background-color: luiColors.$disabled-color-dark;
68
+ background-color: colors.$disabled-color-dark;
68
69
  }
69
70
  }
70
71
  }
71
72
 
72
73
  .LuiRadioInput--hasError {
73
74
  .LuiRadioInput-label:before {
74
- border-color: luiColors.$error;
75
+ border-color: colors.$error;
75
76
  }
76
77
  }
77
78
 
78
79
  .LuiRadioInput-errorMsg {
79
80
  display: flex;
80
- margin-top: luiSpacing.$unit-xs;
81
+ margin-top: spacing.$unit-xs;
81
82
 
82
83
  .LuiIcon--error {
83
- margin-right: luiSpacing.$unit-xs;
84
+ margin-right: spacing.$unit-xs;
84
85
  }
85
86
 
86
87
  p {
87
88
  margin: 0;
88
89
  }
89
- }
90
+ }
@@ -1,30 +1,33 @@
1
- @use '../../../Foundation/Variables/FormVars' as luiForms;
2
- @use '../../../Foundation/Variables/FontVars' as luiFonts;
3
- @use '../../../Foundation/Variables/LuiColors' as luiColors;
4
- @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
1
+ @use '../../../Foundation/Variables/FormVars' as forms;
2
+ @use '../../../Foundation/Variables/FontVars' as fonts;
3
+ @use '../../../Foundation/Variables/LuiColors' as colors;
4
+ @use '../../../Foundation/Variables/SpacingVars' as spacing;
5
5
  @use '../../../Foundation/Variables/MiscVars' as MiscVars;
6
6
  @use '../../../Foundation/Utilities/REM' as rem;
7
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.
8
+ // 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
9
  // Set spacing once you have it in your project
11
10
 
11
+ .LuiSelect-label {
12
+ position: relative;
13
+ }
14
+
12
15
  .LuiSelect-label-text {
13
- @include luiForms.formLabel();
16
+ @include forms.formLabel();
14
17
  }
15
18
 
16
19
  .LuiSelect-select {
17
- @include luiFonts.font-regular();
20
+ @include fonts.font-regular();
18
21
  margin-bottom: 0;
19
- border: 1px solid luiColors.$silver;
22
+ border: 1px solid colors.$silver;
20
23
  border-radius: MiscVars.$borderRadius;
21
24
  display: block;
22
- height: luiSpacing.$unit-xl;
23
- color: luiColors.$charcoal;
24
- caret-color: luiColors.$charcoal;
25
+ height: spacing.$unit-xl;
26
+ color: colors.$charcoal;
27
+ caret-color: colors.$charcoal;
25
28
  padding: {
26
- right: luiSpacing.$unit-lg;
27
- left: luiSpacing.$base-unit * 2; // 16px
29
+ right: spacing.$unit-lg;
30
+ left: spacing.$base-unit * 2; // 16px
28
31
  }
29
32
  width: 100%;
30
33
  transition: all 0.15 ease-in-out;
@@ -32,23 +35,23 @@
32
35
 
33
36
  &:hover,
34
37
  &:active {
35
- border-color: luiColors.$input-focus;
38
+ border-color: colors.$input-focus;
36
39
  cursor: pointer;
37
40
  }
38
41
 
39
42
  &:focus {
40
43
  outline: none;
41
- border-color: luiColors.$input-focus;
44
+ border-color: colors.$input-focus;
42
45
  }
43
46
 
44
47
  .hasError & {
45
- border-color: luiColors.$error;
48
+ border-color: colors.$error;
46
49
  }
47
50
 
48
51
  .isDisabled & {
49
- border-color: luiColors.$silver;
50
- background-color: luiColors.$lily;
51
- color: luiColors.$charcoal;
52
+ border-color: colors.$silver;
53
+ background-color: colors.$lily;
54
+ color: colors.$charcoal;
52
55
  cursor: not-allowed;
53
56
  }
54
57
 
@@ -57,7 +60,7 @@
57
60
  }
58
61
 
59
62
  .hasValue & {
60
- color: luiColors.$charcoal;
63
+ color: colors.$charcoal;
61
64
  }
62
65
  }
63
66
 
@@ -68,11 +71,11 @@
68
71
  content: '';
69
72
  display: block;
70
73
  position: absolute;
71
- width: luiSpacing.$unit-sm;
74
+ width: spacing.$unit-sm;
72
75
  top: 0;
73
76
  bottom: 0;
74
77
  left: -6px;
75
- background-color: luiColors.$error;
78
+ background-color: colors.$error;
76
79
  border-radius: MiscVars.$borderRadius 0 0 MiscVars.$borderRadius;
77
80
  z-index: -1;
78
81
  }
@@ -90,13 +93,13 @@
90
93
  .LuiSelect-error {
91
94
  position: relative;
92
95
  display: flex;
93
- @include luiFonts.font-semibold;
94
- color: luiColors.$error;
96
+ @include fonts.font-semibold;
97
+ color: colors.$error;
95
98
  text-align: left;
96
- padding-left: luiSpacing.$unit-md;
99
+ padding-left: spacing.$unit-md;
97
100
  font-size: rem.rem(14px);
98
101
  line-height: rem.rem(20px);
99
- margin-top: luiSpacing.$unit-xxs;
102
+ margin-top: spacing.$unit-xxs;
100
103
  }
101
104
 
102
105
  .LuiSelect-error-icon {
@@ -106,8 +109,10 @@
106
109
  }
107
110
 
108
111
  .LuiSelect-mandatory {
109
- display: inline-block;
110
- width: 10px;
111
- margin: 0 0 0 -10px;
112
- color: luiColors.$error;
113
- }
112
+ position: absolute;
113
+ left: -12px;
114
+ top: 0;
115
+ @include fonts.font-semibold();
116
+ font-size: forms.$label-font-size;
117
+ color: colors.$error;
118
+ }
@@ -1,17 +1,17 @@
1
- @use '../../../Foundation/Variables/FormVars' as luiForms;
2
- @use '../../../Foundation/Variables/FontVars' as luiFonts;
1
+ @use '../../../Foundation/Variables/FormVars' as forms;
2
+ @use '../../../Foundation/Variables/FontVars' as fonts;
3
3
  @use '../../../Foundation/Utilities/FluidType' as luiFluidType;
4
- @use '../../../Foundation/Variables/BreakpointVars' as luiBreakpoints;
5
- @use '../../../Foundation/Variables/LuiColors' as luiColors;
6
- @use '../../../Foundation/Variables/MiscVars' as luiMisc;
7
- @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
4
+ @use '../../../Foundation/Variables/BreakpointVars' as breakpoints;
5
+ @use '../../../Foundation/Variables/LuiColors' as colors;
6
+ @use '../../../Foundation/Variables/MiscVars' as misc;
7
+ @use '../../../Foundation/Variables/SpacingVars' as spacing;
8
8
  @use '../../../Foundation/Utilities/REM' as rem;
9
9
 
10
10
  // =============================
11
11
  // TextArea
12
12
  // =============================
13
13
 
14
- // 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.
14
+ // 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.
15
15
  // Set spacing once you have it in your project
16
16
 
17
17
  .LuiTextAreaInput {
@@ -19,22 +19,22 @@
19
19
  position: relative;
20
20
 
21
21
  textarea {
22
- @include luiFonts.font-regular;
22
+ @include fonts.font-regular;
23
23
  @include luiFluidType.fluidType--size(
24
24
  14px,
25
25
  16px,
26
26
  1px,
27
- luiBreakpoints.$breakpoint-xl
27
+ breakpoints.$breakpoint-xl
28
28
  );
29
- @include luiForms.formPlaceholder;
30
- border: solid 1px luiColors.$silver;
31
- border-radius: luiMisc.$borderRadius;
32
- background: luiColors.$white;
29
+ @include forms.formPlaceholder;
30
+ border: solid 1px colors.$silver;
31
+ border-radius: misc.$borderRadius;
32
+ background: colors.$white;
33
33
  padding: {
34
- top: luiSpacing.$unit-sm;
35
- right: luiSpacing.$unit-lg;
36
- bottom: luiSpacing.$unit-sm;
37
- left: luiSpacing.$unit-xs * 2;
34
+ top: spacing.$unit-sm;
35
+ right: spacing.$unit-lg;
36
+ bottom: spacing.$unit-sm;
37
+ left: spacing.$unit-xs * 2;
38
38
  }
39
39
  box-sizing: border-box;
40
40
  width: 100%;
@@ -44,7 +44,7 @@
44
44
 
45
45
  &:focus {
46
46
  outline: none;
47
- border-color: luiColors.$input-focus;
47
+ border-color: colors.$input-focus;
48
48
  }
49
49
  }
50
50
 
@@ -55,7 +55,7 @@
55
55
 
56
56
  &.hasError {
57
57
  textarea {
58
- border: 1px solid luiColors.$error;
58
+ border: 1px solid colors.$error;
59
59
  }
60
60
  .LuiTextAreaInput-wrapper {
61
61
  position: relative;
@@ -64,39 +64,40 @@
64
64
  content: '';
65
65
  display: block;
66
66
  position: absolute;
67
- width: luiSpacing.$unit-sm;
67
+ width: spacing.$unit-sm;
68
68
  top: 0;
69
69
  bottom: 0;
70
70
  left: -6px;
71
- background-color: luiColors.$error;
72
- border-radius: luiMisc.$borderRadius 0 0 luiMisc.$borderRadius;
71
+ background-color: colors.$error;
72
+ border-radius: misc.$borderRadius 0 0 misc.$borderRadius;
73
73
  }
74
74
  }
75
75
  }
76
76
 
77
77
  &.isDisabled {
78
78
  textarea {
79
- border-color: luiColors.$silver;
80
- background-color: luiColors.$lily;
79
+ border-color: colors.$silver;
80
+ background-color: colors.$lily;
81
81
  cursor: not-allowed;
82
82
  }
83
83
  }
84
84
  }
85
85
 
86
86
  .LuiTextAreaInput-label {
87
- @include luiForms.formLabel;
87
+ @include forms.formLabel;
88
+ position: relative;
88
89
  }
89
90
 
90
91
  .LuiTextAreaInput-error {
91
92
  position: relative;
92
93
  display: flex;
93
- color: luiColors.$error;
94
- @include luiFonts.font-semibold;
94
+ color: colors.$error;
95
+ @include fonts.font-semibold;
95
96
  text-align: left;
96
- padding-left: luiSpacing.$unit-md;
97
+ padding-left: spacing.$unit-md;
97
98
  font-size: rem.rem(14px);
98
99
  line-height: rem.rem(20px);
99
- margin-top: luiSpacing.$unit-xxs;
100
+ margin-top: spacing.$unit-xxs;
100
101
  }
101
102
 
102
103
  .LuiTextAreaInput-error-icon {
@@ -106,10 +107,10 @@
106
107
  }
107
108
 
108
109
  .LuiTextAreaInput-mandatory {
109
- display: inline-block;
110
- @include luiFonts.font-semibold();
111
- font-size: luiForms.$label-font-size;
112
- width: 10px;
113
- margin: 0 0 0 -10px;
114
- color: luiColors.$error;
115
- }
110
+ position: absolute;
111
+ left: -12px;
112
+ top: 0px;
113
+ @include fonts.font-semibold();
114
+ font-size: forms.$label-font-size;
115
+ color: colors.$error;
116
+ }