mp-design-system 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/build/js/app.js +1 -1
  2. package/dist/build/js/app.js.map +1 -1
  3. package/dist/build/scss/library.css +1 -1
  4. package/dist/build/scss/library.css.map +1 -1
  5. package/dist/build/scss/main.css +1 -1
  6. package/dist/build/scss/main.css.map +1 -1
  7. package/package.json +1 -1
  8. package/src/_includes/components/button/button.config.js +6 -0
  9. package/src/_includes/components/button/button.scss +7 -0
  10. package/src/_includes/components/input/checkbox.config.js +6 -0
  11. package/src/_includes/components/input/checkbox.njk +2 -2
  12. package/src/_includes/components/input/input.config.js +6 -0
  13. package/src/_includes/components/input/input.njk +1 -1
  14. package/src/_includes/components/input/input.scss +12 -0
  15. package/src/_includes/components/input/radio.config.js +6 -0
  16. package/src/_includes/components/input/radio.njk +2 -2
  17. package/src/_includes/components/input/radio.scss +13 -0
  18. package/src/_includes/components/input/select.config.js +6 -0
  19. package/src/_includes/components/input/select.njk +1 -1
  20. package/src/_includes/components/input/textarea.config.js +6 -0
  21. package/src/_includes/components/input/textarea.njk +1 -1
  22. package/src/_includes/components/input/toggle.config.js +6 -0
  23. package/src/_includes/components/input/toggle.njk +2 -2
  24. package/src/_includes/components/input/toggle.scss +16 -0
  25. package/src/_includes/components/tabs/tabs.config.js +5 -5
  26. package/src/_includes/components/tabs/tabs.njk +1 -1
  27. package/src/_includes/components/tabs/tabs.scss +4 -0
  28. package/src/_includes/components/twi/twi.njk +1 -1
  29. package/src/_includes/includes/system-scripts.njk +1 -1
  30. package/src/_includes/layout.njk +1 -0
  31. package/src/_includes/system-home-page.njk +1 -0
  32. package/src/assets/js/app.js +2 -0
  33. package/src/assets/js/imports/off-canvas.js +97 -0
  34. package/src/assets/scss/elements/reset.scss +0 -7
  35. package/src/assets/scss/objects/index.scss +1 -0
  36. package/src/assets/scss/objects/off-canvas.scss +85 -0
  37. package/src/assets/scss/utilities/disabled.scss +8 -0
  38. package/src/assets/scss/utilities/index.scss +1 -0
  39. package/src/assets/scss/utilities/link.scss +1 -0
  40. package/src/components/iconography.njk +3 -0
  41. package/src/components/utilities.md +8 -0
  42. package/src/index.njk +14 -7
  43. package/src/patterns/form.njk +324 -151
  44. package/src/patterns/off-canvas.njk +42 -0
  45. package/src/prototype/index.njk +2 -2
  46. package/src/static/svg/sprite.svg +41 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -55,6 +55,12 @@ module.exports = {
55
55
  context: {
56
56
  classes: 'c-button--loading'
57
57
  }
58
+ },
59
+ {
60
+ title: 'Disabled',
61
+ context: {
62
+ attrs: 'disabled'
63
+ }
58
64
  }
59
65
  ],
60
66
  props: [
@@ -44,6 +44,13 @@
44
44
  text-decoration: none;
45
45
  color: color("white");
46
46
  }
47
+
48
+ &[disabled],
49
+ [disabled] & {
50
+ filter: saturate( 0.4 );
51
+ cursor: not-allowed;
52
+ opacity: 0.6;
53
+ }
47
54
  }
48
55
 
49
56
  .mp.c-button,
@@ -20,6 +20,12 @@ module.exports = {
20
20
  context: {
21
21
  checked: true
22
22
  }
23
+ },
24
+ {
25
+ title: 'Disabled',
26
+ context: {
27
+ disabled: true
28
+ }
23
29
  }
24
30
  ],
25
31
  props: [
@@ -1,2 +1,2 @@
1
- <input type="checkbox" class="c-checkbox" name="{{ params.name or params.id }}" id="{{ params.id }}" value="{{ params.value }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} />
2
- <label for="{{ params.id }}">{{ params.label }}</label>
1
+ <input type="checkbox" class="c-checkbox" name="{{ params.name or params.id }}" id="{{ params.id }}" value="{{ params.value }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} {{ 'disabled' if params.disabled }} />
2
+ <label for="{{ params.id }}">{{ params.label }}</label>
@@ -35,6 +35,12 @@ module.exports = {
35
35
  button: true,
36
36
  buttontext: 'Search'
37
37
  }
38
+ },
39
+ {
40
+ title: 'Disabled',
41
+ context: {
42
+ disabled: true
43
+ }
38
44
  }
39
45
  ],
40
46
  props: [
@@ -3,7 +3,7 @@
3
3
  {% if params.button %}
4
4
  <div class="u-flex u-border">
5
5
  {% endif %}
6
- <input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}{{ params.classes }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} />
6
+ <input type="{{ params.type or 'text' }}" class="c-input {{ 'c-input--with-button' if params.button }}{{ params.classes }}" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }} />
7
7
  {% if params.button %}
8
8
  <button type="button" class="mp c-button--white">Search</button>
9
9
  {% endif %}
@@ -83,6 +83,18 @@
83
83
  @include step(-1);
84
84
  color: var(--error-state);
85
85
  }
86
+
87
+ &[disabled],
88
+ [disabled],
89
+ .u-disabled & {
90
+ background-color: color('petrol', 'step-2');
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
+ background-position: right var(--space-2xs) center;
93
+ background-repeat: no-repeat;
94
+ @include space('background-size', 's');
95
+ cursor: not-allowed;
96
+ opacity: 0.6;
97
+ }
86
98
  }
87
99
 
88
100
  .c-input--with-button {
@@ -20,6 +20,12 @@ module.exports = {
20
20
  context: {
21
21
  checked: true
22
22
  }
23
+ },
24
+ {
25
+ title: 'Disabled',
26
+ context: {
27
+ disabled: true
28
+ }
23
29
  }
24
30
  ],
25
31
  props: [
@@ -1,2 +1,2 @@
1
- <input type="radio" class="c-radio" name="{{ params.name or params.id }}" id="{{ params.id }}" value="{{ params.value }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} />
2
- <label for="{{ params.id }}">{{ params.label }}</label>
1
+ <input type="radio" class="c-radio" name="{{ params.name or params.id }}" id="{{ params.id }}" value="{{ params.value }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} {{ 'disabled' if params.disabled }} />
2
+ <label for="{{ params.id }}">{{ params.label }}</label>
@@ -25,6 +25,19 @@
25
25
  &:focus + input[type=hidden] + label:before {
26
26
  outline: 2px solid;
27
27
  }
28
+
29
+ &[disabled],
30
+ [disabled] & {
31
+ & + label:before {
32
+ background-color: color('petrol', 'step-2');
33
+ cursor: not-allowed;
34
+ opacity: 0.6;
35
+
36
+ }
37
+ &:hover + label:before {
38
+ background-color: color('petrol', 'step-2');
39
+ }
40
+ }
28
41
  }
29
42
 
30
43
  .c-checkbox {
@@ -39,6 +39,12 @@ module.exports = {
39
39
  context: {
40
40
  error: 'This field is required'
41
41
  }
42
+ },
43
+ {
44
+ title: 'Disabled',
45
+ context: {
46
+ disabled: true
47
+ }
42
48
  }
43
49
  ],
44
50
  props: [
@@ -1,6 +1,6 @@
1
1
  {% inputWrapper params.error %}
2
2
  <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}{{ params.classes }}" for="{{ params.id }}">{{ params.label }}</label>
3
- <select class="c-input c-input--select" name="{{ params.name or params.id }}" id="{{ params.id }}" {{ 'required' if params.required }}>
3
+ <select class="c-input c-input--select" name="{{ params.name or params.id }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }}>
4
4
  {% if params.placeholder %}<option value="">{{ params.placeholder }}</option>{% endif %}
5
5
  {% if params.options | length %}
6
6
  {% for option in params.options %}
@@ -28,6 +28,12 @@ module.exports = {
28
28
  context: {
29
29
  error: 'This field is required'
30
30
  }
31
+ },
32
+ {
33
+ title: 'Disabled',
34
+ context: {
35
+ disabled: true
36
+ }
31
37
  }
32
38
  ],
