Socket
Socket
Sign inDemoInstall

@fremtind/jkl-core

Package Overview
Dependencies
Maintainers
2
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fremtind/jkl-core - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1-alpha.55

form-support-label.css

24

build/browser/index.js

@@ -1,23 +0,1 @@

import React from 'react';
function useClickOutside(ref, fn) {
function handleClickOutside(event) {
if (ref && ref.current && !ref.current.contains(event.target)) {
fn();
}
}
React.useEffect(function () {
if (ref) {
document.addEventListener("click", handleClickOutside);
}
return function () {
if (ref) {
document.removeEventListener("click", handleClickOutside);
}
};
});
}
var mousenavigation = false;

@@ -53,2 +31,2 @@

export { initTabListener, useClickOutside };
export { initTabListener };

@@ -1,1 +0,1 @@

import e from"react";function t(t,n){function o(e){t&&t.current&&!t.current.contains(e.target)&&n()}e.useEffect(function(){return t&&document.addEventListener("click",o),function(){t&&document.removeEventListener("click",o)}})}var n=!1;function o(){if(!n){n=!0;var e=document.querySelector("html");e&&e.setAttribute("data-mousenavigation","true"),document.removeEventListener("mousedown",o),document.addEventListener("keydown",r)}}function r(e){if("Tab"===e.key&&n){n=!1;var t=document.querySelector("html");t&&t.removeAttribute("data-mousenavigation"),document.removeEventListener("keydown",r),document.addEventListener("mousedown",o)}}function u(){document&&document.addEventListener("mousedown",o)}export{u as initTabListener,t as useClickOutside};
var e=!1;function t(){if(!e){e=!0;var o=document.querySelector("html");o&&o.setAttribute("data-mousenavigation","true"),document.removeEventListener("mousedown",t),document.addEventListener("keydown",n)}}function n(o){if("Tab"===o.key&&e){e=!1;var d=document.querySelector("html");d&&d.removeAttribute("data-mousenavigation"),document.removeEventListener("keydown",n),document.addEventListener("mousedown",t)}}function o(){document&&document.addEventListener("mousedown",t)}export{o as initTabListener};

@@ -5,26 +5,2 @@ 'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = _interopDefault(require('react'));
function useClickOutside(ref, fn) {
function handleClickOutside(event) {
if (ref && ref.current && !ref.current.contains(event.target)) {
fn();
}
}
React.useEffect(function () {
if (ref) {
document.addEventListener("click", handleClickOutside);
}
return function () {
if (ref) {
document.removeEventListener("click", handleClickOutside);
}
};
});
}
var mousenavigation = false;

@@ -61,2 +37,1 @@

exports.initTabListener = initTabListener;
exports.useClickOutside = useClickOutside;

@@ -1,23 +0,1 @@

import React from 'react';
function useClickOutside(ref, fn) {
function handleClickOutside(event) {
if (ref && ref.current && !ref.current.contains(event.target)) {
fn();
}
}
React.useEffect(function () {
if (ref) {
document.addEventListener("click", handleClickOutside);
}
return function () {
if (ref) {
document.removeEventListener("click", handleClickOutside);
}
};
});
}
var mousenavigation = false;

@@ -53,2 +31,2 @@

export { initTabListener, useClickOutside };
export { initTabListener };

@@ -1,1 +0,1 @@

import e from"react";function t(t,n){function o(e){t&&t.current&&!t.current.contains(e.target)&&n()}e.useEffect(function(){return t&&document.addEventListener("click",o),function(){t&&document.removeEventListener("click",o)}})}var n=!1;function o(){if(!n){n=!0;var e=document.querySelector("html");e&&e.setAttribute("data-mousenavigation","true"),document.removeEventListener("mousedown",o),document.addEventListener("keydown",r)}}function r(e){if("Tab"===e.key&&n){n=!1;var t=document.querySelector("html");t&&t.removeAttribute("data-mousenavigation"),document.removeEventListener("keydown",r),document.addEventListener("mousedown",o)}}function u(){document&&document.addEventListener("mousedown",o)}export{u as initTabListener,t as useClickOutside};
var e=!1;function t(){if(!e){e=!0;var o=document.querySelector("html");o&&o.setAttribute("data-mousenavigation","true"),document.removeEventListener("mousedown",t),document.addEventListener("keydown",n)}}function n(o){if("Tab"===o.key&&e){e=!1;var d=document.querySelector("html");d&&d.removeAttribute("data-mousenavigation"),document.removeEventListener("keydown",n),document.addEventListener("mousedown",t)}}function o(){document&&document.addEventListener("mousedown",t)}export{o as initTabListener};

@@ -1,1 +0,1 @@

export { initTabListener, useClickOutside } from "./utils";
export { initTabListener } from "./utils";

@@ -1,3 +0,1 @@

import { useClickOutside } from "./useClickOutside";
import { initTabListener } from "./tabListener";
export { initTabListener, useClickOutside };
export { initTabListener } from "./tabListener";
{
"name": "@fremtind/jkl-core",
"version": "0.8.0",
"version": "0.8.1-alpha.55+b3452c4a",
"publishConfig": {

@@ -34,2 +34,3 @@ "access": "public"

"scripts": {
"clean": "rimraf build/ dist/ .cache node_modules/",
"build": "run-s build:*",

@@ -45,4 +46,3 @@ "build:style": "gulp build",

"devDependencies": {
"@fremtind/browserslist-config-jkl": "^0.3.3",
"npm-run-all": "^4.1.5"
"@fremtind/browserslist-config-jkl": "^0.3.4-alpha.79+b3452c4a"
},

@@ -59,3 +59,3 @@ "repository": {

],
"gitHead": "adb4778c0af82b61c39a560601d4a98fbe27fe3b"
"gitHead": "b3452c4ac9b73bdd89f0b44338a3091eac33ca2a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc