hplx-feature-library 1.0.77 → 1.0.79
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/Attachments/Attachments.d.ts +1 -0
- package/dist/Attachments/components/attachments-header.d.ts +2 -1
- package/dist/Attachments/components/edit-document-modal.d.ts +3 -3
- package/dist/Attachments/index.js +6665 -6646
- package/dist/CustomDropdown/index.js +125 -134
- package/dist/useOutsideClick-C4Q0aGuf.js +15 -0
- package/dist/useOutsideClick-CicUjzPP.cjs +1 -0
- package/package.json +1 -1
|
@@ -1,120 +1,111 @@
|
|
|
1
1
|
import { j as l, P as ye, a as Ce, M as $e } from "../index-6-2iV0ns.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useState as I, useRef as v, useMemo as je, useCallback as O, useEffect as J } from "react";
|
|
3
3
|
import { u as Ne } from "../useClickOutside-BjJyGTec.js";
|
|
4
|
-
import ke from "../
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
i.current && !i.current.contains(N.target) && u();
|
|
9
|
-
},
|
|
10
|
-
[i, u]
|
|
11
|
-
);
|
|
12
|
-
F(() => (document.addEventListener("mouseup", a), () => {
|
|
13
|
-
document.removeEventListener("mouseup", a);
|
|
14
|
-
}), [a]);
|
|
15
|
-
}, Ee = "data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.480062%200.819173C0.650418%200.648817%200.92662%200.648817%201.09698%200.819173L4.71454%204.43674L8.3321%200.819173C8.50246%200.648817%208.77866%200.648817%208.94902%200.819173C9.11937%200.98953%209.11937%201.26573%208.94902%201.43609L5.023%205.36211C4.85264%205.53246%204.57644%205.53246%204.40608%205.36211L0.480062%201.43609C0.309706%201.26573%200.309706%200.98953%200.480062%200.819173Z'%20fill='%23667085'/%3e%3c/svg%3e";
|
|
16
|
-
function Be(i) {
|
|
4
|
+
import { u as ke } from "../useOutsideClick-C4Q0aGuf.js";
|
|
5
|
+
import Le from "../ToggleButtons/index.js";
|
|
6
|
+
const Se = "data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.480062%200.819173C0.650418%200.648817%200.92662%200.648817%201.09698%200.819173L4.71454%204.43674L8.3321%200.819173C8.50246%200.648817%208.77866%200.648817%208.94902%200.819173C9.11937%200.98953%209.11937%201.26573%208.94902%201.43609L5.023%205.36211C4.85264%205.53246%204.57644%205.53246%204.40608%205.36211L0.480062%201.43609C0.309706%201.26573%200.309706%200.98953%200.480062%200.819173Z'%20fill='%23667085'/%3e%3c/svg%3e";
|
|
7
|
+
function Pe(D) {
|
|
17
8
|
const {
|
|
18
|
-
label:
|
|
19
|
-
labelClassName:
|
|
20
|
-
hideDropdownIcon:
|
|
21
|
-
showClearOption:
|
|
9
|
+
label: E,
|
|
10
|
+
labelClassName: B,
|
|
11
|
+
hideDropdownIcon: Q,
|
|
12
|
+
showClearOption: P,
|
|
22
13
|
isRequiredField: U,
|
|
23
14
|
btnClassName: X,
|
|
24
|
-
placeholder:
|
|
25
|
-
options:
|
|
26
|
-
selectedOption:
|
|
27
|
-
onChangeHandler:
|
|
28
|
-
inputValue:
|
|
29
|
-
inputChangeHandler:
|
|
30
|
-
onInputFocusOutEvent:
|
|
15
|
+
placeholder: F,
|
|
16
|
+
options: i,
|
|
17
|
+
selectedOption: p,
|
|
18
|
+
onChangeHandler: H,
|
|
19
|
+
inputValue: n,
|
|
20
|
+
inputChangeHandler: a,
|
|
21
|
+
onInputFocusOutEvent: M,
|
|
31
22
|
inputClassName: ee,
|
|
32
23
|
isSearchable: le,
|
|
33
24
|
inputType: te,
|
|
34
|
-
showInput:
|
|
35
|
-
inputSuffix:
|
|
36
|
-
selectedLabel:
|
|
37
|
-
suffixPadding:
|
|
38
|
-
disableInputAutoSize:
|
|
39
|
-
selectedOptions:
|
|
40
|
-
isMulti:
|
|
41
|
-
dropDownItemClickHandler:
|
|
42
|
-
showToggle:
|
|
25
|
+
showInput: y,
|
|
26
|
+
inputSuffix: T,
|
|
27
|
+
selectedLabel: _,
|
|
28
|
+
suffixPadding: oe,
|
|
29
|
+
disableInputAutoSize: se,
|
|
30
|
+
selectedOptions: C,
|
|
31
|
+
isMulti: h,
|
|
32
|
+
dropDownItemClickHandler: G,
|
|
33
|
+
showToggle: ne,
|
|
43
34
|
toggleChangeHandler: re,
|
|
44
35
|
selectedToggleOption: ie,
|
|
45
36
|
toggleOptionsList: ae,
|
|
46
|
-
border:
|
|
47
|
-
height:
|
|
48
|
-
disabled:
|
|
49
|
-
fieldColor:
|
|
50
|
-
errorMsg:
|
|
37
|
+
border: m,
|
|
38
|
+
height: x,
|
|
39
|
+
disabled: f,
|
|
40
|
+
fieldColor: g,
|
|
41
|
+
errorMsg: $,
|
|
51
42
|
showErrorMsg: he,
|
|
52
|
-
placeholderStyle:
|
|
53
|
-
onInputKeyDown:
|
|
43
|
+
placeholderStyle: o,
|
|
44
|
+
onInputKeyDown: R,
|
|
54
45
|
showEmptyDropdownPopup: fe = !0,
|
|
55
|
-
isDropdownFixed:
|
|
46
|
+
isDropdownFixed: w = !1,
|
|
56
47
|
dropdownClassName: ce = "",
|
|
57
|
-
wrapperClass:
|
|
58
|
-
maxInputLength:
|
|
48
|
+
wrapperClass: z = "",
|
|
49
|
+
maxInputLength: W,
|
|
59
50
|
alternateListBgStyle: de,
|
|
60
51
|
showLabelTooltip: ue = !1,
|
|
61
52
|
labelToolTipContent: pe = "",
|
|
62
|
-
inputContainerClasses:
|
|
63
|
-
onInputFocus:
|
|
64
|
-
} =
|
|
65
|
-
|
|
66
|
-
},
|
|
53
|
+
inputContainerClasses: V = "",
|
|
54
|
+
onInputFocus: j
|
|
55
|
+
} = D, [r, c] = I(!1), [d, me] = I(null), b = v(null), N = v(null), K = v(null), k = v([]), xe = je(() => i?.filter((e) => e ? e.label.toLowerCase().includes((n ?? "").toLowerCase()) : void 0), [n, i]), [ge, L] = I(!1), we = () => {
|
|
56
|
+
c(!1), h && a && a(""), me(null);
|
|
57
|
+
}, Y = O(
|
|
67
58
|
(e) => {
|
|
68
|
-
e.stopPropagation(),
|
|
59
|
+
e.stopPropagation(), f || c((t) => !t);
|
|
69
60
|
},
|
|
70
|
-
[
|
|
71
|
-
),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
const e =
|
|
61
|
+
[f]
|
|
62
|
+
), q = (n?.length || 0) + 2 + Number(oe || 0);
|
|
63
|
+
ke(b, we), J(() => {
|
|
64
|
+
d !== null && k.current[d] && k.current[d].scrollIntoView({ block: "nearest" });
|
|
65
|
+
}, [d]);
|
|
66
|
+
const u = O(() => {
|
|
67
|
+
if (w && r) {
|
|
68
|
+
const e = y ? N.current : K.current, t = b.current;
|
|
78
69
|
if (e && t) {
|
|
79
|
-
const
|
|
80
|
-
t.style.position = "fixed", t.style.top = `${window.scrollY ?
|
|
70
|
+
const s = e.getBoundingClientRect();
|
|
71
|
+
t.style.position = "fixed", t.style.top = `${window.scrollY ? s.bottom + window.scrollY : s.bottom}px`, t.style.left = `${s.left}px`, t.style.width = `${s.width}px`;
|
|
81
72
|
}
|
|
82
73
|
}
|
|
83
|
-
}, [
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
return r ? (
|
|
87
|
-
window.removeEventListener("scroll",
|
|
74
|
+
}, [w, r, y]);
|
|
75
|
+
J(() => {
|
|
76
|
+
if (w)
|
|
77
|
+
return r ? (u(), window.addEventListener("scroll", u, !0)) : window.removeEventListener("scroll", u, !0), () => {
|
|
78
|
+
window.removeEventListener("scroll", u, !0);
|
|
88
79
|
};
|
|
89
|
-
}, [
|
|
90
|
-
ge &&
|
|
80
|
+
}, [w, u, r]), Ne(b, () => {
|
|
81
|
+
ge && M && M();
|
|
91
82
|
});
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const t =
|
|
95
|
-
|
|
83
|
+
const A = (e) => {
|
|
84
|
+
if (h && G) {
|
|
85
|
+
const t = C?.some((s) => s.value === e.value);
|
|
86
|
+
G(!!t, e);
|
|
96
87
|
}
|
|
97
|
-
}, be =
|
|
88
|
+
}, be = O(
|
|
98
89
|
async (e) => {
|
|
99
|
-
e.stopPropagation(), r ||
|
|
90
|
+
e.stopPropagation(), r || c(!0), j && await j();
|
|
100
91
|
},
|
|
101
|
-
[
|
|
92
|
+
[j, r]
|
|
102
93
|
);
|
|
103
|
-
return /* @__PURE__ */ l.jsxs("div", { className: `hfl-relative hfl-inline-block hfl-text-left ${
|
|
104
|
-
!!
|
|
105
|
-
/* @__PURE__ */ l.jsx(ye, { type: "Text sm", variant: "Medium", className:
|
|
94
|
+
return /* @__PURE__ */ l.jsxs("div", { className: `hfl-relative hfl-inline-block hfl-text-left ${z || ""}`, children: [
|
|
95
|
+
!!E && /* @__PURE__ */ l.jsxs("div", { className: "hfl-text-Gray-700 hfl-mb-1 hfl-flex", children: [
|
|
96
|
+
/* @__PURE__ */ l.jsx(ye, { type: "Text sm", variant: "Medium", className: B || "", children: `${E}` }),
|
|
106
97
|
U && /* @__PURE__ */ l.jsx("span", { className: "hfl-ml-1 hfl-text-Error-600", children: "*" }),
|
|
107
98
|
ue && /* @__PURE__ */ l.jsx(Ce, { variant: "Right", text: pe, theme: "dark", children: /* @__PURE__ */ l.jsx("i", { className: "hx_info-filled" }) })
|
|
108
99
|
] }),
|
|
109
|
-
|
|
100
|
+
y ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
110
101
|
/* @__PURE__ */ l.jsxs(
|
|
111
102
|
"div",
|
|
112
103
|
{
|
|
113
|
-
className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${
|
|
114
|
-
onClick:
|
|
115
|
-
} :
|
|
104
|
+
className: `hfl-flex hfl-items-center hfl-shadow-xs hfl-px-2 ${V || ""} ${m || "hfl-border-1"} hfl-rounded-lg hfl-overflow-x-auto ${$ ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${x || "hfl-h-10"} ${f ? "!hfl-bg-Gray-50 !hfl-pointer-events-none" : g || "hfl-bg-White"} hover:hfl-border-Primary-300 hover:hfl-shadow-xs-primary`,
|
|
105
|
+
onClick: f ? () => {
|
|
106
|
+
} : Y,
|
|
116
107
|
children: [
|
|
117
|
-
|
|
108
|
+
C?.map((e, t) => /* @__PURE__ */ l.jsxs(
|
|
118
109
|
"div",
|
|
119
110
|
{
|
|
120
111
|
className: "hfl-flex hfl-items-center hfl-bg-Blue-100 hfl-mr-2 hfl-py-1 hfl-px-2 hfl-rounded-sm hfl-font-inter-0 hfl-text-nowrap",
|
|
@@ -123,8 +114,8 @@ function Be(i) {
|
|
|
123
114
|
/* @__PURE__ */ l.jsx(
|
|
124
115
|
"span",
|
|
125
116
|
{
|
|
126
|
-
onClick: (
|
|
127
|
-
|
|
117
|
+
onClick: (s) => {
|
|
118
|
+
s.stopPropagation(), A(e);
|
|
128
119
|
},
|
|
129
120
|
className: "hx_close hfl-text-Gray-500 hfl-my-0 hfl-text-[14px] hfl-ml-[1px] hfl-cursor-pointer"
|
|
130
121
|
}
|
|
@@ -133,107 +124,107 @@ function Be(i) {
|
|
|
133
124
|
},
|
|
134
125
|
`${e.label}-${t}`
|
|
135
126
|
)),
|
|
136
|
-
Object.keys(
|
|
127
|
+
Object.keys(o || {}).length > 0 && /* @__PURE__ */ l.jsx("style", { children: `
|
|
137
128
|
input.input-placeholder::placeholder {
|
|
138
|
-
font-family: ${
|
|
139
|
-
font-weight: ${
|
|
140
|
-
line-height: ${
|
|
141
|
-
font-size: ${
|
|
142
|
-
color: ${
|
|
129
|
+
font-family: ${o?.fontFamily};
|
|
130
|
+
font-weight: ${o?.fontWeight};
|
|
131
|
+
line-height: ${o?.lineHeight};
|
|
132
|
+
font-size: ${o?.fontSize};
|
|
133
|
+
color: ${o?.color};
|
|
143
134
|
}
|
|
144
135
|
` }),
|
|
145
136
|
/* @__PURE__ */ l.jsx(
|
|
146
137
|
"input",
|
|
147
138
|
{
|
|
148
|
-
ref:
|
|
149
|
-
style:
|
|
139
|
+
ref: N,
|
|
140
|
+
style: se ? {} : { width: `${Number(n?.length) > 4 ? (n?.length || 0) + 5 : 12}ch` },
|
|
150
141
|
type: te,
|
|
151
|
-
placeholder:
|
|
152
|
-
value:
|
|
153
|
-
className: `input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${
|
|
142
|
+
placeholder: F,
|
|
143
|
+
value: n,
|
|
144
|
+
className: `input-placeholder hfl-flex-1 hfl-pl-2 hfl-placeholder hfl-py-1 focus-visible:hfl-outline-0 focus-visible:hfl-outline-none hfl-border-0 focus:hfl-border-0 ${f ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : g || "hfl-bg-White"} ${ee || ""}`,
|
|
154
145
|
onChange: (e) => {
|
|
155
|
-
|
|
146
|
+
a && a(e.target.value), L(!0);
|
|
156
147
|
},
|
|
157
148
|
onClick: be,
|
|
158
|
-
onKeyDown: (e) =>
|
|
159
|
-
maxLength:
|
|
160
|
-
...
|
|
149
|
+
onKeyDown: (e) => R && R(e, c, N),
|
|
150
|
+
maxLength: W ?? W,
|
|
151
|
+
...D.inputProps || {}
|
|
161
152
|
}
|
|
162
153
|
),
|
|
163
|
-
!
|
|
164
|
-
|
|
154
|
+
!Q && !P && /* @__PURE__ */ l.jsx("i", { className: "hx_down hfl-mx-2" }),
|
|
155
|
+
P && /* @__PURE__ */ l.jsx(
|
|
165
156
|
"i",
|
|
166
157
|
{
|
|
167
|
-
className: `${
|
|
158
|
+
className: `${n ? "hx_close hfl-cursor-pointer" : "hx_down"} hfl-mx-2`,
|
|
168
159
|
onClick: () => {
|
|
169
|
-
(
|
|
160
|
+
(p?.value || n) && (a && a(""), L(!0));
|
|
170
161
|
}
|
|
171
162
|
}
|
|
172
163
|
),
|
|
173
|
-
|
|
164
|
+
T ? /* @__PURE__ */ l.jsx(
|
|
174
165
|
"span",
|
|
175
166
|
{
|
|
176
|
-
style: { left: `${
|
|
167
|
+
style: { left: `${q < 2 ? "3" : q}ch` },
|
|
177
168
|
className: "hfl-absolute hfl-top-1/2 hfl--translate-y-1/2 hfl-pointer-events-none",
|
|
178
|
-
children:
|
|
169
|
+
children: T
|
|
179
170
|
}
|
|
180
171
|
) : null
|
|
181
172
|
]
|
|
182
173
|
}
|
|
183
174
|
),
|
|
184
|
-
he && /* @__PURE__ */ l.jsx("span", { className: "hfl-text-0 hfl-text-Error-600", children:
|
|
175
|
+
he && /* @__PURE__ */ l.jsx("span", { className: "hfl-text-0 hfl-text-Error-600", children: $ })
|
|
185
176
|
] }) : /* @__PURE__ */ l.jsxs(
|
|
186
177
|
"button",
|
|
187
178
|
{
|
|
188
|
-
ref:
|
|
189
|
-
onClick:
|
|
190
|
-
className: `hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${X || ""} ${
|
|
191
|
-
style:
|
|
192
|
-
fontFamily:
|
|
193
|
-
fontSize:
|
|
194
|
-
fontWeight:
|
|
195
|
-
lineHeight:
|
|
196
|
-
color:
|
|
179
|
+
ref: K,
|
|
180
|
+
onClick: Y,
|
|
181
|
+
className: `hfl-w-full hfl-bg-White hfl-py-[6px] hfl-px-4 hfl-rounded-lg hfl-inline-flex hfl-justify-between hfl-items-center ${X || ""} ${m || "hfl-border-1"} ${$ ? "hfl-border-Error-300" : "hfl-border-Gray-300"} ${x || "hfl-h-[40px]"} ${f ? "!hfl-bg-Gray-50 !hfl-cursor-not-allowed" : ""}`,
|
|
182
|
+
style: _ || p?.label ? {} : o ? {
|
|
183
|
+
fontFamily: o?.fontFamily,
|
|
184
|
+
fontSize: o?.fontSize,
|
|
185
|
+
fontWeight: o?.fontWeight,
|
|
186
|
+
lineHeight: o?.lineHeight,
|
|
187
|
+
color: o?.color
|
|
197
188
|
} : {},
|
|
198
189
|
children: [
|
|
199
|
-
/* @__PURE__ */ l.jsx("span", { className: "hfl-pr-4", children:
|
|
200
|
-
/* @__PURE__ */ l.jsx("img", { src:
|
|
190
|
+
/* @__PURE__ */ l.jsx("span", { className: "hfl-pr-4", children: _ || p?.label || F || "Select an option" }),
|
|
191
|
+
/* @__PURE__ */ l.jsx("img", { src: Se, alt: "down arrow" })
|
|
201
192
|
]
|
|
202
193
|
}
|
|
203
194
|
),
|
|
204
|
-
|
|
195
|
+
i && i?.length >= 0 && /* @__PURE__ */ l.jsxs(
|
|
205
196
|
"ul",
|
|
206
197
|
{
|
|
207
|
-
ref:
|
|
208
|
-
className: `custom-dropdown-menu ${r ? "hfl-visible" : "hfl-invisible"} hfl-absolute hfl-z-50 hfl-grid hfl-gap-1 hfl-mt-3 hfl-w-full hfl-rounded-lg hfl-shadow-lg hfl-bg-White hfl-font-inter-0 hfl-p-1 hfl-px-2 ${
|
|
198
|
+
ref: b,
|
|
199
|
+
className: `custom-dropdown-menu ${r ? "hfl-visible" : "hfl-invisible"} hfl-absolute hfl-z-50 hfl-grid hfl-gap-1 hfl-mt-3 hfl-w-full hfl-rounded-lg hfl-shadow-lg hfl-bg-White hfl-font-inter-0 hfl-p-1 hfl-px-2 ${h ? "hfl-min-w-[20em]" : "hfl-min-w-[16em]"} hfl-max-h-[330px] hfl-overflow-y-scroll ${ce}`,
|
|
209
200
|
role: "menu",
|
|
210
201
|
"aria-orientation": "vertical",
|
|
211
202
|
"aria-labelledby": "options-menu",
|
|
212
203
|
children: [
|
|
213
|
-
|
|
214
|
-
|
|
204
|
+
ne ? /* @__PURE__ */ l.jsx(
|
|
205
|
+
Le,
|
|
215
206
|
{
|
|
216
207
|
onChangeHandler: re,
|
|
217
208
|
selectedOption: ie,
|
|
218
209
|
options: ae
|
|
219
210
|
}
|
|
220
211
|
) : !1,
|
|
221
|
-
(le ? xe :
|
|
222
|
-
const
|
|
212
|
+
(le ? xe : i)?.map((e, t) => {
|
|
213
|
+
const s = h ? !!C?.some((S) => S.value === e?.value) : !1, Z = p?.value === e?.value, ve = d === t;
|
|
223
214
|
return e ? /* @__PURE__ */ l.jsx(
|
|
224
215
|
"li",
|
|
225
216
|
{
|
|
226
217
|
onClick: () => {
|
|
227
|
-
|
|
218
|
+
h ? A(e) : (H && H(e), c(!1), L(!1));
|
|
228
219
|
},
|
|
229
|
-
className: `hfl-text-1 hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item ${de ? "odd:hfl-bg-Gray-100" : ""} ${
|
|
220
|
+
className: `hfl-text-1 hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item ${de ? "odd:hfl-bg-Gray-100" : ""} ${Z ? "hfl-bg-Blue-50 hfl-text-Blue-500" : ""}`,
|
|
230
221
|
role: "menuitem",
|
|
231
|
-
"aria-selected":
|
|
222
|
+
"aria-selected": Z,
|
|
232
223
|
tabIndex: ve ? 0 : -1,
|
|
233
|
-
ref: (
|
|
234
|
-
|
|
224
|
+
ref: (S) => {
|
|
225
|
+
k.current[t] = S;
|
|
235
226
|
},
|
|
236
|
-
children:
|
|
227
|
+
children: h ? /* @__PURE__ */ l.jsx(
|
|
237
228
|
$e,
|
|
238
229
|
{
|
|
239
230
|
size: "sm",
|
|
@@ -241,14 +232,14 @@ function Be(i) {
|
|
|
241
232
|
text: /* @__PURE__ */ l.jsx("span", { children: e.label }),
|
|
242
233
|
secondaryText: "",
|
|
243
234
|
id: `${e.label}-${t}`,
|
|
244
|
-
isMarked:
|
|
235
|
+
isMarked: s
|
|
245
236
|
}
|
|
246
237
|
) : e.label
|
|
247
238
|
},
|
|
248
239
|
`${e.label}-${t}`
|
|
249
240
|
) : null;
|
|
250
241
|
}),
|
|
251
|
-
|
|
242
|
+
i?.length === 0 && fe && /* @__PURE__ */ l.jsx(
|
|
252
243
|
"li",
|
|
253
244
|
{
|
|
254
245
|
className: "hfl-block hfl-px-4 hfl-py-2 hfl-rounded-md hover:hfl-bg-Blue-50 hfl-cursor-pointer custom_dropdown_item",
|
|
@@ -261,5 +252,5 @@ function Be(i) {
|
|
|
261
252
|
] });
|
|
262
253
|
}
|
|
263
254
|
export {
|
|
264
|
-
|
|
255
|
+
Pe as default
|
|
265
256
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useCallback as s, useEffect as o } from "react";
|
|
2
|
+
const c = (e, u) => {
|
|
3
|
+
const t = s(
|
|
4
|
+
(n) => {
|
|
5
|
+
e.current && !e.current.contains(n.target) && u();
|
|
6
|
+
},
|
|
7
|
+
[e, u]
|
|
8
|
+
);
|
|
9
|
+
o(() => (document.addEventListener("mouseup", t), () => {
|
|
10
|
+
document.removeEventListener("mouseup", t);
|
|
11
|
+
}), [t]);
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as u
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react"),c=(e,u)=>{const t=s.useCallback(n=>{e.current&&!e.current.contains(n.target)&&u()},[e,u]);s.useEffect(()=>(document.addEventListener("mouseup",t),()=>{document.removeEventListener("mouseup",t)}),[t])};exports.useOutsideClick=c;
|