33
39
  props: [
@@ -1,4 +1,4 @@
1
1
  {% inputWrapper params.error %}
2
2
  <label class="{{ 'u-hidden' if params.hideLabel else 'c-label' }}{{ params.classes }}" for="{{ params.id }}">{{ params.label }}</label>
3
- <textarea class="c-input c-input--textarea" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }}></textarea>
3
+ <textarea class="c-input c-input--textarea" name="{{ params.name or params.id }}" placeholder="{{ params.placeholder }}" id="{{ params.id }}" {{ 'required' if params.required }} {{ 'disabled' if params.disabled }}></textarea>
4
4
  {% endinputWrapper %}
@@ -20,6 +20,12 @@ module.exports = {
20
20
  context: {
21
21
  checked: true
22
22
  }
23
+ },
24
+ {
25
+ title: 'Disabled',
26
+ context: {
27
+ disabled: true
28
+ }
23
29
  }
24
30
  ],
25
31
  props: [
@@ -1,5 +1,5 @@
1
1
  <label for="{{ params.id }}" class="c-toggle">
2
- <input type="checkbox" class="c-toggle__checkbox" id="{{ params.id }}" value="{{ params.value }}" role="switch" aria-checked="false" aria-label="{{ params.label }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} />
2
+ <input type="checkbox" class="c-toggle__checkbox" id="{{ params.id }}" value="{{ params.value }}" role="switch" aria-checked="false" aria-label="{{ params.label }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} {{ 'disabled' if params.disabled }} />
3
3
  <span class="c-toggle__slider"></span>
4
- {{ params.label }}
4
+ <span class="c-toggle__label">{{ params.label }}</span>
5
5
  </label>
@@ -56,4 +56,20 @@
56
56
  &__checkbox:checked + &__slider::before {
57
57
  transform: translateX(1rem);
58
58
  }
59
+
60
+ input[disabled] {
61
+ & + .c-toggle__slider {
62
+ background-color: color('petrol', 'step-2');
63
+ cursor: not-allowed;
64
+ opacity: 0.6;
65
+
66
+ &:before {
67
+ background-color: color('petrol', 'step-3');
68
+ }
69
+ }
70
+ & ~ .c-toggle__label {
71
+ cursor: not-allowed;
72
+ opacity: 0.6;
73
+ }
74
+ }
59
75
  }
