prometeo-design-system 2.3.6 → 2.3.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.
Files changed (51) hide show
  1. package/dist/Avatar.es.js +1 -1
  2. package/dist/{Button-Bc0LYLfg.js → Button-DsbEyjth.js} +1 -1
  3. package/dist/Button.es.js +1 -1
  4. package/dist/{CardProfile-BhHJmvqs.js → CardProfile-Fn44kEnM.js} +1 -1
  5. package/dist/CardProfile.es.js +1 -1
  6. package/dist/CheckBox.es.js +1 -1
  7. package/dist/CheckboxFormik.es.js +1 -1
  8. package/dist/DatePicker.es.js +2 -2
  9. package/dist/DialogModal.es.js +51 -48
  10. package/dist/DrawerDesktop.es.js +2 -2
  11. package/dist/DrawerMobile.es.js +1 -1
  12. package/dist/DropZone.es.js +1 -1
  13. package/dist/Header.es.js +1 -1
  14. package/dist/Icons.es.js +1 -1
  15. package/dist/Image.es.js +1 -1
  16. package/dist/{ImageGallery-BeADef_g.js → ImageGallery-DnoRTpCr.js} +2 -2
  17. package/dist/ImageGallery.es.js +1 -1
  18. package/dist/Input.es.js +1 -1
  19. package/dist/InputFormik.es.js +1 -1
  20. package/dist/InputMultiple.es.js +1 -1
  21. package/dist/{LayoutGeneric-jDE96L2N.js → LayoutGeneric-p4Pll4Cm.js} +1 -1
  22. package/dist/LayoutGeneric.es.js +1 -1
  23. package/dist/Logo.es.js +1 -1
  24. package/dist/Menu.es.js +1 -1
  25. package/dist/OtpInput.es.js +1 -1
  26. package/dist/Pagination.es.js +1 -1
  27. package/dist/ProfilePictureUpload.es.js +1 -1
  28. package/dist/ProgressBar.es.js +1 -1
  29. package/dist/SegmentedButton.es.js +1 -1
  30. package/dist/Select.es.js +1 -1
  31. package/dist/SelectFormik.es.js +15 -188
  32. package/dist/SelectFormikLegacy.d.ts +6 -0
  33. package/dist/SelectFormikLegacy.es.js +194 -0
  34. package/dist/Skeleton.es.js +1 -1
  35. package/dist/Spinner.es.js +1 -1
  36. package/dist/Steps.es.js +1 -1
  37. package/dist/SwipeContainer.es.js +1 -1
  38. package/dist/Switch.es.js +1 -1
  39. package/dist/TabLinks.es.js +1 -1
  40. package/dist/Table.es.js +1 -1
  41. package/dist/TextArea.es.js +1 -1
  42. package/dist/Tooltip.es.js +1 -1
  43. package/dist/components/SelectFormik/SelectFormik.d.ts +4 -19
  44. package/dist/components/SelectFormik/SelectFormikLegacy.d.ts +21 -0
  45. package/dist/exports/SelectFormik.d.ts +1 -1
  46. package/dist/exports/SelectFormikLegacy.d.ts +2 -0
  47. package/dist/index.d.ts +3 -1
  48. package/dist/{jsx-runtime-ByW6EXIE.js → jsx-runtime-DKDX3adD.js} +94 -96
  49. package/dist/prometeo-design-system.es.js +50 -48
  50. package/package.json +1 -1
  51. package/dist/components/SelectFormik/SelectFormikV2.d.ts +0 -6
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 u } from "framer-motion";
4
4
  import { useState as f } from "react";
@@ -1,4 +1,4 @@
1
- import { j as f } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as f } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as g } from "./cn-B6yFEsav.js";
3
3
  import { clsx as B } from "clsx";
4
4
  import { useAnimationControls as E, motion as j } from "framer-motion";
package/dist/Button.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as f } from "./Button-Bc0LYLfg.js";
1
+ import { B as f } from "./Button-DsbEyjth.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -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 { motion as l, 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-BhHJmvqs.js";
1
+ import { C as a } from "./CardProfile-Fn44kEnM.js";
2
2
  export {
3
3
  a as CardProfile
4
4
  };
@@ -1,4 +1,4 @@
1
- import { j as a } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as a } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { Icons as h } from "./Icons.es.js";
3
3
  import { memo as x, useId as o, useRef as m } from "react";
