@linzjs/lui 15.1.0 → 15.1.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,4 +1,3 @@
1
- @use '../../../Foundation/Variables/FormVars' as luiForms;
2
1
  @use '../../../Foundation/Variables/LuiColors' as luiColors;
3
2
  @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
4
3
  // Usage:
@@ -24,11 +23,6 @@ $border-size: 2px;
24
23
  display: block;
25
24
  user-select: none;
26
25
  cursor: pointer;
27
-
28
- // space them out if they're next to each other
29
- // &:not(:last-child) {
30
- // margin-bottom: 12px;
31
- // }
32
26
  }
33
27
 
34
28
  // <span> acting as the label
@@ -38,10 +32,9 @@ $border-size: 2px;
38
32
  flex-direction: row;
39
33
  align-items: flex-start;
40
34
  padding: 2px;
41
- @include luiForms.formLabel();
42
35
  margin-bottom: 0;
43
36
 
44
- .isDisabled & {
37
+ .LuiCheckboxInput--isDisabled & {
45
38
  cursor: not-allowed;
46
39
  color: luiColors.$disabled-color;
47
40
  }
@@ -57,76 +50,73 @@ $border-size: 2px;
57
50
  z-index: -1;
58
51
  }
59
52
 
60
- .LuiCheckboxInput-label::before {
61
- // Plug in your icon here
62
- font-size: 18px;
63
- line-height: 10px;
64
- content: ' ';
65
- display: block;
66
- text-align: center;
67
- color: transparent;
68
- width: $checkbox-size;
69
- height: $checkbox-size;
70
- border: $border-size solid luiColors.$sea;
71
- margin-right: luiForms.$checkbox-label-spacing;
72
- border-radius: 5px;
73
- transition: all 0.2s ease-in-out;
74
-
75
- .hasError & {
76
- border-color: #eb5757;
77
- }
78
- }
79
-
80
53
  .LuiCheckboxInput-error {
81
54
  margin-top: 2px;
82
55
  text-align: left;
83
56
  }
84
57
 
58
+ .LuiCheckboxInput-errorText {
59
+ color: luiColors.$error;
60
+ }
61
+
85
62
  .LuiCheckboxInput-errorIcon {
86
63
  margin-left: luiSpacing.$unit-lg;
87
64
  }
88
65
 
66
+ .LuiCheckboxInput-labelCheck {
67
+ position: relative;
68
+ fill: luiColors.$snow;
69
+ background-color: luiColors.$snow;
70
+ border-radius: 4px;
71
+ transition: background-color 0.3s ease-in-out;
72
+ order: -1;
73
+ margin-right: luiSpacing.$unit-xs;
74
+
75
+ &:before {
76
+ content: '';
77
+ position: absolute;
78
+ width: 24px;
79
+ height: 24px;
80
+ border: $border-size solid luiColors.$sea;
81
+ border-radius: 4px;
82
+ }
83
+
84
+ .LuiCheckboxInput-input:checked &,
85
+ .LuiCheckboxInput--isChecked & {
86
+ background-color: luiColors.$sea;
87
+ }
88
+ }
89
+
89
90
  // ============
90
91
  // STATES
91
92
  // ============
92
- .LuiCheckboxInput-input:checked + .LuiCheckboxInput-label::before,
93
- .LuiCheckboxInput--isChecked .LuiCheckboxInput-label::before {
94
- color: white;
95
- // base64 encoded version of `assets/icons/tick.svg`. referring to svg via it's path causes downstream import errors.
96
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNCAxMSI+CiAgICA8cGF0aCBmaWxsPSIjRkZGIiBkPSJNLjI5NyA0LjkzNGExLjAxMyAxLjAxMyAwIDAgMSAxLjM0NC0uMDc4bC4wODguMDc4TDUuMjU0IDguNDYgMTIuMjE5LjM1M2ExLjAxMyAxLjAxMyAwIDAgMSAxLjMzNC0uMThsLjA5NC4wNzJjLjM5NC4zMzguNDY0LjkxNC4xOCAxLjMzNGwtLjA3Mi4wOTQtNy42NzYgOC45MzVhMS4wMTMgMS4wMTMgMCAwIDEtMS4zOTguMTM0bC0uMDg3LS4wNzhMLjI5NyA2LjM2N2ExLjAxMyAxLjAxMyAwIDAgMSAwLTEuNDMzWiIvPgo8L3N2Zz4=');
97
- background-color: luiColors.$sea;
98
- background-repeat: no-repeat;
99
- background-position: 50% 50%;
100
- background-size: 15px;
101
- }
102
93
 
