prometeo-design-system 2.3.3 → 2.3.4

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,25 +1,41 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as l } from "./cn-B6yFEsav.js";
3
- import { motion as i, AnimatePresence as u } from "framer-motion";
2
+ import { c as i } from "./cn-B6yFEsav.js";
3
+ import { motion as l, AnimatePresence as u } from "framer-motion";
4
4
  import m from "./Avatar.es.js";
5
- import { Icons as o } from "./Icons.es.js";
6
- function f({ sessions: t, handleTokenLogin: a }) {
7
- return /* @__PURE__ */ e.jsx("div", { className: "profile-options-container w-full ", children: t?.map((r) => /* @__PURE__ */ e.jsx("button", { className: "w-full ", onClick: () => a?.(r.token), children: /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx(
8
- s.Content,
5
+ import { Icons as s } from "./Icons.es.js";
6
+ function f({
7
+ sessions: t,
8
+ handleTokenLogin: a
9
+ }) {
10
+ return /* @__PURE__ */ e.jsx("div", { className: "profile-options-container w-full ", children: t?.map((r) => /* @__PURE__ */ e.jsx(
11
+ "button",
9
12
  {
10
- onClick: () => {
11
- console.log("hola");
12
- },
13
- isExpanded: !1,
14
- name: r.name,
15
- nameArea: r?.area?.name,
16
- nameCompany: r.company_id.name,
17
- cardProfile: /* @__PURE__ */ e.jsx(s.Image, { isExpanded: !1 })
18
- }
19
- ) }) }, r._id)) });
13
+ className: "w-full ",
14
+ onClick: () => a?.(r.token),
15
+ children: /* @__PURE__ */ e.jsx(o, { children: /* @__PURE__ */ e.jsx(
16
+ o.Content,
17
+ {
18
+ onClick: () => {
19
+ console.log("hola");
20
+ },
21
+ isExpanded: !1,
22
+ nameUser: r.name,
23
+ nameArea: r?.areaId?.name,
24
+ nameCompany: r.companyId.name,
25
+ cardProfile: /* @__PURE__ */ e.jsx(o.Image, { isExpanded: !1 })
26
+ }
27
+ ) })
28
+ },
29
+ r._id
30
+ )) });
20
31
  }