4
4
  const n = ({ className: s, disabled: e, ...t }) => {
@@ -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,11 +1,11 @@
1
- import { j as $ } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as $ } from "./jsx-runtime-DKDX3adD.js";
2
2
  import m, { createContext as mn, useContext as hn, useCallback as q, 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
4
  import wn from "./Input.es.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";
8
- import { B as vt } from "./Button-Bc0LYLfg.js";
8
+ import { B as vt } from "./Button-DsbEyjth.js";
9
9
  function Mn(e, t, n = "long") {
10
10
  return new Intl.DateTimeFormat("en-US", {
11
11
  // Enforces engine to render the time. Without the option JavaScriptCore omits it.
@@ -1,56 +1,59 @@
1
- import { j as o } from "./jsx-runtime-ByW6EXIE.js";
2
- import { forwardRef as p, useState as d, useImperativeHandle as f, useRef as m } from "react";
1
+ import { j as o } from "./jsx-runtime-DKDX3adD.js";
2
+ import { forwardRef as p, useState as g, useCallback as n, useImperativeHandle as m, useRef as j } from "react";
3
3
  import { c as x } from "./cn-B6yFEsav.js";
4
- const j = p(({
5
- children: e,
6
- onClose: t,
7
- className: a
8
- }, c) => {
9
- const [s, n] = d(!1), [r, i] = d(null), g = (l) => {
10
- i(l ?? null), n(!0);
11
- }, u = () => {
12
- n(!1), t?.(r), setTimeout(() => i(null), 300);
13
- };
14
- return f(c, () => ({
15
- open: g,
16
- close: u,
17
- isOpen: s,
18
- getContext: () => r
19
- })), /* @__PURE__ */ o.jsx(o.Fragment, { children: s && /* @__PURE__ */ o.jsx(
20
- "div",
21
- {
22
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
23
- onClick: u,
24
- children: /* @__PURE__ */ o.jsx(
25
- "div",
26
- {
27
- className: x("bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6", a),
28
- onClick: (l) => l.stopPropagation(),
29
- children: typeof e == "function" ? e(r) : e
30
- }
31
- )
32
- }
33
- ) });
34
- }), C = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: x("flex flex-col gap-4"), children: e }) }), D = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }), b = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }), v = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }), w = Object.assign(j, {
35
- Content: C,
36
- Header: b,
37
- Footer: v,
38
- Title: D
39
- }), R = () => {
40
- const e = m(null);
4
+ const D = p(
5
+ ({ children: e, onClose: t, className: a }, c) => {
6
+ const [s, l] = g(!1), [r, u] = g(null), f = n((i) => {
7
+ u(i ?? null), l(!0);
8
+ }, []), d = n(() => {
9
+ l(!1), t?.(r), setTimeout(() => u(null), 300);
10
+ }, [r, t]);
11
+ return m(c, () => ({
12
+ open: f,
13
+ close: d,
14
+ isOpen: s,
15
+ getContext: () => r
16
+ })), /* @__PURE__ */ o.jsx(o.Fragment, { children: s && /* @__PURE__ */ o.jsx(
17
+ "div",
18
+ {
19
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
20
+ onClick: d,
21
+ children: /* @__PURE__ */ o.jsx(
22
+ "div",
23
+ {
24
+ className: x(
25
+ "bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6",
26
+ a
27
+ ),
28
+ onClick: (i) => i.stopPropagation(),
29
+ children: typeof e == "function" ? e(r) : e
30
+ }
31
+ )
32
+ }
33
+ ) });
34
+ }
35
+ ), b = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: x("flex flex-col gap-4"), children: e }) }), C = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }), v = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }), h = ({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }), k = Object.assign(D, {
36
+ Content: b,
37
+ Header: v,
38
+ Footer: h,
39
+ Title: C
40
+ });
41
+ k.displayName = "DialogModal";
42
+ const R = () => {
43
+ const e = j(null), t = n((l) => {
44
+ e.current?.open(l);
45
+ }, []), a = n(() => {
46
+ e.current?.close();
47
+ }, []), c = n(() => e.current?.isOpen ?? !1, []), s = n(() => e.current?.getContext() ?? null, []);
41
48
  return {
42
49
  ref: e,
43
- open: (n) => {
44
- e.current?.open(n);
45
- },
46
- close: () => {
47
- e.current?.close();
48
- },
49
- isOpen: () => e.current?.isOpen ?? !1,
50
- getContext: () => e.current?.getContext() ?? null
50
+ open: t,
51
+ close: a,
52
+ isOpen: c,
53
+ getContext: s
51
54
  };
52
55
  };
