@stenajs-webui/select 17.30.0 → 17.30.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/CHANGELOG.md +12 -0
- package/dist/components/ui/OverflowingMultiSelect.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +271 -229
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function(){"use strict";try{var e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e)}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import * as
|
|
3
|
-
import { useMemo as p } from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import * as F from "react";
|
|
3
|
+
import { useMemo as p, memo as A, createElement as P } from "react";
|
|
4
|
+
import M, { mergeStyles as w, components as h } from "react-select";
|
|
5
|
+
import R from "react-select/async";
|
|
6
6
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
7
|
-
import { Row as
|
|
8
|
-
import { Icon as N, stenaCheck as
|
|
9
|
-
import { uniqWith as
|
|
10
|
-
const
|
|
7
|
+
import { Row as g, Space as y, Text as _, Column as j, Spacing as S } from "@stenajs-webui/core";
|
|
8
|
+
import { Icon as N, stenaCheck as U, Chip as I, FlatButton as q } from "@stenajs-webui/elements";
|
|
9
|
+
import { uniqWith as E, isEqual as x, intersectionWith as H, differenceWith as X } from "lodash";
|
|
10
|
+
const L = {
|
|
11
11
|
arrowColor: {
|
|
12
12
|
focused: {
|
|
13
13
|
hover: "var(--lhds-color-ui-500)",
|
|
@@ -86,60 +86,60 @@ const H = {
|
|
|
86
86
|
removeButtonHoverBackgroundColor: "var(--swui-primary-action-color-hover)",
|
|
87
87
|
removeButtonHoverTextColor: "var(--swui-white)"
|
|
88
88
|
}
|
|
89
|
-
},
|
|
90
|
-
menu:
|
|
89
|
+
}, Y = (e, r, o, t) => r ? e.disabledBackgroundColor : o && t ? e.selectedItemHoverBackgroundColor : o ? e.selectedItemBackgroundColor : t ? e.hoverBackgroundColor : void 0, D = (e, r, o, t) => r ? e.disabledTextColor : o && t ? e.selectedItemHoverTextColor : o ? e.selectedItemTextColor : t ? e.hoverTextColor : void 0, J = (e, r, o, t) => r ? e.disabledBackgroundColor : o ? e.backgroundColor : t === "warning" ? e.warningBackgroundColor : t === "success" ? e.successBackgroundColor : t === "error" ? e.errorBackgroundColor : e.backgroundColor, z = (e, r, o, t, n) => r ? e.borderColor : o ? e.borderColorFocused : n === "warning" ? e.warningBorderColor : n === "success" ? e.successBorderColor : n === "error" ? e.errorBorderColor : t ? e.borderColorFocused : e.borderColor, K = ({
|
|
90
|
+
menu: e,
|
|
91
91
|
menuPortal: r,
|
|
92
|
-
input:
|
|
92
|
+
input: o,
|
|
93
93
|
multiSelect: t,
|
|
94
94
|
clearButtonColor: n,
|
|
95
95
|
arrowColor: i,
|
|
96
96
|
groupHeading: c,
|
|
97
97
|
loadingIndicator: v
|
|
98
98
|
}, u) => ({
|
|
99
|
-
option: (l, { isDisabled:
|
|
99
|
+
option: (l, { isDisabled: s, isFocused: d, isSelected: f }) => ({
|
|
100
100
|
...l,
|
|
101
|
-
fontFamily:
|
|
102
|
-
fontSize:
|
|
103
|
-
backgroundColor:
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
fontFamily: o.fontFamily,
|
|
102
|
+
fontSize: o.fontSize,
|
|
103
|
+
backgroundColor: Y(
|
|
104
|
+
e,
|
|
105
|
+
s,
|
|
106
106
|
f,
|
|
107
|
-
|
|
107
|
+
d
|
|
108
108
|
),
|
|
109
|
-
color:
|
|
110
|
-
cursor:
|
|
111
|
-
whiteSpace:
|
|
109
|
+
color: D(e, s, f, d),
|
|
110
|
+
cursor: s ? "not-allowed" : "default",
|
|
111
|
+
whiteSpace: e.whiteSpace || l.whiteSpace,
|
|
112
112
|
":active": {
|
|
113
|
-
backgroundColor:
|
|
114
|
-
color:
|
|
113
|
+
backgroundColor: s ? void 0 : f ? e.selectedItemActiveBackgroundColor : e.activeBackgroundColor,
|
|
114
|
+
color: s ? void 0 : f ? e.selectedItemActiveTextColor : e.activeTextColor
|
|
115
115
|
}
|
|
116
116
|
}),
|
|
117
|
-
control: (l, { isFocused:
|
|
117
|
+
control: (l, { isFocused: s, isDisabled: d, menuIsOpen: f }) => ({
|
|
118
118
|
...l,
|
|
119
|
-
fontFamily:
|
|
120
|
-
fontSize:
|
|
121
|
-
minHeight:
|
|
122
|
-
backgroundColor:
|
|
123
|
-
|
|
124
|
-
s,
|
|
119
|
+
fontFamily: o.fontFamily,
|
|
120
|
+
fontSize: o.fontSize,
|
|
121
|
+
minHeight: o.minHeight,
|
|
122
|
+
backgroundColor: J(
|
|
123
|
+
o,
|
|
125
124
|
d,
|
|
125
|
+
s,
|
|
126
126
|
u
|
|
127
127
|
),
|
|
128
|
-
borderRadius:
|
|
129
|
-
border:
|
|
130
|
-
"--swui-select-border-color":
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
borderRadius: o.borderRadius,
|
|
129
|
+
border: o.border,
|
|
130
|
+
"--swui-select-border-color": z(
|
|
131
|
+
o,
|
|
132
|
+
d,
|
|
133
|
+
s || f,
|
|
134
134
|
!1,
|
|
135
135
|
u
|
|
136
136
|
),
|
|
137
|
-
boxShadow:
|
|
137
|
+
boxShadow: s ? o.boxShadowFocused : void 0,
|
|
138
138
|
"&:hover": {
|
|
139
|
-
"--swui-select-border-color":
|
|
140
|
-
|
|
139
|
+
"--swui-select-border-color": z(
|
|
140
|
+
o,
|
|
141
141
|
!1,
|
|
142
|
-
|
|
142
|
+
s || f,
|
|
143
143
|
!0,
|
|
144
144
|
u
|
|
145
145
|
)
|
|
@@ -147,24 +147,24 @@ const H = {
|
|
|
147
147
|
}),
|
|
148
148
|
singleValue: (l) => ({
|
|
149
149
|
...l,
|
|
150
|
-
fontFamily:
|
|
151
|
-
fontSize:
|
|
152
|
-
color:
|
|
150
|
+
fontFamily: o.fontFamily,
|
|
151
|
+
fontSize: o.fontSize,
|
|
152
|
+
color: o.textColor
|
|
153
153
|
}),
|
|
154
154
|
noOptionsMessage: (l) => ({
|
|
155
155
|
...l,
|
|
156
|
-
fontFamily:
|
|
157
|
-
fontSize:
|
|
156
|
+
fontFamily: o.fontFamily,
|
|
157
|
+
fontSize: o.fontSize
|
|
158
158
|
}),
|
|
159
159
|
input: (l) => ({
|
|
160
160
|
...l,
|
|
161
|
-
fontFamily:
|
|
162
|
-
fontSize:
|
|
163
|
-
color:
|
|
161
|
+
fontFamily: o.fontFamily,
|
|
162
|
+
fontSize: o.fontSize,
|
|
163
|
+
color: o.textColor
|
|
164
164
|
}),
|
|
165
165
|
groupHeading: (l) => ({
|
|
166
166
|
...l,
|
|
167
|
-
fontFamily:
|
|
167
|
+
fontFamily: o.fontFamily,
|
|
168
168
|
fontSize: c.fontSize,
|
|
169
169
|
lineHeight: c.lineHeight,
|
|
170
170
|
fontWeight: c.fontWeight,
|
|
@@ -175,7 +175,7 @@ const H = {
|
|
|
175
175
|
...l,
|
|
176
176
|
backgroundColor: t.backgroundColor,
|
|
177
177
|
color: t.textColor,
|
|
178
|
-
fontFamily:
|
|
178
|
+
fontFamily: o.fontFamily,
|
|
179
179
|
fontSize: c.fontSize
|
|
180
180
|
}),
|
|
181
181
|
indicatorSeparator: (l) => ({
|
|
@@ -193,9 +193,9 @@ const H = {
|
|
|
193
193
|
}),
|
|
194
194
|
placeholder: (l) => ({
|
|
195
195
|
...l,
|
|
196
|
-
fontFamily:
|
|
197
|
-
fontSize:
|
|
198
|
-
color:
|
|
196
|
+
fontFamily: o.fontFamily,
|
|
197
|
+
fontSize: o.fontSize,
|
|
198
|
+
color: o.placeholderColor
|
|
199
199
|
}),
|
|
200
200
|
container: (l) => ({
|
|
201
201
|
...l
|
|
@@ -204,12 +204,12 @@ const H = {
|
|
|
204
204
|
...l,
|
|
205
205
|
padding: "0 8px"
|
|
206
206
|
}),
|
|
207
|
-
dropdownIndicator: (l, { isFocused:
|
|
207
|
+
dropdownIndicator: (l, { isFocused: s }) => ({
|
|
208
208
|
...l,
|
|
209
209
|
padding: "5px",
|
|
210
|
-
color:
|
|
210
|
+
color: s ? i.focused.standard : i.closed.standard,
|
|
211
211
|
"&:hover": {
|
|
212
|
-
color:
|
|
212
|
+
color: s ? i.focused.hover : i.closed.hover
|
|
213
213
|
},
|
|
214
214
|
svg: {
|
|
215
215
|
width: 14,
|
|
@@ -218,13 +218,13 @@ const H = {
|
|
|
218
218
|
}),
|
|
219
219
|
menu: (l) => ({
|
|
220
220
|
...l,
|
|
221
|
-
backgroundColor:
|
|
222
|
-
color:
|
|
223
|
-
minWidth:
|
|
224
|
-
zIndex:
|
|
225
|
-
width:
|
|
226
|
-
border:
|
|
227
|
-
borderColor:
|
|
221
|
+
backgroundColor: e.backgroundColor,
|
|
222
|
+
color: e.textColor,
|
|
223
|
+
minWidth: e.minWidth || l.minWidth,
|
|
224
|
+
zIndex: e.zIndex,
|
|
225
|
+
width: e.width || l.width,
|
|
226
|
+
border: o.border,
|
|
227
|
+
borderColor: o.borderColorFocused
|
|
228
228
|
}),
|
|
229
229
|
menuPortal: (l) => ({
|
|
230
230
|
...l,
|
|
@@ -253,7 +253,7 @@ const H = {
|
|
|
253
253
|
...l,
|
|
254
254
|
backgroundColor: t.backgroundColor,
|
|
255
255
|
color: t.textColor,
|
|
256
|
-
fontFamily:
|
|
256
|
+
fontFamily: o.fontFamily,
|
|
257
257
|
fontSize: c.fontSize,
|
|
258
258
|
alignItems: "center",
|
|
259
259
|
margin: 0,
|
|
@@ -262,207 +262,248 @@ const H = {
|
|
|
262
262
|
loadingMessage: (l) => ({
|
|
263
263
|
...l,
|
|
264
264
|
color: v.textColor,
|
|
265
|
-
fontFamily:
|
|
266
|
-
fontSize:
|
|
265
|
+
fontFamily: o.fontFamily,
|
|
266
|
+
fontSize: o.fontSize
|
|
267
267
|
})
|
|
268
|
-
}),
|
|
269
|
-
function
|
|
270
|
-
variant:
|
|
268
|
+
}), k = (e) => K(L, e);
|
|
269
|
+
function Ce({
|
|
270
|
+
variant: e = "standard",
|
|
271
271
|
styles: r,
|
|
272
|
-
isMulti:
|
|
272
|
+
isMulti: o,
|
|
273
273
|
...t
|
|
274
274
|
}) {
|
|
275
275
|
const n = p(() => {
|
|
276
|
-
const i =
|
|
277
|
-
return r ?
|
|
278
|
-
}, [
|
|
279
|
-
return /* @__PURE__ */ a(
|
|
276
|
+
const i = k(e);
|
|
277
|
+
return r ? w(i, r) : i;
|
|
278
|
+
}, [e, r]);
|
|
279
|
+
return /* @__PURE__ */ a(R, {
|
|
280
280
|
styles: n,
|
|
281
281
|
...t,
|
|
282
282
|
isMulti: !0
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
variant:
|
|
285
|
+
function ge({
|
|
286
|
+
variant: e = "standard",
|
|
287
287
|
styles: r,
|
|
288
|
-
isMulti:
|
|
288
|
+
isMulti: o,
|
|
289
289
|
...t
|
|
290
290
|
}) {
|
|
291
291
|
const n = p(() => {
|
|
292
|
-
const i =
|
|
293
|
-
return r ?
|
|
294
|
-
}, [
|
|
295
|
-
return /* @__PURE__ */ a(
|
|
292
|
+
const i = k(e);
|
|
293
|
+
return r ? w(i, r) : i;
|
|
294
|
+
}, [e, r]);
|
|
295
|
+
return /* @__PURE__ */ a(R, {
|
|
296
296
|
styles: n,
|
|
297
297
|
...t,
|
|
298
298
|
isMulti: !1
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
variant:
|
|
301
|
+
function O({
|
|
302
|
+
variant: e = "standard",
|
|
303
303
|
styles: r,
|
|
304
|
-
isMulti:
|
|
304
|
+
isMulti: o,
|
|
305
305
|
...t
|
|
306
306
|
}) {
|
|
307
307
|
const n = p(() => {
|
|
308
|
-
const i =
|
|
309
|
-
return r ?
|
|
310
|
-
}, [
|
|
311
|
-
return /* @__PURE__ */ a(
|
|
308
|
+
const i = k(e);
|
|
309
|
+
return r ? w(i, r) : i;
|
|
310
|
+
}, [e, r]);
|
|
311
|
+
return /* @__PURE__ */ a(M, {
|
|
312
312
|
styles: n,
|
|
313
313
|
...t,
|
|
314
314
|
isMulti: !0
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
|
|
317
|
+
function pe(e) {
|
|
318
|
+
return /* @__PURE__ */ a(O, {
|
|
319
|
+
hideSelectedOptions: !1,
|
|
320
|
+
...e,
|
|
321
|
+
components: {
|
|
322
|
+
...e.components,
|
|
323
|
+
ValueContainer: Q
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
const Q = A((e) => {
|
|
328
|
+
const [r, ...o] = e.children, t = Z(r, e);
|
|
329
|
+
return /* @__PURE__ */ m(h.ValueContainer, {
|
|
330
|
+
...e,
|
|
331
|
+
children: [t, o]
|
|
332
|
+
});
|
|
333
|
+
}), Z = (e, {
|
|
334
|
+
children: r,
|
|
335
|
+
innerProps: o,
|
|
336
|
+
className: t,
|
|
337
|
+
...n
|
|
338
|
+
}) => e ? e.length > 1 ? [e[0], /* @__PURE__ */ P(h.MultiValue, {
|
|
339
|
+
...n,
|
|
340
|
+
key: "DUMMY_VALUE_FOR_PLUS_X",
|
|
341
|
+
innerProps: {},
|
|
342
|
+
data: null,
|
|
343
|
+
isFocused: !1,
|
|
344
|
+
removeProps: {},
|
|
345
|
+
index: 1,
|
|
346
|
+
components: {
|
|
347
|
+
Container: h.MultiValueContainer,
|
|
348
|
+
Label: h.MultiValueLabel,
|
|
349
|
+
Remove: () => /* @__PURE__ */ a("div", {
|
|
350
|
+
style: {
|
|
351
|
+
height: 16,
|
|
352
|
+
margin: 3,
|
|
353
|
+
marginTop: 4
|
|
354
|
+
}
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
}, "+" + (e.length - 1))] : e : null;
|
|
358
|
+
function we({
|
|
359
|
+
variant: e = "standard",
|
|
319
360
|
styles: r,
|
|
320
|
-
isMulti:
|
|
361
|
+
isMulti: o,
|
|
321
362
|
...t
|
|
322
363
|
}) {
|
|
323
364
|
const n = p(() => {
|
|
324
|
-
const i =
|
|
325
|
-
return r ?
|
|
326
|
-
}, [
|
|
327
|
-
return /* @__PURE__ */ a(
|
|
365
|
+
const i = k(e);
|
|
366
|
+
return r ? w(i, r) : i;
|
|
367
|
+
}, [e, r]);
|
|
368
|
+
return /* @__PURE__ */ a(M, {
|
|
328
369
|
styles: n,
|
|
329
370
|
...t,
|
|
330
371
|
isMulti: !1
|
|
331
372
|
});
|
|
332
373
|
}
|
|
333
|
-
const
|
|
374
|
+
const T = (e, r) => X(
|
|
334
375
|
r,
|
|
335
|
-
[...
|
|
336
|
-
|
|
337
|
-
).map(
|
|
376
|
+
[...e.internalOptions, e],
|
|
377
|
+
x
|
|
378
|
+
).map(C), $ = (e) => !("internalOptions" in e), b = (e) => e.filter($).map(C), ee = (e) => (r, o) => {
|
|
338
379
|
const t = r != null ? r : [];
|
|
339
|
-
switch (
|
|
380
|
+
switch (o.action) {
|
|
340
381
|
case "select-option":
|
|
341
|
-
if (
|
|
342
|
-
const n =
|
|
382
|
+
if (o.option && "internalOptions" in o.option) {
|
|
383
|
+
const n = E(
|
|
343
384
|
t.reduce(
|
|
344
385
|
(i, c) => "internalOptions" in c ? [...i, ...c.internalOptions] : [
|
|
345
386
|
...i,
|
|
346
|
-
|
|
387
|
+
C(c)
|
|
347
388
|
],
|
|
348
389
|
[]
|
|
349
390
|
),
|
|
350
|
-
|
|
391
|
+
x
|
|
351
392
|
);
|
|
352
|
-
|
|
393
|
+
e(n, o);
|
|
353
394
|
} else
|
|
354
|
-
|
|
395
|
+
e(b(t), o);
|
|
355
396
|
break;
|
|
356
397
|
case "deselect-option":
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
398
|
+
o.option && "internalOptions" in o.option ? e(
|
|
399
|
+
T(
|
|
400
|
+
o.option,
|
|
401
|
+
b(t)
|
|
361
402
|
),
|
|
362
|
-
|
|
363
|
-
) :
|
|
403
|
+
o
|
|
404
|
+
) : e(b(t), o);
|
|
364
405
|
break;
|
|
365
406
|
case "remove-value":
|
|
366
407
|
case "pop-value":
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
408
|
+
o.removedValue && "internalOptions" in o.removedValue ? e(
|
|
409
|
+
T(
|
|
410
|
+
o.removedValue,
|
|
411
|
+
b(t)
|
|
371
412
|
),
|
|
372
|
-
|
|
373
|
-
) :
|
|
413
|
+
o
|
|
414
|
+
) : e(b(t), o);
|
|
374
415
|
break;
|
|
375
416
|
case "clear":
|
|
376
|
-
|
|
377
|
-
t.map(
|
|
378
|
-
|
|
417
|
+
e(
|
|
418
|
+
t.map(C),
|
|
419
|
+
o
|
|
379
420
|
);
|
|
380
421
|
break;
|
|
381
422
|
case "create-option":
|
|
382
|
-
|
|
383
|
-
t.map(
|
|
384
|
-
|
|
423
|
+
e(
|
|
424
|
+
t.map(C),
|
|
425
|
+
o
|
|
385
426
|
);
|
|
386
427
|
break;
|
|
387
428
|
}
|
|
388
|
-
},
|
|
389
|
-
(r,
|
|
429
|
+
}, oe = (e) => e.reduce(
|
|
430
|
+
(r, o) => [
|
|
390
431
|
...r,
|
|
391
|
-
|
|
392
|
-
...
|
|
432
|
+
G(o),
|
|
433
|
+
...o.options.map(W)
|
|
393
434
|
],
|
|
394
435
|
[]
|
|
395
|
-
),
|
|
436
|
+
), re = (e, r) => {
|
|
396
437
|
if (!r)
|
|
397
438
|
return [];
|
|
398
|
-
const
|
|
399
|
-
return
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
),
|
|
403
|
-
...
|
|
404
|
-
(n) =>
|
|
439
|
+
const o = [];
|
|
440
|
+
return e.forEach((t) => {
|
|
441
|
+
te(t.options, r) && o.push(
|
|
442
|
+
G(t)
|
|
443
|
+
), o.push(
|
|
444
|
+
...H(t.options, r, x).map(
|
|
445
|
+
(n) => W(n)
|
|
405
446
|
)
|
|
406
447
|
);
|
|
407
|
-
}),
|
|
408
|
-
},
|
|
409
|
-
data:
|
|
410
|
-
label:
|
|
411
|
-
value:
|
|
412
|
-
}),
|
|
413
|
-
data:
|
|
414
|
-
label:
|
|
415
|
-
value:
|
|
416
|
-
internalOptions:
|
|
417
|
-
}),
|
|
418
|
-
data:
|
|
419
|
-
label:
|
|
420
|
-
value:
|
|
421
|
-
}),
|
|
422
|
-
function
|
|
448
|
+
}), o;
|
|
449
|
+
}, te = (e, r) => r ? H(e, r, x).length === e.length : !1, W = (e) => ({
|
|
450
|
+
data: e.data,
|
|
451
|
+
label: e.label,
|
|
452
|
+
value: e.value
|
|
453
|
+
}), G = (e) => ({
|
|
454
|
+
data: e.label,
|
|
455
|
+
label: e.label,
|
|
456
|
+
value: e.label,
|
|
457
|
+
internalOptions: e.options
|
|
458
|
+
}), C = (e) => ({
|
|
459
|
+
data: e.data,
|
|
460
|
+
label: e.label,
|
|
461
|
+
value: e.value
|
|
462
|
+
}), le = (e, r) => r ? e.menu.selectedItemHoverIconColor : e.menu.selectedItemIconColor;
|
|
463
|
+
function ne(e) {
|
|
423
464
|
var t;
|
|
424
465
|
const {
|
|
425
466
|
formatGroupLabel: r,
|
|
426
|
-
formatOptionLabel:
|
|
427
|
-
} =
|
|
428
|
-
return "internalOptions" in
|
|
429
|
-
label:
|
|
430
|
-
options:
|
|
431
|
-
}) :
|
|
467
|
+
formatOptionLabel: o
|
|
468
|
+
} = e.selectProps;
|
|
469
|
+
return "internalOptions" in e.data ? r ? r({
|
|
470
|
+
label: e.data.label,
|
|
471
|
+
options: e.data.internalOptions
|
|
472
|
+
}) : e.label : o ? o(e.data, {
|
|
432
473
|
context: "menu",
|
|
433
|
-
inputValue: (t =
|
|
434
|
-
selectValue:
|
|
435
|
-
}) :
|
|
474
|
+
inputValue: (t = e.selectProps.inputValue) != null ? t : "",
|
|
475
|
+
selectValue: e.getValue()
|
|
476
|
+
}) : e.label;
|
|
436
477
|
}
|
|
437
|
-
function
|
|
438
|
-
onChange:
|
|
478
|
+
function ie({
|
|
479
|
+
onChange: e,
|
|
439
480
|
options: r,
|
|
440
|
-
value:
|
|
481
|
+
value: o,
|
|
441
482
|
variant: t = "standard",
|
|
442
483
|
formatGroupLabel: n,
|
|
443
484
|
formatOptionLabel: i,
|
|
444
485
|
...c
|
|
445
486
|
}) {
|
|
446
|
-
const v = (
|
|
447
|
-
const f =
|
|
448
|
-
return /* @__PURE__ */ a(
|
|
449
|
-
...
|
|
450
|
-
children: /* @__PURE__ */ m(
|
|
451
|
-
children: [!
|
|
452
|
-
theme:
|
|
453
|
-
size:
|
|
487
|
+
const v = (d) => {
|
|
488
|
+
const f = ne(d), B = "internalOptions" in d.data;
|
|
489
|
+
return /* @__PURE__ */ a(h.Option, {
|
|
490
|
+
...d,
|
|
491
|
+
children: /* @__PURE__ */ m(g, {
|
|
492
|
+
children: [!B && /* @__PURE__ */ a(y, {}), /* @__PURE__ */ a(ae, {
|
|
493
|
+
theme: L,
|
|
494
|
+
size: B ? void 0 : "small",
|
|
454
495
|
label: f,
|
|
455
|
-
selected:
|
|
456
|
-
focused:
|
|
496
|
+
selected: d.isSelected,
|
|
497
|
+
focused: d.isFocused
|
|
457
498
|
})]
|
|
458
499
|
})
|
|
459
500
|
});
|
|
460
|
-
}, u = (
|
|
461
|
-
...
|
|
462
|
-
}), l = r ?
|
|
463
|
-
return /* @__PURE__ */ a(
|
|
501
|
+
}, u = (d) => "internalOptions" in d.data ? null : /* @__PURE__ */ a(h.MultiValue, {
|
|
502
|
+
...d
|
|
503
|
+
}), l = r ? re(r, o) : void 0, s = r ? oe(r) : void 0;
|
|
504
|
+
return /* @__PURE__ */ a(O, {
|
|
464
505
|
...c,
|
|
465
|
-
onChange:
|
|
506
|
+
onChange: e ? ee(e) : void 0,
|
|
466
507
|
hideSelectedOptions: !1,
|
|
467
508
|
components: {
|
|
468
509
|
...c.components,
|
|
@@ -470,142 +511,143 @@ function ro({
|
|
|
470
511
|
Option: v
|
|
471
512
|
},
|
|
472
513
|
isMulti: !0,
|
|
473
|
-
options:
|
|
514
|
+
options: s,
|
|
474
515
|
value: l,
|
|
475
516
|
variant: t
|
|
476
517
|
});
|
|
477
518
|
}
|
|
478
|
-
const
|
|
479
|
-
focused:
|
|
519
|
+
const ae = ({
|
|
520
|
+
focused: e,
|
|
480
521
|
label: r,
|
|
481
|
-
selected:
|
|
522
|
+
selected: o,
|
|
482
523
|
size: t,
|
|
483
524
|
theme: n
|
|
484
|
-
}) => /* @__PURE__ */ m(
|
|
525
|
+
}) => /* @__PURE__ */ m(g, {
|
|
485
526
|
alignItems: "center",
|
|
486
527
|
justifyContent: "space-between",
|
|
487
528
|
flexGrow: 1,
|
|
488
|
-
children: [/* @__PURE__ */ a(
|
|
529
|
+
children: [/* @__PURE__ */ a(_, {
|
|
489
530
|
tabIndex: -1,
|
|
490
531
|
size: t,
|
|
491
532
|
color: "currentColor",
|
|
492
533
|
children: r
|
|
493
|
-
}),
|
|
494
|
-
color:
|
|
495
|
-
icon:
|
|
534
|
+
}), o && /* @__PURE__ */ a(N, {
|
|
535
|
+
color: le(n, e),
|
|
536
|
+
icon: U,
|
|
496
537
|
size: 12
|
|
497
538
|
})]
|
|
498
539
|
});
|
|
499
|
-
function
|
|
500
|
-
value:
|
|
540
|
+
function V({
|
|
541
|
+
value: e,
|
|
501
542
|
onValueChange: r,
|
|
502
|
-
noneSelectedLabel:
|
|
543
|
+
noneSelectedLabel: o = "None",
|
|
503
544
|
children: t
|
|
504
545
|
}) {
|
|
505
|
-
return /* @__PURE__ */ m(
|
|
546
|
+
return /* @__PURE__ */ m(j, {
|
|
506
547
|
flex: 1,
|
|
507
|
-
children: [/* @__PURE__ */ m(
|
|
548
|
+
children: [/* @__PURE__ */ m(g, {
|
|
508
549
|
flexWrap: "wrap",
|
|
509
|
-
children: [
|
|
510
|
-
children: [/* @__PURE__ */ a(
|
|
550
|
+
children: [e == null ? void 0 : e.map((n) => /* @__PURE__ */ m(g, {
|
|
551
|
+
children: [/* @__PURE__ */ a(S, {
|
|
511
552
|
num: 0.5,
|
|
512
553
|
children: /* @__PURE__ */ a(I, {
|
|
513
554
|
label: n.label,
|
|
514
555
|
onClickRemove: () => {
|
|
515
556
|
var i;
|
|
516
|
-
return r == null ? void 0 : r((i =
|
|
557
|
+
return r == null ? void 0 : r((i = e == null ? void 0 : e.filter((c) => c.value !== n.value)) != null ? i : []);
|
|
517
558
|
}
|
|
518
559
|
})
|
|
519
|
-
}), /* @__PURE__ */ a(
|
|
520
|
-
}, n.value)),
|
|
560
|
+
}), /* @__PURE__ */ a(y, {})]
|
|
561
|
+
}, n.value)), e != null && e.length ? /* @__PURE__ */ a(S, {
|
|
521
562
|
num: 0.5,
|
|
522
563
|
children: /* @__PURE__ */ a(q, {
|
|
523
564
|
size: "small",
|
|
524
565
|
label: "Clear",
|
|
525
566
|
onClick: () => r == null ? void 0 : r([])
|
|
526
567
|
})
|
|
527
|
-
}) : /* @__PURE__ */ a(
|
|
568
|
+
}) : /* @__PURE__ */ a(S, {
|
|
528
569
|
num: 0.5,
|
|
529
570
|
children: /* @__PURE__ */ a(I, {
|
|
530
571
|
variant: "secondary",
|
|
531
|
-
label:
|
|
572
|
+
label: o
|
|
532
573
|
})
|
|
533
574
|
})]
|
|
534
|
-
}), /* @__PURE__ */ a(
|
|
575
|
+
}), /* @__PURE__ */ a(y, {
|
|
535
576
|
num: 0.5
|
|
536
577
|
}), t]
|
|
537
578
|
});
|
|
538
579
|
}
|
|
539
|
-
function
|
|
540
|
-
value:
|
|
580
|
+
function ce({
|
|
581
|
+
value: e,
|
|
541
582
|
onValueChange: r,
|
|
542
|
-
placeholder:
|
|
583
|
+
placeholder: o = "Type to search",
|
|
543
584
|
loading: t,
|
|
544
585
|
inputValue: n,
|
|
545
586
|
onInputChange: i,
|
|
546
587
|
noneSelectedLabel: c = "None",
|
|
547
588
|
...v
|
|
548
589
|
}) {
|
|
549
|
-
return /* @__PURE__ */ a(
|
|
590
|
+
return /* @__PURE__ */ a(V, {
|
|
550
591
|
noneSelectedLabel: c,
|
|
551
592
|
onValueChange: r,
|
|
552
|
-
value:
|
|
553
|
-
children: /* @__PURE__ */ a(
|
|
593
|
+
value: e,
|
|
594
|
+
children: /* @__PURE__ */ a(O, {
|
|
554
595
|
...v,
|
|
555
596
|
isClearable: !1,
|
|
556
|
-
value:
|
|
597
|
+
value: e,
|
|
557
598
|
onChange: r ? (u) => r([...u]) : void 0,
|
|
558
599
|
backspaceRemovesValue: !1,
|
|
559
600
|
hideSelectedOptions: !0,
|
|
560
601
|
controlShouldRenderValue: !1,
|
|
561
|
-
placeholder:
|
|
602
|
+
placeholder: o,
|
|
562
603
|
isLoading: t,
|
|
563
604
|
inputValue: n,
|
|
564
605
|
onInputChange: i
|
|
565
606
|
})
|
|
566
607
|
});
|
|
567
608
|
}
|
|
568
|
-
const
|
|
569
|
-
function
|
|
570
|
-
value:
|
|
609
|
+
const xe = F.memo(ce);
|
|
610
|
+
function se({
|
|
611
|
+
value: e,
|
|
571
612
|
onValueChange: r,
|
|
572
|
-
placeholder:
|
|
613
|
+
placeholder: o = "Type to search",
|
|
573
614
|
loading: t,
|
|
574
615
|
inputValue: n,
|
|
575
616
|
onInputChange: i,
|
|
576
617
|
noneSelectedLabel: c = "None",
|
|
577
618
|
...v
|
|
578
619
|
}) {
|
|
579
|
-
return /* @__PURE__ */ a(
|
|
620
|
+
return /* @__PURE__ */ a(V, {
|
|
580
621
|
noneSelectedLabel: c,
|
|
581
622
|
onValueChange: r,
|
|
582
|
-
value:
|
|
583
|
-
children: /* @__PURE__ */ a(
|
|
623
|
+
value: e,
|
|
624
|
+
children: /* @__PURE__ */ a(ie, {
|
|
584
625
|
...v,
|
|
585
626
|
isClearable: !1,
|
|
586
|
-
value:
|
|
627
|
+
value: e,
|
|
587
628
|
onChange: r ? (u) => r([...u]) : void 0,
|
|
588
629
|
backspaceRemovesValue: !1,
|
|
589
630
|
hideSelectedOptions: !0,
|
|
590
631
|
controlShouldRenderValue: !1,
|
|
591
|
-
placeholder:
|
|
632
|
+
placeholder: o,
|
|
592
633
|
isLoading: t,
|
|
593
634
|
inputValue: n,
|
|
594
635
|
onInputChange: i
|
|
595
636
|
})
|
|
596
637
|
});
|
|
597
638
|
}
|
|
598
|
-
const
|
|
639
|
+
const ke = F.memo(se);
|
|
599
640
|
export {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
641
|
+
Ce as AsyncMultiSelect,
|
|
642
|
+
ge as AsyncSelect,
|
|
643
|
+
xe as ChipMultiSelect,
|
|
644
|
+
ke as GroupedChipMultiSelect,
|
|
645
|
+
ie as GroupedMultiSelect,
|
|
646
|
+
O as MultiSelect,
|
|
647
|
+
pe as OverflowingMultiSelect,
|
|
648
|
+
we as Select,
|
|
649
|
+
K as createStylesFromTheme,
|
|
650
|
+
k as createStylesFromVariant,
|
|
651
|
+
L as defaultSelectTheme
|
|
610
652
|
};
|
|
611
653
|
//# sourceMappingURL=index.es.js.map
|