prometeo-design-system 2.6.7 → 2.6.8

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.
@@ -0,0 +1,6 @@
1
+ export * from './exports/ButtonV2'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/ButtonV2'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/ButtonV2'
6
+ export {}
@@ -0,0 +1,217 @@
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
+ import { memo as N, useMemo as V } from "react";
3
+ import B from "./Spinner.es.js";
4
+ const M = {
5
+ small: {
6
+ container: "h-10 px-4 py-2",
7
+ label: "",
8
+ icon: ""
9
+ },
10
+ medium: {
11
+ container: "h-12 px-6 py-2",
12
+ label: "",
13
+ icon: ""
14
+ },
15
+ large: {
16
+ container: "h-14 px-6 py-2",
17
+ label: "",
18
+ icon: ""
19
+ }
20
+ }, l = {
21
+ filled: {
22
+ primary: {
23
+ container: ` bg-primary-default-default border-primary-default-default
24
+ hover:bg-primary-default-hover
25
+ active:bg-primary-default-focused
26
+ `,
27
+ label: " text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!",
28
+ icon: " text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
29
+ },
30
+ secondary: {
31
+ container: `bg-neutral-medium-default border-neutral-medium-default
32
+ hover:bg-neutral-medium-hover
33
+ active:bg-neutral-medium-pressed`,
34
+ label: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!",
35
+ icon: "text-neutral-strong-default! group-hover:text-neutral-strong-hover! group-active:text-neutral-strong-pressed!"
36
+ },
37
+ success: {
38
+ container: "bg-success-default-default border-success-default-default hover:bg-success-default-hover active:bg-success-default-pressed",
39
+ label: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed",
40
+ icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
41
+ },
42
+ error: {
43
+ container: "bg-error-default-default hover:bg-error-default-hover active:bg-error-default-pressed",
44
+ label: "text-neutral-strong-default group-hover:text-neutral-strong-hover group-active:text-neutral-strong-pressed",
45
+ icon: "text-neutral-strong-default group-hover:text-neutral-strong-hover group-active:text-neutral-strong-pressed"
46
+ },
47
+ warning: {
48
+ container: "bg-warning-default-default hover:bg-warning-default-hover active:bg-warning-default-pressed",
49
+ label: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed",
50
+ icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
51
+ },
52
+ disabled: {
53
+ container: "bg-primary-medium-disabled border-transparent cursor-not-allowed!",
54
+ label: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled",
55
+ icon: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled"
56
+ }
57
+ },
58
+ outlined: {
59
+ primary: {
60
+ container: `bg-transparent border-primary-default-default border
61
+ hover:bg-neutral-default-hover hover:border-primary-medium-hover
62
+ active:bg-neutral-default-pressed active:border-primary-medium-pressed
63
+ `,
64
+ label: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed",
65
+ icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
66
+ },
67
+ secondary: {
68
+ container: "bg-transparent border-neutral-medium-default border hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed active:border-neutral-medium-pressed",
69
+ label: "text-neutral-strong-default group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed",
70
+ icon: "text-neutral-strong-default group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
71
+ },
72
+ success: {
73
+ container: "border border-success-default-default hover:border-success-default-hover hover:bg-neutral-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
74
+ label: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed",
75
+ icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
76
+ },
77
+ error: {
78
+ container: "border border-error-default-default hover:border-error-default-hover hover:bg-neutral-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
79
+ label: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed",
80
+ icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
81
+ },
82
+ warning: {
83
+ container: "border border-warning-default-default hover:border-warning-default-hover hover:bg-neutral-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
84
+ label: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed",
85
+ icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
86
+ },
87
+ disabled: {
88
+ container: "bg-neutral-default-disabled border-neutral-default-disabled border cursor-not-allowed!",
89
+ label: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled",
90
+ icon: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled"
91
+ }
92
+ },
93
+ text: {
94
+ primary: {
95
+ container: " bg-transparent border-0 text-primary-default-default hover:bg-neutral-default-hover hover:border-primary-medium-hover active:bg-neutral-default-pressed",
96
+ label: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed",
97
+ icon: "text-primary-default-default group-hover:text-primary-medium-hover group-active:text-primary-medium-pressed"
98
+ },
99
+ secondary: {
100
+ container: "bg-transparent border-0 hover:bg-neutral-default-hover hover:border-neutral-medium-hover active:bg-neutral-default-pressed",
101
+ label: "text-neutral-strong-hover group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed",
102
+ icon: "text-neutral-strong-hover group-hover:text-neutral-storng-hover group-active:text-neutral-storng-pressed"
103
+ },
104
+ success: {
105
+ container: "border border-transparent hover:border-success-default-hover hover:bg-neutral-default-hover hover:border-success-default-hover active:border-success-default-pressed active:bg-neutral-default-pressed",
106
+ label: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed",
107
+ icon: "text-success-medium-default group-hover:text-success-medium-hover group-active:text-success-medium-pressed"
108
+ },
109
+ error: {
110
+ container: "border border-transparent hover:border-error-default-hover hover:bg-neutral-default-hover hover:border-error-default-hover active:border-error-default-pressed active:bg-neutral-default-pressed",
111
+ label: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed",
112
+ icon: "text-error-medium-default group-hover:text-error-medium-hover group-active:text-error-medium-pressed"
113
+ },
114
+ warning: {
115
+ container: "border border-transparent hover:border-warning-default-hover hover:bg-neutral-default-hover hover:border-warning-default-hover active:border-warning-default-pressed active:bg-neutral-default-pressed",
116
+ label: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed",
117
+ icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
118
+ },
119
+ disabled: {
120
+ container: "bg-transparent border-neutral-default-disabled border-none cursor-not-allowed!",
121
+ label: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused",
122
+ icon: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused"
123
+ }
124
+ }
125
+ }, n = {
126
+ small: {
127
+ container: "",
128
+ label: "prometeo-fonts-label-large",
129
+ icon: ""
130
+ },
131
+ medium: {
132
+ container: "",
133
+ label: "prometeo-fonts-label-xlarge",
134
+ icon: ""
135
+ },
136
+ large: {
137
+ container: "",
138
+ label: "prometeo-fonts-label-xlarge",
139
+ icon: ""
140
+ }
141
+ }, c = {
142
+ container: "flex items-center gap-1 w-max rounded-lg bg-transparent cursor-pointer transition-all ease-in-out duration-300",
143
+ label: "w-max transition-all ease-in-out duration-300",
144
+ icon: "w-max transition-all ease-in-out duration-300"
145
+ }, A = {
146
+ true: {
147
+ container: "hover:scale-105 active:scale-95 disabled:scale-100"
148
+ },
149
+ false: {
150
+ container: ""
151
+ }
152
+ }, C = {
153
+ true: {
154
+ icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
155
+ },
156
+ false: {
157
+ icon: ""
158
+ }
159
+ }, E = ({
160
+ label: m,
161
+ onClick: g,
162
+ icon: d,
163
+ contentClassName: s,
164
+ loadingText: v = "Cargando...",
165
+ animate: b = !0,
166
+ animateIcon: f = !0,
167
+ isLoading: t = !1,
168
+ children: i,
169
+ hideSpinner: h = !1,
170
+ spinner: x = /* @__PURE__ */ e.jsx(B, { size: "small", variant: "clip", speedMultiplier: 0.5, className: "mt-1.5", color: "var(--neutral-600)" }),
171
+ type: w,
172
+ className: y,
173
+ disabled: o,
174
+ variant: a = "filled",
175
+ form: $,
176
+ size: r = "medium",
177
+ color: p = "primary"
178
+ }) => {
179
+ const k = f && !o && !t ? "true" : "false", j = b && !o && !t ? "true" : "false", u = o || t ? "disabled" : p, S = V(() => i || (t ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
180
+ !h && x,
181
+ /* @__PURE__ */ e.jsx("span", { className: ` ${n[r].label} ${l[a][u].label} ${r === "small" ? "prometeo-fonts-label-xsmall" : ""}`, children: v })
182
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: `flex items-center gap-1 ${s}`, children: [
183
+ d && /* @__PURE__ */ e.jsx("span", { className: `
184
+ ${c.icon}
185
+ ${l[a][u].icon}
186
+ ${n[r].icon}
187
+ ${C[k].icon}
188
+ `, children: d }),
189
+ /* @__PURE__ */ e.jsx("span", { className: `
190
+ ${c.label}
191
+ ${l[a][u].label}
192
+ ${n[r].label}
193
+ `, children: m })
194
+ ] })), [i, s, d, m, a, p, r]);
195
+ return /* @__PURE__ */ e.jsx(
196
+ "button",
197
+ {
198
+ type: w,
199
+ className: `
200
+ group
201
+ ${c.container}
202
+ ${n[r].container}
203
+ ${M[r].container}
204
+ ${l[a][u].container}
205
+ ${A[j].container}
206
+ ${y}
207
+ `,
208
+ disabled: o || t,
209
+ form: $,
210
+ onClick: g,
211
+ children: /* @__PURE__ */ e.jsx("div", { className: `flex items-center gap-1 ${s}`, children: S })
212
+ }
213
+ );
214
+ }, D = N(E);
215
+ export {
216
+ D as default
217
+ };
@@ -1,7 +1,7 @@
1
1
  import { j as q } from "./jsx-runtime-DKDX3adD.js";
2
2
  import m, { createContext as mn, useContext as hn, useCallback as R, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
3
3
  import { InputMultiple as gn } from "./InputMultiple.es.js";
4
- import { I as wn } from "./Input-i6OzjjFo.js";
4
+ import { I as wn } from "./Input-R52CsX56.js";
5
5
  import { createPortal as bn } from "react-dom";
6
6
  import { Icons as Mt } from "./Icons.es.js";
7
7
  import { c as Be } from "./cn-B6yFEsav.js";
package/dist/Header.es.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { j as l } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as i } from "./cn-B6yFEsav.js";
3
- import { motion as n } from "framer-motion";
4
- import { memo as r } from "react";
5
- const x = ({ title: e, subtitle: t, children: a, className: s, subtitleClassName: m }) => /* @__PURE__ */ l.jsx(
2
+ import { c as a } from "./cn-B6yFEsav.js";
3
+ import { motion as r } from "framer-motion";
4
+ import { memo as d } from "react";
5
+ const x = ({ title: e, subtitle: t, children: i, className: s, subtitleClassName: m, titleClassName: n }) => /* @__PURE__ */ l.jsx(
6
6
  "header",
7
7
  {
8
- className: i(
8
+ className: a(
9
9
  "h-16 flex items-center px-4 sm:h-20 md:h-24 md:px-6 lg:h-28 xl:h-32 2xl:h-36",
10
10
  s
11
11
  ),
12
12
  children: /* @__PURE__ */ l.jsxs(
13
- n.div,
13
+ r.div,
14
14
  {
15
15
  initial: { opacity: 0, y: -10 },
16
16
  animate: { opacity: 1, y: 0 },
@@ -18,15 +18,15 @@ const x = ({ title: e, subtitle: t, children: a, className: s, subtitleClassName
18
18
  className: "flex justify-between items-center w-full",
19
19
  children: [
20
20
  /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col leading-6", children: [
21
- t && /* @__PURE__ */ l.jsx("h3", { className: i("text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large ", m), children: t }),
22
- e && /* @__PURE__ */ l.jsx("h1", { className: "text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", children: e })
21
+ t && /* @__PURE__ */ l.jsx("h3", { className: a("font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large ", m), children: t }),
22
+ e && /* @__PURE__ */ l.jsx("h1", { className: a("text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", n), children: e })
23
23
  ] }),
24
- a && /* @__PURE__ */ l.jsx("div", { className: "flex gap-4", children: a })
24
+ i && /* @__PURE__ */ l.jsx("div", { className: "flex gap-4", children: i })
25
25
  ]
26
26
  }
27
27
  )
28
28
  }
29
- ), u = r(x, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
29
+ ), h = d(x, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
30
30
  export {
31
- u as default
31
+ h as default
32
32
  };
@@ -51,7 +51,7 @@ const x = {
51
51
  "focus:ring-0 focus:ring-error-default/20"
52
52
  ),
53
53
  label: r(
54
- "text-error-light",
54
+ "text-lime-500",
55
55
  "peer-focus:text-error-light"
56
56
  ),
57
57
  icon: r(
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-i6OzjjFo.js";
1
+ import { I as f } from "./Input-R52CsX56.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { j as o } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { FastField as u } from "formik";
3
3
  import { memo as s } from "react";
4
- import { I as i } from "./Input-i6OzjjFo.js";
4
+ import { I as i } from "./Input-R52CsX56.js";
5
5
  const c = ({
6
6
  field: r,
7
7
  form: t,