Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@fremtind/jkl-core

Package Overview
Dependencies
Maintainers
3
Versions
179
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 9.1.3 to 9.2.0

build/utils/motion.d.ts

15

build/browser/index.js

@@ -95,2 +95,15 @@ import React from 'react';

const easings = Object.freeze({
standard: "ease",
entrance: "ease-out",
exit: "ease-in",
easeInBounceOut: "cubic-bezier(0, 0, 0.375, 1.17)"
});
const timings = Object.freeze({
energetic: "75ms",
productive: "150ms",
expressive: "250ms",
lazy: "400ms"
});
const Label = ({

@@ -191,2 +204,2 @@ variant = "small",

export { Label, Link, NavLink, ScreenReaderOnly, SupportLabel, breakpoints, getValuePair, initTabListener };
export { Label, Link, NavLink, ScreenReaderOnly, SupportLabel, breakpoints, easings, getValuePair, initTabListener, timings };

2

build/browser/index.min.js

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

import e from"react";import t from"classnames";import l from"@babel/runtime/helpers/extends";let o=!1,n=!1,a=!1;const r={mousedown:function(){if(!o&&!a){o=!0,n=!1;const e=document.querySelector("html");null==e||e.setAttribute("data-mousenavigation","true"),null==e||e.removeAttribute("data-touchnavigation"),s(),c("touchstart"),c("keydown")}},keydown:function(e){if("Tab"===e.key){const e=document.querySelector("html");s(),null==e||e.removeAttribute("data-mousenavigation"),null==e||e.removeAttribute("data-touchnavigation"),o=!1,n=!1,c("touchstart"),c("mousedown")}},touchstart:function(){if(!n){o=!1,n=!0;const e=document.querySelector("html");null==e||e.setAttribute("data-touchnavigation","true"),null==e||e.removeAttribute("data-mousenavigation"),s(),c("touchstart"),c("keydown"),c("mousedown")}a=!0,setTimeout((()=>{a=!1}),150)}};function s(){Object.keys(r).forEach((e=>{document.removeEventListener(e,r[e])}))}function c(e){document.addEventListener(e,r[e])}function u(){"undefined"!=typeof document&&(c("touchstart"),c("mousedown"))}function i(e){return"string"==typeof e?{value:e,label:e}:e}const m={medium:680,large:1200,xl:1600},d=({variant:l="small",forceCompact:o,srOnly:n,children:a,standAlone:r,htmlFor:s,className:c=""})=>{const u=t("jkl-label",c,{[`jkl-label--${l}`]:l,"jkl-label--compact":o,"jkl-label--sr-only":n}),i=r?"label":"span";return!r&&s&&(s=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),e.createElement(i,{className:u,htmlFor:s},a)},p=({external:o=!1,className:n="",children:a,...r})=>e.createElement("a",l({className:t("jkl-link",n,{"jkl-link--external":o})},r),a),h=({active:o=!1,back:n=!1,className:a,children:r,...s})=>e.createElement("a",l({className:t("jkl-nav-link",{"jkl-nav-link--active":o,"jkl-nav-link--back":n},a)},s),r),b=({children:t,showOnFocus:l})=>e.createElement("span",{className:"jkl-sr-only "+(l?"jkl-sr-only--focusable":"")},t),f=({id:o,helpLabel:n,errorLabel:a,forceCompact:r,className:s,srOnly:c,...u})=>{const i=a||n,m=i?t("jkl-form-support-label",s,{"jkl-form-support-label--compact":r,"jkl-form-support-label--error":a,"jkl-form-support-label--help":!a,"jkl-form-support-label--sr-only":c}):"jkl-dormant-form-support-label",d=i?u:{};return e.createElement("span",l({id:o,className:m},d),e.createElement("svg",{className:"jkl-form-support-label__icon","aria-hidden":!0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3588 20.5107L5.64157 20.5107C3.33259 20.5107 1.88917 18.0116 3.04301 16.0116L9.40163 4.98996C10.5561 2.98885 13.4443 2.98885 14.5987 4.98996L20.9574 16.0116C22.1112 18.0116 20.6678 20.5107 18.3588 20.5107ZM12.7515 13.6525L12.7515 7.63131L11.9988 7.63131L11.2462 7.63131L11.2462 13.6525L12.7515 13.6525ZM12.0012 15.0458C11.441 15.0458 10.9868 15.5 10.9868 16.0602C10.9868 16.6205 11.441 17.0747 12.0012 17.0747C12.5615 17.0747 13.0157 16.6205 13.0157 16.0602C13.0157 15.5 12.5615 15.0458 12.0012 15.0458Z",fill:"currentColor"})),a||n)};export{d as Label,p as Link,h as NavLink,b as ScreenReaderOnly,f as SupportLabel,m as breakpoints,i as getValuePair,u as initTabListener};
import e from"react";import t from"classnames";import n from"@babel/runtime/helpers/extends";let l=!1,o=!1,a=!1;const r={mousedown:function(){if(!l&&!a){l=!0,o=!1;const e=document.querySelector("html");null==e||e.setAttribute("data-mousenavigation","true"),null==e||e.removeAttribute("data-touchnavigation"),s(),c("touchstart"),c("keydown")}},keydown:function(e){if("Tab"===e.key){const e=document.querySelector("html");s(),null==e||e.removeAttribute("data-mousenavigation"),null==e||e.removeAttribute("data-touchnavigation"),l=!1,o=!1,c("touchstart"),c("mousedown")}},touchstart:function(){if(!o){l=!1,o=!0;const e=document.querySelector("html");null==e||e.setAttribute("data-touchnavigation","true"),null==e||e.removeAttribute("data-mousenavigation"),s(),c("touchstart"),c("keydown"),c("mousedown")}a=!0,setTimeout((()=>{a=!1}),150)}};function s(){Object.keys(r).forEach((e=>{document.removeEventListener(e,r[e])}))}function c(e){document.addEventListener(e,r[e])}function i(){"undefined"!=typeof document&&(c("touchstart"),c("mousedown"))}function u(e){return"string"==typeof e?{value:e,label:e}:e}const m={medium:680,large:1200,xl:1600},d=Object.freeze({standard:"ease",entrance:"ease-out",exit:"ease-in",easeInBounceOut:"cubic-bezier(0, 0, 0.375, 1.17)"}),p=Object.freeze({energetic:"75ms",productive:"150ms",expressive:"250ms",lazy:"400ms"}),b=({variant:n="small",forceCompact:l,srOnly:o,children:a,standAlone:r,htmlFor:s,className:c=""})=>{const i=t("jkl-label",c,{[`jkl-label--${n}`]:n,"jkl-label--compact":l,"jkl-label--sr-only":o}),u=r?"label":"span";return!r&&s&&(s=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),e.createElement(u,{className:i,htmlFor:s},a)},f=({external:l=!1,className:o="",children:a,...r})=>e.createElement("a",n({className:t("jkl-link",o,{"jkl-link--external":l})},r),a),h=({active:l=!1,back:o=!1,className:a,children:r,...s})=>e.createElement("a",n({className:t("jkl-nav-link",{"jkl-nav-link--active":l,"jkl-nav-link--back":o},a)},s),r),k=({children:t,showOnFocus:n})=>e.createElement("span",{className:"jkl-sr-only "+(n?"jkl-sr-only--focusable":"")},t),v=({id:l,helpLabel:o,errorLabel:a,forceCompact:r,className:s,srOnly:c,...i})=>{const u=a||o,m=u?t("jkl-form-support-label",s,{"jkl-form-support-label--compact":r,"jkl-form-support-label--error":a,"jkl-form-support-label--help":!a,"jkl-form-support-label--sr-only":c}):"jkl-dormant-form-support-label",d=u?i:{};return e.createElement("span",n({id:l,className:m},d),e.createElement("svg",{className:"jkl-form-support-label__icon","aria-hidden":!0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3588 20.5107L5.64157 20.5107C3.33259 20.5107 1.88917 18.0116 3.04301 16.0116L9.40163 4.98996C10.5561 2.98885 13.4443 2.98885 14.5987 4.98996L20.9574 16.0116C22.1112 18.0116 20.6678 20.5107 18.3588 20.5107ZM12.7515 13.6525L12.7515 7.63131L11.9988 7.63131L11.2462 7.63131L11.2462 13.6525L12.7515 13.6525ZM12.0012 15.0458C11.441 15.0458 10.9868 15.5 10.9868 16.0602C10.9868 16.6205 11.441 17.0747 12.0012 17.0747C12.5615 17.0747 13.0157 16.6205 13.0157 16.0602C13.0157 15.5 12.5615 15.0458 12.0012 15.0458Z",fill:"currentColor"})),a||o)};export{b as Label,f as Link,h as NavLink,k as ScreenReaderOnly,v as SupportLabel,m as breakpoints,d as easings,u as getValuePair,i as initTabListener,p as timings};

@@ -105,2 +105,15 @@ 'use strict';

const easings = Object.freeze({
standard: "ease",
entrance: "ease-out",
exit: "ease-in",
easeInBounceOut: "cubic-bezier(0, 0, 0.375, 1.17)"
});
const timings = Object.freeze({
energetic: "75ms",
productive: "150ms",
expressive: "250ms",
lazy: "400ms"
});
const Label = ({

@@ -207,3 +220,5 @@ variant = "small",

exports.breakpoints = breakpoints;
exports.easings = easings;
exports.getValuePair = getValuePair;
exports.initTabListener = initTabListener;
exports.timings = timings;

@@ -95,2 +95,15 @@ import React from 'react';

const easings = Object.freeze({
standard: "ease",
entrance: "ease-out",
exit: "ease-in",
easeInBounceOut: "cubic-bezier(0, 0, 0.375, 1.17)"
});
const timings = Object.freeze({
energetic: "75ms",
productive: "150ms",
expressive: "250ms",
lazy: "400ms"
});
const Label = ({

@@ -191,2 +204,2 @@ variant = "small",

export { Label, Link, NavLink, ScreenReaderOnly, SupportLabel, breakpoints, getValuePair, initTabListener };
export { Label, Link, NavLink, ScreenReaderOnly, SupportLabel, breakpoints, easings, getValuePair, initTabListener, timings };

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

import e from"react";import t from"classnames";import l from"@babel/runtime/helpers/extends";let o=!1,n=!1,a=!1;const r={mousedown:function(){if(!o&&!a){o=!0,n=!1;const e=document.querySelector("html");null==e||e.setAttribute("data-mousenavigation","true"),null==e||e.removeAttribute("data-touchnavigation"),s(),c("touchstart"),c("keydown")}},keydown:function(e){if("Tab"===e.key){const e=document.querySelector("html");s(),null==e||e.removeAttribute("data-mousenavigation"),null==e||e.removeAttribute("data-touchnavigation"),o=!1,n=!1,c("touchstart"),c("mousedown")}},touchstart:function(){if(!n){o=!1,n=!0;const e=document.querySelector("html");null==e||e.setAttribute("data-touchnavigation","true"),null==e||e.removeAttribute("data-mousenavigation"),s(),c("touchstart"),c("keydown"),c("mousedown")}a=!0,setTimeout((()=>{a=!1}),150)}};function s(){Object.keys(r).forEach((e=>{document.removeEventListener(e,r[e])}))}function c(e){document.addEventListener(e,r[e])}function u(){"undefined"!=typeof document&&(c("touchstart"),c("mousedown"))}function i(e){return"string"==typeof e?{value:e,label:e}:e}const m={medium:680,large:1200,xl:1600},d=({variant:l="small",forceCompact:o,srOnly:n,children:a,standAlone:r,htmlFor:s,className:c=""})=>{const u=t("jkl-label",c,{[`jkl-label--${l}`]:l,"jkl-label--compact":o,"jkl-label--sr-only":n}),i=r?"label":"span";return!r&&s&&(s=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),e.createElement(i,{className:u,htmlFor:s},a)},p=({external:o=!1,className:n="",children:a,...r})=>e.createElement("a",l({className:t("jkl-link",n,{"jkl-link--external":o})},r),a),h=({active:o=!1,back:n=!1,className:a,children:r,...s})=>e.createElement("a",l({className:t("jkl-nav-link",{"jkl-nav-link--active":o,"jkl-nav-link--back":n},a)},s),r),b=({children:t,showOnFocus:l})=>e.createElement("span",{className:"jkl-sr-only "+(l?"jkl-sr-only--focusable":"")},t),f=({id:o,helpLabel:n,errorLabel:a,forceCompact:r,className:s,srOnly:c,...u})=>{const i=a||n,m=i?t("jkl-form-support-label",s,{"jkl-form-support-label--compact":r,"jkl-form-support-label--error":a,"jkl-form-support-label--help":!a,"jkl-form-support-label--sr-only":c}):"jkl-dormant-form-support-label",d=i?u:{};return e.createElement("span",l({id:o,className:m},d),e.createElement("svg",{className:"jkl-form-support-label__icon","aria-hidden":!0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3588 20.5107L5.64157 20.5107C3.33259 20.5107 1.88917 18.0116 3.04301 16.0116L9.40163 4.98996C10.5561 2.98885 13.4443 2.98885 14.5987 4.98996L20.9574 16.0116C22.1112 18.0116 20.6678 20.5107 18.3588 20.5107ZM12.7515 13.6525L12.7515 7.63131L11.9988 7.63131L11.2462 7.63131L11.2462 13.6525L12.7515 13.6525ZM12.0012 15.0458C11.441 15.0458 10.9868 15.5 10.9868 16.0602C10.9868 16.6205 11.441 17.0747 12.0012 17.0747C12.5615 17.0747 13.0157 16.6205 13.0157 16.0602C13.0157 15.5 12.5615 15.0458 12.0012 15.0458Z",fill:"currentColor"})),a||n)};export{d as Label,p as Link,h as NavLink,b as ScreenReaderOnly,f as SupportLabel,m as breakpoints,i as getValuePair,u as initTabListener};
import e from"react";import t from"classnames";import n from"@babel/runtime/helpers/extends";let l=!1,o=!1,a=!1;const r={mousedown:function(){if(!l&&!a){l=!0,o=!1;const e=document.querySelector("html");null==e||e.setAttribute("data-mousenavigation","true"),null==e||e.removeAttribute("data-touchnavigation"),s(),c("touchstart"),c("keydown")}},keydown:function(e){if("Tab"===e.key){const e=document.querySelector("html");s(),null==e||e.removeAttribute("data-mousenavigation"),null==e||e.removeAttribute("data-touchnavigation"),l=!1,o=!1,c("touchstart"),c("mousedown")}},touchstart:function(){if(!o){l=!1,o=!0;const e=document.querySelector("html");null==e||e.setAttribute("data-touchnavigation","true"),null==e||e.removeAttribute("data-mousenavigation"),s(),c("touchstart"),c("keydown"),c("mousedown")}a=!0,setTimeout((()=>{a=!1}),150)}};function s(){Object.keys(r).forEach((e=>{document.removeEventListener(e,r[e])}))}function c(e){document.addEventListener(e,r[e])}function i(){"undefined"!=typeof document&&(c("touchstart"),c("mousedown"))}function u(e){return"string"==typeof e?{value:e,label:e}:e}const m={medium:680,large:1200,xl:1600},d=Object.freeze({standard:"ease",entrance:"ease-out",exit:"ease-in",easeInBounceOut:"cubic-bezier(0, 0, 0.375, 1.17)"}),p=Object.freeze({energetic:"75ms",productive:"150ms",expressive:"250ms",lazy:"400ms"}),b=({variant:n="small",forceCompact:l,srOnly:o,children:a,standAlone:r,htmlFor:s,className:c=""})=>{const i=t("jkl-label",c,{[`jkl-label--${n}`]:n,"jkl-label--compact":l,"jkl-label--sr-only":o}),u=r?"label":"span";return!r&&s&&(s=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),e.createElement(u,{className:i,htmlFor:s},a)},f=({external:l=!1,className:o="",children:a,...r})=>e.createElement("a",n({className:t("jkl-link",o,{"jkl-link--external":l})},r),a),h=({active:l=!1,back:o=!1,className:a,children:r,...s})=>e.createElement("a",n({className:t("jkl-nav-link",{"jkl-nav-link--active":l,"jkl-nav-link--back":o},a)},s),r),k=({children:t,showOnFocus:n})=>e.createElement("span",{className:"jkl-sr-only "+(n?"jkl-sr-only--focusable":"")},t),v=({id:l,helpLabel:o,errorLabel:a,forceCompact:r,className:s,srOnly:c,...i})=>{const u=a||o,m=u?t("jkl-form-support-label",s,{"jkl-form-support-label--compact":r,"jkl-form-support-label--error":a,"jkl-form-support-label--help":!a,"jkl-form-support-label--sr-only":c}):"jkl-dormant-form-support-label",d=u?i:{};return e.createElement("span",n({id:l,className:m},d),e.createElement("svg",{className:"jkl-form-support-label__icon","aria-hidden":!0,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3588 20.5107L5.64157 20.5107C3.33259 20.5107 1.88917 18.0116 3.04301 16.0116L9.40163 4.98996C10.5561 2.98885 13.4443 2.98885 14.5987 4.98996L20.9574 16.0116C22.1112 18.0116 20.6678 20.5107 18.3588 20.5107ZM12.7515 13.6525L12.7515 7.63131L11.9988 7.63131L11.2462 7.63131L11.2462 13.6525L12.7515 13.6525ZM12.0012 15.0458C11.441 15.0458 10.9868 15.5 10.9868 16.0602C10.9868 16.6205 11.441 17.0747 12.0012 17.0747C12.5615 17.0747 13.0157 16.6205 13.0157 16.0602C13.0157 15.5 12.5615 15.0458 12.0012 15.0458Z",fill:"currentColor"})),a||o)};export{b as Label,f as Link,h as NavLink,k as ScreenReaderOnly,v as SupportLabel,m as breakpoints,d as easings,u as getValuePair,i as initTabListener,p as timings};

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

export { initTabListener, getValuePair, breakpoints } from "./utils";
export type { Easing, Timing } from "./utils";
export { initTabListener, getValuePair, breakpoints, timings, easings } from "./utils";
export type { LabelProps, LinkProps, NavLinkProps, ScreenReaderOnlyProps, SupportLabelProps } from "./components";

@@ -3,0 +4,0 @@ export { Label, Link, NavLink, ScreenReaderOnly, SupportLabel } from "./components";

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

export declare type Breakpoint = keyof typeof breakpoints;
export declare const breakpoints: {

@@ -2,0 +3,0 @@ medium: number;

export { initTabListener } from "./tabListener";
export { getValuePair } from "./getValuePair";
export { breakpoints } from "./breakpoints";
export type { Timing, Easing } from "./motion";
export { timings, easings } from "./motion";
{
"name": "@fremtind/jkl-core",
"version": "9.1.3",
"version": "9.2.0",
"publishConfig": {

@@ -61,3 +61,3 @@ "access": "public"

},
"gitHead": "64910cc8c1162494ee6a3be7fb2588001cc07647"
"gitHead": "ca9663f45dabda589666cc0b11143fbb32d6745d"
}

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