@gustavo-valsechi/client 1.4.370 → 1.4.372
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/src/components/types/form/types/button/index.js +1 -1
- package/dist/src/components/types/form/types/button/index.mjs +1 -1
- package/dist/src/components/types/form/types/button/styles.js +5 -5
- package/dist/src/components/types/form/types/button/styles.mjs +5 -5
- package/dist/src/components/types/table/modal/index.js +2 -0
- package/dist/src/components/types/table/modal/index.mjs +2 -0
- package/dist/src/components/types/table/styles.js +1 -1
- package/dist/src/components/types/table/styles.mjs +1 -1
- package/dist/src/contexts/modal/index.js +2 -2
- package/dist/src/contexts/modal/index.mjs +2 -2
- package/dist/src/interfaces/components/credit-card/index.d.ts +2 -5
- package/dist/src/interfaces/components/form/button/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ function Button(props) {
|
|
|
62
62
|
...import_lodash.default.omit(props, ["loading", "type", "onClick"]),
|
|
63
63
|
children: [
|
|
64
64
|
(loading || !!props.loading) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_loading.Loading, {}),
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: props.label })
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: import_lodash.default.upperFirst(props.label) })
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
);
|
|
@@ -29,7 +29,7 @@ function Button(props) {
|
|
|
29
29
|
..._.omit(props, ["loading", "type", "onClick"]),
|
|
30
30
|
children: [
|
|
31
31
|
(loading || !!props.loading) && /* @__PURE__ */ jsx(Loading, {}),
|
|
32
|
-
/* @__PURE__ */ jsx("span", { children: props.label })
|
|
32
|
+
/* @__PURE__ */ jsx("span", { children: _.upperFirst(props.label) })
|
|
33
33
|
]
|
|
34
34
|
}
|
|
35
35
|
);
|
|
@@ -42,9 +42,9 @@ const Container = import_styled_components.default.button`
|
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
justify-content: center;
|
|
45
|
-
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff !important"};
|
|
46
|
-
background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
47
|
-
border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
45
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.theme[props.theme[props.color] || props.color] || props.theme[props.color] || props.color || props.theme.secondary : "#fff !important"};
|
|
46
|
+
background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.theme[props.color] || props.color || props.theme.secondary};
|
|
47
|
+
border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.theme[props.color] || props.color || props.theme.secondary};
|
|
48
48
|
pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
|
|
49
49
|
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
50
50
|
opacity: ${(props) => props.loading === "true" ? 0.6 : 1};
|
|
@@ -66,10 +66,10 @@ const Container = import_styled_components.default.button`
|
|
|
66
66
|
|
|
67
67
|
&:hover {
|
|
68
68
|
opacity: .9;
|
|
69
|
-
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff"};
|
|
69
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.theme[props.color] || props.color || props.theme.secondary : "#fff"};
|
|
70
70
|
|
|
71
71
|
&::before {
|
|
72
|
-
background: ${(props) => props.transparent ? "transparent" : props.color || props.theme.secondary};
|
|
72
|
+
background: ${(props) => props.transparent ? "transparent" : props.theme[props.color] || props.color || props.theme.secondary};
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
@@ -9,9 +9,9 @@ const Container = styled.button`
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: center;
|
|
12
|
-
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff !important"};
|
|
13
|
-
background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
14
|
-
border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.color || props.theme.secondary};
|
|
12
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.theme[props.theme[props.color] || props.color] || props.theme[props.color] || props.color || props.theme.secondary : "#fff !important"};
|
|
13
|
+
background: ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.theme[props.color] || props.color || props.theme.secondary};
|
|
14
|
+
border: 1px solid ${(props) => props.transparent ? "transparent" : props.outline ? props.theme.t05 : props.theme[props.color] || props.color || props.theme.secondary};
|
|
15
15
|
pointer-events: ${(props) => props.loading === "true" ? "none" : "auto"};
|
|
16
16
|
cursor: ${(props) => props.loading === "true" ? "default" : "pointer"};
|
|
17
17
|
opacity: ${(props) => props.loading === "true" ? 0.6 : 1};
|
|
@@ -33,10 +33,10 @@ const Container = styled.button`
|
|
|
33
33
|
|
|
34
34
|
&:hover {
|
|
35
35
|
opacity: .9;
|
|
36
|
-
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.color || props.theme.secondary : "#fff"};
|
|
36
|
+
color: ${(props) => props.transparent ? props.theme.t6 : props.outline ? props.theme[props.color] || props.color || props.theme.secondary : "#fff"};
|
|
37
37
|
|
|
38
38
|
&::before {
|
|
39
|
-
background: ${(props) => props.transparent ? "transparent" : props.color || props.theme.secondary};
|
|
39
|
+
background: ${(props) => props.transparent ? "transparent" : props.theme[props.color] || props.color || props.theme.secondary};
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
`;
|
|
@@ -70,7 +70,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
70
70
|
const index = import_lodash.default.findIndex(memory, (modal) => modal.name === modalName);
|
|
71
71
|
const data = import_lodash.default.find(memory, (modal) => modal.name === modalName);
|
|
72
72
|
if (!data) return;
|
|
73
|
-
const newProps = import_lodash.default.isFunction(props) ? props(data) : props;
|
|
73
|
+
const newProps = import_lodash.default.isFunction(props) ? props(data.props) : props;
|
|
74
74
|
memory.splice(index, 1, {
|
|
75
75
|
...data,
|
|
76
76
|
props: {
|
|
@@ -85,7 +85,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
85
85
|
const index = import_lodash.default.findIndex(memory, (modal) => modal.name === modalName);
|
|
86
86
|
const data = import_lodash.default.find(memory, (modal) => modal.name === modalName);
|
|
87
87
|
if (!data) return;
|
|
88
|
-
const newContent = import_lodash.default.isFunction(content) ? content(data) : content;
|
|
88
|
+
const newContent = import_lodash.default.isFunction(content) ? content(data.props) : content;
|
|
89
89
|
memory.splice(index, 1, {
|
|
90
90
|
...data,
|
|
91
91
|
props: {
|
|
@@ -36,7 +36,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
36
36
|
const index = _.findIndex(memory, (modal) => modal.name === modalName);
|
|
37
37
|
const data = _.find(memory, (modal) => modal.name === modalName);
|
|
38
38
|
if (!data) return;
|
|
39
|
-
const newProps = _.isFunction(props) ? props(data) : props;
|
|
39
|
+
const newProps = _.isFunction(props) ? props(data.props) : props;
|
|
40
40
|
memory.splice(index, 1, {
|
|
41
41
|
...data,
|
|
42
42
|
props: {
|
|
@@ -51,7 +51,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
51
51
|
const index = _.findIndex(memory, (modal) => modal.name === modalName);
|
|
52
52
|
const data = _.find(memory, (modal) => modal.name === modalName);
|
|
53
53
|
if (!data) return;
|
|
54
|
-
const newContent = _.isFunction(content) ? content(data) : content;
|
|
54
|
+
const newContent = _.isFunction(content) ? content(data.props) : content;
|
|
55
55
|
memory.splice(index, 1, {
|
|
56
56
|
...data,
|
|
57
57
|
props: {
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export interface ICreditCard {
|
|
2
2
|
cvc?: string;
|
|
3
3
|
cardholder: string;
|
|
4
|
-
lastNumber: string;
|
|
5
4
|
number: string;
|
|
6
5
|
expiry: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
flag: string;
|
|
10
|
-
flagIcon: string;
|
|
6
|
+
flag?: string;
|
|
7
|
+
flagIcon?: string;
|
|
11
8
|
onSetFlag?: (content: {
|
|
12
9
|
flag: string;
|
|
13
10
|
logo: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IThemeContent } from "../../../contexts";
|
|
1
2
|
export interface IButton {
|
|
2
3
|
loading?: boolean;
|
|
3
4
|
disabled?: boolean;
|
|
@@ -6,4 +7,5 @@ export interface IButton {
|
|
|
6
7
|
label: string;
|
|
7
8
|
outline?: boolean;
|
|
8
9
|
transparent?: boolean;
|
|
10
|
+
color?: keyof IThemeContent | string;
|
|
9
11
|
}
|