@gustavo-valsechi/client 1.4.371 → 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.
@@ -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
  `;
@@ -71,6 +71,8 @@ function Modal(props) {
71
71
  type: "Button",
72
72
  props: {
73
73
  ...import_actions.default[data.icon] || {},
74
+ label: data.label,
75
+ outline: true,
74
76
  onClick: data.function
75
77
  }
76
78
  })), {
@@ -38,6 +38,8 @@ function Modal(props) {
38
38
  type: "Button",
39
39
  props: {
40
40
  ...actionConfig[data.icon] || {},
41
+ label: data.label,
42
+ outline: true,
41
43
  onClick: data.function
42
44
  }
43
45
  })), {
@@ -54,7 +54,7 @@ const Container = import_styled_components.default.div`
54
54
  font-size: .8rem;
55
55
  border: 0;
56
56
  color: ${({ theme }) => theme.t6};
57
- overflow-x: ${(props) => props.notFound ? "auto" : "hidden"};
57
+ overflow-x: auto;
58
58
  width: 100%;
59
59
  border-spacing: 0;
60
60
 
@@ -21,7 +21,7 @@ const Container = styled.div`
21
21
  font-size: .8rem;
22
22
  border: 0;
23
23
  color: ${({ theme }) => theme.t6};
24
- overflow-x: ${(props) => props.notFound ? "auto" : "hidden"};
24
+ overflow-x: auto;
25
25
  width: 100%;
26
26
  border-spacing: 0;
27
27
 
@@ -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,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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.371",
3
+ "version": "1.4.372",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",