@corva/ui 0.30.0-rc.0 → 0.30.0

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 n}from"react/jsx-runtime";import{makeStyles as r,TextField as e,InputAdornment as o}from"@material-ui/core";import u from"../../config/theme/palette.mjs.js";import i from"@babel/runtime/helpers/objectWithoutProperties";import s from"prop-types";import{useCustomShrink as l}from"./effects/index.js";function a(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function p(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?a(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var c=r((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}},"&:hover":{"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:u.primary.contrastText}}},"&.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")}},"& .Mui-focused .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.primary.main," !important")}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}})),f=function(t){var r=t.startIcon,u=t.endIcon,s=t.onFocus,a=t.onBlur,f=t.InputProps,d=t.value,m=t.startAdornment,b=t.endAdornment,I=i(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),O=l({startIcon:r,endIcon:u,onFocus:s,onBlur:a,value:d,InputProps:f}),g=O.shrink,v=O.onInputFocus,h=O.onInputBlur,P=O.startlabelOffset,A=O.endlabelOffset,M=O.startAdornmentRef,j=O.endAdornmentRef,y=c({startlabelOffset:P,endlabelOffset:A});return n(e,p(p({},I),{},{onFocus:v,onBlur:h,classes:{root:y.textField},InputLabelProps:p({shrink:g,classes:{shrink:y.shrunkLabel}},t.InputLabelProps),InputProps:p({startAdornment:r?n(o,{position:"start",ref:M,children:r}):m,endAdornment:u?n(o,{position:"end",ref:j,children:u}):b},t.InputProps)}))};f.propTypes={startIcon:s.node,endIcon:s.node,InputProps:s.shape({startAdornment:null}),InputLabelProps:s.shape({startAdornment:null}),value:s.oneOf([s.string,s.number]),onFocus:s.func,onBlur:s.func,endAdornment:s.node,startAdornment:s.node},f.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export default f;
1
+ import t from"@babel/runtime/helpers/defineProperty";import{jsx as n}from"react/jsx-runtime";import{makeStyles as e,TextField as r,InputAdornment as o}from"@material-ui/core";import u from"../../config/theme/palette.mjs.js";import i from"@babel/runtime/helpers/objectWithoutProperties";import s from"prop-types";import{useCustomShrink as l}from"./effects/index.js";function a(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function p(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}var c=e((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}},"&:hover":{"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:u.primary.contrastText}}},"&.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")}},"& .Mui-focused .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.primary.main," !important")}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}})),f=function(t){var e=t.startIcon,u=t.endIcon,s=t.onFocus,a=t.onBlur,f=t.InputProps,d=t.value,m=t.startAdornment,b=t.endAdornment,I=i(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),O=l({startIcon:e,endIcon:u,onFocus:s,onBlur:a,value:d,InputProps:f}),v=O.shrink,g=O.onInputFocus,h=O.onInputBlur,P=O.startlabelOffset,A=O.endlabelOffset,M=O.startAdornmentRef,j=O.endAdornmentRef,y=c({startlabelOffset:P,endlabelOffset:A});return n(r,p(p({},I),{},{value:d,onFocus:g,onBlur:h,classes:{root:y.textField},InputLabelProps:p({shrink:v,classes:{shrink:y.shrunkLabel}},t.InputLabelProps),InputProps:p({startAdornment:e?n(o,{position:"start",ref:M,children:e}):m,endAdornment:u?n(o,{position:"end",ref:j,children:u}):b},t.InputProps)}))};f.propTypes={startIcon:s.node,endIcon:s.node,InputProps:s.shape({startAdornment:null}),InputLabelProps:s.shape({startAdornment:null}),value:s.oneOf([s.string,s.number]),onFocus:s.func,onBlur:s.func,endAdornment:s.node,startAdornment:s.node},f.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export default f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.30.0-rc.0",
3
+ "version": "0.30.0",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"