@corva/ui 0.50.0-11 → 0.50.0-12
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
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/index.js"],"names":[],"mappings":";AA8CA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/index.js"],"names":[],"mappings":";AA8CA,oDA+DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/objectWithoutProperties";import r from"prop-types";import{makeStyles as e,TextField as o,InputAdornment as u}from"@material-ui/core";import{useCustomShrink as i}from"./effects/index.js";import s from"../../config/theme/palette.mjs.js";import{jsx as l}from"react/jsx-runtime";var a=["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"];function p(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 c(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?p(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var f=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:s.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}}}})),d=function(t){var r=t.startIcon,e=t.endIcon,s=t.onFocus,p=t.onBlur,d=t.InputProps,m=t.value,b=t.startAdornment,I=t.endAdornment,
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/objectWithoutProperties";import r from"prop-types";import{makeStyles as e,TextField as o,InputAdornment as u}from"@material-ui/core";import{useCustomShrink as i}from"./effects/index.js";import s from"../../config/theme/palette.mjs.js";import{jsx as l}from"react/jsx-runtime";var a=["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"];function p(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 c(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?p(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var f=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:s.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}}}})),d=function(t){var r=t.startIcon,e=t.endIcon,s=t.onFocus,p=t.onBlur,d=t.InputProps,m=t.value,b=t.startAdornment,I=t.endAdornment,v=n(t,a),O=i({startIcon:r,endIcon:e,onFocus:s,onBlur:p,value:m,InputProps:d}),g=O.shrink,h=O.onInputFocus,P=O.onInputBlur,A=O.startlabelOffset,M=O.endlabelOffset,j=O.startAdornmentRef,y=O.endAdornmentRef,F=f({startlabelOffset:A,endlabelOffset:M});return l(o,c(c({},v),{},{onFocus:h,onBlur:P,value:m,classes:{root:F.textField},InputLabelProps:c({shrink:g,classes:{shrink:F.shrunkLabel}},t.InputLabelProps),InputProps:c({startAdornment:r?l(u,{position:"start",ref:j,children:r}):b,endAdornment:e?l(u,{position:"end",ref:y,children:e}):I},t.InputProps)}))};d.propTypes={startIcon:r.node,endIcon:r.node,InputProps:r.shape({startAdornment:null}),InputLabelProps:r.shape({startAdornment:null}),value:r.oneOf([r.string,r.number]),onFocus:r.func,onBlur:r.func,endAdornment:r.node,startAdornment:r.node},d.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export{d as default};
|