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

@contentful/f36-inputs

Package Overview
Dependencies
Maintainers
104
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-5052.2088 to 4.0.1-next-v4-5106.2090

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),{useEffect:i,useCallback:l,useRef:a}=r,{Done:c,Minus: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=a(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=l((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(s,P):n.createElement(c,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),{useRef:i,useEffect: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=i(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]);l((()=>{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

@@ -19,4 +19,4 @@ import React, { EventHandler, ChangeEvent, FocusEvent } from "react";

isIndeterminate?: boolean;
inputProps?: Partial<React.InputHTMLAttributes<HTMLInputElement>>;
labelProps?: Partial<React.InputHTMLAttributes<HTMLLabelElement>>;
inputProps?: Partial<JSX.IntrinsicElements['input']>;
labelProps?: Partial<JSX.IntrinsicElements['label']>;
}

@@ -23,0 +23,0 @@ export const ControlledInput: React.ForwardRefExoticComponent<ControlledInputProps & React.RefAttributes<HTMLDivElement>>;

{
"name": "@contentful/f36-inputs",
"version": "4.0.1-next-v4-5052.2088+c142b7f9",
"version": "4.0.1-next-v4-5106.2090+09109220",
"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-5052.2088+c142b7f9",
"@contentful/f36-icons": "4.0.1-next-v4-5052.2088+c142b7f9",
"@contentful/f36-tokens": "4.0.1-next-v4-5052.2088+c142b7f9",
"@contentful/f36-core": "4.0.1-next-v4-5106.2090+09109220",
"@contentful/f36-icons": "4.0.1-next-v4-5106.2090+09109220",
"@contentful/f36-tokens": "4.0.1-next-v4-5106.2090+09109220",
"emotion": "^10.0.17"

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

},
"gitHead": "c142b7f9f2a834cf71cdbb70e07e43598055eeae"
"gitHead": "09109220cb1aac9e4a9ec97f8eb6823bae038017"
}

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