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

@contentful/f36-utils

Package Overview
Dependencies
Maintainers
105
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-utils - npm Package Compare versions

Comparing version 4.0.1-next-v4-8971.2401 to 4.0.1-next-v4-8986.2402

2

dist/main.js

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

var e=require("react"),r=d(e),{useEffect:t,useRef:n,useState:u,useCallback:c}=e,{createPortal:o}=require("react-dom"),a=d(require("@babel/runtime/helpers/extends")),{cx:l,css:i}=require("emotion");function s(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}function d(e){return e&&e.__esModule?e.default:e}var f={};function m({children:e,container:r}){const u=n(r),c=n(document.createElement("div"));return t((()=>{u.current||(u.current=document.body);const e=c.current;return e.setAttribute("data-cf-ui-portal",""),u.current.appendChild(e),()=>{u.current&&u.current.removeChild(e)}}),[]),c.current?o(e,c.current):null}function p({className:e,children:t,...n}){return r.createElement("span",a({tabIndex:-1,className:l(i({name:"t8ljbi",styles:"display:inherit;outline:0;"}),e)},n),t)}s(f,"Portal",(()=>m)),s(f,"TabFocusTrap",(()=>p)),s(f,"useArrowKeyNavigation",(()=>h));const b={vertical:{prev:"ArrowUp",next:"ArrowDown"},horizontal:{prev:"ArrowLeft",next:"ArrowRight"}},h=({itemsContainerRef:e,itemsSelector:r,keyType:t="vertical"})=>{const[n,o]=u(0),a=c((u=>{const c=e.current;if(!c)return;const a=c.querySelectorAll(r);if(0===a.length)return;const l=a.length-1,i={[b[t].next]:()=>{o(n===l?0:n+1)},[b[t].prev]:()=>{o(0===n?l:n-1)}}[u.key];i&&(u.preventDefault(),i())}),[n,r,e,t]);return{focusedIndex:n,handleArrowsKeyDown:a}};var v,y;v=module.exports,y=f,Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(v,e,{enumerable:!0,get:function(){return y[e]}})}));
var e=require("react"),r=d(e),{useRef:t,useEffect:n,useCallback:u,useState:c}=e,{createPortal:o}=require("react-dom"),a=d(require("@babel/runtime/helpers/extends")),{cx:l,css:i}=require("emotion");function s(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}function d(e){return e&&e.__esModule?e.default:e}var f={};function m({children:e,container:r}){const u=t(r),c=t(document.createElement("div"));return n((()=>{u.current||(u.current=document.body);const e=c.current;return e.setAttribute("data-cf-ui-portal",""),u.current.appendChild(e),()=>{u.current&&u.current.removeChild(e)}}),[]),c.current?o(e,c.current):null}function p({className:e,children:t,...n}){return r.createElement("span",a({tabIndex:-1,className:l(i({name:"t8ljbi",styles:"display:inherit;outline:0;"}),e)},n),t)}s(f,"Portal",(()=>m)),s(f,"TabFocusTrap",(()=>p)),s(f,"useArrowKeyNavigation",(()=>h));const b={vertical:{prev:"ArrowUp",next:"ArrowDown"},horizontal:{prev:"ArrowLeft",next:"ArrowRight"}},h=({itemsContainerRef:e,itemsSelector:r,keyType:t="vertical"})=>{const[n,o]=c(0),a=u((u=>{const c=e.current;if(!c)return;const a=c.querySelectorAll(r);if(0===a.length)return;const l=a.length-1,i={[b[t].next]:()=>{o(n===l?0:n+1)},[b[t].prev]:()=>{o(0===n?l:n-1)}}[u.key];i&&(u.preventDefault(),i())}),[n,r,e,t]);return{focusedIndex:n,handleArrowsKeyDown:a}};var v,y;v=module.exports,y=f,Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(v,e,{enumerable:!0,get:function(){return y[e]}})}));
//# sourceMappingURL=main.js.map

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

