@madgex/design-system 1.43.0 → 1.43.1

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 (41) hide show
  1. package/coverage/cobertura-coverage.xml +1 -1
  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 +1 -1
  7. package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
  8. package/coverage/components/modal/index.html +1 -1
  9. package/coverage/components/modal/modal.js.html +4 -4
  10. package/coverage/components/notification/index.html +1 -1
  11. package/coverage/components/notification/notification.js.html +1 -1
  12. package/coverage/components/popover/index.html +1 -1
  13. package/coverage/components/popover/popover.js.html +1 -1
  14. package/coverage/components/switch-state/index.html +1 -1
  15. package/coverage/components/switch-state/switch-state.js.html +1 -1
  16. package/coverage/components/tabs/index.html +1 -1
  17. package/coverage/components/tabs/tabs.js.html +1 -1
  18. package/coverage/index.html +1 -1
  19. package/coverage/js/common.js.html +1 -1
  20. package/coverage/js/fractal-scripts/combobox.js.html +1 -1
  21. package/coverage/js/fractal-scripts/index.html +1 -1
  22. package/coverage/js/fractal-scripts/notification.js.html +1 -1
  23. package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
  24. package/coverage/js/index-fractal.js.html +1 -1
  25. package/coverage/js/index-polyfills.js.html +1 -1
  26. package/coverage/js/index-vue.js.html +1 -1
  27. package/coverage/js/index.html +1 -1
  28. package/coverage/js/index.js.html +1 -1
  29. package/coverage/js/polyfills/closest.js.html +1 -1
  30. package/coverage/js/polyfills/index.html +1 -1
  31. package/coverage/js/polyfills/remove.js.html +1 -1
  32. package/coverage/tokens/_config.js.html +1 -1
  33. package/coverage/tokens/index.html +1 -1
  34. package/dist/_tokens/css/_tokens.css +1 -1
  35. package/dist/_tokens/js/_tokens-module.js +1 -1
  36. package/dist/_tokens/scss/_tokens.scss +1 -1
  37. package/dist/js/index.js +5 -5
  38. package/package.json +1 -1
  39. package/src/components/modal/README.md +1 -1
  40. package/src/components/modal/modal.js +3 -3
  41. package/src/components/modal/modal.njk +1 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@madgex/design-system",
3
3
  "author": "Madgex",
4
4
  "license": "UNLICENSED",
5
- "version": "1.43.0",
5
+ "version": "1.43.1",
6
6
  "scripts": {
7
7
  "clean": "rimraf dist public tokens/build",
8
8
  "commit": "commit",
@@ -1,4 +1,4 @@
1
- The trigger for the modal is not part of the "Modal macro". It will need to added separately. This way you can configure the trigger as you wish but it should have the class `js-mds-modal-trigger` and the attribute `data-modal-id` to link it to the modal to use.
1
+ The trigger for the modal is not part of the "Modal macro". It will need to added separately. This way you can configure the trigger as you wish but it should have the attribute `data-modal-id`. It will be used to target the trigger and to link it to the modal to use.
2
2
 
3
3
  If you need to add a "close" button to the modal, you can do so by adding the class `jd-mds-modal-close`.
4
4
 
@@ -1,7 +1,7 @@
1
1
  const tokens = require('../../tokens/size.json');
2
2
 
3
3
  const breakpoint = parseInt(tokens.size.breakpoint.md.value, 10);
4
- const modalTriggerClassName = 'js-mds-modal-trigger';
4
+ const modalTrigger = 'data-modal-id';
5
5
  const modalCloseButtonClassName = 'js-mds-modal-close';
6
6
  const modalActiveClass = 'mds-modal--active';
7
7
  let focusedElementBeforeModal;
@@ -10,10 +10,10 @@ const modals = {
10
10
  init: () => {
11
11
  const screenWidth = window.innerWidth;
12
12
  if (screenWidth > breakpoint) {
13
- const triggersList = Array.from(document.querySelectorAll(`.${modalTriggerClassName}`));
13
+ const triggersList = Array.from(document.querySelectorAll(`[${modalTrigger}]`));
14
14
 
15
15
  triggersList.forEach((trigger) => {
16
- const modalId = trigger.getAttribute('data-modal-id');
16
+ const modalId = trigger.getAttribute(modalTrigger);
17
17
  const modal = document.getElementById(modalId);
18
18
  const closeButtons = Array.from(modal.querySelectorAll(`.${modalCloseButtonClassName}`));
19
19
  // Ensure content outside of the modal dialog is inaccessible to all users while the modal dialog is active
@@ -9,7 +9,7 @@
9
9
  <div id="site-container">
10
10
  <p>{{ MdsButton({
11
11
  text: 'Open Modal',
12
- classes: 'mds-button--plain js-mds-modal-trigger',
12
+ classes: 'mds-button--plain',
13
13
  attributes: { 'data-modal-id': modalId }
14
14
  }) }}</p>
15
15