mp-design-system 0.9.17 → 0.9.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/build/arc.a8e07ecd.svg +1 -0
  2. package/dist/build/crystal.a90c9e1f.svg +1 -0
  3. package/dist/build/dots-pattern.1b95f054.svg +1 -0
  4. package/dist/build/js/app.js +1 -1
  5. package/dist/build/js/app.js.map +1 -1
  6. package/dist/build/scss/library.css +1 -1
  7. package/dist/build/scss/library.css.map +1 -1
  8. package/dist/build/scss/main.css +1 -1
  9. package/dist/build/scss/main.css.map +1 -1
  10. package/package.json +1 -1
  11. package/src/_includes/components/accordion/accordion.md +1 -1
  12. package/src/_includes/components/breadcrumb/breadcrumb.config.js +6 -4
  13. package/src/_includes/components/breadcrumb/breadcrumb.njk +18 -2
  14. package/src/_includes/components/breadcrumb/breadcrumb.scss +69 -0
  15. package/src/_includes/components/button/button.config.js +14 -1
  16. package/src/_includes/components/button/button.scss +34 -1
  17. package/src/_includes/components/campaign/campaign.config.js +4 -2
  18. package/src/_includes/components/card/card.config.js +43 -1
  19. package/src/_includes/components/card/card.scss +32 -0
  20. package/src/_includes/components/component/component.njk +2 -2
  21. package/src/_includes/components/gallery/gallery.config.js +34 -8
  22. package/src/_includes/components/gallery/gallery.md +1 -0
  23. package/src/_includes/components/gallery/gallery.njk +0 -1
  24. package/src/_includes/components/gallery/gallery.scss +7 -8
  25. package/src/_includes/components/input/radio.scss +21 -1
  26. package/src/_includes/components/post-meta/post-meta.njk +2 -2
  27. package/src/_includes/components/slat/slat.config.js +12 -0
  28. package/src/_includes/components/slat/slat.scss +14 -0
  29. package/src/_includes/components/table/table.config.js +7 -6
  30. package/src/_includes/components/table/table.md +16 -0
  31. package/src/_includes/components/table/table.scss +9 -0
  32. package/src/_includes/components/tabs/tabs.config.js +22 -3
  33. package/src/_includes/components/tabs/tabs.njk +1 -1
  34. package/src/_includes/components/tabs/tabs.scss +4 -0
  35. package/src/_includes/includes/system-header.njk +1 -1
  36. package/src/_includes/layout.njk +10 -5
  37. package/src/_includes/library-navigation/brand-nav.njk +1 -0
  38. package/src/_includes/library-navigation/components-nav.njk +1 -0
  39. package/src/assets/js/imports/accordion.js +0 -2
  40. package/src/assets/scss/components/index.scss +1 -0
  41. package/src/assets/scss/elements/reset.scss +2 -1
  42. package/src/assets/scss/foundations/animation.scss +4 -0
  43. package/src/assets/scss/foundations/index.scss +2 -1
  44. package/src/assets/scss/library.scss +9 -6
  45. package/src/assets/scss/objects/syntax-highlighting.scss +4 -0
  46. package/src/assets/scss/tools/cutoff.scss +21 -31
  47. package/src/assets/scss/utilities/flow.scss +1 -0
  48. package/src/assets/svg/arc.svg +1 -0
  49. package/src/assets/svg/crystal.svg +1 -0
  50. package/src/assets/svg/dots-pattern.svg +1 -1
  51. package/src/brand/basics.md +4 -3
  52. package/src/brand/illustration.md +8 -2
  53. package/src/brand/index.njk +1 -0
  54. package/src/brand/patterns.njk +43 -0
  55. package/src/brand/typography.md +12 -5
  56. package/src/components/creating-a-component.md +1 -1
  57. package/src/components/flow.njk +31 -18
  58. package/src/components/iconography.njk +1 -1
  59. package/src/components/index.njk +1 -0
  60. package/src/components/installation.md +3 -1
  61. package/src/components/utilities.md +37 -11
  62. package/src/content/index.njk +1 -0
  63. package/src/index.njk +8 -4
  64. package/src/prototype/product.njk +29 -19
  65. package/src/static/img/slide-4.webp +0 -0
  66. package/src/static/img/slide-5.webp +0 -0
  67. package/src/static/img/slide-6.webp +0 -0
  68. package/src/static/img/slide-7.webp +0 -0
  69. package/dist/build/dots-pattern.3c9c2a26.svg +0 -1
  70. package/src/_includes/components/campaign/campaign.md +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "0.9.17",
