mp-design-system 1.0.3 → 1.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -39,7 +39,7 @@ module.exports = {
39
39
  {
40
40
  title: 'Disabled',
41
41
  context: {
42
- disabled: true
42
+ disabled: false
43
43
  }
44
44
  }
45
45
  ],
@@ -1,4 +1,5 @@
1
1
  {% inputWrapper params.error %}
2
+ <div class="c-form-row u-disabled">
2
3
  <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}" for="{{ params.id }}">{{ params.label }}</label>
3
4
  {% if params.button %}
4
5
  <div class="u-flex u-border">
@@ -10,4 +11,5 @@
10
11
  {% if params.button %}
11
12
  </div>
12
13
  {% endif %}
14
+ </div>
13
15
  {% endinputWrapper %}
@@ -86,7 +86,7 @@
86
86
 
87
87
  &[disabled],
88
88
  [disabled],
89
- .u-disabled & {
89
+ &--disabled {
90
90
  background-color: color('petrol', 'step-2');
91
91
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" id="lock" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.45 4.17A4 4 0 0 1 16.28 7v3h-8V7a4 4 0 0 1 1.17-2.83ZM6.28 10V7a6 6 0 1 1 12 0v3h.22c1.64 0 2.78 1.46 2.78 3v7c0 1.54-1.14 3-2.78 3H6.06c-1.65 0-2.78-1.46-2.78-3v-7c0-1.54 1.13-3 2.78-3h.22Zm1 2H6.06c-.33 0-.78.33-.78 1v7c0 .67.45 1 .78 1H18.5c.32 0 .78-.33.78-1v-7c0-.67-.46-1-.78-1H7.28Zm3 3.35a2 2 0 1 1 3 1.73v1.77a1 1 0 1 1-2 0v-1.77a2 2 0 0 1-1-1.73Z"/></svg>');
92
92
  background-position: right var(--space-2xs) center;
@@ -97,6 +97,10 @@
97
97
  }
98
98
  }
99
99
 
100
+ .u-disabled > .c-input {
101
+ @extend .c-input--disabled;
102
+ }
103
+
100
104
  .c-input--with-button {
101
105
  // padding-right: 44px;
102
106
  border: 0;
@@ -37,6 +37,9 @@ function openOffCanvas(offCanvas) {
37
37
 
38
38
  // Add keydown event listener to close the off-canvas drawer with the Esc key
39
39
  document.addEventListener('keydown', handleKeyDown);
40
+
41
+ // Prevent background scroll
42
+ document.body.style.overflowY = 'hidden';
40
43
  }
41
44
 
42
45
  // Function to handle the backdrop click
@@ -66,6 +69,9 @@ function closeOffCanvas(offCanvas) {
66
69
 
67
70
  // Remove keydown event listener when closing the off-canvas drawer
68
71
  document.removeEventListener('keydown', handleKeyDown);
72
+
73
+ // Allow background scroll
74
+ document.body.style.overflowY = '';
69
75
  }
70
76
 
71
77
  // Update button functionality
@@ -50,7 +50,7 @@
50
50
 
51
51
  &__main {
52
52
  @include margin-bottom('m');
53
- @include padding(0, 's');
53
+ @include padding('3xs', 's');
54
54
  overflow-y: scroll;
55
55
  }
56
56