@onewelcome/react-lib-components 0.2.0 → 0.2.1
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/dist/react-lib-components.cjs.development.js +2 -2
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +2 -2
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useWrapper.ts +9 -2
|
@@ -3693,14 +3693,14 @@ var useWrapper = function useWrapper(value, placeholder, type) {
|
|
|
3693
3693
|
setHasFocus = _useState5[1];
|
|
3694
3694
|
|
|
3695
3695
|
React.useEffect(function () {
|
|
3696
|
-
if (value != null && value.length && value.length > 0 || placeholder || type === 'datetime-local' || type === 'time') {
|
|
3696
|
+
if (value != null && value.length && value.length > 0 || placeholder || type === 'datetime-local' || type === 'time' || type === 'date') {
|
|
3697
3697
|
setFloatingLabelActive(true);
|
|
3698
3698
|
}
|
|
3699
3699
|
}, []);
|
|
3700
3700
|
React.useEffect(function () {
|
|
3701
3701
|
if (value != null && value.length && value.length > 0 || hasFocus) {
|
|
3702
3702
|
setFloatingLabelActive(true);
|
|
3703
|
-
} else if (!placeholder && !hasFocus && type !== 'datetime-local' && type !== 'time') {
|
|
3703
|
+
} else if (!placeholder && !hasFocus && type !== 'datetime-local' && type !== 'time' && type !== 'date') {
|
|
3704
3704
|
setFloatingLabelActive(false);
|
|
3705
3705
|
}
|
|
3706
3706
|
}, [value, placeholder, type, hasFocus]);
|