3
+ "version": "0.9.25",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -1,5 +1,5 @@
1
1
  ## Blank HTML template
2
- ```
2
+ ```html
3
3
  <dl class="c-accordion">
4
4
  <div class="c-accordion__item">
5
5
  <dt class="c-accordion__title">Title one</dt>
@@ -4,14 +4,16 @@ module.exports = {
4
4
  name: 'breadcrumb',
5
5
  },
6
6
  context: {
7
- label: 'The Mastersizer Range',
8
- link: '#'
7
+ links: [
8
+ { link: '/en/services', label: 'Contract Research and Manufacturing...' },
9
+ { link: '/en/services/pharmaceutical-drug-development', label: 'Pharmaceutical drug development...' },
10
+ { link: '', label: 'Pre-clinical process research and...' },
11
+ ]
9
12
  },
10
13
  props: [
11
14
  {
12
15
  table: [
13
- ['label', 'string'],
14
- ['link', 'string'],
16
+ ['links', 'link[]', '"link" and "label" objects']
15
17
  ]
16
18
  }
17
19
  ]
@@ -1,3 +1,19 @@
1
- {% from "components/twi/macro.njk" import twi %}
1
+ {% from "components/icon/macro.njk" import icon %}
2
+
3
+ <nav class="c-breadcrumb {{ params.classes }}" aria-label="Breadcrumb">
4
+ <ol class="c-breadcrumb__list" role="list">
5
+ {% for item in params.links %}
6
+ {% if loop.index < loop.length %}
7
+ <li class="c-breadcrumb__item" role="listitem">
8
+ <a href="{{ item.link }}" class="c-breadcrumb__link">{{ item.label }}</a>
9
+ {{ icon({ id: 'chevron-down' }) }}
10
+ </li>
11
+ {% else %}
12
+ <li class="c-breadcrumb__item" role="listitem">
13
+ <span class="c-breadcrumb__current" aria-current="{{ item.label }}">{{ item.label}}</span>
14
+ </li>
15
+ {% endif %}
16
+ {% endfor %}
17
+ </ol>
18
+ </nav>
2
19
 
3
- {{ twi({ icon: 'arrow-left', link: params.link, label: params.label, classes: 'u-link' }) }}
@@ -0,0 +1,69 @@
1
+ .c-breadcrumb {
2
+ &__list {
3
+ @include padding-bottom("s-m");
4
+ display: flex;
5
+ overflow-x: auto;
6
+ }
7
+
8
+ &__item {
9
+ font-size: var(--step--2);
10
+ display: inline-flex;
11
+ align-items: center;
12
+ white-space: nowrap;
13
+
14
+ .c-icon {
15
+ @include margin-right("3xs");
16
+ @include margin-left("3xs");
17
+ color: color('grey', 'step-1');
18
+ transform: rotate(270deg);
19
+ }
20
+ }
21
+
22
+ &__link {
23
+ color: color('utility-blue', 'step-1');
24
+ text-decoration: underline;
25
+
26
+ &:hover {
27
+ color: color('utility-blue', 'step-1');
28
+ text-decoration: none;
29
+ }
30
+ }
31
+
32
+ &__current {
33
+ color: color('grey', 'step-1');
34
+ }
35
+
36
+ // color: color('utility-blue');
37
+
38
+ // &__wrap {
39
+ // position: relative;
40
+
41
+ // &:after {
42
+ // content: '';
43
+ // background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
44
+ // position: absolute;
45
+ // z-index: 1;
46
+ // height: 100%;
47
+ // right: 0;
48
+ // top: 0;
49
+ // @include space('width', 'l');
50
+
51
+ // @media (min-width: $wrapper) {
52
+ // display: none;
53
+ // }
54
+ // }
55
+ // }
56
+
57
+ // &__list {
58
+ // @include padding-bottom('m-l');
59
+ // @include margin-bottom('m-l');
60
+ // border-bottom: 1px solid color('petrol', 'step-2');
61
+ // white-space: nowrap;
62
+ // overflow-x: auto;
63
+ // display: flex;
64
+
65
+ // & > * + * {
66
+ // @include margin-left('m-l');
67
+ // }
68
+ // }
69
+ }
@@ -26,6 +26,12 @@ module.exports = {
26
26
  colour: 'white'
27
27
  }
