@madgex/design-system 2.7.2 → 3.0.2

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 (81) hide show
  1. package/README.md +0 -2
  2. package/coverage/cobertura-coverage.xml +20 -20
  3. package/coverage/components/accordion/accordion.js.html +1 -1
  4. package/coverage/components/accordion/index.html +1 -1
  5. package/coverage/components/button/button.js.html +1 -1
  6. package/coverage/components/button/index.html +1 -1
  7. package/coverage/components/inputs/combobox/combobox.js.html +1 -1
  8. package/coverage/components/inputs/combobox/index.html +1 -1
  9. package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +21 -21
  10. package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
  11. package/coverage/components/inputs/combobox/vue-components/index.html +16 -16
  12. package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
  13. package/coverage/components/inputs/file-upload/index.html +1 -1
  14. package/coverage/components/inputs/textarea/character-count.js.html +1 -1
  15. package/coverage/components/inputs/textarea/index.html +1 -1
  16. package/coverage/components/modal/index.html +1 -1
  17. package/coverage/components/modal/modal.js.html +1 -1
  18. package/coverage/components/notification/index.html +1 -1
  19. package/coverage/components/notification/notification.js.html +1 -1
  20. package/coverage/components/popover/index.html +1 -1
  21. package/coverage/components/popover/popover.js.html +1 -1
  22. package/coverage/components/switch-state/index.html +1 -1
  23. package/coverage/components/switch-state/switch-state.js.html +1 -1
  24. package/coverage/components/tabs/index.html +1 -1
  25. package/coverage/components/tabs/tabs.js.html +1 -1
  26. package/coverage/index.html +16 -16
  27. package/coverage/js/common.js.html +1 -1
  28. package/coverage/js/fractal-scripts/combobox.js.html +1 -1
  29. package/coverage/js/fractal-scripts/index.html +1 -1
  30. package/coverage/js/fractal-scripts/notification.js.html +1 -1
  31. package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
  32. package/coverage/js/index-fractal.js.html +1 -1
  33. package/coverage/js/index-polyfills.js.html +1 -1
  34. package/coverage/js/index-vue.js.html +1 -1
  35. package/coverage/js/index.html +1 -1
  36. package/coverage/js/index.js.html +1 -1
  37. package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
  38. package/coverage/js/polyfills/closest.js.html +1 -1
  39. package/coverage/js/polyfills/index.html +1 -1
  40. package/coverage/js/polyfills/objectAssign.js.html +1 -1
  41. package/coverage/js/polyfills/remove.js.html +1 -1
  42. package/coverage/tokens/_config.js.html +1 -1
  43. package/coverage/tokens/index.html +1 -1
  44. package/cypress/integration/components/accordion.spec.js +62 -20
  45. package/cypress/integration/components/button.spec.js +2 -1
  46. package/cypress/integration/components/card.spec.js +3 -1
  47. package/cypress/integration/components/combobox.spec.js +26 -51
  48. package/cypress/integration/components/input.spec.js +10 -1
  49. package/cypress/integration/components/pagination-numbers.spec.js +7 -1
  50. package/cypress/integration/components/pagination.spec.js +4 -1
  51. package/cypress/integration/components/radio.spec.js +3 -1
  52. package/cypress/integration/components/switch-state.spec.js +12 -8
  53. package/cypress/integration/components/tabs.spec.js +9 -14
  54. package/cypress/integration/components/textarea.spec.js +1 -1
  55. package/dist/_tokens/css/_tokens.css +10 -10
  56. package/dist/_tokens/js/_tokens-module.js +15 -15
  57. package/dist/_tokens/scss/_tokens.scss +10 -10
  58. package/dist/assets/icons.json +1 -1
  59. package/dist/css/index.css +1 -1
  60. package/dist/js/index.js +2 -22
  61. package/dist/js/index.js.LICENSE.txt +14 -0
  62. package/package.json +30 -30
  63. package/src/components/inputs/_checkbox-elem/_template.njk +1 -3
  64. package/src/components/inputs/checkbox-list/_template.njk +1 -1
  65. package/src/components/inputs/combobox/_template.njk +4 -1
  66. package/src/components/inputs/combobox/vue-components/Combobox.vue +1 -1
  67. package/src/components/inputs/combobox/vue-components/ListBox.vue +5 -1
  68. package/src/components/inputs/file-upload/_template.njk +1 -1
  69. package/src/components/inputs/input/_template.njk +1 -1
  70. package/src/components/inputs/label/README.md +2 -0
  71. package/src/components/inputs/label/_template.njk +2 -2
  72. package/src/components/inputs/label/label.njk +3 -1
  73. package/src/components/inputs/radio/_template.njk +1 -1
  74. package/src/components/inputs/radio/radio.config.js +2 -2
  75. package/src/components/inputs/select/_template.njk +1 -1
  76. package/src/components/inputs/single-checkbox/_template.njk +6 -6
  77. package/src/components/inputs/single-checkbox/single-checkbox.config.js +1 -1
  78. package/src/components/inputs/single-checkbox/single-checkbox.njk +2 -2
  79. package/src/components/inputs/textarea/_template.njk +1 -1
  80. package/src/tokens/color.json +5 -5
  81. package/tasks/css.js +3 -1
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * @copyright Copyright (c) 2017 IcoMoon.io
3
+ * @license Licensed under MIT license
4
+ * See https://github.com/Keyamoon/svgxuse
5
+ * @version 1.2.6
6
+ */
7
+
8
+ /*! (C) Andrea Giammarchi - @WebReflection - ISC Style License */
9
+
10
+ /**
11
+ * vue-custom-element v3.3.0
12
+ * (c) 2021 Karol Fabjańczuk
13
+ * @license MIT
14
+ */
package/package.json CHANGED
@@ -2,15 +2,15 @@
2
2
  "name": "@madgex/design-system",
