next-helios-fe 1.8.35 → 1.8.37
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/package.json
CHANGED
@@ -60,9 +60,8 @@ export const Tab: TabComponent = ({
|
|
60
60
|
<div className="flex overflow-auto [&::-webkit-scrollbar]:hidden">
|
61
61
|
{tabs?.slice(0, childrenList?.length).map((tab, index) => {
|
62
62
|
return (
|
63
|
-
<div className="relative flex items-center">
|
63
|
+
<div key={index} className="relative flex items-center">
|
64
64
|
<button
|
65
|
-
key={index}
|
66
65
|
type="button"
|
67
66
|
className={`flex items-center gap-2 pt-2 pb-1.5 border-b-2 select-none whitespace-nowrap duration-300 ${
|
68
67
|
activeTab === index
|
@@ -65,11 +65,12 @@ export const Range: React.FC<RangeProps> = ({
|
|
65
65
|
style={{ accentColor: theme }}
|
66
66
|
{...rest}
|
67
67
|
/>
|
68
|
-
{
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
{!options?.hideInputDetail &&
|
69
|
+
(inputRef.current?.value || rest.value) && (
|
70
|
+
<span className="w-7 text-right">
|
71
|
+
{inputRef.current?.value || rest.value}
|
72
|
+
</span>
|
73
|
+
)}
|
73
74
|
</div>
|
74
75
|
</label>
|
75
76
|
);
|
@@ -19,6 +19,7 @@ export interface MultipleSelectProps
|
|
19
19
|
options?: {
|
20
20
|
width?: "full" | "fit";
|
21
21
|
height?: "short" | "medium" | "high";
|
22
|
+
disableDropdown?: boolean;
|
22
23
|
};
|
23
24
|
required?: boolean;
|
24
25
|
disabled?: boolean;
|
@@ -178,11 +179,13 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
178
179
|
})}
|
179
180
|
</div>
|
180
181
|
)}
|
181
|
-
|
182
|
-
<
|
183
|
-
|
184
|
-
|
185
|
-
|
182
|
+
{!options?.disableDropdown && (
|
183
|
+
<div className="ms-auto text-xl text-disabled pointer-events-none">
|
184
|
+
<Icon
|
185
|
+
icon={`gravity-ui:chevron-${openDropdown ? "up" : "down"}`}
|
186
|
+
/>
|
187
|
+
</div>
|
188
|
+
)}
|
186
189
|
</div>
|
187
190
|
<input
|
188
191
|
ref={inputRef}
|
@@ -232,62 +235,64 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
|
|
232
235
|
</div>
|
233
236
|
</div>
|
234
237
|
</label>
|
235
|
-
|
236
|
-
<
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
238
|
+
{!options?.disableDropdown && (
|
239
|
+
<div className="w-0 overflow-hidden">
|
240
|
+
<Dropdown
|
241
|
+
placement="bottom-start"
|
242
|
+
dismissOnClick={false}
|
243
|
+
trigger={
|
244
|
+
<button
|
245
|
+
type="button"
|
246
|
+
ref={dropdownRef}
|
247
|
+
className="w-0 my-0.5"
|
248
|
+
style={{
|
249
|
+
height: dropdownHeight,
|
250
|
+
}}
|
251
|
+
>
|
252
|
+
1
|
253
|
+
</button>
|
254
|
+
}
|
255
|
+
>
|
256
|
+
<div
|
244
257
|
style={{
|
245
|
-
|
258
|
+
width: dropdownWidth - 11,
|
246
259
|
}}
|
247
260
|
>
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
</div>
|
261
|
-
) : (
|
262
|
-
menus.map((item, index) => (
|
263
|
-
<button
|
264
|
-
key={index}
|
265
|
-
type="button"
|
266
|
-
className="min-w-40 w-full my-0.5 ps-4 pe-14 py-2 rounded-md text-sm text-left text-default hover:bg-secondary-light disabled:bg-primary-transparent"
|
267
|
-
disabled={
|
268
|
-
tempValue?.find((i) => i === item.value) ? true : false
|
269
|
-
}
|
270
|
-
onClick={() => {
|
271
|
-
setTempValue([...tempValue, item.value]);
|
272
|
-
if (onChange) {
|
273
|
-
onChange({
|
274
|
-
target: { value: [...tempValue, item.value] },
|
275
|
-
} as any);
|
276
|
-
}
|
277
|
-
if (onSelect) {
|
278
|
-
onSelect({
|
279
|
-
target: { value: item.value },
|
280
|
-
});
|
261
|
+
{menus.length === 0 ? (
|
262
|
+
<div className="flex justify-center">
|
263
|
+
<span className="px-4 py-1">No data found</span>
|
264
|
+
</div>
|
265
|
+
) : (
|
266
|
+
menus.map((item, index) => (
|
267
|
+
<button
|
268
|
+
key={index}
|
269
|
+
type="button"
|
270
|
+
className="min-w-40 w-full my-0.5 ps-4 pe-14 py-2 rounded-md text-sm text-left text-default hover:bg-secondary-light disabled:bg-primary-transparent"
|
271
|
+
disabled={
|
272
|
+
tempValue?.find((i) => i === item.value) ? true : false
|
281
273
|
}
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
274
|
+
onClick={() => {
|
275
|
+
setTempValue([...tempValue, item.value]);
|
276
|
+
if (onChange) {
|
277
|
+
onChange({
|
278
|
+
target: { value: [...tempValue, item.value] },
|
279
|
+
} as any);
|
280
|
+
}
|
281
|
+
if (onSelect) {
|
282
|
+
onSelect({
|
283
|
+
target: { value: item.value },
|
284
|
+
});
|
285
|
+
}
|
286
|
+
}}
|
287
|
+
>
|
288
|
+
{item.label}
|
289
|
+
</button>
|
290
|
+
))
|
291
|
+
)}
|
292
|
+
</div>
|
293
|
+
</Dropdown>
|
294
|
+
</div>
|
295
|
+
)}
|
291
296
|
</div>
|
292
297
|
);
|
293
298
|
};
|