@willphan1712000/frontend 1.0.0 → 1.0.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/README.md +4 -25
- package/dist/index.d.mts +33 -13
- package/dist/index.d.ts +33 -13
- package/dist/index.js +632 -78
- package/dist/index.mjs +629 -79
- package/index.ts +4 -1
- package/package.json +2 -2
- package/dist/index.css +0 -233
package/dist/index.js
CHANGED
|
@@ -7,6 +7,25 @@ function _array_like_to_array(arr, len) {
|
|
|
7
7
|
function _array_with_holes(arr) {
|
|
8
8
|
if (Array.isArray(arr)) return arr;
|
|
9
9
|
}
|
|
10
|
+
function _array_without_holes(arr) {
|
|
11
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
|
+
}
|
|
13
|
+
function _define_property(obj, key, value) {
|
|
14
|
+
if (key in obj) {
|
|
15
|
+
Object.defineProperty(obj, key, {
|
|
16
|
+
value: value,
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
obj[key] = value;
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
function _iterable_to_array(iter) {
|
|
27
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
28
|
+
}
|
|
10
29
|
function _iterable_to_array_limit(arr, i) {
|
|
11
30
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12
31
|
if (_i == null) return;
|
|
@@ -34,9 +53,54 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
34
53
|
function _non_iterable_rest() {
|
|
35
54
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
55
|
}
|
|
56
|
+
function _non_iterable_spread() {
|
|
57
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
+
}
|
|
59
|
+
function _object_spread(target) {
|
|
60
|
+
for(var i = 1; i < arguments.length; i++){
|
|
61
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
62
|
+
var ownKeys = Object.keys(source);
|
|
63
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
64
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
65
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
ownKeys.forEach(function(key) {
|
|
69
|
+
_define_property(target, key, source[key]);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return target;
|
|
73
|
+
}
|
|
74
|
+
function ownKeys(object, enumerableOnly) {
|
|
75
|
+
var keys = Object.keys(object);
|
|
76
|
+
if (Object.getOwnPropertySymbols) {
|
|
77
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
78
|
+
if (enumerableOnly) {
|
|
79
|
+
symbols = symbols.filter(function(sym) {
|
|
80
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
keys.push.apply(keys, symbols);
|
|
84
|
+
}
|
|
85
|
+
return keys;
|
|
86
|
+
}
|
|
87
|
+
function _object_spread_props(target, source) {
|
|
88
|
+
source = source != null ? source : {};
|
|
89
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
90
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
91
|
+
} else {
|
|
92
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
93
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return target;
|
|
97
|
+
}
|
|
37
98
|
function _sliced_to_array(arr, i) {
|
|
38
99
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
39
100
|
}
|
|
101
|
+
function _to_consumable_array(arr) {
|
|
102
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
103
|
+
}
|
|
40
104
|
function _type_of(obj) {
|
|
41
105
|
"@swc/helpers - typeof";
|
|
42
106
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
@@ -104,6 +168,9 @@ __export(index_exports, {
|
|
|
104
168
|
DropdownSelect: function() {
|
|
105
169
|
return DropdownSelect_default;
|
|
106
170
|
},
|
|
171
|
+
MultiSelect: function() {
|
|
172
|
+
return MultiSelect_default;
|
|
173
|
+
},
|
|
107
174
|
OptionSlider: function() {
|
|
108
175
|
return OptionSlider_default;
|
|
109
176
|
},
|
|
@@ -124,25 +191,80 @@ function useMyContext() {
|
|
|
124
191
|
}
|
|
125
192
|
// src/components/DropdownSelect/Dropdown.tsx
|
|
126
193
|
var import_react2 = require("react");
|
|
127
|
-
//
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
194
|
+
// src/components/DropdownSelect/styles.ts
|
|
195
|
+
var styles = {
|
|
196
|
+
select_box: {
|
|
197
|
+
borderRadius: "10px",
|
|
198
|
+
border: "solid 1px #dadada",
|
|
199
|
+
padding: "5px 10px",
|
|
200
|
+
display: "flex",
|
|
201
|
+
justifyContent: "space-between",
|
|
202
|
+
alignItems: "center",
|
|
203
|
+
cursor: "pointer"
|
|
204
|
+
},
|
|
205
|
+
value: {
|
|
206
|
+
marginRight: "auto"
|
|
207
|
+
},
|
|
208
|
+
close: {
|
|
209
|
+
borderRadius: "50%",
|
|
210
|
+
width: "20px",
|
|
211
|
+
height: "20px",
|
|
212
|
+
display: "flex",
|
|
213
|
+
justifyContent: "center",
|
|
214
|
+
alignItems: "center"
|
|
215
|
+
},
|
|
216
|
+
element: {
|
|
217
|
+
display: "flex",
|
|
218
|
+
padding: "5px",
|
|
219
|
+
borderRadius: "10px",
|
|
220
|
+
justifyContent: "flex-start",
|
|
221
|
+
alignItems: "center",
|
|
222
|
+
cursor: "pointer"
|
|
223
|
+
},
|
|
224
|
+
dropdown: {
|
|
225
|
+
position: "absolute",
|
|
226
|
+
boxSizing: "border-box",
|
|
227
|
+
width: "100%",
|
|
228
|
+
left: "0",
|
|
229
|
+
display: "flex",
|
|
230
|
+
flexDirection: "column",
|
|
231
|
+
border: "solid 1px #dadada",
|
|
232
|
+
borderRadius: "10px",
|
|
233
|
+
padding: "5px",
|
|
234
|
+
maxHeight: "300px",
|
|
235
|
+
overflowY: "auto",
|
|
236
|
+
backgroundColor: "white"
|
|
237
|
+
},
|
|
238
|
+
search_border: {
|
|
239
|
+
position: "sticky",
|
|
240
|
+
top: 0,
|
|
241
|
+
left: 0,
|
|
242
|
+
boxSizing: "border-box",
|
|
243
|
+
width: "100%",
|
|
244
|
+
backgroundColor: "white",
|
|
245
|
+
marginBottom: "5px"
|
|
246
|
+
},
|
|
247
|
+
search: {
|
|
248
|
+
width: "100%",
|
|
249
|
+
borderRadius: "5px",
|
|
250
|
+
padding: "5px",
|
|
251
|
+
border: "solid 1px #dadada",
|
|
252
|
+
display: "flex",
|
|
253
|
+
justifyContent: "flex-start",
|
|
254
|
+
alignItems: "center",
|
|
255
|
+
boxSizing: "border-box"
|
|
256
|
+
}
|
|
136
257
|
};
|
|
258
|
+
var styles_default = styles;
|
|
137
259
|
// src/components/DropdownSelect/Search.tsx
|
|
138
260
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
139
261
|
var Search = function(param) {
|
|
140
262
|
var options = param.options, onSearch = param.onSearch;
|
|
141
263
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
142
|
-
|
|
264
|
+
style: styles_default.search_border,
|
|
143
265
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
144
266
|
placeholder: "Search",
|
|
145
|
-
|
|
267
|
+
style: styles_default.search,
|
|
146
268
|
id: "search",
|
|
147
269
|
name: "search",
|
|
148
270
|
onChange: function(e) {
|
|
@@ -159,7 +281,8 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
|
159
281
|
var Dropdown = function() {
|
|
160
282
|
var _useMyContext = useMyContext(), options = _useMyContext.options, onChange = _useMyContext.onChange, setOpen = _useMyContext.setOpen;
|
|
161
283
|
var _ref = _sliced_to_array((0, import_react2.useState)(true), 2), isVisible = _ref[0], setVisible = _ref[1];
|
|
162
|
-
var _ref1 = _sliced_to_array((0, import_react2.useState)(
|
|
284
|
+
var _ref1 = _sliced_to_array((0, import_react2.useState)(-1), 2), keyOnHover = _ref1[0], setKeyOnHover = _ref1[1];
|
|
285
|
+
var _ref2 = _sliced_to_array((0, import_react2.useState)(options), 2), optionsCopy = _ref2[0], setOption = _ref2[1];
|
|
163
286
|
var dropdownRef = (0, import_react2.useRef)(null);
|
|
164
287
|
var handleResize = function() {
|
|
165
288
|
var dropdown = dropdownRef.current;
|
|
@@ -181,13 +304,12 @@ var Dropdown = function() {
|
|
|
181
304
|
};
|
|
182
305
|
}, []);
|
|
183
306
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
184
|
-
className: dropdownSelect_module_default.dropdown,
|
|
185
307
|
ref: dropdownRef,
|
|
186
|
-
style: isVisible ? {
|
|
308
|
+
style: isVisible ? _object_spread_props(_object_spread({}, styles_default.dropdown), {
|
|
187
309
|
top: "calc(100% + 5px)"
|
|
188
|
-
} : {
|
|
310
|
+
}) : _object_spread_props(_object_spread({}, styles_default.dropdown), {
|
|
189
311
|
bottom: "calc(100% + 5px)"
|
|
190
|
-
},
|
|
312
|
+
}),
|
|
191
313
|
children: [
|
|
192
314
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Search_default, {
|
|
193
315
|
options: options,
|
|
@@ -195,13 +317,21 @@ var Dropdown = function() {
|
|
|
195
317
|
}),
|
|
196
318
|
optionsCopy.map(function(option, key) {
|
|
197
319
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
198
|
-
|
|
320
|
+
style: _object_spread_props(_object_spread({}, styles_default.element), {
|
|
321
|
+
backgroundColor: keyOnHover === key ? "#f0f0f0" : "#fff"
|
|
322
|
+
}),
|
|
199
323
|
onClick: function() {
|
|
200
324
|
onChange(option.value);
|
|
201
325
|
setOpen(function(prev) {
|
|
202
326
|
return !prev;
|
|
203
327
|
});
|
|
204
328
|
},
|
|
329
|
+
onMouseEnter: function() {
|
|
330
|
+
return setKeyOnHover(key);
|
|
331
|
+
},
|
|
332
|
+
onMouseLeave: function() {
|
|
333
|
+
return setKeyOnHover(-1);
|
|
334
|
+
},
|
|
205
335
|
children: option.label
|
|
206
336
|
}, key);
|
|
207
337
|
})
|
|
@@ -215,6 +345,7 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
215
345
|
var DropdownSelect = function(param) {
|
|
216
346
|
var options = param.options, value = param.value, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? "200" : _param_width;
|
|
217
347
|
var _ref = _sliced_to_array((0, import_react3.useState)(false), 2), open = _ref[0], setOpen = _ref[1];
|
|
348
|
+
var _ref1 = _sliced_to_array((0, import_react3.useState)(false), 2), isHoverClose = _ref1[0], setHoverClose = _ref1[1];
|
|
218
349
|
var selectRef = (0, import_react3.useRef)(null);
|
|
219
350
|
var clickHandler = function(e) {
|
|
220
351
|
var select = selectRef.current;
|
|
@@ -243,7 +374,7 @@ var DropdownSelect = function(param) {
|
|
|
243
374
|
ref: selectRef,
|
|
244
375
|
children: [
|
|
245
376
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", {
|
|
246
|
-
|
|
377
|
+
style: styles_default.select_box,
|
|
247
378
|
onClick: function() {
|
|
248
379
|
return setOpen(function(prev) {
|
|
249
380
|
return !prev;
|
|
@@ -251,11 +382,13 @@ var DropdownSelect = function(param) {
|
|
|
251
382
|
},
|
|
252
383
|
children: [
|
|
253
384
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
254
|
-
|
|
385
|
+
style: styles_default.value,
|
|
255
386
|
children: value
|
|
256
387
|
}),
|
|
257
388
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
258
|
-
|
|
389
|
+
style: _object_spread_props(_object_spread({}, styles_default.close), {
|
|
390
|
+
backgroundColor: isHoverClose ? "#f0f0f0" : "#fff"
|
|
391
|
+
}),
|
|
259
392
|
title: "clear",
|
|
260
393
|
onClick: function() {
|
|
261
394
|
onChange("");
|
|
@@ -263,6 +396,12 @@ var DropdownSelect = function(param) {
|
|
|
263
396
|
return !prev;
|
|
264
397
|
});
|
|
265
398
|
},
|
|
399
|
+
onMouseEnter: function() {
|
|
400
|
+
return setHoverClose(true);
|
|
401
|
+
},
|
|
402
|
+
onMouseLeave: function() {
|
|
403
|
+
return setHoverClose(false);
|
|
404
|
+
},
|
|
266
405
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_io.IoMdClose, {})
|
|
267
406
|
})
|
|
268
407
|
]
|
|
@@ -275,15 +414,6 @@ var DropdownSelect = function(param) {
|
|
|
275
414
|
var DropdownSelect_default = DropdownSelect;
|
|
276
415
|
// src/components/RangeSlider/RangeSlider.tsx
|
|
277
416
|
var import_react4 = require("react");
|
|
278
|
-
// scss-module:./rangeSlider.module.css#scss-module
|
|
279
|
-
var rangeSlider_module_default = {
|
|
280
|
-
"slider_border": "rangeSlider-module__slider_border___CoeFx",
|
|
281
|
-
"thumb": "rangeSlider-module__thumb___OnFSM",
|
|
282
|
-
"thumb_shadow": "rangeSlider-module__thumb_shadow___L16TY",
|
|
283
|
-
"fill": "rangeSlider-module__fill___urGCN",
|
|
284
|
-
"rest": "rangeSlider-module__rest___pO2pi",
|
|
285
|
-
"value": "rangeSlider-module__value___Evg0D"
|
|
286
|
-
};
|
|
287
417
|
// src/components/RangeSlider/functions.ts
|
|
288
418
|
function encode(value, min, max) {
|
|
289
419
|
return (parseInt(value) - parseInt(min)) * 100 / (parseInt(max) - parseInt(min));
|
|
@@ -291,6 +421,70 @@ function encode(value, min, max) {
|
|
|
291
421
|
function decode(percent, min, max) {
|
|
292
422
|
return Math.round(parseInt(min) + percent * (parseInt(max) - parseInt(min)));
|
|
293
423
|
}
|
|
424
|
+
// src/components/RangeSlider/styles.ts
|
|
425
|
+
var styles2 = {
|
|
426
|
+
slider_border: {
|
|
427
|
+
position: "relative",
|
|
428
|
+
display: "flex",
|
|
429
|
+
gap: "5px",
|
|
430
|
+
flexDirection: "column",
|
|
431
|
+
height: "10px"
|
|
432
|
+
},
|
|
433
|
+
thumb: {
|
|
434
|
+
width: "17px",
|
|
435
|
+
height: "17px",
|
|
436
|
+
cursor: "pointer",
|
|
437
|
+
position: "absolute",
|
|
438
|
+
borderRadius: "50%",
|
|
439
|
+
top: "50%",
|
|
440
|
+
transform: "translate(-50%, -50%)",
|
|
441
|
+
zIndex: 1
|
|
442
|
+
},
|
|
443
|
+
thumb_shadow: {
|
|
444
|
+
content: '""',
|
|
445
|
+
position: "absolute",
|
|
446
|
+
top: "-9px",
|
|
447
|
+
left: "-9px",
|
|
448
|
+
width: "35px",
|
|
449
|
+
height: "35px",
|
|
450
|
+
opacity: 0.2,
|
|
451
|
+
zIndex: -1,
|
|
452
|
+
borderRadius: "50%",
|
|
453
|
+
scale: "0",
|
|
454
|
+
transition: "scale .1s linear"
|
|
455
|
+
},
|
|
456
|
+
fill: {
|
|
457
|
+
position: "absolute",
|
|
458
|
+
left: 0,
|
|
459
|
+
top: 0,
|
|
460
|
+
height: "100%",
|
|
461
|
+
borderRadius: "5px",
|
|
462
|
+
cursor: "pointer"
|
|
463
|
+
},
|
|
464
|
+
rest: {
|
|
465
|
+
position: "absolute",
|
|
466
|
+
top: "50%",
|
|
467
|
+
transform: "translateY(-50%)",
|
|
468
|
+
opacity: 0.3,
|
|
469
|
+
width: "100%",
|
|
470
|
+
height: "70%",
|
|
471
|
+
borderRadius: "5px",
|
|
472
|
+
cursor: "pointer"
|
|
473
|
+
},
|
|
474
|
+
value: {
|
|
475
|
+
position: "absolute",
|
|
476
|
+
bottom: "30px",
|
|
477
|
+
left: "50%",
|
|
478
|
+
transform: "translateX(-50%)",
|
|
479
|
+
transformOrigin: "bottom left",
|
|
480
|
+
backgroundColor: "#f0f0f7",
|
|
481
|
+
borderRadius: "5px",
|
|
482
|
+
padding: "5px",
|
|
483
|
+
scale: "0",
|
|
484
|
+
transition: "scale .1s linear"
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
var styles_default2 = styles2;
|
|
294
488
|
// src/components/RangeSlider/RangeSlider.tsx
|
|
295
489
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
296
490
|
var RangeSlider = function(param) {
|
|
@@ -347,10 +541,9 @@ var RangeSlider = function(param) {
|
|
|
347
541
|
isMouseDown
|
|
348
542
|
]);
|
|
349
543
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", {
|
|
350
|
-
|
|
351
|
-
style: {
|
|
544
|
+
style: _object_spread_props(_object_spread({}, styles_default2.slider_border), {
|
|
352
545
|
width: "".concat(width, "px")
|
|
353
|
-
},
|
|
546
|
+
}),
|
|
354
547
|
onMouseDown: function(e) {
|
|
355
548
|
handleDrag(true, e);
|
|
356
549
|
setMouseDown(true);
|
|
@@ -362,18 +555,16 @@ var RangeSlider = function(param) {
|
|
|
362
555
|
ref: sliderBorderRef,
|
|
363
556
|
children: [
|
|
364
557
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {
|
|
365
|
-
|
|
366
|
-
style: {
|
|
558
|
+
style: _object_spread_props(_object_spread({}, styles_default2.fill), {
|
|
367
559
|
background: color,
|
|
368
560
|
width: "".concat(percentage, "%")
|
|
369
|
-
}
|
|
561
|
+
})
|
|
370
562
|
}),
|
|
371
563
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", {
|
|
372
|
-
|
|
373
|
-
style: {
|
|
564
|
+
style: _object_spread_props(_object_spread({}, styles_default2.thumb), {
|
|
374
565
|
background: color,
|
|
375
566
|
left: "".concat(percentage, "%")
|
|
376
|
-
},
|
|
567
|
+
}),
|
|
377
568
|
onMouseMove: function() {
|
|
378
569
|
return setHover(true);
|
|
379
570
|
},
|
|
@@ -382,63 +573,107 @@ var RangeSlider = function(param) {
|
|
|
382
573
|
},
|
|
383
574
|
children: [
|
|
384
575
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {
|
|
385
|
-
|
|
386
|
-
style: {
|
|
576
|
+
style: _object_spread_props(_object_spread({}, styles_default2.value), {
|
|
387
577
|
scale: isMouseDown || isHover ? "1" : "0"
|
|
388
|
-
},
|
|
578
|
+
}),
|
|
389
579
|
children: value
|
|
390
580
|
}),
|
|
391
581
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {
|
|
392
|
-
|
|
393
|
-
style: {
|
|
582
|
+
style: _object_spread_props(_object_spread({}, styles_default2.thumb_shadow), {
|
|
394
583
|
background: color,
|
|
395
584
|
scale: isMouseDown || isHover ? "1" : "0"
|
|
396
|
-
}
|
|
585
|
+
})
|
|
397
586
|
})
|
|
398
587
|
]
|
|
399
588
|
}),
|
|
400
589
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {
|
|
401
|
-
|
|
402
|
-
style: {
|
|
590
|
+
style: _object_spread_props(_object_spread({}, styles_default2.rest), {
|
|
403
591
|
background: color
|
|
404
|
-
}
|
|
592
|
+
})
|
|
405
593
|
})
|
|
406
594
|
]
|
|
407
595
|
});
|
|
408
596
|
};
|
|
409
597
|
var RangeSlider_default = RangeSlider;
|
|
410
|
-
//
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
598
|
+
// src/components/OptionSlider/styles.ts
|
|
599
|
+
var styles3 = {
|
|
600
|
+
border: {
|
|
601
|
+
borderRadius: "10px",
|
|
602
|
+
overflow: "auto",
|
|
603
|
+
boxShadow: "rgba(0, 0, 0, 0.16) 0px 1px 4px",
|
|
604
|
+
aspectRatio: "4",
|
|
605
|
+
display: "flex",
|
|
606
|
+
flexDirection: "row",
|
|
607
|
+
position: "relative",
|
|
608
|
+
scrollbarWidth: "none",
|
|
609
|
+
msOverflowStyle: "none",
|
|
610
|
+
boxSizing: "border-box",
|
|
611
|
+
margin: 0,
|
|
612
|
+
padding: 0
|
|
613
|
+
},
|
|
614
|
+
background: {
|
|
615
|
+
position: "relative",
|
|
616
|
+
width: "100%",
|
|
617
|
+
height: "100%",
|
|
618
|
+
opacity: "0.3",
|
|
619
|
+
boxSizing: "border-box",
|
|
620
|
+
margin: 0,
|
|
621
|
+
padding: 0
|
|
622
|
+
},
|
|
623
|
+
options: {
|
|
624
|
+
height: "100%",
|
|
625
|
+
padding: "5px",
|
|
626
|
+
gap: "5px",
|
|
627
|
+
position: "absolute",
|
|
628
|
+
top: "50%",
|
|
629
|
+
transform: "translateY(-50%)",
|
|
630
|
+
left: 0,
|
|
631
|
+
display: "flex",
|
|
632
|
+
flexDirection: "row",
|
|
633
|
+
justifyContent: "center",
|
|
634
|
+
alignItems: "center",
|
|
635
|
+
boxSizing: "border-box",
|
|
636
|
+
margin: 0
|
|
637
|
+
},
|
|
638
|
+
element: {
|
|
639
|
+
display: "flex",
|
|
640
|
+
justifyContent: "center",
|
|
641
|
+
alignItems: "center",
|
|
642
|
+
cursor: "pointer",
|
|
643
|
+
width: "auto",
|
|
644
|
+
height: "100%",
|
|
645
|
+
aspectRatio: "1 / 1",
|
|
646
|
+
borderRadius: "50%",
|
|
647
|
+
overflow: "hidden",
|
|
648
|
+
border: "solid 1px #000",
|
|
649
|
+
boxSizing: "border-box",
|
|
650
|
+
margin: 0,
|
|
651
|
+
padding: 0
|
|
652
|
+
}
|
|
416
653
|
};
|
|
654
|
+
var styles_default3 = styles3;
|
|
417
655
|
// src/components/OptionSlider/OptionSlider.tsx
|
|
418
656
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
419
657
|
var OptionSlider = function(param) {
|
|
420
658
|
var value = param.value, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? "200" : _param_width, options = param.options, _param_color = param.color, color = _param_color === void 0 ? "#f0f0f7" : _param_color;
|
|
421
659
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", {
|
|
422
|
-
|
|
423
|
-
style: {
|
|
660
|
+
style: _object_spread_props(_object_spread({}, styles_default3.border), {
|
|
424
661
|
width: "".concat(width, "px")
|
|
425
|
-
},
|
|
662
|
+
}),
|
|
426
663
|
children: [
|
|
427
664
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
|
|
428
|
-
|
|
429
|
-
style: {
|
|
665
|
+
style: _object_spread_props(_object_spread({}, styles_default3.background), {
|
|
430
666
|
background: color
|
|
431
|
-
}
|
|
667
|
+
})
|
|
432
668
|
}),
|
|
433
669
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
|
|
434
|
-
|
|
670
|
+
style: styles_default3.options,
|
|
435
671
|
children: options.map(function(option, key) {
|
|
436
672
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
|
|
437
|
-
style: {
|
|
673
|
+
style: _object_spread_props(_object_spread({}, styles_default3.element), {
|
|
438
674
|
background: color,
|
|
439
675
|
border: value === option.value ? "solid 2px #000" : "solid 1px #000"
|
|
440
|
-
},
|
|
441
|
-
className: optionSlider_module_default.element,
|
|
676
|
+
}),
|
|
442
677
|
onClick: function() {
|
|
443
678
|
return onChange(option.value);
|
|
444
679
|
},
|
|
@@ -453,12 +688,6 @@ var OptionSlider = function(param) {
|
|
|
453
688
|
var OptionSlider_default = OptionSlider;
|
|
454
689
|
// src/components/ColorPickerSlider/ColorPickerSlider.tsx
|
|
455
690
|
var import_react5 = require("react");
|
|
456
|
-
// scss-module:./colorPickerSlider.module.css#scss-module
|
|
457
|
-
var colorPickerSlider_module_default = {
|
|
458
|
-
"border": "colorPickerSlider-module__border___-6cw8",
|
|
459
|
-
"thumb": "colorPickerSlider-module__thumb___p2fHW",
|
|
460
|
-
"label": "colorPickerSlider-module__label___Aa0AV"
|
|
461
|
-
};
|
|
462
691
|
// src/components/ColorPickerSlider/functions.ts
|
|
463
692
|
function encode2(color) {
|
|
464
693
|
var h = hexToHsl(color).h;
|
|
@@ -562,6 +791,39 @@ function hslToHex(h, s, l) {
|
|
|
562
791
|
};
|
|
563
792
|
return "#".concat(toHex(r)).concat(toHex(g)).concat(toHex(b));
|
|
564
793
|
}
|
|
794
|
+
// src/components/ColorPickerSlider/styles.ts
|
|
795
|
+
var styles4 = {
|
|
796
|
+
border: {
|
|
797
|
+
background: "linear-gradient(to right, hsl(0, 100%, 50%), hsl(60, 100%, 50%), hsl(120, 100%, 50%), hsl(180, 100%, 50%), hsl(240, 100%, 50%), hsl(300, 100%, 50%), hsl(0, 100%, 50%))",
|
|
798
|
+
borderRadius: "10px",
|
|
799
|
+
aspectRatio: 20,
|
|
800
|
+
cursor: "pointer",
|
|
801
|
+
appearance: "none",
|
|
802
|
+
outline: "none",
|
|
803
|
+
position: "relative"
|
|
804
|
+
},
|
|
805
|
+
thumb: {
|
|
806
|
+
borderRadius: "50%",
|
|
807
|
+
aspectRatio: 1,
|
|
808
|
+
position: "absolute",
|
|
809
|
+
top: "50%",
|
|
810
|
+
transform: "translate(-50%, -50%)",
|
|
811
|
+
boxShadow: "rgba(0, 0, 0, 0.24) 0px 3px 8px",
|
|
812
|
+
border: "solid 2px #fff"
|
|
813
|
+
},
|
|
814
|
+
label: {
|
|
815
|
+
position: "absolute",
|
|
816
|
+
bottom: "200%",
|
|
817
|
+
transform: "translateX(-50%)",
|
|
818
|
+
borderRadius: "5px",
|
|
819
|
+
padding: "5px",
|
|
820
|
+
fontSize: "15px",
|
|
821
|
+
background: "#f0f0f7",
|
|
822
|
+
transition: "scale .1s linear",
|
|
823
|
+
transformOrigin: "bottom left"
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
var styles_default4 = styles4;
|
|
565
827
|
// src/components/ColorPickerSlider/ColorPickerSlider.tsx
|
|
566
828
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
567
829
|
var ColorPickerSlider = function(param) {
|
|
@@ -613,10 +875,9 @@ var ColorPickerSlider = function(param) {
|
|
|
613
875
|
isMouseDown
|
|
614
876
|
]);
|
|
615
877
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", {
|
|
616
|
-
|
|
617
|
-
style: {
|
|
878
|
+
style: _object_spread_props(_object_spread({}, styles_default4.border), {
|
|
618
879
|
width: "".concat(width, "px")
|
|
619
|
-
},
|
|
880
|
+
}),
|
|
620
881
|
onMouseDown: function(e) {
|
|
621
882
|
handleDrag(true, e);
|
|
622
883
|
setMouseDown(true);
|
|
@@ -628,12 +889,11 @@ var ColorPickerSlider = function(param) {
|
|
|
628
889
|
ref: sliderBorderRef,
|
|
629
890
|
children: [
|
|
630
891
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
631
|
-
|
|
632
|
-
style: {
|
|
892
|
+
style: _object_spread_props(_object_spread({}, styles_default4.thumb), {
|
|
633
893
|
width: "".concat(parseInt(width) * 0.1, "px"),
|
|
634
894
|
background: value,
|
|
635
895
|
left: "".concat(percentage, "%")
|
|
636
|
-
},
|
|
896
|
+
}),
|
|
637
897
|
onMouseMove: function() {
|
|
638
898
|
return setHover(true);
|
|
639
899
|
},
|
|
@@ -642,21 +902,315 @@ var ColorPickerSlider = function(param) {
|
|
|
642
902
|
}
|
|
643
903
|
}),
|
|
644
904
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
645
|
-
|
|
646
|
-
style: {
|
|
905
|
+
style: _object_spread_props(_object_spread({}, styles_default4.label), {
|
|
647
906
|
left: "".concat(percentage, "%"),
|
|
648
907
|
scale: isHover || isMouseDown ? "1" : "0"
|
|
649
|
-
},
|
|
908
|
+
}),
|
|
650
909
|
children: value
|
|
651
910
|
})
|
|
652
911
|
]
|
|
653
912
|
});
|
|
654
913
|
};
|
|
655
914
|
var ColorPickerSlider_default = ColorPickerSlider;
|
|
915
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
916
|
+
var import_react8 = require("react");
|
|
917
|
+
// src/components/MultiSelect/context.ts
|
|
918
|
+
var import_react6 = require("react");
|
|
919
|
+
var MyContext2 = (0, import_react6.createContext)(void 0);
|
|
920
|
+
function useMyContext2() {
|
|
921
|
+
var data = (0, import_react6.useContext)(MyContext2);
|
|
922
|
+
if (data === void 0) throw new Error("Select context is undefined");
|
|
923
|
+
return data;
|
|
924
|
+
}
|
|
925
|
+
// src/components/MultiSelect/Dropdown.tsx
|
|
926
|
+
var import_react7 = require("react");
|
|
927
|
+
// src/components/MultiSelect/styles.ts
|
|
928
|
+
var styles5 = {
|
|
929
|
+
select_box: {
|
|
930
|
+
borderRadius: "10px",
|
|
931
|
+
border: "solid 1px #dadada",
|
|
932
|
+
padding: "5px 10px",
|
|
933
|
+
display: "flex",
|
|
934
|
+
justifyContent: "space-between",
|
|
935
|
+
alignItems: "center",
|
|
936
|
+
cursor: "pointer"
|
|
937
|
+
},
|
|
938
|
+
value: {
|
|
939
|
+
display: "flex",
|
|
940
|
+
flexDirection: "row",
|
|
941
|
+
gap: "15px",
|
|
942
|
+
flexWrap: "wrap"
|
|
943
|
+
},
|
|
944
|
+
eachValue: {
|
|
945
|
+
borderRadius: "5px",
|
|
946
|
+
backgroundColor: "#f0f0f7",
|
|
947
|
+
padding: "5px",
|
|
948
|
+
position: "relative"
|
|
949
|
+
},
|
|
950
|
+
closeEach: {
|
|
951
|
+
position: "absolute",
|
|
952
|
+
top: 0,
|
|
953
|
+
right: 0,
|
|
954
|
+
transform: "translate(50%, -50%)",
|
|
955
|
+
borderRadius: "50%",
|
|
956
|
+
backgroundColor: "#fc2c2cf0",
|
|
957
|
+
aspectRatio: 1,
|
|
958
|
+
width: "24px",
|
|
959
|
+
display: "flex",
|
|
960
|
+
justifyContent: "center",
|
|
961
|
+
alignItems: "center",
|
|
962
|
+
color: "white",
|
|
963
|
+
transition: "scale .2s linear",
|
|
964
|
+
transformOrigin: "top right"
|
|
965
|
+
},
|
|
966
|
+
close: {
|
|
967
|
+
borderRadius: "50%",
|
|
968
|
+
width: "20px",
|
|
969
|
+
height: "20px",
|
|
970
|
+
display: "flex",
|
|
971
|
+
justifyContent: "center",
|
|
972
|
+
alignItems: "center"
|
|
973
|
+
},
|
|
974
|
+
element: {
|
|
975
|
+
display: "flex",
|
|
976
|
+
padding: "5px",
|
|
977
|
+
borderRadius: "10px",
|
|
978
|
+
justifyContent: "flex-start",
|
|
979
|
+
alignItems: "center",
|
|
980
|
+
cursor: "pointer"
|
|
981
|
+
},
|
|
982
|
+
dropdown: {
|
|
983
|
+
position: "absolute",
|
|
984
|
+
boxSizing: "border-box",
|
|
985
|
+
width: "100%",
|
|
986
|
+
left: "0",
|
|
987
|
+
display: "flex",
|
|
988
|
+
flexDirection: "column",
|
|
989
|
+
border: "solid 1px #dadada",
|
|
990
|
+
borderRadius: "10px",
|
|
991
|
+
padding: "5px",
|
|
992
|
+
maxHeight: "300px",
|
|
993
|
+
overflowY: "auto",
|
|
994
|
+
backgroundColor: "white"
|
|
995
|
+
},
|
|
996
|
+
search_border: {
|
|
997
|
+
position: "sticky",
|
|
998
|
+
top: 0,
|
|
999
|
+
left: 0,
|
|
1000
|
+
boxSizing: "border-box",
|
|
1001
|
+
width: "100%",
|
|
1002
|
+
backgroundColor: "white",
|
|
1003
|
+
marginBottom: "5px"
|
|
1004
|
+
},
|
|
1005
|
+
search: {
|
|
1006
|
+
width: "100%",
|
|
1007
|
+
borderRadius: "5px",
|
|
1008
|
+
padding: "5px",
|
|
1009
|
+
border: "solid 1px #dadada",
|
|
1010
|
+
display: "flex",
|
|
1011
|
+
justifyContent: "flex-start",
|
|
1012
|
+
alignItems: "center",
|
|
1013
|
+
boxSizing: "border-box"
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
var styles_default5 = styles5;
|
|
1017
|
+
// src/components/MultiSelect/Search.tsx
|
|
1018
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1019
|
+
var Search2 = function(param) {
|
|
1020
|
+
var options = param.options, onSearch = param.onSearch;
|
|
1021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
|
|
1022
|
+
style: styles_default5.search_border,
|
|
1023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", {
|
|
1024
|
+
placeholder: "Search",
|
|
1025
|
+
style: styles_default5.search,
|
|
1026
|
+
id: "search",
|
|
1027
|
+
name: "search",
|
|
1028
|
+
onChange: function(e) {
|
|
1029
|
+
return onSearch(options.filter(function(ele) {
|
|
1030
|
+
return ele.value.toLowerCase().includes(e.target.value.toLowerCase());
|
|
1031
|
+
}));
|
|
1032
|
+
}
|
|
1033
|
+
})
|
|
1034
|
+
});
|
|
1035
|
+
};
|
|
1036
|
+
var Search_default2 = Search2;
|
|
1037
|
+
// src/components/MultiSelect/Dropdown.tsx
|
|
1038
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1039
|
+
var Dropdown2 = function() {
|
|
1040
|
+
var _useMyContext2 = useMyContext2(), options = _useMyContext2.options, onChange = _useMyContext2.onChange, setOpen = _useMyContext2.setOpen;
|
|
1041
|
+
var _ref = _sliced_to_array((0, import_react7.useState)(true), 2), isVisible = _ref[0], setVisible = _ref[1];
|
|
1042
|
+
var _ref1 = _sliced_to_array((0, import_react7.useState)(-1), 2), keyOnHover = _ref1[0], setKeyOnHover = _ref1[1];
|
|
1043
|
+
var _ref2 = _sliced_to_array((0, import_react7.useState)(options), 2), optionsCopy = _ref2[0], setOption = _ref2[1];
|
|
1044
|
+
var dropdownRef = (0, import_react7.useRef)(null);
|
|
1045
|
+
var handleResize = function() {
|
|
1046
|
+
var dropdown = dropdownRef.current;
|
|
1047
|
+
var dimension = dropdown.getBoundingClientRect();
|
|
1048
|
+
var distanceToBottom = window.innerHeight - dimension.bottom;
|
|
1049
|
+
var distanceToTop = dimension.top;
|
|
1050
|
+
if (distanceToBottom < 0) {
|
|
1051
|
+
setVisible(false);
|
|
1052
|
+
}
|
|
1053
|
+
if (distanceToTop < 0) {
|
|
1054
|
+
setVisible(true);
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
(0, import_react7.useEffect)(function() {
|
|
1058
|
+
handleResize();
|
|
1059
|
+
window.addEventListener("scroll", handleResize);
|
|
1060
|
+
return function() {
|
|
1061
|
+
window.removeEventListener("scroll", handleResize);
|
|
1062
|
+
};
|
|
1063
|
+
}, []);
|
|
1064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", {
|
|
1065
|
+
ref: dropdownRef,
|
|
1066
|
+
style: isVisible ? _object_spread_props(_object_spread({}, styles_default5.dropdown), {
|
|
1067
|
+
top: "calc(100% + 5px)"
|
|
1068
|
+
}) : _object_spread_props(_object_spread({}, styles_default5.dropdown), {
|
|
1069
|
+
bottom: "calc(100% + 5px)"
|
|
1070
|
+
}),
|
|
1071
|
+
children: [
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Search_default2, {
|
|
1073
|
+
options: options,
|
|
1074
|
+
onSearch: setOption
|
|
1075
|
+
}),
|
|
1076
|
+
optionsCopy.map(function(option, key) {
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", {
|
|
1078
|
+
style: _object_spread_props(_object_spread({}, styles_default5.element), {
|
|
1079
|
+
backgroundColor: keyOnHover === key ? "#f0f0f0" : "#fff"
|
|
1080
|
+
}),
|
|
1081
|
+
onClick: function() {
|
|
1082
|
+
onChange(function(prev) {
|
|
1083
|
+
if (prev.includes(option.value)) return _to_consumable_array(prev);
|
|
1084
|
+
return _to_consumable_array(prev).concat([
|
|
1085
|
+
option.value
|
|
1086
|
+
]);
|
|
1087
|
+
});
|
|
1088
|
+
setOpen(function(prev) {
|
|
1089
|
+
return !prev;
|
|
1090
|
+
});
|
|
1091
|
+
},
|
|
1092
|
+
onMouseEnter: function() {
|
|
1093
|
+
return setKeyOnHover(key);
|
|
1094
|
+
},
|
|
1095
|
+
onMouseLeave: function() {
|
|
1096
|
+
return setKeyOnHover(-1);
|
|
1097
|
+
},
|
|
1098
|
+
children: option.label
|
|
1099
|
+
}, key);
|
|
1100
|
+
})
|
|
1101
|
+
]
|
|
1102
|
+
});
|
|
1103
|
+
};
|
|
1104
|
+
var Dropdown_default2 = Dropdown2;
|
|
1105
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
1106
|
+
var import_io2 = require("react-icons/io");
|
|
1107
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1108
|
+
var MultiSelect = function(param) {
|
|
1109
|
+
var options = param.options, value = param.value, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? "200" : _param_width;
|
|
1110
|
+
var _ref = _sliced_to_array((0, import_react8.useState)(false), 2), open = _ref[0], setOpen = _ref[1];
|
|
1111
|
+
var _ref1 = _sliced_to_array((0, import_react8.useState)(false), 2), isHoverClose = _ref1[0], setHoverClose = _ref1[1];
|
|
1112
|
+
var _ref2 = _sliced_to_array((0, import_react8.useState)(-1), 2), isHoverCloseEach = _ref2[0], setHoverCloseEach = _ref2[1];
|
|
1113
|
+
var selectRef = (0, import_react8.useRef)(null);
|
|
1114
|
+
var clickHandler = function(e) {
|
|
1115
|
+
var select = selectRef.current;
|
|
1116
|
+
if (!select.contains(e.target)) {
|
|
1117
|
+
setOpen(false);
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
(0, import_react8.useEffect)(function() {
|
|
1121
|
+
window.addEventListener("click", clickHandler);
|
|
1122
|
+
return function() {
|
|
1123
|
+
return window.removeEventListener("click", clickHandler);
|
|
1124
|
+
};
|
|
1125
|
+
}, []);
|
|
1126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MyContext2.Provider, {
|
|
1127
|
+
value: {
|
|
1128
|
+
options: options,
|
|
1129
|
+
value: value,
|
|
1130
|
+
onChange: onChange,
|
|
1131
|
+
setOpen: setOpen
|
|
1132
|
+
},
|
|
1133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", {
|
|
1134
|
+
style: {
|
|
1135
|
+
width: "".concat(width, "px"),
|
|
1136
|
+
position: "relative"
|
|
1137
|
+
},
|
|
1138
|
+
ref: selectRef,
|
|
1139
|
+
children: [
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", {
|
|
1141
|
+
style: styles_default5.select_box,
|
|
1142
|
+
onClick: function() {
|
|
1143
|
+
return setOpen(function(prev) {
|
|
1144
|
+
return !prev;
|
|
1145
|
+
});
|
|
1146
|
+
},
|
|
1147
|
+
children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", {
|
|
1149
|
+
style: styles_default5.value,
|
|
1150
|
+
children: value.map(function(eachValue, key) {
|
|
1151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", {
|
|
1152
|
+
style: styles_default5.eachValue,
|
|
1153
|
+
children: [
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", {
|
|
1155
|
+
onMouseEnter: function() {
|
|
1156
|
+
setHoverCloseEach(key);
|
|
1157
|
+
},
|
|
1158
|
+
onMouseLeave: function() {
|
|
1159
|
+
setHoverCloseEach(-1);
|
|
1160
|
+
},
|
|
1161
|
+
title: "Remove this option",
|
|
1162
|
+
style: _object_spread_props(_object_spread({}, styles_default5.closeEach), {
|
|
1163
|
+
scale: isHoverCloseEach === key ? "1.2" : "1"
|
|
1164
|
+
}),
|
|
1165
|
+
onClick: function() {
|
|
1166
|
+
onChange(function(prev) {
|
|
1167
|
+
return prev.filter(function(o) {
|
|
1168
|
+
return o !== eachValue;
|
|
1169
|
+
});
|
|
1170
|
+
});
|
|
1171
|
+
setOpen(function(prev) {
|
|
1172
|
+
return !prev;
|
|
1173
|
+
});
|
|
1174
|
+
},
|
|
1175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_io2.IoMdClose, {})
|
|
1176
|
+
}),
|
|
1177
|
+
eachValue
|
|
1178
|
+
]
|
|
1179
|
+
}, key);
|
|
1180
|
+
})
|
|
1181
|
+
}),
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", {
|
|
1183
|
+
style: _object_spread_props(_object_spread({}, styles_default5.close), {
|
|
1184
|
+
backgroundColor: isHoverClose ? "#f0f0f0" : "#fff"
|
|
1185
|
+
}),
|
|
1186
|
+
title: "Clear all",
|
|
1187
|
+
onClick: function() {
|
|
1188
|
+
onChange([]);
|
|
1189
|
+
setOpen(function(prev) {
|
|
1190
|
+
return !prev;
|
|
1191
|
+
});
|
|
1192
|
+
},
|
|
1193
|
+
onMouseEnter: function() {
|
|
1194
|
+
return setHoverClose(true);
|
|
1195
|
+
},
|
|
1196
|
+
onMouseLeave: function() {
|
|
1197
|
+
return setHoverClose(false);
|
|
1198
|
+
},
|
|
1199
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_io2.IoMdClose, {})
|
|
1200
|
+
})
|
|
1201
|
+
]
|
|
1202
|
+
}),
|
|
1203
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dropdown_default2, {})
|
|
1204
|
+
]
|
|
1205
|
+
})
|
|
1206
|
+
});
|
|
1207
|
+
};
|
|
1208
|
+
var MultiSelect_default = MultiSelect;
|
|
656
1209
|
// Annotate the CommonJS export names for ESM import in node:
|
|
657
1210
|
0 && (module.exports = {
|
|
658
1211
|
ColorPickerSlider: ColorPickerSlider,
|
|
659
1212
|
DropdownSelect: DropdownSelect,
|
|
1213
|
+
MultiSelect: MultiSelect,
|
|
660
1214
|
OptionSlider: OptionSlider,
|
|
661
1215
|
RangeSlider: RangeSlider
|
|
662
1216
|
});
|