@ons/design-system 70.0.12 → 70.0.13

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.
@@ -20,10 +20,17 @@
20
20
  {% else %}
21
21
  {% set listEl = 'ul' %}
22
22
  {% endif %}
23
+
24
+ {% if listLength < 2 %}
25
+ {% set attributes = params.itemsList[0].attributes %}
26
+ {% else %}
27
+ {% set attributes = params.attributes %}
28
+ {% endif %}
23
29
  {% set openingTag = "<" + listEl %}
24
30
  {% set closingTag = "</" + listEl + ">" %}
31
+
25
32
  {{ openingTag | safe }}{% if params.id %}{{ ' ' }}id="{{ params.id }}"{% endif %}
26
- class="ons-list{{ ' ons-list--p' if listEl == 'p' }}{{ ' ' + params.classes if params.classes else '' }}{% if params.variants %}{% if params.variants is not string %}{% for variant in variants %}{{ ' ' }}ons-list--{{ variant }}{% endfor %}{% else %}{{ ' ' }}ons-list--{{ variants }}{% endif %}{% endif %}{{ ' ' + otherClasses if otherClasses else '' }}"{% 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
+ class="ons-list{{ ' ons-list--p' if listEl == 'p' }}{{ ' ' + params.classes if params.classes else '' }}{% if params.variants %}{% if params.variants is not string %}{% for variant in variants %}{{ ' ' }}ons-list--{{ variant }}{% endfor %}{% else %}{{ ' ' }}ons-list--{{ variants }}{% endif %}{% endif %}{{ ' ' + otherClasses if otherClasses else '' }}"{% if params.attributes or params.itemsList[0].attributes %}{% for attribute, value in (attributes.items() if attributes is mapping and attributes.items else attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}>
27
34
  {%- for item in params.itemsList -%}
28
35
  {% set sublistClasses = item.listClasses if item.listClasses %}
29
36
  {%
@@ -48,7 +55,7 @@
48
55
 
49
56
  {%- if item.prefix or (params.iconPosition == 'before') -%}
50
57
  <span
51
- class="ons-list__prefix {{ 'ons-list__prefix--icon-check' if params.variants == 'summary' and params.iconType == 'check' }}"
58
+ class="ons-list__prefix{{ ' ons-list__prefix--icon-check' if params.variants == 'summary' and itemIconType == 'check' }}"
52
59
  {% if listEl != 'ol' %}aria-hidden="true"{% endif %}
53
60
  >
54
61
  {%- if item.prefix -%}
@@ -74,6 +81,7 @@
74
81
  })
75
82
  }}
76
83
  {%- else -%}
84
+ {# Remove setting attributes on link in future update #}
77
85
  <a
78
86
  href="{{ item.url }}"
79
87
  class="ons-list__link{{ ' ons-js-inpagelink' if item.variants == 'inPageLink' }}{{ ' ' + item.classes if item.classes else '' }}"
@@ -90,7 +98,7 @@
90
98
  {%- endif -%}
91
99
  {%- if item.suffix or (params.iconPosition == 'after') -%}
92
100
  <span
93
- class="ons-list__suffix {{ 'ons-list__suffix--icon-check' if params.variants == 'summary' and params.iconType == 'check' }}"
101
+ class="ons-list__suffix{{ ' ons-list__suffix--icon-check' if params.variants == 'summary' and itemIconType == 'check' }}"
94
102
  {% if listEl != 'ol' %}aria-hidden="true"{% endif %}
95
103
  >
96
104
  {%- if item.suffix -%}
@@ -115,9 +123,11 @@
115
123
  {% endset %}
116
124
 
117
125
  {% if listLength > 1 or listEl == 'ul' %}
126
+ {# Remove if not item.url in future update #}
118
127
  <li
119
128
  class="ons-list__item{{ ' ' + item.listClasses if item.listClasses else '' }}"
120
129
  {% if item.current %}aria-current="true"{% endif %}
130
+ {% if not item.url %}{% if item.attributes %}{% for attribute, value in (item.attributes.items() if item.attributes is mapping and item.attributes.items else item.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}{% endif %}
121
131
  >
122
132
  {{- listItem | safe -}}
123
133
  </li>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ons/design-system",
3
3
  "description": "ONS Design System built CSS, JS, and Nunjucks templates",
4
- "version": "70.0.12",
4
+ "version": "70.0.13",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "author": {