@ons/design-system 55.1.0 → 56.0.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 (81) hide show
  1. package/components/access-code/_macro.njk +3 -3
  2. package/components/accordion/_macro.njk +1 -1
  3. package/components/address-input/_macro.njk +7 -7
  4. package/components/address-output/_macro.njk +7 -7
  5. package/components/autosuggest/_macro.njk +19 -19
  6. package/components/breadcrumbs/_macro.njk +3 -3
  7. package/components/button/_button.scss +49 -51
  8. package/components/button/_macro.njk +61 -35
  9. package/components/button/_macro.spec.js +24 -24
  10. package/components/button/button.spec.js +11 -11
  11. package/components/call-to-action/_macro.njk +1 -1
  12. package/components/card/_macro.njk +10 -10
  13. package/components/checkboxes/_checkbox-macro.njk +9 -9
  14. package/components/checkboxes/_macro.njk +10 -10
  15. package/components/checkboxes/checkbox-with-fieldset.js +6 -5
  16. package/components/checkboxes/checkboxes.dom.js +6 -9
  17. package/components/code-highlight/_macro.njk +1 -1
  18. package/components/collapsible/_macro.njk +7 -7
  19. package/components/date-input/_macro.njk +5 -5
  20. package/components/document-list/_macro.njk +29 -29
  21. package/components/duration/_macro.njk +9 -9
  22. package/components/duration/_macro.spec.js +0 -3
  23. package/components/error/_macro.njk +1 -1
  24. package/components/external-link/_macro.njk +1 -1
  25. package/components/feedback/_macro.njk +2 -2
  26. package/components/field/_macro.njk +5 -5
  27. package/components/fieldset/_fieldset.scss +5 -0
  28. package/components/fieldset/_macro.njk +8 -8
  29. package/components/footer/_macro.njk +19 -23
  30. package/components/footer/_macro.spec.js +0 -6
  31. package/components/header/_macro.njk +39 -41
  32. package/components/header/_macro.spec.js +4 -8
  33. package/components/hero/_macro.njk +15 -15
  34. package/components/icons/_macro.njk +2 -2
  35. package/components/images/_macro.njk +3 -3
  36. package/components/input/_input-type.scss +4 -0
  37. package/components/input/_macro.njk +41 -34
  38. package/components/input/_macro.spec.js +66 -59
  39. package/components/label/_macro.njk +1 -1
  40. package/components/language-selector/_macro.njk +1 -1
  41. package/components/lists/_macro.njk +22 -22
  42. package/components/message/_macro.njk +6 -6
  43. package/components/message-list/_macro.njk +1 -1
  44. package/components/metadata/_macro.njk +2 -2
  45. package/components/modal/_macro.njk +4 -4
  46. package/components/mutually-exclusive/_macro.njk +1 -1
  47. package/components/mutually-exclusive/mutually-exclusive.js +3 -1
  48. package/components/navigation/_macro.njk +11 -10
  49. package/components/navigation/_macro.spec.js +3 -2
  50. package/components/pagination/_macro.njk +3 -3
  51. package/components/panel/_macro.njk +37 -39
  52. package/components/panel/_macro.spec.js +1 -13
  53. package/components/promotional-banner/_macro.njk +2 -2
  54. package/components/question/_macro.njk +20 -20
  55. package/components/question/_macro.spec.js +2 -2
  56. package/components/question/_question.scss +1 -1
  57. package/components/quote/_macro.njk +2 -2
  58. package/components/radios/_macro.njk +8 -8
  59. package/components/radios/check-radios.js +5 -1
  60. package/components/related-content/_macro.njk +2 -2
  61. package/components/relationships/_macro.njk +4 -3
  62. package/components/search/_macro.njk +12 -2
  63. package/components/search/_macro.spec.js +27 -2
  64. package/components/section-navigation/_macro.njk +2 -2
  65. package/components/select/_macro.njk +8 -8
  66. package/components/share-page/_macro.njk +2 -2
  67. package/components/status/_macro.njk +2 -2
  68. package/components/summary/_macro.njk +25 -25
  69. package/components/table/_macro.njk +10 -10
  70. package/components/table-of-contents/_macro.njk +4 -4
  71. package/components/textarea/_macro.njk +8 -8
  72. package/components/timeline/_macro.njk +1 -1
  73. package/components/video/_macro.njk +1 -1
  74. package/css/census.css +1 -1
  75. package/css/ids.css +1 -1
  76. package/css/main.css +1 -1
  77. package/layout/_template.njk +35 -35
  78. package/package.json +1 -1
  79. package/scripts/main.es5.js +1 -1
  80. package/scripts/main.js +1 -1
  81. package/scss/patternlib.scss +2 -2
