@linzjs/lui 11.3.1 → 11.7.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/assets/icons/tick.svg +3 -0
  3. package/dist/components/LuiError/LuiError.d.ts +1 -1
  4. package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +0 -1
  5. package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.d.ts +0 -1
  6. package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +0 -1
  7. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.d.ts +0 -1
  8. package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.d.ts +0 -1
  9. package/dist/components/LuiIcon/LuiIcon.stories.d.ts +1 -2
  10. package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.stories.d.ts +1 -1
  11. package/dist/components/LuiShadow/LuiShadow.d.ts +0 -1
  12. package/dist/components/LuiShadow/LuiShadow.stories.d.ts +1 -1
  13. package/dist/lui.cjs.development.js +13 -26
  14. package/dist/lui.cjs.development.js.map +1 -1
  15. package/dist/lui.cjs.production.min.js +1 -1
  16. package/dist/lui.cjs.production.min.js.map +1 -1
  17. package/dist/lui.css +531 -0
  18. package/dist/lui.css.map +1 -1
  19. package/dist/lui.esm.js +13 -26
  20. package/dist/lui.esm.js.map +1 -1
  21. package/dist/scss/Components/LuiError/LuiError.scss +14 -0
  22. package/dist/scss/Components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.scss +151 -0
  23. package/dist/scss/Components/LuiFormElements/LuiRadioInput/LuiRadioInput.scss +86 -0
  24. package/dist/scss/Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss +89 -0
  25. package/dist/scss/Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss +83 -0
  26. package/dist/scss/Components/LuiFormElements/LuiTextInput/LuiTextInput.scss +146 -0
  27. package/dist/scss/Components/LuiShadow/LuiShadow.scss +16 -0
  28. package/dist/scss/Foundation/Variables/FormVars.scss +1 -0
  29. package/dist/scss/base.scss +7 -0
  30. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ @use '../../Foundation/Variables/FormVars' as luiForms;
