@madgex/design-system 1.51.0 → 1.53.0

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.
Files changed (83) hide show
  1. package/coverage/cobertura-coverage.xml +128 -85
  2. package/coverage/components/accordion/accordion.js.html +1 -1
  3. package/coverage/components/accordion/index.html +1 -1
  4. package/coverage/components/inputs/combobox/combobox.js.html +1 -1
  5. package/coverage/components/inputs/combobox/index.html +1 -1
  6. package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +67 -16
  7. package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +211 -0
  8. package/coverage/components/inputs/combobox/vue-components/index.html +35 -20
  9. package/coverage/components/inputs/multi-select/index.html +1 -1
  10. package/coverage/components/inputs/multi-select/multi-select.js.html +1 -1
  11. package/coverage/components/inputs/multi-select/vue-components/MultiSelect.vue.html +1 -1
  12. package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckbox.vue.html +1 -1
  13. package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckboxGroup.vue.html +1 -1
  14. package/coverage/components/inputs/multi-select/vue-components/index.html +1 -1
  15. package/coverage/components/modal/index.html +1 -1
  16. package/coverage/components/modal/modal.js.html +1 -1
  17. package/coverage/components/notification/index.html +1 -1
  18. package/coverage/components/notification/notification.js.html +1 -1
  19. package/coverage/components/popover/index.html +1 -1
  20. package/coverage/components/popover/popover.js.html +1 -1
  21. package/coverage/components/switch-state/index.html +1 -1
  22. package/coverage/components/switch-state/switch-state.js.html +1 -1
  23. package/coverage/components/tabs/index.html +1 -1
  24. package/coverage/components/tabs/tabs.js.html +1 -1
  25. package/coverage/index.html +20 -20
  26. package/coverage/js/common.js.html +1 -1
  27. package/coverage/js/fractal-scripts/combobox.js.html +1 -1
  28. package/coverage/js/fractal-scripts/index.html +1 -1
  29. package/coverage/js/fractal-scripts/notification.js.html +1 -1
  30. package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
  31. package/coverage/js/index-fractal.js.html +1 -1
  32. package/coverage/js/index-polyfills.js.html +1 -1
  33. package/coverage/js/index-vue.js.html +1 -1
  34. package/coverage/js/index.html +1 -1
  35. package/coverage/js/index.js.html +1 -1
  36. package/coverage/js/polyfills/closest.js.html +1 -1
  37. package/coverage/js/polyfills/index.html +1 -1
  38. package/coverage/js/polyfills/remove.js.html +1 -1
  39. package/coverage/tokens/_config.js.html +1 -1
  40. package/coverage/tokens/index.html +1 -1
  41. package/dist/_tokens/css/_tokens.css +4 -1
  42. package/dist/_tokens/js/_tokens-module.js +54 -1
  43. package/dist/_tokens/scss/_tokens.scss +10 -2
  44. package/dist/assets/icons.json +1 -1
  45. package/dist/assets/icons.svg +1 -1
  46. package/dist/css/index.css +1 -1
  47. package/dist/js/index.js +6 -6
  48. package/docs/tokens/colour.njk +2 -2
  49. package/package.json +1 -1
  50. package/src/components/accordion/README.md +12 -1
  51. package/src/components/accordion/_template.njk +38 -17
  52. package/src/components/accordion/accordion.config.js +14 -0
  53. package/src/components/accordion/accordion.njk +4 -1
  54. package/src/components/accordion/accordion.scss +21 -4
  55. package/src/components/icons/icons.scss +2 -2
  56. package/src/components/inputs/combobox/combobox.scss +16 -1
  57. package/src/components/inputs/combobox/vue-components/Combobox.vue +23 -6
  58. package/src/components/inputs/combobox/vue-components/ListBox.vue +13 -0
  59. package/src/components/inputs/combobox/vue-components/ListBoxOption.vue +20 -3
  60. package/src/components/inputs/multi-select/multi-select.config.js +1 -1
  61. package/src/components/inputs/select/select.config.js +3 -3
  62. package/src/components/skip-link/README.md +11 -0
  63. package/src/components/skip-link/_macro.njk +3 -0
  64. package/src/components/skip-link/_template.njk +3 -0
  65. package/src/components/skip-link/skip-link.njk +8 -0
  66. package/src/components/skip-link/skip-link.scss +16 -0
  67. package/src/icons/chevron-down.svg +7 -46
  68. package/src/icons/chevron-left.svg +4 -6
  69. package/src/icons/chevron-right.svg +4 -6
  70. package/src/icons/chevron-up.svg +7 -46
  71. package/src/icons/close.svg +7 -0
  72. package/src/icons/minus.svg +7 -0
  73. package/src/icons/plus-small.svg +7 -0
  74. package/src/icons/plus.svg +7 -0
  75. package/src/layout/containers/01-base-containers.njk +20 -18
  76. package/src/layout/containers/README.md +3 -0
  77. package/src/layout/containers/base-containers.config.json +1 -1
  78. package/src/scss/components/__index.scss +2 -1
  79. package/src/scss/core/_containers.scss +5 -0
  80. package/src/scss/utilities/_z-index.scss +6 -6
  81. package/src/tokens/color.json +3 -0
  82. package/src/tokens/size.json +11 -3
  83. package/tasks/colorTransforms.js +1 -1
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Icon/ -/ 12px_32</title>
4
+ <g id="Icon/--/-12px_32" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <path d="M4,16 C4,14.8609127 4.84646164,13.9195271 5.94468833,13.7705398 L6.25,13.75 L25.75,13.75 C26.9926407,13.75 28,14.7573593 28,16 C28,17.1390873 27.1535384,18.0804729 26.0553117,18.2294602 L25.75,18.25 L6.25,18.25 C5.00735931,18.25 4,17.2426407 4,16 Z" id="Combined-Shape-Copy" fill="#001FFF"></path>
6
+ </g>
7
+ </svg>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Icon/ +/ 12px_32</title>
4
+ <g id="Icon/-+/-12px_32" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <path d="M16,4 C17.1390873,4 18.0804729,4.84646164 18.2294602,5.94468833 L18.25,6.25 L18.25,13.75 L25.75,13.75 C26.9926407,13.75 28,14.7573593 28,16 C28,17.1390873 27.1535384,18.0804729 26.0553117,18.2294602 L25.75,18.25 L18.25,18.25 L18.25,25.75 C18.25,26.9926407 17.2426407,28 16,28 C14.8609127,28 13.9195271,27.1535384 13.7705398,26.0553117 L13.75,25.75 L13.75,18.25 L6.25,18.25 C5.00735931,18.25 4,17.2426407 4,16 C4,14.8609127 4.84646164,13.9195271 5.94468833,13.7705398 L6.25,13.75 L13.75,13.75 L13.75,6.25 C13.75,5.00735931 14.7573593,4 16,4 Z" id="Combined-Shape-Copy" fill="#001FFF"></path>
6
+ </g>
7
+ </svg>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Icon/ Chevron/ +/ 8px_32</title>
4
+ <g id="Icon/-Chevron/-+/-8px_32" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <path d="M16,0 C17.5187831,0 18.7739638,1.12861553 18.9726135,2.59291777 L19,3 L19,13 L29,13 C30.6568542,13 32,14.3431458 32,16 C32,17.5187831 30.8713845,18.7739638 29.4070822,18.9726135 L29,19 L19,19 L19,29 C19,30.6568542 17.6568542,32 16,32 C14.4812169,32 13.2260362,30.8713845 13.0273865,29.4070822 L13,29 L13,19 L3,19 C1.34314575,19 8.22439572e-17,17.6568542 1.8369702e-16,16 C2.76695661e-16,14.4812169 1.12861553,13.2260362 2.59291777,13.0273865 L3,13 L13,13 L13,3 C13,1.34314575 14.3431458,0 16,0 Z" id="Combined-Shape-Copy" fill="#001FFF"></path>
6
+ </g>
7
+ </svg>
@@ -1,27 +1,29 @@
1
1
  <div class="mds-site-container container-example" style="margin: 80px 0;">
