@gardenfi/garden-book 0.3.0-beta.1 → 0.3.0-beta.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/DashboardLayout/MobileMenu.js +34 -34
- package/dist/InfoTooltip/index.js +52 -39
- package/dist/SelectDropdown/SelectDropdown.d.ts +3 -1
- package/dist/SelectDropdown/index.js +138 -106
- package/dist/index.d.ts +0 -1
- package/dist/index.js +62 -64
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/FilterDropdown/FilterDropdown.d.ts +0 -15
- package/dist/FilterDropdown/index.d.ts +0 -2
- package/dist/FilterDropdown/index.js +0 -6
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, Fragment as C, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { HamburgerIcon as S } from "../HamburgerIcon/index.js";
|
|
4
4
|
import { ResponsiveModal as w } from "../ResponsiveModal/index.js";
|
|
5
|
-
import { Typography as
|
|
5
|
+
import { Typography as t } from "../Typography/index.js";
|
|
6
6
|
import { Button as M } from "../Button/index.js";
|
|
7
7
|
import { cn as j } from "../utils/index.js";
|
|
8
8
|
import I from "../node_modules/lucide-react/dist/esm/icons/log-out.js";
|
|
9
|
-
const R = ({ title: i, isOpen:
|
|
10
|
-
/* @__PURE__ */ e("span", { onClick: o, className: "gf-block gf-cursor-pointer", children: /* @__PURE__ */ e(
|
|
9
|
+
const R = ({ title: i, isOpen: n, onToggle: o, children: s }) => /* @__PURE__ */ a("div", { children: [
|
|
10
|
+
/* @__PURE__ */ e("span", { onClick: o, className: "gf-block gf-cursor-pointer", children: /* @__PURE__ */ e(t, { size: "h3", weight: "medium", children: i }) }),
|
|
11
11
|
/* @__PURE__ */ e(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
14
|
className: j(
|
|
15
15
|
"gf-grid gf-transition-[grid-template-rows,opacity] gf-duration-500 gf-ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
16
|
-
|
|
16
|
+
n ? "gf-grid-rows-[1fr] gf-opacity-100" : "gf-grid-rows-[0fr] gf-opacity-0"
|
|
17
17
|
),
|
|
18
|
-
children: /* @__PURE__ */ e("div", { className: "gf-overflow-hidden", children: /* @__PURE__ */ e("div", { className: "gf-ml-6 gf-flex gf-flex-col", children:
|
|
18
|
+
children: /* @__PURE__ */ e("div", { className: "gf-overflow-hidden", children: /* @__PURE__ */ e("div", { className: "gf-ml-6 gf-flex gf-flex-col", children: s }) })
|
|
19
19
|
}
|
|
20
20
|
)
|
|
21
21
|
] }), A = ({
|
|
22
22
|
navGroups: i,
|
|
23
|
-
activePath:
|
|
23
|
+
activePath: n,
|
|
24
24
|
onNavigate: o,
|
|
25
|
-
onLogout:
|
|
25
|
+
onLogout: s,
|
|
26
26
|
showLogoutConfirm: N = !1,
|
|
27
27
|
onLogoutConfirmClose: c
|
|
28
28
|
}) => {
|
|
29
29
|
var b;
|
|
30
|
-
const [
|
|
30
|
+
const [h, p] = m(!1), [y, g] = m(!1), [k, u] = m(
|
|
31
31
|
((b = i[0]) == null ? void 0 : b.label) ?? "group-0"
|
|
32
32
|
), d = () => {
|
|
33
|
-
var
|
|
34
|
-
|
|
33
|
+
var l;
|
|
34
|
+
p(!1), u(((l = i[0]) == null ? void 0 : l.label) ?? "group-0");
|
|
35
35
|
}, v = () => {
|
|
36
|
-
d(), N ? g(!0) :
|
|
36
|
+
d(), N ? g(!0) : s();
|
|
37
37
|
}, z = () => {
|
|
38
38
|
g(!1), c == null || c();
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ a(C, { children: [
|
|
41
41
|
/* @__PURE__ */ e(
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
onClick: () =>
|
|
45
|
+
onClick: () => p((l) => !l),
|
|
46
46
|
"aria-label": "Open menu",
|
|
47
47
|
className: "gf-shrink-0",
|
|
48
|
-
children: /* @__PURE__ */ e(S, { isOpen:
|
|
48
|
+
children: /* @__PURE__ */ e(S, { isOpen: h })
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ e("nav", { className: "gf-flex gf-flex-col gf-gap-4 gf-p-6 gf-bg-white/30 gf-rounded-xl", children: i.map((
|
|
53
|
-
const
|
|
51
|
+
/* @__PURE__ */ a(w, { open: h, onClose: d, className: "gf-w-full", children: [
|
|
52
|
+
/* @__PURE__ */ e("nav", { className: "gf-flex gf-flex-col gf-gap-4 gf-p-6 gf-bg-white/30 gf-rounded-xl", children: i.map((l, O) => {
|
|
53
|
+
const f = l.label ?? `group-${O}`;
|
|
54
54
|
return /* @__PURE__ */ e(
|
|
55
55
|
R,
|
|
56
56
|
{
|
|
57
|
-
title:
|
|
58
|
-
isOpen: k ===
|
|
59
|
-
onToggle: () => u((
|
|
60
|
-
children:
|
|
61
|
-
const x =
|
|
57
|
+
title: l.label ?? "Navigation",
|
|
58
|
+
isOpen: k === f,
|
|
59
|
+
onToggle: () => u((r) => r === f ? "" : f),
|
|
60
|
+
children: l.items.map((r) => {
|
|
61
|
+
const x = n === r.href || n === `${r.href}/`;
|
|
62
62
|
return /* @__PURE__ */ e(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: "gf-cursor-pointer gf-pt-4",
|
|
66
66
|
onClick: () => {
|
|
67
|
-
o(
|
|
67
|
+
o(r.href), d();
|
|
68
68
|
},
|
|
69
69
|
children: /* @__PURE__ */ e(
|
|
70
|
-
|
|
70
|
+
t,
|
|
71
71
|
{
|
|
72
72
|
size: "h3",
|
|
73
73
|
weight: x ? "medium" : "regular",
|
|
74
74
|
className: x ? "gf-text-primaryIris" : "gf-text-dark-grey",
|
|
75
|
-
children:
|
|
75
|
+
children: r.title
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
78
|
},
|
|
79
|
-
|
|
79
|
+
r.href
|
|
80
80
|
);
|
|
81
81
|
})
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
f
|
|
84
84
|
);
|
|
85
85
|
}) }),
|
|
86
|
-
/* @__PURE__ */ e("nav", { className: "gf-py-5 gf-px-6 gf-bg-white/30 gf-rounded-xl
|
|
86
|
+
/* @__PURE__ */ e("nav", { className: "gf-py-5 gf-px-6 gf-bg-white/30 gf-rounded-xl", children: /* @__PURE__ */ a(
|
|
87
87
|
"button",
|
|
88
88
|
{
|
|
89
89
|
type: "button",
|
|
90
90
|
onClick: v,
|
|
91
|
-
className: "gf-flex gf-cursor-pointer gf-items-center gf-gap-2 focus:gf-outline-none",
|
|
91
|
+
className: "gf-flex gf-w-full gf-cursor-pointer gf-items-center gf-gap-2 focus:gf-outline-none",
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ e(I, { className: "gf-h-5 gf-w-5" }),
|
|
94
|
-
/* @__PURE__ */ e(
|
|
94
|
+
/* @__PURE__ */ e(t, { size: "h3", weight: "medium", children: "Log out" })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
) })
|
|
98
98
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ a(
|
|
100
100
|
w,
|
|
101
101
|
{
|
|
102
102
|
open: y,
|
|
@@ -104,14 +104,14 @@ const R = ({ title: i, isOpen: s, onToggle: o, children: a }) => /* @__PURE__ */
|
|
|
104
104
|
label: "Ready to sign out?",
|
|
105
105
|
className: "gf-max-w-sm",
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ e("div", { className: "gf-flex gf-flex-col gf-gap-2", children: /* @__PURE__ */ e(
|
|
107
|
+
/* @__PURE__ */ e("div", { className: "gf-flex gf-flex-col gf-gap-2", children: /* @__PURE__ */ e(t, { size: "h5", weight: "regular", children: "You'll be signed out and redirected to the login page." }) }),
|
|
108
108
|
/* @__PURE__ */ e(
|
|
109
109
|
M,
|
|
110
110
|
{
|
|
111
111
|
variant: "primary",
|
|
112
112
|
className: "gf-w-full",
|
|
113
113
|
onClick: () => {
|
|
114
|
-
g(!1),
|
|
114
|
+
g(!1), s();
|
|
115
115
|
},
|
|
116
116
|
children: "Sign out"
|
|
117
117
|
}
|
|
@@ -1,68 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Provider as h, Root as x, Trigger as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as f, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useEffect as d, useRef as b } from "react";
|
|
3
|
+
import { Provider as h, Root as x, Trigger as v, Content as y } from "../node_modules/@radix-ui/react-tooltip/dist/index.js";
|
|
4
|
+
import { cn as p } from "../utils/index.js";
|
|
5
5
|
const w = {
|
|
6
6
|
top: "gf-left-1/2 -gf-ml-1.5 -gf-bottom-1",
|
|
7
7
|
bottom: "gf-left-1/2 -gf-ml-1.5 -gf-top-1",
|
|
8
8
|
left: "gf-top-1/2 -gf-mt-1.5 -gf-right-1",
|
|
9
9
|
right: "gf-top-1/2 -gf-mt-1.5 -gf-left-1"
|
|
10
|
-
}, O = ({ side:
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
10
|
+
}, O = ({ side: r, className: i, children: a, collisionBoundary: g }) => {
|
|
11
|
+
const n = b(null), [c, l] = u(r);
|
|
12
|
+
return d(() => {
|
|
13
|
+
const t = n.current;
|
|
14
|
+
if (!t) return;
|
|
15
|
+
const o = () => {
|
|
16
|
+
const s = t.getAttribute("data-side");
|
|
17
|
+
s && l(s);
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
}, []), /* @__PURE__ */
|
|
23
|
-
|
|
19
|
+
o();
|
|
20
|
+
const e = new MutationObserver(o);
|
|
21
|
+
return e.observe(t, { attributes: !0, attributeFilter: ["data-side"] }), () => e.disconnect();
|
|
22
|
+
}, []), /* @__PURE__ */ m(
|
|
23
|
+
y,
|
|
24
24
|
{
|
|
25
|
-
ref:
|
|
26
|
-
side:
|
|
25
|
+
ref: n,
|
|
26
|
+
side: r,
|
|
27
27
|
sideOffset: 10,
|
|
28
28
|
collisionPadding: 12,
|
|
29
|
-
collisionBoundary:
|
|
30
|
-
className:
|
|
29
|
+
collisionBoundary: g ?? void 0,
|
|
30
|
+
className: p(
|
|
31
31
|
"gf-relative gf-max-w-[260px] gf-rounded-2xl gf-bg-white gf-px-4 gf-py-3 gf-border-0 gf-overflow-visible",
|
|
32
32
|
"gf-shadow-[0_4px_12px_-4px_rgba(85,75,106,0.14)]",
|
|
33
33
|
"gf-text-primaryIris",
|
|
34
|
-
|
|
34
|
+
i
|
|
35
35
|
),
|
|
36
36
|
children: [
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
37
|
+
a,
|
|
38
|
+
/* @__PURE__ */ f(
|
|
39
39
|
"span",
|
|
40
40
|
{
|
|
41
41
|
"aria-hidden": !0,
|
|
42
|
-
className:
|
|
42
|
+
className: p(
|
|
43
43
|
"gf-absolute gf-block gf-h-3 gf-w-3 gf-rotate-45 gf-rounded-[3px] gf-bg-white",
|
|
44
|
-
w[
|
|
44
|
+
w[c]
|
|
45
45
|
)
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
|
-
},
|
|
52
|
-
trigger:
|
|
53
|
-
children:
|
|
54
|
-
side:
|
|
55
|
-
delayDuration:
|
|
56
|
-
className:
|
|
51
|
+
}, B = ({
|
|
52
|
+
trigger: r,
|
|
53
|
+
children: i,
|
|
54
|
+
side: a = "top",
|
|
55
|
+
delayDuration: g = 150,
|
|
56
|
+
className: n
|
|
57
57
|
}) => {
|
|
58
|
-
const [
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
}, []),
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
const [c, l] = u(null), [t, o] = u(!1);
|
|
59
|
+
return d(() => {
|
|
60
|
+
l(document.querySelector("main"));
|
|
61
|
+
}, []), d(() => {
|
|
62
|
+
if (!t) return;
|
|
63
|
+
const e = () => o(!1);
|
|
64
|
+
return document.addEventListener("touchstart", e, { passive: !0 }), () => document.removeEventListener("touchstart", e);
|
|
65
|
+
}, [t]), /* @__PURE__ */ f(h, { delayDuration: g, children: /* @__PURE__ */ m(x, { open: t, onOpenChange: o, children: [
|
|
66
|
+
/* @__PURE__ */ f(
|
|
67
|
+
v,
|
|
68
|
+
{
|
|
69
|
+
asChild: !0,
|
|
70
|
+
onTouchStart: (e) => {
|
|
71
|
+
e.stopPropagation(), o((s) => !s);
|
|
72
|
+
},
|
|
73
|
+
children: r
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ f(O, { side: a, className: n, collisionBoundary: c, children: i })
|
|
64
77
|
] }) });
|
|
65
78
|
};
|
|
66
79
|
export {
|
|
67
|
-
|
|
80
|
+
B as InfoTooltip
|
|
68
81
|
};
|
|
@@ -30,10 +30,12 @@ export type SelectDropdownProps<V extends string> = {
|
|
|
30
30
|
triggerIcon?: ReactNode;
|
|
31
31
|
/** Typography size for trigger + item labels. Default `"h5"`. */
|
|
32
32
|
labelSize?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
33
|
+
/** Tailwind `from-*` class for the scroll-overflow gradient fades. Default `"gf-from-white"`. */
|
|
34
|
+
scrollGradientColor?: string;
|
|
33
35
|
};
|
|
34
36
|
/**
|
|
35
37
|
* Glassmorphic select — no background, no border, just backdrop-blur on the
|
|
36
38
|
* panel. Built from scratch (no shadcn DropdownMenu) so the blur actually
|
|
37
39
|
* shows through to the page content behind it.
|
|
38
40
|
*/
|
|
39
|
-
export declare const SelectDropdown: <V extends string>({ items, value, onChange, placeholder, separatorsAfter, clearAction, align, disabled, contentClassName, triggerClassName, wrapperClassName, triggerIcon, labelSize, }: SelectDropdownProps<V>) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const SelectDropdown: <V extends string>({ items, value, onChange, placeholder, separatorsAfter, clearAction, align, disabled, contentClassName, triggerClassName, wrapperClassName, triggerIcon, labelSize, scrollGradientColor, }: SelectDropdownProps<V>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,97 +1,109 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { AnimatePresence as
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { Portal as
|
|
6
|
-
import { cn as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
items:
|
|
10
|
-
value:
|
|
11
|
-
onChange:
|
|
12
|
-
placeholder:
|
|
13
|
-
separatorsAfter:
|
|
14
|
-
clearAction:
|
|
15
|
-
align:
|
|
16
|
-
disabled:
|
|
17
|
-
contentClassName:
|
|
18
|
-
triggerClassName:
|
|
19
|
-
wrapperClassName:
|
|
20
|
-
triggerIcon:
|
|
21
|
-
labelSize:
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as w, useCallback as J, useLayoutEffect as M, useEffect as B, Fragment as Q } from "react";
|
|
3
|
+
import { AnimatePresence as U, motion as V } from "framer-motion";
|
|
4
|
+
import { Typography as E } from "../Typography/index.js";
|
|
5
|
+
import { Portal as X } from "../Portal/index.js";
|
|
6
|
+
import { cn as f } from "../utils/index.js";
|
|
7
|
+
import Y from "../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
8
|
+
const ie = ({
|
|
9
|
+
items: d,
|
|
10
|
+
value: b,
|
|
11
|
+
onChange: L,
|
|
12
|
+
placeholder: H = "",
|
|
13
|
+
separatorsAfter: v,
|
|
14
|
+
clearAction: u,
|
|
15
|
+
align: x = "start",
|
|
16
|
+
disabled: $,
|
|
17
|
+
contentClassName: D,
|
|
18
|
+
triggerClassName: O,
|
|
19
|
+
wrapperClassName: W,
|
|
20
|
+
triggerIcon: z,
|
|
21
|
+
labelSize: R = "h5",
|
|
22
|
+
scrollGradientColor: S = "gf-from-white"
|
|
22
23
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const [n, l] = m(!1), T = w(null), P = w(null), a = w(null), C = w(null), [p, F] = m({ top: 0, width: 0 }), [K, G] = m(!1), [q, _] = m(!1), y = d.find((e) => e.value === b) ?? null, I = (y == null ? void 0 : y.label) ?? H, h = J(() => {
|
|
25
|
+
const e = C.current;
|
|
26
|
+
e && (G(e.scrollTop > 0), _(e.scrollTop + e.clientHeight < e.scrollHeight - 1));
|
|
27
|
+
}, []);
|
|
28
|
+
return M(() => {
|
|
29
|
+
if (!n) return;
|
|
30
|
+
const e = (g = !1) => {
|
|
27
31
|
const s = P.current;
|
|
28
32
|
if (!s) return;
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
|
|
33
|
+
const r = s.getBoundingClientRect();
|
|
34
|
+
if (r.bottom < 0 || r.top > window.innerHeight) {
|
|
35
|
+
l(!1);
|
|
32
36
|
return;
|
|
33
37
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
38
|
+
const j = r.bottom + 6, N = x === "end" ? void 0 : r.left, k = x === "end" ? window.innerWidth - r.right : void 0;
|
|
39
|
+
g && a.current ? (a.current.style.top = `${j}px`, N !== void 0 && (a.current.style.left = `${N}px`), k !== void 0 && (a.current.style.right = `${k}px`)) : F({ top: j, left: N, right: k, width: r.width });
|
|
36
40
|
};
|
|
37
41
|
e();
|
|
38
|
-
const i = () => e(!1),
|
|
39
|
-
return window.addEventListener("resize", i), window.addEventListener("scroll",
|
|
40
|
-
window.removeEventListener("resize", i), window.removeEventListener("scroll",
|
|
42
|
+
const i = () => e(!1), o = () => e(!0);
|
|
43
|
+
return window.addEventListener("resize", i), window.addEventListener("scroll", o, !0), () => {
|
|
44
|
+
window.removeEventListener("resize", i), window.removeEventListener("scroll", o, !0);
|
|
41
45
|
};
|
|
42
|
-
}, [
|
|
43
|
-
if (!
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
}, [n, x]), B(() => {
|
|
47
|
+
if (!n) {
|
|
48
|
+
G(!1), _(!1);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
h();
|
|
52
|
+
const e = setTimeout(h, 50);
|
|
53
|
+
return () => clearTimeout(e);
|
|
54
|
+
}, [n, d, h]), B(() => {
|
|
55
|
+
if (!n) return;
|
|
56
|
+
const e = (o) => {
|
|
57
|
+
var s, r;
|
|
58
|
+
const g = o.target;
|
|
59
|
+
(s = T.current) != null && s.contains(g) || (r = a.current) != null && r.contains(g) || l(!1);
|
|
60
|
+
}, i = (o) => {
|
|
61
|
+
o.key === "Escape" && l(!1);
|
|
50
62
|
};
|
|
51
63
|
return document.addEventListener("mousedown", e), document.addEventListener("keydown", i), () => {
|
|
52
64
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", i);
|
|
53
65
|
};
|
|
54
|
-
}, [
|
|
55
|
-
/* @__PURE__ */
|
|
66
|
+
}, [n]), /* @__PURE__ */ c("div", { ref: T, className: f("gf-relative gf-inline-block", W), children: [
|
|
67
|
+
/* @__PURE__ */ c(
|
|
56
68
|
"button",
|
|
57
69
|
{
|
|
58
70
|
ref: P,
|
|
59
71
|
type: "button",
|
|
60
|
-
disabled:
|
|
61
|
-
onClick: () =>
|
|
72
|
+
disabled: $,
|
|
73
|
+
onClick: () => l((e) => !e),
|
|
62
74
|
"aria-haspopup": "listbox",
|
|
63
|
-
"aria-expanded":
|
|
64
|
-
className:
|
|
75
|
+
"aria-expanded": n,
|
|
76
|
+
className: f(
|
|
65
77
|
"gf-flex gf-items-center gf-gap-1.5 gf-py-2 gf-px-3 gf-rounded-full gf-bg-white/70 focus:gf-outline-none gf-transition-colors disabled:gf-cursor-not-allowed",
|
|
66
|
-
|
|
78
|
+
O
|
|
67
79
|
),
|
|
68
80
|
children: [
|
|
69
|
-
|
|
81
|
+
z && /* @__PURE__ */ t("span", { className: "gf-flex gf-items-center gf-shrink-0", children: z }),
|
|
70
82
|
/* @__PURE__ */ t(
|
|
71
|
-
|
|
83
|
+
E,
|
|
72
84
|
{
|
|
73
|
-
size:
|
|
85
|
+
size: R,
|
|
74
86
|
weight: "regular",
|
|
75
87
|
className: "gf-truncate gf-flex-1 gf-text-left",
|
|
76
|
-
children:
|
|
88
|
+
children: I
|
|
77
89
|
}
|
|
78
90
|
),
|
|
79
91
|
/* @__PURE__ */ t(
|
|
80
|
-
|
|
92
|
+
Y,
|
|
81
93
|
{
|
|
82
|
-
className:
|
|
94
|
+
className: f(
|
|
83
95
|
"gf-h-3.5 gf-w-3.5 gf-text-primaryIris gf-flex-shrink-0 gf-transition-transform",
|
|
84
|
-
|
|
96
|
+
n && "gf-rotate-180"
|
|
85
97
|
)
|
|
86
98
|
}
|
|
87
99
|
)
|
|
88
100
|
]
|
|
89
101
|
}
|
|
90
102
|
),
|
|
91
|
-
/* @__PURE__ */ t(
|
|
92
|
-
|
|
103
|
+
/* @__PURE__ */ t(X, { children: /* @__PURE__ */ t(U, { children: n && /* @__PURE__ */ t(
|
|
104
|
+
V.div,
|
|
93
105
|
{
|
|
94
|
-
ref:
|
|
106
|
+
ref: a,
|
|
95
107
|
role: "listbox",
|
|
96
108
|
initial: { opacity: 0, y: -4 },
|
|
97
109
|
animate: { opacity: 1, y: 0 },
|
|
@@ -99,65 +111,85 @@ const Y = ({
|
|
|
99
111
|
transition: { duration: 0.15, ease: "easeOut" },
|
|
100
112
|
style: {
|
|
101
113
|
position: "fixed",
|
|
102
|
-
top:
|
|
103
|
-
left:
|
|
104
|
-
right:
|
|
105
|
-
minWidth:
|
|
114
|
+
top: p.top,
|
|
115
|
+
left: p.left,
|
|
116
|
+
right: p.right,
|
|
117
|
+
minWidth: p.width || void 0
|
|
106
118
|
},
|
|
107
|
-
className:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
e.disabled ? "gf-opacity-35 gf-cursor-default gf-pointer-events-none" : "hover:gf-bg-white/50 gf-cursor-pointer"
|
|
128
|
-
),
|
|
129
|
-
children: [
|
|
130
|
-
e.icon && /* @__PURE__ */ t("span", { className: "gf-flex-shrink-0 gf-flex gf-items-center", children: e.icon }),
|
|
131
|
-
/* @__PURE__ */ t(
|
|
132
|
-
k,
|
|
119
|
+
className: "gf-z-[60] gf-rounded-xl gf-min-w-28 gf-bg-white/30 gf-backdrop-blur-lg [-webkit-backdrop-filter:blur(12px)] gf-overflow-hidden gf-shadow-[0_8px_24px_-12px_rgba(71,60,117,0.2)]",
|
|
120
|
+
children: /* @__PURE__ */ c("div", { className: "gf-relative", children: [
|
|
121
|
+
K && /* @__PURE__ */ t(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: f("gf-absolute gf-top-0 gf-left-0 gf-right-0 gf-h-8 gf-pointer-events-none gf-z-10 gf-bg-gradient-to-b gf-to-transparent", S)
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ c("div", { className: "gf-relative", children: [
|
|
128
|
+
/* @__PURE__ */ t(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
ref: C,
|
|
132
|
+
onScroll: h,
|
|
133
|
+
className: f("gf-py-2 gf-overflow-y-auto gf-max-h-96 [scrollbar-width:none] [&::-webkit-scrollbar]:gf-hidden", D),
|
|
134
|
+
children: d.map((e, i) => {
|
|
135
|
+
const o = e.value === b, g = i === d.length - 1, s = (v == null ? void 0 : v.includes(e.value)) && !g;
|
|
136
|
+
return /* @__PURE__ */ c(Q, { children: [
|
|
137
|
+
/* @__PURE__ */ c(
|
|
138
|
+
"button",
|
|
133
139
|
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
type: "button",
|
|
141
|
+
role: "option",
|
|
142
|
+
"aria-selected": o,
|
|
143
|
+
disabled: e.disabled,
|
|
144
|
+
onClick: () => {
|
|
145
|
+
e.disabled || (L(e.value), l(!1));
|
|
146
|
+
},
|
|
147
|
+
className: f(
|
|
148
|
+
"gf-w-full gf-flex gf-items-center gf-gap-3 gf-px-4 gf-py-2 gf-text-sm gf-transition-colors",
|
|
149
|
+
e.disabled ? "gf-opacity-35 gf-cursor-default gf-pointer-events-none" : "hover:gf-bg-white/50 gf-cursor-pointer"
|
|
150
|
+
),
|
|
151
|
+
children: [
|
|
152
|
+
e.icon && /* @__PURE__ */ t("span", { className: "gf-flex-shrink-0 gf-flex gf-items-center", children: e.icon }),
|
|
153
|
+
/* @__PURE__ */ t(
|
|
154
|
+
E,
|
|
155
|
+
{
|
|
156
|
+
size: R,
|
|
157
|
+
weight: "regular",
|
|
158
|
+
className: "gf-truncate gf-flex-1 gf-text-left",
|
|
159
|
+
children: e.label
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
]
|
|
138
163
|
}
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
164
|
+
),
|
|
165
|
+
s && /* @__PURE__ */ t("div", { className: "gf-h-px gf-bg-white/40 gf-my-1 gf-mx-3" })
|
|
166
|
+
] }, e.value);
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
q && /* @__PURE__ */ t(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
className: f("gf-absolute gf-bottom-0 gf-left-0 gf-right-0 gf-h-8 gf-pointer-events-none gf-z-10 gf-bg-gradient-to-t gf-to-transparent", S)
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] }),
|
|
177
|
+
u && b !== u.value && /* @__PURE__ */ t("div", { className: "gf-px-2.5 gf-pb-2 gf-pt-1", children: /* @__PURE__ */ t(
|
|
178
|
+
"button",
|
|
148
179
|
{
|
|
180
|
+
type: "button",
|
|
149
181
|
onClick: () => {
|
|
150
|
-
|
|
182
|
+
L(u.value), l(!1);
|
|
151
183
|
},
|
|
152
|
-
className: "gf-flex gf-items-center gf-justify-center gf-w-full gf-rounded-
|
|
153
|
-
children: /* @__PURE__ */ t(
|
|
184
|
+
className: "gf-flex gf-items-center gf-justify-center gf-w-full gf-rounded-full gf-bg-white/70 hover:gf-bg-white/80 gf-py-1.5 gf-px-3 gf-cursor-pointer gf-transition-colors",
|
|
185
|
+
children: /* @__PURE__ */ t(E, { size: "h5", weight: "regular", children: u.label })
|
|
154
186
|
}
|
|
155
187
|
) })
|
|
156
|
-
]
|
|
188
|
+
] })
|
|
157
189
|
}
|
|
158
190
|
) }) })
|
|
159
191
|
] });
|
|
160
192
|
};
|
|
161
193
|
export {
|
|
162
|
-
|
|
194
|
+
ie as SelectDropdown
|
|
163
195
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export * from './components/molecules/EmptyState';
|
|
|
31
31
|
export * from './components/molecules/ErrorState';
|
|
32
32
|
export * from './components/molecules/InfoTooltip';
|
|
33
33
|
export * from './components/molecules/SelectDropdown';
|
|
34
|
-
export * from './components/molecules/FilterDropdown';
|
|
35
34
|
export * from './components/molecules/ResponsiveModal';
|
|
36
35
|
export * from './components/molecules/Toast';
|
|
37
36
|
export * from './components/organisms/BlogCard';
|