2
+ @use '../../Foundation/Variables/SpacingVars' as luiSpacing;
3
+
4
+ .LuiError {
5
+ @include luiForms.formLabel();
6
+
7
+ &-errorIcon {
8
+ vertical-align: middle;
9
+ display: inline-block;
10
+ }
11
+ &-errorText {
12
+ margin-left: luiSpacing.$unit-xs;
13
+ }
14
+ }
@@ -0,0 +1,151 @@
1
+ @use '../../../Foundation/Variables/FormVars' as luiForms;
2
+ @use '../../../Foundation/Variables/LuiColors' as luiColors;
3
+ @use '../../../Foundation/Variables/SpacingVars' as luiSpacing;
4
+ // Usage:
5
+ // <label class="Checkbox" for="male">
6
+ // <input class="Checkbox-input" type="checkbox" id="male">
7
+ // <span class="Checkbox-label">Content here</span>
8
+ // </label>
9
+ // <label class="Checkbox" for="female">
10
+ // <input class="Checkbox-input" type="checkbox" id="female">
11
+ // <span class="Checkbox-label">Content here</span>
12
+ // </label>
13
+
14
+ $checkbox-size: 23px;
15
+ $border-size: 2px;
16
+
17
+ // <label>
18
+ .LuiCheckboxInput {
19
+ margin-bottom: 24px;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .LuiCheckboxInput-group {
24
+ display: block;
25
+ user-select: none;
26
+ cursor: pointer;
27
+
28
+ // space them out if they're next to each other
29
+ // &:not(:last-child) {
30
+ // margin-bottom: 12px;
31
+ // }
32
+ }
33
+
34
+ // <span> acting as the label
35
+ .LuiCheckboxInput-label {
36
+ position: relative;
37
+ display: flex;
38
+ flex-direction: row;
39
+ align-items: flex-start;
40
+ padding: 2px;
41
+ @include luiForms.formLabel();
42
+ margin-bottom: 0;
43
+
44
+ .isDisabled & {
45
+ cursor: not-allowed;
46
+ color: luiColors.$disabled-color;
47
+ }
48
+ }
49
+
50
+ // say goodbye to the real input
51
+ .LuiCheckboxInput-input {
52
+ width: 0.1px;
53
+ height: 0.1px;
54
+ opacity: 0;
55
+ overflow: hidden;
56
+ position: absolute;
57
+ z-index: -1;
58
+ }
59
+
60
+ // say hello to the fake input
61
+ .LuiCheckboxInput-label::after {
62
+ // Plug in your icon here
63
+ // font-size: 18px;
64
+ // line-height: 10px;
65
+ // content: ' ';
66
+ // display: block;
67
+ // text-align: center;
68
+ // color: transparent;
69
+ // width: $checkbox-size;
70
+ // height: $checkbox-size;
71
+ // // border: 3px solid white;
72
+ // box-shadow: 0 0 0 2px #053d52;
73
+ // margin-right: 12px;
74
+ // margin-top: 3px;
75
+ // border-radius: 2px;
76
+ }
77
+
78
+ .LuiCheckboxInput-label::before {
79
+ // Plug in your icon here
80
+ font-size: 18px;
81
+ line-height: 10px;
82
+ content: ' ';
83
+ display: block;
84
+ text-align: center;
85
+ color: transparent;
86
+ width: $checkbox-size;
87
+ height: $checkbox-size;
88
+ border: $border-size solid luiColors.$sea;
89
+ margin-right: luiForms.$checkbox-label-spacing;
90
+ border-radius: 5px;
91
+ transition: all 0.2s ease-in-out;
92
+
93
+ .hasError & {
94
+ border-color: #eb5757;
95
+ }
96
+ }
97
+
98
+ .LuiCheckboxInput-error {
99
+ margin-top: 2px;
100
+ text-align: left;
101
+ }
102
+
103
+ .LuiCheckboxInput-errorIcon {
104
+ margin-left: luiSpacing.$unit-lg;
105
+ }
106
+
107
+ // ============
108
+ // STATES
109
+ // ============
110
+ .LuiCheckboxInput-input:checked + .LuiCheckboxInput-label::before,
111
+ .LuiCheckboxInput--isChecked .LuiCheckboxInput-label::before {
112
+ color: white;
113
+ background: luiColors.$sea url('../assets/icons/tick.svg') no-repeat 50% 50%;
114
+ background-size: 15px;
115
+ }
116
+
117
+ .LuiCheckboxInput--hasError .LuiCheckboxInput-label::before {
118
+ border-color: luiColors.$error;
119
+ }
120
+
121
+ .LuiCheckboxInput--hasError.LuiCheckboxInput--isChecked
122
+ .LuiCheckboxInput-label::before {
123
+ background-color: luiColors.$error;
124
+ border-color: luiColors.$error;
125
+ }
126
+
127
+ .LuiCheckboxInput-input:disabled + .LuiCheckboxInput-label::before,
128
+ .LuiCheckboxInput--isDisabled .LuiCheckboxInput-label::before {
129
+ background-color: luiColors.$disabled-color;
130
+ border-color: luiColors.$disabled-color;
131
+ }
132
+
133
+ .LuiCheckboxInput-input:checked:disabled + .LuiCheckboxInput-label::before,
134
+ .LuiCheckboxInput--isChecked.LuiCheckboxInput--isDisabled
135
+ .LuiCheckboxInput-label::before {
136
+ color: white;
137
+ background-color: luiColors.$disabled-color;
138
+ border-color: luiColors.$disabled-color;
139
+ }
140
+
141
+ // ============
142
+ // MODIFIERS
143
+ // ============
144
+ .LuiCheckboxInput--inline {
145
+ display: inline-block;
146
+ // space them out if they're next to each other
147
+ &:not(:last-child) {
148
+ margin-bottom: 0;
149
+ margin-right: 24px;
150
+ }
151
+ }
@@ -0,0 +1,86 @@
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;
5
+
6
+ .LuiRadioInput-fieldset {
7
+ border: none;
8
+ padding: 0;
9
+ }
10
+
11
+ .LuiRadioInput-input {
12
+ @include luiScreenReadersOnly.ScreenReadersOnly();
13
+ }
14
+
15
+ .LuiRadioInput-legend {
16
+ @include luiFonts.font-semibold;
17
+ }
18
+
19
+ .LuiRadioInput-label {
20
+ position: relative;
21
+ display: flex;
22
+ justify-content: flex-start;
23
+ align-items: flex-start;
24
+ cursor: pointer;
25
+ padding: luiSpacing.$unit-xs 0 luiSpacing.$unit-xs luiSpacing.$unit-lg;
26
+
27
+ &:before {
28
+ content: '';
29
+ height: 1.5rem; // 20px
30
+ min-width: 1.5rem; // 20px
31
+ width: 1.5rem; // 20px
32
+ border: 2px solid luiColors.$sea;
33
+ border-radius: 50%;
34
+ background-color: transparent;
35
+ position: absolute;
36
+ left: 0;
37
+ top: 8px;
38
+ margin-right: luiSpacing.$unit-sm;
39
+ }
40
+
41
+ &:after {
42
+ content: '';
43
+ position: absolute;
44
+ left: 5px;
45
+ top: 13px;
46
+ background-color: #007198;
47
+ height: 14px;
48
+ min-width: 14px;
49
+ width: 14px;
50
+ border-radius: 50%;
51
+ opacity: 0;
52
+ transition: opacity 0.3s ease-in-out;
53
+ }
54
+
55
+ &--isSelected:after {
56
+ opacity: 1;
57
+ }
58
+
59
+ &--isDisabled {
60
+ color: luiColors.$gray;
61
+
62
+ &:before {
63
+ background-color: luiColors.$lily;
64
+ border-color: luiColors.$gray;
65
+ }
66
+ }
67
+ }
68
+
69
+ .LuiRadioInput--hasError {
70
+ .LuiRadioInput-label:before {
71
+ border-color: luiColors.$error;
72
+ }
73
+ }
74
+
75
+ .LuiRadioInput-errorMsg {
76
+ display: flex;
77
+ margin-top: luiSpacing.$unit-xs;
78
+
79
+ .LuiIcon--error {
80
+ margin-right: luiSpacing.$unit-xs;
81
+ }
82
+
83
+ p {
84
+ margin: 0;
85
+ }
86
+ }
@@ -0,0 +1,89 @@
1
+ @use '../../../Foundation/Variables/FormVars' as luiForms;
2
+ @use '../../../Foundation/Variables/FontVars' as luiFonts;
3
+ @use '../../../Foundation/Variables/LuiColors' as luiColors;
4
+
5
+ .LuiSelect {
6
+ margin-bottom: 24px;
7
+ }
8
+
9
+ .LuiSelect-label-text {
10
+ @include luiForms.formLabel();
11
+ }
12
+
13
+ .LuiSelect-select {
14
+ @include luiFonts.font-regular();
15
+ margin-bottom: 0;
16
+ border: 1px solid #b2b2b2;
17
+ border-radius: 4px;
18
+ display: block;
19
+ height: 48px;
20
+ color: #000000;
21
+ caret-color: #000000;
22
+ padding: {
23
+ right: 32px;
24
+ left: 16px;
25
+ }
26
+ width: 100%;
27
+ transition: all 0.15 ease-in-out;
28
+ appearance: none;
29
+
30
+ &:hover,
31
+ &:active {
32
+ border-color: #053d52;
33
+ cursor: pointer;
34
+ }
35
+
36
+ &:focus {
37
+ outline: none;
38
+ border-color: #053d52;
39
+ }
40
+
41
+ .hasError & {
42
+ border-color: #eb5757;
43
+ }
44
+
45
+ .isDisabled & {
46
+ border-color: #b2b2b2;
47
+ background-color: #fff;
48
+ color: #b2b2b2;
49
+ opacity: 0.3;
50
+ cursor: not-allowed;
51
+ }
52
+
53
+ .hasPlaceholder & {
54
+ color: #b2b2b2;
55
+ }
56
+
57
+ .hasValue & {
58
+ color: luiColors.$charcoal;
59
+ }
60
+ }
61
+
62
+ .LuiSelect-wrapper {
63
+ position: relative;
64
+ }
65
+
66
+ .LuiSelect-chevron-icon {
67
+ position: absolute;
68
+ right: 16px;
69
+ top: 50%;
70
+ transform: translateY(-50%);
71
+ pointer-events: none;
72
+ }
73
+
74
+ .LuiSelect-error {
75
+ position: relative;
76
+ display: flex;
77
+ color: #eb5757;
78
+ text-align: left;
79
+ padding-left: 22px;
80
+ font-size: 14px;
81
+ line-height: 20px;
82
+ margin-top: 2px;
83
+ }
84
+
85
+ .LuiSelect-error-icon {
86
+ position: absolute;
87
+ left: 0;
88
+ top: 2px;
89
+ }
@@ -0,0 +1,83 @@
1
+ @use '../../../Foundation/Variables/FormVars' as luiForms;
2
+ @use '../../../Foundation/Variables/FontVars' as luiFonts;
3
+ @use '../../../Foundation/Utilities/FluidType' as luiFluidType;
4
+ @use '../../../Foundation/Variables/BreakpointVars' as luiBreakpoints;
5
+
6
+ // =============================
7
+ // TextArea
8
+ // =============================
9
+
10
+ .LuiTextAreaInput {
11
+ width: 100%;
12
+ margin-bottom: 24px;
13
+ position: relative;
14
+
15
+ textarea {
16
+ @include luiFonts.font-regular;
17
+ @include luiFluidType.fluidType--size(14px, 16px, 1px, luiBreakpoints.$breakpoint-xl);
18
+ @include luiForms.formPlaceholder;
19
+ border-radius: 4px;
20
+ border: solid 1px #b2b2b2;
21
+ background: #fff;
22
+ padding: {
23
+ top: 14px;
24
+ right: 32px;
25
+ bottom: 14px;
26
+ left: 16px;
27
+ }
28
+ box-sizing: border-box;
29
+ width: 100%;
30
+ resize: vertical;
31
+ min-height: 100px;
32
+
33
+ &:focus {
34
+ outline: none;
35
+ border-color: #053d52;
36
+ }
37
+ }
38
+
39
+ label,
40
+ textarea {
41
+ display: block;
42
+ }
43
+
44
+ &.hasError {
45
+ textarea,
46
+ select {
47
+ border-color: #eb5757;
48
+ }
49
+ }
50
+
51
+ &.isDisabled {
52
+ textarea {
53
+ border-color: #b2b2b2;
54
+ background-color: #fff;
55
+ cursor: not-allowed;
56
+ opacity: 0.3;
57
+ }
58
+ label {
59
+ opacity: 0.3;
60
+ }
61
+ }
62
+ }
63
+
64
+ .LuiTextAreaInput-label {
65
+ @include luiForms.formLabel;
66
+ }
67
+
68
+ .LuiTextAreaInput-error {
69
+ position: relative;
70
+ display: flex;
71
+ color: #eb5757;
72
+ text-align: left;
73
+ padding-left: 22px;
74
+ font-size: 14px;
75
+ line-height: 20px;
76
+ margin-top: 2px;
77
+ }
78
+
79
+ .LuiTextAreaInput-error-icon {
80
+ position: absolute;
81
+ left: 0;
82
+ top: 2px;
83
+ }
@@ -0,0 +1,146 @@
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;
5
+ @use '../../../Foundation/Utilities/REM.scss' as rem;
6
+
7
+ $input-spacing: luiSpacing.$unit-xs; // 8px
8
+
9
+ $label-font-size: rem.rem(14px);
10
+ $label-line-height: luiSpacing.$unit-md;
11
+
12
+ .LuiTextInput {
13
+ margin-bottom: 24px;
14
+
15
+ &--hasError {
16
+
17
+ }
18
+ }
19
+
20
+ .LuiTextInput-label {
21
+ margin-bottom: $input-spacing;
22
+ line-height: $label-line-height;
23
+ }
24
+
25
+ .LuiTextInput-label-text {
26
+ @include luiForms.formLabel;
27
+ }
28
+
29
+ .LuiTextInput-inputWrapper {
30
+ position: relative;
31
+ display: block;
32
+ box-shadow: -1px 0 0 0 transparent;
33
+ border-radius: 4px;
34
+ 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;
36
+
37
+ .hasError & {
38
+ box-shadow: -8px 0px 0 0 luiColors.$error;
39
+ border-radius: 4px;
40
+ }
41
+ }
42
+
43
+ .LuiTextInput-passwordReveal {
44
+ position: absolute;
45
+ background: transparent;
46
+ min-height: 0;
47
+ min-width: 0;
48
+ margin: 0;
49
+ padding: 12px;
50
+ top: 50%;
51
+ right: 0;
52
+ transform: translateY(-50%);
53
+
54
+ &:hover {
55
+ background: transparent;
56
+ }
57
+ }
58
+
59
+ .LuiTextInput-input {
60
+ @include luiFonts.font-regular();
61
+ @include luiForms.formPlaceholder;
62
+ margin-bottom: 0;
63
+ border: 1px solid #b2b2b2;
64
+ border-radius: 4px;
65
+ height: 48px;
66
+ color: #000000;
67
+ caret-color: #000000;
68
+ padding: {
69
+ top: 14px;
70
+ right: 32px;
71
+ bottom: 14px;
72
+ left: 16px;
73
+ }
74
+ width: 100%;
75
+ transition: all 0.15 ease-in-out;
76
+ transition: border 0.2s ease;
77
+
78
+ &:hover,
79
+ &:active {
80
+ border-color: #053d52;
81
+ }
82
+
83
+ &:focus {
84
+ outline: none;
85
+ border-color: #053d52;
86
+ }
87
+
88
+ .hasError & {
89
+ border-color: luiColors.$error !important;
90
+ }
91
+
92
+ .isDisabled & {
93
+ border-color: luiColors.$silver;
94
+ background-color: luiColors.$lily;
95
+ cursor: not-allowed;
96
+ }
97
+ }
98
+
99
+ .LuiTextInput-error {
100
+ @include luiFonts.font-semibold();
101
+ position: relative;
102
+ color: luiColors.$error;
103
+ text-align: left;
104
+ padding-left: 22px;
105
+ font-size: $label-font-size;
106
+ line-height: 20px;
107
+ margin-top: 2px;
108
+ }
109
+
110
+ .LuiTextInput-error-icon {
111
+ position: absolute;
112
+ left: 0;
113
+ top: 2px;
114
+ }
115
+
116
+ .LuiTextInput-mandatory {
117
+ display: inline-block;
118
+ @include luiFonts.font-semibold();
119
+ font-size: $label-font-size;
120
+ width: 10px;
121
+ margin: 0 0 0 -10px;
122
+ color: luiColors.$error;
123
+ }
124
+
125
+ .LuiFieldWrapper {
126
+ position: relative;
127
+ box-shadow: -1px 0 0 0 transparent;
128
+ border-radius: 4px;
129
+ transition: box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s,
130
+ border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
131
+
132
+ // !--------- This can't live here! Needs to go in specific input-------!
133
+ input {
134
+ transition: border 0.2s ease;
135
+ }
136
+
137
+ &.LuiFieldWrapper--error {
138
+ box-shadow: -12px 0px 0 0 luiColors.$error;
139
+ border-radius: 4px;
140
+
141
+ // !--------- This can't live here! Needs to go in specific input-------!
142
+ input {
143
+ border-color: luiColors.$error;
144
+ }
145
+ }
146
+ }
@@ -0,0 +1,16 @@
1
+ @use '../../Foundation/Variables/LuiColors' as luiColors;
2
+ @use '../../Foundation/Variables/SpacingVars' as luiSpacing;
3
+
4
+ // ========================
5
+ // Lui Shadow wrapper
6
+ // ========================
7
+ // @note: Simple react component to wrap children in a div with a drop shadow, border radius, and appropriate padding
8
+ // ========================
9
+
10
+ .LuiShadow {
11
+ box-shadow: 0 0 luiSpacing.$unit-md 1px rgba(0, 113, 152, 0.1);
12
+ border-radius: 5px;
13
+ padding: luiSpacing.$unit-md;
14
+ margin-top: luiSpacing.$unit-sm;
15
+ background-color: luiColors.$white;
16
+ }
@@ -22,6 +22,7 @@ $label-line-height: spacing.$unit-md;
22
22
  @mixin formPlaceholder {
23
23
  &::placeholder {
24
24
  font-weight: normal;
25
+ font-style: italic;
25
26
  color: colors.$input-placeholder;
26
27
  opacity: 1; // Because firefox is cool
27
28
 
@@ -52,6 +52,7 @@
52
52
  @forward "./Components/NavDrawer/nav-drawer.scss";
53
53
  @forward "./Components/Notifications/notifications.scss";
54
54
  @forward "./Components/Scrim/scrim.scss";
55
+ @forward "./Components/LuiError/LuiError.scss";
55
56
  @forward "./Components/LuiErrorPage/LuiErrorPage.scss";
56
57
  @forward "./Components/LuiFilterContainer/LuiFilterContainer.scss";
57
58
  @forward "./Components/LOLCommonMenu/LOLAuthorisedLink.scss";
@@ -59,9 +60,15 @@
59
60
  @forward "./Components/LOLCommonMenu/LOLUserLastLogin.scss";
60
61
  @forward "./Components/LOLCommonMenu/LOLFirmSwitcherMenu.scss";
61
62
  @forward "./Components/Spinner/spinner.scss";
63
+ @forward "./Components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.scss";
64
+ @forward "./Components/LuiFormElements/LuiRadioInput/LuiRadioInput.scss";
65
+ @forward "./Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss";
66
+ @forward "./Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss";
67
+ @forward "./Components/LuiFormElements/LuiTextInput/LuiTextInput.scss";
62
68
  @forward "./Components/LuiFormElements/LuiFileInputBox.scss";
63
69
  @forward "./Components/LuiFormSection/LuiFormSectionHeader.scss";
64
70
  @forward "./Components/LuiFormSection/LuiHelpInfo/LuiHelpInfo.scss";
71
+ @forward "./Components/LuiShadow/LuiShadow.scss";
65
72
 
66
73
  // The following have scss next to the component that is yet to be hooked up with the react implementation
67
74
  // LuiTabs
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "11.3.1",
2
+ "version": "11.7.0",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",