@kbgarcia8/react-dynamic-form 2.0.0 → 2.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,4 +1,4 @@
1
1
  import type { ButtonProps } from "../../../type/propTypes";
2
- declare const Button: ({ onClick, id, buttonType, source, svg, alt, text, className, dataAttributes }: ButtonProps) => import("react/jsx-runtime").JSX.Element | undefined;
2
+ declare const Button: ({ onClick, id, buttonType, source, svg, alt, text, className, dataAttributes }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Button;
4
4
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,gFAUd,WAAW,wDAiCZ,CAAA;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,QAAA,MAAM,MAAM,GAAI,gFAUd,WAAW,4CA+BZ,CAAA;AAED,eAAe,MAAM,CAAC"}
@@ -39,7 +39,7 @@
39
39
  display: flex;
40
40
  align-items: center;
41
41
  justify-content: center;
42
- `,$=({onClick:a,id:i,buttonType:n,source:o,svg:m,alt:c="alt-button-icon",text:r="",className:x="",dataAttributes:h={}})=>{if(n==="button")return e.jsx(L,{onClick:a,id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})});if(n==="submit")return e.jsx(L,{id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})})},X=d.div`
42
+ `,$=({onClick:a,id:i,buttonType:n,source:o,svg:m,alt:c="alt-button-icon",text:r="",className:x="",dataAttributes:h={}})=>n==="submit"?e.jsx(L,{id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})}):e.jsx(L,{onClick:a,id:i,type:n,className:x,...h,children:e.jsxs(R,{className:"button-icon-text-space",children:[o?e.jsx(B,{src:o,alt:c}):m||"",r&&e.jsx(P,{id:i,children:r})]})}),X=d.div`
43
43
  display: flex;
44
44
  flex-direction: column;
45
45
  align-items: left;
@@ -83,37 +83,32 @@ const t = {
83
83
  text: r = "",
84
84
  className: b = "",
85
85
  dataAttributes: f = {}
86
- }) => {
87
- if (n === "button")
88
- return /* @__PURE__ */ e(
89
- R,
90
- {
91
- onClick: a,
92
- id: l,
93
- type: n,
94
- className: b,
95
- ...f,
96
- children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
97
- i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
98
- r && /* @__PURE__ */ e(P, { id: l, children: r })
99
- ] })
100
- }
101
- );
102
- if (n === "submit")
103
- return /* @__PURE__ */ e(
104
- R,
105
- {
106
- id: l,
107
- type: n,
108
- className: b,
109
- ...f,
110
- children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
111
- i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
112
- r && /* @__PURE__ */ e(P, { id: l, children: r })
113
- ] })
114
- }
115
- );
116
- }, ee = m.div`
86
+ }) => n === "submit" ? /* @__PURE__ */ e(
87
+ R,
88
+ {
89
+ id: l,
90
+ type: n,
91
+ className: b,
92
+ ...f,
93
+ children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
94
+ i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
95
+ r && /* @__PURE__ */ e(P, { id: l, children: r })
96
+ ] })
97
+ }
98
+ ) : /* @__PURE__ */ e(
99
+ R,
100
+ {
101
+ onClick: a,
102
+ id: l,
103
+ type: n,
104
+ className: b,
105
+ ...f,
106
+ children: /* @__PURE__ */ u(B, { className: "button-icon-text-space", children: [
107
+ i ? /* @__PURE__ */ e(W, { src: i, alt: c }) : d || "",
108
+ r && /* @__PURE__ */ e(P, { id: l, children: r })
109
+ ] })
110
+ }
111
+ ), ee = m.div`
117
112
  display: flex;
118
113
  flex-direction: column;
119
114
  align-items: left;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbgarcia8/react-dynamic-form",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A form that can be nested with editable, expandable and flexible input-forms",
5
5
  "keywords": [
6
6
  "form",