@@ -2,25 +2,25 @@
2
2
  {% set className = "ons-summary" %}
3
3
  {% set titleSize = "2" %}
4
4
 
5
- {% if params.classes is defined and params.classes %}
5
+ {% if params.classes %}
6
6
  {% set className = className + " " + params.classes %}
7
7
  {% endif %}
8
8
 
9
- {% if params.hub is defined and params.hub %}
9
+ {% if params.hub %}
10
10
  {% set className = className + " ons-summary--hub" %}
11
11
  {% endif %}
12
12
  <div class="{{ className }}">
13
13
  {% for summary in params.summaries %}
14
- {% if summary.summaryTitle is defined and summary.summaryTitle %}
14
+ {% if summary.summaryTitle %}
15
15
  <h2 class="ons-summary__title ons-u-mb-m">{{ summary.summaryTitle }}</h2>
16
16
  {% set titleSize = "3" %}
17
17
  {% endif %}
18
18
  {% for group in summary.groups %}
19
- <div {% if group.id is defined and group.id %}id="{{ group.id }}" {% endif %} class="ons-summary__group">
20
- {% if group.groupTitle is defined and group.groupTitle %}
19
+ <div {% if group.id %}id="{{ group.id }}" {% endif %} class="ons-summary__group">
20
+ {% if group.groupTitle %}
21
21
  <h{{ titleSize }} class="ons-summary__group-title">{{ group.groupTitle }}</h{{ titleSize }}>
22
22
  {% endif %}
23
- {% if group.headers is defined and group.headers and group.rows is defined and group.rows %}
23
+ {% if group.headers and group.rows %}
24
24
  <table class="ons-summary__items">
25
25
  <thead class="ons-u-vh">
26
26
  <tr>
@@ -32,23 +32,23 @@
32
32
 
33
33
  {% for row in (group.rows if group.rows is iterable else group.rows.items()) %}
34
34
  {% set itemClass = "" %}
35
- {% if row.error is defined and row.error %} {% set itemClass = " ons-summary__item--error" %}{% endif %}
36
- {% if row.total is defined and row.total %} {% set itemClass = itemClass + " ons-summary__item--total" %}{% endif %}
35
+ {% if row.error %} {% set itemClass = " ons-summary__item--error" %}{% endif %}
36
+ {% if row.total %} {% set itemClass = itemClass + " ons-summary__item--total" %}{% endif %}
37
37
 
38
- <tbody {% if row.id is defined and row.id %}id="{{ row.id }}" {% endif %}class="ons-summary__item{{ itemClass }}">
39
- {% if row.errorMessage is defined and row.errorMessage or (row.rowItems | length > 1 and row.rowTitle) %}
38
+ <tbody {% if row.id %}id="{{ row.id }}" {% endif %}class="ons-summary__item{{ itemClass }}">
39
+ {% if row.errorMessage or (row.rowItems | length > 1 and row.rowTitle) %}
40
40
  <tr class="ons-summary__row">
41
41
  <th colspan="3" class="ons-summary__row-title ons-u-fs-r">{{ row.errorMessage or row.rowTitle }}</th>
42
42
  </tr>
43
43
  {% endif %}
44
44
 
45
45
  {% for rowItem in row.rowItems %}
46
- <tr {% if rowItem.id is defined and rowItem.id %}id="{{ rowItem.id }}" {% endif %}class="ons-summary__row{{ " ons-summary__row--has-values" if rowItem.valueList else "" }}">
46
+ <tr {% if rowItem.id %}id="{{ rowItem.id }}" {% endif %}class="ons-summary__row{{ " ons-summary__row--has-values" if rowItem.valueList else "" }}">
47
47
  <td
48
48
  class="ons-summary__item-title"
