prometeo-design-system 1.7.7 → 1.8.2

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.
Files changed (44) hide show
  1. package/dist/Avatar.es.js +1 -1
  2. package/dist/Button.es.js +1 -1
  3. package/dist/{CardProfile-BZajBGbO.js → CardProfile-Bg_q2qMm.js} +1 -1
  4. package/dist/CardProfile.es.js +1 -1
  5. package/dist/CheckBox.es.js +1 -1
  6. package/dist/CheckboxFormik.es.js +1 -1
  7. package/dist/DialogModal.es.js +1 -1
  8. package/dist/DrawerDesktop.es.js +1 -1
  9. package/dist/DrawerMobile.es.js +1 -1
  10. package/dist/DropZone.es.js +1 -1
  11. package/dist/Header.es.js +1 -1
  12. package/dist/Icons.es.js +1 -1
  13. package/dist/Input.es.js +1 -1
  14. package/dist/InputFormik.es.js +58 -56
  15. package/dist/InputMultiple.es.js +1 -1
  16. package/dist/{LayoutGeneric-jDE96L2N.js → LayoutGeneric-p4Pll4Cm.js} +1 -1
  17. package/dist/LayoutGeneric.es.js +1 -1
  18. package/dist/Logo.es.js +1 -1
  19. package/dist/Menu.es.js +1 -1
  20. package/dist/OtpInput.es.js +1 -1
  21. package/dist/Pagination.es.js +1 -1
  22. package/dist/ProfilePictureUpload.es.js +1 -1
  23. package/dist/ProgressBar.es.js +1 -1
  24. package/dist/Select.es.js +1 -1
  25. package/dist/SelectFormik.es.js +1 -1
  26. package/dist/Spinner.es.js +1 -1
  27. package/dist/Steps.es.js +119 -95
  28. package/dist/SwipeContainer.es.js +1 -1
  29. package/dist/TabLinks.es.js +1 -1
  30. package/dist/Table.es.js +1 -1
  31. package/dist/TextArea.es.js +1 -1
  32. package/dist/Tooltip.es.js +1 -1
  33. package/dist/components/InputFormik/InputFormik.d.ts +1 -1
  34. package/dist/components/Steps/Steps.d.ts +4 -2
  35. package/dist/exports/useDevice.d.ts +1 -1
  36. package/dist/hooks/useDevice.d.ts +1 -7
  37. package/dist/index.d.ts +1 -1
  38. package/dist/{jsx-runtime-ByW6EXIE.js → jsx-runtime-DKDX3adD.js} +94 -96
  39. package/dist/preview/SelectPreview.d.ts +2 -0
  40. package/dist/preview/StepsPreview.d.ts +2 -0
  41. package/dist/prometeo-design-system.css +1 -1
  42. package/dist/prometeo-design-system.es.js +6 -6
  43. package/dist/useDevice.es.js +10 -20
  44. package/package.json +22 -2
package/dist/Avatar.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as p } from "./cn-B6yFEsav.js";
3
3
  import { motion as f } from "framer-motion";
4
4
  import { useState as u } from "react";
package/dist/Button.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as n } from "./cn-B6yFEsav.js";
3
3
  import { c as C } from "./index-BOQuZ0gG.js";
4
4
  import { useAnimationControls as N, motion as m } from "framer-motion";
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as l } from "./cn-B6yFEsav.js";
3
3
  import { motion as i, AnimatePresence as u } from "framer-motion";
4
4
  import m from "./Avatar.es.js";
@@ -1,4 +1,4 @@
1
- import { C as a } from "./CardProfile-BZajBGbO.js";
1
+ import { C as a } from "./CardProfile-Bg_q2qMm.js";
2
2
  export {
3
3
  a as CardProfile
4
4
  };
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as l } from "./Icons.es.js";
3
3
  import { useId as o, useRef as d } from "react";
4
4
  const k = ({ className: s, disabled: e, ...a }) => {
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as x } from "./Icons.es.js";
3
3
  import { c as r } from "./cn-B6yFEsav.js";