28
28
  },
29
+ {
30
+ title: 'Utility blue',
31
+ context: {
32
+ colour: 'utility-blue'
33
+ }
34
+ },
29
35
  {
30
36
  title: 'Outline green',
31
37
  context: {
@@ -43,6 +49,12 @@ module.exports = {
43
49
  context: {
44
50
  classes: 'c-button--small'
45
51
  }
52
+ },
53
+ {
54
+ title: 'Loading',
55
+ context: {
56
+ classes: 'c-button--loading'
57
+ }
46
58
  }
47
59
  ],
48
60
  props: [
@@ -63,7 +75,8 @@ module.exports = {
63
75
  ['c-button--[colour]', 'petrol, red, blue, white, outline-green, outline-white'],
64
76
  ['c-button--small', '', 'Shrinks the button'],
65
77
  ['c-button--wide', '', 'Makes the button 100% width'],
66
- ['c-button--tight', '', 'Reduces the left/right padding']
78
+ ['c-button--tight', '', 'Reduces the left/right padding'],
79
+ ['c-button--loading', '', 'Replace the button text with a loading indicator']
67
80
  ]
68
81
  }
69
82
  ]
@@ -106,6 +106,15 @@
106
106
  }
107
107
  }
108
108
 
109
+ &--utility-blue {
110
+ background-color: color("utility-blue");
111
+
112
+ &:focus,
113
+ &:hover {
114
+ background-color: color("utility-blue", "step--1");
115
+ }
116
+ }
117
+
109
118
  &--outline-white {
110
119
  background: transparent;
111
120
  color: color("white");
@@ -135,4 +144,28 @@
135
144
  @include step(-1);
136
145
  padding: 0.5em 1em;
137
146
  }
