@syncfusion/ej2-inputs 27.2.4 → 28.1.37

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 (195) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-inputs.min.js +3 -3
  3. package/dist/ej2-inputs.umd.min.js +3 -3
  4. package/dist/ej2-inputs.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-inputs.es2015.js +63 -65
  6. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  7. package/dist/es6/ej2-inputs.es5.js +64 -66
  8. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  9. package/dist/global/ej2-inputs.min.js +3 -3
  10. package/dist/global/ej2-inputs.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +10 -14
  13. package/src/common/signature-base.js +22 -11
  14. package/src/numerictextbox/numerictextbox.js +1 -1
  15. package/src/otp-input/otp-input.js +35 -49
  16. package/src/slider/slider.d.ts +1 -0
  17. package/src/slider/slider.js +5 -4
  18. package/src/uploader/uploader.js +1 -1
  19. package/styles/bds-lite.css +5293 -0
  20. package/styles/bds-lite.scss +37 -0
  21. package/styles/bds.css +8139 -0
  22. package/styles/bds.scss +46 -0
  23. package/styles/bootstrap-dark-lite.css +4 -0
  24. package/styles/bootstrap-dark.css +4 -0
  25. package/styles/bootstrap-lite.css +4 -0
  26. package/styles/bootstrap.css +4 -0
  27. package/styles/bootstrap4-lite.css +4 -1
  28. package/styles/bootstrap4.css +4 -1
  29. package/styles/bootstrap5-dark-lite.css +7 -4
  30. package/styles/bootstrap5-dark.css +7 -4
  31. package/styles/bootstrap5-lite.css +5 -2
  32. package/styles/bootstrap5.3-lite.css +4 -1
  33. package/styles/bootstrap5.3.css +4 -1
  34. package/styles/bootstrap5.css +5 -2
  35. package/styles/color-picker/_bigger.scss +46 -7
  36. package/styles/color-picker/_layout.scss +41 -3
  37. package/styles/color-picker/_tailwind3-definition.scss +152 -0
  38. package/styles/color-picker/_theme.scss +13 -2
  39. package/styles/color-picker/bds.css +1080 -0
  40. package/styles/color-picker/bds.scss +12 -0
  41. package/styles/color-picker/bootstrap-dark.css +3 -0
  42. package/styles/color-picker/bootstrap.css +3 -0
  43. package/styles/color-picker/bootstrap4.css +3 -0
  44. package/styles/color-picker/bootstrap5-dark.css +3 -0
  45. package/styles/color-picker/bootstrap5.3.css +3 -0
  46. package/styles/color-picker/bootstrap5.css +3 -0
  47. package/styles/color-picker/fabric-dark.css +3 -0
  48. package/styles/color-picker/fabric.css +3 -0
  49. package/styles/color-picker/fluent-dark.css +3 -0
  50. package/styles/color-picker/fluent.css +3 -0
  51. package/styles/color-picker/fluent2.css +3 -0
  52. package/styles/color-picker/highcontrast-light.css +3 -0
  53. package/styles/color-picker/highcontrast.css +3 -0
  54. package/styles/color-picker/icons/_tailwind3.scss +9 -0
  55. package/styles/color-picker/material-dark.css +3 -0
  56. package/styles/color-picker/material.css +3 -0
  57. package/styles/color-picker/material3-dark.css +3 -0
  58. package/styles/color-picker/material3.css +3 -0
  59. package/styles/color-picker/tailwind-dark.css +3 -0
  60. package/styles/color-picker/tailwind.css +3 -0
  61. package/styles/color-picker/tailwind3.css +880 -0
  62. package/styles/color-picker/tailwind3.scss +12 -0
  63. package/styles/data-form/_tailwind3-definition.scss +41 -0
  64. package/styles/data-form/bds.css +236 -0
  65. package/styles/data-form/bds.scss +3 -0
  66. package/styles/data-form/tailwind3.css +236 -0
  67. package/styles/data-form/tailwind3.scss +3 -0
  68. package/styles/fabric-dark-lite.css +4 -0
  69. package/styles/fabric-dark.css +4 -0
  70. package/styles/fabric-lite.css +4 -0
  71. package/styles/fabric.css +4 -0
  72. package/styles/fluent-dark-lite.css +8 -5
  73. package/styles/fluent-dark.css +8 -5
  74. package/styles/fluent-lite.css +6 -3
  75. package/styles/fluent.css +6 -3
  76. package/styles/fluent2-lite.css +10 -6
  77. package/styles/fluent2.css +11 -7
  78. package/styles/highcontrast-light-lite.css +3 -0
  79. package/styles/highcontrast-light.css +3 -0
  80. package/styles/highcontrast-lite.css +3 -0
  81. package/styles/highcontrast.css +3 -0
  82. package/styles/input/_bigger.scss +124 -120
  83. package/styles/input/_layout.scss +143 -121
  84. package/styles/input/_tailwind3-definition.scss +511 -0
  85. package/styles/input/_theme.scss +67 -40
  86. package/styles/input/bds.css +4537 -0
  87. package/styles/input/bds.scss +5 -0
  88. package/styles/input/fluent2.css +2 -2
  89. package/styles/input/icons/_tailwind3.scss +17 -0
  90. package/styles/input/tailwind-dark.css +2 -0
  91. package/styles/input/tailwind.css +2 -0
  92. package/styles/input/tailwind3.css +8926 -0
  93. package/styles/input/tailwind3.scss +5 -0
  94. package/styles/maskedtextbox/_tailwind3-definition.scss +7 -0
  95. package/styles/maskedtextbox/bds.css +180 -0
  96. package/styles/maskedtextbox/bds.scss +5 -0
  97. package/styles/maskedtextbox/fluent2.css +1 -1
  98. package/styles/maskedtextbox/tailwind3.css +47 -0
  99. package/styles/maskedtextbox/tailwind3.scss +5 -0
  100. package/styles/material-dark-lite.css +4 -0
  101. package/styles/material-dark.css +4 -0
  102. package/styles/material-lite.css +4 -0
  103. package/styles/material.css +4 -0
  104. package/styles/material3-dark-lite.css +8 -4
  105. package/styles/material3-dark.css +8 -4
  106. package/styles/material3-lite.css +8 -4
  107. package/styles/material3.css +8 -4
  108. package/styles/numerictextbox/_tailwind3-definition.scss +3 -0
  109. package/styles/numerictextbox/bds.css +197 -0
  110. package/styles/numerictextbox/bds.scss +6 -0
  111. package/styles/numerictextbox/icons/_tailwind3.scss +11 -0
  112. package/styles/numerictextbox/tailwind3.css +64 -0
  113. package/styles/numerictextbox/tailwind3.scss +6 -0
  114. package/styles/otp-input/_tailwind3-definition.scss +59 -0
  115. package/styles/otp-input/bds.css +230 -0
  116. package/styles/otp-input/bds.scss +4 -0
  117. package/styles/otp-input/tailwind3.css +230 -0
  118. package/styles/otp-input/tailwind3.scss +4 -0
  119. package/styles/rating/_tailwind3-definition.scss +47 -0
  120. package/styles/rating/bds.css +323 -0
  121. package/styles/rating/bds.scss +5 -0
  122. package/styles/rating/tailwind3.css +319 -0
  123. package/styles/rating/tailwind3.scss +5 -0
  124. package/styles/signature/_layout.scss +3 -0
  125. package/styles/signature/_tailwind3-definition.scss +3 -0
  126. package/styles/signature/bds.css +13 -0
  127. package/styles/signature/bds.scss +3 -0
  128. package/styles/signature/tailwind3.css +15 -0
  129. package/styles/signature/tailwind3.scss +3 -0
  130. package/styles/slider/_layout.scss +29 -15
  131. package/styles/slider/_tailwind3-definition.scss +92 -0
  132. package/styles/slider/_theme.scss +4 -2
  133. package/styles/slider/bds.css +620 -0
  134. package/styles/slider/bds.scss +6 -0
  135. package/styles/slider/bootstrap-dark.css +1 -0
  136. package/styles/slider/bootstrap.css +1 -0
  137. package/styles/slider/bootstrap4.css +1 -1
  138. package/styles/slider/bootstrap5.3.css +1 -1
  139. package/styles/slider/fabric-dark.css +1 -0
  140. package/styles/slider/fabric.css +1 -0
  141. package/styles/slider/fluent-dark.css +1 -1
  142. package/styles/slider/fluent.css +1 -1
  143. package/styles/slider/fluent2.css +3 -2
  144. package/styles/slider/material-dark.css +1 -0
  145. package/styles/slider/material.css +1 -0
  146. package/styles/slider/material3-dark.css +1 -0
  147. package/styles/slider/material3.css +1 -0
  148. package/styles/slider/tailwind3.css +442 -0
  149. package/styles/slider/tailwind3.scss +6 -0
  150. package/styles/smart-textarea/_bootstrap5-definition.scss +3 -3
  151. package/styles/smart-textarea/_fluent-definition.scss +3 -3
  152. package/styles/smart-textarea/_material3-definition.scss +3 -3
  153. package/styles/smart-textarea/_tailwind-definition.scss +3 -3
  154. package/styles/smart-textarea/_tailwind3-definition.scss +3 -0
  155. package/styles/smart-textarea/_theme.scss +2 -29
  156. package/styles/smart-textarea/bds.css +67 -0
  157. package/styles/smart-textarea/bds.scss +4 -0
  158. package/styles/smart-textarea/bootstrap5-dark.css +4 -4
  159. package/styles/smart-textarea/bootstrap5.css +2 -2
  160. package/styles/smart-textarea/fluent-dark.css +4 -4
  161. package/styles/smart-textarea/fluent.css +2 -2
  162. package/styles/smart-textarea/material3-dark.css +4 -4
  163. package/styles/smart-textarea/material3.css +4 -4
  164. package/styles/smart-textarea/tailwind-dark.css +4 -4
  165. package/styles/smart-textarea/tailwind.css +2 -2
  166. package/styles/smart-textarea/tailwind3.css +67 -0
  167. package/styles/smart-textarea/tailwind3.scss +4 -0
  168. package/styles/tailwind-dark-lite.css +9 -4
  169. package/styles/tailwind-dark.css +9 -4
  170. package/styles/tailwind-lite.css +7 -2
  171. package/styles/tailwind.css +7 -2
  172. package/styles/tailwind3-lite.css +7247 -0
  173. package/styles/tailwind3-lite.scss +37 -0
  174. package/styles/tailwind3.css +12252 -0
  175. package/styles/tailwind3.scss +46 -0
  176. package/styles/textarea/_tailwind3-definition.scss +1 -0
  177. package/styles/textarea/bds.css +183 -0
  178. package/styles/textarea/bds.scss +5 -0
  179. package/styles/textarea/tailwind3.css +50 -0
  180. package/styles/textarea/tailwind3.scss +5 -0
  181. package/styles/textbox/_tailwind3-definition.scss +4 -0
  182. package/styles/textbox/bds.css +177 -0
  183. package/styles/textbox/bds.scss +5 -0
  184. package/styles/textbox/tailwind3.css +44 -0
  185. package/styles/textbox/tailwind3.scss +5 -0
  186. package/styles/uploader/_bigger.scss +3 -0
  187. package/styles/uploader/_layout.scss +3 -0
  188. package/styles/uploader/_tailwind3-definition.scss +211 -0
  189. package/styles/uploader/_theme.scss +21 -0
  190. package/styles/uploader/bds.css +1124 -0
  191. package/styles/uploader/bds.scss +7 -0
  192. package/styles/uploader/fluent2.css +2 -2
  193. package/styles/uploader/icons/_tailwind3.scss +34 -0
  194. package/styles/uploader/tailwind3.css +1036 -0
  195. package/styles/uploader/tailwind3.scss +7 -0
