@gustavo-valsechi/client 1.4.360 → 1.4.362

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.
@@ -39,13 +39,13 @@ var import_lodash = __toESM(require("lodash"));
39
39
  function InputSelectOption(props) {
40
40
  var _a, _b, _c, _d, _e, _f, _g, _h;
41
41
  if (import_lodash.default.isArray(props.content)) return "";
42
- if (!!((_a = props.content) == null ? void 0 : _a.icon) || !!((_b = props.content) == null ? void 0 : _b.flag)) {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { color: (_c = props.content) == null ? void 0 : _c.color, flag: (_d = props.content) == null ? void 0 : _d.flag, children: [
42
+ if (!!((_a = props.content) == null ? void 0 : _a.icon) || !!((_b = props.content) == null ? void 0 : _b.img)) {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { color: (_c = props.content) == null ? void 0 : _c.color, img: (_d = props.content) == null ? void 0 : _d.img, children: [
44
44
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "select-option-identifier", children: [
45
45
  !!((_e = props.content) == null ? void 0 : _e.icon) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: (_f = props.content) == null ? void 0 : _f.icon }),
46
- !!((_g = props.content) == null ? void 0 : _g.flag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "select-option-flag" })
46
+ !!((_g = props.content) == null ? void 0 : _g.img) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "select-option-img" })
47
47
  ] }),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: (_h = props.content) == null ? void 0 : _h.label })
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "select-option-label-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "select-option-label", children: (_h = props.content) == null ? void 0 : _h.label }) })
49
49
  ] });
50
50
  }
51
51
  return props.content || "";
@@ -6,13 +6,13 @@ import _ from "lodash";
6
6
  function InputSelectOption(props) {
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h;
8
8
  if (_.isArray(props.content)) return "";
9
- if (!!((_a = props.content) == null ? void 0 : _a.icon) || !!((_b = props.content) == null ? void 0 : _b.flag)) {
10
- return /* @__PURE__ */ jsxs(Container, { color: (_c = props.content) == null ? void 0 : _c.color, flag: (_d = props.content) == null ? void 0 : _d.flag, children: [
9
+ if (!!((_a = props.content) == null ? void 0 : _a.icon) || !!((_b = props.content) == null ? void 0 : _b.img)) {
10
+ return /* @__PURE__ */ jsxs(Container, { color: (_c = props.content) == null ? void 0 : _c.color, img: (_d = props.content) == null ? void 0 : _d.img, children: [
11
11
  /* @__PURE__ */ jsxs("div", { className: "select-option-identifier", children: [
12
12
  !!((_e = props.content) == null ? void 0 : _e.icon) && /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: (_f = props.content) == null ? void 0 : _f.icon }),
13
- !!((_g = props.content) == null ? void 0 : _g.flag) && /* @__PURE__ */ jsx("div", { className: "select-option-flag" })
13
+ !!((_g = props.content) == null ? void 0 : _g.img) && /* @__PURE__ */ jsx("div", { className: "select-option-img" })
14
14
  ] }),
15
- /* @__PURE__ */ jsx("span", { children: (_h = props.content) == null ? void 0 : _h.label })
15
+ /* @__PURE__ */ jsx("div", { className: "select-option-label-container", children: /* @__PURE__ */ jsx("div", { className: "select-option-label", children: (_h = props.content) == null ? void 0 : _h.label }) })
16
16
  ] });
17
17
  }
18
18
  return props.content || "";
@@ -54,20 +54,34 @@ const Container = import_styled_components.default.div`
54
54
  color: ${(props) => props.theme[props.color || ""] || props.theme.t6};
55
55
  }
56
56
 
57
- .select-option-flag {
57
+ .select-option-img {
58
58
  width: .8rem;
59
59
  height: .8rem;
60
- background-image: url(${(props) => props.flag});
60
+ background-image: url(${(props) => props.img});
61
61
  background-size: contain;
62
62
  background-repeat: no-repeat;
63
63
  background-position: center;
64
64
  }
65
65
  }
66
66
 
67
- span {
67
+ .select-option-label-container {
68
68
  font-size: .75rem;
69
69
  font-weight: 500;
70
70
  color: ${(props) => props.theme[props.color || ""] || props.theme.t6};
71
+ position: relative;
72
+ width: 100%;
73
+
74
+ .select-option-label {
75
+ position: absolute;
76
+ left: 0;
77
+ right: 0;
78
+ top: 50%;
79
+ transform: translateY(-50%);
80
+ width: 100%;
81
+ white-space: nowrap;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ }
71
85
  }
72
86
  `;
73
87
  // Annotate the CommonJS export names for ESM import in node:
@@ -21,20 +21,34 @@ const Container = styled.div`
21
21
  color: ${(props) => props.theme[props.color || ""] || props.theme.t6};
22
22
  }
23
23
 
24
- .select-option-flag {
24
+ .select-option-img {
25
25
  width: .8rem;
26
26
  height: .8rem;
27
- background-image: url(${(props) => props.flag});
27
+ background-image: url(${(props) => props.img});
28
28
  background-size: contain;
29
29
  background-repeat: no-repeat;
30
30
  background-position: center;
31
31
  }
32
32
  }
33
33
 
34
- span {
34
+ .select-option-label-container {
35
35
  font-size: .75rem;
36
36
  font-weight: 500;
37
37
  color: ${(props) => props.theme[props.color || ""] || props.theme.t6};
38
+ position: relative;
39
+ width: 100%;
40
+
41
+ .select-option-label {
42
+ position: absolute;
43
+ left: 0;
44
+ right: 0;
45
+ top: 50%;
46
+ transform: translateY(-50%);
47
+ width: 100%;
48
+ white-space: nowrap;
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ }
38
52
  }
39
53
  `;
40
54
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.360",
3
+ "version": "1.4.362",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",