@xsolla/xui-multi-select 0.89.0 → 0.91.0
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/native/index.js +102 -969
- package/native/index.js.map +1 -1
- package/native/index.mjs +65 -932
- package/native/index.mjs.map +1 -1
- package/package.json +6 -5
- package/web/index.js +105 -952
- package/web/index.js.map +1 -1
- package/web/index.mjs +69 -916
- package/web/index.mjs.map +1 -1
package/web/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
37
|
// src/MultiSelect.tsx
|
|
38
|
-
var
|
|
38
|
+
var import_react8 = require("react");
|
|
39
39
|
|
|
40
40
|
// ../primitives-web/src/Box.tsx
|
|
41
41
|
var import_react = __toESM(require("react"));
|
|
@@ -238,54 +238,10 @@ var Text = ({
|
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
// ../primitives-web/src/
|
|
241
|
+
// ../primitives-web/src/Icon.tsx
|
|
242
242
|
var import_styled_components3 = __toESM(require("styled-components"));
|
|
243
243
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
244
|
-
var
|
|
245
|
-
from {
|
|
246
|
-
transform: rotate(0deg);
|
|
247
|
-
}
|
|
248
|
-
to {
|
|
249
|
-
transform: rotate(360deg);
|
|
250
|
-
}
|
|
251
|
-
`;
|
|
252
|
-
var StyledSpinner = import_styled_components3.default.div`
|
|
253
|
-
width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
254
|
-
height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
255
|
-
border: ${(props) => props.strokeWidth || 2}px solid
|
|
256
|
-
${(props) => props.color || "currentColor"};
|
|
257
|
-
border-bottom-color: transparent;
|
|
258
|
-
border-radius: 50%;
|
|
259
|
-
display: inline-block;
|
|
260
|
-
box-sizing: border-box;
|
|
261
|
-
animation: ${rotate} 1s linear infinite;
|
|
262
|
-
`;
|
|
263
|
-
var Spinner = ({
|
|
264
|
-
role = "status",
|
|
265
|
-
"aria-label": ariaLabel,
|
|
266
|
-
"aria-live": ariaLive = "polite",
|
|
267
|
-
"aria-describedby": ariaDescribedBy,
|
|
268
|
-
testID,
|
|
269
|
-
...props
|
|
270
|
-
}) => {
|
|
271
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
272
|
-
StyledSpinner,
|
|
273
|
-
{
|
|
274
|
-
role,
|
|
275
|
-
"aria-label": ariaLabel,
|
|
276
|
-
"aria-live": ariaLive,
|
|
277
|
-
"aria-describedby": ariaDescribedBy,
|
|
278
|
-
"data-testid": testID,
|
|
279
|
-
...props
|
|
280
|
-
}
|
|
281
|
-
);
|
|
282
|
-
};
|
|
283
|
-
Spinner.displayName = "Spinner";
|
|
284
|
-
|
|
285
|
-
// ../primitives-web/src/Icon.tsx
|
|
286
|
-
var import_styled_components4 = __toESM(require("styled-components"));
|
|
287
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
288
|
-
var StyledIcon = import_styled_components4.default.div`
|
|
244
|
+
var StyledIcon = import_styled_components3.default.div`
|
|
289
245
|
display: flex;
|
|
290
246
|
align-items: center;
|
|
291
247
|
justify-content: center;
|
|
@@ -301,202 +257,22 @@ var StyledIcon = import_styled_components4.default.div`
|
|
|
301
257
|
}
|
|
302
258
|
`;
|
|
303
259
|
var Icon = ({ children, ...props }) => {
|
|
304
|
-
return /* @__PURE__ */ (0,
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StyledIcon, { ...props, children });
|
|
305
261
|
};
|
|
306
262
|
|
|
307
|
-
// ../primitives-web/src/Divider.tsx
|
|
308
|
-
var import_styled_components5 = __toESM(require("styled-components"));
|
|
309
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
310
|
-
var StyledDivider = import_styled_components5.default.div`
|
|
311
|
-
background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
|
|
312
|
-
width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
|
|
313
|
-
height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
314
|
-
|
|
315
|
-
${(props) => props.dashStroke && `
|
|
316
|
-
border-style: dashed;
|
|
317
|
-
border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
|
|
318
|
-
border-width: 0;
|
|
319
|
-
${props.vertical ? `
|
|
320
|
-
border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
|
|
321
|
-
height: 100%;
|
|
322
|
-
` : `
|
|
323
|
-
border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
324
|
-
width: 100%;
|
|
325
|
-
`}
|
|
326
|
-
`}
|
|
327
|
-
`;
|
|
328
|
-
|
|
329
|
-
// ../primitives-web/src/Input.tsx
|
|
330
|
-
var import_react2 = require("react");
|
|
331
|
-
var import_styled_components6 = __toESM(require("styled-components"));
|
|
332
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
333
|
-
var StyledInput = import_styled_components6.default.input`
|
|
334
|
-
background: transparent;
|
|
335
|
-
border: none;
|
|
336
|
-
outline: none;
|
|
337
|
-
width: 100%;
|
|
338
|
-
height: 100%;
|
|
339
|
-
padding: 0;
|
|
340
|
-
margin: 0;
|
|
341
|
-
color: ${(props) => props.color || "inherit"};
|
|
342
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
343
|
-
font-family: inherit;
|
|
344
|
-
text-align: inherit;
|
|
345
|
-
|
|
346
|
-
&::placeholder {
|
|
347
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
&:disabled {
|
|
351
|
-
cursor: not-allowed;
|
|
352
|
-
}
|
|
353
|
-
`;
|
|
354
|
-
var InputPrimitive = (0, import_react2.forwardRef)(
|
|
355
|
-
({
|
|
356
|
-
value,
|
|
357
|
-
placeholder,
|
|
358
|
-
onChange,
|
|
359
|
-
onChangeText,
|
|
360
|
-
onFocus,
|
|
361
|
-
onBlur,
|
|
362
|
-
onKeyDown,
|
|
363
|
-
disabled,
|
|
364
|
-
secureTextEntry,
|
|
365
|
-
style,
|
|
366
|
-
color,
|
|
367
|
-
fontSize,
|
|
368
|
-
placeholderTextColor,
|
|
369
|
-
maxLength,
|
|
370
|
-
name,
|
|
371
|
-
type,
|
|
372
|
-
inputMode,
|
|
373
|
-
autoComplete,
|
|
374
|
-
id,
|
|
375
|
-
"aria-invalid": ariaInvalid,
|
|
376
|
-
"aria-describedby": ariaDescribedBy,
|
|
377
|
-
"aria-labelledby": ariaLabelledBy,
|
|
378
|
-
"aria-label": ariaLabel,
|
|
379
|
-
"aria-disabled": ariaDisabled,
|
|
380
|
-
"data-testid": dataTestId,
|
|
381
|
-
...rest
|
|
382
|
-
}, ref) => {
|
|
383
|
-
const handleChange = (e) => {
|
|
384
|
-
if (onChange) {
|
|
385
|
-
onChange(e);
|
|
386
|
-
}
|
|
387
|
-
if (onChangeText) {
|
|
388
|
-
onChangeText(e.target.value);
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
const inputValue = value !== void 0 ? value : "";
|
|
392
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
393
|
-
StyledInput,
|
|
394
|
-
{
|
|
395
|
-
ref,
|
|
396
|
-
id,
|
|
397
|
-
value: inputValue,
|
|
398
|
-
name,
|
|
399
|
-
placeholder,
|
|
400
|
-
onChange: handleChange,
|
|
401
|
-
onFocus,
|
|
402
|
-
onBlur,
|
|
403
|
-
onKeyDown,
|
|
404
|
-
disabled,
|
|
405
|
-
type: secureTextEntry ? "password" : type || "text",
|
|
406
|
-
inputMode,
|
|
407
|
-
autoComplete,
|
|
408
|
-
style,
|
|
409
|
-
color,
|
|
410
|
-
fontSize,
|
|
411
|
-
placeholderTextColor,
|
|
412
|
-
maxLength,
|
|
413
|
-
"aria-invalid": ariaInvalid,
|
|
414
|
-
"aria-describedby": ariaDescribedBy,
|
|
415
|
-
"aria-labelledby": ariaLabelledBy,
|
|
416
|
-
"aria-label": ariaLabel,
|
|
417
|
-
"aria-disabled": ariaDisabled,
|
|
418
|
-
"data-testid": dataTestId,
|
|
419
|
-
...rest
|
|
420
|
-
}
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
);
|
|
424
|
-
InputPrimitive.displayName = "InputPrimitive";
|
|
425
|
-
|
|
426
|
-
// ../primitives-web/src/TextArea.tsx
|
|
427
|
-
var import_react3 = require("react");
|
|
428
|
-
var import_styled_components7 = __toESM(require("styled-components"));
|
|
429
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
430
|
-
var StyledTextArea = import_styled_components7.default.textarea`
|
|
431
|
-
background: transparent;
|
|
432
|
-
border: none;
|
|
433
|
-
outline: none;
|
|
434
|
-
width: 100%;
|
|
435
|
-
height: 100%;
|
|
436
|
-
padding: 0;
|
|
437
|
-
margin: 0;
|
|
438
|
-
color: ${(props) => props.color || "inherit"};
|
|
439
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
440
|
-
font-family: inherit;
|
|
441
|
-
text-align: inherit;
|
|
442
|
-
resize: none;
|
|
443
|
-
|
|
444
|
-
&::placeholder {
|
|
445
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
&:disabled {
|
|
449
|
-
cursor: not-allowed;
|
|
450
|
-
}
|
|
451
|
-
`;
|
|
452
|
-
var TextAreaPrimitive = (0, import_react3.forwardRef)(
|
|
453
|
-
({
|
|
454
|
-
value,
|
|
455
|
-
placeholder,
|
|
456
|
-
onChangeText,
|
|
457
|
-
onFocus,
|
|
458
|
-
onBlur,
|
|
459
|
-
onKeyDown,
|
|
460
|
-
disabled,
|
|
461
|
-
style,
|
|
462
|
-
color,
|
|
463
|
-
fontSize,
|
|
464
|
-
placeholderTextColor,
|
|
465
|
-
maxLength,
|
|
466
|
-
rows
|
|
467
|
-
}, ref) => {
|
|
468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
469
|
-
StyledTextArea,
|
|
470
|
-
{
|
|
471
|
-
ref,
|
|
472
|
-
value,
|
|
473
|
-
placeholder,
|
|
474
|
-
onChange: (e) => onChangeText?.(e.target.value),
|
|
475
|
-
onFocus,
|
|
476
|
-
onBlur,
|
|
477
|
-
onKeyDown,
|
|
478
|
-
disabled,
|
|
479
|
-
style,
|
|
480
|
-
color,
|
|
481
|
-
fontSize,
|
|
482
|
-
placeholderTextColor,
|
|
483
|
-
maxLength,
|
|
484
|
-
rows
|
|
485
|
-
}
|
|
486
|
-
);
|
|
487
|
-
}
|
|
488
|
-
);
|
|
489
|
-
TextAreaPrimitive.displayName = "TextAreaPrimitive";
|
|
490
|
-
|
|
491
263
|
// src/MultiSelect.tsx
|
|
492
264
|
var import_xui_core4 = require("@xsolla/xui-core");
|
|
493
265
|
|
|
494
266
|
// src/MultiSelectControl.tsx
|
|
495
|
-
var
|
|
267
|
+
var import_react6 = require("react");
|
|
496
268
|
var import_xui_core3 = require("@xsolla/xui-core");
|
|
497
269
|
|
|
498
270
|
// ../icons-base/dist/web/index.mjs
|
|
499
|
-
var
|
|
271
|
+
var import_styled_components4 = __toESM(require("styled-components"), 1);
|
|
272
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
273
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
274
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
275
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
500
276
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
501
277
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
502
278
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -874,11 +650,7 @@ var import_jsx_runtime381 = require("react/jsx-runtime");
|
|
|
874
650
|
var import_jsx_runtime382 = require("react/jsx-runtime");
|
|
875
651
|
var import_jsx_runtime383 = require("react/jsx-runtime");
|
|
876
652
|
var import_jsx_runtime384 = require("react/jsx-runtime");
|
|
877
|
-
var
|
|
878
|
-
var import_jsx_runtime386 = require("react/jsx-runtime");
|
|
879
|
-
var import_jsx_runtime387 = require("react/jsx-runtime");
|
|
880
|
-
var import_jsx_runtime388 = require("react/jsx-runtime");
|
|
881
|
-
var StyledIcon2 = import_styled_components8.default.div`
|
|
653
|
+
var StyledIcon2 = import_styled_components4.default.div`
|
|
882
654
|
display: inline-flex;
|
|
883
655
|
align-items: center;
|
|
884
656
|
justify-content: center;
|
|
@@ -905,7 +677,7 @@ var BaseIcon = ({
|
|
|
905
677
|
}) => {
|
|
906
678
|
const svgContent = variant === "line" ? lineContent381 : solidContent381;
|
|
907
679
|
const sizeValue = typeof size === "number" ? `${size}px` : size;
|
|
908
|
-
return /* @__PURE__ */ (0,
|
|
680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
909
681
|
StyledIcon2,
|
|
910
682
|
{
|
|
911
683
|
$size: sizeValue,
|
|
@@ -922,61 +694,36 @@ var BaseIcon = ({
|
|
|
922
694
|
};
|
|
923
695
|
var solidContent69 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_chevron-down--solid"><path id="Union" d="M7.19471 10.195C6.75374 9.754 7.06605 9 7.68969 9L16.3098 9C16.9334 9 17.2457 9.754 16.8048 10.195L12.7068 14.2929C12.3163 14.6834 11.6832 14.6834 11.2926 14.2929L7.19471 10.195Z" style="fill: currentColor"/></g></svg>`;
|
|
924
696
|
var lineContent69 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_chevron-down--line"><path id="Union" d="M12.7178 15.7808C12.3273 16.1713 11.6942 16.1713 11.3036 15.7808L4.30371 8.78084L5.71777 7.36678L12.0107 13.6597L18.3037 7.36678L19.7178 8.78084L12.7178 15.7808Z" style="fill: currentColor"/></g></svg>`;
|
|
925
|
-
var ChevronDown = (props) => /* @__PURE__ */ (0,
|
|
697
|
+
var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BaseIcon, { ...props, solidContent: solidContent69, lineContent: lineContent69 });
|
|
926
698
|
var solidContent78 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_chevron-up--solid"><path id="Union" d="M16.8048 12.8049C17.2457 13.2458 16.9334 13.9998 16.3098 13.9998H7.68968C7.06605 13.9998 6.75373 13.2458 7.19471 12.8049L11.2926 8.70696C11.6832 8.31643 12.3163 8.31643 12.7068 8.70696L16.8048 12.8049Z" style="fill: currentColor"/></g></svg>`;
|
|
927
699
|
var lineContent78 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_chevron-up--line"><path id="Union" d="M11.2929 7.93945C11.6834 7.54893 12.3166 7.54893 12.7071 7.93945L19.707 14.9394L18.293 16.3534L12 10.0605L5.70703 16.3534L4.29297 14.9394L11.2929 7.93945Z" style="fill: currentColor"/></g></svg>`;
|
|
928
|
-
var ChevronUp = (props) => /* @__PURE__ */ (0,
|
|
700
|
+
var ChevronUp = (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BaseIcon, { ...props, solidContent: solidContent78, lineContent: lineContent78 });
|
|
929
701
|
var solidContent87 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_exclamation-mark-cr--solid"><path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16ZM11 6V14H13V6H11Z" style="fill: currentColor"/></g></svg>`;
|
|
930
702
|
var lineContent87 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_exclamation-mark-cr--line"><g id="Union"><path d="M13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16C12.5523 16 13 16.4477 13 17Z" style="fill: currentColor"/><path d="M13 14H11V6H13V14Z" style="fill: currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" style="fill: currentColor"/></g></g></svg>`;
|
|
931
|
-
var ExclamationMarkCr = (props) => /* @__PURE__ */ (0,
|
|
703
|
+
var ExclamationMarkCr = (props) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BaseIcon, { ...props, solidContent: solidContent87, lineContent: lineContent87 });
|
|
932
704
|
var solidContent111 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_remove--solid"><path id="Union" d="M19.7789 7.05003C20.1695 7.44056 20.1695 8.07372 19.7789 8.46424L16.2434 11.9998L19.7789 15.5353C20.1695 15.9258 20.1695 16.559 19.7789 16.9495L16.9505 19.778C16.56 20.1685 15.9268 20.1685 15.5363 19.778L12.0008 16.2424L8.46522 19.778C8.0747 20.1685 7.44153 20.1685 7.05101 19.778L4.22258 16.9495C3.83206 16.559 3.83206 15.9258 4.22258 15.5353L7.75811 11.9998L4.22258 8.46424C3.83206 8.07372 3.83206 7.44056 4.22258 7.05003L7.05101 4.2216C7.44153 3.83108 8.0747 3.83108 8.46522 4.2216L12.0008 7.75714L15.5363 4.2216C15.9268 3.83108 16.56 3.83108 16.9505 4.2216L19.7789 7.05003Z" style="fill: currentColor"/></g></svg>`;
|
|
933
705
|
var lineContent111 = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g id="icon_remove--line"><path id="Union" d="M20.0303 5.41455L13.4199 12.0249L20.0195 18.6245L18.6055 20.0386L12.0059 13.439L5.41406 20.0308L4 18.6167L10.5918 12.0249L4.00879 5.44189L5.42285 4.02783L12.0059 10.6108L18.6162 4.00049L20.0303 5.41455Z" style="fill: currentColor"/></g></svg>`;
|
|
934
|
-
var Remove = (props) => /* @__PURE__ */ (0,
|
|
706
|
+
var Remove = (props) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(BaseIcon, { ...props, solidContent: solidContent111, lineContent: lineContent111 });
|
|
935
707
|
|
|
936
708
|
// src/useMultiSelectControl.tsx
|
|
937
|
-
var
|
|
709
|
+
var import_react5 = require("react");
|
|
938
710
|
|
|
939
711
|
// ../tag/dist/web/index.mjs
|
|
940
|
-
var
|
|
941
|
-
var
|
|
942
|
-
var
|
|
943
|
-
var
|
|
944
|
-
var
|
|
945
|
-
var
|
|
946
|
-
var
|
|
947
|
-
var import_styled_components19 = __toESM(require("styled-components"), 1);
|
|
948
|
-
var import_jsx_runtime400 = require("react/jsx-runtime");
|
|
949
|
-
var import_styled_components20 = __toESM(require("styled-components"), 1);
|
|
950
|
-
var import_jsx_runtime401 = require("react/jsx-runtime");
|
|
951
|
-
var import_react10 = require("react");
|
|
952
|
-
var import_styled_components21 = __toESM(require("styled-components"), 1);
|
|
953
|
-
var import_jsx_runtime402 = require("react/jsx-runtime");
|
|
954
|
-
var import_react11 = require("react");
|
|
955
|
-
var import_styled_components22 = __toESM(require("styled-components"), 1);
|
|
956
|
-
var import_jsx_runtime403 = require("react/jsx-runtime");
|
|
712
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
713
|
+
var import_styled_components6 = __toESM(require("styled-components"), 1);
|
|
714
|
+
var import_jsx_runtime387 = require("react/jsx-runtime");
|
|
715
|
+
var import_styled_components7 = __toESM(require("styled-components"), 1);
|
|
716
|
+
var import_jsx_runtime388 = require("react/jsx-runtime");
|
|
717
|
+
var import_styled_components8 = __toESM(require("styled-components"), 1);
|
|
718
|
+
var import_jsx_runtime389 = require("react/jsx-runtime");
|
|
957
719
|
var import_xui_core = require("@xsolla/xui-core");
|
|
958
720
|
|
|
959
721
|
// ../icons/dist/web/index.mjs
|
|
960
|
-
var
|
|
961
|
-
var
|
|
962
|
-
var import_jsx_runtime389 = require("react/jsx-runtime");
|
|
963
|
-
var import_styled_components10 = __toESM(require("styled-components"), 1);
|
|
964
|
-
var import_jsx_runtime390 = require("react/jsx-runtime");
|
|
965
|
-
var import_styled_components11 = __toESM(require("styled-components"), 1);
|
|
966
|
-
var import_jsx_runtime391 = require("react/jsx-runtime");
|
|
967
|
-
var import_styled_components12 = __toESM(require("styled-components"), 1);
|
|
968
|
-
var import_jsx_runtime392 = require("react/jsx-runtime");
|
|
969
|
-
var import_styled_components13 = __toESM(require("styled-components"), 1);
|
|
970
|
-
var import_jsx_runtime393 = require("react/jsx-runtime");
|
|
971
|
-
var import_react7 = require("react");
|
|
972
|
-
var import_styled_components14 = __toESM(require("styled-components"), 1);
|
|
973
|
-
var import_jsx_runtime394 = require("react/jsx-runtime");
|
|
974
|
-
var import_react8 = require("react");
|
|
975
|
-
var import_styled_components15 = __toESM(require("styled-components"), 1);
|
|
976
|
-
var import_jsx_runtime395 = require("react/jsx-runtime");
|
|
722
|
+
var import_styled_components5 = __toESM(require("styled-components"), 1);
|
|
723
|
+
var import_jsx_runtime385 = require("react/jsx-runtime");
|
|
977
724
|
|
|
978
725
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
979
|
-
var
|
|
726
|
+
var import_react3 = require("react");
|
|
980
727
|
|
|
981
728
|
// ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
982
729
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -985,7 +732,7 @@ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
|
985
732
|
}).join(" ").trim();
|
|
986
733
|
|
|
987
734
|
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
|
988
|
-
var
|
|
735
|
+
var import_react2 = require("react");
|
|
989
736
|
|
|
990
737
|
// ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
991
738
|
var defaultAttributes = {
|
|
@@ -1001,7 +748,7 @@ var defaultAttributes = {
|
|
|
1001
748
|
};
|
|
1002
749
|
|
|
1003
750
|
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
|
1004
|
-
var Icon2 = (0,
|
|
751
|
+
var Icon2 = (0, import_react2.forwardRef)(
|
|
1005
752
|
({
|
|
1006
753
|
color = "currentColor",
|
|
1007
754
|
size = 24,
|
|
@@ -1012,7 +759,7 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1012
759
|
iconNode,
|
|
1013
760
|
...rest
|
|
1014
761
|
}, ref) => {
|
|
1015
|
-
return (0,
|
|
762
|
+
return (0, import_react2.createElement)(
|
|
1016
763
|
"svg",
|
|
1017
764
|
{
|
|
1018
765
|
ref,
|
|
@@ -1025,7 +772,7 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1025
772
|
...rest
|
|
1026
773
|
},
|
|
1027
774
|
[
|
|
1028
|
-
...iconNode.map(([tag, attrs]) => (0,
|
|
775
|
+
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
1029
776
|
...Array.isArray(children) ? children : [children]
|
|
1030
777
|
]
|
|
1031
778
|
);
|
|
@@ -1034,8 +781,8 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1034
781
|
|
|
1035
782
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1036
783
|
var createLucideIcon = (iconName, iconNode) => {
|
|
1037
|
-
const Component = (0,
|
|
1038
|
-
({ className, ...props }, ref) => (0,
|
|
784
|
+
const Component = (0, import_react3.forwardRef)(
|
|
785
|
+
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon2, {
|
|
1039
786
|
ref,
|
|
1040
787
|
iconNode,
|
|
1041
788
|
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
@@ -1053,222 +800,8 @@ var X = createLucideIcon("X", [
|
|
|
1053
800
|
]);
|
|
1054
801
|
|
|
1055
802
|
// ../icons/dist/web/index.mjs
|
|
1056
|
-
var
|
|
1057
|
-
var
|
|
1058
|
-
display: flex;
|
|
1059
|
-
box-sizing: border-box;
|
|
1060
|
-
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
1061
|
-
border-color: ${(props) => props.borderColor || "transparent"};
|
|
1062
|
-
border-width: ${(props) => typeof props.borderWidth === "number" ? `${props.borderWidth}px` : props.borderWidth || 0};
|
|
1063
|
-
|
|
1064
|
-
${(props) => props.borderBottomWidth !== void 0 && `
|
|
1065
|
-
border-bottom-width: ${typeof props.borderBottomWidth === "number" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};
|
|
1066
|
-
border-bottom-color: ${props.borderBottomColor || props.borderColor || "transparent"};
|
|
1067
|
-
border-bottom-style: solid;
|
|
1068
|
-
`}
|
|
1069
|
-
${(props) => props.borderTopWidth !== void 0 && `
|
|
1070
|
-
border-top-width: ${typeof props.borderTopWidth === "number" ? `${props.borderTopWidth}px` : props.borderTopWidth};
|
|
1071
|
-
border-top-color: ${props.borderTopColor || props.borderColor || "transparent"};
|
|
1072
|
-
border-top-style: solid;
|
|
1073
|
-
`}
|
|
1074
|
-
${(props) => props.borderLeftWidth !== void 0 && `
|
|
1075
|
-
border-left-width: ${typeof props.borderLeftWidth === "number" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};
|
|
1076
|
-
border-left-color: ${props.borderLeftColor || props.borderColor || "transparent"};
|
|
1077
|
-
border-left-style: solid;
|
|
1078
|
-
`}
|
|
1079
|
-
${(props) => props.borderRightWidth !== void 0 && `
|
|
1080
|
-
border-right-width: ${typeof props.borderRightWidth === "number" ? `${props.borderRightWidth}px` : props.borderRightWidth};
|
|
1081
|
-
border-right-color: ${props.borderRightColor || props.borderColor || "transparent"};
|
|
1082
|
-
border-right-style: solid;
|
|
1083
|
-
`}
|
|
1084
|
-
|
|
1085
|
-
border-style: ${(props) => props.borderStyle || (props.borderWidth || props.borderBottomWidth || props.borderTopWidth || props.borderLeftWidth || props.borderRightWidth ? "solid" : "none")};
|
|
1086
|
-
border-radius: ${(props) => typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius || 0};
|
|
1087
|
-
height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height || "auto"};
|
|
1088
|
-
width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
|
|
1089
|
-
min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
|
|
1090
|
-
min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
|
|
1091
|
-
|
|
1092
|
-
padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
|
|
1093
|
-
${(props) => props.paddingHorizontal && `
|
|
1094
|
-
padding-left: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
1095
|
-
padding-right: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
1096
|
-
`}
|
|
1097
|
-
${(props) => props.paddingVertical && `
|
|
1098
|
-
padding-top: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
1099
|
-
padding-bottom: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
1100
|
-
`}
|
|
1101
|
-
${(props) => props.paddingTop !== void 0 && `padding-top: ${typeof props.paddingTop === "number" ? `${props.paddingTop}px` : props.paddingTop};`}
|
|
1102
|
-
${(props) => props.paddingBottom !== void 0 && `padding-bottom: ${typeof props.paddingBottom === "number" ? `${props.paddingBottom}px` : props.paddingBottom};`}
|
|
1103
|
-
${(props) => props.paddingLeft !== void 0 && `padding-left: ${typeof props.paddingLeft === "number" ? `${props.paddingLeft}px` : props.paddingLeft};`}
|
|
1104
|
-
${(props) => props.paddingRight !== void 0 && `padding-right: ${typeof props.paddingRight === "number" ? `${props.paddingRight}px` : props.paddingRight};`}
|
|
1105
|
-
|
|
1106
|
-
margin: ${(props) => typeof props.margin === "number" ? `${props.margin}px` : props.margin || 0};
|
|
1107
|
-
${(props) => props.marginTop !== void 0 && `margin-top: ${typeof props.marginTop === "number" ? `${props.marginTop}px` : props.marginTop};`}
|
|
1108
|
-
${(props) => props.marginBottom !== void 0 && `margin-bottom: ${typeof props.marginBottom === "number" ? `${props.marginBottom}px` : props.marginBottom};`}
|
|
1109
|
-
${(props) => props.marginLeft !== void 0 && `margin-left: ${typeof props.marginLeft === "number" ? `${props.marginLeft}px` : props.marginLeft};`}
|
|
1110
|
-
${(props) => props.marginRight !== void 0 && `margin-right: ${typeof props.marginRight === "number" ? `${props.marginRight}px` : props.marginRight};`}
|
|
1111
|
-
|
|
1112
|
-
flex-direction: ${(props) => props.flexDirection || "column"};
|
|
1113
|
-
flex-wrap: ${(props) => props.flexWrap || "nowrap"};
|
|
1114
|
-
align-items: ${(props) => props.alignItems || "stretch"};
|
|
1115
|
-
justify-content: ${(props) => props.justifyContent || "flex-start"};
|
|
1116
|
-
cursor: ${(props) => props.cursor ? props.cursor : props.onClick || props.onPress ? "pointer" : "inherit"};
|
|
1117
|
-
position: ${(props) => props.position || "static"};
|
|
1118
|
-
top: ${(props) => typeof props.top === "number" ? `${props.top}px` : props.top};
|
|
1119
|
-
bottom: ${(props) => typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom};
|
|
1120
|
-
left: ${(props) => typeof props.left === "number" ? `${props.left}px` : props.left};
|
|
1121
|
-
right: ${(props) => typeof props.right === "number" ? `${props.right}px` : props.right};
|
|
1122
|
-
flex: ${(props) => props.flex};
|
|
1123
|
-
flex-shrink: ${(props) => props.flexShrink ?? 1};
|
|
1124
|
-
gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
|
|
1125
|
-
align-self: ${(props) => props.alignSelf || "auto"};
|
|
1126
|
-
overflow: ${(props) => props.overflow || "visible"};
|
|
1127
|
-
overflow-x: ${(props) => props.overflowX || "visible"};
|
|
1128
|
-
overflow-y: ${(props) => props.overflowY || "visible"};
|
|
1129
|
-
z-index: ${(props) => props.zIndex};
|
|
1130
|
-
opacity: ${(props) => props.disabled ? 0.5 : 1};
|
|
1131
|
-
pointer-events: ${(props) => props.disabled ? "none" : "auto"};
|
|
1132
|
-
|
|
1133
|
-
&:hover {
|
|
1134
|
-
${(props) => props.hoverStyle?.backgroundColor && `background-color: ${props.hoverStyle.backgroundColor};`}
|
|
1135
|
-
${(props) => props.hoverStyle?.borderColor && `border-color: ${props.hoverStyle.borderColor};`}
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
&:active {
|
|
1139
|
-
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
1140
|
-
}
|
|
1141
|
-
`;
|
|
1142
|
-
var Box2 = import_react6.default.forwardRef(
|
|
1143
|
-
({
|
|
1144
|
-
children,
|
|
1145
|
-
onPress,
|
|
1146
|
-
onKeyDown,
|
|
1147
|
-
onKeyUp,
|
|
1148
|
-
role,
|
|
1149
|
-
"aria-label": ariaLabel,
|
|
1150
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1151
|
-
"aria-current": ariaCurrent,
|
|
1152
|
-
"aria-disabled": ariaDisabled,
|
|
1153
|
-
"aria-live": ariaLive,
|
|
1154
|
-
"aria-busy": ariaBusy,
|
|
1155
|
-
"aria-describedby": ariaDescribedBy,
|
|
1156
|
-
"aria-expanded": ariaExpanded,
|
|
1157
|
-
"aria-haspopup": ariaHasPopup,
|
|
1158
|
-
"aria-pressed": ariaPressed,
|
|
1159
|
-
"aria-controls": ariaControls,
|
|
1160
|
-
tabIndex,
|
|
1161
|
-
as,
|
|
1162
|
-
src,
|
|
1163
|
-
alt,
|
|
1164
|
-
type,
|
|
1165
|
-
disabled,
|
|
1166
|
-
id,
|
|
1167
|
-
...props
|
|
1168
|
-
}, ref) => {
|
|
1169
|
-
if (as === "img" && src) {
|
|
1170
|
-
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
|
|
1171
|
-
"img",
|
|
1172
|
-
{
|
|
1173
|
-
src,
|
|
1174
|
-
alt: alt || "",
|
|
1175
|
-
style: {
|
|
1176
|
-
display: "block",
|
|
1177
|
-
objectFit: "cover",
|
|
1178
|
-
width: typeof props.width === "number" ? `${props.width}px` : props.width,
|
|
1179
|
-
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
|
1180
|
-
borderRadius: typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius,
|
|
1181
|
-
position: props.position,
|
|
1182
|
-
top: typeof props.top === "number" ? `${props.top}px` : props.top,
|
|
1183
|
-
left: typeof props.left === "number" ? `${props.left}px` : props.left,
|
|
1184
|
-
right: typeof props.right === "number" ? `${props.right}px` : props.right,
|
|
1185
|
-
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
);
|
|
1189
|
-
}
|
|
1190
|
-
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
|
|
1191
|
-
StyledBox2,
|
|
1192
|
-
{
|
|
1193
|
-
ref,
|
|
1194
|
-
as,
|
|
1195
|
-
id,
|
|
1196
|
-
type: as === "button" ? type || "button" : void 0,
|
|
1197
|
-
disabled: as === "button" ? disabled : void 0,
|
|
1198
|
-
onClick: onPress,
|
|
1199
|
-
onKeyDown,
|
|
1200
|
-
onKeyUp,
|
|
1201
|
-
role,
|
|
1202
|
-
"aria-label": ariaLabel,
|
|
1203
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1204
|
-
"aria-current": ariaCurrent,
|
|
1205
|
-
"aria-disabled": ariaDisabled,
|
|
1206
|
-
"aria-busy": ariaBusy,
|
|
1207
|
-
"aria-describedby": ariaDescribedBy,
|
|
1208
|
-
"aria-expanded": ariaExpanded,
|
|
1209
|
-
"aria-haspopup": ariaHasPopup,
|
|
1210
|
-
"aria-pressed": ariaPressed,
|
|
1211
|
-
"aria-controls": ariaControls,
|
|
1212
|
-
"aria-live": ariaLive,
|
|
1213
|
-
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
1214
|
-
...props,
|
|
1215
|
-
children
|
|
1216
|
-
}
|
|
1217
|
-
);
|
|
1218
|
-
}
|
|
1219
|
-
);
|
|
1220
|
-
Box2.displayName = "Box";
|
|
1221
|
-
var StyledText2 = import_styled_components10.default.span`
|
|
1222
|
-
color: ${(props) => props.color || "inherit"};
|
|
1223
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1224
|
-
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
1225
|
-
font-family: ${(props) => props.fontFamily || '"Pilat Wide Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important'};
|
|
1226
|
-
line-height: ${(props) => typeof props.lineHeight === "number" ? `${props.lineHeight}px` : props.lineHeight || "inherit"};
|
|
1227
|
-
white-space: ${(props) => props.whiteSpace || "normal"};
|
|
1228
|
-
text-align: ${(props) => props.textAlign || "inherit"};
|
|
1229
|
-
text-decoration: ${(props) => props.textDecoration || "none"};
|
|
1230
|
-
`;
|
|
1231
|
-
var rotate2 = import_styled_components11.keyframes`
|
|
1232
|
-
from {
|
|
1233
|
-
transform: rotate(0deg);
|
|
1234
|
-
}
|
|
1235
|
-
to {
|
|
1236
|
-
transform: rotate(360deg);
|
|
1237
|
-
}
|
|
1238
|
-
`;
|
|
1239
|
-
var StyledSpinner2 = import_styled_components11.default.div`
|
|
1240
|
-
width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1241
|
-
height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1242
|
-
border: ${(props) => props.strokeWidth || 2}px solid
|
|
1243
|
-
${(props) => props.color || "currentColor"};
|
|
1244
|
-
border-bottom-color: transparent;
|
|
1245
|
-
border-radius: 50%;
|
|
1246
|
-
display: inline-block;
|
|
1247
|
-
box-sizing: border-box;
|
|
1248
|
-
animation: ${rotate2} 1s linear infinite;
|
|
1249
|
-
`;
|
|
1250
|
-
var Spinner2 = ({
|
|
1251
|
-
role = "status",
|
|
1252
|
-
"aria-label": ariaLabel,
|
|
1253
|
-
"aria-live": ariaLive = "polite",
|
|
1254
|
-
"aria-describedby": ariaDescribedBy,
|
|
1255
|
-
testID,
|
|
1256
|
-
...props
|
|
1257
|
-
}) => {
|
|
1258
|
-
return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
1259
|
-
StyledSpinner2,
|
|
1260
|
-
{
|
|
1261
|
-
role,
|
|
1262
|
-
"aria-label": ariaLabel,
|
|
1263
|
-
"aria-live": ariaLive,
|
|
1264
|
-
"aria-describedby": ariaDescribedBy,
|
|
1265
|
-
"data-testid": testID,
|
|
1266
|
-
...props
|
|
1267
|
-
}
|
|
1268
|
-
);
|
|
1269
|
-
};
|
|
1270
|
-
Spinner2.displayName = "Spinner";
|
|
1271
|
-
var StyledIcon3 = import_styled_components12.default.div`
|
|
803
|
+
var import_jsx_runtime386 = require("react/jsx-runtime");
|
|
804
|
+
var StyledIcon3 = import_styled_components5.default.div`
|
|
1272
805
|
display: flex;
|
|
1273
806
|
align-items: center;
|
|
1274
807
|
justify-content: center;
|
|
@@ -1284,183 +817,13 @@ var StyledIcon3 = import_styled_components12.default.div`
|
|
|
1284
817
|
}
|
|
1285
818
|
`;
|
|
1286
819
|
var Icon3 = ({ children, ...props }) => {
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(StyledIcon3, { ...props, children });
|
|
1288
821
|
};
|
|
1289
|
-
var
|
|
1290
|
-
background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1291
|
-
width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
|
|
1292
|
-
height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1293
|
-
|
|
1294
|
-
${(props) => props.dashStroke && `
|
|
1295
|
-
border-style: dashed;
|
|
1296
|
-
border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1297
|
-
border-width: 0;
|
|
1298
|
-
${props.vertical ? `
|
|
1299
|
-
border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
|
|
1300
|
-
height: 100%;
|
|
1301
|
-
` : `
|
|
1302
|
-
border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1303
|
-
width: 100%;
|
|
1304
|
-
`}
|
|
1305
|
-
`}
|
|
1306
|
-
`;
|
|
1307
|
-
var StyledInput2 = import_styled_components14.default.input`
|
|
1308
|
-
background: transparent;
|
|
1309
|
-
border: none;
|
|
1310
|
-
outline: none;
|
|
1311
|
-
width: 100%;
|
|
1312
|
-
height: 100%;
|
|
1313
|
-
padding: 0;
|
|
1314
|
-
margin: 0;
|
|
1315
|
-
color: ${(props) => props.color || "inherit"};
|
|
1316
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1317
|
-
font-family: inherit;
|
|
1318
|
-
text-align: inherit;
|
|
1319
|
-
|
|
1320
|
-
&::placeholder {
|
|
1321
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
&:disabled {
|
|
1325
|
-
cursor: not-allowed;
|
|
1326
|
-
}
|
|
1327
|
-
`;
|
|
1328
|
-
var InputPrimitive2 = (0, import_react7.forwardRef)(
|
|
1329
|
-
({
|
|
1330
|
-
value,
|
|
1331
|
-
placeholder,
|
|
1332
|
-
onChange,
|
|
1333
|
-
onChangeText,
|
|
1334
|
-
onFocus,
|
|
1335
|
-
onBlur,
|
|
1336
|
-
onKeyDown,
|
|
1337
|
-
disabled,
|
|
1338
|
-
secureTextEntry,
|
|
1339
|
-
style,
|
|
1340
|
-
color,
|
|
1341
|
-
fontSize,
|
|
1342
|
-
placeholderTextColor,
|
|
1343
|
-
maxLength,
|
|
1344
|
-
name,
|
|
1345
|
-
type,
|
|
1346
|
-
inputMode,
|
|
1347
|
-
autoComplete,
|
|
1348
|
-
id,
|
|
1349
|
-
"aria-invalid": ariaInvalid,
|
|
1350
|
-
"aria-describedby": ariaDescribedBy,
|
|
1351
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1352
|
-
"aria-label": ariaLabel,
|
|
1353
|
-
"aria-disabled": ariaDisabled,
|
|
1354
|
-
"data-testid": dataTestId,
|
|
1355
|
-
...rest
|
|
1356
|
-
}, ref) => {
|
|
1357
|
-
const handleChange = (e) => {
|
|
1358
|
-
if (onChange) {
|
|
1359
|
-
onChange(e);
|
|
1360
|
-
}
|
|
1361
|
-
if (onChangeText) {
|
|
1362
|
-
onChangeText(e.target.value);
|
|
1363
|
-
}
|
|
1364
|
-
};
|
|
1365
|
-
const inputValue = value !== void 0 ? value : "";
|
|
1366
|
-
return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
|
|
1367
|
-
StyledInput2,
|
|
1368
|
-
{
|
|
1369
|
-
ref,
|
|
1370
|
-
id,
|
|
1371
|
-
value: inputValue,
|
|
1372
|
-
name,
|
|
1373
|
-
placeholder,
|
|
1374
|
-
onChange: handleChange,
|
|
1375
|
-
onFocus,
|
|
1376
|
-
onBlur,
|
|
1377
|
-
onKeyDown,
|
|
1378
|
-
disabled,
|
|
1379
|
-
type: secureTextEntry ? "password" : type || "text",
|
|
1380
|
-
inputMode,
|
|
1381
|
-
autoComplete,
|
|
1382
|
-
style,
|
|
1383
|
-
color,
|
|
1384
|
-
fontSize,
|
|
1385
|
-
placeholderTextColor,
|
|
1386
|
-
maxLength,
|
|
1387
|
-
"aria-invalid": ariaInvalid,
|
|
1388
|
-
"aria-describedby": ariaDescribedBy,
|
|
1389
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1390
|
-
"aria-label": ariaLabel,
|
|
1391
|
-
"aria-disabled": ariaDisabled,
|
|
1392
|
-
"data-testid": dataTestId,
|
|
1393
|
-
...rest
|
|
1394
|
-
}
|
|
1395
|
-
);
|
|
1396
|
-
}
|
|
1397
|
-
);
|
|
1398
|
-
InputPrimitive2.displayName = "InputPrimitive";
|
|
1399
|
-
var StyledTextArea2 = import_styled_components15.default.textarea`
|
|
1400
|
-
background: transparent;
|
|
1401
|
-
border: none;
|
|
1402
|
-
outline: none;
|
|
1403
|
-
width: 100%;
|
|
1404
|
-
height: 100%;
|
|
1405
|
-
padding: 0;
|
|
1406
|
-
margin: 0;
|
|
1407
|
-
color: ${(props) => props.color || "inherit"};
|
|
1408
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1409
|
-
font-family: inherit;
|
|
1410
|
-
text-align: inherit;
|
|
1411
|
-
resize: none;
|
|
1412
|
-
|
|
1413
|
-
&::placeholder {
|
|
1414
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
&:disabled {
|
|
1418
|
-
cursor: not-allowed;
|
|
1419
|
-
}
|
|
1420
|
-
`;
|
|
1421
|
-
var TextAreaPrimitive2 = (0, import_react8.forwardRef)(
|
|
1422
|
-
({
|
|
1423
|
-
value,
|
|
1424
|
-
placeholder,
|
|
1425
|
-
onChangeText,
|
|
1426
|
-
onFocus,
|
|
1427
|
-
onBlur,
|
|
1428
|
-
onKeyDown,
|
|
1429
|
-
disabled,
|
|
1430
|
-
style,
|
|
1431
|
-
color,
|
|
1432
|
-
fontSize,
|
|
1433
|
-
placeholderTextColor,
|
|
1434
|
-
maxLength,
|
|
1435
|
-
rows
|
|
1436
|
-
}, ref) => {
|
|
1437
|
-
return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
|
|
1438
|
-
StyledTextArea2,
|
|
1439
|
-
{
|
|
1440
|
-
ref,
|
|
1441
|
-
value,
|
|
1442
|
-
placeholder,
|
|
1443
|
-
onChange: (e) => onChangeText?.(e.target.value),
|
|
1444
|
-
onFocus,
|
|
1445
|
-
onBlur,
|
|
1446
|
-
onKeyDown,
|
|
1447
|
-
disabled,
|
|
1448
|
-
style,
|
|
1449
|
-
color,
|
|
1450
|
-
fontSize,
|
|
1451
|
-
placeholderTextColor,
|
|
1452
|
-
maxLength,
|
|
1453
|
-
rows
|
|
1454
|
-
}
|
|
1455
|
-
);
|
|
1456
|
-
}
|
|
1457
|
-
);
|
|
1458
|
-
TextAreaPrimitive2.displayName = "TextAreaPrimitive";
|
|
1459
|
-
var X2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(Icon3, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(X, { size: "100%" }) });
|
|
822
|
+
var X2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(Icon3, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(X, { size: "100%" }) });
|
|
1460
823
|
|
|
1461
824
|
// ../tag/dist/web/index.mjs
|
|
1462
|
-
var
|
|
1463
|
-
var
|
|
825
|
+
var import_jsx_runtime390 = require("react/jsx-runtime");
|
|
826
|
+
var StyledBox2 = import_styled_components6.default.div`
|
|
1464
827
|
display: flex;
|
|
1465
828
|
box-sizing: border-box;
|
|
1466
829
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -1545,7 +908,7 @@ var StyledBox3 = import_styled_components16.default.div`
|
|
|
1545
908
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
1546
909
|
}
|
|
1547
910
|
`;
|
|
1548
|
-
var
|
|
911
|
+
var Box2 = import_react4.default.forwardRef(
|
|
1549
912
|
({
|
|
1550
913
|
children,
|
|
1551
914
|
onPress,
|
|
@@ -1573,7 +936,7 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1573
936
|
...props
|
|
1574
937
|
}, ref) => {
|
|
1575
938
|
if (as === "img" && src) {
|
|
1576
|
-
return /* @__PURE__ */ (0,
|
|
939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
|
|
1577
940
|
"img",
|
|
1578
941
|
{
|
|
1579
942
|
src,
|
|
@@ -1593,8 +956,8 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1593
956
|
}
|
|
1594
957
|
);
|
|
1595
958
|
}
|
|
1596
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
-
|
|
959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
|
|
960
|
+
StyledBox2,
|
|
1598
961
|
{
|
|
1599
962
|
ref,
|
|
1600
963
|
as,
|
|
@@ -1623,8 +986,8 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1623
986
|
);
|
|
1624
987
|
}
|
|
1625
988
|
);
|
|
1626
|
-
|
|
1627
|
-
var
|
|
989
|
+
Box2.displayName = "Box";
|
|
990
|
+
var StyledText2 = import_styled_components7.default.span`
|
|
1628
991
|
color: ${(props) => props.color || "inherit"};
|
|
1629
992
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1630
993
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -1641,8 +1004,8 @@ var Text2 = ({
|
|
|
1641
1004
|
role,
|
|
1642
1005
|
...props
|
|
1643
1006
|
}) => {
|
|
1644
|
-
return /* @__PURE__ */ (0,
|
|
1645
|
-
|
|
1007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
|
|
1008
|
+
StyledText2,
|
|
1646
1009
|
{
|
|
1647
1010
|
...props,
|
|
1648
1011
|
style,
|
|
@@ -1652,47 +1015,7 @@ var Text2 = ({
|
|
|
1652
1015
|
}
|
|
1653
1016
|
);
|
|
1654
1017
|
};
|
|
1655
|
-
var
|
|
1656
|
-
from {
|
|
1657
|
-
transform: rotate(0deg);
|
|
1658
|
-
}
|
|
1659
|
-
to {
|
|
1660
|
-
transform: rotate(360deg);
|
|
1661
|
-
}
|
|
1662
|
-
`;
|
|
1663
|
-
var StyledSpinner3 = import_styled_components18.default.div`
|
|
1664
|
-
width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1665
|
-
height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1666
|
-
border: ${(props) => props.strokeWidth || 2}px solid
|
|
1667
|
-
${(props) => props.color || "currentColor"};
|
|
1668
|
-
border-bottom-color: transparent;
|
|
1669
|
-
border-radius: 50%;
|
|
1670
|
-
display: inline-block;
|
|
1671
|
-
box-sizing: border-box;
|
|
1672
|
-
animation: ${rotate3} 1s linear infinite;
|
|
1673
|
-
`;
|
|
1674
|
-
var Spinner3 = ({
|
|
1675
|
-
role = "status",
|
|
1676
|
-
"aria-label": ariaLabel,
|
|
1677
|
-
"aria-live": ariaLive = "polite",
|
|
1678
|
-
"aria-describedby": ariaDescribedBy,
|
|
1679
|
-
testID,
|
|
1680
|
-
...props
|
|
1681
|
-
}) => {
|
|
1682
|
-
return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
|
|
1683
|
-
StyledSpinner3,
|
|
1684
|
-
{
|
|
1685
|
-
role,
|
|
1686
|
-
"aria-label": ariaLabel,
|
|
1687
|
-
"aria-live": ariaLive,
|
|
1688
|
-
"aria-describedby": ariaDescribedBy,
|
|
1689
|
-
"data-testid": testID,
|
|
1690
|
-
...props
|
|
1691
|
-
}
|
|
1692
|
-
);
|
|
1693
|
-
};
|
|
1694
|
-
Spinner3.displayName = "Spinner";
|
|
1695
|
-
var StyledIcon4 = import_styled_components19.default.div`
|
|
1018
|
+
var StyledIcon4 = import_styled_components8.default.div`
|
|
1696
1019
|
display: flex;
|
|
1697
1020
|
align-items: center;
|
|
1698
1021
|
justify-content: center;
|
|
@@ -1708,178 +1031,8 @@ var StyledIcon4 = import_styled_components19.default.div`
|
|
|
1708
1031
|
}
|
|
1709
1032
|
`;
|
|
1710
1033
|
var Icon4 = ({ children, ...props }) => {
|
|
1711
|
-
return /* @__PURE__ */ (0,
|
|
1034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(StyledIcon4, { ...props, children });
|
|
1712
1035
|
};
|
|
1713
|
-
var StyledDivider3 = import_styled_components20.default.div`
|
|
1714
|
-
background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1715
|
-
width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
|
|
1716
|
-
height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1717
|
-
|
|
1718
|
-
${(props) => props.dashStroke && `
|
|
1719
|
-
border-style: dashed;
|
|
1720
|
-
border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1721
|
-
border-width: 0;
|
|
1722
|
-
${props.vertical ? `
|
|
1723
|
-
border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
|
|
1724
|
-
height: 100%;
|
|
1725
|
-
` : `
|
|
1726
|
-
border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1727
|
-
width: 100%;
|
|
1728
|
-
`}
|
|
1729
|
-
`}
|
|
1730
|
-
`;
|
|
1731
|
-
var StyledInput3 = import_styled_components21.default.input`
|
|
1732
|
-
background: transparent;
|
|
1733
|
-
border: none;
|
|
1734
|
-
outline: none;
|
|
1735
|
-
width: 100%;
|
|
1736
|
-
height: 100%;
|
|
1737
|
-
padding: 0;
|
|
1738
|
-
margin: 0;
|
|
1739
|
-
color: ${(props) => props.color || "inherit"};
|
|
1740
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1741
|
-
font-family: inherit;
|
|
1742
|
-
text-align: inherit;
|
|
1743
|
-
|
|
1744
|
-
&::placeholder {
|
|
1745
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
&:disabled {
|
|
1749
|
-
cursor: not-allowed;
|
|
1750
|
-
}
|
|
1751
|
-
`;
|
|
1752
|
-
var InputPrimitive3 = (0, import_react10.forwardRef)(
|
|
1753
|
-
({
|
|
1754
|
-
value,
|
|
1755
|
-
placeholder,
|
|
1756
|
-
onChange,
|
|
1757
|
-
onChangeText,
|
|
1758
|
-
onFocus,
|
|
1759
|
-
onBlur,
|
|
1760
|
-
onKeyDown,
|
|
1761
|
-
disabled,
|
|
1762
|
-
secureTextEntry,
|
|
1763
|
-
style,
|
|
1764
|
-
color,
|
|
1765
|
-
fontSize,
|
|
1766
|
-
placeholderTextColor,
|
|
1767
|
-
maxLength,
|
|
1768
|
-
name,
|
|
1769
|
-
type,
|
|
1770
|
-
inputMode,
|
|
1771
|
-
autoComplete,
|
|
1772
|
-
id,
|
|
1773
|
-
"aria-invalid": ariaInvalid,
|
|
1774
|
-
"aria-describedby": ariaDescribedBy,
|
|
1775
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1776
|
-
"aria-label": ariaLabel,
|
|
1777
|
-
"aria-disabled": ariaDisabled,
|
|
1778
|
-
"data-testid": dataTestId,
|
|
1779
|
-
...rest
|
|
1780
|
-
}, ref) => {
|
|
1781
|
-
const handleChange = (e) => {
|
|
1782
|
-
if (onChange) {
|
|
1783
|
-
onChange(e);
|
|
1784
|
-
}
|
|
1785
|
-
if (onChangeText) {
|
|
1786
|
-
onChangeText(e.target.value);
|
|
1787
|
-
}
|
|
1788
|
-
};
|
|
1789
|
-
const inputValue = value !== void 0 ? value : "";
|
|
1790
|
-
return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
|
|
1791
|
-
StyledInput3,
|
|
1792
|
-
{
|
|
1793
|
-
ref,
|
|
1794
|
-
id,
|
|
1795
|
-
value: inputValue,
|
|
1796
|
-
name,
|
|
1797
|
-
placeholder,
|
|
1798
|
-
onChange: handleChange,
|
|
1799
|
-
onFocus,
|
|
1800
|
-
onBlur,
|
|
1801
|
-
onKeyDown,
|
|
1802
|
-
disabled,
|
|
1803
|
-
type: secureTextEntry ? "password" : type || "text",
|
|
1804
|
-
inputMode,
|
|
1805
|
-
autoComplete,
|
|
1806
|
-
style,
|
|
1807
|
-
color,
|
|
1808
|
-
fontSize,
|
|
1809
|
-
placeholderTextColor,
|
|
1810
|
-
maxLength,
|
|
1811
|
-
"aria-invalid": ariaInvalid,
|
|
1812
|
-
"aria-describedby": ariaDescribedBy,
|
|
1813
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1814
|
-
"aria-label": ariaLabel,
|
|
1815
|
-
"aria-disabled": ariaDisabled,
|
|
1816
|
-
"data-testid": dataTestId,
|
|
1817
|
-
...rest
|
|
1818
|
-
}
|
|
1819
|
-
);
|
|
1820
|
-
}
|
|
1821
|
-
);
|
|
1822
|
-
InputPrimitive3.displayName = "InputPrimitive";
|
|
1823
|
-
var StyledTextArea3 = import_styled_components22.default.textarea`
|
|
1824
|
-
background: transparent;
|
|
1825
|
-
border: none;
|
|
1826
|
-
outline: none;
|
|
1827
|
-
width: 100%;
|
|
1828
|
-
height: 100%;
|
|
1829
|
-
padding: 0;
|
|
1830
|
-
margin: 0;
|
|
1831
|
-
color: ${(props) => props.color || "inherit"};
|
|
1832
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1833
|
-
font-family: inherit;
|
|
1834
|
-
text-align: inherit;
|
|
1835
|
-
resize: none;
|
|
1836
|
-
|
|
1837
|
-
&::placeholder {
|
|
1838
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
&:disabled {
|
|
1842
|
-
cursor: not-allowed;
|
|
1843
|
-
}
|
|
1844
|
-
`;
|
|
1845
|
-
var TextAreaPrimitive3 = (0, import_react11.forwardRef)(
|
|
1846
|
-
({
|
|
1847
|
-
value,
|
|
1848
|
-
placeholder,
|
|
1849
|
-
onChangeText,
|
|
1850
|
-
onFocus,
|
|
1851
|
-
onBlur,
|
|
1852
|
-
onKeyDown,
|
|
1853
|
-
disabled,
|
|
1854
|
-
style,
|
|
1855
|
-
color,
|
|
1856
|
-
fontSize,
|
|
1857
|
-
placeholderTextColor,
|
|
1858
|
-
maxLength,
|
|
1859
|
-
rows
|
|
1860
|
-
}, ref) => {
|
|
1861
|
-
return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
|
|
1862
|
-
StyledTextArea3,
|
|
1863
|
-
{
|
|
1864
|
-
ref,
|
|
1865
|
-
value,
|
|
1866
|
-
placeholder,
|
|
1867
|
-
onChange: (e) => onChangeText?.(e.target.value),
|
|
1868
|
-
onFocus,
|
|
1869
|
-
onBlur,
|
|
1870
|
-
onKeyDown,
|
|
1871
|
-
disabled,
|
|
1872
|
-
style,
|
|
1873
|
-
color,
|
|
1874
|
-
fontSize,
|
|
1875
|
-
placeholderTextColor,
|
|
1876
|
-
maxLength,
|
|
1877
|
-
rows
|
|
1878
|
-
}
|
|
1879
|
-
);
|
|
1880
|
-
}
|
|
1881
|
-
);
|
|
1882
|
-
TextAreaPrimitive3.displayName = "TextAreaPrimitive";
|
|
1883
1036
|
var Tag = ({
|
|
1884
1037
|
size = "md",
|
|
1885
1038
|
tone = "primary",
|
|
@@ -1939,8 +1092,8 @@ var Tag = ({
|
|
|
1939
1092
|
}
|
|
1940
1093
|
};
|
|
1941
1094
|
const { bg, text } = resolveColors();
|
|
1942
|
-
return /* @__PURE__ */ (0,
|
|
1943
|
-
|
|
1095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(
|
|
1096
|
+
Box2,
|
|
1944
1097
|
{
|
|
1945
1098
|
backgroundColor: bg,
|
|
1946
1099
|
borderRadius: sizeStyles.radius,
|
|
@@ -1956,8 +1109,8 @@ var Tag = ({
|
|
|
1956
1109
|
whiteSpace: "nowrap"
|
|
1957
1110
|
},
|
|
1958
1111
|
children: [
|
|
1959
|
-
icon && /* @__PURE__ */ (0,
|
|
1960
|
-
/* @__PURE__ */ (0,
|
|
1112
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Icon4, { size: sizeStyles.iconSize, color: text, children: icon }),
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
|
|
1961
1114
|
Text2,
|
|
1962
1115
|
{
|
|
1963
1116
|
color: text,
|
|
@@ -1971,7 +1124,7 @@ var Tag = ({
|
|
|
1971
1124
|
children
|
|
1972
1125
|
}
|
|
1973
1126
|
),
|
|
1974
|
-
onRemove && /* @__PURE__ */ (0,
|
|
1127
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Box2, { onPress: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(X2, { size: sizeStyles.iconSize, color: text }) })
|
|
1975
1128
|
]
|
|
1976
1129
|
}
|
|
1977
1130
|
);
|
|
@@ -1979,7 +1132,7 @@ var Tag = ({
|
|
|
1979
1132
|
|
|
1980
1133
|
// src/useMultiSelectControl.tsx
|
|
1981
1134
|
var import_xui_core2 = require("@xsolla/xui-core");
|
|
1982
|
-
var
|
|
1135
|
+
var import_jsx_runtime391 = require("react/jsx-runtime");
|
|
1983
1136
|
var COUNT_ITEM_VALUE = "count-item";
|
|
1984
1137
|
var useMultiSelectControl = ({
|
|
1985
1138
|
variant,
|
|
@@ -1994,15 +1147,15 @@ var useMultiSelectControl = ({
|
|
|
1994
1147
|
containerRef
|
|
1995
1148
|
}) => {
|
|
1996
1149
|
const { theme } = (0, import_xui_core2.useDesignSystem)();
|
|
1997
|
-
const displayStateRef = (0,
|
|
1998
|
-
const savedWidthsRef = (0,
|
|
1999
|
-
const itemsRef = (0,
|
|
2000
|
-
const [itemsWidth, setItemsWidth] = (0,
|
|
2001
|
-
const [selectedContent, setSelectedContent] = (0,
|
|
1150
|
+
const displayStateRef = (0, import_react5.useRef)(0 /* Placeholder */);
|
|
1151
|
+
const savedWidthsRef = (0, import_react5.useRef)(null);
|
|
1152
|
+
const itemsRef = (0, import_react5.useRef)(null);
|
|
1153
|
+
const [itemsWidth, setItemsWidth] = (0, import_react5.useState)(0);
|
|
1154
|
+
const [selectedContent, setSelectedContent] = (0, import_react5.useState)(
|
|
2002
1155
|
null
|
|
2003
1156
|
);
|
|
2004
1157
|
const isPlaceholder = !selectedItems || selectedItems.length === 0;
|
|
2005
|
-
(0,
|
|
1158
|
+
(0, import_react5.useEffect)(() => {
|
|
2006
1159
|
if (!containerRef.current) return;
|
|
2007
1160
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
2008
1161
|
for (const entry of entries) {
|
|
@@ -2012,7 +1165,7 @@ var useMultiSelectControl = ({
|
|
|
2012
1165
|
resizeObserver.observe(containerRef.current);
|
|
2013
1166
|
return () => resizeObserver.disconnect();
|
|
2014
1167
|
}, [containerRef]);
|
|
2015
|
-
const widthsDependencies = (0,
|
|
1168
|
+
const widthsDependencies = (0, import_react5.useMemo)(
|
|
2016
1169
|
() => ({
|
|
2017
1170
|
stateList: stateList.map((item) => item.value),
|
|
2018
1171
|
variant,
|
|
@@ -2039,7 +1192,7 @@ var useMultiSelectControl = ({
|
|
|
2039
1192
|
};
|
|
2040
1193
|
const setPlaceholder = () => {
|
|
2041
1194
|
setSelectedContent(
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
1195
|
+
/* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2043
1196
|
Text,
|
|
2044
1197
|
{
|
|
2045
1198
|
color: theme.colors.control.input.placeholder,
|
|
@@ -2090,7 +1243,7 @@ var useMultiSelectControl = ({
|
|
|
2090
1243
|
const isCount = item.value === COUNT_ITEM_VALUE;
|
|
2091
1244
|
const isReducable = index === 0 && displayStateRef.current === 3 /* Render */ && displayedItemsCount === 0 || flexible;
|
|
2092
1245
|
if (variant === "tag") {
|
|
2093
|
-
return /* @__PURE__ */ (0,
|
|
1246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2094
1247
|
Box,
|
|
2095
1248
|
{
|
|
2096
1249
|
onPress: !isCount ? (e) => {
|
|
@@ -2102,7 +1255,7 @@ var useMultiSelectControl = ({
|
|
|
2102
1255
|
opacity: disabled ? 0.5 : 1,
|
|
2103
1256
|
cursor: disabled || isCount ? "not-allowed" : "pointer"
|
|
2104
1257
|
},
|
|
2105
|
-
children: /* @__PURE__ */ (0,
|
|
1258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2106
1259
|
Tag,
|
|
2107
1260
|
{
|
|
2108
1261
|
size,
|
|
@@ -2120,7 +1273,7 @@ var useMultiSelectControl = ({
|
|
|
2120
1273
|
}
|
|
2121
1274
|
const isCountItem = hasHidden;
|
|
2122
1275
|
const needsComma = index < displayedItems.length - 2 || index < displayedItems.length - 1 && !isCountItem;
|
|
2123
|
-
return /* @__PURE__ */ (0,
|
|
1276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
|
|
2124
1277
|
Text,
|
|
2125
1278
|
{
|
|
2126
1279
|
color: theme.colors.content.primary,
|
|
@@ -2170,7 +1323,7 @@ var useMultiSelectControl = ({
|
|
|
2170
1323
|
displayStateRef.current = 3 /* Render */;
|
|
2171
1324
|
setItemsRender();
|
|
2172
1325
|
};
|
|
2173
|
-
(0,
|
|
1326
|
+
(0, import_react5.useEffect)(() => {
|
|
2174
1327
|
if (isPlaceholder) {
|
|
2175
1328
|
displayStateRef.current = 0 /* Placeholder */;
|
|
2176
1329
|
setPlaceholder();
|
|
@@ -2204,7 +1357,7 @@ var useMultiSelectControl = ({
|
|
|
2204
1357
|
widthsDependencies,
|
|
2205
1358
|
stateList
|
|
2206
1359
|
]);
|
|
2207
|
-
(0,
|
|
1360
|
+
(0, import_react5.useEffect)(() => {
|
|
2208
1361
|
if (displayStateRef.current !== 2 /* Calculation */) return;
|
|
2209
1362
|
const rafId = requestAnimationFrame(() => {
|
|
2210
1363
|
if (displayStateRef.current === 2 /* Calculation */) {
|
|
@@ -2222,8 +1375,8 @@ var useMultiSelectControl = ({
|
|
|
2222
1375
|
};
|
|
2223
1376
|
|
|
2224
1377
|
// src/MultiSelectControl.tsx
|
|
2225
|
-
var
|
|
2226
|
-
var MultiSelectControl = (0,
|
|
1378
|
+
var import_jsx_runtime392 = require("react/jsx-runtime");
|
|
1379
|
+
var MultiSelectControl = (0, import_react6.forwardRef)(
|
|
2227
1380
|
({
|
|
2228
1381
|
variant = "tag",
|
|
2229
1382
|
flexible = true,
|
|
@@ -2249,7 +1402,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2249
1402
|
const inputColors = theme.colors.control.input;
|
|
2250
1403
|
const state = externalState || (disabled ? "disable" : "default");
|
|
2251
1404
|
const isDisable = state === "disable" || disabled;
|
|
2252
|
-
const containerRef = (0,
|
|
1405
|
+
const containerRef = (0, import_react6.useRef)(null);
|
|
2253
1406
|
const { itemsRef, selectedContent, isCalculating } = useMultiSelectControl({
|
|
2254
1407
|
variant,
|
|
2255
1408
|
flexible,
|
|
@@ -2285,7 +1438,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2285
1438
|
borderColor = inputColors.borderHover;
|
|
2286
1439
|
}
|
|
2287
1440
|
const iconColor = isDisable ? inputColors.textDisable : inputColors.placeholder;
|
|
2288
|
-
return /* @__PURE__ */ (0,
|
|
1441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
|
|
2289
1442
|
Box,
|
|
2290
1443
|
{
|
|
2291
1444
|
ref,
|
|
@@ -2313,7 +1466,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2313
1466
|
borderColor: inputColors.borderHover
|
|
2314
1467
|
} : void 0,
|
|
2315
1468
|
children: [
|
|
2316
|
-
/* @__PURE__ */ (0,
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
|
|
2317
1470
|
Box,
|
|
2318
1471
|
{
|
|
2319
1472
|
ref: containerRef,
|
|
@@ -2323,8 +1476,8 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2323
1476
|
gap: 8,
|
|
2324
1477
|
style: { minWidth: 0 },
|
|
2325
1478
|
children: [
|
|
2326
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
2327
|
-
/* @__PURE__ */ (0,
|
|
1479
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Icon, { size: sizeStyles.iconSize, color: iconColor, variant: "line", children: iconLeft }),
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2328
1481
|
Box,
|
|
2329
1482
|
{
|
|
2330
1483
|
ref: itemsRef,
|
|
@@ -2343,8 +1496,8 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2343
1496
|
]
|
|
2344
1497
|
}
|
|
2345
1498
|
),
|
|
2346
|
-
/* @__PURE__ */ (0,
|
|
2347
|
-
extraClear && selectedItems.length > 0 && !isDisable && /* @__PURE__ */ (0,
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: [
|
|
1500
|
+
extraClear && selectedItems.length > 0 && !isDisable && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2348
1501
|
Box,
|
|
2349
1502
|
{
|
|
2350
1503
|
onPress: (e) => {
|
|
@@ -2352,17 +1505,17 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2352
1505
|
removeAllValues();
|
|
2353
1506
|
},
|
|
2354
1507
|
style: { cursor: "pointer" },
|
|
2355
|
-
children: /* @__PURE__ */ (0,
|
|
1508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Remove, { size: 18, color: iconColor, variant: "line" })
|
|
2356
1509
|
}
|
|
2357
1510
|
),
|
|
2358
|
-
isError && /* @__PURE__ */ (0,
|
|
1511
|
+
isError && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2359
1512
|
ExclamationMarkCr,
|
|
2360
1513
|
{
|
|
2361
1514
|
size: 18,
|
|
2362
1515
|
color: theme.colors.content.alert.primary
|
|
2363
1516
|
}
|
|
2364
1517
|
),
|
|
2365
|
-
iconRight ? iconRight : isOpen ? /* @__PURE__ */ (0,
|
|
1518
|
+
iconRight ? iconRight : isOpen ? /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(ChevronUp, { size: 18, color: iconColor, variant: "line" }) : /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(ChevronDown, { size: 18, color: iconColor })
|
|
2366
1519
|
] })
|
|
2367
1520
|
]
|
|
2368
1521
|
}
|
|
@@ -2372,7 +1525,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2372
1525
|
MultiSelectControl.displayName = "MultiSelectControl";
|
|
2373
1526
|
|
|
2374
1527
|
// src/useMultiSelect.ts
|
|
2375
|
-
var
|
|
1528
|
+
var import_react7 = require("react");
|
|
2376
1529
|
var initialState = {
|
|
2377
1530
|
values: [],
|
|
2378
1531
|
selectedItems: [],
|
|
@@ -2383,12 +1536,12 @@ var useMultiSelect = ({
|
|
|
2383
1536
|
value = [],
|
|
2384
1537
|
onChange
|
|
2385
1538
|
}) => {
|
|
2386
|
-
const [state, setState] = (0,
|
|
2387
|
-
const optionsRef = (0,
|
|
2388
|
-
(0,
|
|
1539
|
+
const [state, setState] = (0, import_react7.useState)(initialState);
|
|
1540
|
+
const optionsRef = (0, import_react7.useRef)(options);
|
|
1541
|
+
(0, import_react7.useEffect)(() => {
|
|
2389
1542
|
optionsRef.current = options;
|
|
2390
1543
|
}, [options]);
|
|
2391
|
-
(0,
|
|
1544
|
+
(0, import_react7.useEffect)(() => {
|
|
2392
1545
|
const selectedItems = options.filter((opt) => value.includes(opt.value));
|
|
2393
1546
|
setState((prevState) => ({
|
|
2394
1547
|
...prevState,
|
|
@@ -2396,7 +1549,7 @@ var useMultiSelect = ({
|
|
|
2396
1549
|
selectedItems
|
|
2397
1550
|
}));
|
|
2398
1551
|
}, [options, value]);
|
|
2399
|
-
const onChoose = (0,
|
|
1552
|
+
const onChoose = (0, import_react7.useCallback)(
|
|
2400
1553
|
(selectedIds) => {
|
|
2401
1554
|
const newValues = optionsRef.current.filter((opt) => selectedIds.includes(String(opt.value))).map((opt) => opt.value);
|
|
2402
1555
|
const newSelectedItems = optionsRef.current.filter(
|
|
@@ -2411,7 +1564,7 @@ var useMultiSelect = ({
|
|
|
2411
1564
|
},
|
|
2412
1565
|
[onChange]
|
|
2413
1566
|
);
|
|
2414
|
-
const onRemove = (0,
|
|
1567
|
+
const onRemove = (0, import_react7.useCallback)(
|
|
2415
1568
|
(value2, event) => {
|
|
2416
1569
|
event?.stopPropagation();
|
|
2417
1570
|
setState((prev) => {
|
|
@@ -2429,7 +1582,7 @@ var useMultiSelect = ({
|
|
|
2429
1582
|
},
|
|
2430
1583
|
[onChange]
|
|
2431
1584
|
);
|
|
2432
|
-
const onRemoveAll = (0,
|
|
1585
|
+
const onRemoveAll = (0, import_react7.useCallback)(() => {
|
|
2433
1586
|
setState((prevState) => ({
|
|
2434
1587
|
...prevState,
|
|
2435
1588
|
values: [],
|
|
@@ -2437,13 +1590,13 @@ var useMultiSelect = ({
|
|
|
2437
1590
|
}));
|
|
2438
1591
|
onChange?.([]);
|
|
2439
1592
|
}, [onChange]);
|
|
2440
|
-
const onSelectClick = (0,
|
|
1593
|
+
const onSelectClick = (0, import_react7.useCallback)(() => {
|
|
2441
1594
|
setState((prevState) => ({
|
|
2442
1595
|
...prevState,
|
|
2443
1596
|
isOpen: !prevState.isOpen
|
|
2444
1597
|
}));
|
|
2445
1598
|
}, []);
|
|
2446
|
-
const onClose = (0,
|
|
1599
|
+
const onClose = (0, import_react7.useCallback)(() => {
|
|
2447
1600
|
setState((prevState) => ({
|
|
2448
1601
|
...prevState,
|
|
2449
1602
|
isOpen: false
|
|
@@ -2463,8 +1616,8 @@ var useMultiSelect = ({
|
|
|
2463
1616
|
};
|
|
2464
1617
|
|
|
2465
1618
|
// src/MultiSelect.tsx
|
|
2466
|
-
var
|
|
2467
|
-
var MultiSelect = (0,
|
|
1619
|
+
var import_jsx_runtime393 = require("react/jsx-runtime");
|
|
1620
|
+
var MultiSelect = (0, import_react8.forwardRef)(
|
|
2468
1621
|
({
|
|
2469
1622
|
options,
|
|
2470
1623
|
errorMessage,
|
|
@@ -2484,8 +1637,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2484
1637
|
maxHeight = 300
|
|
2485
1638
|
}, ref) => {
|
|
2486
1639
|
const { theme } = (0, import_xui_core4.useDesignSystem)();
|
|
2487
|
-
const controlRef = (0,
|
|
2488
|
-
const menuRef = (0,
|
|
1640
|
+
const controlRef = (0, import_react8.useRef)(null);
|
|
1641
|
+
const menuRef = (0, import_react8.useRef)(null);
|
|
2489
1642
|
const sizeStyles = theme.sizing.input(size);
|
|
2490
1643
|
const state = externalState || (disabled ? "disable" : "default");
|
|
2491
1644
|
const isDisable = state === "disable" || disabled;
|
|
@@ -2506,7 +1659,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2506
1659
|
value,
|
|
2507
1660
|
onChange
|
|
2508
1661
|
});
|
|
2509
|
-
(0,
|
|
1662
|
+
(0, import_react8.useEffect)(() => {
|
|
2510
1663
|
if (isDisable) {
|
|
2511
1664
|
onClose();
|
|
2512
1665
|
}
|
|
@@ -2527,8 +1680,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2527
1680
|
const newValues = checked ? [...values, value2] : values.filter((v) => v !== value2);
|
|
2528
1681
|
onChoose(newValues.map(String));
|
|
2529
1682
|
};
|
|
2530
|
-
return /* @__PURE__ */ (0,
|
|
2531
|
-
label && /* @__PURE__ */ (0,
|
|
1683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(Box, { flexDirection: "column", gap: sizeStyles.fieldGap, children: [
|
|
1684
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2532
1685
|
Text,
|
|
2533
1686
|
{
|
|
2534
1687
|
color: theme.colors.content.secondary,
|
|
@@ -2537,7 +1690,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2537
1690
|
children: label
|
|
2538
1691
|
}
|
|
2539
1692
|
),
|
|
2540
|
-
/* @__PURE__ */ (0,
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
|
|
2541
1694
|
Box,
|
|
2542
1695
|
{
|
|
2543
1696
|
ref,
|
|
@@ -2545,7 +1698,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2545
1698
|
position: "relative"
|
|
2546
1699
|
},
|
|
2547
1700
|
children: [
|
|
2548
|
-
/* @__PURE__ */ (0,
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2549
1702
|
MultiSelectControl,
|
|
2550
1703
|
{
|
|
2551
1704
|
ref: controlRef,
|
|
@@ -2569,8 +1722,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2569
1722
|
extraClear
|
|
2570
1723
|
}
|
|
2571
1724
|
),
|
|
2572
|
-
isOpen && !isDisable && /* @__PURE__ */ (0,
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
1725
|
+
isOpen && !isDisable && /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(import_jsx_runtime393.Fragment, { children: [
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2574
1727
|
Box,
|
|
2575
1728
|
{
|
|
2576
1729
|
style: {
|
|
@@ -2585,7 +1738,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2585
1738
|
onPress: onClose
|
|
2586
1739
|
}
|
|
2587
1740
|
),
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2589
1742
|
Box,
|
|
2590
1743
|
{
|
|
2591
1744
|
ref: menuRef,
|
|
@@ -2609,7 +1762,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2609
1762
|
children: menuItems.map((item, _index) => {
|
|
2610
1763
|
const brandColors = theme.colors.control.brand.primary;
|
|
2611
1764
|
const contentColors = theme.colors.content;
|
|
2612
|
-
return /* @__PURE__ */ (0,
|
|
1765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2613
1766
|
Box,
|
|
2614
1767
|
{
|
|
2615
1768
|
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
@@ -2630,7 +1783,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2630
1783
|
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
2631
1784
|
opacity: item.disabled ? 0.5 : 1
|
|
2632
1785
|
},
|
|
2633
|
-
children: /* @__PURE__ */ (0,
|
|
1786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2634
1787
|
Text,
|
|
2635
1788
|
{
|
|
2636
1789
|
color: item.checked ? contentColors.on.brand : theme.colors.content.secondary,
|
|
@@ -2649,7 +1802,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2649
1802
|
]
|
|
2650
1803
|
}
|
|
2651
1804
|
),
|
|
2652
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1805
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2653
1806
|
Text,
|
|
2654
1807
|
{
|
|
2655
1808
|
color: theme.colors.content.alert.primary,
|