@lanaco/lnc-react-ui 4.0.198 → 4.0.200

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.
Files changed (247) hide show
  1. package/dist/Accordion.cjs +5 -5
  2. package/dist/Accordion.js +45 -56
  3. package/dist/AccordionDetails.cjs +3 -3
  4. package/dist/AccordionDetails.js +11 -25
  5. package/dist/AccordionSummary.cjs +4 -4
  6. package/dist/AccordionSummary.js +34 -44
  7. package/dist/ActionsToolbar.cjs +2 -3
  8. package/dist/ActionsToolbar.js +83 -135
  9. package/dist/Alert.cjs +10 -10
  10. package/dist/Alert.js +32 -64
  11. package/dist/Avatar.cjs +9 -9
  12. package/dist/Avatar.js +33 -72
  13. package/dist/Badge.cjs +6 -6
  14. package/dist/Badge.js +22 -47
  15. package/dist/BlogCategoryCardsSection.cjs +1 -1
  16. package/dist/BlogCategoryCardsSection.js +12 -14
  17. package/dist/BlogExploreSection.cjs +1 -1
  18. package/dist/BlogExploreSection.js +1 -1
  19. package/dist/BlogsSectionWithFilters.cjs +1 -1
  20. package/dist/BlogsSectionWithFilters.js +1 -1
  21. package/dist/Breadcrumbs.cjs +5 -5
  22. package/dist/Breadcrumbs.js +57 -87
  23. package/dist/Button.cjs +11 -11
  24. package/dist/Button.js +126 -173
  25. package/dist/ButtonGroup.cjs +8 -8
  26. package/dist/ButtonGroup.js +37 -49
  27. package/dist/CalorieCalculatorSection.cjs +8 -8
  28. package/dist/CalorieCalculatorSection.js +90 -97
  29. package/dist/CheckBoxInput.cjs +1 -1
  30. package/dist/CheckBoxInput.js +2 -5
  31. package/dist/Chip.cjs +14 -14
  32. package/dist/Chip.js +73 -111
  33. package/dist/ConfirmationForm.cjs +6 -6
  34. package/dist/ConfirmationForm.js +67 -109
  35. package/dist/ContactSection.cjs +1 -0
  36. package/dist/ContactSection.js +1 -0
  37. package/dist/Content.cjs +1 -1
  38. package/dist/Content.js +7 -15
  39. package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
  40. package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
  41. package/dist/DataView.cjs +1 -1
  42. package/dist/DataView.js +30 -50
  43. package/dist/DateInput.cjs +4 -4
  44. package/dist/DateInput.js +1347 -1383
  45. package/dist/DecimalInput.cjs +6 -6
  46. package/dist/DecimalInput.js +210 -263
  47. package/dist/DecimalInputV2.cjs +23 -23
  48. package/dist/DecimalInputV2.js +119 -176
  49. package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
  50. package/dist/DetailedProductsInfinitiveSection.js +1 -1
  51. package/dist/DetailedProductsSection.cjs +1 -1
  52. package/dist/DetailedProductsSection.js +1 -1
  53. package/dist/DetailsView.cjs +9 -9
  54. package/dist/DetailsView.js +111 -162
  55. package/dist/DoubleRangeSlider.cjs +22 -22
  56. package/dist/DoubleRangeSlider.js +70 -95
  57. package/dist/DragAndDropFile.cjs +10 -10
  58. package/dist/DragAndDropFile.js +347 -402
  59. package/dist/DragDropFiles.cjs +4 -4
  60. package/dist/DragDropFiles.js +70 -124
  61. package/dist/Drawer.cjs +5 -5
  62. package/dist/Drawer.js +97 -135
  63. package/dist/Dropdown.cjs +1 -1
  64. package/dist/Dropdown.js +44 -213
  65. package/dist/DropdownItem.cjs +14 -14
  66. package/dist/DropdownItem.js +106 -142
  67. package/dist/DropdownLookup.cjs +1 -1
  68. package/dist/DropdownLookup.js +61 -242
  69. package/dist/DropdownMenu.cjs +4 -4
  70. package/dist/DropdownMenu.js +87 -149
  71. package/dist/EditableTable.cjs +10 -10
  72. package/dist/EditableTable.js +165 -331
  73. package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
  74. package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
  75. package/dist/FaqSection.cjs +3 -3
  76. package/dist/FaqSection.js +119 -153
  77. package/dist/FileInput.cjs +7 -7
  78. package/dist/FileInput.js +66 -94
  79. package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
  80. package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
  81. package/dist/FlexBox.cjs +6 -6
  82. package/dist/FlexBox.js +28 -63
  83. package/dist/FlexGrid.cjs +1 -1
  84. package/dist/FlexGrid.js +27 -67
  85. package/dist/FlexGridItem.cjs +6 -6
  86. package/dist/FlexGridItem.js +34 -62
  87. package/dist/Footer.cjs +1 -1
  88. package/dist/Footer.js +7 -15
  89. package/dist/FormField.cjs +7 -7
  90. package/dist/FormField.js +22 -47
  91. package/dist/FormView.cjs +6 -6
  92. package/dist/FormView.js +148 -195
  93. package/dist/Grid.cjs +2 -2
  94. package/dist/Grid.js +40 -65
  95. package/dist/GridItem.cjs +2 -2
  96. package/dist/GridItem.js +47 -80
  97. package/dist/Header.cjs +1 -1
  98. package/dist/Header.js +7 -15
  99. package/dist/HelpBannerSection.cjs +3 -3
  100. package/dist/HelpBannerSection.js +9 -15
  101. package/dist/Icon.cjs +4 -4
  102. package/dist/Icon.js +29 -55
  103. package/dist/IconButton.cjs +9 -9
  104. package/dist/IconButton.js +89 -127
  105. package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
  106. package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
  107. package/dist/Kanban.cjs +7 -7
  108. package/dist/Kanban.js +2033 -2098
  109. package/dist/KanbanActionsToolbar.cjs +4 -5
  110. package/dist/KanbanActionsToolbar.js +61 -96
  111. package/dist/KanbanCard-B9V9EjVE.js +137 -0
  112. package/dist/KanbanCard-DihrKn-I.cjs +30 -0
  113. package/dist/KanbanCard.cjs +1 -1
  114. package/dist/KanbanCard.js +2 -3
  115. package/dist/KanbanFooter.cjs +3 -3
  116. package/dist/KanbanFooter.js +37 -55
  117. package/dist/KanbanHeader.cjs +4 -4
  118. package/dist/KanbanHeader.js +49 -81
  119. package/dist/KanbanView.cjs +2 -2
  120. package/dist/KanbanView.js +106 -173
  121. package/dist/Link.cjs +7 -7
  122. package/dist/Link.js +20 -37
  123. package/dist/LocationSearchSection.cjs +1 -1
  124. package/dist/LocationSearchSection.js +1 -1
  125. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  126. package/dist/MasonryGeneralCardsSection.js +1 -1
  127. package/dist/MenuItem.cjs +13 -13
  128. package/dist/MenuItem.js +101 -139
  129. package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
  130. package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
  131. package/dist/Modal.cjs +18 -19
  132. package/dist/Modal.js +131 -166
  133. package/dist/MultiSelectDropdown.cjs +1 -1
  134. package/dist/MultiSelectDropdown.js +25 -196
  135. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  136. package/dist/MultiSelectDropdownLookup.js +27 -209
  137. package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
  138. package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
  139. package/dist/NestedDropdownItem.cjs +3 -3
  140. package/dist/NestedDropdownItem.js +45 -67
  141. package/dist/NestedMenuItem.cjs +5 -5
  142. package/dist/NestedMenuItem.js +51 -78
  143. package/dist/NotificationContainer.cjs +10 -10
  144. package/dist/NotificationContainer.js +46 -79
  145. package/dist/NotificationMessage.cjs +2 -2
  146. package/dist/NotificationMessage.js +47 -64
  147. package/dist/NumberInput.cjs +23 -23
  148. package/dist/NumberInput.js +89 -149
  149. package/dist/PageLayout.cjs +2 -2
  150. package/dist/PageLayout.js +20 -28
  151. package/dist/Pagination.cjs +3 -3
  152. package/dist/Pagination.js +102 -185
  153. package/dist/PasswordInput.cjs +23 -23
  154. package/dist/PasswordInput.js +108 -137
  155. package/dist/Popover.cjs +1 -1
  156. package/dist/Popover.js +7 -32
  157. package/dist/PopoverContent.cjs +5 -5
  158. package/dist/PopoverContent.js +22 -28
  159. package/dist/PopoverTrigger.cjs +1 -1
  160. package/dist/PopoverTrigger.js +7 -12
  161. package/dist/ProgressBar.cjs +8 -8
  162. package/dist/ProgressBar.js +32 -59
  163. package/dist/RadioGroup.cjs +3 -3
  164. package/dist/RadioGroup.js +41 -72
  165. package/dist/RadioInput.cjs +28 -28
  166. package/dist/RadioInput.js +78 -123
  167. package/dist/RangeSlider.cjs +19 -19
  168. package/dist/RangeSlider.js +92 -119
  169. package/dist/ReviewsSection.cjs +13 -13
  170. package/dist/ReviewsSection.js +81 -101
  171. package/dist/SalesCampaignsSection.cjs +19 -19
  172. package/dist/SalesCampaignsSection.js +283 -324
  173. package/dist/SearchBar.cjs +10 -10
  174. package/dist/SearchBar.js +168 -188
  175. package/dist/SearchSection-B94YN_6P.cjs +161 -0
  176. package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
  177. package/dist/SearchSection.cjs +1 -1
  178. package/dist/SearchSection.js +2 -3
  179. package/dist/Separator.cjs +3 -3
  180. package/dist/Separator.js +14 -19
  181. package/dist/Sidebar.cjs +4 -5
  182. package/dist/Sidebar.js +33 -56
  183. package/dist/SimpleCategoriesSection.cjs +1 -1
  184. package/dist/SimpleCategoriesSection.js +1 -1
  185. package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
  186. package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
  187. package/dist/Spinner.cjs +18 -18
  188. package/dist/Spinner.js +37 -54
  189. package/dist/StatsSection.cjs +6 -6
  190. package/dist/StatsSection.js +15 -25
  191. package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
  192. package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
  193. package/dist/Surface.cjs +4 -4
  194. package/dist/Surface.js +19 -34
  195. package/dist/SwipeableDrawer.cjs +8 -8
  196. package/dist/SwipeableDrawer.js +84 -136
  197. package/dist/TabItem.cjs +11 -11
  198. package/dist/TabItem.js +83 -118
  199. package/dist/Table.cjs +65 -65
  200. package/dist/Table.js +786 -1167
  201. package/dist/TableView.cjs +2 -2
  202. package/dist/TableView.js +113 -197
  203. package/dist/Tabs.cjs +4 -4
  204. package/dist/Tabs.js +41 -60
  205. package/dist/TextAreaInput.cjs +14 -14
  206. package/dist/TextAreaInput.js +131 -181
  207. package/dist/TextInput.cjs +23 -23
  208. package/dist/TextInput.js +78 -126
  209. package/dist/ThemeProvider.cjs +5 -5
  210. package/dist/ThemeProvider.js +35 -39
  211. package/dist/TimeInput.cjs +7 -7
  212. package/dist/TimeInput.js +46 -72
  213. package/dist/Toggle.cjs +20 -20
  214. package/dist/Toggle.js +78 -109
  215. package/dist/ToggleSection.cjs +6 -5
  216. package/dist/ToggleSection.js +49 -55
  217. package/dist/TreeMenu.cjs +5 -5
  218. package/dist/TreeMenu.js +43 -67
  219. package/dist/TreeMenuSeparator.cjs +3 -3
  220. package/dist/TreeMenuSeparator.js +12 -20
  221. package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
  222. package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
  223. package/dist/UploadedFile.cjs +11 -11
  224. package/dist/UploadedFile.js +73 -99
  225. package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
  226. package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
  227. package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
  228. package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
  229. package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
  230. package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
  231. package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
  232. package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
  233. package/dist/index-BdKi2ogu.js +39 -0
  234. package/dist/index-CRk3vcd4.cjs +95 -0
  235. package/dist/index-CX2A-q39.cjs +4 -0
  236. package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
  237. package/dist/index.cjs +1 -1
  238. package/dist/index.js +2 -2
  239. package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
  240. package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
  241. package/package.json +1 -1
  242. package/dist/KanbanCard-68kSAXL6.js +0 -175
  243. package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
  244. package/dist/SearchSection-BcbHP6QF.cjs +0 -161
  245. package/dist/index-Be-_NM9Q.cjs +0 -4
  246. package/dist/index-C0LcDEqa.js +0 -47
  247. package/dist/index-CSNxZFTX.cjs +0 -95