49
- {% if rowItem.rowTitleAttributes is defined and rowItem.rowTitleAttributes %}{% for attribute, value in (rowItem.rowTitleAttributes.items() if rowItem.rowTitleAttributes is mapping and rowItem.rowTitleAttributes.items else rowItem.rowTitleAttributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
49
+ {% if rowItem.rowTitleAttributes %}{% for attribute, value in (rowItem.rowTitleAttributes.items() if rowItem.rowTitleAttributes is mapping and rowItem.rowTitleAttributes.items else rowItem.rowTitleAttributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
50
50
  >
51
- {% if rowItem.iconType is defined and rowItem.iconType %}
51
+ {% if rowItem.iconType %}
52
52
  {% from "components/icons/_macro.njk" import onsIcon %}
53
53
  <span class="ons-summary__item-title-icon {% if rowItem.iconType == 'check' %} ons-summary__item-title-icon--check{% endif %}">
54
54
  {{
@@ -62,19 +62,19 @@
62
62
  <div class="ons-summary__item--text{{ ' ons-summary__item-title--text' if rowItem.iconType else "" }}">{{ rowItem.rowTitle | default(row.rowTitle) | safe }}</div>
63
63
 
64
64
  {# Render section status for mobile if is hub #}
65
- {% if params.hub is defined and params.hub and rowItem.valueList is defined and rowItem.valueList %}
65
+ {% if params.hub and rowItem.valueList %}
66
66
  <span class="ons-u-d-no@s ons-u-fs-r"> — {{ rowItem.valueList[0].text | safe }}</span>
67
67
  {% endif %}
68
68
  </td>
69
- {% if rowItem.valueList is defined and rowItem.valueList %}
69
+ {% if rowItem.valueList %}
70
70
  <td
71
71
  class="ons-summary__values"
72
72
  {% if rowItem.actions == null %} colspan="2"{% endif %}
73
- {% if rowItem.attributes is defined and rowItem.attributes %}{% for attribute, value in (rowItem.attributes.items() if rowItem.attributes is mapping and rowItem.attributes.items else rowItem.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
73
+ {% if rowItem.attributes %}{% for attribute, value in (rowItem.attributes.items() if rowItem.attributes is mapping and rowItem.attributes.items else rowItem.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
74
74
  >
75
75
  {% if rowItem.valueList | length == 1 %}
76
76
  <span class="ons-summary__text">{{ rowItem.valueList[0].text | safe }}</span>
77
- {% if rowItem.valueList[0].other is defined and rowItem.valueList[0].other or rowItem.valueList[0].other == 0 %}
77
+ {% if rowItem.valueList[0].other or rowItem.valueList[0].other == 0 %}
78
78
  <ul class="ons-u-mb-no">
79
79
  <li>{{ rowItem.valueList[0].other | safe }}</li>
80
80
  </ul>
@@ -84,7 +84,7 @@
84
84
  {% for value in (rowItem.valueList if rowItem.valueList is iterable else rowItem.valueList.items()) %}
85
85
  <li>
86
86
  <span class="ons-summary__text">{{ value.text | safe }}</span>
87
- {% if value.other is defined and value.other or value.other == 0 %}
87
+ {% if value.other or value.other == 0 %}
88
88
  <ul class="ons-u-mb-no">
89
89
  <li>{{ value.other | safe }}</li>
90
90
  </ul>
@@ -95,15 +95,15 @@
95
95
  {% endif %}
96
96
  </td>
97
97
  {% endif %}
98
- {% if rowItem.actions is defined and rowItem.actions %}
98
+ {% if rowItem.actions %}
99
99
  <td class="ons-summary__actions">
100
100
  {% for action in (rowItem.actions if rowItem.actions is iterable else rowItem.actions.items()) %}
101
101
  {% if loop.index > 1 %}<span class="ons-summary__spacer"></span>{% endif %}
102
102
  <a
103
103
  href="{{ action.url }}"
104
104
  class="ons-summary__button"
105
- {% if action.ariaLabel is defined and action.ariaLabel %} aria-label="{{ action.ariaLabel }}"{% endif %}
106
- {% if action.attributes is defined and action.attributes %}{% for attribute, value in (action.attributes.items() if action.attributes is mapping and action.attributes.items else action.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
105
+ {% if action.ariaLabel %} aria-label="{{ action.ariaLabel }}"{% endif %}
106
+ {% if action.attributes %}{% for attribute, value in (action.attributes.items() if action.attributes is mapping and action.attributes.items else action.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %}
107
107
  >{{ action.text }}</a>
108
108
  {% endfor %}
109
109
  </td>
@@ -113,13 +113,13 @@
113
113
  </tbody>
114
114
  {% endfor %}
115
115
  </table>
116
- {% elif group.placeholderText is defined and group.placeholderText %}
116
+ {% elif group.placeholderText %}
117
117
  <span class="ons-summary__placeholder">{{ group.placeholderText }}</span>
118
118
  {% endif %}
119
119
 
120
- {% if group.summaryLink is defined and group.summaryLink %}
121
- <div class="ons-summary__link{% if group.placeholderText is defined and group.placeholderText or group.rows is defined and group.rows %} ons-u-pt-s{% endif %}{% if group.placeholderText is not defined and group.rows is defined and group.rows | length > 1 %} ons-u-bt{% endif %}">
122
- <a {% if group.summaryLink.attributes is defined and group.summaryLink.attributes %}{% for attribute, value in (group.summaryLink.attributes.items() if group.summaryLink.attributes is mapping and group.summaryLink.attributes.items else group.summaryLink.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %} href="{{ group.summaryLink.url }}">{{ group.summaryLink.text }}</a>
120
+ {% if group.summaryLink %}
121
+ <div class="ons-summary__link{% if group.placeholderText or group.rows %} ons-u-pt-s{% endif %}{% if group.placeholderText is not defined and group.rows | length > 1 %} ons-u-bt{% endif %}">
122
+ <a {% if group.summaryLink.attributes %}{% for attribute, value in (group.summaryLink.attributes.items() if group.summaryLink.attributes is mapping and group.summaryLink.attributes.items else group.summaryLink.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %} href="{{ group.summaryLink.url }}">{{ group.summaryLink.text }}</a>
123
123
  </div>
124
124
  {% endif %}
125
125
  </div>
@@ -8,14 +8,14 @@
8
8
  <div class="ons-table-scrollable ons-table-scrollable--on">
9
9
  <div class="ons-table-scrollable__content" tabindex="0" role="region" aria-label="{{ params.caption }}. {{ params.ariaLabel | default("Scrollable table") }}">
10
10
  {% endif %}
11
- <table {% if params.id is defined and params.id %}id="{{ params.id }}"{% endif %} class="ons-table{% if params.tableClasses is defined and params.tableClasses %} {{ params.tableClasses }}{% endif %}{% if variants is defined and variants %}{% if variants is not string %}{% for variant in variants %} ons-table--{{ variant }}{% endfor %}{% else %} ons-table--{{ variants }}{% endif %}{% endif %}" {% if params.sortBy is defined and params.sortBy and 'sortable' in variants %}data-aria-sort="{{ params.sortBy }}" data-aria-asc="{{ params.ariaAsc }}" data-aria-desc="{{ params.ariaDesc }}"{% endif %}>
12
- {% if params.caption is defined and params.caption %}
11
+ <table {% if params.id %}id="{{ params.id }}"{% endif %} class="ons-table{% if params.tableClasses %} {{ params.tableClasses }}{% endif %}{% if variants %}{% if variants is not string %}{% for variant in variants %} ons-table--{{ variant }}{% endfor %}{% else %} ons-table--{{ variants }}{% endif %}{% endif %}" {% if params.sortBy and 'sortable' in variants %}data-aria-sort="{{ params.sortBy }}" data-aria-asc="{{ params.ariaAsc }}" data-aria-desc="{{ params.ariaDesc }}"{% endif %}>
12
+ {% if params.caption %}
13
13
  <caption class="ons-table__caption{{ " ons-u-vh" if params.hideCaption }}">{{ params.caption }}</caption>
14
14
  {% endif %}
15
15
  <thead class="ons-table__head">
16
16
  <tr class="ons-table__row">
17
17
  {% for th in params.ths %}
18
- <th scope="col" class="ons-table__header{{ ' ' + th.thClasses if th.thClasses is defined and th.thClasses }}{{ " ons-table__header--numeric" if th.numeric is defined and th.numeric }}"{% if 'sortable' in variants %} aria-sort="{{- th.ariaSort | default('none') -}}"{% endif %}>
18
+ <th scope="col" class="ons-table__header{{ ' ' + th.thClasses if th.thClasses }}{{ " ons-table__header--numeric" if th.numeric }}"{% if 'sortable' in variants %} aria-sort="{{- th.ariaSort | default('none') -}}"{% endif %}>
19
19
  <span>{{- th.value -}}</span>
20
20
  {% if 'sortable' in variants %}
21
21
  {{
@@ -32,10 +32,10 @@
32
32
  </thead>
33
33
  <tbody class="ons-table__body">
34
34
  {% for tr in params.trs %}
35
- <tr class="ons-table__row{{ " ons-table__row--highlight" if tr.highlight }}" {% if tr.name is defined and tr.name %} name="{{ tr.name }}"{% endif %} {% if tr.id is defined and tr.id %} id="{{ tr.id }}"{% endif %}>
35
+ <tr class="ons-table__row{{ " ons-table__row--highlight" if tr.highlight }}" {% if tr.name %} name="{{ tr.name }}"{% endif %} {% if tr.id %} id="{{ tr.id }}"{% endif %}>
36
36
  {% for td in tr.tds %}
37
- <td class="ons-table__cell{{ ' ' + td.tdClasses if td.tdClasses is defined and td.tdClasses }}{{ " ons-table__cell--numeric" if td.numeric is defined and td.numeric }}" {% if td.id is defined and td.id %} id="{{ td.id }}"{% endif %} {% if td.name is defined and td.name %} name="{{ td.name }}"{% endif %} {% if td.data is defined and td.data %} data-th="{{ td.data }}"{% endif %} {% if td.dataSort is defined and td.dataSort %} data-sort-value="{{ td.dataSort }}"{% endif %}>
38
- {% if td.form is defined and td.form %}
37
+ <td class="ons-table__cell{{ ' ' + td.tdClasses if td.tdClasses }}{{ " ons-table__cell--numeric" if td.numeric }}" {% if td.id %} id="{{ td.id }}"{% endif %} {% if td.name %} name="{{ td.name }}"{% endif %} {% if td.data %} data-th="{{ td.data }}"{% endif %} {% if td.dataSort %} data-sort-value="{{ td.dataSort }}"{% endif %}>
38
+ {% if td.form %}
39
39
  <form action="{{ td.form.action }}" method="{{ td.form.method | default('POST')}}">
40
40
  {{
41
41
  onsButton({
@@ -47,14 +47,14 @@
47
47
  "name": td.form.button.name if td.form.button.name
48
48
  })
49
49
  }}
50
- {% if td.form.hiddenFormField is defined and td.form.hiddenFormField %}
50
+ {% if td.form.hiddenFormField %}
51
51
  {% for hiddenField in td.form.hiddenFormField %}
52
- <input type="hidden" {% if hiddenField.name is defined and hiddenField.name %} name="{{ hiddenField.name }}"{% endif %} {% if hiddenField.value is defined and hiddenField.value %} value="{{ hiddenField.value }}"{% endif %} />
52
+ <input type="hidden" {% if hiddenField.name %} name="{{ hiddenField.name }}"{% endif %} {% if hiddenField.value %} value="{{ hiddenField.value }}"{% endif %} />
53
53
  {% endfor %}
54
54
  {% endif %}
55
55
  </form>
56
56
  {% endif %}
57
- {% if td.value is defined and td.value %}
57
+ {% if td.value %}
58
58
  {{ td.value | safe }}
59
59
  {% endif %}
60
60
  </td>
@@ -62,7 +62,7 @@
62
62
  </tr>
63
63
  {% endfor %}
64
64
  </tbody>
65
- {% if params.tfoot is defined and params.tfoot %}
65
+ {% if params.tfoot %}
66
66
  <tfoot class="ons-table__foot">
67
67
  <tr class="ons-table__row">
68
68
  {% for tfootCell in params.tfoot %}
@@ -3,7 +3,7 @@
3
3
  {% from "components/skip-to-content/_macro.njk" import onsSkipToContent %}
4
4
 
5
5
  <aside class="ons-toc-container" role="complementary">
6
- {% if params.skipLink is defined and params.skipLink %}
6
+ {% if params.skipLink %}
7
7
  {{
8
8
  onsSkipToContent({
9
9
  "url": params.skipLink.url,
@@ -14,9 +14,9 @@
14
14
 
15
15
  <nav class="ons-toc" aria-label="{{ params.ariaLabel | default('Table of contents') }}">
16
16
  <h2 class="ons-toc__title ons-u-fs-r--b ons-u-mb-s">{{ params.title }}</h2>
17
- {% if params.lists is defined and params.lists %}
17
+ {% if params.lists %}
18
18
  {% for list in params.lists %}
19
- {% if list.listHeading is defined and list.listHeading %}
19
+ {% if list.listHeading %}
20
20
  <h3 class="ons-u-fs-r ons-u-mb-xs">{{ list.listHeading }}<span class="ons-u-vh"> {{ list.listHeadingHidden }}</span>:</h3>
21
21
  {% endif %}
22
22
  {{
@@ -28,7 +28,7 @@
28
28
  })
29
29
  }}
30
30
  {% endfor %}
31
- {% elif params.itemsList is defined and params.itemsList %}
31
+ {% elif params.itemsList %}
32
32
  {{
33
33
  onsList({
34
34
  "element": 'ol',
@@ -8,7 +8,7 @@
8
8
  {% set field %}
9
9
  {% set textareaExclusiveClass = " ons-js-exclusive-group-item" if params.mutuallyExclusive else "" %}
10
10
 
11
- {% if params.label is defined and params.label %}
11
+ {% if params.label %}
12
12
  {{ onsLabel({
13
13
  "for": params.id,
14
14
  "text": params.label.text,
@@ -19,20 +19,20 @@
19
19
 
20
20
  <textarea
21
21
  id="{{ params.id }}"
22
- class="ons-input ons-input--textarea {% if params.error is defined and params.error %} ons-input--error {% endif %}{% if params.charCheckLimit is defined and params.charCheckLimit and params.charCheckLimit.limit is defined and params.charCheckLimit.limit %} ons-js-char-limit-input{% endif %}{{ textareaExclusiveClass }} {{ params.classes if params.classes is defined and params.classes }} {% if params.width is defined and params.width %}ons-input--w-{{ params.width }}{% endif %}"
23
- {% if params.name is defined and params.name %}
22
+ class="ons-input ons-input--textarea {% if params.error %} ons-input--error {% endif %}{% if params.charCheckLimit and params.charCheckLimit.limit %} ons-js-char-limit-input{% endif %}{{ textareaExclusiveClass }} {{ params.classes if params.classes }} {% if params.width %}ons-input--w-{{ params.width }}{% endif %}"
23
+ {% if params.name %}
24
24
  name="{{ params.name }}"
25
25
  {% endif %}
26
26
  rows="{{ params.rows | default(8) }}"
27
- {% if params.charCheckLimit is defined and params.charCheckLimit and params.charCheckLimit.limit is defined and params.charCheckLimit.limit %}
27
+ {% if params.charCheckLimit and params.charCheckLimit.limit %}
28
28
  maxlength="{{ params.charCheckLimit.limit }}"
29
29
  data-char-limit-ref="{{ params.id }}-lim-remaining"
30
30
  aria-describedby="{{ params.id }}-lim-remaining"
31
31
  {% endif %}
32
- {% if params.attributes is defined and params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ attribute }}{% if value is defined and value %}="{{ value }}"{% endif %} {% endfor %}{% endif %}
33
- >{{ params.value if params.value is defined and params.value }}</textarea>
32
+ {% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ attribute }}{% if value %}="{{ value }}"{% endif %} {% endfor %}{% endif %}
33
+ >{{ params.value if params.value }}</textarea>
34
34
 
35
- {% if params.charCheckLimit is defined and params.charCheckLimit and params.charCheckLimit.limit is defined and params.charCheckLimit.limit %}
35
+ {% if params.charCheckLimit and params.charCheckLimit.limit %}
36
36
  {% call onsCharLimit({
37
37
  "id": params.id ~ "-lim",
38
38
  "limit": params.charCheckLimit.limit,
@@ -43,7 +43,7 @@
43
43
  {% endif %}
44
44
  {% endset %}
45
45
 
46
- {% if params.mutuallyExclusive is defined and params.mutuallyExclusive %}
46
+ {% if params.mutuallyExclusive %}
47
47
  {% call onsMutuallyExclusive({
48
48
  "id": params.fieldId,
49
49
  "classes": params.fieldClasses,
@@ -9,7 +9,7 @@
9
9
 
10
10
  <h2 class="ons-timeline__heading">{{ item.heading }}</h2>
11
11
 
12
- {% if item.itemsList is defined and item.itemsList %}
12
+ {% if item.itemsList %}
13
13
 
14
14
  {{
15
15
  onsList({
@@ -1,6 +1,6 @@
1
1
  {%- macro onsVideo(params) -%}
2
2
  <div class="ons-video">
3
- {% if params.youtubeUrl is defined and params.youtubeUrl %}
3
+ {% if params.youtubeUrl %}
4
4
  <iframe title="{{ params.title }}" class="ons-video__iframe" src="{{ params.youtubeUrl }}" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
5
5
  {% endif %}
6
6
  </div>