@dafaz-ui/react 4.0.0 → 4.0.2
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 +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
- package/src/components/TextInput/index.tsx +3 -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.2 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 38ms
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m21.90 KB[39m
|
14
|
+
[32mCJS[39m ⚡️ Build success in 38ms
|
15
15
|
[34mDTS[39m Build start
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m103.
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m103.
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4507ms
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m103.71 KB[39m
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m103.71 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
@@ -1962,6 +1962,7 @@ interface TextInputProps extends ComponentProps<typeof InputUI> {
|
|
1962
1962
|
withShadow?: boolean;
|
1963
1963
|
placeholder?: string;
|
1964
1964
|
type?: string;
|
1965
|
+
id: string;
|
1965
1966
|
}
|
1966
1967
|
declare const TextInput: react.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
1967
1968
|
|
package/dist/index.d.ts
CHANGED
@@ -1962,6 +1962,7 @@ interface TextInputProps extends ComponentProps<typeof InputUI> {
|
|
1962
1962
|
withShadow?: boolean;
|
1963
1963
|
placeholder?: string;
|
1964
1964
|
type?: string;
|
1965
|
+
id: string;
|
1965
1966
|
}
|
1966
1967
|
declare const TextInput: react.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
1967
1968
|
|
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
@@ -13,6 +13,7 @@ export interface TextInputProps extends ComponentProps<typeof InputUI> {
|
|
13
13
|
withShadow?: boolean
|
14
14
|
placeholder?: string
|
15
15
|
type?: string
|
16
|
+
id: string
|
16
17
|
}
|
17
18
|
|
18
19
|
export const TextInput = forwardRef<ElementRef<typeof InputUI>, TextInputProps>(
|
@@ -21,6 +22,7 @@ export const TextInput = forwardRef<ElementRef<typeof InputUI>, TextInputProps>(
|
|
21
22
|
withShadow = false,
|
22
23
|
required = true,
|
23
24
|
requiredText = 'Opcional',
|
25
|
+
id,
|
24
26
|
...props
|
25
27
|
}: TextInputProps,
|
26
28
|
ref,
|
@@ -39,7 +41,7 @@ export const TextInput = forwardRef<ElementRef<typeof InputUI>, TextInputProps>(
|
|
39
41
|
|
40
42
|
return (
|
41
43
|
<InputContainer withShadow={withShadow}>
|
42
|
-
<InputUI ref={ref} onChange={handleOnChange} {...props} />
|
44
|
+
<InputUI id={id} ref={ref} onChange={handleOnChange} {...props} />
|
43
45
|
{!hiddenOptional && (
|
44
46
|
<Sufix style={{ marginLeft: `-${requiredText.length / 2}rem` }}>
|
45
47
|
{requiredText}
|