svelte-common 6.3.2 → 6.4.1

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.
Files changed (2) hide show
  1. package/package.json +10 -10
  2. package/src/pagination.mjs +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-common",
3
- "version": "6.3.2",
3
+ "version": "6.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,12 +13,12 @@
13
13
  "description": "common components and utils used in svelte apps",
14
14
  "keywords": [
15
15
  "component",
16
+ "filtering",
17
+ "paginator",
18
+ "sorting",
16
19
  "svelte",
17
20
  "vite",
18
- "web",
19
- "sorting",
20
- "filtering",
21
- "paginator"
21
+ "web"
22
22
  ],
23
23
  "contributors": [
24
24
  {
@@ -41,7 +41,7 @@
41
41
  "preview": "vite preview"
42
42
  },
43
43
  "dependencies": {
44
- "svelte-command": "^1.1.44",
44
+ "svelte-command": "^1.1.45",
45
45
  "svelte-entitlement": "^1.2.59"
46
46
  },
47
47
  "devDependencies": {
@@ -52,18 +52,18 @@
52
52
  "ava": "^5.3.1",
53
53
  "c8": "^8.0.0",
54
54
  "documentation": "^14.0.2",
55
- "mf-styling": "^3.0.1",
56
- "npm-pkgbuild": "^11.8.14",
55
+ "mf-styling": "^3.0.2",
56
+ "npm-pkgbuild": "^11.9.1",
57
57
  "semantic-release": "^21.0.7",
58
58
  "stylelint": "^15.10.1",
59
59
  "stylelint-config-standard": "^34.0.0",
60
60
  "svelte": "^4.0.5",
61
61
  "testcafe": "^3.0.1",
62
- "vite": "^4.4.2"
62
+ "vite": "^4.4.4"
63
63
  },
64
64
  "optionalDependencies": {
65
65
  "mf-hosting-cloudflare": "^1.0.5",
66
- "mf-hosting-frontend": "^1.10.0"
66
+ "mf-hosting-frontend": "^1.11.3"
67
67
  },
68
68
  "repository": {
69
69
  "type": "git",
@@ -147,8 +147,18 @@ export class Pagination {
147
147
  */
148
148
  get pageNavigationElement() {
149
149
  const nav = document.createElement("nav");
150
+ nav.setAttribute("tabindex", "0");
150
151
  nav.setAttribute("aria-label", "pagination");
151
152
 
153
+ nav.onkeyup = event => {
154
+ switch(event.key) {
155
+ case 'ArrowLeft': this.page = this.page - 1;
156
+ break;
157
+ case 'ArrowRight': this.page = this.page + 1;
158
+ break;
159
+ }
160
+ };
161
+
152
162
  this.subscribe(pg => {
153
163
  const items = [];
154
164
  const np = this.numberOfPages;