@dafaz-ui/react 4.0.0 → 4.0.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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +6 -0
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
- package/src/components/TextInput/index.tsx +2 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @dafaz-ui/react@4.0.
|
2
|
+
> @dafaz-ui/react@4.0.1 build
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -8,11 +8,11 @@
|
|
8
8
|
[34mCLI[39m Target: es6
|
9
9
|
[34mESM[39m Build start
|
10
10
|
[34mCJS[39m Build start
|
11
|
-
[
|
12
|
-
[
|
13
|
-
[
|
14
|
-
[
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m19.39 KB[39m
|
12
|
+
[32mESM[39m ⚡️ Build success in 42ms
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m21.90 KB[39m
|
14
|
+
[32mCJS[39m ⚡️ Build success in 43ms
|
15
15
|
[34mDTS[39m Build start
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4470ms
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m103.69 KB[39m
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m103.69 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
@@ -931,11 +931,13 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
931
931
|
var _b = _a, {
|
932
932
|
withShadow = false,
|
933
933
|
required = true,
|
934
|
-
requiredText = "Opcional"
|
934
|
+
requiredText = "Opcional",
|
935
|
+
id
|
935
936
|
} = _b, props = __objRest(_b, [
|
936
937
|
"withShadow",
|
937
938
|
"required",
|
938
|
-
"requiredText"
|
939
|
+
"requiredText",
|
940
|
+
"id"
|
939
941
|
]);
|
940
942
|
const [hiddenOptional, setHiddenOptional] = (0, import_react4.useState)(required);
|
941
943
|
function handleOnChange(event) {
|
@@ -948,7 +950,7 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
948
950
|
}
|
949
951
|
}
|
950
952
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(InputContainer, { withShadow, children: [
|
951
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InputUI, __spreadValues({ ref, onChange: handleOnChange }, props)),
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InputUI, __spreadValues({ id, ref, onChange: handleOnChange }, props)),
|
952
954
|
!hiddenOptional && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Sufix, { style: { marginLeft: `-${requiredText.length / 2}rem` }, children: requiredText })
|
953
955
|
] });
|
954
956
|
}
|
package/dist/index.mjs
CHANGED
@@ -885,11 +885,13 @@ var TextInput = forwardRef(
|
|
885
885
|
var _b = _a, {
|
886
886
|
withShadow = false,
|
887
887
|
required = true,
|
888
|
-
requiredText = "Opcional"
|
888
|
+
requiredText = "Opcional",
|
889
|
+
id
|
889
890
|
} = _b, props = __objRest(_b, [
|
890
891
|
"withShadow",
|
891
892
|
"required",
|
892
|
-
"requiredText"
|
893
|
+
"requiredText",
|
894
|
+
"id"
|
893
895
|
]);
|
894
896
|
const [hiddenOptional, setHiddenOptional] = useState(required);
|
895
897
|
function handleOnChange(event) {
|
@@ -902,7 +904,7 @@ var TextInput = forwardRef(
|
|
902
904
|
}
|
903
905
|
}
|
904
906
|
return /* @__PURE__ */ jsxs4(InputContainer, { withShadow, children: [
|
905
|
-
/* @__PURE__ */ jsx10(InputUI, __spreadValues({ ref, onChange: handleOnChange }, props)),
|
907
|
+
/* @__PURE__ */ jsx10(InputUI, __spreadValues({ id, ref, onChange: handleOnChange }, props)),
|
906
908
|
!hiddenOptional && /* @__PURE__ */ jsx10(Sufix, { style: { marginLeft: `-${requiredText.length / 2}rem` }, children: requiredText })
|
907
909
|
] });
|
908
910
|
}
|
package/package.json
CHANGED
@@ -21,6 +21,7 @@ export const TextInput = forwardRef<ElementRef<typeof InputUI>, TextInputProps>(
|
|
21
21
|
withShadow = false,
|
22
22
|
required = true,
|
23
23
|
requiredText = 'Opcional',
|
24
|
+
id,
|
24
25
|
...props
|
25
26
|
}: TextInputProps,
|
26
27
|
ref,
|
@@ -39,7 +40,7 @@ export const TextInput = forwardRef<ElementRef<typeof InputUI>, TextInputProps>(
|
|
39
40
|
|
40
41
|
return (
|
41
42
|
<InputContainer withShadow={withShadow}>
|
42
|
-
<InputUI ref={ref} onChange={handleOnChange} {...props} />
|
43
|
+
<InputUI id={id} ref={ref} onChange={handleOnChange} {...props} />
|
43
44
|
{!hiddenOptional && (
|
44
45
|
<Sufix style={{ marginLeft: `-${requiredText.length / 2}rem` }}>
|
45
46
|
{requiredText}
|