@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.
- package/README.md +0 -2
- package/coverage/cobertura-coverage.xml +20 -20
- package/coverage/components/accordion/accordion.js.html +1 -1
- package/coverage/components/accordion/index.html +1 -1
- package/coverage/components/button/button.js.html +1 -1
- package/coverage/components/button/index.html +1 -1
- package/coverage/components/inputs/combobox/combobox.js.html +1 -1
- package/coverage/components/inputs/combobox/index.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +21 -21
- package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/index.html +16 -16
- package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
- package/coverage/components/inputs/file-upload/index.html +1 -1
- package/coverage/components/inputs/textarea/character-count.js.html +1 -1
- package/coverage/components/inputs/textarea/index.html +1 -1
- package/coverage/components/modal/index.html +1 -1
- package/coverage/components/modal/modal.js.html +1 -1
- package/coverage/components/notification/index.html +1 -1
- package/coverage/components/notification/notification.js.html +1 -1
- package/coverage/components/popover/index.html +1 -1
- package/coverage/components/popover/popover.js.html +1 -1
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +1 -1
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +16 -16
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/combobox.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/notification.js.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index-vue.js.html +1 -1
- package/coverage/js/index.html +1 -1
- package/coverage/js/index.js.html +1 -1
- package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/js/polyfills/objectAssign.js.html +1 -1
- package/coverage/js/polyfills/remove.js.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- package/cypress/integration/components/accordion.spec.js +62 -20
- package/cypress/integration/components/button.spec.js +2 -1
- package/cypress/integration/components/card.spec.js +3 -1
- package/cypress/integration/components/combobox.spec.js +26 -51
- package/cypress/integration/components/input.spec.js +10 -1
- package/cypress/integration/components/pagination-numbers.spec.js +7 -1
- package/cypress/integration/components/pagination.spec.js +4 -1
- package/cypress/integration/components/radio.spec.js +3 -1
- package/cypress/integration/components/switch-state.spec.js +12 -8
- package/cypress/integration/components/tabs.spec.js +9 -14
- package/cypress/integration/components/textarea.spec.js +1 -1
- package/dist/_tokens/css/_tokens.css +10 -10
- package/dist/_tokens/js/_tokens-module.js +15 -15
- package/dist/_tokens/scss/_tokens.scss +10 -10
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index.js +2 -22
- package/dist/js/index.js.LICENSE.txt +14 -0
- package/package.json +30 -30
- package/src/components/inputs/_checkbox-elem/_template.njk +1 -3
- package/src/components/inputs/checkbox-list/_template.njk +1 -1
- package/src/components/inputs/combobox/_template.njk +4 -1
- package/src/components/inputs/combobox/vue-components/Combobox.vue +1 -1
- package/src/components/inputs/combobox/vue-components/ListBox.vue +5 -1
- package/src/components/inputs/file-upload/_template.njk +1 -1
- package/src/components/inputs/input/_template.njk +1 -1
- package/src/components/inputs/label/README.md +2 -0
- package/src/components/inputs/label/_template.njk +2 -2
- package/src/components/inputs/label/label.njk +3 -1
- package/src/components/inputs/radio/_template.njk +1 -1
- package/src/components/inputs/radio/radio.config.js +2 -2
- package/src/components/inputs/select/_template.njk +1 -1
- package/src/components/inputs/single-checkbox/_template.njk +6 -6
- package/src/components/inputs/single-checkbox/single-checkbox.config.js +1 -1
- package/src/components/inputs/single-checkbox/single-checkbox.njk +2 -2
- package/src/components/inputs/textarea/_template.njk +1 -1
- package/src/tokens/color.json +5 -5
- 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": "
|
|
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
|
|
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": "^
|
|
34
|
-
"postcss-cli": "^
|
|
35
|
-
"postcss-loader": "^
|
|
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.
|
|
52
|
-
"@frctl/mandelbrot": "^1.
|
|
53
|
-
"@frctl/nunjucks": "^2.0.
|
|
54
|
-
"@madgex/eslint-config-madgex": "^1.
|
|
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": "^
|
|
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": "^
|
|
64
|
-
"concurrently": "^
|
|
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": "^
|
|
68
|
-
"cypress": "^
|
|
69
|
-
"cypress-axe": "^0.
|
|
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": "^
|
|
73
|
+
"eslint": "^7.29.0",
|
|
74
74
|
"eslint-config-airbnb-base": "^14.2.0",
|
|
75
|
-
"eslint-config-prettier": "^
|
|
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": "^
|
|
81
|
-
"file-loader": "^
|
|
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.
|
|
91
|
-
"node-sass": "^
|
|
90
|
+
"mini-css-extract-plugin": "^1.6.2",
|
|
91
|
+
"node-sass": "^4.14.1",
|
|
92
92
|
"nunjucks": "^3.2.2",
|
|
93
|
-
"prettier": "^
|
|
93
|
+
"prettier": "^2.2.1",
|
|
94
94
|
"rimraf": "^2.7.1",
|
|
95
|
-
"semantic-release": "^
|
|
95
|
+
"semantic-release": "^17.4.4",
|
|
96
96
|
"svg-sprite-loader": "^4.3.0",
|
|
97
|
-
"svgo": "^1.3.
|
|
98
|
-
"svgo-loader": "^
|
|
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": "^
|
|
104
|
-
"webpack-cli": "^
|
|
105
|
-
"webpack-dev-server": "^3.11.
|
|
106
|
-
"webpack-stream": "^
|
|
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": {
|
|
@@ -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
|
-
|
|
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
|
};
|
|
@@ -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 }}"
|
|
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.
|
|
33
|
+
id: params.inputId + '-tooltip',
|
|
34
34
|
text: MdsIcon({
|
|
35
35
|
iconName: 'question-mark',
|
|
36
36
|
classes: 'mds-icon--info',
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
{% endif -%}
|
|
18
18
|
{%- endset -%}
|
|
19
19
|
|
|
20
|
-
{%- if params.selectedOptions
|
|
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
|
-
|
|
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>
|
|
@@ -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>
|
package/src/tokens/color.json
CHANGED
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
},
|
|
21
21
|
"2": {
|
|
22
22
|
"light": {
|
|
23
|
-
"value" : "#
|
|
23
|
+
"value" : "#f9007b"
|
|
24
24
|
},
|
|
25
25
|
"lightest": {
|
|
26
|
-
"value" : "#
|
|
26
|
+
"value" : "#ffe5f2"
|
|
27
27
|
},
|
|
28
28
|
"dark": {
|
|
29
|
-
"value" : "#
|
|
29
|
+
"value" : "#930049"
|
|
30
30
|
},
|
|
31
31
|
"darkest": {
|
|
32
|
-
"value" : "#
|
|
32
|
+
"value" : "#3d001e"
|
|
33
33
|
},
|
|
34
34
|
"base": {
|
|
35
|
-
"value" : "#
|
|
35
|
+
"value" : "#C60062"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"3": {
|
package/tasks/css.js
CHANGED