@madgex/design-system 10.0.4 → 10.0.6
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/js/_tokens-module.js +250 -181
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/package.json +7 -7
- package/src/components/media-block/media-block.config.js +1 -0
- package/src/components/media-block/media-block.njk +6 -6
- package/src/components/pagination/_template.njk +12 -6
- package/src/components/pagination/pagination.scss +76 -5
- package/src/components/pagination-numbers/_pagination-numbers-number-macro.njk +8 -8
- package/src/helpers/container-queries/container-queries.njk +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@madgex/design-system",
|
|
3
3
|
"author": "Madgex",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "10.0.
|
|
5
|
+
"version": "10.0.6",
|
|
6
6
|
"main": "dist/js/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dist/js/index.js",
|
|
@@ -25,19 +25,20 @@
|
|
|
25
25
|
"clean": "rimraf dist public tokens/build",
|
|
26
26
|
"commit": "commit",
|
|
27
27
|
"dev": "cross-env NODE_ENV=development gulp dev",
|
|
28
|
-
"debug": "node --inspect ./node_modules/.bin/gulp dev",
|
|
29
28
|
"build": "gulp build",
|
|
30
29
|
"build:icons": "svgo -f src/icons ./dist/assets/icons",
|
|
31
30
|
"build:fractal": "fractal build",
|
|
32
|
-
"prepublishOnly": "npm run build",
|
|
33
31
|
"test": "jest",
|
|
34
32
|
"cypress": "cypress run",
|
|
35
|
-
"cypress:open": "cypress open"
|
|
33
|
+
"cypress:open": "cypress open",
|
|
34
|
+
"prepublishOnly": "npm run build",
|
|
35
|
+
"semantic-release": "semantic-release -e semantic-release-monorepo"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
39
|
-
"url": "https://github.com/
|
|
39
|
+
"url": "https://github.com/wiley/madgex-design-system"
|
|
40
40
|
},
|
|
41
|
+
"homepage": "https://design-system.jb.dev.madgexhosting.net/",
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"@ctrl/tinycolor": "^4.1.0",
|
|
43
44
|
"glob": "^11.0.1",
|
|
@@ -95,6 +96,5 @@
|
|
|
95
96
|
},
|
|
96
97
|
"engines": {
|
|
97
98
|
"node": ">=22"
|
|
98
|
-
}
|
|
99
|
-
"gitHead": "01e59e8a7fb26172c1bbfb0d5cf048b5dadcea31"
|
|
99
|
+
}
|
|
100
100
|
}
|
|
@@ -10,6 +10,7 @@ module.exports = {
|
|
|
10
10
|
<br>
|
|
11
11
|
Pink, dashed container to help reveal component.`,
|
|
12
12
|
// imageSrc, imageAlt, imagePosition, imageSize are undefined by default
|
|
13
|
+
classes: 'component-demo component-demo--padded',
|
|
13
14
|
content: `
|
|
14
15
|
<h3 class="mds-font-s0"><a href="#">Title via Caller</a></h3>
|
|
15
16
|
<p class="mds-font-s-2">Description via caller.</p>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<p class="mds-margin-top-b12">With image - 3 column using mds grid. Note how lack of column width causes MediaBlock to stack.</p>
|
|
13
13
|
{# wrap in dashed border to help seperate examples #}
|
|
14
|
-
<div class="mds-margin-bottom-b5"
|
|
14
|
+
<div class="mds-margin-bottom-b5">
|
|
15
15
|
|
|
16
16
|
<div class="mds-grid-row">
|
|
17
17
|
{% for i in range(0, 3) %}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<p class="mds-margin-top-b12">With image - 2 column using mds grid. More width per column means horizontal layout.</p>
|
|
39
|
-
<div class="mds-margin-bottom-b5"
|
|
39
|
+
<div class="mds-margin-bottom-b5">
|
|
40
40
|
|
|
41
41
|
<div class="mds-grid-row">
|
|
42
42
|
{% for i in range(0, 2) %}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
|
|
62
62
|
<p class="mds-margin-top-b12">With image - 2 column using mds grid (<code>noContainerQueries: true</code>)</p>
|
|
63
|
-
<div class="mds-margin-bottom-b5"
|
|
63
|
+
<div class="mds-margin-bottom-b5">
|
|
64
64
|
|
|
65
65
|
<div class="mds-grid-row">
|
|
66
66
|
{% for i in range(0, 2) %}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</div>
|
|
86
86
|
|
|
87
87
|
<p class="mds-margin-top-b12">Without image</p>
|
|
88
|
-
<div class="mds-margin-bottom-b5"
|
|
88
|
+
<div class="mds-margin-bottom-b5">
|
|
89
89
|
|
|
90
90
|
<div class="mds-grid-row">
|
|
91
91
|
{% for i in range(0, 3) %}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
</div>
|
|
106
|
-
<div class="mds-margin-bottom-b5"
|
|
106
|
+
<div class="mds-margin-bottom-b5">
|
|
107
107
|
|
|
108
108
|
<div class="mds-grid-row">
|
|
109
109
|
{% for i in range(0, 2) %}
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
{% else %}
|
|
126
126
|
|
|
127
127
|
{# Regular examples #}
|
|
128
|
-
<div class="mds-margin-bottom-b5"
|
|
128
|
+
<div class="mds-margin-bottom-b5">
|
|
129
129
|
|
|
130
130
|
{% call MdsMediaBlock({
|
|
131
131
|
imageSrc: imageSrc,
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
{%- set nextAriaLabel = params.i18n.nextAriaLabel | default('Next page') -%}
|
|
10
10
|
|
|
11
11
|
<nav aria-label="{{ navAriaLabel }}" data-test="pagination{% if params.id %}-{{params.id}}{% endif %}">
|
|
12
|
-
<ul class="mds-pagination mds-text-align-right{% if params.classes %} {{params.classes}}{% endif %}">
|
|
12
|
+
<ul class="mds-pagination mds-pagination--jobs mds-text-align-right{% if params.classes %} {{params.classes}}{% endif %}">
|
|
13
13
|
{% if params.backToUrl and backToLabel -%}
|
|
14
|
-
<li class="mds-
|
|
15
|
-
<a href="{{ params.backToUrl }}" class="mds-pagination__link mds-pagination__link--
|
|
14
|
+
<li class="mds-pagination__item mds-pagination__back">
|
|
15
|
+
<a href="{{ params.backToUrl }}" class="mds-pagination__link mds-pagination__link--background" {% if backToAriaLabel %} aria-label="{{- backToAriaLabel -}}" {% endif %}>
|
|
16
16
|
{% if not params.hideIcons -%}
|
|
17
17
|
{{ MdsIcon({
|
|
18
18
|
iconName: 'chevron-left',
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</li>
|
|
25
25
|
{%- endif %}
|
|
26
26
|
{% if params.prevUrl and prevLabel -%}
|
|
27
|
-
<li class="mds-
|
|
27
|
+
<li class="mds-pagination__item">
|
|
28
28
|
<a href="{{ params.prevUrl }}"
|
|
29
29
|
class="mds-pagination__link mds-pagination__link--background"
|
|
30
30
|
aria-label="{{ prevAriaLabel }}{% if params.prevExtraLabel %} - {{ params.prevExtraLabel }}{% endif %}">
|
|
@@ -42,10 +42,16 @@
|
|
|
42
42
|
</li>
|
|
43
43
|
{%- endif %}
|
|
44
44
|
{%- if params.nextUrl and nextLabel -%}
|
|
45
|
-
<li>
|
|
45
|
+
<li class="mds-pagination__item mds-pagination__next">
|
|
46
46
|
<a href="{{ params.nextUrl }}"
|
|
47
|
-
class="mds-pagination__link mds-pagination__link--background"
|
|
47
|
+
class="mds-pagination__link mds-pagination__link--background mds-arrow-side-switch"
|
|
48
48
|
aria-label="{{ nextAriaLabel }}{% if params.nextExtraLabel %} - {{ params.nextExtraLabel }}{% endif %}">
|
|
49
|
+
{% if not params.hideIcons -%}
|
|
50
|
+
{{ MdsIcon({
|
|
51
|
+
iconName: 'chevron-right',
|
|
52
|
+
classes: 'mds-icon--before'
|
|
53
|
+
}) }}
|
|
54
|
+
{%- endif %}
|
|
49
55
|
{%- if params.nextExtraLabel -%}
|
|
50
56
|
<strong class="mds-pagination__extra-label mds-display-none mds-display-md-inline mds-margin-right-b3">{{ params.nextExtraLabel | truncate(40, false) }}</strong>
|
|
51
57
|
{%- endif -%}
|
|
@@ -1,23 +1,90 @@
|
|
|
1
1
|
.mds-pagination {
|
|
2
|
+
display: flex;
|
|
2
3
|
text-align: right;
|
|
3
4
|
width: 100%;
|
|
4
5
|
@extend .mds-surface;
|
|
5
6
|
@include mds-clearfix;
|
|
6
7
|
}
|
|
7
8
|
|
|
9
|
+
.mds-pagination--jobs {
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
|
|
12
|
+
.mds-arrow-side-switch {
|
|
13
|
+
.mds-icon--before {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mds-pagination__next {
|
|
19
|
+
margin-left: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
.mds-pagination__back {
|
|
25
|
+
text-align: left;
|
|
26
|
+
|
|
27
|
+
.mds-pagination__link {
|
|
28
|
+
border-right: $regular-border;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@media (max-width: 360px) {
|
|
37
|
+
.mds-pagination__back {
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
.mds-pagination__link {
|
|
41
|
+
width: 100%;
|
|
42
|
+
border-right: none;
|
|
43
|
+
border-bottom: $regular-border;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (max-width: 320px) {
|
|
49
|
+
.mds-pagination__item {
|
|
50
|
+
flex-grow: 1;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mds-pagination__link {
|
|
55
|
+
text-align: left;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mds-arrow-side-switch {
|
|
60
|
+
.mds-icon--before {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mds-icon--after {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mds-pagination__next {
|
|
70
|
+
margin-left: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
8
75
|
.mds-pagination__link {
|
|
9
76
|
display: inline-block;
|
|
10
77
|
padding: $constant-size-baseline * 3 $constant-size-baseline * 2;
|
|
11
78
|
height: 100%;
|
|
12
|
-
|
|
13
|
-
border-right: $regular-border;
|
|
14
|
-
}
|
|
79
|
+
|
|
15
80
|
text-decoration: none;
|
|
16
81
|
|
|
17
82
|
&--background {
|
|
83
|
+
|
|
18
84
|
&:hover,
|
|
19
85
|
&:focus {
|
|
20
86
|
background-color: $constant-color-neutral-lightest;
|
|
87
|
+
|
|
21
88
|
& > span,
|
|
22
89
|
& > strong {
|
|
23
90
|
text-decoration-thickness: $link-hover-decoration-thickness;
|
|
@@ -31,6 +98,7 @@
|
|
|
31
98
|
color: $constant-color-neutral-lighter;
|
|
32
99
|
}
|
|
33
100
|
}
|
|
101
|
+
|
|
34
102
|
.mds-pagination--numbers .mds-pagination__extra-label {
|
|
35
103
|
display: none;
|
|
36
104
|
|
|
@@ -40,8 +108,8 @@
|
|
|
40
108
|
}
|
|
41
109
|
|
|
42
110
|
.mds-pagination--numbers {
|
|
43
|
-
display: flex;
|
|
44
111
|
justify-content: space-between;
|
|
112
|
+
|
|
45
113
|
&:after {
|
|
46
114
|
content: none;
|
|
47
115
|
}
|
|
@@ -49,15 +117,18 @@
|
|
|
49
117
|
.mds-pagination__link {
|
|
50
118
|
display: block;
|
|
51
119
|
}
|
|
120
|
+
|
|
52
121
|
.mds-pagination__item {
|
|
53
122
|
flex-grow: 1;
|
|
54
123
|
}
|
|
124
|
+
|
|
55
125
|
.mds-pagination__link--active {
|
|
56
126
|
color: var(--mds-color-text-base);
|
|
57
127
|
background-color: var(--mds-color-brand-1-lightest, #{$constant-color-neutral-lightest});
|
|
128
|
+
|
|
58
129
|
&:hover,
|
|
59
130
|
&:focus {
|
|
60
131
|
color: $link-hover-color;
|
|
61
132
|
}
|
|
62
133
|
}
|
|
63
|
-
}
|
|
134
|
+
}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
{%- set currentPageAriaLabel = params.i18n.currentPageAriaLabel | default('Current page, page {pageNo}') -%}
|
|
6
6
|
|
|
7
7
|
<a href="{{params.pageUrlTemplate | replace('{pageNo}', params.number)}}"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{%- else
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
{%- if isCurrentPage %}{#
|
|
9
|
+
#} aria-current="true"{#
|
|
10
|
+
#} aria-label="{{ currentPageAriaLabel | replace('{pageNo}', params.number) }}"{#
|
|
11
|
+
#} class="mds-pagination__link mds-pagination__link--background mds-pagination__link--active"
|
|
12
|
+
{%- else %}{#
|
|
13
|
+
#} aria-label="{{ pageNumberAriaLabel | replace('{pageNo}', params.number) }}"{#
|
|
14
|
+
#} class="mds-pagination__link mds-pagination__link--background"
|
|
15
|
+
{%- endif -%}>
|
|
16
16
|
{%- if params.showLastEllipses -%}
|
|
17
17
|
<span class="mds-display-none mds-display-md-inline">…</span>
|
|
18
18
|
{%- endif -%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<p>See the <a href="/components/detail/media-block" target="_top">MediaBlock</a> preview to see it in action.</p>
|
|
1
|
+
<p>See the <a href="/components/detail/media-block.html" target="_top">MediaBlock</a> preview to see it in action.</p>
|