mp-design-system 0.9.27 → 0.9.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +1 -1
- package/src/_includes/components/card/card.config.js +41 -5
- package/src/_includes/components/card/card.njk +9 -4
- package/src/_includes/components/card/card.scss +27 -0
- package/src/_includes/components/input/macro.njk +4 -0
- package/src/_includes/components/input/toggle.njk +0 -2
- package/src/patterns/form.njk +10 -0
package/package.json
CHANGED
@@ -81,7 +81,8 @@ module.exports = {
|
|
81
81
|
footer: {
|
82
82
|
cta: {
|
83
83
|
link: '#',
|
84
|
-
label: 'Read more'
|
84
|
+
label: 'Read more',
|
85
|
+
icon: 'arrow-right',
|
85
86
|
}
|
86
87
|
}
|
87
88
|
}
|
@@ -159,7 +160,8 @@ module.exports = {
|
|
159
160
|
footer: {
|
160
161
|
cta: {
|
161
162
|
link: '#',
|
162
|
-
label: 'View full details'
|
163
|
+
label: 'View full details',
|
164
|
+
icon: 'arrow-right',
|
163
165
|
},
|
164
166
|
},
|
165
167
|
shop: {
|
@@ -200,7 +202,8 @@ module.exports = {
|
|
200
202
|
footer: {
|
201
203
|
cta: {
|
202
204
|
link: '#',
|
203
|
-
label: 'Read the whitepaper'
|
205
|
+
label: 'Read the whitepaper',
|
206
|
+
icon: 'arrow-right',
|
204
207
|
},
|
205
208
|
},
|
206
209
|
tag: 'Whitepaper'
|
@@ -254,7 +257,7 @@ module.exports = {
|
|
254
257
|
date: {
|
255
258
|
date: new Date(),
|
256
259
|
time: '11:00 – 12:00',
|
257
|
-
timezone: 'EST'
|
260
|
+
timezone: 'EST',
|
258
261
|
},
|
259
262
|
meta: [
|
260
263
|
'English'
|
@@ -676,7 +679,8 @@ module.exports = {
|
|
676
679
|
footer: {
|
677
680
|
cta: {
|
678
681
|
link: '#',
|
679
|
-
label: 'Read the whitepaper'
|
682
|
+
label: 'Read the whitepaper',
|
683
|
+
icon: 'arrow-right',
|
680
684
|
}
|
681
685
|
},
|
682
686
|
tag: 'Whitepaper',
|
@@ -774,6 +778,38 @@ module.exports = {
|
|
774
778
|
link: '#'
|
775
779
|
}
|
776
780
|
},
|
781
|
+
{
|
782
|
+
title: 'Event series card',
|
783
|
+
preview: 'content-width',
|
784
|
+
context: {
|
785
|
+
theme: {
|
786
|
+
border: false,
|
787
|
+
layout: 'single',
|
788
|
+
name: 'event-series',
|
789
|
+
inlineSpecs: false,
|
790
|
+
corner: false,
|
791
|
+
},
|
792
|
+
image: {
|
793
|
+
src: '/static/img/blog-page-image-1.jpg',
|
794
|
+
alt: 'Product image alt'
|
795
|
+
},
|
796
|
+
header: {
|
797
|
+
title: 'Part 1 - The theory of X-Ray Fluorescence (XRF)',
|
798
|
+
date: {
|
799
|
+
date: (new Date()).toLocaleString('default', { month: 'short', year: 'numeric' }),
|
800
|
+
formatted: true,
|
801
|
+
},
|
802
|
+
},
|
803
|
+
footer: {
|
804
|
+
cta: {
|
805
|
+
link: '#',
|
806
|
+
label: 'Watch now',
|
807
|
+
icon: 'play',
|
808
|
+
}
|
809
|
+
},
|
810
|
+
link: '#'
|
811
|
+
}
|
812
|
+
},
|
777
813
|
],
|
778
814
|
|
779
815
|
props: [
|
@@ -14,6 +14,7 @@
|
|
14
14
|
{% set hasImage = params.image.src %}
|
15
15
|
{% set isInPast = header.date.duration %}
|
16
16
|
{% set hasDate = header.date.date %}
|
17
|
+
{% set hasFormat = header.date.formatted %}
|
17
18
|
{% set hasTime = header.date.time %}
|
18
19
|
{% set hasTimezone = header.date.timezone %}
|
19
20
|
{% set hasMeta = header.meta | length %}
|
@@ -68,17 +69,21 @@
|
|
68
69
|
</a>
|
69
70
|
</figure>
|
70
71
|
{% endif %}
|
71
|
-
|
72
72
|
<div class="c-card__primary">
|
73
|
-
|
74
73
|
{% if header %}
|
75
74
|
<header class="c-card__header u-flow--2xs">
|
76
|
-
{% if hasDate and not isInPast %}
|
75
|
+
{% if hasDate and not isInPast and hasFormat == false %}
|
77
76
|
<time class="c-card__datetime">
|
78
77
|
<span class="c-card__day">{{ header.date.date.getDate() }} </span>
|
79
78
|
<span class="c-card__month">{{ header.date.date.getMonth() | months }}</span>
|
80
79
|
</time>
|
81
80
|
{% endif %}
|
81
|
+
|
82
|
+
{% if hasDate and hasFormat == true %}
|
83
|
+
<time class="c-card__datetime">
|
84
|
+
<span>{{ header.date.date }}</span>
|
85
|
+
</time>
|
86
|
+
{% endif %}
|
82
87
|
|
83
88
|
{% if not params.theme.metaLast and (hasTime or hasTimezone or isInPast or hasMeta) %}
|
84
89
|
{{ meta() }}
|
@@ -144,7 +149,7 @@
|
|
144
149
|
link: footer.cta.link,
|
145
150
|
label: footer.cta.label,
|
146
151
|
classes: 'u-link',
|
147
|
-
icon:
|
152
|
+
icon: footer.cta.icon
|
148
153
|
}) }}
|
149
154
|
</div>
|
150
155
|
{% endif %}
|
@@ -444,6 +444,33 @@
|
|
444
444
|
}
|
445
445
|
}
|
446
446
|
}
|
447
|
+
|
448
|
+
&--event-series {
|
449
|
+
box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 20%);
|
450
|
+
|
451
|
+
.c-card__image img {
|
452
|
+
aspect-ratio: 2/1;
|
453
|
+
}
|
454
|
+
|
455
|
+
.c-card__header > * + * {
|
456
|
+
@include margin('s', 0, 0, 0);
|
457
|
+
}
|
458
|
+
|
459
|
+
.c-card__datetime {
|
460
|
+
font-size: var(--step--1);
|
461
|
+
font-weight: normal;
|
462
|
+
}
|
463
|
+
|
464
|
+
.c-card__title {
|
465
|
+
font-size: var(--step-0);
|
466
|
+
}
|
467
|
+
|
468
|
+
.c-card__footer .u-link,
|
469
|
+
.c-card__footer .u-link svg {
|
470
|
+
color: color('utility-blue', 'step-1');
|
471
|
+
font-size: var(--step--1);
|
472
|
+
}
|
473
|
+
}
|
447
474
|
}
|
448
475
|
|
449
476
|
.grid-view > .c-card--event.c-card--has-image .c-card__wrapper {
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
<label for="{{ params.id }}" class="c-toggle">
|
4
2
|
<input type="checkbox" class="c-toggle__checkbox" id="{{ params.id }}" value="{{ params.value }}" role="switch" aria-checked="false" aria-label="{{ params.label }}" {{ 'checked' if params.checked }} {{ 'required' if params.required }} />
|
5
3
|
<span class="c-toggle__slider"></span>
|
package/src/patterns/form.njk
CHANGED
@@ -8,6 +8,7 @@ layout: patterns-page
|
|
8
8
|
{% from "components/input/macro.njk" import textarea %}
|
9
9
|
{% from "components/input/macro.njk" import checkbox %}
|
10
10
|
{% from "components/input/macro.njk" import radio %}
|
11
|
+
{% from "components/input/macro.njk" import toggle %}
|
11
12
|
{% from "components/alert/macro.njk" import alert %}
|
12
13
|
|
13
14
|
<div class="u-flow">
|
@@ -73,6 +74,15 @@ layout: patterns-page
|
|
73
74
|
</div>
|
74
75
|
{% endfor %}
|
75
76
|
|
77
|
+
<label class="c-label">Toggle</label>
|
78
|
+
{{ toggle({
|
79
|
+
label: 'Toggle',
|
80
|
+
name: 'toggle',
|
81
|
+
id: 'toggle',
|
82
|
+
type: 'toggle',
|
83
|
+
placeholder: 'Toggle?'
|
84
|
+
})}}
|
85
|
+
|
76
86
|
<br>
|
77
87
|
<legend><code><input></code> variations</legend>
|
78
88
|
|