@@ -1872,8 +1872,8 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
1872
1872
  var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
1873
1873
  this.setElementValue(elementValue);
1874
1874
  attributes(this.element, { 'aria-valuenow': value });
1875
- this.hiddenInput.value = this.value.toString();
1876
1875
  if (!isNullOrUndefined(this.hiddenInput)) {
1876
+ this.hiddenInput.value = this.value.toString();
1877
1877
  if (this.value !== null && this.serverDecimalSeparator) {
1878
1878
  this.hiddenInput.value = this.hiddenInput.value.replace('.', this.serverDecimalSeparator);
1879
1879
  }
@@ -4614,6 +4614,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4614
4614
  || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
4615
4615
  this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
4616
4616
  this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
4617
+ this.isTailwind3 = this.getTheme(this.sliderContainer) === 'tailwind3' || this.getTheme(this.sliderContainer) === 'tailwind3-dark';
4617
4618
  this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
4618
4619
  this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
4619
4620
  this.isFluent2 = this.getTheme(this.sliderContainer) === 'fluent2';
@@ -5133,8 +5134,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5133
5134
  };
5134
5135
  Slider.prototype.renderTooltip = function () {
5135
5136
  this.tooltipObj = new Tooltip({
5136
- showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 ||
5137
- this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent || this.isFluent2 || this.isBootstrap5Dot3,
5137
+ showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind
5138
+ || this.isTailwind3 || this.isBootstrap5 || this.isFluent || this.isFluent2 || this.isBootstrap5Dot3,
5138
5139
  cssClass: classNames.sliderTooltip,
5139
5140
  height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
5140
5141
  animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
@@ -5171,13 +5172,13 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5171
5172
  Slider.prototype.setButtons = function () {
5172
5173
  this.firstBtn = this.createElement('div', { className: classNames.sliderButton + ' ' + classNames.firstButton });
5173
5174
  this.firstBtn.appendChild(this.createElement('span', { className: classNames.sliderButtonIcon }));
5174
- if (this.isTailwind) {
5175
+ if (this.isTailwind || this.isTailwind3) {
5175
5176
  this.firstBtn.querySelector('span').classList.add('e-icons');
5176
5177
  }
5177
5178
  this.firstBtn.tabIndex = -1;
5178
5179
  this.secondBtn = this.createElement('div', { className: classNames.sliderButton + ' ' + classNames.secondButton });
5179
5180
  this.secondBtn.appendChild(this.createElement('span', { className: classNames.sliderButtonIcon }));
5180
- if (this.isTailwind) {
5181
+ if (this.isTailwind || this.isTailwind3) {
5181
5182
  this.secondBtn.querySelector('span').classList.add('e-icons');
5182
5183
  }
5183
5184
  this.secondBtn.tabIndex = -1;
@@ -9130,7 +9131,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9130
9131
  }
9131
9132
  for (var file = 0; file < item.length; file++) {
9132
9133
  var pasteFile = [].slice.call(item)[file];
9133
- if ((pasteFile.kind === 'file') || pasteFile.type.match('^image/')) {
9134
+ if (!isNullOrUndefined(pasteFile.getAsFile()) && ((pasteFile.kind === 'file') || pasteFile.type.match('^image/'))) {
9134
9135
  this.renderSelectedFiles(event, [pasteFile.getAsFile()], false, true);
9135
9136
  }
9136
9137
  }
@@ -15879,13 +15880,17 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15879
15880
  };
15880
15881
  SignatureBase.prototype.unwireEvents = function (type) {
15881
15882
  if (type === 'mouseup' || type === 'touchend') {
15882
- EventHandler.remove(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler);
15883
- EventHandler.remove(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler);
15883
+ if (this.canvasContext) {
15884
+ EventHandler.remove(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler);
15885
+ EventHandler.remove(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler);
15886
+ }
15884
15887
  EventHandler.remove(document, 'mouseup', this.mouseUpHandler);
15885
15888
  }
15886
15889
  else {
15887
- EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
15888
- EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
15890
+ if (this.canvasContext) {
15891
+ EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
15892
+ EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
15893
+ }
15889
15894
  window.removeEventListener('resize', this.resizeHandler);
15890
15895
  }
15891
15896
  };
@@ -15995,10 +16000,11 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15995
16000
  SignatureBase.prototype.resizeHandler = function () {
15996
16001
  // eslint-disable-next-line @typescript-eslint/no-this-alias
15997
16002
  var proxy = this;
15998
- if (this.isResponsive && this.canRedraw) {
16003
+ if (this.isResponsive && this.canRedraw && this.canvasContext && this.element) {
15999
16004
  this.canvasContext.canvas.width = this.element.offsetWidth;
16000
16005
  this.canvasContext.canvas.height = this.element.offsetHeight;
16001
16006
  this.canvasContext.scale(1, 1);
16007
+ this.canvasContext.fillStyle = this.strokeColor;
16002
16008
  var pointSize = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
16003
16009
  for (var i = 0; i < this.signRatioPointsColl.length; i++) {
16004
16010
  this.arcDraw((this.signRatioPointsColl[i].x * this.canvasContext.canvas.width), (this.signRatioPointsColl[i].y * this.canvasContext.canvas.height), pointSize);
@@ -16007,7 +16013,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
16007
16013
  this.canvasContext.closePath();
16008
16014
  this.canvasContext.fill();
16009
16015
  }
16010
- else {
16016
+ else if (this.canvasContext && this.element) {
16011
16017
  var restoreImg_1 = new Image();
16012
16018
  restoreImg_1.src = this.snapColl[this.incStep];
16013
16019
  restoreImg_1.onload = function () {
@@ -16259,10 +16265,12 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
16259
16265
  if (this.incStep > 0) {
16260
16266
  var canvasNew = this.createElement('canvas', { className: 'e-' + this.getModuleName() + '-wrapper' });
16261
16267
  var canvasContextNew = canvasNew.getContext('2d');
16262
- canvasNew.width = this.canvasContext.canvas.width;
16263
- canvasNew.height = this.canvasContext.canvas.height;
16264
- canvasContextNew.drawImage(this.canvasContext.canvas, 0, 0, canvasNew.width, canvasNew.height);
16265
- this.snapColl.push(canvasNew.toDataURL());
16268
+ if (this.canvasContext) {
16269
+ canvasNew.width = this.canvasContext.canvas.width;
16270
+ canvasNew.height = this.canvasContext.canvas.height;
16271
+ canvasContextNew.drawImage(this.canvasContext.canvas, 0, 0, canvasNew.width, canvasNew.height);
16272
+ this.snapColl.push(canvasNew.toDataURL());
16273
+ }
16266
16274
  }
16267
16275
  else {
16268
16276
  this.snapColl.push(this.canvasContext.canvas.toDataURL());
@@ -16593,7 +16601,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
16593
16601
  }
16594
16602
  else if (type === 'Svg') {
16595
16603
  fileName = fileName || 'Signature';
16596
- this.toSVG(fileName, this.canvasContext.canvas.toDataURL('image/png'));
16604
+ this.toSVG(fileName);
16597
16605
  }
16598
16606
  else if (type === 'Jpeg') {
16599
16607
  fileName = fileName || 'Signature';
@@ -16741,8 +16749,12 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
16741
16749
  removeClass([this.element], 'e-' + this.getModuleName());
16742
16750
  this.element.removeAttribute('tabindex');
16743
16751
  this.pointColl = null;
16752
+ this.tempContext = null;
16753
+ this.tempCanvas = null;
16754
+ this.canvasContext = null;
16744
16755
  }
16745
16756
  _super.prototype.destroy.call(this);
16757
+ this.element = null;
16746
16758
  };
16747
16759
  /**
16748
16760
  * Modified onPropertyChanged method for both blazor and EJ2 signature component.
@@ -17975,14 +17987,14 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
17975
17987
  var valueContainer = this.getDefaultValue();
17976
17988
  var inputValue = '';
17977
17989
  if (valueContainer) {
17990
+ var valueAtIndex = valueContainer[parseInt(index.toString(), 10)];
17978
17991
  if (this.type === 'number') {
17979
- var valueAtIndex = valueContainer[parseInt(index.toString(), 10)];
17980
17992
  if (!isNaN(Number(valueAtIndex))) {
17981
17993
  inputValue = valueAtIndex;
17982
17994
  }
17983
17995
  }
17984
17996
  else {
17985
- inputValue = valueContainer[parseInt(index.toString(), 10)] || '';
17997
+ inputValue = valueAtIndex || '';
17986
17998
  }
17987
17999
  }
17988
18000
  var inputEle = this.createElement('input', {
@@ -17991,7 +18003,7 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
17991
18003
  attrs: {
17992
18004
  maxlength: '1',
17993
18005
  type: this.type,
17994
- inputmode: 'inputmode' in this.htmlAttributes ? this.htmlAttributes['inputmode'] : (this.type === 'number' ? 'numeric' : 'text')
18006
+ inputmode: this.htmlAttributes['inputmode'] || (this.type === 'number' ? 'numeric' : 'text')
17995
18007
  }
17996
18008
  });
17997
18009
  if (this.disabled) {
@@ -18017,27 +18029,28 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18017
18029
  }
18018
18030
  };
18019
18031
  OtpInput.prototype.updateSeparatorValue = function () {
18032
+ var _this = this;
18020
18033
  if (this.separator === '') {
18021
- for (var i = 0; i < this.separatorElements.length; i++) {
18022
- remove(this.separatorElements[parseInt(i.toString(), 10)]);
18023
- }
18034
+ this.separatorElements.forEach(function (element) { return remove(element); });
18024
18035
  this.separatorElements = [];
18025
- return;
18026
18036
  }
18027
- for (var i = 0; i < this.separatorElements.length; i++) {
18028
- this.separatorElements[parseInt(i.toString(), 10)].textContent = this.separator;
18037
+ else {
18038
+ this.separatorElements.forEach(function (element) {
18039
+ element.textContent = _this.separator;
18040
+ });
18029
18041
  }
18030
18042
  };
18031
18043
  OtpInput.prototype.addPlaceHolder = function () {
18032
18044
  for (var i = 0; i < this.inputs.length; i++) {
18033
- this.setElementAttributes({ 'placeholder': this.placeholder.length === 1 || this.placeholder.length === 0 ? this.placeholder : this.placeholder.charAt(i) }, this.inputs[parseInt(i.toString(), 10)]);
18045
+ var placeholderValue = this.placeholder.length <= 1 ? this.placeholder : this.placeholder.charAt(i);
18046
+ this.setElementAttributes({ 'placeholder': placeholderValue }, this.inputs[parseInt(i.toString(), 10)]);
18034
18047
  }
18035
18048
  };
18036
18049
  OtpInput.prototype.updateInputType = function (inputType) {
18037
- var _this = this;
18050
+ var inputMode = this.htmlAttributes['inputmode'] || (inputType === 'number' ? 'numeric' : 'text');
18038
18051
  this.inputs.forEach(function (input) {
18039
18052
  input.type = inputType;
18040
- input.setAttribute('inputmode', 'inputmode' in _this.htmlAttributes ? _this.htmlAttributes['inputmode'] : (inputType === 'number' ? 'numeric' : 'text'));
18053
+ input.setAttribute('inputmode', inputMode);
18041
18054
  });
18042
18055
  };
18043
18056
  OtpInput.prototype.getDefaultValue = function () {
@@ -18047,10 +18060,7 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18047
18060
  }
18048
18061
  // To remove the white space if present.
18049
18062
  var value = extractedValue.replace(/\s/g, '');
18050
- if (value.length > 0) {
18051
- return value.split('');
18052
- }
18053
- return undefined;
18063
+ return value.length > 0 ? value.split('') : undefined;
18054
18064
  };
18055
18065
  OtpInput.prototype.getTransformedText = function (transformingText) {
18056
18066
  var transformedText = this.textTransform.toLowerCase() === TextTransform.Lowercase ? transformingText.toLowerCase() :
@@ -18091,12 +18101,10 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18091
18101
  value = currentInputElement.value;
18092
18102
  currentInputElement.value = '';
18093
18103
  }
18094
- else {
18095
- if (index !== this.inputs.length - 1) {
18096
- value = nextInputElement.value;
18097
- nextInputElement.value = '';
18098
- nextInputElement.focus();
18099
- }
18104
+ else if (index !== this.inputs.length - 1) {
18105
+ value = nextInputElement.value;
18106
+ nextInputElement.value = '';
18107
+ nextInputElement.focus();
18100
18108
  }
18101
18109
  if (value.length > 0) {
18102
18110
  this.triggerInputEvent(index, event);
@@ -18113,28 +18121,22 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18113
18121
  }
18114
18122
  }
18115
18123
  else if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
18116
- if (event.key === 'ArrowLeft') {
18117
- if (index > 0) {
18118
- previousInputElement.focus();
18119
- previousInputElement.select();
18120
- }
18124
+ if (event.key === 'ArrowLeft' && index > 0) {
18125
+ previousInputElement.focus();
18126
+ previousInputElement.select();
18121
18127
  }
18122
- else {
18123
- if (index < this.inputs.length - 1) {
18124
- nextInputElement.focus();
18125
- nextInputElement.select();
18126
- }
18128
+ else if (event.key === 'ArrowRight' && index < this.inputs.length - 1) {
18129
+ nextInputElement.focus();
18130
+ nextInputElement.select();
18127
18131
  }
18128
18132
  event.preventDefault();
18129
18133
  }
18130
18134
  else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
18131
18135
  event.preventDefault();
18132
18136
  }
18133
- else {
18134
- if (event.key !== 'Tab' && !event.shiftKey && !event.ctrlKey) {
18135
- if (this.type === 'number' && (/\D/.test(event.key.toLocaleLowerCase()))) {
18136
- event.preventDefault();
18137
- }
18137
+ else if (event.key !== 'Tab' && !event.shiftKey && !event.ctrlKey) {
18138
+ if (this.type === 'number' && (/\D/.test(event.key.toLocaleLowerCase()))) {
18139
+ event.preventDefault();
18138
18140
  }
18139
18141
  }
18140
18142
  };
@@ -18253,9 +18255,9 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18253
18255
  if (this.textTransform) {
18254
18256
  stringifiedValue = this.getTransformedText(stringifiedValue);
18255
18257
  }
18258
+ var previousStringValue = previousValue.toString();
18256
18259
  for (var i = 0; i < this.inputs.length; i++) {
18257
- var isValueChanged = previousValue.toString().charAt(i) !== stringifiedValue.charAt(i);
18258
- if (isValueChanged) {
18260
+ if (previousStringValue.charAt(i) !== stringifiedValue.charAt(i)) {
18259
18261
  this.inputs[parseInt(i.toString(), 10)].value = stringifiedValue.charAt(i);
18260
18262
  this.hiddenInputEle.value = stringifiedValue;
18261
18263
  }
@@ -18276,10 +18278,10 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18276
18278
  }
18277
18279
  };
18278
18280
  OtpInput.prototype.updateVariantClass = function () {
18279
- var variantClass = this.stylingMode.toLocaleLowerCase();
18280
- variantClass = variantClass === 'outlined' ? 'outline' : variantClass;
18281
- if (variantClass === 'underlined' || variantClass === 'filled' || variantClass === 'outline') {
18282
- removeClass([this.element], ['e-underlined', 'e-filled', 'e-outline']);
18281
+ var variantClass = this.stylingMode.toLocaleLowerCase() === 'outlined' ? 'outline' : this.stylingMode.toLocaleLowerCase();
18282
+ var validClasses = ['underlined', 'filled', 'outline'];
18283
+ if (validClasses.indexOf(variantClass) !== -1) {
18284
+ removeClass([this.element], validClasses.map(function (cls) { return "e-" + cls; }));
18283
18285
  addClass([this.element], "e-" + variantClass);
18284
18286
  }
18285
18287
  };
@@ -18381,12 +18383,8 @@ var OtpInput = /** @__PURE__ @class */ (function (_super) {
18381
18383
  OtpInput.prototype.destroy = function () {
18382
18384
  _super.prototype.destroy.call(this);
18383
18385
  this.unWireEvents();
18384
- for (var i = 0; i < this.inputs.length; i++) {
18385
- remove(this.inputs[parseInt(i.toString(), 10)]);
18386
- }
18387
- for (var i = 0; i < this.separatorElements.length; i++) {
18388
- remove(this.separatorElements[parseInt(i.toString(), 10)]);
18389
- }
18386
+ this.inputs.forEach(function (input) { remove(input); });
18387
+ this.separatorElements.forEach(function (separatorElement) { remove(separatorElement); });
18390
18388
  remove(this.hiddenInputEle);
18391
18389
  removeClass([this.element], ['e-underlined', 'e-filled', 'e-outline', 'e-rtl']);
18392
18390
  if (this.cssClass) {