@ons/design-system 69.0.0 → 70.0.1
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 +1 -0
- package/components/autosuggest/_autosuggest.scss +1 -1
- package/components/card/_macro.njk +3 -3
- package/components/card/_macro.spec.js +4 -4
- package/components/date-input/_macro.njk +71 -69
- package/components/date-input/_macro.spec.js +20 -5
- package/components/date-input/example-date-input-double-field.njk +27 -0
- package/components/date-input/example-date-input-single-field.njk +18 -0
- package/components/duration/_macro.njk +52 -48
- package/components/duration/_macro.spec.js +112 -4
- package/components/duration/example-duration-error-for-single-field.njk +1 -1
- package/components/duration/example-duration-single-field.njk +24 -0
- package/components/feedback/_macro.njk +1 -1
- package/components/header/_macro.njk +1 -1
- package/components/header/_macro.spec.js +1 -1
- package/components/icon/_macro.njk +10 -10
- package/components/icon/_macro.spec.js +4 -4
- package/components/metadata/_macro.njk +10 -10
- package/components/multiple-input-fields/_macro.njk +49 -0
- package/components/mutually-exclusive/mutually-exclusive.date.spec.js +121 -7
- package/components/mutually-exclusive/mutually-exclusive.duration.spec.js +121 -0
- package/components/section-navigation/_macro.njk +12 -12
- package/components/summary/_macro.njk +3 -3
- package/css/main.css +1 -1
- package/package.json +1 -1
- package/components/date-field-input/_macro.njk +0 -86
package/package.json
CHANGED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
{% from "components/mutually-exclusive/_macro.njk" import onsMutuallyExclusive %}
|
|
2
|
-
{% from "components/fieldset/_macro.njk" import onsFieldset %}
|
|
3
|
-
{% from "components/input/_macro.njk" import onsInput %}
|
|
4
|
-
{% from "components/error/_macro.njk" import onsError %}
|
|
5
|
-
|
|
6
|
-
{% macro onsDateFieldInput(params) %}
|
|
7
|
-
{% set fields %}
|
|
8
|
-
{% for field in params.fields %}
|
|
9
|
-
{{
|
|
10
|
-
onsInput({
|
|
11
|
-
"id": field.id,
|
|
12
|
-
"classes": field.classes,
|
|
13
|
-
"width": field.width,
|
|
14
|
-
"type": "number",
|
|
15
|
-
"name": field.name,
|
|
16
|
-
"value": field.value,
|
|
17
|
-
"min": field.min,
|
|
18
|
-
"max": field.max,
|
|
19
|
-
"maxLength": field.maxLength,
|
|
20
|
-
"suffix": field.suffix,
|
|
21
|
-
"label": field.label,
|
|
22
|
-
"attributes": field.attributes,
|
|
23
|
-
"error": field.error,
|
|
24
|
-
"fieldId": field.fieldId
|
|
25
|
-
})
|
|
26
|
-
}}
|
|
27
|
-
{% endfor %}
|
|
28
|
-
{% endset %}
|
|
29
|
-
|
|
30
|
-
{% if numberOfFields > 1 %}
|
|
31
|
-
{% set fields %}
|
|
32
|
-
<div class="ons-field-group">
|
|
33
|
-
{{ fields | safe }}
|
|
34
|
-
</div>
|
|
35
|
-
{% endset %}
|
|
36
|
-
{% endif %}
|
|
37
|
-
|
|
38
|
-
{% if params.mutuallyExclusive %}
|
|
39
|
-
{% set mutuallyExclusive = params.mutuallyExclusive | setAttributes({
|
|
40
|
-
"id": params.id,
|
|
41
|
-
"legend": params.legendOrLabel,
|
|
42
|
-
"legendClasses": params.legendClasses,
|
|
43
|
-
"description": params.description,
|
|
44
|
-
"error": params.error,
|
|
45
|
-
"classes": params.classes,
|
|
46
|
-
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
47
|
-
"dontWrap": params.dontWrap,
|
|
48
|
-
"exclusiveOptions": params.mutuallyExclusive.exclusiveOptions,
|
|
49
|
-
"or": params.mutuallyExclusive.or,
|
|
50
|
-
"deselectMessage": params.mutuallyExclusive.deselectMessage,
|
|
51
|
-
"deselectGroupAdjective": params.mutuallyExclusive.deselectGroupAdjective,
|
|
52
|
-
"deselectExclusiveOptionAdjective": params.mutuallyExclusive.deselectExclusiveOptionAdjective
|
|
53
|
-
}) %}
|
|
54
|
-
|
|
55
|
-
{% call onsMutuallyExclusive(mutuallyExclusive) %}
|
|
56
|
-
<div class="ons-field-group">
|
|
57
|
-
{{ fields | safe }}
|
|
58
|
-
</div>
|
|
59
|
-
{% endcall %}
|
|
60
|
-
{% elif params.numberOfFields > 1 %}
|
|
61
|
-
{% call onsFieldset({
|
|
62
|
-
"id": params.id,
|
|
63
|
-
"legend": params.legendOrLabel,
|
|
64
|
-
"classes": params.classes,
|
|
65
|
-
"description": params.description,
|
|
66
|
-
"legendClasses": params.legendClasses,
|
|
67
|
-
"error": params.error,
|
|
68
|
-
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
69
|
-
"dontWrap": params.dontWrap
|
|
70
|
-
}) %}
|
|
71
|
-
<div class="ons-field-group">
|
|
72
|
-
{{ fields | safe }}
|
|
73
|
-
</div>
|
|
74
|
-
{% endcall %}
|
|
75
|
-
{% elif params.numberOfFields == 1 %}
|
|
76
|
-
{% if params.error %}
|
|
77
|
-
{% call onsError(params.error) %}
|
|
78
|
-
{{ fields | safe }}
|
|
79
|
-
{% endcall %}
|
|
80
|
-
{% else %}
|
|
81
|
-
{{ fields | safe }}
|
|
82
|
-
{% endif %}
|
|
83
|
-
{% else %}
|
|
84
|
-
{{ fields | safe }}
|
|
85
|
-
{% endif %}
|
|
86
|
-
{% endmacro %}
|