@madgex/design-system 7.0.3 → 7.0.4
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/dist/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/assets/icons.json +1 -1
- package/package.json +2 -2
- package/src/components/inputs/combobox/README.md +3 -0
- package/src/components/inputs/combobox/_template.njk +7 -2
- package/src/components/inputs/combobox/combobox.config.js +2 -0
- package/src/components/inputs/combobox/combobox.njk +2 -1
- package/src/scss/constants/_sd-tokens.scss +1 -1
package/dist/assets/icons.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"asterisk"},{"name":"calendar"},{"name":"
|
|
1
|
+
[{"name":"asterisk"},{"name":"calendar"},{"name":"check"},{"name":"chevron-down"},{"name":"chevron-left"},{"name":"chevron-right"},{"name":"chevron-up"},{"name":"close"},{"name":"cross"},{"name":"doc-pdf"},{"name":"doc"},{"name":"email"},{"name":"external"},{"name":"flag"},{"name":"information"},{"name":"job"},{"name":"list-bullets"},{"name":"list-numbers"},{"name":"location-pin"},{"name":"menu"},{"name":"minus"},{"name":"plus-small"},{"name":"plus"},{"name":"question-mark"},{"name":"redo"},{"name":"search"},{"name":"share"},{"name":"social-facebook"},{"name":"social-linkedin"},{"name":"social-pinterest"},{"name":"social-reddit"},{"name":"social-twitter"},{"name":"spinner"},{"name":"star-fill"},{"name":"star-outline"},{"name":"text-bold"},{"name":"text-italic"},{"name":"text-link"},{"name":"text-strike-through"},{"name":"text-underline"},{"name":"undo"},{"name":"upload"},{"name":"user"}]
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@madgex/design-system",
|
|
3
3
|
"author": "Madgex",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "7.0.
|
|
5
|
+
"version": "7.0.4",
|
|
6
6
|
"main": "dist/js/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dist/js/index.js",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"webpack-dev-server": "^3.11.2",
|
|
99
99
|
"webpack-stream": "^6.1.2"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "53a2afb020575b576ab5b8ca2da1af17b0c17e71"
|
|
102
102
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
- `state`: The current state of the input, currently the only allowed value is `error` _optional_
|
|
15
15
|
- `type`: name of the options api e.g "location-lookup"
|
|
16
16
|
- `i18n`: Text to translate/customise (object) **optional**
|
|
17
|
+
- `minSearchCharacters`: The minimum number of characters inside the input before a search is performed to avoid low specificity searches. This should be matched by your implementation's search handler.
|
|
18
|
+
|
|
17
19
|
```
|
|
18
20
|
i18n: {
|
|
19
21
|
requiredIcon: 'required', // visually hidden text for the required icon (label)
|
|
@@ -30,6 +32,7 @@ i18n: {
|
|
|
30
32
|
## Events
|
|
31
33
|
|
|
32
34
|
The following events are emiited.
|
|
35
|
+
|
|
33
36
|
- `select-option`
|
|
34
37
|
- `search`
|
|
35
38
|
- `clear-all`
|
|
@@ -83,8 +83,13 @@
|
|
|
83
83
|
{% endif %}
|
|
84
84
|
</div>
|
|
85
85
|
{# Leave the custom element at the bottom so it has access to the above elements on render #}
|
|
86
|
-
<mds-combobox
|
|
87
|
-
|
|
86
|
+
<mds-combobox
|
|
87
|
+
comboboxid="{{ comboboxId }}"
|
|
88
|
+
placeholder="{{ params.placeholder }}"
|
|
89
|
+
iconpath="{{ defaultIconPath }}"
|
|
90
|
+
i18n="{{ params.i18n | dump }}"
|
|
91
|
+
data-aria-invalid="{{ params.validationError }}"
|
|
92
|
+
{% if params.minSearchCharacters %}min-search-characters="{{ params.minSearchCharacters }}"{% endif %}
|
|
88
93
|
{% if params.fallbackTo === 'input' %}name="{{ comboboxName }}"{% endif %}
|
|
89
94
|
{% if params.value %}value="{{ params.value }}"{% endif %}
|
|
90
95
|
{% if ariaDescribedBy %} describedby-id="{{ariaDescribedBy}}"{% endif -%}
|
|
@@ -54,6 +54,7 @@ module.exports = {
|
|
|
54
54
|
labelText: 'Keywords:',
|
|
55
55
|
placeholder: 'eg. Web developer',
|
|
56
56
|
fallbackTo: 'input',
|
|
57
|
+
minSearchCharacters: 3,
|
|
57
58
|
i18n: {
|
|
58
59
|
requiredIcon: 'Required (test i18n)',
|
|
59
60
|
loadingText: 'Loading (test i18n)',
|
|
@@ -77,6 +78,7 @@ module.exports = {
|
|
|
77
78
|
value: 'Initial Value',
|
|
78
79
|
vModel: 'Initial Value',
|
|
79
80
|
fallbackTo: 'input',
|
|
81
|
+
minSearchCharacters: 3,
|
|
80
82
|
},
|
|
81
83
|
},
|
|
82
84
|
{
|