@madgex/design-system 3.4.0 → 3.4.2
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/coverage/cobertura-coverage.xml +1 -1
- package/coverage/components/accordion/accordion.js.html +1 -1
- package/coverage/components/accordion/index.html +1 -1
- package/coverage/components/button/button.js.html +1 -1
- package/coverage/components/button/index.html +1 -1
- package/coverage/components/inputs/combobox/combobox.js.html +1 -1
- package/coverage/components/inputs/combobox/index.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
- package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
- package/coverage/components/inputs/file-upload/index.html +1 -1
- package/coverage/components/inputs/textarea/character-count.js.html +1 -1
- package/coverage/components/inputs/textarea/index.html +1 -1
- package/coverage/components/modal/index.html +1 -1
- package/coverage/components/modal/modal.js.html +1 -1
- package/coverage/components/notification/index.html +1 -1
- package/coverage/components/notification/notification.js.html +1 -1
- package/coverage/components/popover/index.html +1 -1
- package/coverage/components/popover/popover.js.html +1 -1
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +1 -1
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/combobox.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/notification.js.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index-vue.js.html +1 -1
- package/coverage/js/index.html +1 -1
- package/coverage/js/index.js.html +1 -1
- package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/js/polyfills/objectAssign.js.html +1 -1
- package/coverage/js/polyfills/remove.js.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- package/dist/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/_tokens/scss/_tokens.scss +1 -1
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/package.json +1 -1
- package/src/components/pagination/_template.njk +11 -11
- package/src/components/pagination/pagination.config.js +6 -4
- package/src/components/pagination-numbers/README.md +2 -2
- package/src/components/pagination-numbers/_pagination-numbers-number-macro.njk +18 -16
- package/src/components/pagination-numbers/_template.njk +26 -43
- package/src/components/pagination-numbers/pagination-numbers.config.js +4 -4
- package/src/layout/grid/README.md +2 -0
- package/src/layout/grid/grid.njk +1 -1
- package/src/scss/core/_grid.scss +2 -1
|
@@ -62,30 +62,22 @@ Otherwise, show an extra page in front of the current page to make up the displa
|
|
|
62
62
|
<ul class="mds-pagination mds-pagination--numbers mds-text-align-center {% if params.classes %} {{params.classes}}{% endif %}">
|
|
63
63
|
{% if params.prevLabel -%}
|
|
64
64
|
<li class="mds-pagination__item">
|
|
65
|
-
|
|
66
65
|
{%- if disabledButtonPrev -%}
|
|
67
66
|
<div class="mds-pagination__link mds-pagination__link--disabled" aria-disabled="true">
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<span class="mds-visually-hidden">{{- params.prevVisHiddenLabel -}}</span>{%- endif -%}
|
|
81
|
-
</span>
|
|
82
|
-
|
|
83
|
-
{%- if disabledButtonPrev -%}
|
|
84
|
-
</div>
|
|
85
|
-
{%- else -%}
|
|
67
|
+
{%- else -%}
|
|
68
|
+
<a href="{{params.pageUrlTemplate | replace('{pageNo}', pageNo - 1) }}"
|
|
69
|
+
class="mds-pagination__link mds-pagination__link--background"
|
|
70
|
+
{%- if params.prevVisHiddenLabel -%}aria-label="{{ params.prevVisHiddenLabel }}"{%- endif -%}>
|
|
71
|
+
{%- endif -%}
|
|
72
|
+
{% if not params.hideIcons -%}
|
|
73
|
+
{{ MdsIcon({iconName: 'chevron-left'}) }}
|
|
74
|
+
{%- endif -%}
|
|
75
|
+
<span class="mds-display-none mds-display-md-inline mds-margin-left-b2">{{- params.prevLabel -}}</span>
|
|
76
|
+
{%- if disabledButtonPrev -%}
|
|
77
|
+
</div>
|
|
78
|
+
{%- else -%}
|
|
86
79
|
</a>
|
|
87
80
|
{%- endif -%}
|
|
88
|
-
|
|
89
81
|
</li>
|
|
90
82
|
{%- endif %}
|
|
91
83
|
<li class="mds-pagination__item mds-border-left">
|
|
@@ -125,35 +117,26 @@ Otherwise, show an extra page in front of the current page to make up the displa
|
|
|
125
117
|
}}
|
|
126
118
|
</li>
|
|
127
119
|
{%- endif -%}
|
|
128
|
-
{
|
|
120
|
+
{%- if params.nextLabel -%}
|
|
129
121
|
<li class="mds-pagination__item mds-border-left">
|
|
130
|
-
|
|
131
122
|
{%- if disabledButtonNext -%}
|
|
132
123
|
<div class="mds-pagination__link mds-pagination__link--disabled" aria-disabled="true">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
iconName: 'chevron-right'
|
|
146
|
-
}) }}
|
|
147
|
-
{%- endif %}
|
|
148
|
-
|
|
149
|
-
{%- if disabledButtonNext -%}
|
|
150
|
-
</div>
|
|
151
|
-
{%- else -%}
|
|
124
|
+
{%- else -%}
|
|
125
|
+
<a href="{{params.pageUrlTemplate | replace('{pageNo}', pageNo + 1)}}"
|
|
126
|
+
class="mds-pagination__link mds-pagination__link--background"
|
|
127
|
+
{%- if params.nextVisHiddenLabel -%}aria-label="{{ params.nextVisHiddenLabel }}"{%- endif -%}>
|
|
128
|
+
{%- endif -%}
|
|
129
|
+
<span class="mds-display-none mds-display-md-inline mds-margin-right-b2">{{- params.nextLabel -}}</span>
|
|
130
|
+
{%- if not params.hideIcons -%}
|
|
131
|
+
{{ MdsIcon({iconName: 'chevron-right'}) }}
|
|
132
|
+
{%- endif -%}
|
|
133
|
+
{%- if disabledButtonNext -%}
|
|
134
|
+
</div>
|
|
135
|
+
{%- else -%}
|
|
152
136
|
</a>
|
|
153
137
|
{%- endif -%}
|
|
154
|
-
|
|
155
138
|
</li>
|
|
156
|
-
{%- endif
|
|
139
|
+
{%- endif -%}
|
|
157
140
|
</ul>
|
|
158
141
|
</nav>
|
|
159
142
|
|
|
@@ -6,11 +6,11 @@ module.exports = {
|
|
|
6
6
|
name: 'Pagination numbers',
|
|
7
7
|
nextLabel: 'Next',
|
|
8
8
|
prevLabel: 'Previous',
|
|
9
|
-
pageVisHiddenLabel: 'Page',
|
|
10
|
-
pageVisHiddenCurrentPageLabel: 'Current page',
|
|
9
|
+
pageVisHiddenLabel: 'Page {pageNo}',
|
|
10
|
+
pageVisHiddenCurrentPageLabel: 'Current page, page {pageNo}',
|
|
11
11
|
pageUrlTemplate: '/article/{pageNo}/my-seo-things',
|
|
12
|
-
prevVisHiddenLabel: 'article',
|
|
13
|
-
nextVisHiddenLabel: 'article',
|
|
12
|
+
prevVisHiddenLabel: 'Previous article',
|
|
13
|
+
nextVisHiddenLabel: 'Next article',
|
|
14
14
|
id: 'default',
|
|
15
15
|
},
|
|
16
16
|
variants: [
|
|
@@ -40,6 +40,8 @@ You can use `space-around` or `space-between` by adding the classes `mds-grid-ar
|
|
|
40
40
|
|
|
41
41
|
For smaller (half width) gutters `mds-grid-small` can be used on the row element.
|
|
42
42
|
|
|
43
|
+
I you want a column to only be as wide as it's content needs it to be, and allows other columns to grow to fill the remaining space use `.mds-grid-fit-content`.
|
|
44
|
+
|
|
43
45
|
### Reordering and Reversing
|
|
44
46
|
|
|
45
47
|
You can move an element to the first or last position with the classes `mds-grid-first-` and `mds-grid-last-`
|
package/src/layout/grid/grid.njk
CHANGED
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
<h2>Grow to fit column</h2>
|
|
60
60
|
<div class="mds-grid-row">
|
|
61
61
|
<div class="mds-grid-col"><span>Column</span></div>
|
|
62
|
-
<div class="mds-grid-col mds-grid-
|
|
62
|
+
<div class="mds-grid-col mds-grid-fit-content"><span class="mds-whitespace-nowrap">with content fit</span></div>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
package/src/scss/core/_grid.scss
CHANGED
|
@@ -220,8 +220,9 @@ $mds-quarter-gutter-width: $mds-size-gutter-width * 0.25;
|
|
|
220
220
|
order: 1;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
.mds-grid-
|
|
223
|
+
.mds-grid-fit-content {
|
|
224
224
|
flex-grow: 0;
|
|
225
|
+
flex-basis: auto;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
@media only screen and (min-width: $mds-size-breakpoint-sm) {
|