prometeo-design-system 2.6.4 → 2.6.6

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 (70) 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-DA-HDUpi.js → CardProfile-DV3gwvqE.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 +3 -3
  9. package/dist/DialogModal.es.js +1 -1
  10. package/dist/DrawerDesktop.es.js +107 -78
  11. package/dist/DrawerMobile.es.js +154 -123
  12. package/dist/DropZone.es.js +1 -1
  13. package/dist/FAButton.es.js +1 -1
  14. package/dist/Header.es.js +11 -11
  15. package/dist/{HelperComponent-8ErmQ_n9.js → HelperComponent-U6mPwuDH.js} +1 -1
  16. package/dist/Icons.es.js +1 -1
  17. package/dist/Image.es.js +1 -1
  18. package/dist/{ImageGallery-BeADef_g.js → ImageGallery-DnoRTpCr.js} +2 -2
  19. package/dist/ImageGallery.es.js +1 -1
  20. package/dist/{Input-BsGk4qj1.js → Input-i6OzjjFo.js} +3 -3
  21. package/dist/Input.es.js +1 -1
  22. package/dist/InputFormik.es.js +1 -1
  23. package/dist/InputFormikV2.es.js +2 -2
  24. package/dist/InputMultiple.es.js +1 -1
  25. package/dist/{LayoutGeneric-B6E-yOYJ.js → LayoutGeneric-CbaoatQB.js} +1 -1
  26. package/dist/LayoutGeneric.es.js +1 -1
  27. package/dist/Logo.es.js +1 -1
  28. package/dist/Menu.es.js +1 -1
  29. package/dist/OtpInput.es.js +1 -1
  30. package/dist/Pagination.es.js +1 -1
  31. package/dist/ProfilePictureUpload.es.js +2 -2
  32. package/dist/ProgressBar.es.js +32 -17
  33. package/dist/RadioButton.es.js +29 -29
  34. package/dist/RadioButtonFormik.es.js +1 -1
  35. package/dist/SegmentedButton.es.js +1 -1
  36. package/dist/{Select-CSFKGhU7.js → Select-D3aU7dXF.js} +130 -130
  37. package/dist/Select.es.js +1 -1
  38. package/dist/SelectFormik.es.js +2 -2
  39. package/dist/SelectFormikLegacy.es.js +1 -1
  40. package/dist/SelectSearch.es.js +2 -2
  41. package/dist/Skeleton.es.js +1 -1
  42. package/dist/Spinner.es.js +1 -1
  43. package/dist/Steps.es.js +1 -1
  44. package/dist/SwipeContainer.es.js +1 -1
  45. package/dist/Switch.es.js +1 -1
  46. package/dist/TabLinks.es.js +1 -1
  47. package/dist/Table.es.js +1 -1
  48. package/dist/TextArea.es.js +1 -1
  49. package/dist/Toast.es.js +2 -2
  50. package/dist/ToastProvider.es.js +1 -1
  51. package/dist/Tooltip.es.js +1 -1
  52. package/dist/components/CardProfile/CardProfile.d.ts +8 -1
  53. package/dist/components/Drawer/DrawerDesktop.d.ts +7 -5
  54. package/dist/components/Drawer/DrawerMobile.d.ts +2 -0
  55. package/dist/components/Drawer/useDrawerDesktop.d.ts +4 -3
  56. package/dist/components/Drawer/useDrawerMobile.d.ts +1 -1
  57. package/dist/components/Header/Header.d.ts +2 -1
  58. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -0
  59. package/dist/components/RadioButton/RadioButton.d.ts +2 -0
  60. package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +14 -0
  61. package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +8 -2
  62. package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +29 -0
  63. package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +6 -1
  64. package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +3 -2
  65. package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +8 -0
  66. package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +10 -0
  67. package/dist/{jsx-runtime-ByW6EXIE.js → jsx-runtime-DKDX3adD.js} +94 -96
  68. package/dist/prometeo-design-system.css +1 -1
  69. package/dist/prometeo-design-system.es.js +29 -29
  70. package/package.json +9 -9
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 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-DA-HDUpi.js";
1
+ import { C as a } from "./CardProfile-DV3gwvqE.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 x } from "./Icons.es.js";
3
3
  import { memo as b, useId as n, useRef as m, useCallback as k } from "react";