2
- <div class="mds-wrapper">
3
- <div class="mds-surface mds-margin-bottom-b5">
4
- <div class="mds-surface__inner">
5
- <h2>Content inside the site-container and wrapper</h2>
6
- <p>site-container is 100%</p>
7
- <p>wrapper is 100% - 20px (gutter width) and max-width 1280px (1.5% left and right padding)</p>
8
- <div style="height: 100px;"></div>
9
- </div>
10
- </div>
11
- <div class="mds-grid-row mds-margin-bottom-b5">
12
- <div class="mds-grid-col-12 mds-grid-col-sm-12 mds-grid-col-md-5 mds-grid-col-lg-8 mds-grid-col-xl-7">
13
- <div class="mds-surface">
14
- <div class="mds-surface__inner">Surface - test padding</div>
2
+ <main class="mds-main" role="main">
3
+ <div class="mds-wrapper">
4
+ <div class="mds-surface mds-margin-bottom-b5">
5
+ <div class="mds-surface__inner">
6
+ <h2>Content inside the site-container and wrapper</h2>
7
+ <p>site-container is 100%</p>
8
+ <p>wrapper is 100% - 20px (gutter width) and max-width 1280px (1.5% left and right padding)</p>
9
+ <div style="height: 100px;"></div>
15
10
  </div>