@@ -8,11 +8,11 @@ module.exports = {
8
8
  context: {
9
9
  type: 'anchor',
10
10
  tabs: [
11
- { id: 'tab-1', label: 'Primary materials', content: '<h2 class="c-h c-h--step-3">Primary materials</h2>', active: true },
12
- { id: 'tab-2', label: 'Pharmaceuticals', content: '<h2 class="c-h c-h--step-3">Pharmaceuticals</h2>' },
13
- { id: 'tab-3', label: 'Advanced materials', content: '<h2 class="c-h c-h--step-3">Advanced materials</h2>' },
14
- { id: 'tab-4', label: 'Academia', content: '<h2 class="c-h c-h--step-3">Academia</h2>' },
15
- { id: 'tab-5', label: 'Connected world', content: '<h2 class="c-h c-h--step-3">Connected world</h2>' },
11
+ { id: 'tab-1', label: 'Primary materials', content: '<strong>Primary materials</strong> lorem ipsum a maecenas parturient ipsum at nisl id nisi a imperdiet platea dui venenatis sit euismod.', active: true },
12
+ { id: 'tab-2', label: 'Pharmaceuticals', content: '<strong>Pharmaceuticals</strong> lorem ipsum parturient a ullamcorper nisl parturient cum ullamcorper augue arcu a feugiat mus imperdiet curae suspendisse rhoncus sit id parturient cubilia adipiscing ad ullamcorper aliquet mi.' },
13
+ { id: 'tab-3', label: 'Advanced materials', content: '<strong>Advanced materials</strong> lorem ipsum fringilla eros cum facilisis id ullamcorper pretium sociosqu a eu vestibulum cras vivamus inceptos sed potenti a.' },
14
+ { id: 'tab-4', label: 'Academia', content: '<strong>Academia</strong> lorem ipsum augue et vestibulum ut luctus ut vestibulum proin eros mauris sodales penatibus euismod a sem eleifend suspendisse litora fringilla habitasse suspendisse.' },
15
+ { id: 'tab-5', label: 'Connected world', content: '<strong>Connected world</strong> lorem ipsum eros a parturient libero ullamcorper natoque vestibulum turpis egestas suspendisse parturient et adipiscing arcu a.' },
16
16
  ]
17
17
  },
18
18
  props: [
@@ -10,7 +10,7 @@
10
10
  <div class="c-tabs__content">
11
11
  {% for tab in params.tabs %}
12
12
  <div id="{{ tab.id }}" class="c-tab {{ 'c-tab--active' if tab.active }}">
13
- {{ tab.content | safe }}
13
+ <div class="o-prose"><p>{{ tab.content | safe }}</p></div>
14
14
  </div>
15
15
  {% endfor %}
16
16
  </div>
@@ -66,6 +66,10 @@
66
66
  @media screen and (max-width:55em) {
67
67
  white-space: nowrap;
68
68
  }
69
+
70
+ .c-tabs__controls-list > li:last-child & {
71
+ @include margin-right(0);
72
+ }
69
73
 
70
74
  &.c-twi {
71
75
  display: flex;
@@ -21,7 +21,7 @@
21
21
  {%- endif -%}
22
22
 
23
23
  <span>{{ params.label }}</span>
24
- {{ icon({ id: params.icon }) }}
24
+ {{ icon({ id: params.icon or 'arrow-right' }) }}
25
25
 
26
26
  {%- if params.link != null -%}
27
27
  </a>
@@ -67,7 +67,7 @@
67
67
  function toggleBackgroundColour(event) {
68
68
  const iframe = event.currentTarget.parentNode.parentNode.querySelector('iframe');
69
69
  if (iframe) {
70
- iframe.classList.toggle('u-bg-petrol-step-2');
70
+ iframe.classList.toggle('u-bg-petrol-step-3');
71
71
  iframe.classList.toggle('u-pad-s');
72
72
  }
73
73
  }
@@ -6,6 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>{{ fullTitle }}</title>
8
8
  {% if description %} <meta name="description" content="{{ description }}" /> {% endif %}
9
+ {% if not index %}<meta name="robots" content="noindex" />{% endif %}
9
10
  <meta name="theme-color" content="#005461">
10
11
  <meta property="og:type" content="website" />
11
12
  <meta property="og:title" content="{{ fullTitle }}" />
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  sidebar: false
3
+ index: true
3
4
  ---
4
5
 
5
6
  {% extends "library.njk" %}
@@ -5,6 +5,7 @@ import Comparison from './imports/comparison';
5
5
  import Gallery from './imports/gallery';
6
6
  import HeroPattern from './imports/hero-pattern';
7
7
  import HeroVideo from './imports/hero-video';
8
+ import OffCanvas from './imports/off-canvas';
8
9
  import ResponsiveTable from './imports/responsive-table';
9
10
  import ScrollbarWidth from './imports/scrollbar-width';
10
11
  import ScrollSpy from './imports/scroll-spy';
@@ -25,6 +26,7 @@ import Tabs from './imports/tabs';
25
26
  Gallery();
26
27
  HeroPattern();
27
28
  HeroVideo();
29
+ OffCanvas();
28
30
  ResponsiveTable();
29
31
  ScrollbarWidth();
30
32
  ScrollSpy();
@@ -0,0 +1,97 @@
1
+ // Add click event listeners to each toggle button
2
+ function OffCanvas() {
3
+ const toggleButtons = Array.from(document.querySelectorAll('.c-button--off-canvas-toggle'));
4
+ toggleButtons.forEach((button) => {
5
+ button.addEventListener('click', handleToggleClick);
6
+ });
7
+ }
8
+
9
+ // Function to handle the toggle button click
10
+ function handleToggleClick() {
11
+ const target = this.getAttribute('data-target');
12
+ const offCanvas = document.getElementById(target);
13
+ openOffCanvas(offCanvas);
14
+ }
15
+
16
+ // Function to open the off-canvas drawer
17
+ function openOffCanvas(offCanvas) {
18
+ const offCanvasList = document.querySelectorAll('.o-off-canvas');
19
+ const isOpen = offCanvas.classList.contains('o-off-canvas--open');
20
+
21
+ // Close other off-canvas drawers only if the target is not already open
22
+ if (!isOpen) {
23
+ offCanvasList.forEach((drawer) => {
24
+ if (drawer !== offCanvas) {
25
+ closeOffCanvas(drawer);
26
+ }
27
+ });
28
+ }
29
+
30
+ // Open the target off-canvas drawer
31
+ offCanvas.classList.add('o-off-canvas--open');
32
+ offCanvas.setAttribute('aria-hidden', 'false');
33
+
34
+ // Add click event listener to the backdrop to close the off-canvas drawer
35
+ const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');
36
+ backdrop.addEventListener('click', handleBackdropClick);
37
+
38
+ // Add keydown event listener to close the off-canvas drawer with the Esc key
39
+ document.addEventListener('keydown', handleKeyDown);
40
+ }
41
+
42
+ // Function to handle the backdrop click
43
+ function handleBackdropClick() {
44
+ const offCanvas = this.closest('.o-off-canvas');
45
+ closeOffCanvas(offCanvas);
46
+ }
47
+
48
+ // Function to handle the keydown event
49
+ function handleKeyDown(event) {
50
+ if (event.key === 'Escape') {
51
+ const openDrawer = document.querySelector('.o-off-canvas--open');
52
+ if (openDrawer) {
53
+ closeOffCanvas(openDrawer);
54
+ }
55
+ }
56
+ }
57
+
58
+ // Function to close the off-canvas drawer
59
+ function closeOffCanvas(offCanvas) {
60
+ offCanvas.classList.remove('o-off-canvas--open');
61
+ offCanvas.setAttribute('aria-hidden', 'true');
62
+
63
+ // Remove backdrop click event listener when closing the off-canvas drawer
64
+ const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');
65
+ backdrop.removeEventListener('click', handleBackdropClick);
66
+
67
+ // Remove keydown event listener when closing the off-canvas drawer
68
+ document.removeEventListener('keydown', handleKeyDown);
69
+ }
70
+
71
+ // Update button functionality
72
+ const updateButton = document.querySelectorAll('.o-off-canvas__update');
73
+ updateButton.forEach((button) => {
74
+ button.addEventListener('click', handleUpdateButtonClick);
75
+ });
76
+
77
+ // Handle the update button click
78
+ function handleUpdateButtonClick() {
79
+ // Save the options somewhere
80
+ const offCanvas = this.closest('.o-off-canvas');
81
+ closeOffCanvas(offCanvas);
82
+ }
83
+
84
+ // Close button functionality
85
+ const closeButton = document.querySelectorAll('.o-off-canvas__close');
86
+ closeButton.forEach((button) => {
87
+ button.addEventListener('click', handleCloseButtonClick);
88
+ });
89
+
90
+ // Handle the close button click
91
+ function handleCloseButtonClick() {
92
+ const offCanvas = this.closest('.o-off-canvas');
93
+ closeOffCanvas(offCanvas);
94
+ };
95
+
96
+
97
+ export default OffCanvas;
@@ -118,13 +118,6 @@ button {
118
118
  font: inherit;
119
119
  }
120
120
 
121
- [disabled],
122
- .mp.c-button[disabled] {
123
- cursor: not-allowed;
124
- filter: saturate(0.4);
125
- opacity: 0.6;
126
- }
127
-
128
121
  label {
129
122
  cursor: pointer;
130
123
  }
@@ -1,2 +1,3 @@
1
+ @import './off-canvas.scss';
1
2
  @import './prose.scss';
2
3
  @import './grid.scss';
@@ -0,0 +1,85 @@
1
+ .o-off-canvas {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background-color: transparent;
8
+ opacity: 0;
9
+ visibility: hidden;
10
+ transition: opacity 0.3s ease, visibility 0s linear 0.3s;
11
+ z-index: 9999;
12
+
13
+ &__backdrop {
14
+ position: fixed;
15
+ top: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ background-color: rgba(color("grey"), 0.5);
20
+ opacity: 0;
21
+ visibility: hidden;
22
+ transition: opacity 0.3s ease;
23
+ backdrop-filter: blur(5px);
24
+ }
25
+
26
+ &__content {
27
+ position: fixed;
28
+ top: 0;
29
+ right: -100%;
30
+ width: calc(100% - var(--space-m));
31
+ height: 100%;
32
+ background-color: color("white");
33
+ transition: right 0.3s ease;
34
+ display: flex;
35
+ flex-direction: column;
36
+ }
37
+
38
+ &__header {
39
+ @extend .c-h--step-3;
40
+ @include padding('s', 's', 0);
41
+
42
+ & > * {
43
+ margin-bottom: 0 !important;
44
+ }
45
+ }
46
+
47
+ &__header + &__main {
48
+ @include margin-top('m');
49
+ }
50
+
51
+ &__main {
52
+ @include margin-bottom('m');
53
+ @include padding(0, 's');
54
+ overflow-y: scroll;
55
+ }
56
+
57
+ &__footer {
58
+ @include margin-top('auto');
59
+ @include padding(0, 's', 's');
60
+ display: flex;
61
+ flex-direction: column;
62
+ align-items: stretch;
63
+ }
64
+
65
+ &__close {
66
+ @extend .u-link;
67
+ @include margin(0, 'auto');
68
+ @include padding('s');
69
+ }
70
+
71
+ &--open {
72
+ opacity: 1;
73
+ visibility: visible;
74
+ transition: opacity 0.3s ease;
75
+
76
+ .o-off-canvas__backdrop {
77
+ opacity: 1;
78
+ visibility: visible;
79
+ }
80
+
81
+ .o-off-canvas__content {
82
+ right: 0;
83
+ }
84
+ }
85
+ }
@@ -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';
@@ -2,6 +2,7 @@
2
2
  .mp .u-link,
3
3
  .u-link {
4
4
  color: color('utility-blue');
5
+ cursor: pointer;
5
6
 
6
7
  &:hover {
7
8
  text-decoration: underline;
@@ -21,6 +21,7 @@ Icons add visual noise to designs and should be used sparingly.
21
21
  'arrow-left',
22
22
  'arrow-right',
23
23
  'chevron-down',
24
+ 'chevron-up',
24
25
  'cross',
25
26
  'dash',
26
27
  'facebook',
@@ -28,12 +29,14 @@ Icons add visual noise to designs and should be used sparingly.
28
29
  'info',
29
30
  'instagram',
30
31
  'linkedin',
32
+ 'lock',
31
33
  'log-out',
32
34
  'play',
33
35
  'rss',
34
36
  'search',
35
37
  'tick',
36
38
  'twitter',
39
+ 'warning',
37
40
  'youtube'
38
41
  ] %}
39
42
 
@@ -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
package/src/index.njk CHANGED
@@ -11,7 +11,7 @@ renderData:
11
11
  {% from "components/card/macro.njk" import card %}
12
12
  {% from "components/usp/macro.njk" import usp %}
13
13
 
14
- <div class="o-grid o-grid--of-four">
14
+ <div class="o-grid o-grid--of-four u-pad-right-xl">
15
15
  {{ card({
16
16
  theme: {
17
17
  layout: 'single',
@@ -99,18 +99,25 @@ renderData:
99
99
  A combination of brand guidelines and a library of HTML/CSS/JS components.
100
100
 
101
101
  As Malvern Panalytical has grown, our online experiences have become disparate and inconsistent. The goal of this design system is to address this by creating a single source of truth. It will rely on us all using and contributing to it, with the ongoing support of the Design System Team.
102
+ {% endset %}
102
103
 
104
+ {% set latest %}
103
105
  ## Latest updates
104
- ##### V.{{ config.dsVersion }} - Jan 2022
106
+ ##### V.{{ config.dsVersion }} - May 2023
105
107
 
106
- - New Features Table component
107
- - New Gallery component
108
- - New illustration documentation
109
- - Fix IE11 navigation bug
108
+ - Add new toggle components
109
+ - Add new breadcrumb component
110
+ - Add button with loading indicator
111
+ - Update event card styles
110
112
  - Misc. fixes
111
- - Misc. documentation improvements
112
113
  {% endset %}
113
114
 
114
115
  {{ markdown({
115
116
  content: content
116
117
  }) }}
118
+
119
+ <div class="c-slat c-slat--crystal u-bg-blue-step-3 u-pad-x-l">
120
+ {{ markdown({
121
+ content: latest
122
+ }) }}
123
+ </div>