@madgex/design-system 3.2.3 → 3.2.5

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 (51) hide show
  1. package/coverage/cobertura-coverage.xml +1 -1
  2. package/coverage/components/accordion/accordion.js.html +2 -2
  3. package/coverage/components/accordion/index.html +1 -1
  4. package/coverage/components/button/button.js.html +1 -1
  5. package/coverage/components/button/index.html +1 -1
  6. package/coverage/components/inputs/combobox/combobox.js.html +1 -1
  7. package/coverage/components/inputs/combobox/index.html +1 -1
  8. package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +1 -1
  9. package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
  10. package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
  11. package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
  12. package/coverage/components/inputs/file-upload/index.html +1 -1
  13. package/coverage/components/inputs/textarea/character-count.js.html +1 -1
  14. package/coverage/components/inputs/textarea/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 +1 -1
  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/arrayPrototypeFind.js.html +1 -1
  37. package/coverage/js/polyfills/closest.js.html +1 -1
  38. package/coverage/js/polyfills/index.html +1 -1
  39. package/coverage/js/polyfills/objectAssign.js.html +1 -1
  40. package/coverage/js/polyfills/remove.js.html +1 -1
  41. package/coverage/tokens/_config.js.html +1 -1
  42. package/coverage/tokens/index.html +1 -1
  43. package/dist/_tokens/css/_tokens.css +1 -1
  44. package/dist/_tokens/js/_tokens-module.js +1 -1
  45. package/dist/_tokens/scss/_tokens.scss +1 -1
  46. package/dist/js/index.js +1 -1
  47. package/package.json +1 -1
  48. package/src/components/accordion/accordion.js +1 -1
  49. package/src/components/inputs/checkbox-list/README.md +1 -1
  50. package/src/components/inputs/checkbox-list/_template.njk +5 -0
  51. package/src/components/inputs/checkbox-list/checkbox-list.config.js +0 -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": "3.2.3",
5
+ "version": "3.2.5",
6
6
  "scripts": {
7
7
  "clean": "rimraf dist public tokens/build",
8
8
  "commit": "commit",
@@ -94,7 +94,7 @@ const accordion = {
94
94
  // can't use multiple arguments in classList.add() due to IE
95
95
  accordionTriggerButton.classList.add('mds-button');
96
96
  accordionTriggerButton.classList.add('mds-button--plain');
97
- accordionTriggerButton.classList.add('mds-padding-b0');
97
+ accordionTriggerButton.classList.add('mds-padding-x-b0');
98
98
  accordionTriggerButton.setAttribute('aria-expanded', false);
99
99
  if (accordionTriggerSpan) {
100
100
  accordionTriggerButton.appendChild(accordionTriggerSpan);
@@ -11,7 +11,7 @@
11
11
  - `classes`: add extra classes to the fieldgroup - **optional**
12
12
  - `describedBy`: adding aria-describeby to the fieldset (if multiple checkboxes) or the input field if only one checkbox - **optional**
13
13
  - `options`: This is an array of objects containing the parameters for each option: `labelText`, `value`, `id`, `classes`
14
- - `selectedOptions`: Preselected checkboxes - Array or comma-separed string
14
+ - `selectedOptions`: Preselected checkboxes - Array or comma-separated string **optional**
15
15
 
16
16
  **Note:** `id` in `options` is optional. If you don't specify one, an id will be created for you using the name/id of the field and the value of the option.
17
17
 
@@ -23,6 +23,11 @@
23
23
  {%- set accordionIsExpanded = false -%}
24
24
  {% if checkboxParams.selectedOptions %}
25
25
  {% set selectedOptions = checkboxParams.selectedOptions %}
26
+ {# check if `selectedOptions` is an array or not - if it isn't, change it into one #}
27
+ {# didn't find any other way than to check the first character of the JSON.stringify version of the parameter #}
28
+ {% if selectedOptions | dump | first != '[' %}
29
+ {% set selectedOptions = [selectedOptions] %}
30
+ {% endif %}
26
31
  {% for selectedOption in selectedOptions %}
27
32
  {% if selectedOption == option.value %}
28
33
  {%- set isSelected = true -%}
@@ -70,7 +70,6 @@ module.exports = {
70
70
  labelText: 'Checkbox Input 3',
71
71
  value: '4-3',
72
72
  id: 'checkbox-4-3',
73
- selected: true,
74
73
  },
75
74
  ],
76
75
  },