16
11
  </div>
17
- <div class="mds-grid-col-5 mds-grid-col-sm-5 mds-grid-col-md-7 mds-grid-col-lg-4 mds-grid-col-xl-5">
18
- <div class="mds-surface">
19
- <div class="mds-surface__inner">Surface - test padding</div>
12
+ <div class="mds-grid-row mds-margin-bottom-b5">
13
+ <div class="mds-grid-col-12 mds-grid-col-sm-12 mds-grid-col-md-5 mds-grid-col-lg-8 mds-grid-col-xl-7">
14
+ <div class="mds-surface">
15
+ <div class="mds-surface__inner">Surface - test padding</div>
16
+ </div>
17
+ </div>
18
+ <div class="mds-grid-col-5 mds-grid-col-sm-5 mds-grid-col-md-7 mds-grid-col-lg-4 mds-grid-col-xl-5">
19
+ <div class="mds-surface">
20
+ <div class="mds-surface__inner">Surface - test padding</div>
21
+ </div>
20
22
  </div>
21
23
  </div>
24
+ <div class="mds-fixed-container mds-fixed-container--sticky mds-padding-b5 mds-text-align-center">This is a sticky container</div>
22
25
  </div>
23
- <div class="mds-fixed-container mds-fixed-container--sticky mds-padding-b5 mds-text-align-center">This is a sticky container</div>
24
- </div>
26
+ </main>
25
27
  </div>
26
28
 
