mp-design-system 1.0.2 → 1.0.3

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.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -85,7 +85,8 @@
85
85
  }
86
86
 
87
87
  &[disabled],
88
- [disabled] & {
88
+ [disabled],
89
+ .u-disabled & {
89
90
  background-color: color('petrol', 'step-2');
90
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>');
91
92
  background-position: right var(--space-2xs) center;
@@ -0,0 +1,8 @@
1
+ .u-disabled {
2
+ cursor: not-allowed;
3
+
4
+ input,
5
+ button {
6
+ pointer-events: none;
7
+ }
8
+ }
@@ -3,6 +3,7 @@ html body {
3
3
  @import './typography.scss';
4
4
  @import './link.scss';
5
5
  @import './colour.scss';
6
+ @import './disabled.scss';
6
7
  @import './wrap.scss';
7
8
  @import './flex.scss';
8
9
  @import './display.scss';
@@ -50,6 +50,14 @@ More typography utility classes are documented on the [typography page](/compone
50
50
  <div class="u-revealed">The opposite of u-hidden, useful for e.g. accordions</div>
51
51
  ```
52
52
 
53
+ ```html
54
+ <div class="u-disabled">
55
+ <label class="c-label" for="text_input">
56
+ Disabled input, without using the [disabled] attribute</label>
57
+ <input type="text" class="c-input">
58
+ </div>
59
+ ```
60
+
53
61
  ---
54
62
 
55
63
  ## Layout