@edu-tosel/design 1.0.153 → 1.0.154
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/package.json +2 -1
- package/version.txt +1 -1
- package/widget/template/Input/Form.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edu-tosel/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.154",
|
|
4
4
|
"description": "UI components for International TOSEL Committee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsx",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"scripts": {},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@edu-tosel/design": "^1.0.153",
|
|
17
18
|
"@gsap/react": "^2.1.1",
|
|
18
19
|
"date-fns": "^2.30.0",
|
|
19
20
|
"date-fns-tz": "^2.0.1",
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.154
|
|
@@ -32,10 +32,11 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
|
|
|
32
32
|
return green;
|
|
33
33
|
return red;
|
|
34
34
|
};
|
|
35
|
+
const placeholderString = typeof placeholder === "function" ? placeholder() : placeholder;
|
|
35
36
|
const inputBox = {
|
|
36
37
|
styles: styleByFlag(),
|
|
37
38
|
sizes: "w-full sm:w-102.5 h-13.5",
|
|
38
|
-
paddings: `${
|
|
39
|
+
paddings: `${placeholderString && "pt-3"} pl-5`,
|
|
39
40
|
fonts: "text-sm",
|
|
40
41
|
boundaries: "rounded-md outline-none",
|
|
41
42
|
focuses: onFocus ? "border " : "border-0",
|
|
@@ -43,7 +44,7 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
|
|
|
43
44
|
!(isValid === false) &&
|
|
44
45
|
"shadow-[0px_0px_10px_0px_rgba(16,86,82,0.38)]",
|
|
45
46
|
};
|
|
46
|
-
return (_jsxs("div", { children: [title && _jsx("div", { className: "text-gray-dark", children: title }), _jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children:
|
|
47
|
+
return (_jsxs("div", { children: [title && _jsx("div", { className: "text-gray-dark", children: title }), _jsxs("div", { className: cn(container), children: [_jsx("div", { onClick: () => ref.current?.focus(), className: cn(placeholderBox), children: placeholderString }), _jsx("input", { ref: ref, className: cn(inputBox), value: value, onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => {
|
|
47
48
|
if (maxLength && e.target.value.length > maxLength)
|
|
48
49
|
return;
|
|
49
50
|
setValue(e.target.value);
|