4
4
  import { useField as h, ErrorMessage as p } from "formik";
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { forwardRef as u, useState as p, useImperativeHandle as f, useRef as g } from "react";
3
3
  import { c as i } from "./cn-B6yFEsav.js";
4
4
  const x = u(({
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as j } from "./Icons.es.js";
3
3
  import { c as m } from "./cn-B6yFEsav.js";
4
4
  import { c as d } from "./index-BOQuZ0gG.js";
@@ -1,4 +1,4 @@
1
- import { j as r } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { forwardRef as O, useState as g, useRef as x, useCallback as t, useImperativeHandle as D } from "react";
3
3
  import { Drawer as n } from "vaul";
4
4
  import { c as R } from "./cn-B6yFEsav.js";
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as i } from "./cn-B6yFEsav.js";
3
3
  import w, { useCallback as z } from "react";
4
4
  import { useDropzone as R } from "react-dropzone";
package/dist/Header.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as x } from "./cn-B6yFEsav.js";
3
3
  import { motion as i } from "framer-motion";
4
4
  import { memo as m } from "react";
package/dist/Icons.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as q } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as q } from "./jsx-runtime-DKDX3adD.js";
2
2
  const l = ({
3
3
  size: t,
4
4
  className: h,
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as r } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as z } from "./Icons.es.js";
3
3
  import { c as e } from "./cn-B6yFEsav.js";
4
4
  import { memo as oe, useState as L, useRef as ae, useCallback as ne, useEffect as B, useLayoutEffect as ue } from "react";
@@ -1,57 +1,59 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
2
- import { c as u } from "./cn-B6yFEsav.js";
3
- import { useField as k, ErrorMessage as B } from "formik";
4
- import { useState as w } from "react";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
+ import { c as o } from "./cn-B6yFEsav.js";
3
+ import { FastField as $, ErrorMessage as D } from "formik";
4
+ import { memo as L, useState as w, useCallback as f } from "react";
5
5
  import { Icons as v } from "./Icons.es.js";