3
3
  "author": "Madgex",
4
4
  "license": "UNLICENSED",
5
- "version": "2.7.2",
5
+ "version": "3.0.2",
6
6
  "scripts": {
7
7
  "clean": "rimraf dist public tokens/build",
8
8
  "commit": "commit",
9
- "semantic-release": "semantic-release --prepare && semantic-release --publish",
9
+ "semantic-release": "semantic-release",
10
10
  "tokens": "style-dictionary --config ./src/tokens/_config.js build",
11
11
  "dev": "cross-env NODE_ENV=development gulp dev",
12
12
  "debug": "node --inspect ./node_modules/.bin/gulp dev",
13
- "build": "gulp build",
13
+ "build": "cross-env NODE_ENV=production gulp build",
14
14
  "build:icons": "svgo -f src/icons ./dist/assets/icons",
15
15
  "build:webpack": "NODE_ENV=production webpack",
16
16
  "build:fractal": "NODE_ENV=production fractal build",
@@ -30,9 +30,9 @@
30
30
  "@popperjs/core": "2.4.4",
31
31
  "css-loader": "^3.6.0",
32
32
  "document-register-element": "^1.14.3",
33
- "postcss": "^7.0.32",
34
- "postcss-cli": "^6.1.3",
35
- "postcss-loader": "^3.0.0",
33
+ "postcss": "^8.3.5",
34
+ "postcss-cli": "^8.3.1",
35
+ "postcss-loader": "^6.1.0",
36
36
  "sass-loader": "^10.1.0",
37
37
  "style-dictionary": "^2.10.1",
38
38
  "style-loader": "^0.23.1",
@@ -48,37 +48,37 @@
48
48
  "@commitlint/cli": "^12.0.1",
49
49
  "@commitlint/config-conventional": "^12.0.1",
50
50
  "@commitlint/prompt-cli": "^12.0.1",
51
- "@frctl/fractal": "^1.3.0",
52
- "@frctl/mandelbrot": "^1.4.0",
53
- "@frctl/nunjucks": "^2.0.2",
54
- "@madgex/eslint-config-madgex": "^1.2.4",
51
+ "@frctl/fractal": "^1.5.8",
52
+ "@frctl/mandelbrot": "^1.9.2",
53
+ "@frctl/nunjucks": "^2.0.11",
54
+ "@madgex/eslint-config-madgex": "^1.4.1",
55
55
  "@vue/eslint-config-prettier": "^6.0.0",
56
56
  "@vue/test-utils": "^1.0.3",
57
- "autoprefixer": "^9.8.5",
57
+ "autoprefixer": "^10.2.6",
58
58
  "axe-core": "^3.5.5",
59
59
  "babel-core": "^7.0.0-bridge.0",
60
60
  "babel-jest": "^24.9.0",
61
61
  "babel-loader": "^8.1.0",
62
62
  "bubleify": "^1.2.1",
63
- "commitizen": "^3.1.2",
64
- "concurrently": "^4.1.2",
63
+ "commitizen": "^4.2.4",
64
+ "concurrently": "^6.2.0",
65
65
  "core-js": "^3.6.5",
66
66
  "cross-env": "^7.0.3",
67
- "cssnano": "^4.1.10",
68
- "cypress": "^3.6.1",
69
- "cypress-axe": "^0.5.1",
67
+ "cssnano": "^5.0.6",
68
+ "cypress": "^6.9.1",
69
+ "cypress-axe": "^0.12.2",
70
70
  "cypress-commands": "^1.1.0",
71
71
  "cz-conventional-changelog": "^2.1.0",
72
72
  "del": "^5.1.0",
73
- "eslint": "^6.8.0",
73
+ "eslint": "^7.29.0",
74
74
  "eslint-config-airbnb-base": "^14.2.0",
75
- "eslint-config-prettier": "^6.11.0",
75
+ "eslint-config-prettier": "^7.2.0",
76
76
  "eslint-plugin-cypress": "^2.11.1",
77
77
  "eslint-plugin-import": "^2.22.0",
78
78
  "eslint-plugin-prettier": "^3.1.4",
79
79
  "eslint-plugin-promise": "^4.2.1",
80
- "eslint-plugin-vue": "^6.2.2",
81
- "file-loader": "^4.2.0",
80
+ "eslint-plugin-vue": "^7.12.1",
81
+ "file-loader": "^6.2.0",
82
82
  "flat": "^4.1.0",
83
83
  "globby": "^11.0.1",
84
84
  "gulp": "^4.0.2",
@@ -87,23 +87,23 @@
87
87
  "jsdom": "^15.2.0",
88
88
  "link-module-alias": "^1.2.0",
89
89
  "lint-staged": "^9.4.2",
90
- "mini-css-extract-plugin": "^1.3.1",
91
- "node-sass": "^5.0.0",
90
+ "mini-css-extract-plugin": "^1.6.2",
91
+ "node-sass": "^4.14.1",
92
92
  "nunjucks": "^3.2.2",
93
- "prettier": "^1.19.1",
93
+ "prettier": "^2.2.1",
94
94
  "rimraf": "^2.7.1",
95
- "semantic-release": "^15.13.24",
95
+ "semantic-release": "^17.4.4",
96
96
  "svg-sprite-loader": "^4.3.0",
97
- "svgo": "^1.3.0",
98
- "svgo-loader": "^2.2.1",
97
+ "svgo": "^1.3.2",
98
+ "svgo-loader": "^3.0.0",
99
99
  "svgstore": "^3.0.0-2",
100
100
  "vue-jest": "^3.0.6",
101
101
  "vue-loader": "^15.9.3",
102
102
  "vue-template-compiler": "^2.6.11",
103
- "webpack": "^4.41.2",
104
- "webpack-cli": "^3.3.12",
105
- "webpack-dev-server": "^3.11.0",
106
- "webpack-stream": "^5.2.1"
103
+ "webpack": "^5.0.0",
104
+ "webpack-cli": "^4.7.2",
105
+ "webpack-dev-server": "^3.11.2",
106
+ "webpack-stream": "^6.1.2"
107
107
  },
