@govtechsg/sgds-web-component 3.0.5 → 3.0.6

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.
@@ -21517,16 +21517,6 @@
21517
21517
  blur() {
21518
21518
  this.input.blur();
21519
21519
  }
21520
- /** Programatically sets the invalid state of the input. Pass in boolean value in the argument */
21521
- setInvalid(bool) {
21522
- this.invalid = bool;
21523
- if (bool) {
21524
- this.emit("sgds-invalid");
21525
- }
21526
- else {
21527
- this.emit("sgds-valid");
21528
- }
21529
- }
21530
21520
  /**
21531
21521
  * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state
21532
21522
  * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput
@@ -21563,6 +21553,7 @@
21563
21553
  }
21564
21554
  _handleBlur() {
21565
21555
  const sgdsBlur = this.emit("sgds-blur", { cancelable: true });
21556
+ this.setInvalid(!this._mixinCheckValidity());
21566
21557
  if (sgdsBlur.defaultPrevented)
21567
21558
  return;
21568
21559
  this._isTouched = true;