UNPKG

react-ui-mat

Version:

- ANIMATE - BADGES ( success, danger, info, light, primary, green ) - BEHAVIOR - BUTTONS - CHECKBOX - COLLAPSE - CONTEXT PANEL - DATE PICKER - DATEPICKER - DATEUTIL - DIVIDER - DRAGABLE MODAL - INCORRECT_ENTRY - INPUT - INPUT_FIELDS - MULTISELECT - MUPLAY

1 lines 6.8 kB
'use strict';var a0_0x114b09=this&&this['__createBinding']||(Object['create']?function(_0x7ce2dc,_0x186c4b,_0x285ac9,_0x3cdb50){if(_0x3cdb50===undefined)_0x3cdb50=_0x285ac9;var _0x32995f=Object['getOwnPropertyDescriptor'](_0x186c4b,_0x285ac9);if(!_0x32995f||('get'in _0x32995f?!_0x186c4b['__esModule']:_0x32995f['writable']||_0x32995f['configurable'])){const _0x2faa0e={};_0x2faa0e['enumerable']=!![],_0x2faa0e['get']=function(){return _0x186c4b[_0x285ac9];},_0x32995f=_0x2faa0e;}Object['defineProperty'](_0x7ce2dc,_0x3cdb50,_0x32995f);}:function(_0x429bbc,_0x55e5bd,_0x695efb,_0x3f7f9d){if(_0x3f7f9d===undefined)_0x3f7f9d=_0x695efb;_0x429bbc[_0x3f7f9d]=_0x55e5bd[_0x695efb];}),a0_0x2fb694=this&&this['__setModuleDefault']||(Object['create']?function(_0x5a274b,_0x4c2a0d){const _0x249e9d={};_0x249e9d['enumerable']=!![],_0x249e9d['value']=_0x4c2a0d,Object['defineProperty'](_0x5a274b,'default',_0x249e9d);}:function(_0x6af183,_0x67f219){_0x6af183['default']=_0x67f219;}),a0_0x4612b8=this&&this['__importStar']||function(_0x2a6a68){if(_0x2a6a68&&_0x2a6a68['__esModule'])return _0x2a6a68;var _0x213bac={};if(_0x2a6a68!=null){for(var _0x42e95a in _0x2a6a68)if(_0x42e95a!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x2a6a68,_0x42e95a))a0_0x114b09(_0x213bac,_0x2a6a68,_0x42e95a);}return a0_0x2fb694(_0x213bac,_0x2a6a68),_0x213bac;};const a0_0x478721={};a0_0x478721['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x478721),exports['PasswordSecureInput']=exports['PasswordInput']=void 0x0;const a0_0x1ff2c9=require('react/jsx-runtime'),a0_0xf232cc=a0_0x4612b8(require('react'));function a0_0x15ceaf(_0x5981df){const _0x50bb44=a0_0xf232cc['useRef'](![]),_0x21649f=a0_0xf232cc['useRef'](null),_0xb13730=a0_0xf232cc['useRef'](null);function _0x5d86fa(){!_0x50bb44['current']?(_0x21649f['current']['type']='text',_0xb13730['current']['classList']['remove']('mt-p-eye-splash')):(_0x21649f['current']['type']='password',_0xb13730['current']['classList']['add']('mt-p-eye-splash')),_0x50bb44['current']=!_0x50bb44['current'];}const _0x3e2ba5=_0x2e866f=>{const _0x42e9b6=_0x2e866f['key'];!_0x5981df['anycharacter']&&_0x42e9b6&&/[^\x00-\x7F]/['test'](_0x42e9b6)&&_0x2e866f['preventDefault']();},_0x2954b2={..._0x5981df};_0x2954b2['onKeyDown']=_0x3e2ba5,_0x2954b2['className']=(_0x5981df['sm']?'d-input-sm':'')+'\x20'+(_0x5981df['className']||''),_0x2954b2['ref']=_0x21649f,_0x2954b2['type']=_0x50bb44['current']?'text':'password',_0x2954b2['autoComplete']='false';const _0x5c6e88={};return _0x5c6e88['children']='👁',(0x0,a0_0x1ff2c9['jsxs'])('div',{'className':'mt-password-input','children':[(0x0,a0_0x1ff2c9['jsx'])('input',_0x2954b2),(0x0,a0_0x1ff2c9['jsx'])('div',{'ref':_0xb13730,'className':'mt-p-eye\x20'+(_0x50bb44['current']?'':'mt-p-eye-splash'),'onClick':_0x5d86fa,'children':(0x0,a0_0x1ff2c9['jsx'])('span',_0x5c6e88)})]});}function a0_0x9072af(_0x5a193e){return a0_0x15ceaf(_0x5a193e);}exports['PasswordInput']=a0_0x9072af;function a0_0x198300({value:_0x2c5044,dc:_0x45fec3,..._0x221a28}){const _0x5893cc=a0_0xf232cc['useRef'](''),_0x221528=a0_0xf232cc['useRef'](![]),_0x2fff8e=a0_0xf232cc['useRef'](null),_0x328ef3=a0_0xf232cc['useRef'](null),_0x3bcf88=a0_0xf232cc['useRef'](0x0),_0x3b4380=a0_0xf232cc['useRef'](0x0);function _0x535491(_0x56a375,_0x256c61){_0x5893cc['current']=_0x56a375;const _0xac96e9=_0x45fec3||'*';_0x2fff8e['current']['value']=_0x221528['current']?_0x56a375:_0x56a375['split']('')['map'](()=>_0xac96e9)['join']('');}function _0x5ca8e8(){!_0x221528['current']?(_0x2fff8e['current']['type']='text',_0x328ef3['current']['classList']['remove']('mt-p-eye-splash')):(_0x2fff8e['current']['type']='password',_0x328ef3['current']['classList']['add']('mt-p-eye-splash')),_0x221528['current']=!_0x221528['current'],_0x535491(_0x5893cc['current'],_0x5893cc['current']['length']||0x0);}function _0x392109(_0x22e974){try{const _0x1d84f3=_0x22e974['key'];if(!_0x221a28['anycharacter']&&_0x1d84f3&&/[^\x00-\x7F]/['test'](_0x1d84f3)){_0x22e974['preventDefault']();return;}_0x3bcf88['current']=_0x22e974['currentTarget']['selectionStart'],_0x3b4380['current']=_0x22e974['currentTarget']['selectionEnd'];const _0x168131=_0x22e974['ctrlKey']||_0x22e974['metaKey'];let _0x3383bc=_0x5893cc['current'],_0xbcd027=_0x3bcf88['current'];!_0x168131&&(_0x22e974['key']['length']===0x1||_0x22e974['key']==='Backspace')&&(_0x22e974['key']==='Backspace'&&(_0x22e974['preventDefault'](),_0x3bcf88['current']===_0x3b4380['current']?(_0x3383bc=_0x3383bc['split']('')['slice'](0x0,_0x3bcf88['current']-0x1)['join']('')+_0x3383bc['split']('')['slice'](_0x3b4380['current'],_0x3383bc['length'])['join'](''),_0xbcd027=_0x3bcf88['current']-0x1):(_0x3383bc=_0x3383bc['split']('')['slice'](0x0,_0x3bcf88['current'])['join']('')+_0x3383bc['split']('')['slice'](_0x3b4380['current'],_0x3383bc['length'])['join'](''),_0xbcd027=_0x3bcf88['current']),_0x535491(_0x3383bc,_0xbcd027))),_0x221a28['onChange']&&_0x221a28['onChange'](_0x3383bc);}catch(_0x3cb077){}}function _0x3cea59(_0x5c5fce){try{_0x5c5fce['preventDefault']();let _0x5c5b09=_0x5893cc['current'];const _0x135b16=_0x5c5fce['data']||'';_0x5c5b09=_0x5c5b09['split']('')['slice'](0x0,_0x3bcf88['current'])['join']('')+_0x135b16+_0x5c5b09['split']('')['slice'](_0x3b4380['current'],_0x5c5b09['length'])['join'](''),_0x535491(_0x5c5b09,_0x3b4380['current']),_0x221a28['onChange']&&_0x221a28['onChange'](_0x5c5b09);}catch(_0x44e86a){}}function _0x16bef1(_0x115c94){try{_0x115c94['preventDefault']();let _0x30273f=_0x115c94['currentTarget']['value']||'';_0x535491(_0x30273f,_0x30273f['length']),_0x221a28['onChange']&&_0x221a28['onChange'](_0x30273f);}catch(_0x1c1a1f){}}a0_0xf232cc['useEffect'](()=>{_0x5893cc['current']=_0x2c5044||'',_0x535491(_0x5893cc['current'],_0x5893cc['current']['length']||0x0);},[]),a0_0xf232cc['useEffect'](()=>{_0x2c5044!=_0x5893cc['current']&&(_0x5893cc['current']=_0x2c5044||'',_0x535491(_0x5893cc['current'],_0x5893cc['current']['length']||0x0));},[_0x2c5044]);const _0x5bb8c0={..._0x221a28};_0x5bb8c0['ref']=_0x2fff8e,_0x5bb8c0['autoComplete']='on',_0x5bb8c0['type']=_0x221528['current']?'text':'password',_0x5bb8c0['className']=(_0x221a28['sm']?'d-input-sm':'')+'\x20'+(_0x221a28['className']||'')+'\x20text-center',_0x5bb8c0['onKeyDownCapture']=_0x392109,_0x5bb8c0['onBeforeInput']=_0x3cea59,_0x5bb8c0['onChange']=_0x16bef1;const _0x4713e1={};return _0x4713e1['children']='👁',(0x0,a0_0x1ff2c9['jsxs'])('div',{'className':'mt-password-input','children':[(0x0,a0_0x1ff2c9['jsx'])('input',_0x5bb8c0),(0x0,a0_0x1ff2c9['jsx'])('div',{'ref':_0x328ef3,'className':'mt-p-eye\x20'+(_0x221528['current']?'':'mt-p-eye-splash'),'onClick':_0x5ca8e8,'children':(0x0,a0_0x1ff2c9['jsx'])('span',_0x4713e1)})]});}function a0_0x44cd8c(_0xe7c679){return a0_0x198300(_0xe7c679);}exports['PasswordSecureInput']=a0_0x44cd8c;