108
108
  "config": {
109
109
  "commitizen": {
@@ -1,5 +1,4 @@
1
1
  {% from "../../icons/_macro.njk" import MdsIcon %}
2
-
3
2
  <input
4
3
  type="checkbox"
5
4
  class="mds-form-check__input"
@@ -19,5 +18,4 @@
19
18
  visuallyHiddenLabel: 'required'
20
19
  }) -}}
21
20
  {%- endif -%}{#
22
- #}</label>
23
-
21
+ #}</label>
@@ -95,7 +95,7 @@
95
95
  element: 'legend',
96
96
  labelText: params.labelText,
97
97
  hideLabel: params.hideLabel,
98
- id: params.id,
98
+ inputId: params.id,
99
99
  optional: params.optional,
100
100
  tooltipMessage: params.tooltipMessage
101
101
  }) }}
@@ -28,12 +28,15 @@
28
28
  {%- endif -%}
29
29
  {% endset -%}
30
30
 
31
+ {%- set labelId %}{{comboboxId}}-label{% endset -%}
32
+
31
33
  {%- if comboboxId -%}
32
34
  <div class="mds-form-element mds-form-element--combobox js-mds-combobox{% if params.classes %} {{params.classes}}{% endif %}{% if params.state %} mds-form-element--{{params.state}}{% endif %}" data-combobox-id="{{ comboboxId }}" data-test="combobox{% if comboboxId %}-{{comboboxId}}{% endif %}" data-type="{{ params.type }}">