103
- .LuiCheckboxInput--hasError .LuiCheckboxInput-label::before {
94
+ // Error, unchecked
95
+ .LuiCheckboxInput--hasError .LuiCheckboxInput-labelCheck:before {
104
96
  border-color: luiColors.$error;
105
97
  }
106
98
 
107
- .LuiCheckboxInput--hasError.LuiCheckboxInput--isChecked
108
- .LuiCheckboxInput-label::before {
99
+ // Error, checked
100
+ .LuiCheckboxInput--isChecked.LuiCheckboxInput--hasError
101
+ .LuiCheckboxInput-labelCheck {
109
102
  background-color: luiColors.$error;
110
- border-color: luiColors.$error;
111
103
  }
112
104
 
113
- .LuiCheckboxInput--isDisabled:checked + .LuiCheckboxInput-label,
114
- .LuiCheckboxInput-input:checked:disabled + .LuiCheckboxInput-label {
115
- cursor: not-allowed;
116
- &::before {
117
- color: white;
118
- background-color: luiColors.$disabled-color;
119
- border-color: luiColors.$disabled-color;
120
- }
105
+ // Disabled, unchecked
106
+ .LuiCheckboxInput-input:disabled
107
+ + .LuiCheckboxInput-label
108
+ .LuiCheckboxInput-labelCheck:before,
109
+ .LuiCheckboxInput--isDisabled .LuiCheckboxInput-labelCheck:before {
110
+ border-color: luiColors.$disabled-color;
121
111
  }
122
112
 
123
- .LuiCheckboxInput--isDisabled + .LuiCheckboxInput-label,
124
- .LuiCheckboxInput-input:disabled + .LuiCheckboxInput-label {
125
- cursor: not-allowed;
126
- &::before {
127
- background-color: luiColors.$disabled-bg-color;
128
- border-color: luiColors.$disabled-color-dark;
129
- }
113
+ // Disabled, checked
114
+ .LuiCheckboxInput-input:checked:disabled
115
+ + .LuiCheckboxInput-label
116
+ .LuiCheckboxInput-labelCheck,
117
+ .LuiCheckboxInput--isChecked.LuiCheckboxInput--isDisabled
118
+ .LuiCheckboxInput-labelCheck {
119
+ background-color: luiColors.$disabled-color;
130
120
  }
131
121
 
132
122
  // ============
@@ -139,4 +129,4 @@ $border-size: 2px;
139
129
  margin-bottom: 0;
140
130
  margin-right: 24px;
141
131
  }
142
- }
132
+ }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "15.1.0",
2
+ "version": "15.1.1",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",
@@ -101,7 +101,7 @@
101
101
  "@types/react-modal": "^3.10.5",
102
102
  "@types/sass": "^1.16.0",
103
103
  "@types/uuid": "^8.3.1",
104
- "@types/yup": "0.29.0",
104
+ "@types/yup": "0.29.13",
105
105
  "chromatic": "^4.0.3",
106
106
  "conventional-changelog-conventionalcommits": "^4.6.1",
107
107
  "css-loader": "^3.6.0",
@@ -127,7 +127,7 @@
127
127
  "rollup-plugin-peer-deps-external": "^2.2.4",
128
128
  "rollup-plugin-postcss": "^3.1.8",
129
129
  "rollup-plugin-svg": "^2.0.0",
130
- "rollup-plugin-typescript2": "^0.29.0",
130
+ "rollup-plugin-typescript2": "^0.31.2",
131
131
  "sass": "^1.43.4",
132
132
  "sass-loader": "^8.0.2",
133
133
  "semantic-release": "^17.4.2",