@govtechsg/sgds-web-component 3.0.5 → 3.0.7-rc.0
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.
- package/components/Datepicker/index.umd.js +1 -10
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Input/index.umd.js +1 -10
- package/components/Input/index.umd.js.map +1 -1
- package/components/Input/sgds-input.d.ts +0 -2
- package/components/Input/sgds-input.js +1 -10
- package/components/Input/sgds-input.js.map +1 -1
- package/components/Mainnav/index.umd.js +4176 -4009
- package/components/Mainnav/index.umd.js.map +1 -1
- package/components/Mainnav/sgds-mainnav.d.ts +3 -3
- package/components/Mainnav/sgds-mainnav.js +4 -4
- package/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +1 -10
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/index.umd.js +4 -13
- package/components/index.umd.js.map +1 -1
- package/css/grid.css +55 -16
- package/index.umd.js +4 -13
- package/index.umd.js.map +1 -1
- package/package.json +1 -4
- package/react/components/Input/sgds-input.cjs.js +1 -10
- package/react/components/Input/sgds-input.cjs.js.map +1 -1
- package/react/components/Input/sgds-input.js +1 -10
- package/react/components/Input/sgds-input.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.cjs.js +4 -4
- package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.js +4 -4
- package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/themes/root.css +17 -6
|
@@ -19306,16 +19306,6 @@
|
|
|
19306
19306
|
blur() {
|
|
19307
19307
|
this.input.blur();
|
|
19308
19308
|
}
|
|
19309
|
-
/** Programatically sets the invalid state of the input. Pass in boolean value in the argument */
|
|
19310
|
-
setInvalid(bool) {
|
|
19311
|
-
this.invalid = bool;
|
|
19312
|
-
if (bool) {
|
|
19313
|
-
this.emit("sgds-invalid");
|
|
19314
|
-
}
|
|
19315
|
-
else {
|
|
19316
|
-
this.emit("sgds-valid");
|
|
19317
|
-
}
|
|
19318
|
-
}
|
|
19319
19309
|
/**
|
|
19320
19310
|
* Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state
|
|
19321
19311
|
* 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
|
|
@@ -19352,6 +19342,7 @@
|
|
|
19352
19342
|
}
|
|
19353
19343
|
_handleBlur() {
|
|
19354
19344
|
const sgdsBlur = this.emit("sgds-blur", { cancelable: true });
|
|
19345
|
+
this.setInvalid(!this._mixinCheckValidity());
|
|
19355
19346
|
if (sgdsBlur.defaultPrevented)
|
|
19356
19347
|
return;
|
|
19357
19348
|
this._isTouched = true;
|