33
35
  {{ MdsInputLabel({
34
36
  labelText: params.labelText,
35
37
  hideLabel: params.hideLabel,
36
- id: comboboxId,
38
+ inputId: comboboxId,
39
+ id: labelId,
37
40
  optional: params.optional,
38
41
  tooltipMessage: params.tooltipMessage
39
42
  }) }}
@@ -21,7 +21,7 @@
21
21
  :ariaInvalid="ariaInvalid"
22
22
  v-model="inputValue"
23
23
  />
24
- <ListBox :id="listBoxId" :hidden="listBoxHidden" :isLoading="isLoading">
24
+ <ListBox :id="listBoxId" :hidden="listBoxHidden" :isLoading="isLoading" :comboboxid="comboboxid">
25
25
  <template>
26
26
  <ListBoxOption
27
27
  v-for="(option, index) in visibleOptions"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ul class="mds-combobox__listbox" role="listbox" :hidden="hidden">
2
+ <ul class="mds-combobox__listbox" role="listbox" :aria-labelledby="`${comboboxid}-label`" :hidden="hidden">
3
3
  <li v-if="isLoading" class="mds-combobox-loading">
4
4
  <!-- Ideally we would pass this in as a slot in the custom element with MdsIcon, but something is borked
5
5
  with passing slots in Chrome https://github.com/karol-f/vue-custom-element/issues/162 -->
@@ -24,6 +24,10 @@ export default {
24
24
  type: Boolean,
25
25
  default: true,
26
26
  },
27
+ comboboxid: {
28
+ type: String,
29
+ required: true,
30
+ },
27
31
  },
28
32
  inject: ['iconPath'],
29
33
  };
@@ -29,7 +29,7 @@
29
29
  {{ MdsInputLabel({
30
30
  labelText: params.labelText,
31
31
  hideLabel: params.hideLabel,
32
- id: params.id,
32
+ inputId: params.id,
33
33
  optional: params.optional,
34
34
  tooltipMessage: params.tooltipMessage
35
35
  }) }}
@@ -11,7 +11,7 @@
11
11
  {{ MdsInputLabel({
12
12
  labelText: params.labelText,
13
13
  hideLabel: params.hideLabel,
14
- id: params.id,
14
+ inputId: params.id,
15
15
  optional: params.optional,
16
16
  tooltipMessage: params.tooltipMessage
17
17
  }) }}
@@ -1,4 +1,6 @@
1
1
  ## Parameters
2
+ - `id`: The id for this component **optional**
3
+ - `inputId`: The id for the component this is a label for **required**
2
4
  - `labelText`: The text for this label **required**,
3
5
  - `tooltipMessage`: Toggles a tooltip with this message to appear alongside the label **optional**
4
6
  - `optional`: Is the input optional, otherwise required **optional**,
@@ -11,7 +11,7 @@
11
11
  <span class="{{ classes }}">
12
12
  {%- else -%}
13
13
  <div class="mds-form-label{% if params.hideLabel %} mds-visually-hidden{% endif -%}">
14
- <label class="{{ classes }}" for="{{ params.id }}">
14
+ <label class="{{ classes }}"{% if params.id %}id="{{ params.id }}"{% endif %} for="{{ params.inputId }}">
15
15
  {%- endif -%}
16
16
  {{ params.labelText | safe }}
17
17
  {%- if not params.optional -%}
@@ -30,7 +30,7 @@
30
30
 
31
31
  {%- if params.tooltipMessage -%}
32
32
  {{- MdsPopover({
33
- id: params.id + '-tooltip',
33
+ id: params.inputId + '-tooltip',
34
34
  text: MdsIcon({
35
35
  iconName: 'question-mark',
36
36
  classes: 'mds-icon--info',
@@ -6,6 +6,8 @@
6
6
  tooltipMessage: tooltipMessage,
7
7
  optional: optional,
8
8
  element: element,
9
- hideLabel: hideLabel
9
+ hideLabel: hideLabel,
10
+ inputId: inputId,
11
+ id: id
10
12
  }) }}
11
13
  </div>
@@ -13,7 +13,7 @@
13
13
  element: 'legend',
14
14
  labelText: params.labelText,
15
15
  hideLabel: params.hideLabel,
16
- id: params.id,
16
+ inputId: params.id,
17
17
  optional: params.optional,
18
18
  tooltipMessage: params.tooltipMessage
19
19
  }) }}
@@ -36,8 +36,8 @@ module.exports = {
36
36
  },
