mp-design-system 1.2.44 → 1.2.46

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.44",
3
+ "version": "1.2.46",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -29,14 +29,9 @@ function OffCanvas() {
29
29
 
30
30
  // Function to check if an element is currently visible on the page
31
31
  function isVisible(element) {
32
- // Check element's position and styles for visibility
33
- const rect = element.getBoundingClientRect();
32
+ // Check element's styles for visibility
34
33
  const style = window.getComputedStyle(element);
35
34
  return (
36
- rect.top >= 0 &&
37
- rect.left >= 0 &&
38
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
39
- rect.right <= (window.innerWidth || document.documentElement.clientWidth) &&
40
35
  style.display !== 'none' &&
41
36
  style.visibility !== 'hidden'
42
37
  );
@@ -45,6 +40,8 @@ function isVisible(element) {
45
40
  // Function to handle off-canvas behavior based on visibility
46
41
  function handleOffCanvas(toggle, isVisible) {
47
42
  const target = document.getElementById(toggle.getAttribute('data-target'));
43
+ console.log(target);
44
+ console.log(isVisible);
48
45
  if (isVisible === true) {
49
46
  createOffCanvas(target);
50
47
  } else {
@@ -11,9 +11,13 @@
11
11
  letter-spacing: -.02em;
12
12
  }
13
13
 
14
- &__form.o-grid {
14
+ &__row.o-grid {
15
15
  flex-wrap: wrap;
16
- row-gap: var(--space-s);
16
+ gap: var(--space-s);
17
+
18
+ .c-form__input {
19
+ flex: 1 0 298px;
20
+ }
17
21
 
18
22
  .c-input {
19
23
  flex-shrink: 1;
@@ -22,19 +26,28 @@
22
26
 
23
27
  &__input-wrap {
24
28
  display: flex;
25
- align-items: flex-start;
26
29
  gap: var(--space-s);
27
- flex-wrap: nowrap;
30
+ flex-wrap: wrap;
31
+ align-items: flex-start;
28
32
 
29
33
  .c-label {
30
34
  min-width: 115px;
31
35
  flex-basis: 115px;
32
- margin-bottom: 0;
36
+ @include margin-bottom(0);
37
+ word-wrap: break-word;
38
+
39
+ @media only screen and (max-width: 31.25em) {
40
+ flex-basis: 100%;
41
+ }
33
42
 
34
43
  &+ * {
35
44
  flex: 1 0 115px;
36
45
  }
37
46
  }
47
+
48
+ .c-input--textarea {
49
+ flex-basis: 100%;
50
+ }
38
51
  }
39
52
 
40
53
  &__messages-wrap {
@@ -49,7 +62,8 @@
49
62
  }
50
63
  }
51
64
 
52
- & > .c-fieldset {
65
+ & > .c-fieldset,
66
+ & > .c-tab > .c-fieldset {
53
67
  & > * + *:not(:has(> .u-hidden)) {
54
68
  @include padding-top('s');
55
69
  }
@@ -114,7 +128,8 @@
114
128
 
115
129
  & > .o-grid,
116
130
  & > .o-grid > * {
117
- @include margin-bottom(0);
131
+ @include margin(0);
132
+ @include padding(0);
118
133
  }
119
134
  }
120
135