53
56
  export {
54
- w as default,
57
+ k as default,
55
58
  R as useDialogControl
56
59
  };
@@ -1,6 +1,6 @@
1
- import { j as s } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as s } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as b } from "./cn-B6yFEsav.js";
3
- import { c as y, B as h } from "./Button-Bc0LYLfg.js";
3
+ import { c as y, B as h } from "./Button-DsbEyjth.js";
4
4
  import { createPortal as g } from "react-dom";
5
5
  import { Icons as C } from "./Icons.es.js";
6
6
  import { forwardRef as k, useState as j, useRef as x, useEffect as v, useCallback as l, useImperativeHandle as D } from "react";
@@ -1,4 +1,4 @@
1
- import { j as d } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as d } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as T } from "./cn-B6yFEsav.js";
3
3
  import { forwardRef as q, useState as J, useRef as v, useEffect as M, useCallback as l, useMemo as B, useImperativeHandle as K } from "react";
4
4
  import { createPortal as Q } from "react-dom";
@@ -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 R, { useCallback as w } from "react";
4
4
  import { useDropzone as z } 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 m } from "framer-motion";
4
4
  import { memo as i } from "react";
package/dist/Icons.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as h } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as h } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { memo as v } from "react";
3
3
  const l = (t) => v(t), w = l(({
4
4
  size: t = 24,
package/dist/Image.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as n } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as n } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { memo as x, useState as E, useRef as R, useCallback as N, useEffect as b } from "react";
3
3
  import M from "./Spinner.es.js";
4
4
  import { c as d } from "./cn-B6yFEsav.js";
@@ -1,8 +1,8 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
2
  import ee, { memo as D, forwardRef as L, useRef as v, useEffect as te, useCallback as i, useState as R, useImperativeHandle as ne } from "react";
3
3
  import { c as X } from "./cn-B6yFEsav.js";
4
4
  import { u as re } from "./useDragScroll-CHN9OMwn.js";
5
- import { B as S } from "./Button-Bc0LYLfg.js";
5
+ import { B as S } from "./Button-DsbEyjth.js";
6
6
  import { Icons as M } from "./Icons.es.js";
7
7
  const O = D(L(({ images: n, className: c }, r) => {
8
8
  const { ref: d, bind: a } = re({
@@ -1,4 +1,4 @@
1
- import { I as p } from "./ImageGallery-BeADef_g.js";
1
+ import { I as p } from "./ImageGallery-DnoRTpCr.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) => {
package/dist/Input.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 J } from "./Icons.es.js";
3
3
  import { c as e } from "./cn-B6yFEsav.js";
4
4
  import { memo as xe, useState as H, useRef as K, useCallback as me, useEffect as L, useLayoutEffect as ge } from "react";
@@ -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 u } from "./cn-B6yFEsav.js";
3
3
  import { FastField as O, ErrorMessage as q } from "formik";
4
4
  import { memo as G, useState as I, useRef as H, useCallback as y, useLayoutEffect as J } from "react";
@@ -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 C } from "./Icons.es.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";
@@ -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 i, AnimatePresence as E } from "framer-motion";
3
3
  import { useRef as v, useState as R, useLayoutEffect as A } from "react";
4
4
  import H 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(
@@ -1,4 +1,4 @@
1
- import { j as u } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as u } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as d } from "./cn-B6yFEsav.js";
3
3
  import z, { useState as M, useMemo as C, useEffect as L } from "react";
4
4
  import { motion as E } from "framer-motion";
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 k } from "./Icons.es.js";
3
3
  import { c as a } from "./cn-B6yFEsav.js";
4
4
  import ce, { useRef as F, useLayoutEffect as we, memo as z, useState as ie, useMemo as U, useCallback as P, useEffect as Z } from "react";