27
29
  {# <div class="mds-fixed-container mds-padding-b5 mds-text-align-center">This a fixed container at the bottom</div> #}
@@ -14,6 +14,9 @@ When placed inside a `mds-wrapper` block, the container will stretch automatical
14
14
 
15
15
  _Note: We don't currently use the sticky block inside a wrapper block at tablet/desktop size so it may have to be reviewed when we do._
16
16
 
17
+ `mds-main` - this class is added to the HTML `<main>` element which represents the dominant content of the <body> of a document. (Note: A document mustn't have more than one `<main>` element that doesn't have the hidden attribute specified.)
18
+ This class is there to be able to customise this container like adding a background, margin or padding with the help of branding tokens.
19
+
17
20
  ## Branded Containers
18
21
 
19
22
  Use `mds-branded-container mds-branded-container--1` to get a container with the brand colour 1 as a background and white text (the background and the text are tokens that can be changed per project).
@@ -1,3 +1,3 @@
1
1
  {
2
- "notes": "## Containers\n\nClass `mds-site-container` should be added right after the body, it contains all the visual elements of the site\n\n`mds-wrapper` inside `mds-site-container` will give a max-width to the content of the pages\n\n`mds-surface` will add a block with a white background, border and and border-radius. Add `mds-surface__inner` inside it to get the padding.\n\n`mds-surface__inner` has a default padding of 16px but it doubles from the `md` breakpoint (600px). However, when using the grid, if the surface block is contained inside a grid column that is less than half the width of the grid, the padding will stay at 16px.\n\nTo add a `position: fixed` container, use `mds-fixed-container`. By default it will be fixed at the bottom. Use `mds-fixed-container--top` to fix it at the top.\n\nTo add a `position: sticky` to the container, use the modifier `mds-fixed-container--sticky`.\n\nWhen placed inside a `mds-wrapper` block, the container will stretch automatically to the full width of the container by default and will go back to be within the wrapper constraints from 600px.\n\n*Note: We don't currently use the sticky block inside a wrapper block at tablet/desktop size so it may have to be reviewed when we do.*"
2
+ "notes": "## Containers\n\nClass `mds-site-container` should be added right after the body, it contains all the visual elements of the site\n\n`mds-wrapper` inside `mds-site-container` will give a max-width to the content of the pages\n\n`mds-surface` will add a block with a white background, border and and border-radius. Add `mds-surface__inner` inside it to get the padding.\n\n`mds-surface__inner` has a default padding of 16px but it doubles from the `md` breakpoint (600px). However, when using the grid, if the surface block is contained inside a grid column that is less than half the width of the grid, the padding will stay at 16px.\n\nTo add a `position: fixed` container, use `mds-fixed-container`. By default it will be fixed at the bottom. Use `mds-fixed-container--top` to fix it at the top.\n\nTo add a `position: sticky` to the container, use the modifier `mds-fixed-container--sticky`.\n\nWhen placed inside a `mds-wrapper` block, the container will stretch automatically to the full width of the container by default and will go back to be within the wrapper constraints from 600px.\n\n*Note: We don't currently use the sticky block inside a wrapper block at tablet/desktop size so it may have to be reviewed when we do.*\n\n`mds-main` - this class is added to the HTML `<main>` element which represents the dominant content of the <body> of a document. (Note: A document mustn't have more than one `<main>` element that doesn't have the hidden attribute specified.)\nThis class is there to be able to customise this container like adding a background, margin or padding with the help of branding tokens."
3
3
  }
@@ -12,4 +12,5 @@
12
12
  @import '../../components/inputs/form-elements';
13
13
  @import '../../components/inputs/combobox/combobox';
14
14
  @import '../../components/inputs/multi-select/multi-select';
15
- @import '../../components/modal/modal';
15
+ @import '../../components/modal/modal';
16
+ @import '../../components/skip-link/skip-link';
@@ -13,6 +13,11 @@ body {
13
13
  background: $mds-color-background-site-container;
14
14
  // box-shadow: $mds-color-container-box-shadow;
15
15
  }
16
+ .mds-main {
17
+ background: $mds-color-background-main;
18
+ padding: $mds-size-main-padding;
19
+ margin: $mds-size-main-margin;
20
+ }
16
21
  .mds-wrapper {
17
22
  width: calc(#{$mds-size-wrapper-width} - #{$mds-size-gutter-width});
18
23
  max-width: $mds-size-wrapper-max-width;
@@ -5,11 +5,11 @@
5
5
  modal: 1000,
6
6
  );
7
7
 
8
- @each $name, $value in $z-index-map {
9
- @if $name == $level {
10
- z-index: $value;
11
- } @else {
12
- z-index: 1;
13
- }
8
+ $levelValue: map-get($z-index-map, $level);
9
+
10
+ @if ($levelValue != null) {
11
+ z-index: $levelValue;
12
+ } @else {
13
+ z-index: 1;
14
14
  }
15
15
  }
@@ -115,6 +115,9 @@
115
115
  },
116
116
  "surface": {
117
117
  "value" : "{color.neutral.white.value}"
118
+ },
119
+ "main": {
120
+ "value" : "rgba(0,0,0,0)"
118
121
  }
119
122
  },
120
123
  "neutral": {
@@ -43,6 +43,14 @@
43
43
  "value": "16px"
44
44
  }
45
45
  },
46
+ "main": {
47
+ "padding": {
48
+ "value": "0"
49
+ },
50
+ "margin": {
51
+ "value": "0"
52
+ }
53
+ },
46
54
  "button": {
47
55
  "border": {
48
56
  "radius": {
@@ -53,8 +61,8 @@
53
61
  "icon": {
54
62
  "default": { "value": "1em" },
55
63
  "sm": { "value": "16px" },
56
- "md": { "value" : "24px" },
57
- "lg": {"value" : "32px"}
64
+ "md": { "value": "24px" },
65
+ "lg": { "value": "32px" }
58
66
  }
59
67
  }
60
- }
68
+ }
@@ -35,7 +35,7 @@ function transformAllColors(colors) {
35
35
  return colors.reduce((builtBrand, [name, color]) => {
36
36
  if (!builtBrand[name]) {
37
37
  // eslint-disable-next-line no-param-reassign
38
- builtBrand[name] = Object.assign({}, createColorsFromBase(color.base), color);
38
+ builtBrand[name] = { ...createColorsFromBase(color.base), ...color };
39
39
  }
40
40
  return builtBrand;
41
41
  }, {});