@madgex/design-system 8.0.5 → 9.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.
- 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/accordion/README.md +4 -3
- package/src/components/button/README.md +6 -2
- package/src/components/button/_template.njk +3 -3
- package/src/components/button/button.config.js +1 -1
- package/src/components/button/button.njk +28 -23
- package/src/components/card/README.md +4 -1
- package/src/components/card/_template.njk +2 -2
- package/src/components/card/card.njk +5 -4
- package/src/components/inputs/file-upload/_template.njk +10 -13
- package/src/components/inputs/label/_template.njk +5 -4
- package/src/components/modal/README.md +4 -1
- package/src/components/modal/_template.njk +9 -7
- package/src/components/modal/long-modal-content.njk +5 -3
- package/src/components/modal/modal-content.njk +5 -3
- package/src/components/modal/modal.njk +20 -12
- package/src/components/notification/notification.njk +4 -3
- package/src/components/popover/README.md +5 -2
- package/src/components/popover/_template.njk +5 -4
- package/src/components/popover/popover.njk +6 -4
- package/src/components/section-title/_template.njk +4 -3
- package/src/layout/containers/02-branded-containers.njk +4 -3
- package/src/layout/forms/forms.njk +8 -6
- package/src/scss/constants/_sd-tokens.scss +1 -1
package/dist/assets/icons.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"asterisk"},{"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":"
|
|
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-italic"},{"name":"text-link"},{"name":"text-strike-through"},{"name":"text-underline"},{"name":"triangle-down"},{"name":"triangle-right"},{"name":"triangle-up"},{"name":"undo"},{"name":"upload"},{"name":"user"},{"name":"text-bold"}]
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@madgex/design-system",
|
|
3
3
|
"author": "Madgex",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "9.0.0",
|
|
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": "1ea5e67b817a07741d67d2c1f092d4e64b4a0467"
|
|
102
102
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## Callable
|
|
2
|
+
|
|
3
|
+
Use the [callable](https://mozilla.github.io/nunjucks/templating.html#call) syntax to populate the main content
|
|
4
|
+
|
|
1
5
|
## Parameters
|
|
2
6
|
|
|
3
7
|
- `trigger`: trigger of the trigger button. Be as descriptive as you can as it will help for a11y. **required**
|
|
@@ -12,9 +16,6 @@
|
|
|
12
16
|
- `leftAligned`: This will determine if the icon should sit on the left or the right of the trigger (default: false) - See design usage guidelines
|
|
13
17
|
- `contentFirst`: Boolean, places the content above the trigger, pushing the trigger down below the content when open
|
|
14
18
|
|
|
15
|
-
- `content`: this can also be a custom component or html **required**
|
|
16
|
-
- NOTE: this should be entered using the call syntax and not as a paramater. An example can be seen in accordion.njk
|
|
17
|
-
|
|
18
19
|
## Accessibility
|
|
19
20
|
|
|
20
21
|
When using the non closing accordion, the trigger will be disabled and hidden from view so screenreaders can inform that the content has been expanded. The trigger is also removed from the navigation flow to make sure that it can't be tabbed into when using a keyboard.
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
## Callable
|
|
2
|
+
|
|
3
|
+
Use the [callable](https://mozilla.github.io/nunjucks/templating.html#call) syntax to populate the main content
|
|
4
|
+
|
|
5
|
+
|
|
1
6
|
## Parameters
|
|
2
7
|
|
|
3
|
-
- `
|
|
4
|
-
- `html`: if you want to add html markup instead of plain text, use `html` attribute instead
|
|
8
|
+
- `value`: Value attribute on the button or input
|
|
5
9
|
- `name`: add `name` attribute
|
|
6
10
|
- `element`: we're using `<button>` by default but you can change to be a link or an input
|
|
7
11
|
- `href`: if `element` is a link then add the url using `href`
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
|
|
28
28
|
{%- if element == 'a' %}
|
|
29
29
|
<a href="{{ params.href if params.href else '#' }}" draggable="false" {{- commonAttributes | safe }}>
|
|
30
|
-
{{
|
|
30
|
+
{{ caller() }}
|
|
31
31
|
</a>
|
|
32
32
|
|
|
33
33
|
{%- elseif element == 'button' %}
|
|
34
34
|
<button {%- if params.value %} value="{{ params.value }}"{% endif %} {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
|
|
35
|
-
{{
|
|
35
|
+
{{ caller() }}
|
|
36
36
|
</button>
|
|
37
37
|
|
|
38
38
|
{%- elseif element == 'input' %}
|
|
39
|
-
<input value="{{ params.
|
|
39
|
+
<input value="{{ params.value }}" {{- buttonAttributes | safe }} {{- commonAttributes | safe }}>
|
|
40
40
|
{%- endif %}
|
|
@@ -5,30 +5,35 @@
|
|
|
5
5
|
{% for item in items %}
|
|
6
6
|
|
|
7
7
|
{% if item.useIcon %}
|
|
8
|
-
{%- set html -%}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{%- endset -%}
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) }
|
|
8
|
+
{%- set html -%}
|
|
9
|
+
{{ MdsIcon({
|
|
10
|
+
iconName: 'search',
|
|
11
|
+
classes: 'mds-icon--md',
|
|
12
|
+
visuallyHiddenLabel: 'Search icon'
|
|
13
|
+
}) }}
|
|
14
|
+
{%- endset -%}
|
|
15
|
+
{% call MdsButton({
|
|
16
|
+
element: item.element,
|
|
17
|
+
id: item.id,
|
|
18
|
+
value: item.value,
|
|
19
|
+
href: item.href,
|
|
20
|
+
classes: item.classes,
|
|
21
|
+
attributes: item.attributes
|
|
22
|
+
}) -%}
|
|
23
|
+
<!-- example - in normal use `safe` is discouraged as it is dangerous, and not needed -->
|
|
24
|
+
{{ html | safe }}
|
|
25
|
+
{%- endcall %}
|
|
23
26
|
{% else %}
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}) }
|
|
27
|
+
{% call MdsButton({
|
|
28
|
+
element: item.element,
|
|
29
|
+
id: item.id,
|
|
30
|
+
value: item.value,
|
|
31
|
+
href: item.href,
|
|
32
|
+
classes: item.classes,
|
|
33
|
+
attributes: item.attributes
|
|
34
|
+
}) -%}
|
|
35
|
+
{{ item.text }}
|
|
36
|
+
{%- endcall %}
|
|
32
37
|
{% endif %}
|
|
33
38
|
|
|
34
39
|
{% endfor %}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
The card component adds a border and padding around the content.
|
|
2
2
|
|
|
3
|
+
## Callable
|
|
4
|
+
|
|
5
|
+
Use the [callable](https://mozilla.github.io/nunjucks/templating.html#call) syntax to populate the main content
|
|
6
|
+
|
|
3
7
|
## Parameters
|
|
4
8
|
|
|
5
|
-
- `content`: content of the card **required**
|
|
6
9
|
- `inList`: if `true`, the container element will be an `<li>` instead of a `<div>` (useful when used in listers) **optional**
|
|
7
10
|
- `classes`: CSS classes to add to the container (`mds-card`) **optional**
|
|
8
11
|
- `id`: used for the name of `data-test` attribute **optional**
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
<li class="mds-card mds-card--list-item{% if params.classes %} {{ params.classes }}{% endif %}" data-test="card{% if params.id %}-{{params.id}}{% endif %}">
|
|
17
17
|
{{- badgesSection | safe -}}
|
|
18
18
|
<div class="mds-card__container">
|
|
19
|
-
{{
|
|
19
|
+
{{ caller() }}
|
|
20
20
|
</div>
|
|
21
21
|
</li>
|
|
22
22
|
{% else %}
|
|
23
23
|
<div class="mds-card{% if params.classes %} {{ params.classes }}{% endif %}" data-test="card{% if params.id %}-{{params.id}}{% endif %}">
|
|
24
24
|
{{- badgesSection | safe -}}
|
|
25
25
|
<div class="mds-card__container">
|
|
26
|
-
{{
|
|
26
|
+
{{ caller() }}
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
{% endif %}
|
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
<ul>
|
|
7
7
|
{%- endif -%}
|
|
8
8
|
|
|
9
|
-
{
|
|
9
|
+
{% call MdsCard({
|
|
10
10
|
inList: inList,
|
|
11
11
|
classes: classes,
|
|
12
|
-
content: content,
|
|
13
12
|
id: id,
|
|
14
13
|
badges: badges
|
|
15
|
-
})
|
|
16
|
-
|
|
14
|
+
}) -%}
|
|
15
|
+
<!-- example - in normal use `safe` is discouraged as it is dangerous, and not needed -->
|
|
16
|
+
{{ content | safe }}
|
|
17
|
+
{%- endcall %}
|
|
17
18
|
{%- if fractalLabel === 'Card used in a list' -%}
|
|
18
19
|
</ul>
|
|
19
20
|
{%- endif -%}
|
|
@@ -9,16 +9,6 @@
|
|
|
9
9
|
{% set name = params.id %}
|
|
10
10
|
{% endif %}
|
|
11
11
|
|
|
12
|
-
{% set removeButtonText -%}
|
|
13
|
-
{{- params.i18n.removeButtonText | default('Remove file') -}}
|
|
14
|
-
{{-
|
|
15
|
-
MdsIcon({
|
|
16
|
-
iconName: 'cross',
|
|
17
|
-
classes: 'mds-icon--after'
|
|
18
|
-
})
|
|
19
|
-
-}}
|
|
20
|
-
{%- endset %}
|
|
21
|
-
|
|
22
12
|
{% if params.helpText %}
|
|
23
13
|
{% set helpTextId = [params.id, '-help-text'] | join %}
|
|
24
14
|
{% endif %}
|
|
@@ -99,11 +89,18 @@
|
|
|
99
89
|
<span class="mds-visually-hidden">{{ params.i18n.selectedFileText | default('Selected file:') }} </span>
|
|
100
90
|
<span class="mds-file-upload__file-name">{% if params.value %}{{ params.value }}{% endif %}</span>
|
|
101
91
|
</div>
|
|
102
|
-
{
|
|
103
|
-
html: removeButtonText,
|
|
92
|
+
{% call MdsButton({
|
|
104
93
|
classes: 'mds-button--plain mds-button--small mds-file-upload__remove-button',
|
|
105
94
|
type: 'button'
|
|
106
|
-
}) }
|
|
95
|
+
}) -%}
|
|
96
|
+
{{- params.i18n.removeButtonText | default('Remove file') -}}
|
|
97
|
+
{{-
|
|
98
|
+
MdsIcon({
|
|
99
|
+
iconName: 'cross',
|
|
100
|
+
classes: 'mds-icon--after'
|
|
101
|
+
})
|
|
102
|
+
-}}
|
|
103
|
+
{%- endcall %}
|
|
107
104
|
</div>
|
|
108
105
|
</div>
|
|
109
106
|
</div>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{%- endif -%}
|
|
30
30
|
|
|
31
31
|
{%- if params.tooltipMessage -%}
|
|
32
|
-
{
|
|
32
|
+
{% call MdsPopover({
|
|
33
33
|
id: params.inputId + '-tooltip',
|
|
34
34
|
text: MdsIcon({
|
|
35
35
|
iconName: 'question-mark',
|
|
@@ -37,9 +37,10 @@
|
|
|
37
37
|
visuallyHiddenLabel: params.i18n.tooltipIcon | default('More info')
|
|
38
38
|
}),
|
|
39
39
|
placement: 'right',
|
|
40
|
-
classes: 'mds-button mds-button--plain mds-form-label__tooltip'
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
classes: 'mds-button mds-button--plain mds-form-label__tooltip'
|
|
41
|
+
}) -%}
|
|
42
|
+
{{ params.tooltipMessage }}
|
|
43
|
+
{%- endcall %}
|
|
43
44
|
{%- endif -%}
|
|
44
45
|
{%- if params.element == 'legend' and params.tooltipMessage -%}
|
|
45
46
|
{# <legend> is using a float:left to get the tooltip icon to line up next to it #}
|
|
@@ -4,10 +4,13 @@ If you need to add a "close" button to the modal, you can do so by adding the cl
|
|
|
4
4
|
|
|
5
5
|
The modal will have to be positionned outsite the site container so we can hide the rest of the page to all users by adding `aria-hidden="true"` on the container when the modal is active. To do so, use an `id` on the container and pass it as a parameter to the modal macro (see parameters below).
|
|
6
6
|
|
|
7
|
+
## Callable
|
|
8
|
+
|
|
9
|
+
Use the [callable](https://mozilla.github.io/nunjucks/templating.html#call) syntax to populate the main content
|
|
10
|
+
|
|
7
11
|
## Parameters
|
|
8
12
|
|
|
9
13
|
- `id`: id of the modal - needs to match `data-modal-id` on the trigger - **required**,
|
|
10
|
-
- `content`: content of the modal (can contain HTML) - **required**,
|
|
11
14
|
- `ariaLabelledby`: id of the element inside the content, which will provide a label for the modal - **required**,
|
|
12
15
|
- `ariaDescribedby`: id of the element inside the content, which will provide a description for the content of the modal - *optional*,
|
|
13
16
|
- `siteContainerId`: id of the container to target so we can hide the rest of the page to all users when the modal is active - **required**
|
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
<div class="mds-modal__wrapper">
|
|
8
8
|
<div class="mds-modal__inner">
|
|
9
9
|
|
|
10
|
-
{
|
|
11
|
-
html: closeText + MdsIcon({
|
|
12
|
-
iconName: 'close',
|
|
13
|
-
classes: 'mds-icon--after'
|
|
14
|
-
}),
|
|
10
|
+
{% call MdsButton({
|
|
15
11
|
classes: 'mds-button--plain js-mds-modal-close mds-modal-default-close-button',
|
|
16
12
|
type: 'button'
|
|
17
|
-
})
|
|
13
|
+
}) -%}
|
|
14
|
+
{{ closeText }}
|
|
15
|
+
{{ MdsIcon({
|
|
16
|
+
iconName: 'close',
|
|
17
|
+
classes: 'mds-icon--after'
|
|
18
|
+
}) }}
|
|
19
|
+
{%- endcall %}
|
|
18
20
|
|
|
19
|
-
{{
|
|
21
|
+
{{ caller() }}
|
|
20
22
|
</div>
|
|
21
23
|
</div>
|
|
22
24
|
</div>
|
|
@@ -11,8 +11,10 @@ Nam sit amet bibendum augue. Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
|
11
11
|
Donec dapibus consectetur fermentum. Proin vel lacus elit. Nunc eu massa magna. Quisque blandit arcu id dui commodo dapibus. Curabitur vehicula pharetra lacus sed faucibus. Duis tempus tincidunt leo et facilisis. Mauris fringilla lobortis fermentum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer leo nisi, convallis sit amet eros eu, eleifend egestas justo. Donec vitae tincidunt nibh. Ut at massa nunc.
|
|
12
12
|
|
|
13
13
|
Nullam faucibus pulvinar felis. Sed et tortor enim. Nulla luctus maximus mi aliquam tempor. Vivamus dignissim condimentum augue sed commodo. Donec a elementum risus, id interdum sem. Morbi malesuada tempor dapibus. Nam varius augue augue, vel pellentesque felis venenatis nec. Vivamus eget vulputate risus. Curabitur mollis, neque id tempus laoreet, nibh lectus aliquam felis, euismod varius mi turpis a sapien. Etiam ut mi a nisi faucibus egestas at eget ante.</p>
|
|
14
|
-
<p>{
|
|
15
|
-
text: 'Close',
|
|
14
|
+
<p>{% call MdsButton({
|
|
16
15
|
classes: 'mds-button--neutral js-mds-modal-close',
|
|
17
16
|
type: 'button'
|
|
18
|
-
}) }
|
|
17
|
+
}) -%}
|
|
18
|
+
Close
|
|
19
|
+
{%- endcall %}
|
|
20
|
+
</p>
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
<h1 id="modal-label">Hello!</h1>
|
|
4
4
|
|
|
5
5
|
<p id="modal-description">I'm a modal window with <a href="#">a link</a>.</p>
|
|
6
|
-
<p>{
|
|
7
|
-
text: 'Close',
|
|
6
|
+
<p>{% call MdsButton({
|
|
8
7
|
classes: 'mds-button--neutral js-mds-modal-close',
|
|
9
8
|
type: 'button'
|
|
10
|
-
}) }
|
|
9
|
+
}) -%}
|
|
10
|
+
Close
|
|
11
|
+
{%- endcall %}
|
|
12
|
+
</p>
|
|
@@ -12,38 +12,46 @@
|
|
|
12
12
|
{% include './modal/long-modal-content.njk' %}
|
|
13
13
|
{% endset %}
|
|
14
14
|
<div id="site-container">
|
|
15
|
-
<p>{
|
|
16
|
-
text: 'Open Modal',
|
|
15
|
+
<p>{% call MdsButton({
|
|
17
16
|
classes: 'mds-button--plain',
|
|
18
17
|
attributes: { 'data-modal-id': modalId }
|
|
19
|
-
}) }
|
|
18
|
+
}) -%}
|
|
19
|
+
{{ 'Open Modal' }}
|
|
20
|
+
{%- endcall %}
|
|
21
|
+
</p>
|
|
20
22
|
|
|
21
|
-
<p>{
|
|
22
|
-
text: 'Open Modal With Long Text',
|
|
23
|
+
<p>{% call MdsButton({
|
|
23
24
|
classes: 'mds-button--plain',
|
|
24
25
|
attributes: { 'data-modal-id': longModalId }
|
|
25
|
-
}) }
|
|
26
|
+
}) -%}
|
|
27
|
+
{{ 'Open Modal With Long Text' }}
|
|
28
|
+
{%- endcall %}
|
|
29
|
+
</p>
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
<p><a href="#">Some link</a></p>
|
|
29
33
|
</div>
|
|
30
34
|
|
|
31
35
|
|
|
32
|
-
{
|
|
36
|
+
{% call MdsModal({
|
|
33
37
|
id: modalId,
|
|
34
|
-
content: modalContent,
|
|
35
38
|
ariaLabelledby: 'modal-label',
|
|
36
39
|
ariaDescribedby: 'modal-description',
|
|
37
40
|
siteContainerId: 'site-container'
|
|
38
|
-
}) }
|
|
41
|
+
}) -%}
|
|
42
|
+
<!-- example - in normal use `safe` is discouraged as it is dangerous, and not needed -->
|
|
43
|
+
{{ modalContent | safe }}
|
|
44
|
+
{%- endcall %}
|
|
39
45
|
|
|
40
|
-
{
|
|
46
|
+
{% call MdsModal({
|
|
41
47
|
id: longModalId,
|
|
42
|
-
content: longModalContent,
|
|
43
48
|
ariaLabelledby: 'modal-label',
|
|
44
49
|
ariaDescribedby: 'modal-description',
|
|
45
50
|
siteContainerId: 'site-container',
|
|
46
51
|
i18n: {
|
|
47
52
|
closeText: 'Close popup'
|
|
48
53
|
}
|
|
49
|
-
}) }
|
|
54
|
+
}) -%}
|
|
55
|
+
<!-- example - in normal use `safe` is discouraged as it is dangerous, and not needed -->
|
|
56
|
+
{{ longModalContent | safe }}
|
|
57
|
+
{%- endcall %}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
## Callable
|
|
2
|
+
|
|
3
|
+
Use the [callable](https://mozilla.github.io/nunjucks/templating.html#call) syntax to populate the main content
|
|
4
|
+
|
|
1
5
|
## Parameters
|
|
2
6
|
|
|
3
7
|
- `id`: id of the trigger - **required**,
|
|
4
|
-
- `
|
|
8
|
+
- `htmlTrigger`: html or text you want on the trigger - **required**,
|
|
5
9
|
- `classes`: add extra classes to the trigger - _optional_,
|
|
6
|
-
- `content` : content of the popover - can be text, html or another component - **required**
|
|
7
10
|
- `placement`: placement of the popover - _optional_
|
|
8
11
|
|
|
9
12
|
Values can be `auto`, `top`, `right`, `bottom`, `left`. You can also add `start` or `end` to each of those positions. For example: `top-end` will on top of the reference, right aligned, `right-start` will on the right of the reference, top aligned.
|
|
@@ -8,17 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
{%- set ariaDescribedBy = [params.id, "-content"] | join -%}
|
|
10
10
|
|
|
11
|
-
{
|
|
11
|
+
{% call MdsButton({
|
|
12
12
|
attributes: { id: params.id, 'aria-describedby': ariaDescribedBy },
|
|
13
13
|
classes: classes,
|
|
14
14
|
type: 'button',
|
|
15
|
-
html: params.text,
|
|
16
15
|
id: buttonId
|
|
17
|
-
})
|
|
16
|
+
}) -%}
|
|
17
|
+
{{ params.htmlTrigger | safe }}
|
|
18
|
+
{%- endcall %}
|
|
18
19
|
|
|
19
20
|
<div id="{{ params.id }}-content" role="tooltip" class="mds-popover"{% if params.placement %} data-placement="{{ params.placement }}"{% endif %}>
|
|
20
21
|
<div class="mds-popover__arrow" data-popper-arrow></div>
|
|
21
22
|
<div class="mds-tooltip__inner">
|
|
22
|
-
|
|
23
|
+
{{ caller() }}
|
|
23
24
|
</div>
|
|
24
25
|
</div>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "./popover/_macro.njk" import MdsPopover %}
|
|
2
2
|
|
|
3
3
|
<div style="padding: 10px">
|
|
4
|
-
{
|
|
4
|
+
{% call MdsPopover({
|
|
5
5
|
id: id,
|
|
6
|
-
|
|
6
|
+
htmlTrigger: text,
|
|
7
7
|
classes: classes,
|
|
8
8
|
placement: placement,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
}) -%}
|
|
10
|
+
<!-- example - in normal use `safe` is discouraged as it is dangerous, and not needed -->
|
|
11
|
+
{{ content | safe }}
|
|
12
|
+
{%- endcall %}
|
|
11
13
|
</div>
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
{% if params.actionText -%}
|
|
6
6
|
<div class="mds-section-title__action">
|
|
7
7
|
{%- if params.actionHref -%}
|
|
8
|
-
{
|
|
9
|
-
text: params.actionText,
|
|
8
|
+
{% call MdsButton({
|
|
10
9
|
element: params.actionElement,
|
|
11
10
|
href: params.actionHref,
|
|
12
11
|
classes: params.classes
|
|
13
|
-
}) }
|
|
12
|
+
}) -%}
|
|
13
|
+
{{ params.actionText }}
|
|
14
|
+
{%- endcall %}
|
|
14
15
|
{%- endif -%}
|
|
15
16
|
</div>
|
|
16
17
|
{% endif -%}
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
{{- MdsIcon({ iconName: 'email', classes: 'mds-icon--lg mds-margin-bottom-b2' }) -}}
|
|
6
6
|
<h3>Get job alerts</h3>
|
|
7
7
|
<p>Create a job alert and receive personalised <a href="/some-link">job recommendations</a> straight to your inbox</p>
|
|
8
|
-
{
|
|
9
|
-
text: 'Create alert',
|
|
8
|
+
{% call MdsButton({
|
|
10
9
|
element: 'a',
|
|
11
10
|
href: '/somewhere',
|
|
12
11
|
classes: 'mds-button--neutral'
|
|
13
|
-
}) }
|
|
12
|
+
}) -%}
|
|
13
|
+
Create alert
|
|
14
|
+
{%- endcall %}
|
|
14
15
|
</div>
|
|
@@ -83,10 +83,11 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</fieldset>
|
|
85
85
|
<div class="mds-clearfix">
|
|
86
|
-
{
|
|
87
|
-
text: 'Submit',
|
|
86
|
+
{% MdsButton({
|
|
88
87
|
classes: 'mds-width-full mds-width-md-auto mds-float-md-right'
|
|
89
|
-
}) }
|
|
88
|
+
}) -%}
|
|
89
|
+
Submit
|
|
90
|
+
{%- endcall %}
|
|
90
91
|
</div>
|
|
91
92
|
</form>
|
|
92
93
|
|
|
@@ -102,10 +103,11 @@
|
|
|
102
103
|
}) }}
|
|
103
104
|
</div>
|
|
104
105
|
<div class="mds-grid-col-12 mds-grid-col-md-4 mds-grid-col-lg-2">
|
|
105
|
-
{
|
|
106
|
-
text: 'Submit',
|
|
106
|
+
{% MdsButton({
|
|
107
107
|
classes: 'mds-width-full mds-width-md-auto'
|
|
108
|
-
}) }
|
|
108
|
+
}) -%}
|
|
109
|
+
Submit
|
|
110
|
+
{%- endcall %}
|
|
109
111
|
</div>
|
|
110
112
|
</form>
|
|
111
113
|
</div>
|