@@ -1,10 +1,10 @@
1
- "use strict";const k=require("react/jsx-runtime"),v=require("./index-BpbMKBf_.cjs"),V=require("react"),ae=require("./index-Cp66dWMi.cjs"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./utils-RnrgDDZP.cjs"),oe=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs");function $(){}function ie(){return!0}function O(r){return!!(r||"").match(/\d/)}function W(r){return r==null}function q(r){return r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ne(r){switch(r){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function se(r,s,f){var e=ne(f),t=r.search(/[1-9]/);return t=t===-1?r.length:t,r.substring(0,t)+r.substring(t,r.length).replace(e,"$1"+s)}function z(r,s){s===void 0&&(s=!0);var f=r[0]==="-",e=f&&s;r=r.replace("-","");var t=r.split("."),a=t[0],i=t[1]||"";return{beforeDecimal:a,afterDecimal:i,hasNagation:f,addNegation:e}}function le(r){if(!r)return r;var s=r[0]==="-";s&&(r=r.substring(1,r.length));var f=r.split("."),e=f[0].replace(/^0+/,"")||"0",t=f[1]||"";return(s?"-":"")+e+(t?"."+t:"")}function H(r,s,f){for(var e="",t=f?"0":"",a=0;a<=s-1;a++)e+=r[a]||t;return e}function G(r,s){return Array(s+1).join(r)}function ue(r){r+="";var s=r[0]==="-"?"-":"";s&&(r=r.substring(1));var f=r.split(/[eE]/g),e=f[0],t=f[1];if(t=Number(t),!t)return s+e;e=e.replace(".","");var a=1+t,i=e.length;return a<0?e="0."+G("0",Math.abs(a))+e:a>=i?e=e+G("0",a-i):e=(e.substring(0,a)||"0")+"."+e.substring(a),s+e}function fe(r,s,f){if(["","-"].indexOf(r)!==-1)return r;var e=r.indexOf(".")!==-1&&s,t=z(r),a=t.beforeDecimal,i=t.afterDecimal,l=t.hasNagation,o=parseFloat("0."+(i||"0")),n=i.length<=s?"0."+i:o.toFixed(s),u=n.split("."),p=a.split("").reverse().reduce(function(m,y,x){return m.length>x?(Number(m[0])+Number(y)).toString()+m.substring(1,m.length):y+m},u[0]),c=H(u[1]||"",Math.min(s,i.length),f),d=l?"-":"",g=e?".":"";return""+d+p+g+c}function _(r,s){if(r.value=r.value,r!==null){if(r.createTextRange){var f=r.createTextRange();return f.move("character",s),f.select(),!0}return r.selectionStart||r.selectionStart===0?(r.focus(),r.setSelectionRange(s,s),!0):(r.focus(),!1)}}function ce(r,s){for(var f=0,e=0,t=r.length,a=s.length;r[f]===s[f]&&f<t;)f++;for(;r[t-1-e]===s[a-1-e]&&a-e>f&&t-e>f;)e++;return{start:f,end:t-e}}function L(r,s,f){return Math.min(Math.max(r,s),f)}function Z(r){return Math.max(r.selectionStart,r.selectionEnd)}function pe(r){return r||typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function de(r,s){var f={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&s.indexOf(e)===-1&&(f[e]=r[e]);return f}var me={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:$,onChange:$,onKeyDown:$,onMouseUp:$,onFocus:$,onBlur:$,isAllowed:ie},J=function(r){function s(f){r.call(this,f);var e=f.defaultValue;this.validateProps();var t=this.formatValueProp(e);this.state={value:t,numAsString:this.removeFormatting(t),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return r&&(s.__proto__=r),s.prototype=Object.create(r&&r.prototype),s.prototype.constructor=s,s.prototype.componentDidMount=function(){this.setState({mounted:!0})},s.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},s.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},s.prototype.updateValueIfRequired=function(e){var t=this,a=t.props,i=t.state,l=t.focusedElm,o=i.value,n=i.numAsString;if(n===void 0&&(n=""),e!==a){this.validateProps();var u=this.formatNumString(n),p=W(a.value)?u:this.formatValueProp(),c=this.removeFormatting(p),d=parseFloat(c),g=parseFloat(n);((!isNaN(d)||!isNaN(g))&&d!==g||u!==o||l===null&&p!==o)&&this.updateValue({formattedValue:p,numAsString:c,input:l,source:"prop",event:null})}},s.prototype.getFloatString=function(e){e===void 0&&(e="");var t=this.props,a=t.decimalScale,i=this.getSeparators(),l=i.decimalSeparator,o=this.getNumberRegex(!0),n=e[0]==="-";n&&(e=e.replace("-","")),l&&a===0&&(e=e.split(l)[0]),e=(e.match(o)||[]).join("").replace(l,".");var u=e.indexOf(".");return u!==-1&&(e=e.substring(0,u)+"."+e.substring(u+1,e.length).replace(new RegExp(q(l),"g"),"")),n&&(e="-"+e),e},s.prototype.getNumberRegex=function(e,t){var a=this.props,i=a.format,l=a.decimalScale,o=a.customNumerals,n=this.getSeparators(),u=n.decimalSeparator;return new RegExp("[0-9"+(o?o.join(""):"")+"]"+(u&&l!==0&&!t&&!i?"|"+q(u):""),e?"g":void 0)},s.prototype.getSeparators=function(){var e=this.props,t=e.decimalSeparator,a=this.props,i=a.thousandSeparator,l=a.allowedDecimalSeparators;return i===!0&&(i=","),l||(l=[t,"."]),{decimalSeparator:t,thousandSeparator:i,allowedDecimalSeparators:l}},s.prototype.getMaskAtIndex=function(e){var t=this.props,a=t.mask;return a===void 0&&(a=" "),typeof a=="string"?a:a[e]||" "},s.prototype.getValueObject=function(e,t){var a=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(a)?void 0:a}},s.prototype.validateProps=function(){var e=this.props,t=e.mask,a=this.getSeparators(),i=a.decimalSeparator,l=a.thousandSeparator;if(i===l)throw new Error(`
1
+ "use strict";const k=require("react/jsx-runtime"),F=require("react"),te=require("./index-Cp66dWMi.cjs"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./utils-RnrgDDZP.cjs"),re=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs");function $(){}function ae(){return!0}function T(r){return!!(r||"").match(/\d/)}function W(r){return r==null}function z(r){return r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ie(r){switch(r){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function oe(r,s,f){var e=ie(f),t=r.search(/[1-9]/);return t=t===-1?r.length:t,r.substring(0,t)+r.substring(t,r.length).replace(e,"$1"+s)}function L(r,s){s===void 0&&(s=!0);var f=r[0]==="-",e=f&&s;r=r.replace("-","");var t=r.split("."),a=t[0],o=t[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNagation:f,addNegation:e}}function ne(r){if(!r)return r;var s=r[0]==="-";s&&(r=r.substring(1,r.length));var f=r.split("."),e=f[0].replace(/^0+/,"")||"0",t=f[1]||"";return(s?"-":"")+e+(t?"."+t:"")}function Z(r,s,f){for(var e="",t=f?"0":"",a=0;a<=s-1;a++)e+=r[a]||t;return e}function q(r,s){return Array(s+1).join(r)}function se(r){r+="";var s=r[0]==="-"?"-":"";s&&(r=r.substring(1));var f=r.split(/[eE]/g),e=f[0],t=f[1];if(t=Number(t),!t)return s+e;e=e.replace(".","");var a=1+t,o=e.length;return a<0?e="0."+q("0",Math.abs(a))+e:a>=o?e=e+q("0",a-o):e=(e.substring(0,a)||"0")+"."+e.substring(a),s+e}function le(r,s,f){if(["","-"].indexOf(r)!==-1)return r;var e=r.indexOf(".")!==-1&&s,t=L(r),a=t.beforeDecimal,o=t.afterDecimal,l=t.hasNagation,i=parseFloat("0."+(o||"0")),n=o.length<=s?"0."+o:i.toFixed(s),u=n.split("."),d=a.split("").reverse().reduce(function(m,v,b){return m.length>b?(Number(m[0])+Number(v)).toString()+m.substring(1,m.length):v+m},u[0]),c=Z(u[1]||"",Math.min(s,o.length),f),p=l?"-":"",h=e?".":"";return""+p+d+h+c}function G(r,s){if(r.value=r.value,r!==null){if(r.createTextRange){var f=r.createTextRange();return f.move("character",s),f.select(),!0}return r.selectionStart||r.selectionStart===0?(r.focus(),r.setSelectionRange(s,s),!0):(r.focus(),!1)}}function ue(r,s){for(var f=0,e=0,t=r.length,a=s.length;r[f]===s[f]&&f<t;)f++;for(;r[t-1-e]===s[a-1-e]&&a-e>f&&t-e>f;)e++;return{start:f,end:t-e}}function U(r,s,f){return Math.min(Math.max(r,s),f)}function _(r){return Math.max(r.selectionStart,r.selectionEnd)}function fe(r){return r||typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function ce(r,s){var f={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&s.indexOf(e)===-1&&(f[e]=r[e]);return f}var de={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:$,onChange:$,onKeyDown:$,onMouseUp:$,onFocus:$,onBlur:$,isAllowed:ae},H=function(r){function s(f){r.call(this,f);var e=f.defaultValue;this.validateProps();var t=this.formatValueProp(e);this.state={value:t,numAsString:this.removeFormatting(t),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return r&&(s.__proto__=r),s.prototype=Object.create(r&&r.prototype),s.prototype.constructor=s,s.prototype.componentDidMount=function(){this.setState({mounted:!0})},s.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},s.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},s.prototype.updateValueIfRequired=function(e){var t=this,a=t.props,o=t.state,l=t.focusedElm,i=o.value,n=o.numAsString;if(n===void 0&&(n=""),e!==a){this.validateProps();var u=this.formatNumString(n),d=W(a.value)?u:this.formatValueProp(),c=this.removeFormatting(d),p=parseFloat(c),h=parseFloat(n);((!isNaN(p)||!isNaN(h))&&p!==h||u!==i||l===null&&d!==i)&&this.updateValue({formattedValue:d,numAsString:c,input:l,source:"prop",event:null})}},s.prototype.getFloatString=function(e){e===void 0&&(e="");var t=this.props,a=t.decimalScale,o=this.getSeparators(),l=o.decimalSeparator,i=this.getNumberRegex(!0),n=e[0]==="-";n&&(e=e.replace("-","")),l&&a===0&&(e=e.split(l)[0]),e=(e.match(i)||[]).join("").replace(l,".");var u=e.indexOf(".");return u!==-1&&(e=e.substring(0,u)+"."+e.substring(u+1,e.length).replace(new RegExp(z(l),"g"),"")),n&&(e="-"+e),e},s.prototype.getNumberRegex=function(e,t){var a=this.props,o=a.format,l=a.decimalScale,i=a.customNumerals,n=this.getSeparators(),u=n.decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(u&&l!==0&&!t&&!o?"|"+z(u):""),e?"g":void 0)},s.prototype.getSeparators=function(){var e=this.props,t=e.decimalSeparator,a=this.props,o=a.thousandSeparator,l=a.allowedDecimalSeparators;return o===!0&&(o=","),l||(l=[t,"."]),{decimalSeparator:t,thousandSeparator:o,allowedDecimalSeparators:l}},s.prototype.getMaskAtIndex=function(e){var t=this.props,a=t.mask;return a===void 0&&(a=" "),typeof a=="string"?a:a[e]||" "},s.prototype.getValueObject=function(e,t){var a=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(a)?void 0:a}},s.prototype.validateProps=function(){var e=this.props,t=e.mask,a=this.getSeparators(),o=a.decimalSeparator,l=a.thousandSeparator;if(o===l)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+l+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
- decimalSeparator: `+i+` (default value for decimalSeparator is .)
5
- `);if(t){var o=t==="string"?t:t.toString();if(o.match(/\d/g))throw new Error(`
4
+ decimalSeparator: `+o+` (default value for decimalSeparator is .)
5
+ `);if(t){var i=t==="string"?t:t.toString();if(i.match(/\d/g))throw new Error(`
6
6
  Mask `+t+` should not contain numeric character;
7
- `)}},s.prototype.setPatchedCaretPosition=function(e,t,a){_(e,t),this.caretPositionTimeout=setTimeout(function(){e.value===a&&_(e,t)},0)},s.prototype.correctCaretPosition=function(e,t,a){var i=this.props,l=i.prefix,o=i.suffix,n=i.format;if(e==="")return 0;if(t=L(t,0,e.length),!n){var u=e[0]==="-";return L(t,l.length+(u?1:0),e.length-o.length)}if(typeof n=="function"||n[t]==="#"&&O(e[t])||n[t-1]==="#"&&O(e[t-1]))return t;var p=n.indexOf("#"),c=n.lastIndexOf("#");t=L(t,p,c+1);for(var d=n.substring(t,n.length).indexOf("#"),g=t,m=t+(d===-1?0:d);g>p&&(n[g]!=="#"||!O(e[g]));)g-=1;var y=!O(e[m])||a==="left"&&t!==p||t-g<m-t;return y?O(e[g])?g+1:g:m},s.prototype.getCaretPosition=function(e,t,a){var i=this.props,l=i.format,o=this.state.value,n=this.getNumberRegex(!0),u=(e.match(n)||[]).join(""),p=(t.match(n)||[]).join(""),c,d;for(c=0,d=0;d<a;d++){var g=e[d]||"",m=t[c]||"";if(!(!g.match(n)&&g!==m)&&!(g==="0"&&m.match(n)&&m!=="0"&&u.length!==p.length)){for(;g!==t[c]&&c<t.length;)c++;c++}}return typeof l=="string"&&!o&&(c=t.length),c=this.correctCaretPosition(t,c),c},s.prototype.removePrefixAndSuffix=function(e){var t=this.props,a=t.format,i=t.prefix,l=t.suffix;if(!a&&e){var o=e[0]==="-";o&&(e=e.substring(1,e.length)),e=i&&e.indexOf(i)===0?e.substring(i.length,e.length):e;var n=e.lastIndexOf(l);e=l&&n!==-1&&n===e.length-l.length?e.substring(0,n):e,o&&(e="-"+e)}return e},s.prototype.removePatternFormatting=function(e){for(var t=this.props,a=t.format,i=a.split("#").filter(function(d){return d!==""}),l=0,o="",n=0,u=i.length;n<=u;n++){var p=i[n]||"",c=n===u?e.length:e.indexOf(p,l);if(c===-1){o=e;break}else o+=e.substring(l,c),l=c+p.length}return(o.match(this.getNumberRegex(!0))||[]).join("")},s.prototype.removeFormatting=function(e){var t=this.props,a=t.format,i=t.removeFormatting;return e&&(a?typeof a=="string"?e=this.removePatternFormatting(e):typeof i=="function"?e=i(e):e=(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e)},s.prototype.formatWithPattern=function(e){for(var t=this.props,a=t.format,i=0,l=a.split(""),o=0,n=a.length;o<n;o++)a[o]==="#"&&(l[o]=e[i]||this.getMaskAtIndex(i),i+=1);return l.join("")},s.prototype.formatAsNumber=function(e){var t=this.props,a=t.decimalScale,i=t.fixedDecimalScale,l=t.prefix,o=t.suffix,n=t.allowNegative,u=t.thousandsGroupStyle,p=this.getSeparators(),c=p.thousandSeparator,d=p.decimalSeparator,g=e.indexOf(".")!==-1||a&&i,m=z(e,n),y=m.beforeDecimal,x=m.afterDecimal,N=m.addNegation;return a!==void 0&&(x=H(x,a,i)),c&&(y=se(y,c,u)),l&&(y=l+y),o&&(x=x+o),N&&(y="-"+y),e=y+(g&&d||"")+x,e},s.prototype.formatNumString=function(e){e===void 0&&(e="");var t=this.props,a=t.format,i=t.allowEmptyFormatting,l=t.customNumerals,o=e;if(l&&l.length===10){var n=new RegExp("["+l.join("")+"]","g");o=e.replace(n,function(u){return l.indexOf(u).toString()})}return e===""&&!i?o="":e==="-"&&!a?o="-":typeof a=="string"?o=this.formatWithPattern(o):typeof a=="function"?o=a(o):o=this.formatAsNumber(o),o},s.prototype.formatValueProp=function(e){var t=this.props,a=t.format,i=t.decimalScale,l=t.fixedDecimalScale,o=t.allowEmptyFormatting,n=this.props,u=n.value,p=n.isNumericString;u=W(u)?e:u;var c=!u&&u!==0;if(c&&o&&(u=""),c&&!o)return"";typeof u=="number"&&(u=ue(u),p=!0),u==="Infinity"&&p&&(u=""),p&&!a&&typeof i=="number"&&(u=fe(u,i,l));var d=p?this.formatNumString(u):this.formatInput(u);return d},s.prototype.formatNegation=function(e){e===void 0&&(e="");var t=this.props,a=t.allowNegative,i=new RegExp("(-)"),l=new RegExp("(-)(.)*(-)"),o=i.test(e),n=l.test(e);return e=e.replace(/-/g,""),o&&!n&&a&&(e="-"+e),e},s.prototype.formatInput=function(e){e===void 0&&(e="");var t=this.props,a=t.format;return a||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},s.prototype.isCharacterAFormat=function(e,t){var a=this.props,i=a.format,l=a.prefix,o=a.suffix,n=a.decimalScale,u=a.fixedDecimalScale,p=this.getSeparators(),c=p.decimalSeparator;return!!(typeof i=="string"&&i[e]!=="#"||!i&&(e<l.length||e>=t.length-o.length||n&&u&&t[e]===c))},s.prototype.correctInputValue=function(e,t,a){var i=this,l=this.props,o=l.format,n=l.allowNegative,u=l.prefix,p=l.suffix,c=l.decimalScale,d=this.getSeparators(),g=d.allowedDecimalSeparators,m=d.decimalSeparator,y=this.state.numAsString||"",x=this.selectionBeforeInput,N=x.selectionStart,P=x.selectionEnd,T=ce(t,a),h=T.start,w=T.end;if(!o&&h===w&&g.indexOf(a[N])!==-1){var R=c===0?"":m;return a.substr(0,N)+R+a.substr(N+1,a.length)}var A=o?0:u.length,E=t.length-(o?0:p.length);if(a.length>t.length||!a.length||h===w||N===0&&P===t.length||h===0&&w===t.length||N===A&&P===E)return a;var j=t.substr(h,w-h),B=!![].concat(j).find(function(C,I){return i.isCharacterAFormat(I+h,t)});if(B){var M=t.substr(h),F={},b=[];[].concat(M).forEach(function(C,I){i.isCharacterAFormat(I+h,t)?F[I]=C:I>j.length-1&&b.push(C)}),Object.keys(F).forEach(function(C){b.length>C?b.splice(C,0,F[C]):b.push(F[C])}),a=t.substr(0,h)+b.join("")}if(!o){var D=this.removeFormatting(a),U=z(D,n),Y=U.beforeDecimal,ee=U.afterDecimal,te=U.addNegation,re=e<a.indexOf(m)+1;if(D.length<y.length&&re&&Y===""&&!parseFloat(ee))return te?"-":""}return a},s.prototype.updateValue=function(e){var t=e.formattedValue,a=e.input,i=e.setCaretPosition;i===void 0&&(i=!0);var l=e.source,o=e.event,n=e.numAsString,u=e.caretPos,p=this.props,c=p.onValueChange,d=this.state,g=d.value;if(a){if(u===void 0&&i){var m=e.inputValue||a.value,y=Z(a);a.value=t,u=this.getCaretPosition(m,t,y)}a.value=t,i&&this.setPatchedCaretPosition(a,u,t)}n===void 0&&(n=this.removeFormatting(t)),t!==g&&(this.setState({value:t,numAsString:n}),c(this.getValueObject(t,n),{event:o,source:l}))},s.prototype.onChange=function(e){var t=e.target,a=t.value,i=this,l=i.state,o=i.props,n=o.isAllowed,u=l.value||"",p=Z(t);a=this.correctInputValue(p,u,a);var c=this.formatInput(a)||"",d=this.removeFormatting(c),g=this.getValueObject(c,d),m=n(g);m||(c=u),this.updateValue({formattedValue:c,numAsString:d,inputValue:a,input:t,event:e,source:"event"}),m&&o.onChange(e)},s.prototype.onBlur=function(e){var t=this,a=t.props,i=t.state,l=a.format,o=a.onBlur,n=a.allowLeadingZeros,u=i.numAsString,p=i.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!l){isNaN(parseFloat(u))&&(u=""),n||(u=le(u));var c=this.formatNumString(u);if(c!==p){this.updateValue({formattedValue:c,numAsString:u,input:e.target,setCaretPosition:!1,event:e,source:"event"}),o(e);return}}o(e)},s.prototype.onKeyDown=function(e){var t=e.target,a=e.key,i=t.selectionStart,l=t.selectionEnd,o=t.value;o===void 0&&(o="");var n,u=this.props,p=u.decimalScale,c=u.fixedDecimalScale,d=u.prefix,g=u.suffix,m=u.format,y=u.onKeyDown,x=p!==void 0&&c,N=this.getNumberRegex(!1,x),P=new RegExp("-"),T=typeof m=="string";if(this.selectionBeforeInput={selectionStart:i,selectionEnd:l},a==="ArrowLeft"||a==="Backspace"?n=i-1:a==="ArrowRight"?n=i+1:a==="Delete"&&(n=i),n===void 0||i!==l){y(e);return}var h=n,w=T?m.indexOf("#"):d.length,R=T?m.lastIndexOf("#")+1:o.length-g.length;if(a==="ArrowLeft"||a==="ArrowRight"){var A=a==="ArrowLeft"?"left":"right";h=this.correctCaretPosition(o,n,A)}else if(a==="Delete"&&!N.test(o[n])&&!P.test(o[n]))for(;!N.test(o[h])&&h<R;)h++;else if(a==="Backspace"&&!N.test(o[n])){if(i<=w+1&&o[0]==="-"&&typeof m>"u"){var E=o.substring(1);this.updateValue({formattedValue:E,caretPos:h,input:t,event:e,source:"event"})}else if(!P.test(o[n])){for(;!N.test(o[h-1])&&h>w;)h--;h=this.correctCaretPosition(o,h,"left")}}(h!==n||n<w||n>R)&&(e.preventDefault(),this.setPatchedCaretPosition(t,h,o)),e.isUnitTestRun&&this.setPatchedCaretPosition(t,h,o),y(e)},s.prototype.onMouseUp=function(e){var t=e.target,a=t.selectionStart,i=t.selectionEnd,l=t.value;if(l===void 0&&(l=""),a===i){var o=this.correctCaretPosition(l,a);o!==a&&this.setPatchedCaretPosition(t,o,l)}this.props.onMouseUp(e)},s.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout(function(){var a=e.target,i=a.selectionStart,l=a.selectionEnd,o=a.value;o===void 0&&(o="");var n=t.correctCaretPosition(o,i);n!==i&&!(i===0&&l===o.length)&&t.setPatchedCaretPosition(a,n,o),t.props.onFocus(e)},0)},s.prototype.render=function(){var e=this.props,t=e.type,a=e.displayType,i=e.customInput,l=e.renderText,o=e.getInputRef,n=e.format;e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value;var u=de(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"]),p=u,c=this.state,d=c.value,g=c.mounted,m=g&&pe(n)?"numeric":void 0,y=Object.assign({inputMode:m},p,{type:t,value:d,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if(a==="text")return l?l(d,p)||null:V.createElement("span",Object.assign({},p,{ref:o}),d);if(i){var x=i;return V.createElement(x,Object.assign({},y,{ref:o}))}return V.createElement("input",Object.assign({},y,{ref:o}))},s}(V.Component);J.defaultProps=me;const ge=K.styled.div`
7
+ `)}},s.prototype.setPatchedCaretPosition=function(e,t,a){G(e,t),this.caretPositionTimeout=setTimeout(function(){e.value===a&&G(e,t)},0)},s.prototype.correctCaretPosition=function(e,t,a){var o=this.props,l=o.prefix,i=o.suffix,n=o.format;if(e==="")return 0;if(t=U(t,0,e.length),!n){var u=e[0]==="-";return U(t,l.length+(u?1:0),e.length-i.length)}if(typeof n=="function"||n[t]==="#"&&T(e[t])||n[t-1]==="#"&&T(e[t-1]))return t;var d=n.indexOf("#"),c=n.lastIndexOf("#");t=U(t,d,c+1);for(var p=n.substring(t,n.length).indexOf("#"),h=t,m=t+(p===-1?0:p);h>d&&(n[h]!=="#"||!T(e[h]));)h-=1;var v=!T(e[m])||a==="left"&&t!==d||t-h<m-t;return v?T(e[h])?h+1:h:m},s.prototype.getCaretPosition=function(e,t,a){var o=this.props,l=o.format,i=this.state.value,n=this.getNumberRegex(!0),u=(e.match(n)||[]).join(""),d=(t.match(n)||[]).join(""),c,p;for(c=0,p=0;p<a;p++){var h=e[p]||"",m=t[c]||"";if(!(!h.match(n)&&h!==m)&&!(h==="0"&&m.match(n)&&m!=="0"&&u.length!==d.length)){for(;h!==t[c]&&c<t.length;)c++;c++}}return typeof l=="string"&&!i&&(c=t.length),c=this.correctCaretPosition(t,c),c},s.prototype.removePrefixAndSuffix=function(e){var t=this.props,a=t.format,o=t.prefix,l=t.suffix;if(!a&&e){var i=e[0]==="-";i&&(e=e.substring(1,e.length)),e=o&&e.indexOf(o)===0?e.substring(o.length,e.length):e;var n=e.lastIndexOf(l);e=l&&n!==-1&&n===e.length-l.length?e.substring(0,n):e,i&&(e="-"+e)}return e},s.prototype.removePatternFormatting=function(e){for(var t=this.props,a=t.format,o=a.split("#").filter(function(p){return p!==""}),l=0,i="",n=0,u=o.length;n<=u;n++){var d=o[n]||"",c=n===u?e.length:e.indexOf(d,l);if(c===-1){i=e;break}else i+=e.substring(l,c),l=c+d.length}return(i.match(this.getNumberRegex(!0))||[]).join("")},s.prototype.removeFormatting=function(e){var t=this.props,a=t.format,o=t.removeFormatting;return e&&(a?typeof a=="string"?e=this.removePatternFormatting(e):typeof o=="function"?e=o(e):e=(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e)},s.prototype.formatWithPattern=function(e){for(var t=this.props,a=t.format,o=0,l=a.split(""),i=0,n=a.length;i<n;i++)a[i]==="#"&&(l[i]=e[o]||this.getMaskAtIndex(o),o+=1);return l.join("")},s.prototype.formatAsNumber=function(e){var t=this.props,a=t.decimalScale,o=t.fixedDecimalScale,l=t.prefix,i=t.suffix,n=t.allowNegative,u=t.thousandsGroupStyle,d=this.getSeparators(),c=d.thousandSeparator,p=d.decimalSeparator,h=e.indexOf(".")!==-1||a&&o,m=L(e,n),v=m.beforeDecimal,b=m.afterDecimal,y=m.addNegation;return a!==void 0&&(b=Z(b,a,o)),c&&(v=oe(v,c,u)),l&&(v=l+v),i&&(b=b+i),y&&(v="-"+v),e=v+(h&&p||"")+b,e},s.prototype.formatNumString=function(e){e===void 0&&(e="");var t=this.props,a=t.format,o=t.allowEmptyFormatting,l=t.customNumerals,i=e;if(l&&l.length===10){var n=new RegExp("["+l.join("")+"]","g");i=e.replace(n,function(u){return l.indexOf(u).toString()})}return e===""&&!o?i="":e==="-"&&!a?i="-":typeof a=="string"?i=this.formatWithPattern(i):typeof a=="function"?i=a(i):i=this.formatAsNumber(i),i},s.prototype.formatValueProp=function(e){var t=this.props,a=t.format,o=t.decimalScale,l=t.fixedDecimalScale,i=t.allowEmptyFormatting,n=this.props,u=n.value,d=n.isNumericString;u=W(u)?e:u;var c=!u&&u!==0;if(c&&i&&(u=""),c&&!i)return"";typeof u=="number"&&(u=se(u),d=!0),u==="Infinity"&&d&&(u=""),d&&!a&&typeof o=="number"&&(u=le(u,o,l));var p=d?this.formatNumString(u):this.formatInput(u);return p},s.prototype.formatNegation=function(e){e===void 0&&(e="");var t=this.props,a=t.allowNegative,o=new RegExp("(-)"),l=new RegExp("(-)(.)*(-)"),i=o.test(e),n=l.test(e);return e=e.replace(/-/g,""),i&&!n&&a&&(e="-"+e),e},s.prototype.formatInput=function(e){e===void 0&&(e="");var t=this.props,a=t.format;return a||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},s.prototype.isCharacterAFormat=function(e,t){var a=this.props,o=a.format,l=a.prefix,i=a.suffix,n=a.decimalScale,u=a.fixedDecimalScale,d=this.getSeparators(),c=d.decimalSeparator;return!!(typeof o=="string"&&o[e]!=="#"||!o&&(e<l.length||e>=t.length-i.length||n&&u&&t[e]===c))},s.prototype.correctInputValue=function(e,t,a){var o=this,l=this.props,i=l.format,n=l.allowNegative,u=l.prefix,d=l.suffix,c=l.decimalScale,p=this.getSeparators(),h=p.allowedDecimalSeparators,m=p.decimalSeparator,v=this.state.numAsString||"",b=this.selectionBeforeInput,y=b.selectionStart,w=b.selectionEnd,R=ue(t,a),g=R.start,N=R.end;if(!i&&g===N&&h.indexOf(a[y])!==-1){var V=c===0?"":m;return a.substr(0,y)+V+a.substr(y+1,a.length)}var A=i?0:u.length,E=t.length-(i?0:d.length);if(a.length>t.length||!a.length||g===N||y===0&&w===t.length||g===0&&N===t.length||y===A&&w===E)return a;var O=t.substr(g,N-g),j=!![].concat(O).find(function(C,I){return o.isCharacterAFormat(I+g,t)});if(j){var B=t.substr(g),P={},x=[];[].concat(B).forEach(function(C,I){o.isCharacterAFormat(I+g,t)?P[I]=C:I>O.length-1&&x.push(C)}),Object.keys(P).forEach(function(C){x.length>C?x.splice(C,0,P[C]):x.push(P[C])}),a=t.substr(0,g)+x.join("")}if(!i){var D=this.removeFormatting(a),M=L(D,n),Q=M.beforeDecimal,X=M.afterDecimal,Y=M.addNegation,ee=e<a.indexOf(m)+1;if(D.length<v.length&&ee&&Q===""&&!parseFloat(X))return Y?"-":""}return a},s.prototype.updateValue=function(e){var t=e.formattedValue,a=e.input,o=e.setCaretPosition;o===void 0&&(o=!0);var l=e.source,i=e.event,n=e.numAsString,u=e.caretPos,d=this.props,c=d.onValueChange,p=this.state,h=p.value;if(a){if(u===void 0&&o){var m=e.inputValue||a.value,v=_(a);a.value=t,u=this.getCaretPosition(m,t,v)}a.value=t,o&&this.setPatchedCaretPosition(a,u,t)}n===void 0&&(n=this.removeFormatting(t)),t!==h&&(this.setState({value:t,numAsString:n}),c(this.getValueObject(t,n),{event:i,source:l}))},s.prototype.onChange=function(e){var t=e.target,a=t.value,o=this,l=o.state,i=o.props,n=i.isAllowed,u=l.value||"",d=_(t);a=this.correctInputValue(d,u,a);var c=this.formatInput(a)||"",p=this.removeFormatting(c),h=this.getValueObject(c,p),m=n(h);m||(c=u),this.updateValue({formattedValue:c,numAsString:p,inputValue:a,input:t,event:e,source:"event"}),m&&i.onChange(e)},s.prototype.onBlur=function(e){var t=this,a=t.props,o=t.state,l=a.format,i=a.onBlur,n=a.allowLeadingZeros,u=o.numAsString,d=o.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!l){isNaN(parseFloat(u))&&(u=""),n||(u=ne(u));var c=this.formatNumString(u);if(c!==d){this.updateValue({formattedValue:c,numAsString:u,input:e.target,setCaretPosition:!1,event:e,source:"event"}),i(e);return}}i(e)},s.prototype.onKeyDown=function(e){var t=e.target,a=e.key,o=t.selectionStart,l=t.selectionEnd,i=t.value;i===void 0&&(i="");var n,u=this.props,d=u.decimalScale,c=u.fixedDecimalScale,p=u.prefix,h=u.suffix,m=u.format,v=u.onKeyDown,b=d!==void 0&&c,y=this.getNumberRegex(!1,b),w=new RegExp("-"),R=typeof m=="string";if(this.selectionBeforeInput={selectionStart:o,selectionEnd:l},a==="ArrowLeft"||a==="Backspace"?n=o-1:a==="ArrowRight"?n=o+1:a==="Delete"&&(n=o),n===void 0||o!==l){v(e);return}var g=n,N=R?m.indexOf("#"):p.length,V=R?m.lastIndexOf("#")+1:i.length-h.length;if(a==="ArrowLeft"||a==="ArrowRight"){var A=a==="ArrowLeft"?"left":"right";g=this.correctCaretPosition(i,n,A)}else if(a==="Delete"&&!y.test(i[n])&&!w.test(i[n]))for(;!y.test(i[g])&&g<V;)g++;else if(a==="Backspace"&&!y.test(i[n])){if(o<=N+1&&i[0]==="-"&&typeof m>"u"){var E=i.substring(1);this.updateValue({formattedValue:E,caretPos:g,input:t,event:e,source:"event"})}else if(!w.test(i[n])){for(;!y.test(i[g-1])&&g>N;)g--;g=this.correctCaretPosition(i,g,"left")}}(g!==n||n<N||n>V)&&(e.preventDefault(),this.setPatchedCaretPosition(t,g,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(t,g,i),v(e)},s.prototype.onMouseUp=function(e){var t=e.target,a=t.selectionStart,o=t.selectionEnd,l=t.value;if(l===void 0&&(l=""),a===o){var i=this.correctCaretPosition(l,a);i!==a&&this.setPatchedCaretPosition(t,i,l)}this.props.onMouseUp(e)},s.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout(function(){var a=e.target,o=a.selectionStart,l=a.selectionEnd,i=a.value;i===void 0&&(i="");var n=t.correctCaretPosition(i,o);n!==o&&!(o===0&&l===i.length)&&t.setPatchedCaretPosition(a,n,i),t.props.onFocus(e)},0)},s.prototype.render=function(){var e=this.props,t=e.type,a=e.displayType,o=e.customInput,l=e.renderText,i=e.getInputRef,n=e.format;e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value;var u=ce(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"]),d=u,c=this.state,p=c.value,h=c.mounted,m=h&&fe(n)?"numeric":void 0,v=Object.assign({inputMode:m},d,{type:t,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if(a==="text")return l?l(p,d)||null:F.createElement("span",Object.assign({},d,{ref:i}),p);if(o){var b=o;return F.createElement(b,Object.assign({},v,{ref:i}))}return F.createElement("input",Object.assign({},v,{ref:i}))},s}(F.Component);H.defaultProps=de;const pe=K.styled.div`
8
8
  display: flex;
9
9
  align-items: center;
10
10
 
@@ -52,7 +52,7 @@
52
52
  & input::placeholder {
53
53
  color: ${r=>S.getColorRgbaValue(r.theme,"Input",r.color,"enabled","placeholder")};
54
54
  }
55
- `,Q=K.styled.span`
55
+ `,J=K.styled.span`
56
56
  padding: 0 12px;
57
57
  color: ${r=>S.getColorRgbaValue(r.theme,"Input",r.focused===!0?"primary":r.color,"enabled","prefix")};
58
- `,he=K.styled(Q)``,X=V.forwardRef((r,s)=>{const{disabled:f,readOnly:e,debounceTime:t=0,prefix:a,suffix:i,thousandSeparator:l=".",decimalSeparator:o=",",decimalScale:n=2,fixedDecimalScale:u=!0,allowNegative:p=!0,onChange:c,onBlur:d,onFocus:g,onInputChange:m,className:y="",style:x={},size:N="small",color:P="primary",...T}=r,h=oe.useTheme(),[w,R]=V.useState(!1),A=V.useCallback(ae.debounce((b,D)=>E(b,D),t),[c]),E=(b,D)=>{c&&(c==null||c(b,D)),m==null||m(b,D)},j=(b,D)=>{A(D.event,b==null?void 0:b.floatValue)},B=()=>n<0?0:n>17?17:n,M=b=>{R(!0),g==null||g(b)},F=b=>{R(!1),d==null||d(b)};return k.jsxs(ge,{style:x,className:y,theme:h,color:P,size:N,prefix:a,suffix:i,focused:w,disabled:f,readOnly:e,children:[a&&k.jsx(Q,{theme:h,color:P,focused:w,className:"lnc-input-prefix",children:a}),k.jsx(J,{getInputRef:s,className:"lnc-decimal-input",disabled:f,readOnly:e,thousandSeparator:l,decimalSeparator:o,decimalScale:B(),fixedDecimalScale:u,allowNegative:p,onFocus:M,onBlur:F,onValueChange:j,...T}),i&&k.jsx(he,{theme:h,color:P,focused:w,className:"lnc-input-suffix",children:i})]})});X.propTypes={id:v.PropTypes.any,value:v.PropTypes.any,defaultValue:v.PropTypes.any,disabled:v.PropTypes.bool,readOnly:v.PropTypes.bool,debounceTime:v.PropTypes.number,prefix:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.element]),suffix:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.element]),thousandSeparator:v.PropTypes.oneOf([".",","," "]),decimalSeparator:v.PropTypes.oneOf([".",","]),decimalScale:v.PropTypes.number,fixedDecimalScale:v.PropTypes.bool,allowNegative:v.PropTypes.bool,onChange:v.PropTypes.func,onInputChange:v.PropTypes.func,onBlur:v.PropTypes.func,onFocus:v.PropTypes.func,className:v.PropTypes.string,style:v.PropTypes.object,size:v.PropTypes.oneOf(["small","medium","large"]),color:v.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=X;
58
+ `,me=K.styled(J)``,he=F.forwardRef((r,s)=>{const{disabled:f,readOnly:e,debounceTime:t=0,prefix:a,suffix:o,thousandSeparator:l=".",decimalSeparator:i=",",decimalScale:n=2,fixedDecimalScale:u=!0,allowNegative:d=!0,onChange:c,onBlur:p,onFocus:h,onInputChange:m,className:v="",style:b={},size:y="small",color:w="primary",...R}=r,g=re.useTheme(),[N,V]=F.useState(!1),A=F.useCallback(te.debounce((x,D)=>E(x,D),t),[c]),E=(x,D)=>{c&&(c==null||c(x,D)),m==null||m(x,D)},O=(x,D)=>{A(D.event,x==null?void 0:x.floatValue)},j=()=>n<0?0:n>17?17:n,B=x=>{V(!0),h==null||h(x)},P=x=>{V(!1),p==null||p(x)};return k.jsxs(pe,{style:b,className:v,theme:g,color:w,size:y,prefix:a,suffix:o,focused:N,disabled:f,readOnly:e,children:[a&&k.jsx(J,{theme:g,color:w,focused:N,className:"lnc-input-prefix",children:a}),k.jsx(H,{getInputRef:s,className:"lnc-decimal-input",disabled:f,readOnly:e,thousandSeparator:l,decimalSeparator:i,decimalScale:j(),fixedDecimalScale:u,allowNegative:d,onFocus:B,onBlur:P,onValueChange:O,...R}),o&&k.jsx(me,{theme:g,color:w,focused:N,className:"lnc-input-suffix",children:o})]})});module.exports=he;