@corva/ui 0.28.0-4 → 0.28.0-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import{jsx as e}from"react/jsx-runtime";import{makeStyles as r,TextField as n,InputAdornment as o}from"@material-ui/core";import s from"@babel/runtime/helpers/objectWithoutProperties";import u from"prop-types";import{useCustomShrink as a}from"./effects/index.js";function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i=r({inputStartAdornment:{"&.MuiInputAdornment-root svg.MuiSvgIcon-root":{width:16,height:16,fontSize:16}},textField:{marginTop:16,marginBottom:8,"& .MuiFormLabel-root":{marginLeft:function(t){return t.startlabelOffset?"".concat(t.startlabelOffset+8,"px"):0},marginRight:function(t){return t.endlabelOffset?"".concat(t.endlabelOffset+8,"px"):0}}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}),c=function(t){var r=t.startIcon,u=t.endIcon,l=t.onFocus,c=t.onBlur,f=t.InputProps,d=t.value,m=s(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value"]),b=a({startIcon:r,endIcon:u,onFocus:l,onBlur:c,value:d,InputProps:f}),I=b.shrink,O=b.onInputFocus,P=b.onInputBlur,h=b.startlabelOffset,g=b.endlabelOffset,v=b.startAdornmentRef,j=b.endAdornmentRef,y=i({startlabelOffset:h,endlabelOffset:g});return e(n,p(p({},m),{},{onFocus:O,onBlur:P,classes:{root:y.textField},InputLabelProps:p({shrink:I,classes:{shrink:y.shrunkLabel}},t.InputLabelProps),InputProps:p({startAdornment:r&&e(o,{className:y.inputStartAdornment,position:"start",ref:v,children:r}),endAdornment:u&&e(o,{position:"end",ref:j,children:u})},t.InputProps)}))};c.propTypes={startIcon:u.node,endIcon:u.node,InputProps:u.shape({startAdornment:null}),InputLabelProps:u.shape({startAdornment:null}),value:u.oneOf(u.string,u.number),onFocus:u.func,onBlur:u.func},c.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0};export default c;
1
+ import t from"@babel/runtime/helpers/defineProperty";import{jsx as e}from"react/jsx-runtime";import{makeStyles as n,TextField as r,InputAdornment as o}from"@material-ui/core";import s from"@babel/runtime/helpers/objectWithoutProperties";import u from"prop-types";import{useCustomShrink as l}from"./effects/index.js";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?i(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=n((function(t){return{textField:{marginTop:16,marginBottom:8,"& .MuiFormLabel-root":{marginLeft:function(t){return t.startlabelOffset?"".concat(t.startlabelOffset+8,"px"):0},marginRight:function(t){return t.endlabelOffset?"".concat(t.endlabelOffset+8,"px"):0}},"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{width:16,height:16,fontSize:16,fill:"#DADADA"},"&.Mui-error .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.error.main," !important")}}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}})),c=function(t){var n=t.startIcon,u=t.endIcon,i=t.onFocus,c=t.onBlur,f=t.InputProps,d=t.value,m=t.startAdornment,b=t.endAdornment,I=s(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),O=l({startIcon:n,endIcon:u,onFocus:i,onBlur:c,value:d,InputProps:f}),P=O.shrink,h=O.onInputFocus,v=O.onInputBlur,g=O.startlabelOffset,A=O.endlabelOffset,j=O.startAdornmentRef,y=O.endAdornmentRef,F=p({startlabelOffset:g,endlabelOffset:A});return e(r,a(a({},I),{},{value:d,onFocus:h,onBlur:v,classes:{root:F.textField},InputLabelProps:a({shrink:P,classes:{shrink:F.shrunkLabel}},t.InputLabelProps),InputProps:a({startAdornment:n?e(o,{position:"start",ref:j,children:n}):m,endAdornment:u?e(o,{position:"end",ref:y,children:u}):b},t.InputProps)}))};c.propTypes={startIcon:u.node,endIcon:u.node,InputProps:u.shape({startAdornment:null}),InputLabelProps:u.shape({startAdornment:null}),value:u.oneOf(u.string,u.number),onFocus:u.func,onBlur:u.func,endAdornment:u.node,startAdornment:u.node},c.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export default c;
@@ -1 +1 @@
1
- import o from"./palette.mjs.js";var t=o.primary,r=o.error,i={MuiTextField:{root:{"&:hover":{"& .MuiFormLabel-root:not(.Mui-disabled, .Mui-focused)":{color:t.contrastText},"& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.Mui-error":{color:r.main},"& .MuiInput-root.MuiInput-underline:not(.Mui-disabled):before":{borderBottom:"1px solid ".concat(t.contrastText)},"& .MuiInput-root.Mui-error.MuiInput-underline::after":{borderBottom:"2px solid ".concat(r.main)}},"& .MuiFormLabel-root":{color:t.text6,"&.MuiInputLabel-shrink":{letterSpacing:"0.4px",top:1},"&.Mui-error":{color:r.main,"&.Mui-focused":{color:r.main}},"&.Mui-focused":{color:t.main},"&.Mui-disabled":{opacity:"0.5"},"&:not(.MuiInputLabel-shrink)+.MuiInputAdornment-root":{marginRight:8}},"& .MuiInput-root":{color:t.contrastText,"&.Mui-focused .MuiInputAdornment-root svg":{fill:t.main},"&.MuiInput-underline:before":{borderBottom:"1px solid ".concat(t.text6)},"&.Mui-error.MuiInput-underline::after":{borderBottom:"1px solid ".concat(r.main)},"&.Mui-error.Mui-focused.MuiInput-underline::after":{borderBottom:"2px solid ".concat(r.main)},"&.Mui-disabled":{opacity:"0.5","&.MuiInput-underline:before":{borderBottom:"1px solid ".concat(t.text6)}},"&.Mui-error .MuiInputAdornment-root svg":{fill:t.contrastText},"&.MuiFormLabel-asterisk":{display:"none"},"& .MuiInputAdornment-root":{"&.MuiInputAdornment-marginDense":{marginBottom:"3px"},"& svg":{fontSize:16,fill:t.contrastText},"& p":{fontSize:14,marginBottom:"-5px",color:t.text8}}}}}};export default i;
1
+ import o from"./palette.mjs.js";var t=o.primary,r=o.error,i={MuiTextField:{root:{"&:hover":{"& .MuiFormLabel-root:not(.Mui-disabled, .Mui-focused)":{color:t.contrastText},"& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.Mui-error":{color:r.main},"& .MuiInput-root.MuiInput-underline:not(.Mui-disabled):before":{borderBottom:"1px solid ".concat(t.contrastText)},"& .MuiInput-root.Mui-error.MuiInput-underline::after":{borderBottom:"2px solid ".concat(r.main)}},"& .MuiFormLabel-root":{color:t.text6,"&.MuiInputLabel-shrink":{letterSpacing:"0.4px",top:1},"&.Mui-error":{color:r.main,"&.Mui-focused":{color:r.main}},"&.Mui-focused":{color:t.main},"&.Mui-disabled":{opacity:"0.5"},"&:not(.MuiInputLabel-shrink)+.MuiInputAdornment-root":{marginRight:8},"& .MuiFormLabel-asterisk":{display:"none"}},"& .MuiInput-root":{color:t.contrastText,"& .MuiInput-input":{paddingTop:5,paddingBottom:5,height:22},"& .MuiInput-input.MuiInputBase-inputMarginDense":{paddingTop:2,paddingBottom:4},"&.Mui-focused .MuiInputAdornment-root svg":{fill:t.main},"&.MuiInput-underline:before":{borderBottom:"1px solid ".concat(t.text6)},"&.Mui-error.MuiInput-underline::after":{borderBottom:"1px solid ".concat(r.main)},"&.Mui-error.Mui-focused.MuiInput-underline::after":{borderBottom:"2px solid ".concat(r.main)},"&.Mui-disabled":{opacity:"0.5","&.MuiInput-underline:before":{borderBottom:"1px solid ".concat(t.text6)}},"&.Mui-error .MuiInputAdornment-root svg":{fill:t.contrastText},"& .MuiInputAdornment-root":{marginBottom:2,"&.MuiInputAdornment-marginDense":{marginBottom:"1px"},"& svg":{fontSize:16,fill:t.contrastText},"& p":{fontSize:14,lineHeight:"24px",color:t.text8}}}}}};export default i;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.28.0-4",
3
+ "version": "0.28.0-5",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"