@madgex/design-system 5.9.0 → 5.11.0

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 (33) hide show
  1. package/dist/_tokens/css/_tokens.css +2 -2
  2. package/dist/_tokens/js/_tokens-module.js +3 -3
  3. package/dist/_tokens/scss/_tokens.scss +2 -2
  4. package/dist/css/index.css +1 -1
  5. package/package.json +2 -2
  6. package/src/components/inputs/_message/_template.njk +5 -4
  7. package/src/components/inputs/checkbox-list/README.md +1 -0
  8. package/src/components/inputs/checkbox-list/_template.njk +16 -1
  9. package/src/components/inputs/combobox/README.md +1 -0
  10. package/src/components/inputs/combobox/_template.njk +33 -2
  11. package/src/components/inputs/combobox/combobox.config.js +15 -0
  12. package/src/components/inputs/combobox/combobox.njk +2 -0
  13. package/src/components/inputs/file-upload/README.md +2 -1
  14. package/src/components/inputs/file-upload/_template.njk +17 -0
  15. package/src/components/inputs/file-upload/file-upload.config.js +12 -0
  16. package/src/components/inputs/input/README.md +1 -0
  17. package/src/components/inputs/input/_template.njk +18 -1
  18. package/src/components/inputs/radio/README.md +1 -0
  19. package/src/components/inputs/radio/_template.njk +15 -1
  20. package/src/components/inputs/radio/radio.config.js +26 -0
  21. package/src/components/inputs/radio/radio.njk +3 -1
  22. package/src/components/inputs/select/README.md +1 -0
  23. package/src/components/inputs/select/_template.njk +18 -1
  24. package/src/components/inputs/select/select.config.js +24 -0
  25. package/src/components/inputs/single-checkbox/README.md +1 -0
  26. package/src/components/inputs/single-checkbox/_template.njk +16 -2
  27. package/src/components/inputs/single-checkbox/single-checkbox.config.js +15 -0
  28. package/src/components/inputs/single-checkbox/single-checkbox.njk +26 -14
  29. package/src/components/inputs/text-editor/README.md +1 -0
  30. package/src/components/inputs/text-editor/_template.njk +19 -1
  31. package/src/components/inputs/textarea/README.md +1 -0
  32. package/src/components/inputs/textarea/_template.njk +22 -1
  33. package/src/tokens/color.json +1 -1
@@ -8,6 +8,22 @@
8
8
  {% set name = params.id %}
9
9
  {% endif %}
10
10
 
11
+ {% if params.maxlength %}
12
+ {% set characterCountId = [params.id, '-character-count-text'] | join %}
13
+ {% endif %}
14
+
15
+ {% if params.helpText %}
16
+ {% set helpTextId = [params.id, '-help-text'] | join %}
17
+ {% endif %}
18
+
19
+ {% if params.validationError %}
20
+ {% set validationErrorId = [params.id, '-validation-error'] | join %}
21
+ {% endif %}
22
+
23
+ {% if characterCountId or helpTextId or validationErrorId %}
24
+ {% set ariaDescribedBy = [validationErrorId, helpTextId, characterCountId] | join(' ') | trim %}
25
+ {% endif %}
26
+
11
27
  <div class="mds-form-element mds-form-element--textarea{% if params.state %} mds-form-element--{{params.state}}{% endif %}{% if params.classes %} {{params.classes}}{% endif %}{% if params.maxlength %} mds-form-element--character-count{% endif %}" id="{{ params.id }}-container" data-test="textarea{% if params.id %}-{{params.id}}{% endif %}">
12
28
  {{ MdsInputLabel({
13
29
  labelText: params.labelText,
@@ -19,7 +35,9 @@
19
35
  }) }}
20
36
  {{ MdsInputMessages({
21
37
  id: params.id,
38
+ helpTextId: helpTextId,
22
39
  helpText: params.helpText,
40
+ validationErrorId: validationErrorId,
23
41
  validationError: params.validationError
24
42
  }) }}
25
43
  <textarea
@@ -33,7 +51,10 @@
33
51
  placeholder="{% if params.placeholder %}{{ params.placeholder }}{% else %}{{ params.labelText }}{% endif %}"
34
52
  {% endif %}
35
53
  {% if params.maxlength %}
36
- maxlength="{{ params.maxlength }}" aria-describedby="{{ params.id }}-character-count-text"
54
+ maxlength="{{ params.maxlength }}"
55
+ {% endif %}
56
+ {% if ariaDescribedBy %}
57
+ aria-describedby="{{ ariaDescribedBy }}"
37
58
  {% endif %}
38
59
  {% if params.validationError %}
39
60
  aria-invalid="true"
@@ -250,7 +250,7 @@
250
250
  "value" : "{color.neutral.black.value}"
251
251
  },
252
252
  "border": {
253
- "value" : "#949494"
253
+ "value" : "{color.neutral.base.value}"
254
254
  },
255
255
  "focus": {
256
256
  "value" : "#5092fd"