prometeo-design-system 2.6.0 → 2.6.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.
- package/dist/CheckBox.es.js +27 -24
- package/dist/DatePicker.es.js +276 -272
- package/dist/DrawerMobile.es.js +87 -87
- package/dist/FAButton.d.ts +4 -0
- package/dist/FAButton.es.js +60 -0
- package/dist/HelperComponent-8ErmQ_n9.js +24 -0
- package/dist/Input-r2N9xkjM.js +280 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +136 -93
- package/dist/InputFormikV2.d.ts +6 -0
- package/dist/InputFormikV2.es.js +29 -0
- package/dist/RadioButton.d.ts +2 -0
- package/dist/RadioButton.es.js +77 -0
- package/dist/RadioButtonFormik.d.ts +2 -0
- package/dist/RadioButtonFormik.es.js +30 -0
- package/dist/{Select-B5hkJ8Oy.js → Select-IAQKEfnq.js} +9 -8
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +34 -0
- package/dist/components/Drawer/DrawerMobile.d.ts +1 -1
- package/dist/components/InputFormik/InputFormik.d.ts +2 -1
- package/dist/components/InputFormik/InputFormikV2.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.d.ts +12 -0
- package/dist/components/RadioButtonFormik/RadioButtonFormik.d.ts +8 -0
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +6 -0
- package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +2 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +7 -0
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +11 -0
- package/dist/exports/RadioButton.d.ts +1 -0
- package/dist/exports/RadioButtonFormik.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/pages/RecurrentDatePicker.page.d.ts +2 -0
- package/dist/preview/RadioButtonPreview.d.ts +2 -0
- package/dist/preview/RecurrentDatePickerPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +286 -354
- package/package.json +9 -1
- package/src/styles/intellisense.css +1 -0
- package/dist/Input-DHdy-pWf.js +0 -295
- package/dist/components/Select copy/Select.d.ts +0 -71
package/dist/DrawerMobile.es.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
1
|
import { j as g } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
-
import { c as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
const
|
|
6
|
-
const { children:
|
|
7
|
-
|
|
8
|
-
s &&
|
|
2
|
+
import { c as W } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { forwardRef as K, useState as B, useRef as v, useEffect as F, useCallback as c, useMemo as J, useImperativeHandle as Q } from "react";
|
|
4
|
+
import { createPortal as U } from "react-dom";
|
|
5
|
+
const A = 44, V = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", te = K((u, o) => {
|
|
6
|
+
const { children: y, defaultOpen: s = !1, onClose: f, snapPoints: d = ["60%"], setSnap: w, snap: p, attachToParent: O = !1 } = u, [E, x] = B(p || "0%"), [r, C] = B(null), Y = v(f), a = v(w), m = v(r);
|
|
7
|
+
Y.current = f, m.current = r, F(() => {
|
|
8
|
+
s && b();
|
|
9
9
|
}, [s]), F(() => {
|
|
10
|
-
|
|
11
|
-
}, [
|
|
10
|
+
a.current = w;
|
|
11
|
+
}, [w]);
|
|
12
12
|
const M = c(() => {
|
|
13
|
-
|
|
14
|
-
}, []),
|
|
15
|
-
console.log(
|
|
16
|
-
}, [d]), S =
|
|
17
|
-
|
|
18
|
-
open:
|
|
13
|
+
x("0%"), Y.current?.(m.current), setTimeout(() => C(null), 300);
|
|
14
|
+
}, []), b = c((H, N) => {
|
|
15
|
+
console.log(H || d[0] || "60%"), x(H || d[0] || "60%"), C(N ?? null);
|
|
16
|
+
}, [d]), S = J(() => E !== "0%", [E]);
|
|
17
|
+
Q(o, () => ({
|
|
18
|
+
open: b,
|
|
19
19
|
close: M,
|
|
20
20
|
isOpen: S,
|
|
21
|
-
getContext: () =>
|
|
22
|
-
}), [
|
|
23
|
-
const
|
|
24
|
-
return O ? /* @__PURE__ */ g.jsx(
|
|
25
|
-
}),
|
|
26
|
-
const r =
|
|
21
|
+
getContext: () => m.current
|
|
22
|
+
}), [b, M, S]);
|
|
23
|
+
const L = p || E;
|
|
24
|
+
return O ? /* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }) : U(/* @__PURE__ */ g.jsx(q, { ...u, snap: L, setSnap: x, context: r, children: y }), document.body);
|
|
25
|
+
}), q = ({ children: u, attachToParent: o = !1, className: y, snap: s, snapPoints: f = ["60%"], setSnap: d, hideOnClose: w = !1, header: p, modal: O = !1, closeOnOverlayClick: E = !1, context: x }) => {
|
|
26
|
+
const r = v(null), C = v(null), Y = v(null), a = v(null), m = v(null), M = c(() => {
|
|
27
27
|
if (!r.current) return [];
|
|
28
28
|
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
29
29
|
return f?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
|
|
30
|
-
}, [f, o]),
|
|
31
|
-
const n =
|
|
30
|
+
}, [f, o]), b = c((e, t) => {
|
|
31
|
+
const n = M();
|
|
32
32
|
if (n.length === 0) return e;
|
|
33
33
|
if (Math.abs(t) > 0.05)
|
|
34
34
|
if (t > 0) {
|
|
35
35
|
const l = n.filter((i) => i < e);
|
|
36
|
-
return l.length > 0 ? Math.max(...l) :
|
|
36
|
+
return l.length > 0 ? Math.max(...l) : w ? 0 : A;
|
|
37
37
|
} else {
|
|
38
38
|
const l = n.filter((i) => i > e);
|
|
39
39
|
if (l.length > 0)
|
|
40
40
|
return Math.min(...l);
|
|
41
41
|
}
|
|
42
42
|
return n.reduce((l, i) => Math.abs(i - e) < Math.abs(l - e) ? i : l);
|
|
43
|
-
}, [
|
|
43
|
+
}, [M]), S = c((e) => {
|
|
44
44
|
if (d && f) {
|
|
45
|
-
const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <=
|
|
45
|
+
const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= A ? "0%" : `${Math.round(e / t * 100)}%`;
|
|
46
46
|
d(n);
|
|
47
47
|
}
|
|
48
|
-
}, [d, f, o]),
|
|
49
|
-
r.current && (r.current.style.transition =
|
|
50
|
-
}, [d, f, o]),
|
|
51
|
-
if (
|
|
52
|
-
const { scrollY: e } =
|
|
53
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e),
|
|
48
|
+
}, [d, f, o]), L = c((e) => {
|
|
49
|
+
r.current && (r.current.style.transition = V, r.current.style.height = `${e}px`);
|
|
50
|
+
}, [d, f, o]), R = c(() => {
|
|
51
|
+
if (m.current && o) {
|
|
52
|
+
const { scrollY: e } = m.current;
|
|
53
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e), m.current = null;
|
|
54
54
|
}
|
|
55
55
|
}, [o]);
|
|
56
56
|
F(() => () => {
|
|
57
|
-
|
|
58
|
-
}, [
|
|
57
|
+
R();
|
|
58
|
+
}, [R]), F(() => {
|
|
59
59
|
if (!r.current || !s) return;
|
|
60
60
|
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
61
61
|
let t = 0;
|
|
62
|
-
typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t =
|
|
62
|
+
typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t = w ? 0 : A : t = parseFloat(s) / 100 * e : typeof s == "string" && s.endsWith("px") ? t = parseFloat(s) : typeof s == "number" && (s >= 0 && s <= 1 ? t = s * e : t = s), L(t);
|
|
63
63
|
}, [s, o]);
|
|
64
|
-
const
|
|
64
|
+
const H = c((e) => {
|
|
65
65
|
if (!r.current) return;
|
|
66
66
|
const t = e.touches[0], n = r.current.offsetHeight;
|
|
67
|
-
|
|
67
|
+
a.current = {
|
|
68
68
|
isDragging: !1,
|
|
69
69
|
startY: t.clientY,
|
|
70
70
|
startHeight: n,
|
|
@@ -72,10 +72,10 @@ const W = 44, U = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", ee = J((a, o) =>
|
|
|
72
72
|
lastTime: Date.now(),
|
|
73
73
|
velocity: 0
|
|
74
74
|
};
|
|
75
|
-
}, []),
|
|
75
|
+
}, []), N = c((e) => {
|
|
76
76
|
if (!r.current) return;
|
|
77
77
|
const t = e, n = r.current.offsetHeight;
|
|
78
|
-
|
|
78
|
+
a.current = {
|
|
79
79
|
isDragging: !1,
|
|
80
80
|
startY: t.clientY,
|
|
81
81
|
startHeight: n,
|
|
@@ -83,67 +83,67 @@ const W = 44, U = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", ee = J((a, o) =>
|
|
|
83
83
|
lastTime: Date.now(),
|
|
84
84
|
velocity: 0
|
|
85
85
|
};
|
|
86
|
-
}, []),
|
|
87
|
-
if (!
|
|
88
|
-
const t = e.touches[0], n =
|
|
86
|
+
}, []), I = c((e) => {
|
|
87
|
+
if (!a.current || !r.current) return;
|
|
88
|
+
const t = e.touches[0], n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
|
|
89
89
|
if (!n.isDragging && l && (n.isDragging = !0, o)) {
|
|
90
90
|
const i = window.scrollY;
|
|
91
|
-
|
|
91
|
+
m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
92
92
|
}
|
|
93
93
|
if (l) {
|
|
94
94
|
e.preventDefault();
|
|
95
95
|
const i = Date.now(), j = i - n.lastTime;
|
|
96
96
|
if (j > 0) {
|
|
97
|
-
const
|
|
98
|
-
n.velocity = n.velocity * 0.8 +
|
|
97
|
+
const G = (t.clientY - n.lastY) / j;
|
|
98
|
+
n.velocity = n.velocity * 0.8 + G * 0.2;
|
|
99
99
|
}
|
|
100
100
|
n.lastY = t.clientY, n.lastTime = i;
|
|
101
|
-
const
|
|
102
|
-
r.current.style.transition = "none", r.current.style.height = `${
|
|
101
|
+
const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
|
|
102
|
+
r.current.style.transition = "none", r.current.style.height = `${z}px`;
|
|
103
103
|
}
|
|
104
|
-
}, [o]),
|
|
105
|
-
if (!
|
|
106
|
-
const t = e, n =
|
|
104
|
+
}, [o]), _ = c((e) => {
|
|
105
|
+
if (!a.current || !r.current) return;
|
|
106
|
+
const t = e, n = a.current, D = n.startY - t.clientY, l = n.isDragging || Math.abs(D) > 5;
|
|
107
107
|
if (!n.isDragging && l && (n.isDragging = !0, o)) {
|
|
108
108
|
const i = window.scrollY;
|
|
109
|
-
|
|
109
|
+
m.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
110
110
|
}
|
|
111
111
|
if (l) {
|
|
112
112
|
e.preventDefault();
|
|
113
113
|
const i = Date.now(), j = i - n.lastTime;
|
|
114
114
|
if (j > 0) {
|
|
115
|
-
const
|
|
116
|
-
n.velocity = n.velocity * 0.8 +
|
|
115
|
+
const G = (t.clientY - n.lastY) / j;
|
|
116
|
+
n.velocity = n.velocity * 0.8 + G * 0.2;
|
|
117
117
|
}
|
|
118
118
|
n.lastY = t.clientY, n.lastTime = i;
|
|
119
|
-
const
|
|
120
|
-
r.current.style.transition = "none", r.current.style.height = `${
|
|
119
|
+
const T = n.startHeight + D, $ = o && r.current.parentElement?.offsetHeight || window.innerHeight, z = Math.max(0, Math.min(T, $));
|
|
120
|
+
r.current.style.transition = "none", r.current.style.height = `${z}px`;
|
|
121
121
|
}
|
|
122
|
-
}, [o]),
|
|
123
|
-
if (!
|
|
124
|
-
const e =
|
|
122
|
+
}, [o]), h = c(() => {
|
|
123
|
+
if (!a.current || !r.current) return;
|
|
124
|
+
const e = a.current;
|
|
125
125
|
if (e.isDragging) {
|
|
126
|
-
|
|
127
|
-
const t = r.current.offsetHeight, n =
|
|
128
|
-
|
|
126
|
+
R();
|
|
127
|
+
const t = r.current.offsetHeight, n = b(t, e.velocity);
|
|
128
|
+
S(n);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
}, [
|
|
130
|
+
a.current = null;
|
|
131
|
+
}, [b, L, R]);
|
|
132
132
|
F(() => {
|
|
133
133
|
const e = Y.current;
|
|
134
134
|
if (e)
|
|
135
|
-
return e.addEventListener("touchstart",
|
|
136
|
-
e.removeEventListener("touchstart",
|
|
135
|
+
return e.addEventListener("touchstart", H, { passive: !1 }), e.addEventListener("touchmove", I, { passive: !1 }), e.addEventListener("touchend", h), e.addEventListener("touchcancel", h), e.addEventListener("mousedown", N, { passive: !1 }), e.addEventListener("mousemove", _, { passive: !1 }), e.addEventListener("mouseup", h), e.addEventListener("mouseleave", h), () => {
|
|
136
|
+
e.removeEventListener("touchstart", H), e.removeEventListener("touchmove", I), e.removeEventListener("touchend", h), e.removeEventListener("touchcancel", h), e.removeEventListener("mousedown", N), e.removeEventListener("mousemove", _), e.removeEventListener("mouseup", h), e.removeEventListener("mouseleave", h);
|
|
137
137
|
};
|
|
138
|
-
}, [
|
|
139
|
-
const
|
|
138
|
+
}, [H, I, h]);
|
|
139
|
+
const k = J(() => s !== "0%", [s]);
|
|
140
140
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
141
141
|
O && /* @__PURE__ */ g.jsx(
|
|
142
142
|
"div",
|
|
143
143
|
{
|
|
144
|
-
className:
|
|
144
|
+
className: W(k ? "fixed inset-0 bg-black/40 z-55 cursor-default" : "hidden"),
|
|
145
145
|
onClick: (e) => {
|
|
146
|
-
e.preventDefault(), e.stopPropagation(), E &&
|
|
146
|
+
e.preventDefault(), e.stopPropagation(), E && S(0);
|
|
147
147
|
},
|
|
148
148
|
"aria-hidden": "true"
|
|
149
149
|
}
|
|
@@ -152,13 +152,13 @@ const W = 44, U = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", ee = J((a, o) =>
|
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
ref: r,
|
|
155
|
-
className:
|
|
155
|
+
className: W(
|
|
156
156
|
o ? "absolute" : "fixed",
|
|
157
157
|
"z-60 bottom-0 w-full overflow-hidden",
|
|
158
158
|
"bg-neutral-default-default",
|
|
159
159
|
"border-t border-neutral-strong-default rounded-t-[12px]",
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
k ? "" : "border-neutral-weak",
|
|
161
|
+
y,
|
|
162
162
|
"flex flex-col items-center",
|
|
163
163
|
"touch-none select-none"
|
|
164
164
|
),
|
|
@@ -171,41 +171,41 @@ const W = 44, U = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", ee = J((a, o) =>
|
|
|
171
171
|
children: /* @__PURE__ */ g.jsx("span", { className: "w-12 h-1 rounded-full bg-neutral-weak-default" })
|
|
172
172
|
}
|
|
173
173
|
),
|
|
174
|
-
typeof
|
|
174
|
+
typeof p == "string" ? /* @__PURE__ */ g.jsx("p", { className: " prometeo-fonts-headline-small text-neutral-default-default w-full h-11 bg-inherit absolute top-11 z-50 px-4", children: p }) : p,
|
|
175
175
|
/* @__PURE__ */ g.jsx(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
178
|
ref: C,
|
|
179
|
-
className:
|
|
179
|
+
className: W(
|
|
180
180
|
"w-full h-full overflow-y-auto px-4 pb-4 ",
|
|
181
|
-
|
|
181
|
+
p ? "mt-22" : "mt-11"
|
|
182
182
|
),
|
|
183
183
|
style: {
|
|
184
184
|
overscrollBehavior: "contain",
|
|
185
|
-
overflow:
|
|
185
|
+
overflow: k ? "auto" : "hidden"
|
|
186
186
|
},
|
|
187
|
-
children:
|
|
187
|
+
children: typeof u == "function" ? u(x) : u
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
]
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
] });
|
|
194
|
-
},
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
}, []),
|
|
198
|
-
|
|
199
|
-
}, []), s = c(() =>
|
|
194
|
+
}, ne = () => {
|
|
195
|
+
const u = v(null), o = c((d, w) => {
|
|
196
|
+
u.current?.open(d, w);
|
|
197
|
+
}, []), y = c(() => {
|
|
198
|
+
u.current?.close();
|
|
199
|
+
}, []), s = c(() => u.current?.isOpen ?? !1, []), f = c(() => u.current?.getContext() ?? null, []);
|
|
200
200
|
return {
|
|
201
201
|
isOpen: s,
|
|
202
202
|
open: o,
|
|
203
|
-
close:
|
|
204
|
-
drawerRef:
|
|
203
|
+
close: y,
|
|
204
|
+
drawerRef: u,
|
|
205
205
|
getContext: f
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
208
|
export {
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
te as default,
|
|
210
|
+
ne as useDrawerMobile
|
|
211
211
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { j as i } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import s, { memo as c } from "react";
|
|
3
|
+
import { c as n } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { Icons as f } from "./Icons.es.js";
|
|
5
|
+
import { createPortal as m } from "react-dom";
|
|
6
|
+
const v = {
|
|
7
|
+
right: 24,
|
|
8
|
+
bottom: 64,
|
|
9
|
+
left: "auto",
|
|
10
|
+
top: "auto"
|
|
11
|
+
}, b = {
|
|
12
|
+
filled: {
|
|
13
|
+
primary: "bg-primary-default-default hover:bg-primary-default-hover active:bg-primary-default-pressed",
|
|
14
|
+
secondary: "bg-neutral-medium-default hover:bg-neutral-medium-hover active:bg-neutral-medium-pressed",
|
|
15
|
+
success: "bg-success-default-default hover:bg-success-default-hover active:bg-success-default-pressed",
|
|
16
|
+
error: "bg-error-default-default hover:bg-error-default-hover active:bg-error-default-pressed",
|
|
17
|
+
warning: "bg-warning-default-default hover:bg-warning-default-hover active:bg-warning-default-pressed"
|
|
18
|
+
},
|
|
19
|
+
outlined: {
|
|
20
|
+
primary: "border border-primary-default-default hover:border-primary-default-hover active:border-primary-default-pressed text-primary-default-default hover:text-primary-default-hover active:text-primary-default-pressed",
|
|
21
|
+
secondary: "border border-neutral-medium-default hover:border-neutral-medium-hover active:border-neutral-medium-pressed text-neutral-medium-default hover:text-neutral-medium-hover active:text-neutral-medium-pressed",
|
|
22
|
+
success: "border border-success-default-default hover:border-success-default-hover active:border-success-default-pressed text-success-default-default hover:text-success-default-hover active:text-success-default-pressed",
|
|
23
|
+
error: "border border-error-default-default hover:border-error-default-hover active:border-error-default-pressed text-error-default-default hover:text-error-default-hover active:text-error-default-pressed",
|
|
24
|
+
warning: "border border-warning-default-default hover:border-warning-default-hover active:border-warning-default-pressed text-warning-default-default hover:text-warning-default-hover active:text-warning-default-pressed"
|
|
25
|
+
},
|
|
26
|
+
text: {
|
|
27
|
+
primary: "text-primary-default-default hover:text-primary-default-hover active:text-primary-default-pressed",
|
|
28
|
+
secondary: "text-neutral-medium-default hover:text-neutral-medium-hover active:text-neutral-medium-pressed",
|
|
29
|
+
success: "text-success-default-default hover:text-success-default-hover active:text-success-default-pressed",
|
|
30
|
+
error: "text-error-default-default hover:text-error-default-hover active:text-error-default-pressed",
|
|
31
|
+
warning: "text-warning-default-default hover:text-warning-default-hover active:text-warning-default-pressed"
|
|
32
|
+
}
|
|
33
|
+
}, h = "bg-primary-default-disabled text-neutral-default-disabled hover:bg-primary-default-disabled active:bg-primary-default-disabled cursor-not-allowed", g = (e) => {
|
|
34
|
+
const t = e.position || v, r = e.attachToParent || !1, o = e.color || "primary", l = e.icon || f.Add, a = e.disabled || !1, u = e.variant || "filled", d = /* @__PURE__ */ i.jsx(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
style: {
|
|
38
|
+
width: "56px",
|
|
39
|
+
height: "56px",
|
|
40
|
+
borderRadius: "8px",
|
|
41
|
+
position: r ? "absolute" : "fixed",
|
|
42
|
+
right: t.right,
|
|
43
|
+
bottom: t.bottom,
|
|
44
|
+
left: t.left,
|
|
45
|
+
top: t.top,
|
|
46
|
+
display: "grid",
|
|
47
|
+
placeItems: "center",
|
|
48
|
+
padding: 16
|
|
49
|
+
},
|
|
50
|
+
className: n("transition-all duration-300 cursor-pointer text-neutral-default-default", b[u][o], a && h, e.className),
|
|
51
|
+
onClick: a ? void 0 : e.onClick,
|
|
52
|
+
children: s.createElement(l, { size: 24 })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
return r ? d : m(d, document.body);
|
|
56
|
+
}, x = c(g, (e, t) => e.attachToParent === t.attachToParent && e.position === t.position && e.color === t.color && e.icon === t.icon && e.disabled === t.disabled && e.variant === t.variant && e.className === t.className && e.onClick === t.onClick);
|
|
57
|
+
x.displayName = "FAButton";
|
|
58
|
+
export {
|
|
59
|
+
x as default
|
|
60
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import { c as a } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { Icons as t } from "./Icons.es.js";
|
|
5
|
+
const m = (s) => {
|
|
6
|
+
const { variant: r, className: l } = s, c = {
|
|
7
|
+
default: "text-neutral-medium-default pt-[1px]",
|
|
8
|
+
error: "text-error-medium-default pt-[1px]",
|
|
9
|
+
success: "text-success-medium-default"
|
|
10
|
+
}, o = {
|
|
11
|
+
default: /* @__PURE__ */ e.jsx(t.Info, { size: 16, className: "text-neutral-medium-default " }),
|
|
12
|
+
error: /* @__PURE__ */ e.jsx(t.Error, { size: 16, className: "text-error-medium-default" }),
|
|
13
|
+
success: /* @__PURE__ */ e.jsx(t.Check, { size: 16, className: "text-success-medium-default" })
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ e.jsx("div", { ref: s.ref, className: a("pl-3 mt-1", l), children: typeof s.children == "string" ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-0.5 items-start", children: [
|
|
16
|
+
o[r],
|
|
17
|
+
/* @__PURE__ */ e.jsx("p", { className: a(" prometeo-fonts-body-small", c[r]), children: s.children })
|
|
18
|
+
] }) : s.children });
|
|
19
|
+
};
|
|
20
|
+
m.displayName = "HelperText";
|
|
21
|
+
const f = i(m);
|
|
22
|
+
export {
|
|
23
|
+
f as H
|
|
24
|
+
};
|