@forsakringskassan/devindex-menu 2.3.20 → 2.3.21

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/cjs/menu.js CHANGED
@@ -1127,23 +1127,25 @@ var ElementIdServiceImpl = class {
1127
1127
  }
1128
1128
  };
1129
1129
  var ElementIdService = /* @__PURE__ */ new ElementIdServiceImpl();
1130
- var wrapper;
1130
+ var wrapperId = "fkui-alert-screen-reader";
1131
1131
  function createScreenReaderWrapper(options) {
1132
- if (getWrapper()) {
1133
- return;
1132
+ if (!findWrapper()) {
1133
+ createWrapper(options);
1134
1134
  }
1135
- wrapper = document.createElement("div");
1136
- wrapper.id = "fkui-alert-screen-reader";
1137
- wrapper.className = "sr-only";
1138
- updateProperties(options);
1139
- document.body.append(wrapper);
1140
1135
  }
1141
- function updateProperties(options) {
1142
- const wrapper2 = getWrapper();
1136
+ function updateProperties(wrapper, options) {
1143
1137
  const ariaLive = options.assertive ? "assertive" : "polite";
1144
- wrapper2.setAttribute("aria-live", ariaLive);
1138
+ wrapper.setAttribute("aria-live", ariaLive);
1145
1139
  }
1146
- function getWrapper() {
1140
+ function findWrapper() {
1141
+ return document.querySelector(`#${wrapperId}`);
1142
+ }
1143
+ function createWrapper(options) {
1144
+ const wrapper = document.createElement("div");
1145
+ wrapper.id = wrapperId;
1146
+ wrapper.className = "sr-only";
1147
+ updateProperties(wrapper, options);
1148
+ document.body.append(wrapper);
1147
1149
  return wrapper;
1148
1150
  }
1149
1151
  if (typeof document !== "undefined") {
package/dist/esm/menu.js CHANGED
@@ -1102,23 +1102,25 @@ var ElementIdServiceImpl = class {
1102
1102
  }
1103
1103
  };
1104
1104
  var ElementIdService = /* @__PURE__ */ new ElementIdServiceImpl();
1105
- var wrapper;
1105
+ var wrapperId = "fkui-alert-screen-reader";
1106
1106
  function createScreenReaderWrapper(options) {
1107
- if (getWrapper()) {
1108
- return;
1107
+ if (!findWrapper()) {
1108
+ createWrapper(options);
1109
1109
  }
1110
- wrapper = document.createElement("div");
1111
- wrapper.id = "fkui-alert-screen-reader";
1112
- wrapper.className = "sr-only";
1113
- updateProperties(options);
1114
- document.body.append(wrapper);
1115
1110
  }
1116
- function updateProperties(options) {
1117
- const wrapper2 = getWrapper();
1111
+ function updateProperties(wrapper, options) {
1118
1112
  const ariaLive = options.assertive ? "assertive" : "polite";
1119
- wrapper2.setAttribute("aria-live", ariaLive);
1113
+ wrapper.setAttribute("aria-live", ariaLive);
1120
1114
  }
1121
- function getWrapper() {
1115
+ function findWrapper() {
1116
+ return document.querySelector(`#${wrapperId}`);
1117
+ }
1118
+ function createWrapper(options) {
1119
+ const wrapper = document.createElement("div");
1120
+ wrapper.id = wrapperId;
1121
+ wrapper.className = "sr-only";
1122
+ updateProperties(wrapper, options);
1123
+ document.body.append(wrapper);
1122
1124
  return wrapper;
1123
1125
  }
1124
1126
  if (typeof document !== "undefined") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/devindex-menu",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "description": "Menu for local development",
5
5
  "keywords": [
6
6
  "development",
@@ -59,17 +59,17 @@
59
59
  "extends": "@forsakringskassan/semantic-release-config"
60
60
  },
61
61
  "dependencies": {
62
- "@fkui/logic": "6.65.1"
62
+ "@fkui/logic": "6.66.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@babel/core": "8.1.2",
65
+ "@babel/core": "8.1.3",
66
66
  "@babel/preset-env": "8.0.7",
67
- "@fkui/tsconfig": "6.65.0",
67
+ "@fkui/tsconfig": "6.66.0",
68
68
  "@forsakringskassan/apimock-express": "4.4.0",
69
69
  "@forsakringskassan/commitlint-config": "4.2.8",
70
- "@forsakringskassan/eslint-config": "15.13.18",
70
+ "@forsakringskassan/eslint-config": "15.13.20",
71
71
  "@forsakringskassan/eslint-config-cli": "15.13.6",
72
- "@forsakringskassan/eslint-config-cypress": "15.13.16",
72
+ "@forsakringskassan/eslint-config-cypress": "15.13.22",
73
73
  "@forsakringskassan/eslint-config-jest": "15.13.17",
74
74
  "@forsakringskassan/eslint-config-typescript": "15.13.15",
75
75
  "@forsakringskassan/eslint-config-typescript-typeinfo": "15.13.15",
@@ -82,7 +82,7 @@
82
82
  "dts-bundle-generator": "10.0.0",
83
83
  "esbuild": "0.28.2",
84
84
  "esbuild-sass-plugin": "3.7.0",
85
- "npm-pkg-lint": "5.4.2",
85
+ "npm-pkg-lint": "5.5.0",
86
86
  "sass": "1.108.2",
87
87
  "typescript": "npm:@typescript/typescript6@6.0.2"
88
88
  },