138
- }
147
+
148
+ &--loading {
149
+ color: transparent;
150
+ transition: color .3s ease;
151
+
152
+ &:after {
153
+ content: '⌛';
154
+ color: color("white");
155
+ position: absolute;
156
+ }
157
+
158
+ @media (prefers-reduced-motion:no-preference) {
159
+ &:after {
160
+ content: '';
161
+ animation: spin 1.2s ease infinite;
162
+ border-radius: 50%;
163
+ border: 3px solid #3336;
164
+ border-top-color: color("white");
165
+ display: block;
166
+ height: 1em;
167
+ width: 1em;
168
+ }
169
+ }
170
+ }
171
+ }
@@ -3,7 +3,6 @@ module.exports = {
3
3
  component: {
4
4
  name: 'campaign',
5
5
  },
6
- docs: true,
7
6
  context: {
8
7
  title: 'OmniTrust: Analytics you can trust.',
9
8
  content: '<p>At last, a compliance breakthrough: Omnitrust joins up all your instruments and platforms, authorizes users, keeps all your data audit-ready – and is completely configurable to your workflow.</p>',
@@ -59,7 +58,10 @@ module.exports = {
59
58
  {
60
59
  title: 'CSS modifiers',
61
60
  table: [
62
- ['c-campaign--switch', '', 'Switches the image from left to right']
61
+ ['c-campaign--switch', '', 'Switches the image from left to right'],
62
+ ['c-campaign--petrol', '', 'Petrol colour variant'],
63
+ ['c-campaign--blue', '', 'Blue colour variant'],
64
+ ['c-campaign--orange', '', 'Orange colour variant']
63
65
  ]
64
66
  }
65
67
  ]
@@ -731,7 +731,49 @@ module.exports = {
731
731
  content: '<p>确定聚合物材料的分子量、粒度和结构</p>'
732
732
  }
733
733
  }
734
- }
734
+ },
735
+ {
736
+ title: 'Event card (with image)',
737
+ preview: 'content-width',
738
+ context: {
739
+ theme: {
740
+ border: false,
741
+ size: 'small',
742
+ layout: 'multi',
743
+ name: 'event',
744
+ inlineSpecs: true,
745
+ corner: true,
746
+ },
747
+ image: {
748
+ src: '/static/img/blog-page-image-1.jpg',
749
+ alt: 'Product image alt'
750
+ },
751
+ header: {
752
+ title: 'Discover how on-line particle sizing optimises mining analytics.',
753
+ date: {
754
+ date: new Date(),
755
+ time: '11:00 – 12:00',
756
+ timezone: 'EST'
757
+ },
758
+ meta: [
759
+ 'English'
760
+ ],
761
+ },
762
+ body: {
763
+ keySpecs: [
764
+ {
765
+ title: 'Products',
766
+ term: 'Morphologi G3-ID'
767
+ },
768
+ {
769
+ title: 'Technologies',
770
+ term: 'Morphologically-Directed Raman Spectroscopy'
771
+ }
772
+ ]
773
+ },
774
+ link: '#'
775
+ }
776
+ },
735
777
  ],
736
778
 
737
779
  props: [
@@ -403,6 +403,38 @@
403
403
  flex-wrap: wrap;
404
404
  @include gap("s-l");
405
405
  }
406
+
407
+ &--event.c-card--has-image {
408
+ @extend .c-card--switch;
409
+
410
+ .c-card__wrapper {
411
+ @include padding(0);
412
+
413
+ .c-card__primary {
414
+ @include padding("s-m");
415
+ }
416
+
417
+ .c-card__image {
418
+ img {
419
+ height: 100%;
420
+ width: auto;
421
+ object-fit: cover;
422
+ }
423
+ }
424
+
425
+ @media (min-width: 55em) {
426
+ .c-card__primary {
427
+ width: calc(60% - 18px) !important;
428
+ width: calc(60% - var(--space-s-m)) !important;
429
+ }
430
+
431
+ .c-card__image {
432
+ width: calc(40% - 18px) !important;
433
+ width: calc(40% - var(--space-s-m)) !important;
434
+ }
435
+ }
436
+ }
437
+ }
406
438
  }
407
439
 
408
440
  // IE11 fix
@@ -46,7 +46,7 @@
46
46
  <thead>
47
47
  <tr>
48
48
  <th>Name</th>
49
- <th>Type</th>
49
+ {% if propRows[0][1] %}<th>Type</th>{% endif %}
50
50
  <th>Description</th>
51
51
  </tr>
52
52
  </thead>
@@ -54,7 +54,7 @@
54
54
  {% for row in propRows %}
55
55
  <tr>
56
56
  <th>{{ row[0] }}</th>
57
- <td>{{ row[1] }}</td>
57
+ {% if row[1] %}<td>{{ row[1] }}</td>{% endif %}
58
58
  <td>{{ row[2] | safe }}</td>
59
59
  </tr>
60
60
  {% endfor %}