import e,{useEffect as r,useRef as t,useCallback as n,useState as o}from"react";import{createPortal as a}from"react-dom";import c from"@babel/runtime/helpers/esm/extends";import{cx as s,css as u}from"emotion";function i(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}var l={};function m({children:e,container:n}){const o=t(n),c=t(document.createElement("div"));return r((()=>{o.current||(o.current=document.body);const e=c.current;return e.setAttribute("data-cf-ui-portal",""),o.current.appendChild(e),()=>{o.current&&o.current.removeChild(e)}}),[]),c.current?a(e,c.current):null}function p({className:r,children:t,...n}){return e.createElement("span",c({tabIndex:-1,className:s(u({name:"t8ljbi",styles:"display:inherit;outline:0;"}),r)},n),t)}i(l,"Portal",(()=>m)),i(l,"TabFocusTrap",(()=>p)),i(l,"useArrowKeyNavigation",(()=>d));const f={vertical:{prev:"ArrowUp",next:"ArrowDown"},horizontal:{prev:"ArrowLeft",next:"ArrowRight"}},d=({itemsContainerRef:e,itemsSelector:r,keyType:t="vertical"})=>{const[a,c]=o(0),s=n((n=>{const o=e.current;if(!o)return;const s=o.querySelectorAll(r);if(0===s.length)return;const u=s.length-1,i={[f[t].next]:()=>{c(a===u?0:a+1)},[f[t].prev]:()=>{c(0===a?u:a-1)}}[n.key];i&&(n.preventDefault(),i())}),[a,r,e,t]);return{focusedIndex:a,handleArrowsKeyDown:s}};export{m as Portal,p as TabFocusTrap,d as useArrowKeyNavigation};
import e,{useEffect as r,useRef as t,useState as n,useCallback as o}from"react";import{createPortal as a}from"react-dom";import c from"@babel/runtime/helpers/esm/extends";import{cx as s,css as u}from"emotion";function i(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}var l={};function m({children:e,container:n}){const o=t(n),c=t(document.createElement("div"));return r((()=>{o.current||(o.current=document.body);const e=c.current;return e.setAttribute("data-cf-ui-portal",""),o.current.appendChild(e),()=>{o.current&&o.current.removeChild(e)}}),[]),c.current?a(e,c.current):null}function p({className:r,children:t,...n}){return e.createElement("span",c({tabIndex:-1,className:s(u({name:"t8ljbi",styles:"display:inherit;outline:0;"}),r)},n),t)}i(l,"Portal",(()=>m)),i(l,"TabFocusTrap",(()=>p)),i(l,"useArrowKeyNavigation",(()=>d));const f={vertical:{prev:"ArrowUp",next:"ArrowDown"},horizontal:{prev:"ArrowLeft",next:"ArrowRight"}},d=({itemsContainerRef:e,itemsSelector:r,keyType:t="vertical"})=>{const[a,c]=n(0),s=o((n=>{const o=e.current;if(!o)return;const s=o.querySelectorAll(r);if(0===s.length)return;const u=s.length-1,i={[f[t].next]:()=>{c(a===u?0:a+1)},[f[t].prev]:()=>{c(0===a?u:a-1)}}[n.key];i&&(n.preventDefault(),i())}),[a,r,e,t]);return{focusedIndex:a,handleArrowsKeyDown:s}};export{m as Portal,p as TabFocusTrap,d as useArrowKeyNavigation};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-utils",
"version": "4.0.1-next-v4-8971.2401+63b50129",
"version": "4.0.1-next-v4-8986.2402+ae40f76b",
"description": "Forma 36: utils React Component",

@@ -34,3 +34,3 @@ "license": "MIT",

},
"gitHead": "63b5012900d2fb3ef5ac8db51ae40b9876e4bd27"
"gitHead": "ae40f76bfdb7cb5ea9d8d861b240c81e4ebdc22e"
}
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