6
- const U = ({
7
- icon: a,
8
- iconPosition: s = "left",
9
- label: c,
10
- className: j,
11
- containerClassName: N,
6
+ const T = ({
7
+ icon: r,
8
+ iconPosition: a = "left",
9
+ label: u,
10
+ className: F,
11
+ containerClassName: I,
12
12
  id: x,
13
13
  type: p = "text",
14
- labelVariant: r = "default",
15
- placeholder: o,
14
+ labelVariant: s = "default",
15
+ placeholder: d,
16
16
  disabled: h = !1,
17
- ...t
17
+ field: t,
18
+ form: N,
19
+ ...n
18
20
  }) => {
19
- const [l, g] = k(t), [d, y] = w(!1), [i, E] = w(!1), f = g.touched && g.error, b = l.value && l.value.toString().length > 0, m = p === "password", F = m ? i ? "text" : "password" : p, I = () => {
20
- const n = () => a ? s === "left" ? "left-9" : "left-0" : "left-2";
21
- return r === "static" ? `-top-5 ${n()} scale-90 px-1` : d || b ? `-top-2 ${n()} scale-90` : `top-1/2 -translate-y-1/2 ${n()} scale-100`;
22
- }, z = () => r === "static" ? "text-sm" : "text-sm peer-focus:text-sm peer-placeholder-shown:text-base", C = () => r === "static" ? o || c : o || "", K = () => m ? a ? s === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? s === "left" ? "pl-10" : "pr-10" : "", P = () => {
23
- E(!i);
24
- };
25
- return /* @__PURE__ */ e.jsxs("div", { className: u("relative w-full bg-inherit", r === "static" && "mt-2", N), children: [
21
+ const [i, g] = w(!1), [y, E] = w(!1), b = N.getFieldMeta(t.name), m = b.touched && b.error, j = t.value && t.value.toString().length > 0, c = p === "password", k = c ? y ? "text" : "password" : p, z = () => {
22
+ const l = () => r ? a === "left" ? "left-9" : "left-0" : "left-2";
23
+ return s === "static" ? `-top-5 ${l()} scale-90 px-1` : i || j ? `-top-2 ${l()} scale-90` : `top-1/2 -translate-y-1/2 ${l()} scale-100`;
24
+ }, C = () => s === "static" ? "text-sm" : "text-sm peer-focus:text-sm peer-placeholder-shown:text-base", B = () => s === "static" ? d || u : d || "", K = () => c ? r ? a === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : r ? a === "left" ? "pl-10" : "pr-10" : "", P = f(() => {
25
+ g(!0), n.onFocus?.();
26
+ }, [n]), M = f((l) => {
27
+ g(!1), n.onBlur?.(), t.onBlur(l);
28
+ }, [t, n]), S = f(() => {
29
+ E((l) => !l);
30
+ }, []);
31
+ return /* @__PURE__ */ e.jsxs("div", { className: o("relative w-full bg-inherit", s === "static" && "mt-2", I), children: [
26
32
  /* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
27
33
  /* @__PURE__ */ e.jsx(
28
34
  "input",
29
35
  {
30
36
  disabled: h,
31
37
  id: x || t.name,
32
- type: F,
33
- name: l.name,
34
- value: l.value || "",
35
- placeholder: C(),
36
- onChange: l.onChange,
37
- onFocus: () => {
38
- y(!0), t.onFocus?.();
39
- },
40
- onEmptied: t.onEmptied,
41
- onKeyDown: t.onKeyDown,
42
- onKeyUp: t.onKeyUp,
43
- onBlur: (n) => {
44
- y(!1), t.onBlur?.(), l.onBlur(n);
45
- },
46
- className: u(
38
+ type: k,
39
+ name: t.name,
40
+ value: t.value || "",
41
+ placeholder: B(),
42
+ onChange: t.onChange,
43
+ onFocus: P,
44
+ onEmptied: n.onEmptied,
45
+ onKeyDown: n.onKeyDown,
46
+ onKeyUp: n.onKeyUp,
47
+ onBlur: M,
48
+ className: o(
47
49
  "w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
48
50
  "bg-transparent focus:outline-none",
49
- r === "default" && !o && "placeholder:text-transparent",
50
- r === "default" && o && "placeholder:text-neutral-medium-default placeholder:opacity-50",
51
- r === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
52
- d ? "border-primary-default-default border-2 text-primary-default-default" : f ? "border-error-default-default" : "border-neutral-default-default hover:border-neutral-strong-default",
51
+ s === "default" && !d && "placeholder:text-transparent",
52
+ s === "default" && d && "placeholder:text-neutral-medium-default placeholder:opacity-50",
53
+ s === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
54
+ i ? "border-primary-default-default border-2 text-primary-default-default" : m ? "border-error-default-default" : "border-neutral-default-default hover:border-neutral-strong-default",
53
55
  K(),
54
- j
56
+ F
55
57
  )
56
58
  }
57
59
  ),
@@ -59,37 +61,37 @@ const U = ({
59
61
  "label",
60
62
  {
61
63
  htmlFor: x || t.name,
62
- className: u(
64
+ className: o(
63
65
  "absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
66
+ C(),
64
67
  z(),
65
- I(),
66
- b || d ? "text-primary-default-default" : f ? "text-red-500" : "text-neutral-medium-default"
68
+ j || i ? "text-primary-default-default" : m ? "text-red-500" : "text-neutral-medium-default"
67
69
  ),
68
- children: c
70
+ children: u
69
71
  }
70
72
  ),
71
- a && /* @__PURE__ */ e.jsx("div", { className: u(
73
+ r && /* @__PURE__ */ e.jsx("div", { className: o(
72
74
  "absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
73
- s === "left" ? "left-3" : "right-3"
74
- ), children: a }),
75
- m && /* @__PURE__ */ e.jsx(
75
+ a === "left" ? "left-3" : "right-3"
76
+ ), children: r }),
77
+ c && /* @__PURE__ */ e.jsx(
76
78
  "button",
77
79
  {
78
80
  type: "button",
79
- onClick: P,
80
- className: u(
81
+ onClick: S,
82
+ className: o(
81
83
  "absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
82
84
  "transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
83
- a && s === "right" ? "right-8" : "right-3"
85
+ r && a === "right" ? "right-8" : "right-3"
84
86
  ),
85
87
  tabIndex: -1,
86
88
  disabled: h,
87
- children: i ? /* @__PURE__ */ e.jsx(v.EyeVisibility, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ e.jsx(v.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" })
89
+ children: y ? /* @__PURE__ */ e.jsx(v.EyeVisibility, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ e.jsx(v.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" })
88
90
  }
89
91
  )
90
92
  ] }),
91
- f && /* @__PURE__ */ e.jsx(
92
- B,
93
+ m && /* @__PURE__ */ e.jsx(
94
+ D,
93
95
  {
94
96
  name: t.name,
95
97
  component: "span",
@@ -97,7 +99,7 @@ const U = ({
97
99
  }
98
100
  )
99
101
  ] });
100
- };
102
+ }, U = L(T), G = (r) => /* @__PURE__ */ e.jsx($, { name: r.name, children: ({ field: a, form: u }) => /* @__PURE__ */ e.jsx(U, { ...r, field: a, form: u }) });
101
103
  export {
102
- U as default
104
+ G as default
103
105
  };
@@ -1,4 +1,4 @@
1
- import { j as r } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as E } from "./Icons.es.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import M, { useRef as D, useState as p, useCallback as W, useEffect as X } from "react";
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { useRef as a, createContext as i, useContext as u, memo as c } from "react";
3
3
  const o = i(null), l = ({ children: e }) => {
4
4
  const r = a(null), s = (n) => {
@@ -1,4 +1,4 @@
1
- import { L as f } from "./LayoutGeneric-jDE96L2N.js";
1
+ import { L as f } from "./LayoutGeneric-p4Pll4Cm.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/Logo.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as t } from "./Icons.es.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" }),
package/dist/Menu.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as r } from "./cn-B6yFEsav.js";
3
3
  import { AnimatePresence as n, motion as o } from "framer-motion";
4
4
  const s = ({ menuRef: t, children: a, className: i }) => /* @__PURE__ */ e.jsx("div", { ref: t, className: r("flex bg-neutral-default-default absolute bottom-10 left-24 border-1 border-neutral-strong-default h-auto w-60 rounded-md px-2", i), children: /* @__PURE__ */ e.jsx(n, { mode: "wait", children: /* @__PURE__ */ e.jsx(
@@ -1,4 +1,4 @@
1
- import { j as p } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as p } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as ve } from "./Icons.es.js";
3
3
  import { c as L } from "./cn-B6yFEsav.js";
4
4
  import * as n from "react";
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { motion as a } from "framer-motion";
3
3
  function h({
4
4
  currentPage: i = 1,
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { motion as n, AnimatePresence as L } from "framer-motion";
3
3
  import { useRef as B, useState as C } from "react";
4
4
  import b from "./Avatar.es.js";
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as x } from "./cn-B6yFEsav.js";
3
3
  import u from "react";
4
4
  const j = u.forwardRef(
package/dist/Select.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as w } from "./Icons.es.js";
3
3
  import { c as o } from "./cn-B6yFEsav.js";
4
4
  import { memo as se, useState as y, useRef as re, useEffect as oe } from "react";
@@ -1,4 +1,4 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as v } from "./Icons.es.js";
3
3
  import { c as o } from "./cn-B6yFEsav.js";
4
4
  import { useField as P, ErrorMessage as M } from "formik";
@@ -1,4 +1,4 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
3
3
  import { c as L } from "./cn-B6yFEsav.js";
4
4
  const y = ({