@@ -3,20 +3,24 @@ module.exports = {
3
3
  component: {
4
4
  name: 'gallery'
5
5
  },
6
- // docs: true,
6
+ docs: true,
7
7
  context: {
8
8
  images: [
9
9
  {
10
- src: '/static/img/slide-1.jpg',
11
- title: 'Mastersizer slide 1'
10
+ src: '/static/img/slide-4.webp',
11
+ title: 'Zetasizer slide 1'
12
12
  },
13
13
  {
14
- src: '/static/img/slide-2.jpg',
15
- title: 'Mastersizer slide 2'
14
+ src: '/static/img/slide-5.webp',
15
+ title: 'Zetasizer slide 2'
16
16
  },
17
17
  {
18
- src: '/static/img/slide-3.jpg',
19
- title: 'Mastersizer slide 3'
18
+ src: '/static/img/slide-6.webp',
19
+ title: 'Zetasizer slide 3'
20
+ },
21
+ {
22
+ src: '/static/img/slide-7.webp',
23
+ title: 'Zetasizer slide 4'
20
24
  }
21
25
  ],
22
26
  videos: [
@@ -25,5 +29,27 @@ module.exports = {
25
29
  id: 'Q4H7EdHFghs'
26
30
  }
27
31
  ]
28
- }
32
+ },
33
+ props: [
34
+ {
35
+ table: [
36
+ ['images', 'image[]', 'An array of images'],
37
+ ['videos','video[]','An array of videos']
38
+ ]
39
+ },
40
+ {
41
+ title: 'image',
42
+ table: [
43
+ ['src','string'],
44
+ ['title','string']
45
+ ]
46
+ },
47
+ {
48
+ title: 'video',
49
+ table: [
50
+ ['title','string'],
51
+ ['id','string','Youtube ID']
52
+ ]
53
+ }
54
+ ]
29
55
  }
@@ -0,0 +1 @@
1
+ Gallery images are displayed at 16:9 ratio, regardless of the image's true size. This prevents the component from unexpectedly changing size when switching between images.
@@ -48,5 +48,4 @@
48
48
  {% endfor %}
49
49
  {% endif %}
50
50
  </div>
51
- </div>
52
51
  </div>