@@ -1,194 +1,21 @@
1
- import { j as t } from "./jsx-runtime-ByW6EXIE.js";
2
- import { Icons as g } from "./Icons.es.js";
3
- import { c as d } from "./cn-B6yFEsav.js";
4
- import { useField as $, ErrorMessage as q } from "formik";
5
- import { memo as G, useState as k, useRef as H, useEffect as J } from "react";
6
- import K from "./Spinner.es.js";
7
- const Q = ({
8
- label: C,
9
- name: I,
10
- placeholder: b = "",
11
- disabled: j,
12
- containerClassName: S,
13
- className: D,
14
- options: c = [],
15
- multiple: i = !1,
16
- emptyMessage: z = "No hay opciones disponibles",
17
- labelVariant: w = "default",
18
- isFetching: E = !1,
19
- returnFullObject: m = !1
20
- // Por defecto false para mantener compatibilidad
21
- }) => {
22
- const [r, N, o] = $(I), [l, x] = k(!1), [p, A] = k(!1), h = H(null), v = N.touched && N.error, u = (e) => e ? typeof e == "object" && e.id !== void 0 ? e.id : e : null, V = () => r.value ? Array.isArray(r.value) ? r.value.map(u) : u(r.value) : i ? [] : null, f = r.value && (Array.isArray(r.value) ? r.value.length > 0 : typeof r.value == "object" ? r.value.id : r.value?.toString().length > 0), O = () => w === "static" || f || l || p ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", P = () => {
23
- if (!r.value) return [];
24
- const e = V();
25
- return Array.isArray(e) ? c.filter((a) => e.includes(a.id)) : c.filter((a) => a.id === e);
26
- }, F = (e) => {
27
- if (i) {
28
- const a = Array.isArray(r.value) ? r.value.map(u) : [], s = a.includes(e.id);
29
- if (m) {
30
- const n = Array.isArray(r.value) ? r.value : [], y = s ? n.filter((B) => u(B) !== e.id) : [...n, e];
31
- o.setValue(y);
32
- } else {
33
- const n = s ? a.filter((y) => y !== e.id) : [...a, e.id];
34
- o.setValue(n);
35
- }
36
- } else
37
- o.setValue(m ? e : e.id), x(!1);
38
- }, M = (e) => {
39
- e.stopPropagation(), o.setValue(i ? [] : "");
40
- }, R = (e, a) => {
41
- if (a?.stopPropagation(), i && Array.isArray(r.value))
42
- if (m) {
43
- const s = r.value.filter(
44
- (n) => u(n) !== e
45
- );
46
- o.setValue(s);
47
- } else {
48
- const s = r.value.filter(
49
- (n) => n !== e
50
- );
51
- o.setValue(s);
52
- }
1
+ import { j as m } from "./jsx-runtime-DKDX3adD.js";
2
+ import { useField as s } from "formik";
3
+ import i from "./Select.es.js";
4
+ const p = (e) => {
5
+ const [o, r, t] = s(e.name), a = (n) => {
6
+ t.setValue(n.map((l) => l.value));
53
7
  };
54
- J(() => {
55
- const e = (a) => {
56
- h.current && !h.current.contains(a.target) && x(!1);
57
- };
58
- return l && document.addEventListener("mousedown", e), () => {
59
- document.removeEventListener("mousedown", e);
60
- };
61
- }, [l]);
62
- const L = () => {
63
- const e = P();
64
- return e.length === 0 ? b ? /* @__PURE__ */ t.jsx("span", { className: "text-neutral-medium-default opacity-50", children: b }) : null : i ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 flex-wrap py-1", children: e.map((a) => /* @__PURE__ */ t.jsxs(
65
- "div",
66
- {
67
- className: "inline-flex items-center gap-1 px-2 py-1 bg-primary-default-default text-white text-xs rounded-md",
68
- children: [
69
- /* @__PURE__ */ t.jsx("span", { className: "truncate max-w-20", children: a.label }),
70
- /* @__PURE__ */ t.jsx(
71
- "button",
72
- {
73
- onMouseDown: (s) => {
74
- s.preventDefault(), R(a.id, s);
75
- },
76
- className: "flex-shrink-0 hover:bg-primary-strong-default rounded-sm p-0.5 transition-colors",
77
- type: "button",
78
- tabIndex: -1,
79
- children: /* @__PURE__ */ t.jsx(g.Close, { size: 12, className: "" })
80
- }
81
- )
82
- ]
83
- },
84
- a.id
85
- )) }) : /* @__PURE__ */ t.jsx("span", { children: e[0]?.label });
86
- };
87
- return /* @__PURE__ */ t.jsxs(
88
- "div",
8
+ return /* @__PURE__ */ m.jsx(
9
+ i,
89
10
  {
90
- className: d("relative w-full bg-inherit", S),
91
- ref: h,
92
- children: [
93
- /* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
94
- /* @__PURE__ */ t.jsxs(
95
- "div",
96
- {
97
- onClick: () => !j && x(!l),
98
- onFocus: () => A(!0),
99
- onBlur: () => A(!1),
100
- className: d(
101
- "w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-300 ease-in-out text-neutral-default-default",
102
- "flex items-center justify-between bg-transparent focus:outline-none",
103
- f || l || p ? " border-primary-default-focused ring-primary-default-focused ring-[2px]" : v ? "ring-error-default-default ring-[2px]" : "border-neutral-default-default hover:border-primary-default-hover",
104
- j && "opacity-50 cursor-not-allowed pointer-events-none",
105
- D
106
- ),
107
- children: [
108
- /* @__PURE__ */ t.jsx(
109
- "label",
110
- {
111
- className: d(
112
- "absolute pointer-events-none bg-inherit px-1 z-10",
113
- w === "default" && "transition-all duration-200 ease-in-out",
114
- "text-md",
115
- O(),
116
- f || l || p ? "text-primary-default-default" : v ? "text-red-500" : "text-neutral-medium-default",
117
- "left-3"
118
- ),
119
- children: C
120
- }
121
- ),
122
- /* @__PURE__ */ t.jsx("div", { className: "flex-1 min-w-0", children: L() }),
123
- /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 ml-2", children: [
124
- f && /* @__PURE__ */ t.jsx(
125
- "button",
126
- {
127
- onMouseDown: (e) => {
128
- e.preventDefault(), e.stopPropagation(), M(e);
129
- },
130
- className: "text-neutral-medium-default hover:text-neutral-default-default transition-colors",
131
- type: "button",
132
- tabIndex: -1,
133
- children: /* @__PURE__ */ t.jsx(g.Close, { size: 16, className: "" })
134
- }
135
- ),
136
- E ? /* @__PURE__ */ t.jsx(K, { size: 20, variant: "clip" }) : /* @__PURE__ */ t.jsx(
137
- g.ChevronDown,
138
- {
139
- size: 20,
140
- className: d(
141
- "transition-transform text-neutral-default-default",
142
- l ? "rotate-180" : ""
143
- )
144
- }
145
- )
146
- ] })
147
- ]
148
- }
149
- ),
150
- l && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-md shadow-lg max-h-60 overflow-auto", children: c.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: z }) : c.map((e) => {
151
- const a = V(), s = i ? Array.isArray(a) && a.includes(e.id) : a === e.id;
152
- return /* @__PURE__ */ t.jsxs(
153
- "div",
154
- {
155
- onMouseDown: (n) => {
156
- n.preventDefault(), F(e), n.stopPropagation();
157
- },
158
- className: d(
159
- "px-3 py-2 cursor-pointer flex items-center transition-colors",
160
- s ? "bg-primary-default-default text-white" : "hover:bg-neutral-medium-selected text-neutral-default-default"
161
- ),
162
- children: [
163
- i && /* @__PURE__ */ t.jsx(
164
- "input",
165
- {
166
- type: "checkbox",
167
- checked: s,
168
- onChange: () => {
169
- },
170
- className: "mr-2 pointer-events-none"
171
- }
172
- ),
173
- /* @__PURE__ */ t.jsx("span", { children: e.label })
174
- ]
175
- },
176
- e.id
177
- );
178
- }) })
179
- ] }),
180
- v && /* @__PURE__ */ t.jsx(
181
- q,
182
- {
183
- name: r.name,
184
- component: "span",
185
- className: "block text-error-default-default text-xs mt-1"
186
- }
187
- )
188
- ]
11
+ ...e,
12
+ value: o.value,
13
+ onChange: a,
14
+ variant: r.error ? "error" : "default",
15
+ errorComponent: r.error || void 0
189
16
  }
190
17
  );
191
- }, _ = G(Q);
18
+ };
192
19
  export {
193
- _ as default
20
+ p as default
194
21
  };
@@ -0,0 +1,6 @@
1
+ export * from './exports/SelectFormikLegacy'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/SelectFormikLegacy'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/SelectFormikLegacy'
6
+ export {}