@umbraco-ui/uui-pagination 1.0.0 → 1.2.0-rc.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/lib/index.js +11 -2
- package/lib/uui-pagination.element.d.ts +3 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@ let UUIPaginationElement = class extends LitElement {
|
|
|
32
32
|
this._observer = new ResizeObserver(this._calculateRange.bind(this));
|
|
33
33
|
this.label = "";
|
|
34
34
|
this.ariaLabel = "";
|
|
35
|
-
this.
|
|
35
|
+
this._total = 100;
|
|
36
36
|
this._range = 0;
|
|
37
37
|
this._visiblePages = [];
|
|
38
38
|
this._current = 1;
|
|
@@ -83,6 +83,14 @@ let UUIPaginationElement = class extends LitElement {
|
|
|
83
83
|
);
|
|
84
84
|
return pages;
|
|
85
85
|
}
|
|
86
|
+
get total() {
|
|
87
|
+
return this._total;
|
|
88
|
+
}
|
|
89
|
+
set total(newValue) {
|
|
90
|
+
this._total = newValue;
|
|
91
|
+
this._visiblePages = this._generateVisiblePages(this._current);
|
|
92
|
+
this.requestUpdate("total", newValue);
|
|
93
|
+
}
|
|
86
94
|
get current() {
|
|
87
95
|
return this._current;
|
|
88
96
|
}
|
|
@@ -166,6 +174,7 @@ let UUIPaginationElement = class extends LitElement {
|
|
|
166
174
|
return html`<uui-button
|
|
167
175
|
compact
|
|
168
176
|
look="outline"
|
|
177
|
+
role="listitem"
|
|
169
178
|
tabindex="-1"
|
|
170
179
|
class="dots"
|
|
171
180
|
label="More pages"
|
|
@@ -255,7 +264,7 @@ __decorateClass([
|
|
|
255
264
|
], UUIPaginationElement.prototype, "ariaLabel", 2);
|
|
256
265
|
__decorateClass([
|
|
257
266
|
property({ type: Number })
|
|
258
|
-
], UUIPaginationElement.prototype, "total",
|
|
267
|
+
], UUIPaginationElement.prototype, "total", 1);
|
|
259
268
|
__decorateClass([
|
|
260
269
|
state()
|
|
261
270
|
], UUIPaginationElement.prototype, "_range", 2);
|
|
@@ -28,13 +28,15 @@ export declare class UUIPaginationElement extends LitElement {
|
|
|
28
28
|
* @attr
|
|
29
29
|
*/
|
|
30
30
|
ariaLabel: string;
|
|
31
|
+
private _total;
|
|
31
32
|
/**
|
|
32
33
|
* Set the amount of pages to navigate.
|
|
33
34
|
* @type {number}
|
|
34
35
|
* @attr
|
|
35
36
|
* @default: 1
|
|
36
37
|
*/
|
|
37
|
-
total: number;
|
|
38
|
+
get total(): number;
|
|
39
|
+
set total(newValue: number);
|
|
38
40
|
private _range;
|
|
39
41
|
private _visiblePages;
|
|
40
42
|
private _current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-pagination",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.2.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.0.0",
|
|
34
|
-
"@umbraco-ui/uui-button": "1.0.0",
|
|
35
|
-
"@umbraco-ui/uui-button-group": "1.0.0"
|
|
33
|
+
"@umbraco-ui/uui-base": "1.2.0-rc.0",
|
|
34
|
+
"@umbraco-ui/uui-button": "1.2.0-rc.0",
|
|
35
|
+
"@umbraco-ui/uui-button-group": "1.2.0-rc.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-pagination",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "43f1b9a8bd1721af30ba7c145517ee665d874df3"
|
|
47
47
|
}
|