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

@contentful/f36-inputs

Package Overview
Dependencies
Maintainers
100
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-inputs - npm Package Compare versions

Comparing version 4.0.1-next-v4-4759.2074 to 4.0.1-next-v4-4835.2083

2

dist/main.js

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

var e=g(require("@babel/runtime/helpers/extends")),{cx:o,css:t}=require("emotion"),r=require("react"),n=g(r),{useCallback:i,useRef:l,useEffect:a}=r,{Minus:c,Done:s}=require("@contentful/f36-icons"),{Box:d}=require("@contentful/f36-core"),u=g(require("@contentful/f36-tokens"));function b(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}function h(e,o,t,r){Object.defineProperty(e,o,{get:t,set:r,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}var f={},m={};h(m,"ControlledInput",(()=>x));const p={container:t({position:"relative",textOverflow:"ellipsis",lineHeight:u.lineHeightL,margin:"0",width:u.spacingM,height:u.spacingM,minHeight:u.spacingM,overflow:"visible"},""),input:t({display:"inline-block",fontSize:u.fontSizeM,opacity:"0",position:"absolute",margin:"0",width:u.spacingM,height:u.spacingM,zIndex:u.zIndexDefault,cursor:"pointer","&:focus + label":{outline:"none",border:`2px solid ${u.colorPrimary}`,boxShadow:u.glowPrimary},"&:checked + label":{borderColor:u.colorBlueMid,background:u.colorBlueMid},"&:disabled + label":{borderColor:u.colorElementDark,background:u.colorElementDark}},""),inputDisabled:t({name:"vdhlfv",styles:"cursor:not-allowed;"}),inputRadioButton:t({"&:checked":{"& + label::before":{background:u.colorWhite},"&:disabled + label::before":{background:u.colorTextLightest}},"&:disabled + label::before":{background:u.colorElementDarkest}},""),inputCheckbox:t({"&:checked, &:indeterminate":{"& + label":{borderColor:u.colorBlueMid,background:u.colorBlueMid},"&:disabled + label svg":{fill:u.colorTextLightest}},"&:disabled":{"& + label":{borderColor:u.colorElementDark,background:u.colorElementDark,"& svg":{fill:u.colorElementDark}}}},""),ghost:t({background:u.colorWhite,width:u.spacingM,height:u.spacingM,border:`2px solid ${u.colorElementDark}`,fill:u.colorWhite,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},""),ghostRadioButton:t({borderRadius:"50%","&:before":{content:'""',borderRadius:"50%",backgroundColor:u.colorWhite,width:u.borderRadiusMedium,height:u.borderRadiusMedium}},""),ghostCheckbox:t({borderRadius:"20%",svg:{width:u.spacingS,minWidth:u.spacingS,minHeight:u.spacingS,height:u.spacingS}},"")},k=({isChecked:t,className:r,isDisabled:u=!1,id:b,label:h,name:g,onBlur:f,onChange:m,onFocus:k,isRequired:x=!1,testId:v="cf-ui-controlled-input",type:E="checkbox",value:y,canBlurOnEsc:M=!0,isIndeterminate:C,inputProps:w,labelProps:R,...B},D)=>{const I=l(null),q=o(p.input,{[p.inputRadioButton]:"radio"===E,[p.inputCheckbox]:"checkbox"===E,[p.inputDisabled]:u},null==w?void 0:w.className),S=o(p.container,r),N=o(p.ghost,{[p.ghostRadioButton]:"radio"===E,[p.ghostCheckbox]:"checkbox"===E},null==R?void 0:R.className),z=i((e=>{e.persist(),"Escape"===e.nativeEvent.code&&M&&e.currentTarget.blur()}),[M]);a((()=>{I.current.indeterminate=C}),[C]);const P={size:"medium",variant:u?"secondary":"white"};return n.createElement(d,e({as:"div",display:"inline-block",ref:D,testId:v},B,{className:S}),n.createElement("input",e({},w,{className:q,value:y,name:g,checked:t,type:E,ref:I,onChange:e=>{m&&m(e)},onBlur:e=>{f&&f(e)},onFocus:e=>{k&&k(e)},"aria-label":h,id:b,required:x,disabled:u,onKeyDown:z})),"radio"===E?n.createElement("label",e({},R,{className:N,htmlFor:b}),n.createElement("span",null)):n.createElement("label",e({},R,{className:N,htmlFor:b}),C?n.createElement(c,P):n.createElement(s,P)))},x=n.forwardRef(k);var v={};h(v,"Checkbox",(()=>y));const E=({testId:o="cf-ui-checkbox",...t},r)=>n.createElement(x,e({testId:o,type:"checkbox",ref:r},t)),y=n.forwardRef(E);var M={};h(M,"RadioButton",(()=>w));const C=({testId:o="cf-ui-radio-button",...t},r)=>n.createElement(x,e({testId:o,type:"radio",ref:r},t)),w=n.forwardRef(C);b(f,m),b(f,v),b(f,M),b(module.exports,f);
var e=g(require("@babel/runtime/helpers/extends")),{cx:o,css:t}=require("emotion"),r=require("react"),n=g(r),{useEffect:i,useRef:l,useCallback:a}=r,{Minus:c,Done:s}=require("@contentful/f36-icons"),{Box:d}=require("@contentful/f36-core"),u=g(require("@contentful/f36-tokens"));function b(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}function h(e,o,t,r){Object.defineProperty(e,o,{get:t,set:r,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}var f={},m={};h(m,"ControlledInput",(()=>x));const p={container:t({position:"relative",textOverflow:"ellipsis",lineHeight:u.lineHeightL,margin:"0",width:u.spacingM,height:u.spacingM,minHeight:u.spacingM,overflow:"visible"},""),input:t({display:"inline-block",fontSize:u.fontSizeM,opacity:"0",position:"absolute",margin:"0",width:u.spacingM,height:u.spacingM,zIndex:u.zIndexDefault,cursor:"pointer","&:focus + label":{outline:"none",border:`2px solid ${u.colorPrimary}`,boxShadow:u.glowPrimary},"&:checked + label":{borderColor:u.colorBlueMid,background:u.colorBlueMid},"&:disabled + label":{borderColor:u.colorElementDark,background:u.colorElementDark}},""),inputDisabled:t({name:"vdhlfv",styles:"cursor:not-allowed;"}),inputRadioButton:t({"&:checked":{"& + label::before":{background:u.colorWhite},"&:disabled + label::before":{background:u.colorTextLightest}},"&:disabled + label::before":{background:u.colorElementDarkest}},""),inputCheckbox:t({"&:checked, &:indeterminate":{"& + label":{borderColor:u.colorBlueMid,background:u.colorBlueMid},"&:disabled + label svg":{fill:u.colorTextLightest}},"&:disabled":{"& + label":{borderColor:u.colorElementDark,background:u.colorElementDark,"& svg":{fill:u.colorElementDark}}}},""),ghost:t({background:u.colorWhite,width:u.spacingM,height:u.spacingM,border:`2px solid ${u.colorElementDark}`,fill:u.colorWhite,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},""),ghostRadioButton:t({borderRadius:"50%","&:before":{content:'""',borderRadius:"50%",backgroundColor:u.colorWhite,width:u.borderRadiusMedium,height:u.borderRadiusMedium}},""),ghostCheckbox:t({borderRadius:"20%",svg:{width:u.spacingS,minWidth:u.spacingS,minHeight:u.spacingS,height:u.spacingS}},"")},k=({isChecked:t,className:r,isDisabled:u=!1,id:b,label:h,name:g,onBlur:f,onChange:m,onFocus:k,isRequired:x=!1,testId:v="cf-ui-controlled-input",type:E="checkbox",value:y,canBlurOnEsc:M=!0,isIndeterminate:C,inputProps:w,labelProps:R,...B},D)=>{const I=l(null),q=o(p.input,{[p.inputRadioButton]:"radio"===E,[p.inputCheckbox]:"checkbox"===E,[p.inputDisabled]:u},null==w?void 0:w.className),S=o(p.container,r),N=o(p.ghost,{[p.ghostRadioButton]:"radio"===E,[p.ghostCheckbox]:"checkbox"===E},null==R?void 0:R.className),z=a((e=>{e.persist(),"Escape"===e.nativeEvent.code&&M&&e.currentTarget.blur()}),[M]);i((()=>{I.current.indeterminate=C}),[C]);const P={size:"medium",variant:u?"secondary":"white"};return n.createElement(d,e({as:"div",display:"inline-block",ref:D,testId:v},B,{className:S}),n.createElement("input",e({},w,{className:q,value:y,name:g,checked:t,type:E,ref:I,onChange:e=>{m&&m(e)},onBlur:e=>{f&&f(e)},onFocus:e=>{k&&k(e)},"aria-label":h,id:b,required:x,disabled:u,onKeyDown:z})),"radio"===E?n.createElement("label",e({},R,{className:N,htmlFor:b}),n.createElement("span",null)):n.createElement("label",e({},R,{className:N,htmlFor:b}),C?n.createElement(c,P):n.createElement(s,P)))},x=n.forwardRef(k);var v={};h(v,"Checkbox",(()=>y));const E=({testId:o="cf-ui-checkbox",...t},r)=>n.createElement(x,e({testId:o,type:"checkbox",ref:r},t)),y=n.forwardRef(E);var M={};h(M,"RadioButton",(()=>w));const C=({testId:o="cf-ui-radio-button",...t},r)=>n.createElement(x,e({testId:o,type:"radio",ref:r},t)),w=n.forwardRef(C);b(f,m),b(f,v),b(f,M),b(module.exports,f);
//# sourceMappingURL=main.js.map

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

import e from"@babel/runtime/helpers/esm/extends";import{cx as o,css as t}from"emotion";import r,{useEffect as n,useCallback as i,useRef as l}from"react";import{Minus as a,Done as c}from"@contentful/f36-icons";import{Box as s}from"@contentful/f36-core";import d from"@contentful/f36-tokens";function u(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}function b(e,o,t,r){Object.defineProperty(e,o,{get:t,set:r,enumerable:!0,configurable:!0})}var m={},h={};b(h,"ControlledInput",(()=>g));const f={container:t({position:"relative",textOverflow:"ellipsis",lineHeight:d.lineHeightL,margin:"0",width:d.spacingM,height:d.spacingM,minHeight:d.spacingM,overflow:"visible"},""),input:t({display:"inline-block",fontSize:d.fontSizeM,opacity:"0",position:"absolute",margin:"0",width:d.spacingM,height:d.spacingM,zIndex:d.zIndexDefault,cursor:"pointer","&:focus + label":{outline:"none",border:`2px solid ${d.colorPrimary}`,boxShadow:d.glowPrimary},"&:checked + label":{borderColor:d.colorBlueMid,background:d.colorBlueMid},"&:disabled + label":{borderColor:d.colorElementDark,background:d.colorElementDark}},""),inputDisabled:t({name:"vdhlfv",styles:"cursor:not-allowed;"}),inputRadioButton:t({"&:checked":{"& + label::before":{background:d.colorWhite},"&:disabled + label::before":{background:d.colorTextLightest}},"&:disabled + label::before":{background:d.colorElementDarkest}},""),inputCheckbox:t({"&:checked, &:indeterminate":{"& + label":{borderColor:d.colorBlueMid,background:d.colorBlueMid},"&:disabled + label svg":{fill:d.colorTextLightest}},"&:disabled":{"& + label":{borderColor:d.colorElementDark,background:d.colorElementDark,"& svg":{fill:d.colorElementDark}}}},""),ghost:t({background:d.colorWhite,width:d.spacingM,height:d.spacingM,border:`2px solid ${d.colorElementDark}`,fill:d.colorWhite,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},""),ghostRadioButton:t({borderRadius:"50%","&:before":{content:'""',borderRadius:"50%",backgroundColor:d.colorWhite,width:d.borderRadiusMedium,height:d.borderRadiusMedium}},""),ghostCheckbox:t({borderRadius:"20%",svg:{width:d.spacingS,minWidth:d.spacingS,minHeight:d.spacingS,height:d.spacingS}},"")},p=({isChecked:t,className:d,isDisabled:u=!1,id:b,label:m,name:h,onBlur:p,onChange:g,onFocus:k,isRequired:x=!1,testId:E="cf-ui-controlled-input",type:v="checkbox",value:C,canBlurOnEsc:y=!0,isIndeterminate:M,inputProps:R,labelProps:w,...B},D)=>{const I=l(null),S=o(f.input,{[f.inputRadioButton]:"radio"===v,[f.inputCheckbox]:"checkbox"===v,[f.inputDisabled]:u},null==R?void 0:R.className),N=o(f.container,d),z=o(f.ghost,{[f.ghostRadioButton]:"radio"===v,[f.ghostCheckbox]:"checkbox"===v},null==w?void 0:w.className),P=i((e=>{e.persist(),"Escape"===e.nativeEvent.code&&y&&e.currentTarget.blur()}),[y]);n((()=>{I.current.indeterminate=M}),[M]);const O={size:"medium",variant:u?"secondary":"white"};return r.createElement(s,e({as:"div",display:"inline-block",ref:D,testId:E},B,{className:N}),r.createElement("input",e({},R,{className:S,value:C,name:h,checked:t,type:v,ref:I,onChange:e=>{g&&g(e)},onBlur:e=>{p&&p(e)},onFocus:e=>{k&&k(e)},"aria-label":m,id:b,required:x,disabled:u,onKeyDown:P})),"radio"===v?r.createElement("label",e({},w,{className:z,htmlFor:b}),r.createElement("span",null)):r.createElement("label",e({},w,{className:z,htmlFor:b}),M?r.createElement(a,O):r.createElement(c,O)))},g=r.forwardRef(p);var k={};b(k,"Checkbox",(()=>E));const x=({testId:o="cf-ui-checkbox",...t},n)=>r.createElement(g,e({testId:o,type:"checkbox",ref:n},t)),E=r.forwardRef(x);var v={};b(v,"RadioButton",(()=>y));const C=({testId:o="cf-ui-radio-button",...t},n)=>r.createElement(g,e({testId:o,type:"radio",ref:n},t)),y=r.forwardRef(C);u(m,h),u(m,k),u(m,v);export{g as ControlledInput,E as Checkbox,y as RadioButton};
import e from"@babel/runtime/helpers/esm/extends";import{cx as o,css as t}from"emotion";import r,{useCallback as n,useEffect as i,useRef as l}from"react";import{Minus as a,Done as c}from"@contentful/f36-icons";import{Box as s}from"@contentful/f36-core";import d from"@contentful/f36-tokens";function u(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}function b(e,o,t,r){Object.defineProperty(e,o,{get:t,set:r,enumerable:!0,configurable:!0})}var m={},h={};b(h,"ControlledInput",(()=>g));const f={container:t({position:"relative",textOverflow:"ellipsis",lineHeight:d.lineHeightL,margin:"0",width:d.spacingM,height:d.spacingM,minHeight:d.spacingM,overflow:"visible"},""),input:t({display:"inline-block",fontSize:d.fontSizeM,opacity:"0",position:"absolute",margin:"0",width:d.spacingM,height:d.spacingM,zIndex:d.zIndexDefault,cursor:"pointer","&:focus + label":{outline:"none",border:`2px solid ${d.colorPrimary}`,boxShadow:d.glowPrimary},"&:checked + label":{borderColor:d.colorBlueMid,background:d.colorBlueMid},"&:disabled + label":{borderColor:d.colorElementDark,background:d.colorElementDark}},""),inputDisabled:t({name:"vdhlfv",styles:"cursor:not-allowed;"}),inputRadioButton:t({"&:checked":{"& + label::before":{background:d.colorWhite},"&:disabled + label::before":{background:d.colorTextLightest}},"&:disabled + label::before":{background:d.colorElementDarkest}},""),inputCheckbox:t({"&:checked, &:indeterminate":{"& + label":{borderColor:d.colorBlueMid,background:d.colorBlueMid},"&:disabled + label svg":{fill:d.colorTextLightest}},"&:disabled":{"& + label":{borderColor:d.colorElementDark,background:d.colorElementDark,"& svg":{fill:d.colorElementDark}}}},""),ghost:t({background:d.colorWhite,width:d.spacingM,height:d.spacingM,border:`2px solid ${d.colorElementDark}`,fill:d.colorWhite,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},""),ghostRadioButton:t({borderRadius:"50%","&:before":{content:'""',borderRadius:"50%",backgroundColor:d.colorWhite,width:d.borderRadiusMedium,height:d.borderRadiusMedium}},""),ghostCheckbox:t({borderRadius:"20%",svg:{width:d.spacingS,minWidth:d.spacingS,minHeight:d.spacingS,height:d.spacingS}},"")},p=({isChecked:t,className:d,isDisabled:u=!1,id:b,label:m,name:h,onBlur:p,onChange:g,onFocus:k,isRequired:x=!1,testId:E="cf-ui-controlled-input",type:v="checkbox",value:C,canBlurOnEsc:y=!0,isIndeterminate:M,inputProps:R,labelProps:w,...B},D)=>{const I=l(null),S=o(f.input,{[f.inputRadioButton]:"radio"===v,[f.inputCheckbox]:"checkbox"===v,[f.inputDisabled]:u},null==R?void 0:R.className),N=o(f.container,d),z=o(f.ghost,{[f.ghostRadioButton]:"radio"===v,[f.ghostCheckbox]:"checkbox"===v},null==w?void 0:w.className),P=n((e=>{e.persist(),"Escape"===e.nativeEvent.code&&y&&e.currentTarget.blur()}),[y]);i((()=>{I.current.indeterminate=M}),[M]);const O={size:"medium",variant:u?"secondary":"white"};return r.createElement(s,e({as:"div",display:"inline-block",ref:D,testId:E},B,{className:N}),r.createElement("input",e({},R,{className:S,value:C,name:h,checked:t,type:v,ref:I,onChange:e=>{g&&g(e)},onBlur:e=>{p&&p(e)},onFocus:e=>{k&&k(e)},"aria-label":m,id:b,required:x,disabled:u,onKeyDown:P})),"radio"===v?r.createElement("label",e({},w,{className:z,htmlFor:b}),r.createElement("span",null)):r.createElement("label",e({},w,{className:z,htmlFor:b}),M?r.createElement(a,O):r.createElement(c,O)))},g=r.forwardRef(p);var k={};b(k,"Checkbox",(()=>E));const x=({testId:o="cf-ui-checkbox",...t},n)=>r.createElement(g,e({testId:o,type:"checkbox",ref:n},t)),E=r.forwardRef(x);var v={};b(v,"RadioButton",(()=>y));const C=({testId:o="cf-ui-radio-button",...t},n)=>r.createElement(g,e({testId:o,type:"radio",ref:n},t)),y=r.forwardRef(C);u(m,h),u(m,k),u(m,v);export{g as ControlledInput,E as Checkbox,y as RadioButton};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-inputs",
"version": "4.0.1-next-v4-4759.2074+4129a7dd",
"version": "4.0.1-next-v4-4835.2083+4d9070fe",
"description": "Forma 36: Input React Components",

@@ -25,5 +25,5 @@ "license": "MIT",

"@babel/runtime": "^7.6.2",
"@contentful/f36-core": "4.0.1-next-v4-4759.2074+4129a7dd",
"@contentful/f36-icons": "4.0.1-next-v4-4759.2074+4129a7dd",
"@contentful/f36-tokens": "4.0.1-next-v4-4759.2074+4129a7dd",
"@contentful/f36-core": "4.0.1-next-v4-4835.2083+4d9070fe",
"@contentful/f36-icons": "4.0.1-next-v4-4835.2083+4d9070fe",
"@contentful/f36-tokens": "4.0.1-next-v4-4835.2083+4d9070fe",
"emotion": "^10.0.17"

@@ -37,3 +37,3 @@ },

},
"gitHead": "4129a7dd5a2f38fc7ae3544fb7e4b62916c13a6d"
"gitHead": "4d9070fe32b9ab7ef763e515023398706fc56abe"
}
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