21
- const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profile-container flex rounded-md text-white-prometeo overflow-hidden flex-shrink-0 w-full min-w-0 ", children: t }), h = ({ isExpanded: t, sessions: a, onClickLogout: r, handleTokenLogin: n }) => /* @__PURE__ */ e.jsx(u, { mode: "wait", children: t && /* @__PURE__ */ e.jsxs(
22
- i.div,
32
+ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profile-container flex rounded-md text-white-prometeo overflow-hidden flex-shrink-0 w-full min-w-0 ", children: t }), h = ({
33
+ isExpanded: t,
34
+ sessions: a,
35
+ onClickLogout: r,
36
+ handleTokenLogin: n
37
+ }) => /* @__PURE__ */ e.jsx(u, { mode: "wait", children: t && /* @__PURE__ */ e.jsxs(
38
+ l.div,
23
39
  {
24
40
  initial: { height: 0, opacity: 0 },
25
41
  animate: {
@@ -45,7 +61,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
45
61
  className: "overflow-hidden",
46
62
  children: [
47
63
  /* @__PURE__ */ e.jsx(
48
- i.div,
64
+ l.div,
49
65
  {
50
66
  className: "flex justify-center items-center w-full mt-4",
51
67
  exit: {
@@ -63,7 +79,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
63
79
  ),
64
80
  a && a.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
65
81
  /* @__PURE__ */ e.jsx(
66
- i.div,
82
+ l.div,
67
83
  {
68
84
  className: "mt-4",
69
85
  exit: {
@@ -80,7 +96,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
80
96
  }
81
97
  ),
82
98
  /* @__PURE__ */ e.jsx(
83
- i.div,
99
+ l.div,
84
100
  {
85
101
  className: "mt-4 overflow-hidden w-full ",
86
102
  exit: {
@@ -96,11 +112,17 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
96
112
  ease: "easeInOut"
97
113
  }
98
114
  },
99
- children: /* @__PURE__ */ e.jsx(f, { sessions: a, handleTokenLogin: n })
115
+ children: /* @__PURE__ */ e.jsx(
116
+ f,
117
+ {
118
+ sessions: a,
119
+ handleTokenLogin: n
120
+ }
121
+ )
100
122
  }
101
123
  ),
102
124
  /* @__PURE__ */ e.jsx(
103
- i.div,
125
+ l.div,
104
126
  {
105
127
  className: "flex justify-center items-center w-full mt-4",
106
128
  exit: {
@@ -118,7 +140,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
118
140
  )
119
141
  ] }),
120
142
  /* @__PURE__ */ e.jsxs(
121
- i.button,
143
+ l.button,
122
144
  {
123
145
  onClick: r,
124
146
  className: "flex flex-1 h-12 w-full gap-1 rounded-md cursor-pointer mt-4 mb-4 px-2 items-center overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile",
@@ -139,24 +161,33 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
139
161
  },
140
162
  whileTap: { scale: 0.98 },
141
163
  children: [
142
- /* @__PURE__ */ e.jsx(
143
- o.Logout,
144
- {
145
- size: 24,
146
- className: "text-neutral-default-default"
147
- }
148
- ),
164
+ /* @__PURE__ */ e.jsx(s.Logout, { size: 24, className: "text-neutral-default-default" }),
149
165
  /* @__PURE__ */ e.jsx("span", { className: "text-neutral-default-default font-semibold text-sm", children: "Cerrar sesión" })
150
166
  ]
151
167
  }
152
168
  )
153
169
  ]
154
170
  }
155
- ) }), p = ({ imageUrl: t, fallbackText: a }) => /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center profile-image-wrapper ml-1", children: /* @__PURE__ */ e.jsx(m, { imageUrl: t, sizeImage: "xs", sizeFallback: "xs", fallbackText: a }) }), j = ({ isExpanded: t, name: a, nameCompany: r, nameArea: n, cardProfile: d, onClick: c }) => /* @__PURE__ */ e.jsxs(
156
- i.button,
171
+ ) }), p = ({ imageUrl: t, fallbackText: a }) => /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-center profile-image-wrapper ml-1", children: /* @__PURE__ */ e.jsx(
172
+ m,
173
+ {
174
+ imageUrl: t,
175
+ sizeImage: "xs",
176
+ sizeFallback: "xs",
177
+ fallbackText: a
178
+ }
179
+ ) }), j = ({
180
+ isExpanded: t,
181
+ nameUser: a,
182
+ nameCompany: r,
183
+ nameArea: n,
184
+ cardProfile: d,
185
+ onClick: c
186
+ }) => /* @__PURE__ */ e.jsxs(
187
+ l.button,
157
188
  {
158
189
  onClick: c,
159
- className: l(
190
+ className: i(
160
191
  "flex flex-1 gap-1 rounded-l-md cursor-pointer relative overflow-hidden focus:outline-none hover:bg-neutral-medium-selected button-profile h-12",
161
192
  t && "bg-neutral-medium-selected"
162
193
  ),
@@ -172,7 +203,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
172
203
  /* @__PURE__ */ e.jsx(
173
204
  "p",
174
205
  {
175
- className: l(
206
+ className: i(
176
207
  "profile-name font-semibold leading-tight mb-0 text-left",
177
208
  t ? "text-primary-default-default" : "text-neutral-default-default"
178
209
  ),
@@ -183,17 +214,17 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
183
214
  /* @__PURE__ */ e.jsx(
184
215
  "p",
185
216
  {
186
- className: l(
217
+ className: i(
187
218
  "profile-options truncate text-xs mt-0",
188
219
  t ? "text-primary-default-default" : "text-neutral-default-default"
189
220
  ),
190
- children: r.length > 20 ? r?.slice(0, 10) + ".." : r
221
+ children: r?.length && r?.length > 20 ? r?.slice(0, 10) + ".." : r
191
222
  }
192
223
  ),
193
224
  /* @__PURE__ */ e.jsx(
194
225
  "p",
195
226
  {
196
- className: l(
227
+ className: i(
197
228
  "profile-options truncate font-bold mt-0",
198
229
  t ? "text-primary-default-default" : "text-neutral-default-default"
199
230
  ),
@@ -203,7 +234,7 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
203
234
  /* @__PURE__ */ e.jsx(
204
235
  "p",
205
236
  {
206
- className: l(
237
+ className: i(
207
238
  "profile-options truncate text-xs mt-0",
208
239
  t ? "text-primary-default-default" : "text-neutral-default-default"
209
240
  ),
@@ -214,8 +245,8 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
214
245
  ] })
215
246
  ]
216
247
  }
217
- ), g = () => /* @__PURE__ */ e.jsx("div", { className: "w-px bg-gray-500/30 my-1 border-separator-profile" }), y = ({ isExpanded: t, onClick: a }) => /* @__PURE__ */ e.jsx(
218
- i.button,
248
+ ), g = () => /* @__PURE__ */ e.jsx("div", { className: "w-px bg-gray-500/30 my-1 border-separator-profile" }), v = ({ isExpanded: t, onClick: a }) => /* @__PURE__ */ e.jsx(
249
+ l.button,
219
250
  {
220
251
  onClick: a,
221
252
  className: "flex items-center justify-center p-3 rounded-r-md cursor-pointer relative overflow-hidden focus:outline-none min-w-[50px] hover:bg-neutral-medium-selected button-content-chevron",
@@ -225,29 +256,23 @@ const x = ({ children: t }) => /* @__PURE__ */ e.jsx("div", { className: "profil
225
256
  title: t ? "Ocultar opciones" : "Mostrar opciones",
226
257
  "aria-label": t ? "Ocultar opciones" : "Mostrar opciones",
227
258
  children: /* @__PURE__ */ e.jsx(
228
- i.div,
259
+ l.div,
229
260
  {
230
261
  animate: { rotate: t ? 180 : 0 },
231
262
  transition: { duration: 0.3, ease: "easeOut" },
232
263
  className: "relative button-select-crevron",
233
- children: /* @__PURE__ */ e.jsx(i.div, { transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(
234
- o.ChevronDown,
235
- {
236
- size: 20,
237
- className: "text-prometeo-neutral "
238
- }
239
- ) })
264
+ children: /* @__PURE__ */ e.jsx(l.div, { transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(s.ChevronDown, { size: 20, className: "text-prometeo-neutral " }) })
240
265
  }
241
266
  )
242
267
  }
243
- ), s = Object.assign(x, {
268
+ ), o = Object.assign(x, {
244
269
  Menu: h,
245
270
  Image: p,
246
271
  Content: j,
247
272
  Separator: g,
248
- Options: y
273
+ Options: v
249
274
  });
250
275
  export {
251
- s as C,
276
+ o as C,
252
277
  f as a
253
278
  };
@@ -1,4 +1,4 @@
1
- import { C as a } from "./CardProfile-BhFog7j5.js";
1
+ import { C as a } from "./CardProfile-Fn44kEnM.js";
2
2
  export {
3
3
  a as CardProfile
4
4
  };
@@ -1,9 +1,9 @@
1
- import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as l } from "./Icons.es.js";
3
- import { useId as o, useRef as d } from "react";
4
- const k = ({ className: s, disabled: e, ...a }) => {
5
- const n = o(), c = o(), r = d(null), i = `
6
- after:content-["<span id='${n}-hover-span'></span>"]
1
+ import { j as a } from "./jsx-runtime-DKDX3adD.js";
2
+ import { Icons as h } from "./Icons.es.js";
3
+ import { memo as x, useId as o, useRef as m } from "react";
4
+ const n = ({ className: s, disabled: e, ...t }) => {
5
+ const c = o(), i = o(), r = m(null), l = `
6
+ after:content-["<span id='${c}-hover-span'></span>"]
7
7
  after:absolute
8
8
  after:top-1/2
9
9
  after:left-1/2
@@ -24,82 +24,85 @@ const k = ({ className: s, disabled: e, ...a }) => {
24
24
  transition-all
25
25
  duration-200
26
26
  ease-in-out
27
- `;
28
- return /* @__PURE__ */ t.jsx(
29
- "div",
30
- {
31
- id: "checkbox-container",
32
- style: {
33
- width: "24px",
34
- height: "24px",
35
- position: "relative",
36
- zIndex: 10
37
- },
38
- className: "grid place-items-center p-2",
39
- onClick: r.current?.click,
40
- draggable: !1,
41
- children: /* @__PURE__ */ t.jsxs(
42
- "div",
43
- {
44
- id: "checkbox-box",
45
- "aria-checked": a.checked,
46
- className: `grid place-items-center absolute size-[18px] rounded-[2px]
47
- ${e ? `
48
- bg-primary-default-disabled
49
- border-neutral-medium-disabled
50
- ` : ""}
51
- ${i}
52
-
27
+ `, d = "hover:#hover-span:opacity-100", p = "bg-primary-light", u = `
53
28
  bg-transparent
54
29
  border-[2px]
55
30
  aria-checked:border-none
56
31
  border-neutral-medium-default
57
32
  hover:border-neutral-medium-hover
58
-
59
-
60
- aria-checked:bg-primary-default-default
61
-
33
+ `, f = {
34
+ selected: "bg-primary-default-disabled!",
35
+ default: "border-neutral-default-disabled "
36
+ };
37
+ return (
38
+ // biome-ignore lint/a11y/noStaticElementInteractions: <>
39
+ // biome-ignore lint/a11y/useKeyWithClickEvents: <>
40
+ // biome-ignore lint/correctness/useUniqueElementIds: <>
41
+ /* @__PURE__ */ a.jsx(
42
+ "div",
43
+ {
44
+ id: "checkbox-container",
45
+ style: {
46
+ width: "24px",
47
+ height: "24px",
48
+ position: "relative",
49
+ zIndex: 10
50
+ },
51
+ className: "grid place-items-center p-2",
52
+ onClick: r.current?.click,
53
+ draggable: !1,
54
+ children: /* @__PURE__ */ a.jsxs(
55
+ "div",
56
+ {
57
+ id: "checkbox-box",
58
+ "aria-checked": t.checked,
59
+ className: `grid place-items-center absolute size-[18px] rounded-[2px]
60
+ ${l}
61
+ ${u}
62
+ ${t.checked ? p : ""}
63
+ ${e ? f[t.checked ? "selected" : "default"] : ""}
62
64
  `,
63
- onClick: r.current?.click,
64
- draggable: !1,
65
- children: [
66
- /* @__PURE__ */ t.jsx(
67
- "input",
68
- {
69
- type: "checkbox",
70
- id: c,
71
- ref: r,
72
- className: `${s}
73
- hover:#hover-span:opacity-100
74
- `,
75
- disabled: e,
76
- style: {
77
- position: "absolute",
78
- top: "50%",
79
- left: "50%",
80
- transform: "translate(-50%, -50%)",
81
- cursor: e ? "default" : "pointer",
82
- width: "100%",
83
- height: "100%",
84
- opacity: 0,
85
- zIndex: 150
86
- },
87
- ...a
88
- }
89
- ),
90
- a.checked && /* @__PURE__ */ t.jsx(
91
- l.Check,
92
- {
93
- size: 18,
94
- className: `absolute ${e ? "opacity-30" : ""} pointer-events-none`
95
- }
96
- )
97
- ]
98
- }
99
- )
100
- }
65
+ onClick: r.current?.click,
66
+ draggable: !1,
67
+ children: [
68
+ /* @__PURE__ */ a.jsx(
69
+ "input",
70
+ {
71
+ type: "checkbox",
72
+ id: i,
73
+ ref: r,
74
+ className: `${s} ${d} `,
75
+ disabled: e,
76
+ style: {
77
+ position: "absolute",
78
+ top: "50%",
79
+ left: "50%",
80
+ transform: "translate(-50%, -50%)",
81
+ cursor: e ? "default" : "pointer",
82
+ width: "100%",
83
+ height: "100%",
84
+ opacity: 0,
85
+ zIndex: 150
86
+ },
87
+ ...t
88
+ }
89
+ ),
90
+ t.checked && /* @__PURE__ */ a.jsx(
91
+ h.Check,
92
+ {
93
+ size: 18,
94
+ className: `absolute ${e ? "icon-neutral-strong-disabled" : ""} pointer-events-none icon-neutral-strong-default`
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ )
100
+ }
101
+ )
101
102
  );
102
103
  };
104
+ n.displayName = "CheckBox";
105
+ const g = x(n);
103
106
  export {
104
- k as default
107
+ g as default
105
108
  };
@@ -50,5 +50,7 @@ declare const Icons: {
50
50
  readonly FastForward: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
51
51
  readonly Trash: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
52
52
  readonly Sort: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
53
+ readonly Cancel: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
54
+ readonly CheckCircle: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
53
55
  };
54
56
  export { Icons };