@linzjs/lui 17.5.12 → 17.8.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
+ }
@@ -0,0 +1,40 @@
1
+ .lui-switch-checkbox {
2
+ height: 0;
3
+ width: 0;
4
+ visibility: hidden;
5
+ }
6
+
7
+ .lui-switch-label {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: space-between;
11
+ cursor: pointer;
12
+ width: 40px;
13
+ height: 20px;
14
+ background: grey;
15
+ border-radius: 40px;
16
+ position: relative;
17
+ transition: background-color .2s;
18
+ }
19
+
20
+ .lui-switch-label .lui-switch-button {
21
+ content: '';
22
+ position: absolute;
23
+ top: 2px;
24
+ left: 2px;
25
+ width: 18px;
26
+ height: 16px;
27
+ border-radius: 18px;
28
+ transition: 0.2s;
29
+ background: #fff;
30
+ box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);
31
+ }
32
+
33
+ .lui-switch-checkbox:checked + .lui-switch-label .lui-switch-button {
34
+ left: calc(100% - 2px);
35
+ transform: translateX(-100%);
36
+ }
37
+
38
+ .lui-switch-label:active .lui-switch-button {
39
+ width: 20px;
40
+ }
@@ -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.12",
2
+ "version": "17.8.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": {