4
4
  const s = ({ className: c, 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 q } from "./jsx-runtime-ByW6EXIE.js";
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-BsGk4qj1.js";
4
+ import { I as wn } from "./Input-i6OzjjFo.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,4 +1,4 @@
1
- import { j as o } from "./jsx-runtime-ByW6EXIE.js";
1
+ import { j as o } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { forwardRef as h, memo as s, useState as D, useRef as p, useCallback as n, useImperativeHandle as R } from "react";
3
3
  import { c as j } from "./cn-B6yFEsav.js";
4
4
  const C = h(
@@ -1,57 +1,83 @@
1
- import { j as s } from "./jsx-runtime-ByW6EXIE.js";
2
- import { c as b } from "./cn-B6yFEsav.js";
3
- import { c as y, B as h } from "./Button-Bc0LYLfg.js";
4
- import { createPortal as g } from "react-dom";
5
- import { Icons as C } from "./Icons.es.js";
6
- import { forwardRef as k, useState as j, useRef as x, useEffect as v, useCallback as l, useImperativeHandle as D } from "react";
7
- const O = k((e, a) => {
8
- const [t, n] = j(e.defaultOpen || !1), o = x(e.onClose), {
1
+ import { j as a } from "./jsx-runtime-DKDX3adD.js";
2
+ import { c as h } from "./cn-B6yFEsav.js";
3
+ import { c as k, B as E } from "./Button-DsbEyjth.js";
4
+ import { createPortal as I } from "react-dom";
5
+ import { Icons as V } from "./Icons.es.js";
6
+ import { forwardRef as B, useRef as i, useState as N, useEffect as u, useCallback as d, useImperativeHandle as P } from "react";
7
+ const L = B((t, f) => {
8
+ const n = i(null), [e, s] = N(t.defaultOpen || !1), [r, b] = N(null), x = i(t.onClose), l = i(r), {
9
9
  modal: c = !1,
10
- children: d,
11
- className: u,
12
- direction: f = "left",
13
- attachToParent: i = !1,
14
- closeOnOverlayClick: p = !1
15
- } = e;
16
- v(() => {
17
- o.current = e.onClose;
18
- }, [e.onClose]);
19
- const r = l(() => {
20
- n(!0);
21
- }, []), m = l(() => {
22
- n(!1), o.current?.();
10
+ children: v,
11
+ className: w,
12
+ direction: C = "left",
13
+ attachToParent: o = !1,
14
+ closeOnOverlayClick: m = !1,
15
+ hideCloseButton: T = !1
16
+ } = t, g = i(m), O = i(e);
17
+ l.current = r, u(() => {
18
+ O.current = e;
19
+ }, [e]), u(() => {
20
+ l.current = r;
21
+ }, [r]), u(() => {
22
+ g.current = m;
23
+ }, [m]);
24
+ const R = (p) => {
25
+ if (!n.current)
26
+ return;
27
+ const z = n.current;
28
+ z && !z.contains(p.target) && g.current && O.current && y();
29
+ };
30
+ u(() => {
31
+ if (!g.current || c || !e)
32
+ return;
33
+ const p = setTimeout(() => {
34
+ document.addEventListener("click", R);
35
+ }, 0);
36
+ return () => {
37
+ clearTimeout(p), document.removeEventListener("click", R);
38
+ };
39
+ }, [m, e, c]), u(() => {
40
+ x.current = t.onClose;
41
+ }, [t.onClose]);
42
+ const j = d((p) => {
43
+ b(p ?? null), s(!0);
44
+ }, []), y = d(() => {
45
+ s(!1), x.current?.(l.current), setTimeout(() => b(null), 300);
23
46
  }, []);
24
- D(a, () => ({
25
- open: r,
26
- close: m,
27
- isOpen: t
28
- }), [t, r, m]);
29
- const w = /* @__PURE__ */ s.jsx(
30
- z,
47
+ P(f, () => ({
48
+ open: j,
49
+ close: y,
50
+ isOpen: e,
51
+ getContext: () => l.current
52
+ }), [e, j, y]);
53
+ const D = /* @__PURE__ */ a.jsx(
54
+ Y,
31
55
  {
32
- isOpen: t,
33
- close: m,
34
- direction: f,
56
+ ref: n,
57
+ isOpen: e,
58
+ close: y,
59
+ direction: C,
35
60
  modal: c,
36
- className: u,
37
- attachToParent: i,
38
- closeOnOverlayClick: p,
39
- children: d
61
+ className: w,
62
+ attachToParent: o,
63
+ closeOnOverlayClick: m,
64
+ hideCloseButton: T,
65
+ children: v
40
66
  }
41
67
  );
42
- return i ? w : g(w, document.body);
68
+ return o ? D : I(D, document.body);
43
69
  });
44
- O.displayName = "DrawerDesktopV2";
45
- const z = ({ children: e, direction: a = "left", isOpen: t, close: n, modal: o = !1, className: c, attachToParent: d = !1, closeOnOverlayClick: u = !1 }) => {
46
- v(() => {
47
- if (t && o) {
48
- const r = window.scrollY;
49
- return document.body.style.position = "fixed", document.body.style.top = `-${r}px`, document.body.style.width = "100%", () => {
50
- document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, r);
70
+ L.displayName = "DrawerDesktopV2";
71
+ const Y = ({ ref: t, children: f, direction: n = "left", isOpen: e, close: s, modal: r = !1, className: b, attachToParent: x = !1, closeOnOverlayClick: l = !1, hideCloseButton: c = !1 }) => {
72
+ u(() => {
73
+ if (e && r) {
74
+ const o = window.scrollY;
75
+ return document.body.style.position = "fixed", document.body.style.top = `-${o}px`, document.body.style.width = "100%", () => {
76
+ document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, o);
51
77
  };
52
78
  }
53
- }, [t, o]);
54
- const f = y("border-neutral-strong-default", {
79
+ }, [e, r]);
80
+ const v = k("border-neutral-strong-default", {
55
81
  variants: {
56
82
  isOpen: {
57
83
  true: "desktop-drawer-visible",
@@ -62,14 +88,14 @@ const z = ({ children: e, direction: a = "left", isOpen: t, close: n, modal: o =
62
88
  right: "right-0 border-l-[1px] border-r-0"
63
89
  }
64
90
  }
65
- }), i = y("fixed inset-0 bg-black/60 z-[55] cursor-default", {
91
+ }), w = k("fixed inset-0 bg-black/60 z-[55] cursor-default", {
66
92
  variants: {
67
93
  isOpen: {
68
94
  true: "drawer-overlay-visible",
69
95
  false: "drawer-overlay-hidden"
70
96
  }
71
97
  }
72
- }), p = y("", {
98
+ }), C = k("", {
73
99
  variants: {
74
100
  direction: {
75
101
  left: "right-0",
@@ -77,66 +103,69 @@ const z = ({ children: e, direction: a = "left", isOpen: t, close: n, modal: o =
77
103
  }
78
104
  }
79
105
  });
80
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
81
- o && /* @__PURE__ */ s.jsx(
106
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
107
+ r && /* @__PURE__ */ a.jsx(
82
108
  "div",
83
109
  {
84
- className: b(i({ isOpen: t })),
85
- onClick: (r) => {
86
- r.preventDefault(), r.stopPropagation(), u && n();
110
+ className: h(w({ isOpen: e })),
111
+ onClick: (o) => {
112
+ o.preventDefault(), o.stopPropagation(), l && s();
87
113
  },
88
114
  "aria-hidden": "true"
89
115
  }
90
116
  ),
91
- /* @__PURE__ */ s.jsxs(
117
+ /* @__PURE__ */ a.jsxs(
92
118
  "div",
93
119
  {
94
- className: b(
95
- "bg-neutral-strong-default p-4 pt-10 h-full top-0 z-60 w-max overflow-y-auto",
96
- d ? "absolute" : "fixed",
97
- f({ isOpen: t, direction: a }),
98
- c
120
+ ref: t,
121
+ className: h(
122
+ "bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
123
+ x ? "absolute" : "fixed",
124
+ v({ isOpen: e, direction: n }),
125
+ !c && "p-4 pt-10",
126
+ b
99
127
  ),
100
128
  role: "dialog",
101
- "aria-modal": o,
129
+ "aria-modal": r,
102
130
  children: [
103
- /* @__PURE__ */ s.jsx(
104
- h,
131
+ !c && /* @__PURE__ */ a.jsx(
132
+ E,
105
133
  {
106
- icon: /* @__PURE__ */ s.jsx(C.Close, { size: 24 }),
134
+ icon: /* @__PURE__ */ a.jsx(V.Close, { size: 24 }),
107
135
  animate: !1,
108
136
  type: "button",
109
137
  size: "small",
110
138
  variant: "text",
111
- onClick: n,
139
+ onClick: s,
112
140
  label: "",
113
141
  color: "secondary",
114
- className: b(
142
+ className: h(
115
143
  "absolute top-0 z-50",
116
- p({ direction: a })
144
+ C({ direction: n })
117
145
  ),
118
146
  "aria-label": "Close drawer"
119
147
  }
120
148
  ),
121
- e
149
+ f
122
150
  ]
123
151
  }
124
152
  )
125
153
  ] });
126
- }, E = () => {
127
- const e = x(null), a = l(() => {
128
- e.current?.open();
129
- }, []), t = l(() => {
130
- e.current?.close();
131
- }, []);
154
+ }, G = () => {
155
+ const t = i(null), f = d((r) => {
156
+ t.current?.open(r);
157
+ }, []), n = d(() => {
158
+ t.current?.close();
159
+ }, []), e = d(() => t.current?.isOpen ?? !1, []), s = d(() => t.current?.getContext() ?? null, []);
132
160
  return {
133
- isOpen: l(() => e.current?.isOpen ?? !1, []),
134
- open: a,
135
- close: t,
136
- drawerRef: e
161
+ isOpen: e,
162
+ open: f,
163
+ close: n,
164
+ drawerRef: t,
165
+ getContext: s
137
166
  };
138
167
  };
139
168
  export {
140
- O as default,
141
- E as useDrawerDesktop
169
+ L as default,
170
+ G as useDrawerDesktop
142
171
  };