@linzjs/lui 17.5.10 → 17.6.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.
@@ -0,0 +1,79 @@
1
+ @use '../../Foundation/Variables/FormVars' as forms;
2
+ @use "../../Foundation/Variables/MiscVars.scss" as misc;
3
+ @use "../../Foundation/Variables/ColorVars.scss" as colors;
4
+ @use '../../Foundation/Variables/FontVars.scss' as fonts;
5
+ @use '../../Foundation/Variables/SpacingVars.scss' as spacing;
6
+ @use "../../Foundation/Utilities" as *;
7
+
8
+ :root {
9
+ --cardMaxHeight: spacing.$unit-xl;
10
+ }
11
+
12
+ .LuiAccordicard {
13
+ @include drop-shadow(sm);
14
+ border-radius: misc.$borderRadius-md;
15
+ display: flex;
16
+ flex-direction: column;
17
+ transition: all 0.3s ease-in-out;
18
+ position: relative;
19
+
20
+ &:not(:first-child) {
21
+ margin-top: spacing.$unit-xs;
22
+ }
23
+ }
24
+
25
+ .LuiAccordicard-header {
26
+ display: flex;
27
+ justify-content: space-between;
28
+ width: 100%;
29
+ position: relative;
30
+ padding: spacing.$unit-sm 60px 0 spacing.$unit-rg;
31
+ }
32
+
33
+ .LuiAccordicard-contentWrapper {
34
+ will-change: max-height;
35
+ max-height: var(--cardMaxHeight);
36
+ overflow: hidden;
37
+ transition: max-height 0.3s ease;
38
+ padding: 0 spacing.$unit-rg spacing.$unit-sm spacing.$unit-rg;
39
+ }
40
+
41
+ .LuiAccordicard-content {
42
+ will-change: opacity;
43
+ opacity: 0;
44
+ transition: opacity 0.3s ease-in-out 0.2;
45
+
46
+ &--isOpen {
47
+ opacity: 1;
48
+ }
49
+ }
50
+
51
+ .LuiAccordicard-headerContent {
52
+ display: flex;
53
+ align-items: center;
54
+ flex-wrap: wrap;
55
+ column-gap: spacing.$unit-xl;
56
+ row-gap: spacing.$unit-md;
57
+ }
58
+
59
+ .LuiAccordicard-trigger {
60
+ background: none;
61
+ border: none;
62
+ line-height: 1;
63
+ padding: 0;
64
+ height: spacing.$unit-xl;
65
+ width: spacing.$unit-xl;
66
+ position: absolute;
67
+ top: 3px;
68
+ right: 0;
69
+ }
70
+
71
+ .LuiAccordicard-chevron {
72
+ transition: all 0.3s ease-in-out;
73
+ transform: rotate(0);
74
+ fill: colors.$sea;
75
+
76
+ &--isOpen {
77
+ transform: rotate(180deg);
78
+ }
79
+ }
@@ -11,7 +11,7 @@ $strokeWeight: 1px;
11
11
  $reversed-btn-active-txt: rgba(255, 255, 255, 0.6);
12
12
  $reversed-no-bg-btn-active-txt: rgba(255, 255, 255, 0.8);
13
13
  $disabled-reversed-no-bg-btn-txt: rgba(255, 255, 255, 0.4);
14
- $btnLine-height: 24px;
14
+ $btnLine-height: 24px;
15
15
 
16
16
  // reset buttons and base styling for all
17
17
 
@@ -20,7 +20,7 @@ $btnLine-height: 24px;
20
20
  font-size: 1rem;
21
21
  line-height: $btnLine-height;
22
22
  margin: 0;
23
- padding: rem(7px) spacing.$unit-xs *2; //magic number to allow for 1px border to add to height
23
+ padding: rem(7px) spacing.$unit-xs * 2; //magic number to allow for 1px border to add to height
24
24
  border: none;
25
25
  border-radius: misc.$borderRadius;
26
26
  transition: background-color 0.3s, color 0.3s, height 0.3s, border 0.3s,
