@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @dafaz-ui/react@4.0.0 build
2
+ > @dafaz-ui/react@4.0.1 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 21.88 KB
12
- CJS ⚡️ Build success in 41ms
13
- ESM dist/index.mjs 19.36 KB
14
- ESM ⚡️ Build success in 41ms
11
+ ESM dist/index.mjs 19.39 KB
12
+ ESM ⚡️ Build success in 42ms
13
+ CJS dist/index.js 21.90 KB
14
+ CJS ⚡️ Build success in 43ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4569ms
16
+ DTS ⚡️ Build success in 4470ms
17
17
  DTS dist/index.d.mts 103.69 KB
18
18
  DTS dist/index.d.ts 103.69 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @dafaz-ui/react
2
2
 
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix InputText
8
+
3
9
  ## 4.0.0
4
10
 
5
11
  ### Major Changes
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dafaz-ui/react",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -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}