37
37
  {
38
38
  labelText: 'Radio Input 3',
39
- value: '4-3',
40
- id: 'radio-4-3',
39
+ value: '2-3',
40
+ id: 'radio-2-3',
41
41
  },
42
42
  ],
43
43
  },
@@ -17,7 +17,7 @@
17
17
  {{ MdsInputLabel({
18
18
  labelText: params.labelText,
19
19
  hideLabel: params.hideLabel,
20
- id: params.id,
20
+ inputId: params.id,
21
21
  optional: params.optional,
22
22
  tooltipMessage: params.tooltipMessage
23
23
  }) }}
@@ -17,19 +17,19 @@
17
17
  {% endif -%}
18
18
  {%- endset -%}
19
19
 
20
- {%- if params.selectedOptions === params.options[0].id -%}
20
+ {%- if params.selectedOptions == params.options[0].value -%}
21
21
  {%- set isSelected = true -%}
22
22
  {%- endif -%}
23
23
 
24
24
  <div class="mds-form-element mds-form-element--checkbox{% if params.state %} mds-form-element--{{params.state}}{% endif %}{% if params.classes %} {{params.classes}}{% endif %}" data-test="checkbox{% if params.id %}-{{params.id}}{% endif %}">
25
- {{ MdsInputMessages({
25
+ {{- MdsInputMessages({
26
26
  id: params.id,
27
27
  helpText: params.helpText,
28
28
  validationError: params.validationError
29
- }) }}
29
+ }) -}}
30
30
  <div class="mds-form-check-container">
31
31
  <div class="mds-form-check{% if option.classes %} {{option.classes}}{% endif %}">
32
- {{ MdsCheckboxElem({
32
+ {{- MdsCheckboxElem({
33
33
  disabled: params.disabled,
34
34
  isSelected: isSelected,
35
35
  labelText: params.options[0].labelText,
@@ -38,7 +38,7 @@
38
38
  name: name,
39
39
  id: id,
40
40
  value: params.options[0].value
41
- }) }}
41
+ }) -}}
42
42
  </div>
43
43
  </div>
44
- </div>
44
+ </div>
@@ -24,7 +24,7 @@ module.exports = {
24
24
  id: 'out-out-checkbox',
25
25
  },
26
26
  ],
27
- selectedOptions: 'out-out-checkbox',
27
+ selectedOptions: 'out-out',
28
28
  },
29
29
  },
30
30
  {
@@ -1,7 +1,7 @@
1
1
  {% from "./inputs/single-checkbox/_macro.njk" import MdsSingleCheckbox %}
2
2
 
3
3
  <div class="mds-form-field">
4
- {{ MdsSingleCheckbox({
4
+ {{- MdsSingleCheckbox({
5
5
  name: name,
6
6
  id: id,
7
7
  disabled: disabled,
@@ -14,5 +14,5 @@
14
14
  helpText: helpText,
15
15
  value: value,
16
16
  options: options
17
- }) }}
17
+ }) -}}
18
18
  </div>
@@ -12,7 +12,7 @@
12
12
  {{ MdsInputLabel({
13
13
  labelText: params.labelText,
14
14
  hideLabel: params.hideLabel,
15
- id: params.id,
15
+ inputId: params.id,
16
16
  optional: params.optional,
17
17
  tooltipMessage: params.tooltipMessage
18
18
  }) }}
@@ -20,19 +20,19 @@
20
20
  },
21
21
  "2": {
22
22
  "light": {
23
- "value" : "#fb9950"
23
+ "value" : "#f9007b"
24
24
  },
25
25
  "lightest": {
26
- "value" : "#fef0e6"
26
+ "value" : "#ffe5f2"
27
27
  },
28
28
  "dark": {
29
- "value" : "#e06305"
29
+ "value" : "#930049"
30
30
  },
31
31
  "darkest": {
32
- "value" : "#3c1a01"
32
+ "value" : "#3d001e"
33
33
  },
34
34
  "base": {
35
- "value" : "#FA7C1E"
35
+ "value" : "#C60062"
36
36
  }
37
37
  },
38
38
  "3": {
package/tasks/css.js CHANGED
@@ -44,7 +44,9 @@ async function cssWebpack(srcFilePath, distFilePath, hashFilePath = false, filen
44
44
  {
45
45
  loader: 'postcss-loader',
46
46
  options: {
47
- plugins: [autoprefixer(), cssnano()],
47
+ postcssOptions: {
48
+ plugins: [autoprefixer(), cssnano()],
49
+ },
48
50
  },
49
51
  },
50
52
  {