@@ -133,7 +133,8 @@ a.lui-button {
133
133
  text-align: center;
134
134
 
135
135
  &.lui-button-icon-right {
136
- padding: spacing.$unit-xxs spacing.$unit-xs spacing.$unit-xs spacing.$unit-sm; // magic numbers to account for border
136
+ padding: spacing.$unit-xxs spacing.$unit-xs spacing.$unit-xs
137
+ spacing.$unit-sm; // magic numbers to account for border
137
138
 
138
139
  .LuiIcon {
139
140
  margin: 3px 0 -7px 12px; // magic numbers to allow the resize to work but to be fixed by future LUI buttons
@@ -194,24 +195,30 @@ a.lui-button {
194
195
  }
195
196
 
196
197
  &:hover i {
197
- color: #fff;
198
+ color: colors.$sea;
198
199
  }
199
200
  }
200
201
 
201
202
  &-tertiary {
202
- @include button-builder(colors.$sea, transparent, transparent, 0px, $btnLine-height - 2px);
203
+ @include button-builder(
204
+ colors.$sea,
205
+ transparent,
206
+ transparent,
207
+ 0px,
208
+ $btnLine-height - 2px
209
+ );
203
210
  @include button-states-builder(
204
- colors.$sea,
205
- colors.$tertiary-hover-btn,
206
- #fff,
207
- $reversed-btn-active-txt,
208
- colors.$tertiary-active-btn,
209
- #fff
211
+ colors.$sea,
212
+ colors.$tertiary-hover-btn,
213
+ #fff,
214
+ $reversed-btn-active-txt,
215
+ colors.$tertiary-active-btn,
216
+ #fff
210
217
  );
211
218
  @include fonts.font-regular();
212
219
 
213
220
  border: none;
214
- margin: 2px; //account for the slightly smaller button size;
221
+ margin: 2px; //account for the slightly smaller button size;
215
222
 
216
223
  &:hover {
217
224
  border: none;
@@ -240,17 +247,17 @@ a.lui-button {
240
247
  }
241
248
  }
242
249
 
243
- &-success{
250
+ &-success {
244
251
  // var $btnTxtCol, $btnBgCol, $borderCol, $myStrokeWeight : 2px, $myBtnLineHeight : 40px
245
252
  @include button-builder(#fff, colors.$green-btn, colors.$green-btn);
246
253
  // var $btnTxtColHover, $btnBgColHover, $borderColHover, $btnTxtColActive, $btnBgColActive, $borderColActive
247
254
  @include button-states-builder(
248
- #fff,
249
- colors.$green-hover,
250
- colors.$green-hover,
251
- $reversed-btn-active-txt,
252
- colors.$green-active,
253
- colors.$green-active
255
+ #fff,
256
+ colors.$green-hover,
257
+ colors.$green-hover,
258
+ $reversed-btn-active-txt,
259
+ colors.$green-active,
260
+ colors.$green-active
254
261
  );
255
262
  }
256
263
 
@@ -348,7 +355,6 @@ a.lui-button {
348
355
  //border: 0;
349
356
  text-decoration: underline;
350
357
 
351
-
352
358
  &:hover {
353
359
  cursor: not-allowed;
354
360
  }
@@ -444,7 +450,8 @@ a.lui-button {
444
450
  svg * {
445
451
  color: #fff;
446
452
  }
447
- &:disabled, &:disabled:hover {
453
+ &:disabled,
454
+ &:disabled:hover {
448
455
  color: $disabled-reversed-no-bg-btn-txt;
449
456
 
450
457
  i,
@@ -672,7 +679,6 @@ a.lui-button {
672
679
  color: colors.$disabled-color;
673
680
  cursor: not-allowed;
674
681
  }
675
-
676
682
  }
677
683
 
678
684
  &--radio {
@@ -18,3 +18,8 @@ $z-50: 50;
18
18
 
19
19
  // Border radius
20
20
  $borderRadius: 3px;
21
+
22
+ // These are to provide more flexibility
23
+ $borderRadius-sm: $borderRadius;
24
+ $borderRadius-md: 5px;
25
+ $borderRadius-lg: 9px;
@@ -9,6 +9,7 @@ $base-unit: 0.5rem; // changes base unit to 8px
9
9
  $unit-xxs: $base-unit * 0.5; // 4px
10
10
  $unit-xs: $base-unit; // 8px
11
11
  $unit-sm: $base-unit * 1.5; // 12px
12
+ $unit-rg: $base-unit * 2; // 16px // NOTE: chose an additive approach – ideally these numbers would shuffle down
12
13
  $unit-md: $base-unit * 3; // 24px
13
14
  $unit-lg: $base-unit * 4; // 32px
14
15
  $unit-xl: $base-unit * 6; // 48px
@@ -26,9 +27,3 @@ $v: $px;
26
27
  @deprecated
27
28
  */
28
29
  $h: $v;
29
-
30
- // $unit-sm: // 16px -> 12px
31
- // $unit-md: // 32px ->24px
32
- // $unit-lg: // 48px -> 32px
33
- // $unit-xl: // 80px -> 48px
34
- // $unit-xxl: // 160px -> 80px
@@ -73,6 +73,7 @@
73
73
  @forward "./Components/LuiFormSection/LuiHelpInfo/LuiHelpInfo.scss";
74
74
  @forward "./Components/LuiShadow/LuiShadow.scss";
75
75
  @forward "./Components/LuiBadge/LuiBadge.scss";
76
+ @forward "./Components/LuiAccordicard/LuiAccordicard.scss";
76
77
 
77
78
  // The following have scss next to the component that is yet to be hooked up with the react implementation
78
79
  // LuiTabs
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "17.5.10",
2
+ "version": "17.6.0",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",
@@ -36,7 +36,8 @@
36
36
  "generate-svgs": "echo 'CHECK THAT YOUR SVG HAS A VIEW BOX, otherwise it will not work'; node ./svg-generator"
37
37
  },
38
38
  "peerDependencies": {
39
- "react": ">=16"
39
+ "react": ">=16",
40
+ "react-dom": ">=16"
40
41
  },
41
42
  "husky": {
42
43
  "hooks": {