@kth/style 0.10.0 → 0.10.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.
package/dist/cjs/index.js CHANGED
@@ -13,6 +13,11 @@ function closeAllDialogs() {
13
13
  function addEventListeners(dialog, previousDialog) {
14
14
  const closeButton = dialog.querySelector(".kth-icon-button.close");
15
15
  const backButton = dialog.querySelector(".kth-button.back");
16
+ dialog.addEventListener("click", (e) => {
17
+ if (e.target === dialog) {
18
+ closeAllDialogs();
19
+ }
20
+ });
16
21
  dialog.addEventListener("keydown", (e) => {
17
22
  if (e.key === "Escape") {
18
23
  dialog.close();
package/dist/esm/index.js CHANGED
@@ -11,6 +11,11 @@ function closeAllDialogs() {
11
11
  function addEventListeners(dialog, previousDialog) {
12
12
  const closeButton = dialog.querySelector(".kth-icon-button.close");
13
13
  const backButton = dialog.querySelector(".kth-button.back");
14
+ dialog.addEventListener("click", (e) => {
15
+ if (e.target === dialog) {
16
+ closeAllDialogs();
17
+ }
18
+ });
14
19
  dialog.addEventListener("keydown", (e) => {
15
20
  if (e.key === "Escape") {
16
21
  dialog.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kth/style",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {