prometeo-design-system 2.7.9 → 2.8.1

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.
@@ -3,7 +3,7 @@ import ee, { memo as D, forwardRef as L, useRef as v, useEffect as te, useCallba
3
3
  import { c as X } from "./cn-B6yFEsav.js";
4
4
  import { u as re } from "./useDragScroll-CHN9OMwn.js";
5
5
  import S from "./Button.es.js";
6
- import { Icons as M } from "./Icons.es.js";
6
+ import { I as M } from "./Icons-ChYkaR8R.js";
7
7
  const O = D(L(({ images: n, className: c }, r) => {
8
8
  const { ref: d, bind: a } = re({
9
9
  axis: "x",
@@ -1,4 +1,4 @@
1
- import { I as p } from "./ImageGallery-D8nIvBpV.js";
1
+ import { I as p } from "./ImageGallery-TkgHO3JL.js";
2
2
  import { useRef as u, useCallback as r } from "react";
3
3
  const g = () => {
4
4
  const e = u(null), t = r((a) => {
@@ -1,11 +1,10 @@
1
1
  import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as z } from "./Icons.es.js";
2
+ import { E as _, a as q, C as V } from "./Icons-ChYkaR8R.js";
3
3
  import { c as t } from "./cn-B6yFEsav.js";
4
- import { useRef as q, useLayoutEffect as V, memo as F, forwardRef as ee, useState as te } from "react";
5
- import re from "./Spinner.es.js";
6
- import { H as oe } from "./HelperComponent-U6mPwuDH.js";
7
- import le from "./Button.es.js";
8
- const se = (o) => {
4
+ import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
5
+ import le from "./Spinner.es.js";
6
+ import { H as se } from "./HelperComponent-CcGxM09g.js";
7
+ const ae = (o) => {
9
8
  let e = o;
10
9
  for (; e && e !== document.body; ) {
11
10
  const n = window.getComputedStyle(e).backgroundColor;
@@ -16,11 +15,11 @@ const se = (o) => {
16
15
  const l = window.getComputedStyle(document.body).backgroundColor;
17
16
  return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
18
17
  };
19
- function ae() {
20
- const o = q(null);
21
- return V(() => {
18
+ function ne() {
19
+ const o = F(null);
20
+ return ee(() => {
22
21
  if (!o.current || !o.current.parentElement) return;
23
- const e = se(o.current.parentElement);
22
+ const e = ae(o.current.parentElement);
24
23
  o.current.style.backgroundColor = e;
25
24
  }, []), {
26
25
  ref: o
@@ -60,7 +59,7 @@ const b = {
60
59
  label: t("text-success", "peer-focus:text-success-light"),
61
60
  icon: t("text-success-light", "peer-focus:text-success-light")
62
61
  }
63
- }, S = ee(
62
+ }, S = re(
64
63
  ({
65
64
  label: o,
66
65
  icon: e,
@@ -68,32 +67,32 @@ const b = {
68
67
  onChange: C,
69
68
  value: n,
70
69
  name: g,
71
- width: m = "100%",
70
+ width: x = "100%",
72
71
  height: u,
73
72
  variant: c = "default",
74
73
  labelVariant: a = "default",
75
74
  size: H = "medium",
76
- disabled: x = !1,
75
+ disabled: f = !1,
77
76
  type: s = "text",
78
- isFetching: f,
77
+ isFetching: p,
79
78
  errorComponent: h,
80
79
  helperComponent: w,
81
80
  placeholder: $,
82
81
  required: N = !1,
83
82
  onFocus: k,
84
- onBlur: B,
83
+ onBlur: I,
85
84
  onKeyDown: L,
86
85
  onKeyUp: R,
87
- className: P,
88
- style: D,
89
- readOnly: A = !1,
90
- onClear: v,
86
+ className: B,
87
+ style: P,
88
+ readOnly: D = !1,
89
+ onClear: z,
91
90
  ...E
92
- }, M) => {
93
- const [y, O] = te(!1), { ref: T } = ae();
94
- let p = H;
95
- u && (p = "customHeight");
96
- const d = {
91
+ }, A) => {
92
+ const [y, M] = oe(!1), { ref: O } = ne();
93
+ let d = H;
94
+ u && (d = "customHeight");
95
+ const i = {
97
96
  small: {
98
97
  container: "text-sm",
99
98
  input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
@@ -122,32 +121,32 @@ const b = {
122
121
  label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
123
122
  icon: "w-6 h-6 right-3"
124
123
  }
125
- }, G = () => {
126
- O(!y);
124
+ }, T = () => {
125
+ M(!y);
127
126
  }, j = {};
128
- m && m !== "100%" && (j.width = m), u && (j.height = u);
129
- const I = c === "error" && h, J = !I && w, K = s === "password", Q = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, U = () => u ? d.customHeight.label : d[p].label, W = () => u ? { height: u } : {}, X = () => a === "default" ? o : $ || o || "", Y = () => K ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Z = a === "default" && "transition-all duration-200 ease-in-out", i = h || w;
127
+ x && x !== "100%" && (j.width = x), u && (j.height = u);
128
+ const v = c === "error" && h, G = !v && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? i.customHeight.label : i[d].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : $ || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", m = h || w;
130
129
  return /* @__PURE__ */ r.jsxs(
131
130
  "div",
132
131
  {
133
132
  className: t(
134
133
  "relative",
135
- d[p].container,
136
- !m && "w-full",
134
+ i[d].container,
135
+ !x && "w-full",
137
136
  "bg-inherit",
138
137
  a === "static" && "mt-2",
139
- P
138
+ B
140
139
  ),
141
- style: { ...D, ...j },
140
+ style: { ...P, ...j },
142
141
  children: [
143
142
  /* @__PURE__ */ r.jsx(
144
143
  "input",
145
144
  {
146
145
  id: g,
147
146
  name: g,
148
- ref: M,
147
+ ref: A,
149
148
  value: n,
150
- placeholder: X(),
149
+ placeholder: W(),
151
150
  type: s === "password" && y ? "text" : s,
152
151
  className: t(
153
152
  "peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
@@ -155,86 +154,80 @@ const b = {
155
154
  a === "default" && "placeholder:text-transparent",
156
155
  a === "static" && "placeholder:text-neutral-medium-default ",
157
156
  b[c].input,
158
- d[p].input,
157
+ i[d].input,
159
158
  e && "pr-10",
160
- x && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
159
+ f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
161
160
  b[c].container,
162
- Y()
161
+ X()
163
162
  ),
164
- style: W(),
163
+ style: U(),
165
164
  onChange: C,
166
165
  onFocus: k,
167
- onBlur: B,
168
- disabled: x,
166
+ onBlur: I,
167
+ disabled: f,
169
168
  required: N,
170
169
  onKeyDown: L,
171
170
  onKeyUp: R,
172
171
  defaultValue: E.defaultValue,
173
- readOnly: A,
172
+ readOnly: D,
174
173
  ...E
175
174
  }
176
175
  ),
177
176
  /* @__PURE__ */ r.jsx(
178
177
  "label",
179
178
  {
180
- ref: T,
179
+ ref: O,
181
180
  htmlFor: g,
182
181
  className: t(
183
182
  "absolute left-3 pointer-events-none px-1 z-10",
184
- Z,
185
- U(),
186
- b[c].label,
183
+ Y,
187
184
  Q(),
185
+ b[c].label,
186
+ K(),
188
187
  N && "after:content-['*'] after:text-error-default after:ml-1",
189
- x && "text-neutral-medium-disabled prometeo-fonts-label-large"
188
+ f && "text-neutral-medium-disabled prometeo-fonts-label-large"
190
189
  ),
191
190
  children: o
192
191
  }
193
192
  ),
194
- (e || s === "password" || f) && /* @__PURE__ */ r.jsx(
193
+ (e || s === "password" || p) && /* @__PURE__ */ r.jsx(
195
194
  "button",
196
195
  {
197
196
  tabIndex: -1,
198
197
  type: "button",
199
198
  className: t(
200
- `absolute ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
201
- d[p].icon,
199
+ `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
200
+ i[d].icon,
202
201
  b[c].icon,
203
- s === "password" && !f ? "cursor-pointer" : "pointer-events-none",
202
+ s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
204
203
  l === "right" ? "right-3" : "left-3"
205
204
  ),
206
- onClick: s === "password" && !f ? G : void 0,
207
- onMouseDown: (_) => s === "password" && !f && _.preventDefault(),
205
+ onClick: s === "password" && !p ? T : void 0,
206
+ onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
208
207
  children: /* @__PURE__ */ r.jsxs("div", { children: [
209
- f && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(re, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
210
- s === "password" && (y ? /* @__PURE__ */ r.jsx(z.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(z.EyeVisibilityOff, { size: 24, className: "" })),
208
+ p && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(le, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
209
+ s === "password" && (y ? /* @__PURE__ */ r.jsx(_, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(q, { size: 24, className: "" })),
211
210
  e
212
211
  ] })
213
212
  }
214
213
  ),
215
- v && /* @__PURE__ */ r.jsx(
216
- le,
214
+ z && /* @__PURE__ */ r.jsx(
215
+ "button",
217
216
  {
218
217
  type: "button",
219
- color: "secondary",
220
- size: "small",
221
- animate: !1,
222
218
  className: t(
223
- `absolute! ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
224
- "size-6 p-4 ",
225
- "bg-inherit",
226
- "hover:bg-transparent! p-4 rounded-full"
219
+ `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
220
+ "size-6 p-1 rounded-full",
221
+ "hover:bg-neutral-medium-hover transition-colors",
222
+ f && "opacity-50 cursor-not-allowed"
227
223
  ),
228
- label: "",
229
- disabled: x,
230
- onClick: v,
231
- variant: "text",
232
- animateIcon: !1,
233
- icon: /* @__PURE__ */ r.jsx(z.Close, { size: 20, className: "" })
224
+ disabled: f,
225
+ onClick: z,
226
+ children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
234
227
  }
235
228
  ),
236
- i && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (I || J) && /* @__PURE__ */ r.jsx(
237
- oe,
229
+ m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (v || G) && /* @__PURE__ */ r.jsx(
230
+ se,
238
231
  {
239
232
  className: "absolute ",
240
233
  variant: c,
@@ -247,8 +240,8 @@ const b = {
247
240
  }
248
241
  );
249
242
  S.displayName = "Input";
250
- const me = F(S);
243
+ const me = te(S);
251
244
  export {
252
245
  me as I,
253
- ae as u
246
+ ne as u
254
247
  };
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-60IT1aGF.js";
1
+ import { I as f } from "./Input-CsNlU1Hu.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as s } from "./cn-B6yFEsav.js";
2
+ import { c as u } from "./cn-B6yFEsav.js";
3
3
  import { FastField as q, ErrorMessage as G } from "formik";
4
- import { memo as H, useState as I, useRef as J, useCallback as y, useLayoutEffect as Q } from "react";
5
- import { Icons as N } from "./Icons.es.js";
4
+ import { memo as H, useState as S, useRef as J, useCallback as y, useLayoutEffect as Q } from "react";
5
+ import { I as N } from "./Icons-ChYkaR8R.js";
6
6
  const W = ({
7
7
  icon: t,
8
8
  iconPosition: r = "left",
@@ -14,30 +14,30 @@ const W = ({
14
14
  labelVariant: n = "default",
15
15
  placeholder: p,
16
16
  disabled: b = !1,
17
- field: l,
17
+ field: a,
18
18
  innerRef: $,
19
19
  form: z,
20
- ...a
20
+ ...l
21
21
  }) => {
22
- const [o, v] = I(!1), [C, K] = I(!1), i = J(null), F = z.getFieldMeta(l.name), k = F.touched && F.error, E = l.value && l.value.toString().length > 0, x = j === "password", M = x ? C ? "text" : "password" : j, P = () => n === "static" ? p || d : p || "", A = () => x ? t ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : t ? r === "left" ? "pl-10" : "pr-10" : "", D = y(() => {
23
- v(!0), a.onFocus?.();
24
- }, [a]), T = y(
22
+ const [o, v] = S(!1), [C, K] = S(!1), i = J(null), F = z.getFieldMeta(a.name), k = F.touched && F.error, E = a.value && a.value.toString().length > 0, x = j === "password", M = x ? C ? "text" : "password" : j, P = () => n === "static" ? p || d : p || "", A = () => x ? t ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : t ? r === "left" ? "pl-10" : "pr-10" : "", D = y(() => {
23
+ v(!0), l.onFocus?.();
24
+ }, [l]), T = y(
25
25
  (c) => {
26
- v(!1), a.onBlur?.(), l.onBlur(c);
26
+ v(!1), l.onBlur?.(), a.onBlur(c);
27
27
  },
28
- [l, a]
28
+ [a, l]
29
29
  ), U = y(() => {
30
30
  K((c) => !c);
31
31
  }, []);
32
32
  Q(() => {
33
33
  if (i.current) {
34
34
  const L = ((O) => {
35
- let u = O;
36
- for (; u && u !== document.body; ) {
37
- const f = window.getComputedStyle(u).backgroundColor;
35
+ let s = O;
36
+ for (; s && s !== document.body; ) {
37
+ const f = window.getComputedStyle(s).backgroundColor;
38
38
  if (f && f !== "transparent" && f !== "rgba(0, 0, 0, 0)")
39
39
  return f;
40
- u = u.parentElement;
40
+ s = s.parentElement;
41
41
  }
42
42
  const m = window.getComputedStyle(document.body).backgroundColor;
43
43
  return m && m !== "transparent" && m !== "rgba(0, 0, 0, 0)" ? m : "rgb(255, 255, 255)";
@@ -88,7 +88,7 @@ const W = ({
88
88
  right: {
89
89
  label: "left-2"
90
90
  }
91
- }, S = {
91
+ }, I = {
92
92
  static: {
93
93
  input: "placeholder:text-neutral-medium-default placeholder:opacity-50",
94
94
  label: "-top-1 -translate-y-full scale-90 px-0 "
@@ -101,7 +101,7 @@ const W = ({
101
101
  return /* @__PURE__ */ e.jsxs(
102
102
  "div",
103
103
  {
104
- className: s(
104
+ className: u(
105
105
  "relative w-full bg-inherit",
106
106
  n === "static" && "mt-5",
107
107
  R
@@ -112,21 +112,21 @@ const W = ({
112
112
  "input",
113
113
  {
114
114
  disabled: b,
115
- id: w || l.name,
115
+ id: w || a.name,
116
116
  type: M,
117
- name: l.name,
118
- value: l.value || "",
117
+ name: a.name,
118
+ value: a.value || "",
119
119
  placeholder: P(),
120
- onChange: l.onChange,
120
+ onChange: a.onChange,
121
121
  onFocus: D,
122
- onEmptied: a.onEmptied,
123
- onKeyDown: a.onKeyDown,
124
- onKeyUp: a.onKeyUp,
122
+ onEmptied: l.onEmptied,
123
+ onKeyDown: l.onKeyDown,
124
+ onKeyUp: l.onKeyUp,
125
125
  onBlur: T,
126
- className: s(
126
+ className: u(
127
127
  "w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
128
128
  "bg-transparent focus:outline-none",
129
- S[n].input,
129
+ I[n].input,
130
130
  g[h].input,
131
131
  A(),
132
132
  B
@@ -138,12 +138,12 @@ const W = ({
138
138
  "label",
139
139
  {
140
140
  ref: i,
141
- htmlFor: w || a.name,
142
- className: s(
141
+ htmlFor: w || l.name,
142
+ className: u(
143
143
  "absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
144
144
  "prometeo-fonts-label-large text-sm",
145
145
  V[t ? r : "none"].label,
146
- S[n].label,
146
+ I[n].label,
147
147
  g[h].label
148
148
  ),
149
149
  children: d
@@ -152,7 +152,7 @@ const W = ({
152
152
  t && /* @__PURE__ */ e.jsx(
153
153
  "div",
154
154
  {
155
- className: s(
155
+ className: u(
156
156
  "absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
157
157
  g[h].icon,
158
158
  r === "left" ? "left-3" : "right-3"
@@ -165,7 +165,7 @@ const W = ({
165
165
  {
166
166
  type: "button",
167
167
  onClick: U,
168
- className: s(
168
+ className: u(
169
169
  "absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
170
170
  "transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
171
171
  t && r === "right" ? "right-8" : "right-3"
@@ -191,7 +191,7 @@ const W = ({
191
191
  k && /* @__PURE__ */ e.jsx(
192
192
  G,
193
193
  {
194
- name: l.name,
194
+ name: a.name,
195
195
  component: "span",
196
196
  className: "block text-error-default-default text-xs mt-1"
197
197
  }
@@ -199,7 +199,7 @@ const W = ({
199
199
  ]
200
200
  }
201
201
  );
202
- }, X = H(W), ae = (t) => /* @__PURE__ */ e.jsx(q, { name: t.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(
202
+ }, X = H(W), le = (t) => /* @__PURE__ */ e.jsx(q, { name: t.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(
203
203
  X,
204
204
  {
205
205
  ...t,
@@ -209,5 +209,5 @@ const W = ({
209
209
  }
210
210
  ) });
211
211
  export {
212
- ae as default
212
+ le as default
213
213
  };
@@ -1,7 +1,7 @@
1
1
  import { j as i } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { FastField as m, getIn as n } from "formik";
3
3
  import { memo as s } from "react";
4
- import { I as d } from "./Input-60IT1aGF.js";
4
+ import { I as d } from "./Input-CsNlU1Hu.js";
5
5
  const f = ({
6
6
  field: a,
7
7
  form: r,
@@ -1,5 +1,5 @@
1
1
  import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as C } from "./Icons.es.js";
2
+ import { I as C } from "./Icons-ChYkaR8R.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import S, { useRef as M, useState as x, useCallback as T, useEffect as ee } from "react";
5
5
  const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator: w = ",", variant: y = "default", placeholder: U, itemClassName: $, itemIcon: F, helperText: j, errorText: N, disabled: a, onClick: z, className: B, readonly: h, onValueDelete: O, ...q }) => {
package/dist/Logo.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as t } from "./Icons.es.js";
2
+ import { I as t } from "./Icons-ChYkaR8R.js";
3
3
  const s = () => /* @__PURE__ */ e.jsxs("div", { className: "container-logo flex items-center justify-center gap-1 bg-gradient-to-br from-[#312C85] to-[#1E1A4D] rounded-md min-w-[185px]", children: [
4
4
  /* @__PURE__ */ e.jsx(t.TicketFilled, { size: 28, className: "rotate-140 text-primary-medium-pressed icon-logo" }),
5
5
  /* @__PURE__ */ e.jsx("span", { className: "font-bold text-[28px] text-primary-medium-pressed font-monserra -tracking-wide text-logo", children: "TICKETS" })