@gustavo-valsechi/client 1.4.11 → 1.4.13
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/dist/components/types/form/index.js +3 -1
- package/dist/components/types/form/index.mjs +3 -1
- package/dist/components/types/modal/index.js +2 -2
- package/dist/components/types/modal/index.mjs +2 -2
- package/dist/components/types/modal/styles.js +2 -1
- package/dist/components/types/modal/styles.mjs +2 -1
- package/dist/contexts/icon/index.d.ts +2 -2
- package/dist/contexts/icon/index.js +11 -1
- package/dist/contexts/icon/index.mjs +11 -1
- package/dist/interfaces/components/modal/index.d.ts +1 -1
- package/dist/interfaces/contexts/icon/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -85,7 +85,9 @@ function Form(props) {
|
|
|
85
85
|
}, [props.defaultValues]);
|
|
86
86
|
const component = (data) => {
|
|
87
87
|
var _a;
|
|
88
|
-
|
|
88
|
+
data.type = import_lodash.default.upperFirst(import_lodash.default.camelCase(data.type));
|
|
89
|
+
data.type = import_lodash.default.includes(data.type, "Input") ? data.type : `Input${data.type}`;
|
|
90
|
+
const component2 = Types[data.type];
|
|
89
91
|
const TypeComponent = component2 || Types.InputText;
|
|
90
92
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
93
|
TypeComponent,
|
|
@@ -51,7 +51,9 @@ function Form(props) {
|
|
|
51
51
|
}, [props.defaultValues]);
|
|
52
52
|
const component = (data) => {
|
|
53
53
|
var _a;
|
|
54
|
-
|
|
54
|
+
data.type = _.upperFirst(_.camelCase(data.type));
|
|
55
|
+
data.type = _.includes(data.type, "Input") ? data.type : `Input${data.type}`;
|
|
56
|
+
const component2 = Types[data.type];
|
|
55
57
|
const TypeComponent = component2 || Types.InputText;
|
|
56
58
|
return /* @__PURE__ */ jsx(
|
|
57
59
|
TypeComponent,
|
|
@@ -38,7 +38,7 @@ var import__ = require("../..");
|
|
|
38
38
|
var import_lodash = __toESM(require("lodash"));
|
|
39
39
|
function Modal(props) {
|
|
40
40
|
var _a, _b, _c;
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { ...props, position: props.position || "center", children: [
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { ...import_lodash.default.omit(props, ["className"]), position: props.position || "center", children: [
|
|
42
42
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-modal-back", onClick: props.onClose }),
|
|
43
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-container", children: [
|
|
44
44
|
(!!props.title || !!props.header) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-modal-header", children: [
|
|
@@ -48,7 +48,7 @@ function Modal(props) {
|
|
|
48
48
|
] }),
|
|
49
49
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
50
50
|
] }),
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `iz-modal-content ${props.className || ""}`, children: [
|
|
52
52
|
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
53
53
|
props.children
|
|
54
54
|
] }),
|
|
@@ -5,7 +5,7 @@ import { Button } from "../..";
|
|
|
5
5
|
import _ from "lodash";
|
|
6
6
|
function Modal(props) {
|
|
7
7
|
var _a, _b, _c;
|
|
8
|
-
return /* @__PURE__ */ jsxs(Container, { ...props, position: props.position || "center", children: [
|
|
8
|
+
return /* @__PURE__ */ jsxs(Container, { ..._.omit(props, ["className"]), position: props.position || "center", children: [
|
|
9
9
|
/* @__PURE__ */ jsx("div", { className: "iz-modal-back", onClick: props.onClose }),
|
|
10
10
|
/* @__PURE__ */ jsxs("div", { className: "iz-modal-container", children: [
|
|
11
11
|
(!!props.title || !!props.header) && /* @__PURE__ */ jsxs("div", { className: "iz-modal-header", children: [
|
|
@@ -15,7 +15,7 @@ function Modal(props) {
|
|
|
15
15
|
] }),
|
|
16
16
|
/* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-xmark", onClick: props.onClose })
|
|
17
17
|
] }),
|
|
18
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: `iz-modal-content ${props.className || ""}`, children: [
|
|
19
19
|
props.onClose && !props.title && !props.header && !props.noCloseIcon && /* @__PURE__ */ jsx("div", { className: "iz-modal-close", onClick: props.onClose, children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-xmark" }) }),
|
|
20
20
|
props.children
|
|
21
21
|
] }),
|
|
@@ -82,7 +82,7 @@ const Container = import_styled_components.default.div`
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.iz-modal-header {
|
|
85
|
-
padding: 1.5rem
|
|
85
|
+
padding: 1rem 1.5rem;
|
|
86
86
|
display: flex;
|
|
87
87
|
align-items: center;
|
|
88
88
|
justify-content: space-between;
|
|
@@ -118,6 +118,7 @@ const Container = import_styled_components.default.div`
|
|
|
118
118
|
overflow-y: overlay;
|
|
119
119
|
position: relative;
|
|
120
120
|
height: ${(props) => props.position === "center" ? "initial" : "100%"};
|
|
121
|
+
padding: ${(props) => props.position === "center" ? "1.5rem" : "0"};
|
|
121
122
|
|
|
122
123
|
.iz-modal-close {
|
|
123
124
|
position: absolute;
|
|
@@ -49,7 +49,7 @@ const Container = styled.div`
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.iz-modal-header {
|
|
52
|
-
padding: 1.5rem
|
|
52
|
+
padding: 1rem 1.5rem;
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
55
|
justify-content: space-between;
|
|
@@ -85,6 +85,7 @@ const Container = styled.div`
|
|
|
85
85
|
overflow-y: overlay;
|
|
86
86
|
position: relative;
|
|
87
87
|
height: ${(props) => props.position === "center" ? "initial" : "100%"};
|
|
88
|
+
padding: ${(props) => props.position === "center" ? "1.5rem" : "0"};
|
|
88
89
|
|
|
89
90
|
.iz-modal-close {
|
|
90
91
|
position: absolute;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IIconProvider } from "@interfaces";
|
|
1
|
+
import { IIconProvider, IIconContext } from "@interfaces";
|
|
2
2
|
declare const IconProviderContainer: ({ children }: IIconProvider) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const useIcon: () =>
|
|
3
|
+
declare const useIcon: () => IIconContext;
|
|
4
4
|
export { IconProviderContainer as IconProvider, useIcon };
|
|
@@ -96,7 +96,17 @@ const IconProviderContainer = ({ children }) => {
|
|
|
96
96
|
});
|
|
97
97
|
return () => observer.disconnect();
|
|
98
98
|
}, [isClient, matches]);
|
|
99
|
-
|
|
99
|
+
const getAll = () => {
|
|
100
|
+
const content2 = [];
|
|
101
|
+
for (const style in import_assets.default) {
|
|
102
|
+
for (const icon in import_assets.default[style]) {
|
|
103
|
+
const name = import_lodash.default.replace(icon, ".svg", "");
|
|
104
|
+
content2.push(`fa-${style} fa-${name}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return content2;
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconContext.Provider, { value: { getAll }, children });
|
|
100
110
|
};
|
|
101
111
|
const useIcon = () => (0, import_react.useContext)(IconContext);
|
|
102
112
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -62,7 +62,17 @@ const IconProviderContainer = ({ children }) => {
|
|
|
62
62
|
});
|
|
63
63
|
return () => observer.disconnect();
|
|
64
64
|
}, [isClient, matches]);
|
|
65
|
-
|
|
65
|
+
const getAll = () => {
|
|
66
|
+
const content2 = [];
|
|
67
|
+
for (const style in assets) {
|
|
68
|
+
for (const icon in assets[style]) {
|
|
69
|
+
const name = _.replace(icon, ".svg", "");
|
|
70
|
+
content2.push(`fa-${style} fa-${name}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return content2;
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ jsx(IconContext.Provider, { value: { getAll }, children });
|
|
66
76
|
};
|
|
67
77
|
const useIcon = () => useContext(IconContext);
|
|
68
78
|
export {
|