prometeo-design-system 2.5.1 → 2.5.3
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/{CardProfile-Fn44kEnM.js → CardProfile-DV3gwvqE.js} +20 -20
- package/dist/CardProfile.es.js +1 -1
- package/dist/DatePicker.es.js +1 -1
- package/dist/DrawerMobile.es.js +102 -100
- package/dist/Icons/Icons.d.ts +3 -0
- package/dist/Icons.es.js +43 -26
- package/dist/{Input-Bhd0bmVq.js → Input-PNwH7rb6.js} +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/OtpInput.es.js +144 -139
- package/dist/SegmentedButton.es.js +16 -16
- package/dist/{Select-B32JqJIS.js → Select-C-aLaiJu.js} +1 -1
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +48 -47
- package/dist/components/Drawer/DrawerMobile.d.ts +6 -5
- package/dist/components/Drawer/useDrawerMobile.d.ts +4 -3
- package/dist/components/FAB/FAButton.d.ts +21 -0
- package/dist/components/OtpInput/OtpInput.d.ts +5 -2
- package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/exports/FAButton.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/pages/ButtonsPage.d.ts +2 -0
- package/dist/pages/OtpPage.d.ts +2 -0
- package/dist/preview/FABPreview.d.ts +2 -0
- package/dist/preview/OTPPreview.d.ts +2 -0
- package/dist/preview/SegmentedButtonPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +329 -269
- package/package.json +1 -1
- package/src/styles/intellisense.css +10 -1
- package/dist/pages/Buttons.d.ts +0 -2
|
@@ -3,7 +3,7 @@ import { c as s } 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";
|
|
5
5
|
const X = (T) => {
|
|
6
|
-
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value:
|
|
6
|
+
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value: h, name: x, onChange: j, icon: y, allowExpand: n = !1, disabled: d = !1 } = T, m = Math.max(l.findIndex((e) => e.value === h), 0), w = l.length, N = 9, b = 26, o = {
|
|
7
7
|
small: 120,
|
|
8
8
|
medium: 120,
|
|
9
9
|
large: 120
|
|
@@ -17,36 +17,36 @@ const X = (T) => {
|
|
|
17
17
|
large: { container: "p-6" }
|
|
18
18
|
}, f = {
|
|
19
19
|
default: {
|
|
20
|
-
switch: "bg-primary-medium-default text-neutral-weak-default
|
|
20
|
+
switch: "bg-primary-medium-default text-neutral-weak-default",
|
|
21
21
|
container: "border-neutral-default-default",
|
|
22
22
|
icon: "text-neutral-weak-default",
|
|
23
|
-
option: "text-neutral-medium-
|
|
23
|
+
option: "text-neutral-medium-pressed"
|
|
24
24
|
},
|
|
25
25
|
success: {
|
|
26
26
|
switch: "bg-success-medium-default text-neutral-weak-default",
|
|
27
27
|
container: "border-neutral-default-default",
|
|
28
28
|
icon: "text-neutral-weak-default",
|
|
29
|
-
option: "text-neutral-medium-
|
|
29
|
+
option: "text-neutral-medium-pressed"
|
|
30
30
|
},
|
|
31
31
|
danger: {
|
|
32
32
|
switch: "bg-error-medium-default text-neutral-weak-default",
|
|
33
33
|
container: "border-neutral-default-default",
|
|
34
34
|
icon: "text-neutral-weak-default",
|
|
35
|
-
option: "text-neutral-medium-
|
|
35
|
+
option: "text-neutral-medium-pressed"
|
|
36
36
|
},
|
|
37
37
|
warning: {
|
|
38
38
|
switch: "bg-warning-medium-default text-neutral-weak-default",
|
|
39
39
|
container: "border-neutral-default-default",
|
|
40
40
|
icon: "text-neutral-weak-default",
|
|
41
|
-
option: "text-neutral-medium-
|
|
41
|
+
option: "text-neutral-medium-pressed"
|
|
42
42
|
},
|
|
43
43
|
disabled: {
|
|
44
44
|
switch: "bg-primary-medium-disabled text-neutral-strong-disabled",
|
|
45
45
|
container: "border-neutral-default-disabled",
|
|
46
46
|
icon: "text-neutral-strong-disabled",
|
|
47
|
-
option: "text-neutral-
|
|
47
|
+
option: "text-neutral-medium-pressed"
|
|
48
48
|
}
|
|
49
|
-
}, I = l.find((e) => e.value ===
|
|
49
|
+
}, I = l.find((e) => e.value === h) ?? l[0], g = I.label.length * N + k * 2 + b, W = () => C(() => Object.values(c).reduce((i, r) => i + r, 0) + b, [c]), v = {
|
|
50
50
|
small: n ? W() : (w - 1) * a.small + o.small,
|
|
51
51
|
medium: n ? W() : (w - 1) * a.medium + o.medium,
|
|
52
52
|
large: n ? W() : (w - 1) * a.large + o.large
|
|
@@ -62,7 +62,7 @@ const X = (T) => {
|
|
|
62
62
|
if (d) return;
|
|
63
63
|
const e = m === l.length - 1 ? l[0] : l[m + 1];
|
|
64
64
|
j?.(x, e.value);
|
|
65
|
-
},
|
|
65
|
+
}, p = d ? "disabled" : R;
|
|
66
66
|
return /* @__PURE__ */ u.jsxs(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
@@ -75,8 +75,8 @@ const X = (T) => {
|
|
|
75
75
|
},
|
|
76
76
|
className: s(
|
|
77
77
|
S[t].container,
|
|
78
|
-
f[
|
|
79
|
-
"border
|
|
78
|
+
f[p].container,
|
|
79
|
+
"border",
|
|
80
80
|
!d && "cursor-pointer",
|
|
81
81
|
"relative"
|
|
82
82
|
),
|
|
@@ -98,7 +98,7 @@ const X = (T) => {
|
|
|
98
98
|
className: s(
|
|
99
99
|
"absolute top-0 left-0 h-full rounded-[6px] z-30",
|
|
100
100
|
"flex items-center justify-center gap-[2px] p-4",
|
|
101
|
-
f[
|
|
101
|
+
f[p].switch
|
|
102
102
|
),
|
|
103
103
|
onClick: () => {
|
|
104
104
|
!d && D();
|
|
@@ -106,7 +106,7 @@ const X = (T) => {
|
|
|
106
106
|
children: [
|
|
107
107
|
y && z.cloneElement(y, { className: s(
|
|
108
108
|
"w-6 h-6 text-neutral-weak-default min-w-6 min-h-6",
|
|
109
|
-
f[
|
|
109
|
+
f[p].icon
|
|
110
110
|
) }),
|
|
111
111
|
/* @__PURE__ */ u.jsx(
|
|
112
112
|
"p",
|
|
@@ -114,7 +114,7 @@ const X = (T) => {
|
|
|
114
114
|
className: s(
|
|
115
115
|
"prometeo-fonts-label-large ",
|
|
116
116
|
" overflow-hidden overflow-ellipsis text-nowrap select-none ",
|
|
117
|
-
f[
|
|
117
|
+
f[p].switch
|
|
118
118
|
),
|
|
119
119
|
children: I.label
|
|
120
120
|
}
|
|
@@ -130,7 +130,7 @@ const X = (T) => {
|
|
|
130
130
|
"flex justify-center"
|
|
131
131
|
),
|
|
132
132
|
children: l?.map((e, i) => {
|
|
133
|
-
const r = e.value === (
|
|
133
|
+
const r = e.value === (h || l[0].value), A = n ? c[i] + b : o[t], P = n ? c[i] : a[t], O = r ? A : P;
|
|
134
134
|
return /* @__PURE__ */ u.jsx(
|
|
135
135
|
E.span,
|
|
136
136
|
{
|
|
@@ -164,7 +164,7 @@ const X = (T) => {
|
|
|
164
164
|
},
|
|
165
165
|
className: s(
|
|
166
166
|
"px-3 place-content-center overflow-hidden text-ellipsis text-wrap prometeo-fonts-label-large h-full select-none",
|
|
167
|
-
f[
|
|
167
|
+
f[p].option
|
|
168
168
|
),
|
|
169
169
|
children: e.label
|
|
170
170
|
}
|
|
@@ -5,7 +5,7 @@ import je, { memo as W, useState as fe, useRef as G, useMemo as Z, useCallback a
|
|
|
5
5
|
import Be from "./Spinner.es.js";
|
|
6
6
|
import { createPortal as Ke } from "react-dom";
|
|
7
7
|
import { u as Ue } from "./useDragScroll-CHN9OMwn.js";
|
|
8
|
-
import { u as qe, I as Fe } from "./Input-
|
|
8
|
+
import { u as qe, I as Fe } from "./Input-PNwH7rb6.js";
|
|
9
9
|
import Ge from "./CheckBox.es.js";
|
|
10
10
|
import { Skeleton as Ce } from "./Skeleton.es.js";
|
|
11
11
|
const He = (r) => {
|
package/dist/Select.es.js
CHANGED
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as m } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { useField as c } from "formik";
|
|
3
|
-
import { S as f } from "./Select-
|
|
3
|
+
import { S as f } from "./Select-C-aLaiJu.js";
|
|
4
4
|
import { useRef as d, useEffect as v } from "react";
|
|
5
5
|
function n(r) {
|
|
6
6
|
return Array.isArray(r) && r.every(
|
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as
|
|
3
|
-
import { useState as y, useRef as O, useEffect as a, useMemo as
|
|
1
|
+
import { j as $ } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { g as s, S as ee } from "./Select-C-aLaiJu.js";
|
|
3
|
+
import { useState as y, useRef as O, useEffect as a, useMemo as q, useCallback as z } from "react";
|
|
4
4
|
function te(e) {
|
|
5
5
|
const {
|
|
6
6
|
options: f,
|
|
@@ -8,15 +8,15 @@ function te(e) {
|
|
|
8
8
|
fetcher: C,
|
|
9
9
|
asyncMode: g = "fetch_in_open",
|
|
10
10
|
disabled: v = !1,
|
|
11
|
-
debounceDelay:
|
|
11
|
+
debounceDelay: m = 500,
|
|
12
12
|
minCharacters: S = 3,
|
|
13
|
-
optionLabel:
|
|
13
|
+
optionLabel: p,
|
|
14
14
|
optionValue: d,
|
|
15
15
|
controlledValue: u,
|
|
16
16
|
isOpen: j,
|
|
17
17
|
inputRef: L,
|
|
18
18
|
name: k
|
|
19
|
-
} = e || {}, [V, _] = y(f || []), [P, w] = y(f || []), [c, T] = y(""), [M, I] = y(!1), [h, A] = y([]), [
|
|
19
|
+
} = e || {}, [V, _] = y(f || []), [P, w] = y(f || []), [c, T] = y(""), [M, I] = y(!1), [h, A] = y([]), [G, H] = y(!1), R = O(null), D = O(null), J = O(!1), x = O(C), F = O([]);
|
|
20
20
|
a(() => {
|
|
21
21
|
x.current = C;
|
|
22
22
|
}, [C]), a(() => {
|
|
@@ -26,100 +26,100 @@ function te(e) {
|
|
|
26
26
|
}, [u, h]), a(() => {
|
|
27
27
|
e?.options && (_(e.options), w(e.options));
|
|
28
28
|
}, [e?.options]);
|
|
29
|
-
const K =
|
|
29
|
+
const K = q(() => (t, n) => new Promise((r, o) => {
|
|
30
30
|
R.current && clearTimeout(R.current), R.current = setTimeout(() => t(c).then(r).catch(o), n);
|
|
31
|
-
}), [c]),
|
|
31
|
+
}), [c]), Q = (t) => {
|
|
32
32
|
const n = u !== void 0, r = F.current;
|
|
33
33
|
let o;
|
|
34
|
-
const
|
|
35
|
-
l ? r.some((b) =>
|
|
36
|
-
},
|
|
34
|
+
const i = (E) => d ? s(E, d) : s(E, "id");
|
|
35
|
+
l ? r.some((b) => i(b) === i(t)) ? o = r.filter((b) => i(b) !== i(t)) : o = [...r, t] : o = [t], n ? (F.current = o, e?.onChange?.(o, k)) : (F.current = o, A(o), e?.onChange?.(o, k));
|
|
36
|
+
}, N = (t) => (e?.onFetchingStart?.(), x.current?.(t) || Promise.resolve([])), B = z((t, n) => t.length === 0 ? n : d ? n.filter((r) => !t.some((o) => s(o, d) === s(r, d))) : n.filter((r) => !t.some((o) => s(o, "id") === s(r, "id"))), [d]);
|
|
37
37
|
a(() => {
|
|
38
38
|
const t = e?.subscribeOpenChange;
|
|
39
39
|
if (!t) return;
|
|
40
40
|
const n = t((r) => {
|
|
41
|
-
|
|
41
|
+
H(r);
|
|
42
42
|
});
|
|
43
43
|
return () => {
|
|
44
44
|
n && n();
|
|
45
45
|
};
|
|
46
46
|
}, [e?.subscribeOpenChange]);
|
|
47
|
-
const
|
|
47
|
+
const U = j !== void 0 ? j : G;
|
|
48
48
|
a(() => {
|
|
49
49
|
if (!v && x.current && g === "fetch_on_type") {
|
|
50
50
|
if (!c || c === "" || c.length < S) {
|
|
51
51
|
R.current && clearTimeout(R.current), I(!1);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const t = K(
|
|
54
|
+
const t = K(N, m);
|
|
55
55
|
I(!0), t.then((n) => {
|
|
56
56
|
_(n);
|
|
57
57
|
}).finally(() => {
|
|
58
58
|
I(!1), e?.onFetchingEnd?.();
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
}, [g, c, v,
|
|
62
|
-
if (
|
|
61
|
+
}, [g, c, v, m, K, S]), a(() => {
|
|
62
|
+
if (U) {
|
|
63
63
|
if (e?.onOpen?.(), g === "fetch_in_open") {
|
|
64
64
|
if (!x.current)
|
|
65
65
|
return;
|
|
66
|
-
I(!0),
|
|
67
|
-
_(() => h.length > 0 ? [...
|
|
66
|
+
I(!0), N().then((t) => {
|
|
67
|
+
_(() => h.length > 0 ? [...B(h, t), ...h] : t);
|
|
68
68
|
}).finally(() => {
|
|
69
69
|
I(!1), e?.onFetchingEnd?.();
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
} else
|
|
73
73
|
e?.onClose?.();
|
|
74
|
-
}, [
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
74
|
+
}, [U, g]);
|
|
75
|
+
const X = (t, n) => t.filter((r) => {
|
|
76
|
+
if (p)
|
|
77
|
+
return s(r, p).toLowerCase().includes(n.toLowerCase());
|
|
78
78
|
switch (typeof r) {
|
|
79
79
|
case "string":
|
|
80
80
|
return r.toLowerCase().includes(n.toLowerCase());
|
|
81
81
|
case "number":
|
|
82
82
|
return r.toString().includes(n);
|
|
83
83
|
case "object":
|
|
84
|
-
return Object.values(r).some((
|
|
84
|
+
return Object.values(r).some((i) => i.toString().toLowerCase().includes(n.toLowerCase()));
|
|
85
85
|
default:
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
88
|
+
}), Y = (t) => t.sort((n, r) => {
|
|
89
|
+
if (p)
|
|
90
|
+
return s(n, p) < s(r, p) ? -1 : 1;
|
|
91
91
|
{
|
|
92
|
-
const
|
|
92
|
+
const i = ["label", "name", "value"].find((b) => typeof n == "object" && Object.keys(n).includes(b));
|
|
93
93
|
switch (typeof n) {
|
|
94
94
|
case "string":
|
|
95
95
|
return n < r ? -1 : 1;
|
|
96
96
|
case "number":
|
|
97
97
|
return n < r ? -1 : 1;
|
|
98
98
|
case "object":
|
|
99
|
-
if (
|
|
100
|
-
const b =
|
|
101
|
-
return b <
|
|
99
|
+
if (i) {
|
|
100
|
+
const b = s(n, i), Z = s(r, i);
|
|
101
|
+
return b < Z ? -1 : 1;
|
|
102
102
|
} else
|
|
103
103
|
return 1;
|
|
104
104
|
default:
|
|
105
105
|
return 1;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
}),
|
|
108
|
+
}), W = (t) => {
|
|
109
109
|
const n = typeof L == "function" ? L() : L;
|
|
110
110
|
t.target === n?.current && (D.current && clearTimeout(D.current), J.current || (J.current = !0, e?.onTypeStart?.()), D.current = setTimeout(() => {
|
|
111
111
|
J.current = !1;
|
|
112
|
-
},
|
|
112
|
+
}, m));
|
|
113
113
|
};
|
|
114
114
|
return a(() => {
|
|
115
115
|
if (c === "")
|
|
116
|
-
w(
|
|
116
|
+
w(Y(V));
|
|
117
117
|
else {
|
|
118
|
-
const t =
|
|
119
|
-
w([...
|
|
118
|
+
const t = B(h, V);
|
|
119
|
+
w([...X(t, c), ...h]);
|
|
120
120
|
}
|
|
121
|
-
}, [V]), a(() => (document.addEventListener("keydown",
|
|
122
|
-
document.removeEventListener("keydown",
|
|
121
|
+
}, [V]), a(() => (document.addEventListener("keydown", W), () => {
|
|
122
|
+
document.removeEventListener("keydown", W);
|
|
123
123
|
}), []), {
|
|
124
124
|
inputValue: c,
|
|
125
125
|
setInputValue: T,
|
|
@@ -130,11 +130,11 @@ function te(e) {
|
|
|
130
130
|
isLoading: M,
|
|
131
131
|
value: h,
|
|
132
132
|
setValue: A,
|
|
133
|
-
onOptionClick:
|
|
133
|
+
onOptionClick: Q
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
const f = O(null), { asyncMode: l = "fetch_in_open" } = e, { inputValue: C, setInputValue: g, filteredOptions: v, isLoading:
|
|
136
|
+
const se = (e) => {
|
|
137
|
+
const f = O(null), { asyncMode: l = "fetch_in_open" } = e, { inputValue: C, setInputValue: g, filteredOptions: v, isLoading: m, value: S, onOptionClick: p, cleanInputValue: d } = te({
|
|
138
138
|
options: e.options,
|
|
139
139
|
fetcher: e.fetcher,
|
|
140
140
|
asyncMode: l,
|
|
@@ -156,9 +156,9 @@ const ie = (e) => {
|
|
|
156
156
|
subscribeOpenChange: f.current?.subscribeOpenChange,
|
|
157
157
|
onChange: e.onChange,
|
|
158
158
|
name: e.name
|
|
159
|
-
}), u =
|
|
160
|
-
const T = v.find((M) =>
|
|
161
|
-
T &&
|
|
159
|
+
}), u = q(() => S.map((c) => s(c, e.optionValue)), [S, e.optionValue]), j = z(() => l === "fetch_on_type" ? m : !1, [l, m]), L = (c) => {
|
|
160
|
+
const T = v.find((M) => s(M, e.optionValue) === c.id);
|
|
161
|
+
T && p(T);
|
|
162
162
|
}, { displayMode: k = "chips", dropdownOptions: V, overflow: _ = "scroll", ...P } = e.selectComponentProps || {}, w = {
|
|
163
163
|
controledSearchValue: C,
|
|
164
164
|
onSearchValueChange: l === "fetch_on_type" ? g : void 0,
|
|
@@ -167,9 +167,10 @@ const ie = (e) => {
|
|
|
167
167
|
isLoading: j(),
|
|
168
168
|
...V || {}
|
|
169
169
|
};
|
|
170
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ $.jsx(
|
|
171
171
|
ee,
|
|
172
172
|
{
|
|
173
|
+
className: e.className,
|
|
173
174
|
name: e.name,
|
|
174
175
|
overflow: _,
|
|
175
176
|
...P,
|
|
@@ -185,10 +186,10 @@ const ie = (e) => {
|
|
|
185
186
|
controls: f,
|
|
186
187
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
187
188
|
dropdownOptions: w,
|
|
188
|
-
isLoading: l === "fetch_in_open" ?
|
|
189
|
+
isLoading: l === "fetch_in_open" ? m : !1
|
|
189
190
|
}
|
|
190
|
-
)
|
|
191
|
+
);
|
|
191
192
|
};
|
|
192
193
|
export {
|
|
193
|
-
|
|
194
|
+
se as default
|
|
194
195
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export interface DrawerMobileProps {
|
|
2
|
+
export interface DrawerMobileProps<TContext = unknown> {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
|
-
onClose?: () => void;
|
|
5
|
+
onClose?: (context: TContext | null) => void;
|
|
6
6
|
snap?: string | number | null;
|
|
7
7
|
snapPoints?: (string | number)[];
|
|
8
8
|
setSnap?: (snap: string | number) => void;
|
|
@@ -12,10 +12,11 @@ export interface DrawerMobileProps {
|
|
|
12
12
|
modal?: boolean;
|
|
13
13
|
closeOnOverlayClick?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export interface DrawerMobileHandle {
|
|
16
|
-
open: (snap?: string | number) => void;
|
|
15
|
+
export interface DrawerMobileHandle<TContext = unknown> {
|
|
16
|
+
open: (snap?: string | number, context?: TContext) => void;
|
|
17
17
|
close: () => void;
|
|
18
18
|
isOpen: boolean;
|
|
19
|
+
getContext: () => TContext | null;
|
|
19
20
|
}
|
|
20
|
-
declare const DrawerMobile: React.ForwardRefExoticComponent<DrawerMobileProps & React.RefAttributes<DrawerMobileHandle
|
|
21
|
+
declare const DrawerMobile: React.ForwardRefExoticComponent<DrawerMobileProps<any> & React.RefAttributes<DrawerMobileHandle<any>>>;
|
|
21
22
|
export default DrawerMobile;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DrawerMobileHandle } from './DrawerMobile';
|
|
2
|
-
export declare const useDrawerMobile: () => {
|
|
2
|
+
export declare const useDrawerMobile: <TContext = unknown>() => {
|
|
3
3
|
isOpen: () => boolean;
|
|
4
|
-
open: (snap?: string | number) => void;
|
|
4
|
+
open: (snap?: string | number, context?: TContext) => void;
|
|
5
5
|
close: () => void;
|
|
6
|
-
drawerRef: import('react').RefObject<DrawerMobileHandle | null>;
|
|
6
|
+
drawerRef: import('react').RefObject<DrawerMobileHandle<TContext> | null>;
|
|
7
|
+
getContext: () => NonNullable<TContext> | null;
|
|
7
8
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColorVariant, ButtonVariant } from '../Shared/types';
|
|
3
|
+
import { IconComponent } from '../../Icons/Icons';
|
|
4
|
+
export interface FAButtonProps {
|
|
5
|
+
icon?: IconComponent;
|
|
6
|
+
label?: string;
|
|
7
|
+
attachToParent?: boolean;
|
|
8
|
+
position?: {
|
|
9
|
+
left?: number | string;
|
|
10
|
+
top?: number | string;
|
|
11
|
+
right?: number | string;
|
|
12
|
+
bottom?: number | string;
|
|
13
|
+
};
|
|
14
|
+
color?: ColorVariant;
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const FAButton: React.MemoExoticComponent<(props: FAButtonProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export default FAButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface OtpInputProps {
|
|
3
3
|
value?: string;
|
|
4
|
-
onChange?: (value: string) => void;
|
|
4
|
+
onChange?: (value: string, name?: string) => void;
|
|
5
5
|
onComplete?: (value: string) => void;
|
|
6
6
|
onBlur?: () => void;
|
|
7
7
|
maxLength?: number;
|
|
@@ -23,5 +23,8 @@ export interface OtpInputProps {
|
|
|
23
23
|
name?: string;
|
|
24
24
|
variant?: 'default' | 'error' | 'success';
|
|
25
25
|
}
|
|
26
|
-
declare const OtpInputComponent:
|
|
26
|
+
declare const OtpInputComponent: {
|
|
27
|
+
({ value, name, onChange, onComplete, onBlur, maxLength, placeholder, disabled, className, autoFocus, pasteTransformer, errorComponent, hasError, helperComponent, helperAlignment, slotClassName, variant, hideSlotsMiddleSeparator }: OtpInputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
27
30
|
export default OtpInputComponent;
|
|
@@ -16,6 +16,7 @@ export interface SelectSearchProps<T> {
|
|
|
16
16
|
inputSearchPlaceholder?: string;
|
|
17
17
|
labelVariant?: 'static' | 'default';
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
19
20
|
renderOption?: ComponentType<CustomSelectOptionRendererProps<T>>;
|
|
20
21
|
renderSelection?: ComponentType<CustomSelectionDisplayProps<T>>;
|
|
21
22
|
selectComponentProps?: Partial<SelectProps<T>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/FAB/FAButton';
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { default as Toast } from './components/Toaster/Toaster';
|
|
|
37
37
|
export { default as ToastProvider } from './components/Toaster/ToastProvider';
|
|
38
38
|
export { toastpyrion } from './components/Toaster/Toaster';
|
|
39
39
|
export { default as SelectSearch } from './components/SelectSearch/SelectSearch';
|
|
40
|
+
export { default as FAButton } from './components/FAB/FAButton';
|
|
40
41
|
export * from './components/Sidebar';
|
|
41
42
|
export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
|
|
42
43
|
export { Badge } from './components/Sidebar/components/badge';
|
|
@@ -99,4 +100,5 @@ export type { CustomSelectionDisplayProps } from './components/Select/Select';
|
|
|
99
100
|
export type { CustomSelectOptionRendererProps } from './components/Select/Select';
|
|
100
101
|
export type { SelectOptionType } from './components/Select/Select';
|
|
101
102
|
export type { SelectSearchProps } from './components/SelectSearch/SelectSearch';
|
|
103
|
+
export type { FAButtonProps } from './components/FAB/FAButton';
|
|
102
104
|
export { Icons } from './Icons/Icons';
|