@@ -1,4 +1,6 @@
1
1
  .c-gallery {
2
+ max-height: 95vh;
3
+
2
4
  img {
3
5
  cursor: pointer;
4
6
  }
@@ -10,13 +12,11 @@
10
12
  width: 100%;
11
13
 
12
14
  img {
15
+ aspect-ratio: 16 / 9;
13
16
  display: block;
14
17
  margin: 0 auto;
15
-
16
- @supports (object-fit:contain) {
17
- max-height: 500px;
18
- object-fit: contain;
19
- }
18
+ max-height: calc(95vh - 90px);
19
+ object-fit: contain;
20
20
  }
21
21
 
22
22
  &:not(.active) {
@@ -35,10 +35,9 @@
35
35
 
36
36
  & > * {
37
37
  background: color('grey', 'step-3');
38
- @include space('min-height', 'l');
39
- @include space('max-height', '2xl');
40
- @include space('min-width', 'l');
41
38
  max-width: 10.75%;
39
+ max-width: max(var(--space-xl), 10.75%);
40
+ aspect-ratio: 16 / 9;
42
41
 
43
42
  img {
44
43
  height: 100%;
@@ -32,7 +32,7 @@
32
32
  &:checked + input[type=hidden] + label:before {
33
33
  background: color('utility-blue');
34
34
  }
35
-
35
+
36
36
  &:checked + label:after,
37
37
  &:checked + input[type=hidden] + label:after {
38
38
  transform: translateX(6.5px) translateY(-1.5px) translateY(-50%) rotate(45deg);
@@ -47,6 +47,21 @@
47
47
  }
48
48
  }
49
49
 
50
+ .c-radio,
51
+ .c-checkbox {
52
+ & + label:hover:before,
53
+ & + input[type=hidden] + label:hover:before {
54
+ background-color: color('utility-blue','step-3');
55
+ }
56
+ }
57
+
58
+ .c-checkbox {
59
+ &:checked + label:hover:before,
60
+ &:checked + input[type=hidden] + label:hover:before {
61
+ background: color('utility-blue', 'step--1');
62
+ }
63
+ }
64
+
50
65
  .c-radio {
51
66
  & + label:before,
52
67
  & + input[type=hidden] + label:before {
@@ -57,4 +72,9 @@
57
72
  &:checked + input[type=hidden] + label:before {
58
73
  box-shadow: inset 0 0 0 5px color('utility-blue');
59
74
  }
75
+
76
+ &:checked + label:hover:before,
77
+ &:checked + input[type=hidden] + label:hover:before {
78
+ box-shadow: inset 0 0 0 5px color('utility-blue', 'step--1');
79
+ }
60
80
  }
@@ -1,13 +1,13 @@
1
1
  {%- from "components/series/macro.njk" import series -%}
2
2
 
3
- <div class="mp c-post-meta">
3
+ <div class="mp c-post-meta {{ "u-link-inside" if params.author }}">
4
4
  {% if params.series %}
5
5
  {{ series({
6
6
  links: params.series
7
7
  }) }}
8
8
  {% endif %}
9
9
  {% if params.author %}
10
- <p>By <a class="u-link u-link--underline" href="{{ params.author.link }}">{{ params.author.label | safe }}</a>, Wednesday 6 January 2021</p>
10
+ <p>By <a href="{{ params.author.link }}">{{ params.author.label | safe }}</a>, Wednesday 6 January 2021</p>
11
11
  {% else %}
12
12
  {{ params.content | safe }}
13
13
  {% endif %}
@@ -37,6 +37,18 @@ module.exports = {
37
37
  classes: 'c-slat c-slat--grey c-slat--dots'
38
38
  }
39
39
  },
40
+ {
41
+ title: 'Crystal',
42
+ context: {
43
+ classes: 'c-slat c-slat--grey c-slat--crystal'
44
+ }
45
+ },
46
+ {
47
+ title: 'Arc',
48
+ context: {
49
+ classes: 'c-slat c-slat--grey c-slat--arc'
50
+ }
51
+ },
40
52
  {
41
53
  title: 'Large padding',
42
54
  context: {
@@ -27,6 +27,20 @@
27
27
  background-position: left top;
28
28
  background-size: auto 100%;
29
29
  }
30
+
31
+ &--crystal {
32
+ background-image: url('../svg/crystal.svg');
33
+ background-repeat: no-repeat;
34
+ background-position: right bottom;
35
+ background-size: auto 100%;
36
+ }
37
+
38
+ &--arc {
39
+ background-image: url('../svg/arc.svg');
40
+ background-repeat: no-repeat;
41
+ background-position: right bottom;
42
+ background-size: auto 100%;
43
+ }
30
44
 
31
45
  &--padded {
32
46
  @include padding-bottom('l-2xl');
@@ -1,13 +1,14 @@
1
1
  module.exports = {
2
2
  title: 'Table',
3
+ docs: true,
3
4
  component: {
4
5
  name: 'table'
5
6
  },
6
7
  context: {
7
8
  headers: ['Name', 'Description'],
8
9
  rows: [
9
- ['Name 1', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.'],
10
- ['Name 2', 'Nullam quis risus eget urna mollis ornare vel eu leo.']
10
+ ['Aeris', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.'],
11
+ ['OMNISEC', 'Nullam quis risus eget urna mollis ornare vel eu leo.']
11
12
  ]
12
13
  },
13
14
  variants: [
@@ -34,8 +35,8 @@ module.exports = {
34
35
  context: {
35
36
  classes: 'c-table--center',
36
37
  rows: [
37
- ['Name 1', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.<br />Vestibulum id ligula porta felis euismod semper.<br />Sed posuere consectetur est at lobortis.'],
38
- ['Name 2', 'Nullam quis risus eget urna mollis ornare vel eu leo.']
38
+ ['Aeris', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.<br />Vestibulum id ligula porta felis euismod semper.<br />Sed posuere consectetur est at lobortis.'],
39
+ ['OMNISEC', 'Nullam quis risus eget urna mollis ornare vel eu leo.']
39
40
  ]
40
41
  }
41
42
  },
@@ -51,8 +52,8 @@ module.exports = {
51
52
  classes: 'c-table--responsive',
52
53
  headers: ['Name', 'Type', 'Description'],
53
54
  rows: [
54
- ['Name 1', 'Value 1.1', 'Value 1.2'],
55
- ['Name 2', 'Value 2.1', 'Value 2.2'],
55
+ ['Aeris', 'Value 1.1', 'Value 1.2'],
56
+ ['OMNISEC', 'Value 2.1', 'Value 2.2'],
56
57
  ]
57
58
  }
58
59
  },
@@ -0,0 +1,16 @@
1
+ ## Responsive variant
2
+
3
+ For the `.c-table--responsive` variant to display correctly, give each `<td>` element a `data-responsive-title` attribute, corresponding to the column headers. E.g. for a two-column table where the column headers are "Name" and "Description", the `<td>`s should be marked up as follows:
4
+
5
+ ```html
6
+ <tbody>
7
+ <tr>
8
+ <td data-responsive-title="Name">Aeris</td>
9
+ <td data-responsive-title="Description">Vivamus sagittis lacus vel</td>
10
+ </tr>
11
+ <tr>
12
+ <td data-responsive-title="Name">OMNISEC</td>
13
+ <td data-responsive-title="Description">Nullam quis risus eget urna</td>
14
+ </tr>
15
+ </tbody>
16
+ ```
@@ -19,6 +19,15 @@
19
19
  border-top: 2px solid color('white');
20
20
  vertical-align: top;
21
21
  color: inherit;
22
+
23
+ }
24
+
25
+ // Allow setting 'u-bg' background colours on table rows
26
+ tr[class*='u-bg'] {
27
+ td,
28
+ th {
29
+ background-color: inherit;
30
+ }
22
31
  }
23
32
 
24
33
  th {
@@ -8,8 +8,11 @@ module.exports = {
8
8
  context: {
9
9
  type: 'anchor',
10
10
  tabs: [
11
- { id: 'tab-1', label: 'Tab 1', content: '<h2 class="c-h c-h--step-3">Tab 1</h2>', active: true },
12
- { id: 'tab-2', label: 'Tab 2', content: '<h2 class="c-h c-h--step-3">Tab 2</h2>' }
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>' },
13
16
  ]
14
17
  },
15
18
  props: [
@@ -31,8 +34,24 @@ module.exports = {
31
34
  {
32
35
  title: 'CSS modifiers',
33
36
  table: [
34
- ['c-tabs--flex', '', 'Instead of \'block\', display the active tabs as \'flex\'']
37
+ ['c-tabs--flex', '', 'Instead of \'block\', display the active tabs as \'flex\''],
38
+ ['c-tabs--persist', '', 'Add a URL fragment (aka hashtag) to the browser URL']
35
39
  ]
40
+ },
41
+ {
42
+ title: 'Utilities',
43
+ table: [
44
+ ['u-scroll-shadows--h','','When the tab row is too wide for the screen, scroll indicators are displayed']
45
+ ]
46
+ }
47
+ ],
48
+ variants: [
49
+ {
50
+ title: 'Scroll shadows',
51
+ context: {
52
+ shadows: true
53
+ },
54
+ preview: 'cards-three'
36
55
  }
37
56
  ]
38
57
  }
@@ -1,5 +1,5 @@
1
1
  <div class="mp c-tabs {{ 'c-tabs--' + params.type if params.type }}">
2
- <nav class="c-tabs__controls">
2
+ <nav class="c-tabs__controls {{ "u-scroll-shadows--h" if params.shadows }}">
3
3
  <ul class="c-tabs__controls-list">
4
4
  {% for tab in params.tabs %}
5
5
  <li><a class="c-tabs__control {{ 'c-tabs__control--active' if tab.active }}" href="#{{ tab.id }}">{{ tab.label }}</a></li>