@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/native/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-native/src/Box.tsx
|
|
41
41
|
var import_react_native = require("react-native");
|
|
@@ -238,41 +238,10 @@ var Text = ({
|
|
|
238
238
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
// ../primitives-native/src/Spinner.tsx
|
|
242
|
-
var import_react_native3 = require("react-native");
|
|
243
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
244
|
-
var Spinner = ({
|
|
245
|
-
color,
|
|
246
|
-
size,
|
|
247
|
-
role,
|
|
248
|
-
"aria-label": ariaLabel,
|
|
249
|
-
"aria-live": ariaLive,
|
|
250
|
-
testID
|
|
251
|
-
}) => {
|
|
252
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
253
|
-
import_react_native3.View,
|
|
254
|
-
{
|
|
255
|
-
accessible: true,
|
|
256
|
-
accessibilityRole: role === "status" ? "none" : void 0,
|
|
257
|
-
accessibilityLabel: ariaLabel,
|
|
258
|
-
accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
|
|
259
|
-
testID,
|
|
260
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
261
|
-
import_react_native3.ActivityIndicator,
|
|
262
|
-
{
|
|
263
|
-
color,
|
|
264
|
-
size: typeof size === "number" ? size : "small"
|
|
265
|
-
}
|
|
266
|
-
)
|
|
267
|
-
}
|
|
268
|
-
);
|
|
269
|
-
};
|
|
270
|
-
Spinner.displayName = "Spinner";
|
|
271
|
-
|
|
272
241
|
// ../primitives-native/src/Icon.tsx
|
|
273
242
|
var import_react = __toESM(require("react"));
|
|
274
|
-
var
|
|
275
|
-
var
|
|
243
|
+
var import_react_native3 = require("react-native");
|
|
244
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
276
245
|
var Icon = ({ children, color, size }) => {
|
|
277
246
|
const style = {
|
|
278
247
|
width: typeof size === "number" ? size : void 0,
|
|
@@ -290,235 +259,22 @@ var Icon = ({ children, color, size }) => {
|
|
|
290
259
|
}
|
|
291
260
|
return child;
|
|
292
261
|
});
|
|
293
|
-
return /* @__PURE__ */ (0,
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
// ../primitives-native/src/Divider.tsx
|
|
297
|
-
var import_react_native5 = require("react-native");
|
|
298
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
299
|
-
|
|
300
|
-
// ../primitives-native/src/Input.tsx
|
|
301
|
-
var import_react2 = require("react");
|
|
302
|
-
var import_react_native6 = require("react-native");
|
|
303
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
304
|
-
var keyboardTypeMap = {
|
|
305
|
-
text: "default",
|
|
306
|
-
number: "numeric",
|
|
307
|
-
email: "email-address",
|
|
308
|
-
tel: "phone-pad",
|
|
309
|
-
url: "url",
|
|
310
|
-
decimal: "decimal-pad"
|
|
262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style, children: childrenWithProps });
|
|
311
263
|
};
|
|
312
|
-
var inputModeToKeyboardType = {
|
|
313
|
-
none: "default",
|
|
314
|
-
text: "default",
|
|
315
|
-
decimal: "decimal-pad",
|
|
316
|
-
numeric: "number-pad",
|
|
317
|
-
tel: "phone-pad",
|
|
318
|
-
search: "default",
|
|
319
|
-
email: "email-address",
|
|
320
|
-
url: "url"
|
|
321
|
-
};
|
|
322
|
-
var autoCompleteToTextContentType = {
|
|
323
|
-
"one-time-code": "oneTimeCode",
|
|
324
|
-
email: "emailAddress",
|
|
325
|
-
username: "username",
|
|
326
|
-
password: "password",
|
|
327
|
-
"new-password": "newPassword",
|
|
328
|
-
tel: "telephoneNumber",
|
|
329
|
-
"postal-code": "postalCode",
|
|
330
|
-
name: "name"
|
|
331
|
-
};
|
|
332
|
-
var InputPrimitive = (0, import_react2.forwardRef)(
|
|
333
|
-
({
|
|
334
|
-
value,
|
|
335
|
-
placeholder,
|
|
336
|
-
onChange,
|
|
337
|
-
onChangeText,
|
|
338
|
-
onFocus,
|
|
339
|
-
onBlur,
|
|
340
|
-
onKeyDown,
|
|
341
|
-
disabled,
|
|
342
|
-
secureTextEntry,
|
|
343
|
-
style,
|
|
344
|
-
color,
|
|
345
|
-
fontSize,
|
|
346
|
-
placeholderTextColor,
|
|
347
|
-
maxLength,
|
|
348
|
-
type,
|
|
349
|
-
inputMode,
|
|
350
|
-
autoComplete,
|
|
351
|
-
id,
|
|
352
|
-
"aria-describedby": ariaDescribedBy,
|
|
353
|
-
"aria-label": ariaLabel,
|
|
354
|
-
"aria-disabled": ariaDisabled,
|
|
355
|
-
"data-testid": dataTestId
|
|
356
|
-
}, ref) => {
|
|
357
|
-
const handleChangeText = (text) => {
|
|
358
|
-
onChangeText?.(text);
|
|
359
|
-
if (onChange) {
|
|
360
|
-
const syntheticEvent = {
|
|
361
|
-
target: { value: text },
|
|
362
|
-
currentTarget: { value: text },
|
|
363
|
-
type: "change",
|
|
364
|
-
nativeEvent: { text },
|
|
365
|
-
preventDefault: () => {
|
|
366
|
-
},
|
|
367
|
-
stopPropagation: () => {
|
|
368
|
-
},
|
|
369
|
-
isTrusted: false
|
|
370
|
-
};
|
|
371
|
-
onChange(syntheticEvent);
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
|
|
375
|
-
const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
|
|
376
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
377
|
-
import_react_native6.TextInput,
|
|
378
|
-
{
|
|
379
|
-
ref,
|
|
380
|
-
value,
|
|
381
|
-
placeholder,
|
|
382
|
-
onChangeText: handleChangeText,
|
|
383
|
-
onFocus,
|
|
384
|
-
onBlur,
|
|
385
|
-
onKeyPress: (e) => {
|
|
386
|
-
if (onKeyDown) {
|
|
387
|
-
onKeyDown({
|
|
388
|
-
key: e.nativeEvent.key,
|
|
389
|
-
preventDefault: () => {
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
editable: !disabled,
|
|
395
|
-
secureTextEntry: secureTextEntry || type === "password",
|
|
396
|
-
keyboardType,
|
|
397
|
-
textContentType,
|
|
398
|
-
style: [
|
|
399
|
-
{
|
|
400
|
-
color,
|
|
401
|
-
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
402
|
-
flex: 1,
|
|
403
|
-
padding: 0,
|
|
404
|
-
textAlign: style?.textAlign || "left"
|
|
405
|
-
},
|
|
406
|
-
style
|
|
407
|
-
],
|
|
408
|
-
placeholderTextColor,
|
|
409
|
-
maxLength,
|
|
410
|
-
testID: dataTestId || id,
|
|
411
|
-
accessibilityLabel: ariaLabel,
|
|
412
|
-
accessibilityHint: ariaDescribedBy,
|
|
413
|
-
accessibilityState: {
|
|
414
|
-
disabled: disabled || ariaDisabled
|
|
415
|
-
},
|
|
416
|
-
accessible: true
|
|
417
|
-
}
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
InputPrimitive.displayName = "InputPrimitive";
|
|
422
|
-
|
|
423
|
-
// ../primitives-native/src/TextArea.tsx
|
|
424
|
-
var import_react3 = require("react");
|
|
425
|
-
var import_react_native7 = require("react-native");
|
|
426
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
427
|
-
var TextAreaPrimitive = (0, import_react3.forwardRef)(
|
|
428
|
-
({
|
|
429
|
-
value,
|
|
430
|
-
placeholder,
|
|
431
|
-
onChange,
|
|
432
|
-
onChangeText,
|
|
433
|
-
onFocus,
|
|
434
|
-
onBlur,
|
|
435
|
-
onKeyDown,
|
|
436
|
-
disabled,
|
|
437
|
-
style,
|
|
438
|
-
color,
|
|
439
|
-
fontSize,
|
|
440
|
-
placeholderTextColor,
|
|
441
|
-
maxLength,
|
|
442
|
-
rows,
|
|
443
|
-
id,
|
|
444
|
-
"aria-describedby": ariaDescribedBy,
|
|
445
|
-
"aria-label": ariaLabel,
|
|
446
|
-
"aria-disabled": ariaDisabled,
|
|
447
|
-
"data-testid": dataTestId
|
|
448
|
-
}, ref) => {
|
|
449
|
-
const handleChangeText = (text) => {
|
|
450
|
-
onChangeText?.(text);
|
|
451
|
-
if (onChange) {
|
|
452
|
-
const syntheticEvent = {
|
|
453
|
-
target: { value: text },
|
|
454
|
-
currentTarget: { value: text },
|
|
455
|
-
type: "change",
|
|
456
|
-
nativeEvent: { text },
|
|
457
|
-
preventDefault: () => {
|
|
458
|
-
},
|
|
459
|
-
stopPropagation: () => {
|
|
460
|
-
},
|
|
461
|
-
isTrusted: false
|
|
462
|
-
};
|
|
463
|
-
onChange(syntheticEvent);
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
467
|
-
import_react_native7.TextInput,
|
|
468
|
-
{
|
|
469
|
-
ref,
|
|
470
|
-
value,
|
|
471
|
-
placeholder,
|
|
472
|
-
onChangeText: handleChangeText,
|
|
473
|
-
onFocus,
|
|
474
|
-
onBlur,
|
|
475
|
-
onKeyPress: (e) => {
|
|
476
|
-
if (onKeyDown) {
|
|
477
|
-
onKeyDown({
|
|
478
|
-
key: e.nativeEvent.key,
|
|
479
|
-
preventDefault: () => {
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
editable: !disabled,
|
|
485
|
-
multiline: true,
|
|
486
|
-
numberOfLines: rows || 4,
|
|
487
|
-
style: [
|
|
488
|
-
{
|
|
489
|
-
color,
|
|
490
|
-
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
491
|
-
flex: 1,
|
|
492
|
-
padding: 0,
|
|
493
|
-
textAlignVertical: "top",
|
|
494
|
-
textAlign: style?.textAlign || "left"
|
|
495
|
-
},
|
|
496
|
-
style
|
|
497
|
-
],
|
|
498
|
-
placeholderTextColor,
|
|
499
|
-
maxLength,
|
|
500
|
-
testID: dataTestId || id,
|
|
501
|
-
accessibilityLabel: ariaLabel,
|
|
502
|
-
accessibilityHint: ariaDescribedBy,
|
|
503
|
-
accessibilityState: {
|
|
504
|
-
disabled: disabled || ariaDisabled
|
|
505
|
-
},
|
|
506
|
-
accessible: true
|
|
507
|
-
}
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
);
|
|
511
|
-
TextAreaPrimitive.displayName = "TextAreaPrimitive";
|
|
512
264
|
|
|
513
265
|
// src/MultiSelect.tsx
|
|
514
266
|
var import_xui_core4 = require("@xsolla/xui-core");
|
|
515
267
|
|
|
516
268
|
// src/MultiSelectControl.tsx
|
|
517
|
-
var
|
|
269
|
+
var import_react6 = require("react");
|
|
518
270
|
var import_xui_core3 = require("@xsolla/xui-core");
|
|
519
271
|
|
|
520
272
|
// ../icons-base/dist/web/index.mjs
|
|
521
273
|
var import_styled_components = __toESM(require("styled-components"), 1);
|
|
274
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
275
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
276
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
277
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
522
278
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
523
279
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
524
280
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -896,10 +652,6 @@ var import_jsx_runtime381 = require("react/jsx-runtime");
|
|
|
896
652
|
var import_jsx_runtime382 = require("react/jsx-runtime");
|
|
897
653
|
var import_jsx_runtime383 = require("react/jsx-runtime");
|
|
898
654
|
var import_jsx_runtime384 = require("react/jsx-runtime");
|
|
899
|
-
var import_jsx_runtime385 = require("react/jsx-runtime");
|
|
900
|
-
var import_jsx_runtime386 = require("react/jsx-runtime");
|
|
901
|
-
var import_jsx_runtime387 = require("react/jsx-runtime");
|
|
902
|
-
var import_jsx_runtime388 = require("react/jsx-runtime");
|
|
903
655
|
var StyledIcon = import_styled_components.default.div`
|
|
904
656
|
display: inline-flex;
|
|
905
657
|
align-items: center;
|
|
@@ -927,7 +679,7 @@ var BaseIcon = ({
|
|
|
927
679
|
}) => {
|
|
928
680
|
const svgContent = variant === "line" ? lineContent381 : solidContent381;
|
|
929
681
|
const sizeValue = typeof size === "number" ? `${size}px` : size;
|
|
930
|
-
return /* @__PURE__ */ (0,
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
931
683
|
StyledIcon,
|
|
932
684
|
{
|
|
933
685
|
$size: sizeValue,
|
|
@@ -944,61 +696,36 @@ var BaseIcon = ({
|
|
|
944
696
|
};
|
|
945
697
|
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>`;
|
|
946
698
|
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>`;
|
|
947
|
-
var ChevronDown = (props) => /* @__PURE__ */ (0,
|
|
699
|
+
var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BaseIcon, { ...props, solidContent: solidContent69, lineContent: lineContent69 });
|
|
948
700
|
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>`;
|
|
949
701
|
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>`;
|
|
950
|
-
var ChevronUp = (props) => /* @__PURE__ */ (0,
|
|
702
|
+
var ChevronUp = (props) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BaseIcon, { ...props, solidContent: solidContent78, lineContent: lineContent78 });
|
|
951
703
|
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>`;
|
|
952
704
|
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>`;
|
|
953
|
-
var ExclamationMarkCr = (props) => /* @__PURE__ */ (0,
|
|
705
|
+
var ExclamationMarkCr = (props) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BaseIcon, { ...props, solidContent: solidContent87, lineContent: lineContent87 });
|
|
954
706
|
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>`;
|
|
955
707
|
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>`;
|
|
956
|
-
var Remove = (props) => /* @__PURE__ */ (0,
|
|
708
|
+
var Remove = (props) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(BaseIcon, { ...props, solidContent: solidContent111, lineContent: lineContent111 });
|
|
957
709
|
|
|
958
710
|
// src/useMultiSelectControl.tsx
|
|
959
|
-
var
|
|
711
|
+
var import_react5 = require("react");
|
|
960
712
|
|
|
961
713
|
// ../tag/dist/web/index.mjs
|
|
962
|
-
var
|
|
963
|
-
var
|
|
964
|
-
var
|
|
965
|
-
var
|
|
966
|
-
var
|
|
967
|
-
var
|
|
968
|
-
var
|
|
969
|
-
var import_styled_components12 = __toESM(require("styled-components"), 1);
|
|
970
|
-
var import_jsx_runtime400 = require("react/jsx-runtime");
|
|
971
|
-
var import_styled_components13 = __toESM(require("styled-components"), 1);
|
|
972
|
-
var import_jsx_runtime401 = require("react/jsx-runtime");
|
|
973
|
-
var import_react10 = require("react");
|
|
974
|
-
var import_styled_components14 = __toESM(require("styled-components"), 1);
|
|
975
|
-
var import_jsx_runtime402 = require("react/jsx-runtime");
|
|
976
|
-
var import_react11 = require("react");
|
|
977
|
-
var import_styled_components15 = __toESM(require("styled-components"), 1);
|
|
978
|
-
var import_jsx_runtime403 = require("react/jsx-runtime");
|
|
714
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
715
|
+
var import_styled_components3 = __toESM(require("styled-components"), 1);
|
|
716
|
+
var import_jsx_runtime387 = require("react/jsx-runtime");
|
|
717
|
+
var import_styled_components4 = __toESM(require("styled-components"), 1);
|
|
718
|
+
var import_jsx_runtime388 = require("react/jsx-runtime");
|
|
719
|
+
var import_styled_components5 = __toESM(require("styled-components"), 1);
|
|
720
|
+
var import_jsx_runtime389 = require("react/jsx-runtime");
|
|
979
721
|
var import_xui_core = require("@xsolla/xui-core");
|
|
980
722
|
|
|
981
723
|
// ../icons/dist/web/index.mjs
|
|
982
|
-
var import_react6 = __toESM(require("react"), 1);
|
|
983
724
|
var import_styled_components2 = __toESM(require("styled-components"), 1);
|
|
984
|
-
var
|
|
985
|
-
var import_styled_components3 = __toESM(require("styled-components"), 1);
|
|
986
|
-
var import_jsx_runtime390 = require("react/jsx-runtime");
|
|
987
|
-
var import_styled_components4 = __toESM(require("styled-components"), 1);
|
|
988
|
-
var import_jsx_runtime391 = require("react/jsx-runtime");
|
|
989
|
-
var import_styled_components5 = __toESM(require("styled-components"), 1);
|
|
990
|
-
var import_jsx_runtime392 = require("react/jsx-runtime");
|
|
991
|
-
var import_styled_components6 = __toESM(require("styled-components"), 1);
|
|
992
|
-
var import_jsx_runtime393 = require("react/jsx-runtime");
|
|
993
|
-
var import_react7 = require("react");
|
|
994
|
-
var import_styled_components7 = __toESM(require("styled-components"), 1);
|
|
995
|
-
var import_jsx_runtime394 = require("react/jsx-runtime");
|
|
996
|
-
var import_react8 = require("react");
|
|
997
|
-
var import_styled_components8 = __toESM(require("styled-components"), 1);
|
|
998
|
-
var import_jsx_runtime395 = require("react/jsx-runtime");
|
|
725
|
+
var import_jsx_runtime385 = require("react/jsx-runtime");
|
|
999
726
|
|
|
1000
727
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1001
|
-
var
|
|
728
|
+
var import_react3 = require("react");
|
|
1002
729
|
|
|
1003
730
|
// ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1004
731
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -1007,7 +734,7 @@ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
|
1007
734
|
}).join(" ").trim();
|
|
1008
735
|
|
|
1009
736
|
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
|
1010
|
-
var
|
|
737
|
+
var import_react2 = require("react");
|
|
1011
738
|
|
|
1012
739
|
// ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1013
740
|
var defaultAttributes = {
|
|
@@ -1023,7 +750,7 @@ var defaultAttributes = {
|
|
|
1023
750
|
};
|
|
1024
751
|
|
|
1025
752
|
// ../../node_modules/lucide-react/dist/esm/Icon.js
|
|
1026
|
-
var Icon2 = (0,
|
|
753
|
+
var Icon2 = (0, import_react2.forwardRef)(
|
|
1027
754
|
({
|
|
1028
755
|
color = "currentColor",
|
|
1029
756
|
size = 24,
|
|
@@ -1034,7 +761,7 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1034
761
|
iconNode,
|
|
1035
762
|
...rest
|
|
1036
763
|
}, ref) => {
|
|
1037
|
-
return (0,
|
|
764
|
+
return (0, import_react2.createElement)(
|
|
1038
765
|
"svg",
|
|
1039
766
|
{
|
|
1040
767
|
ref,
|
|
@@ -1047,7 +774,7 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1047
774
|
...rest
|
|
1048
775
|
},
|
|
1049
776
|
[
|
|
1050
|
-
...iconNode.map(([tag, attrs]) => (0,
|
|
777
|
+
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
1051
778
|
...Array.isArray(children) ? children : [children]
|
|
1052
779
|
]
|
|
1053
780
|
);
|
|
@@ -1056,8 +783,8 @@ var Icon2 = (0, import_react4.forwardRef)(
|
|
|
1056
783
|
|
|
1057
784
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1058
785
|
var createLucideIcon = (iconName, iconNode) => {
|
|
1059
|
-
const Component = (0,
|
|
1060
|
-
({ className, ...props }, ref) => (0,
|
|
786
|
+
const Component = (0, import_react3.forwardRef)(
|
|
787
|
+
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon2, {
|
|
1061
788
|
ref,
|
|
1062
789
|
iconNode,
|
|
1063
790
|
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
@@ -1075,222 +802,8 @@ var X = createLucideIcon("X", [
|
|
|
1075
802
|
]);
|
|
1076
803
|
|
|
1077
804
|
// ../icons/dist/web/index.mjs
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1080
|
-
display: flex;
|
|
1081
|
-
box-sizing: border-box;
|
|
1082
|
-
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
1083
|
-
border-color: ${(props) => props.borderColor || "transparent"};
|
|
1084
|
-
border-width: ${(props) => typeof props.borderWidth === "number" ? `${props.borderWidth}px` : props.borderWidth || 0};
|
|
1085
|
-
|
|
1086
|
-
${(props) => props.borderBottomWidth !== void 0 && `
|
|
1087
|
-
border-bottom-width: ${typeof props.borderBottomWidth === "number" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};
|
|
1088
|
-
border-bottom-color: ${props.borderBottomColor || props.borderColor || "transparent"};
|
|
1089
|
-
border-bottom-style: solid;
|
|
1090
|
-
`}
|
|
1091
|
-
${(props) => props.borderTopWidth !== void 0 && `
|
|
1092
|
-
border-top-width: ${typeof props.borderTopWidth === "number" ? `${props.borderTopWidth}px` : props.borderTopWidth};
|
|
1093
|
-
border-top-color: ${props.borderTopColor || props.borderColor || "transparent"};
|
|
1094
|
-
border-top-style: solid;
|
|
1095
|
-
`}
|
|
1096
|
-
${(props) => props.borderLeftWidth !== void 0 && `
|
|
1097
|
-
border-left-width: ${typeof props.borderLeftWidth === "number" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};
|
|
1098
|
-
border-left-color: ${props.borderLeftColor || props.borderColor || "transparent"};
|
|
1099
|
-
border-left-style: solid;
|
|
1100
|
-
`}
|
|
1101
|
-
${(props) => props.borderRightWidth !== void 0 && `
|
|
1102
|
-
border-right-width: ${typeof props.borderRightWidth === "number" ? `${props.borderRightWidth}px` : props.borderRightWidth};
|
|
1103
|
-
border-right-color: ${props.borderRightColor || props.borderColor || "transparent"};
|
|
1104
|
-
border-right-style: solid;
|
|
1105
|
-
`}
|
|
1106
|
-
|
|
1107
|
-
border-style: ${(props) => props.borderStyle || (props.borderWidth || props.borderBottomWidth || props.borderTopWidth || props.borderLeftWidth || props.borderRightWidth ? "solid" : "none")};
|
|
1108
|
-
border-radius: ${(props) => typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius || 0};
|
|
1109
|
-
height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height || "auto"};
|
|
1110
|
-
width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
|
|
1111
|
-
min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
|
|
1112
|
-
min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
|
|
1113
|
-
|
|
1114
|
-
padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
|
|
1115
|
-
${(props) => props.paddingHorizontal && `
|
|
1116
|
-
padding-left: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
1117
|
-
padding-right: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
|
|
1118
|
-
`}
|
|
1119
|
-
${(props) => props.paddingVertical && `
|
|
1120
|
-
padding-top: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
1121
|
-
padding-bottom: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
|
|
1122
|
-
`}
|
|
1123
|
-
${(props) => props.paddingTop !== void 0 && `padding-top: ${typeof props.paddingTop === "number" ? `${props.paddingTop}px` : props.paddingTop};`}
|
|
1124
|
-
${(props) => props.paddingBottom !== void 0 && `padding-bottom: ${typeof props.paddingBottom === "number" ? `${props.paddingBottom}px` : props.paddingBottom};`}
|
|
1125
|
-
${(props) => props.paddingLeft !== void 0 && `padding-left: ${typeof props.paddingLeft === "number" ? `${props.paddingLeft}px` : props.paddingLeft};`}
|
|
1126
|
-
${(props) => props.paddingRight !== void 0 && `padding-right: ${typeof props.paddingRight === "number" ? `${props.paddingRight}px` : props.paddingRight};`}
|
|
1127
|
-
|
|
1128
|
-
margin: ${(props) => typeof props.margin === "number" ? `${props.margin}px` : props.margin || 0};
|
|
1129
|
-
${(props) => props.marginTop !== void 0 && `margin-top: ${typeof props.marginTop === "number" ? `${props.marginTop}px` : props.marginTop};`}
|
|
1130
|
-
${(props) => props.marginBottom !== void 0 && `margin-bottom: ${typeof props.marginBottom === "number" ? `${props.marginBottom}px` : props.marginBottom};`}
|
|
1131
|
-
${(props) => props.marginLeft !== void 0 && `margin-left: ${typeof props.marginLeft === "number" ? `${props.marginLeft}px` : props.marginLeft};`}
|
|
1132
|
-
${(props) => props.marginRight !== void 0 && `margin-right: ${typeof props.marginRight === "number" ? `${props.marginRight}px` : props.marginRight};`}
|
|
1133
|
-
|
|
1134
|
-
flex-direction: ${(props) => props.flexDirection || "column"};
|
|
1135
|
-
flex-wrap: ${(props) => props.flexWrap || "nowrap"};
|
|
1136
|
-
align-items: ${(props) => props.alignItems || "stretch"};
|
|
1137
|
-
justify-content: ${(props) => props.justifyContent || "flex-start"};
|
|
1138
|
-
cursor: ${(props) => props.cursor ? props.cursor : props.onClick || props.onPress ? "pointer" : "inherit"};
|
|
1139
|
-
position: ${(props) => props.position || "static"};
|
|
1140
|
-
top: ${(props) => typeof props.top === "number" ? `${props.top}px` : props.top};
|
|
1141
|
-
bottom: ${(props) => typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom};
|
|
1142
|
-
left: ${(props) => typeof props.left === "number" ? `${props.left}px` : props.left};
|
|
1143
|
-
right: ${(props) => typeof props.right === "number" ? `${props.right}px` : props.right};
|
|
1144
|
-
flex: ${(props) => props.flex};
|
|
1145
|
-
flex-shrink: ${(props) => props.flexShrink ?? 1};
|
|
1146
|
-
gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
|
|
1147
|
-
align-self: ${(props) => props.alignSelf || "auto"};
|
|
1148
|
-
overflow: ${(props) => props.overflow || "visible"};
|
|
1149
|
-
overflow-x: ${(props) => props.overflowX || "visible"};
|
|
1150
|
-
overflow-y: ${(props) => props.overflowY || "visible"};
|
|
1151
|
-
z-index: ${(props) => props.zIndex};
|
|
1152
|
-
opacity: ${(props) => props.disabled ? 0.5 : 1};
|
|
1153
|
-
pointer-events: ${(props) => props.disabled ? "none" : "auto"};
|
|
1154
|
-
|
|
1155
|
-
&:hover {
|
|
1156
|
-
${(props) => props.hoverStyle?.backgroundColor && `background-color: ${props.hoverStyle.backgroundColor};`}
|
|
1157
|
-
${(props) => props.hoverStyle?.borderColor && `border-color: ${props.hoverStyle.borderColor};`}
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
&:active {
|
|
1161
|
-
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
1162
|
-
}
|
|
1163
|
-
`;
|
|
1164
|
-
var Box2 = import_react6.default.forwardRef(
|
|
1165
|
-
({
|
|
1166
|
-
children,
|
|
1167
|
-
onPress,
|
|
1168
|
-
onKeyDown,
|
|
1169
|
-
onKeyUp,
|
|
1170
|
-
role,
|
|
1171
|
-
"aria-label": ariaLabel,
|
|
1172
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1173
|
-
"aria-current": ariaCurrent,
|
|
1174
|
-
"aria-disabled": ariaDisabled,
|
|
1175
|
-
"aria-live": ariaLive,
|
|
1176
|
-
"aria-busy": ariaBusy,
|
|
1177
|
-
"aria-describedby": ariaDescribedBy,
|
|
1178
|
-
"aria-expanded": ariaExpanded,
|
|
1179
|
-
"aria-haspopup": ariaHasPopup,
|
|
1180
|
-
"aria-pressed": ariaPressed,
|
|
1181
|
-
"aria-controls": ariaControls,
|
|
1182
|
-
tabIndex,
|
|
1183
|
-
as,
|
|
1184
|
-
src,
|
|
1185
|
-
alt,
|
|
1186
|
-
type,
|
|
1187
|
-
disabled,
|
|
1188
|
-
id,
|
|
1189
|
-
...props
|
|
1190
|
-
}, ref) => {
|
|
1191
|
-
if (as === "img" && src) {
|
|
1192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
|
|
1193
|
-
"img",
|
|
1194
|
-
{
|
|
1195
|
-
src,
|
|
1196
|
-
alt: alt || "",
|
|
1197
|
-
style: {
|
|
1198
|
-
display: "block",
|
|
1199
|
-
objectFit: "cover",
|
|
1200
|
-
width: typeof props.width === "number" ? `${props.width}px` : props.width,
|
|
1201
|
-
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
|
1202
|
-
borderRadius: typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius,
|
|
1203
|
-
position: props.position,
|
|
1204
|
-
top: typeof props.top === "number" ? `${props.top}px` : props.top,
|
|
1205
|
-
left: typeof props.left === "number" ? `${props.left}px` : props.left,
|
|
1206
|
-
right: typeof props.right === "number" ? `${props.right}px` : props.right,
|
|
1207
|
-
bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
);
|
|
1211
|
-
}
|
|
1212
|
-
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
|
|
1213
|
-
StyledBox,
|
|
1214
|
-
{
|
|
1215
|
-
ref,
|
|
1216
|
-
as,
|
|
1217
|
-
id,
|
|
1218
|
-
type: as === "button" ? type || "button" : void 0,
|
|
1219
|
-
disabled: as === "button" ? disabled : void 0,
|
|
1220
|
-
onClick: onPress,
|
|
1221
|
-
onKeyDown,
|
|
1222
|
-
onKeyUp,
|
|
1223
|
-
role,
|
|
1224
|
-
"aria-label": ariaLabel,
|
|
1225
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1226
|
-
"aria-current": ariaCurrent,
|
|
1227
|
-
"aria-disabled": ariaDisabled,
|
|
1228
|
-
"aria-busy": ariaBusy,
|
|
1229
|
-
"aria-describedby": ariaDescribedBy,
|
|
1230
|
-
"aria-expanded": ariaExpanded,
|
|
1231
|
-
"aria-haspopup": ariaHasPopup,
|
|
1232
|
-
"aria-pressed": ariaPressed,
|
|
1233
|
-
"aria-controls": ariaControls,
|
|
1234
|
-
"aria-live": ariaLive,
|
|
1235
|
-
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
1236
|
-
...props,
|
|
1237
|
-
children
|
|
1238
|
-
}
|
|
1239
|
-
);
|
|
1240
|
-
}
|
|
1241
|
-
);
|
|
1242
|
-
Box2.displayName = "Box";
|
|
1243
|
-
var StyledText = import_styled_components3.default.span`
|
|
1244
|
-
color: ${(props) => props.color || "inherit"};
|
|
1245
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1246
|
-
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
1247
|
-
font-family: ${(props) => props.fontFamily || '"Pilat Wide Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important'};
|
|
1248
|
-
line-height: ${(props) => typeof props.lineHeight === "number" ? `${props.lineHeight}px` : props.lineHeight || "inherit"};
|
|
1249
|
-
white-space: ${(props) => props.whiteSpace || "normal"};
|
|
1250
|
-
text-align: ${(props) => props.textAlign || "inherit"};
|
|
1251
|
-
text-decoration: ${(props) => props.textDecoration || "none"};
|
|
1252
|
-
`;
|
|
1253
|
-
var rotate = import_styled_components4.keyframes`
|
|
1254
|
-
from {
|
|
1255
|
-
transform: rotate(0deg);
|
|
1256
|
-
}
|
|
1257
|
-
to {
|
|
1258
|
-
transform: rotate(360deg);
|
|
1259
|
-
}
|
|
1260
|
-
`;
|
|
1261
|
-
var StyledSpinner = import_styled_components4.default.div`
|
|
1262
|
-
width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1263
|
-
height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1264
|
-
border: ${(props) => props.strokeWidth || 2}px solid
|
|
1265
|
-
${(props) => props.color || "currentColor"};
|
|
1266
|
-
border-bottom-color: transparent;
|
|
1267
|
-
border-radius: 50%;
|
|
1268
|
-
display: inline-block;
|
|
1269
|
-
box-sizing: border-box;
|
|
1270
|
-
animation: ${rotate} 1s linear infinite;
|
|
1271
|
-
`;
|
|
1272
|
-
var Spinner2 = ({
|
|
1273
|
-
role = "status",
|
|
1274
|
-
"aria-label": ariaLabel,
|
|
1275
|
-
"aria-live": ariaLive = "polite",
|
|
1276
|
-
"aria-describedby": ariaDescribedBy,
|
|
1277
|
-
testID,
|
|
1278
|
-
...props
|
|
1279
|
-
}) => {
|
|
1280
|
-
return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
1281
|
-
StyledSpinner,
|
|
1282
|
-
{
|
|
1283
|
-
role,
|
|
1284
|
-
"aria-label": ariaLabel,
|
|
1285
|
-
"aria-live": ariaLive,
|
|
1286
|
-
"aria-describedby": ariaDescribedBy,
|
|
1287
|
-
"data-testid": testID,
|
|
1288
|
-
...props
|
|
1289
|
-
}
|
|
1290
|
-
);
|
|
1291
|
-
};
|
|
1292
|
-
Spinner2.displayName = "Spinner";
|
|
1293
|
-
var StyledIcon2 = import_styled_components5.default.div`
|
|
805
|
+
var import_jsx_runtime386 = require("react/jsx-runtime");
|
|
806
|
+
var StyledIcon2 = import_styled_components2.default.div`
|
|
1294
807
|
display: flex;
|
|
1295
808
|
align-items: center;
|
|
1296
809
|
justify-content: center;
|
|
@@ -1306,183 +819,13 @@ var StyledIcon2 = import_styled_components5.default.div`
|
|
|
1306
819
|
}
|
|
1307
820
|
`;
|
|
1308
821
|
var Icon3 = ({ children, ...props }) => {
|
|
1309
|
-
return /* @__PURE__ */ (0,
|
|
822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(StyledIcon2, { ...props, children });
|
|
1310
823
|
};
|
|
1311
|
-
var
|
|
1312
|
-
background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1313
|
-
width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
|
|
1314
|
-
height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1315
|
-
|
|
1316
|
-
${(props) => props.dashStroke && `
|
|
1317
|
-
border-style: dashed;
|
|
1318
|
-
border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1319
|
-
border-width: 0;
|
|
1320
|
-
${props.vertical ? `
|
|
1321
|
-
border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
|
|
1322
|
-
height: 100%;
|
|
1323
|
-
` : `
|
|
1324
|
-
border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1325
|
-
width: 100%;
|
|
1326
|
-
`}
|
|
1327
|
-
`}
|
|
1328
|
-
`;
|
|
1329
|
-
var StyledInput = import_styled_components7.default.input`
|
|
1330
|
-
background: transparent;
|
|
1331
|
-
border: none;
|
|
1332
|
-
outline: none;
|
|
1333
|
-
width: 100%;
|
|
1334
|
-
height: 100%;
|
|
1335
|
-
padding: 0;
|
|
1336
|
-
margin: 0;
|
|
1337
|
-
color: ${(props) => props.color || "inherit"};
|
|
1338
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1339
|
-
font-family: inherit;
|
|
1340
|
-
text-align: inherit;
|
|
1341
|
-
|
|
1342
|
-
&::placeholder {
|
|
1343
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
&:disabled {
|
|
1347
|
-
cursor: not-allowed;
|
|
1348
|
-
}
|
|
1349
|
-
`;
|
|
1350
|
-
var InputPrimitive2 = (0, import_react7.forwardRef)(
|
|
1351
|
-
({
|
|
1352
|
-
value,
|
|
1353
|
-
placeholder,
|
|
1354
|
-
onChange,
|
|
1355
|
-
onChangeText,
|
|
1356
|
-
onFocus,
|
|
1357
|
-
onBlur,
|
|
1358
|
-
onKeyDown,
|
|
1359
|
-
disabled,
|
|
1360
|
-
secureTextEntry,
|
|
1361
|
-
style,
|
|
1362
|
-
color,
|
|
1363
|
-
fontSize,
|
|
1364
|
-
placeholderTextColor,
|
|
1365
|
-
maxLength,
|
|
1366
|
-
name,
|
|
1367
|
-
type,
|
|
1368
|
-
inputMode,
|
|
1369
|
-
autoComplete,
|
|
1370
|
-
id,
|
|
1371
|
-
"aria-invalid": ariaInvalid,
|
|
1372
|
-
"aria-describedby": ariaDescribedBy,
|
|
1373
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1374
|
-
"aria-label": ariaLabel,
|
|
1375
|
-
"aria-disabled": ariaDisabled,
|
|
1376
|
-
"data-testid": dataTestId,
|
|
1377
|
-
...rest
|
|
1378
|
-
}, ref) => {
|
|
1379
|
-
const handleChange = (e) => {
|
|
1380
|
-
if (onChange) {
|
|
1381
|
-
onChange(e);
|
|
1382
|
-
}
|
|
1383
|
-
if (onChangeText) {
|
|
1384
|
-
onChangeText(e.target.value);
|
|
1385
|
-
}
|
|
1386
|
-
};
|
|
1387
|
-
const inputValue = value !== void 0 ? value : "";
|
|
1388
|
-
return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
|
|
1389
|
-
StyledInput,
|
|
1390
|
-
{
|
|
1391
|
-
ref,
|
|
1392
|
-
id,
|
|
1393
|
-
value: inputValue,
|
|
1394
|
-
name,
|
|
1395
|
-
placeholder,
|
|
1396
|
-
onChange: handleChange,
|
|
1397
|
-
onFocus,
|
|
1398
|
-
onBlur,
|
|
1399
|
-
onKeyDown,
|
|
1400
|
-
disabled,
|
|
1401
|
-
type: secureTextEntry ? "password" : type || "text",
|
|
1402
|
-
inputMode,
|
|
1403
|
-
autoComplete,
|
|
1404
|
-
style,
|
|
1405
|
-
color,
|
|
1406
|
-
fontSize,
|
|
1407
|
-
placeholderTextColor,
|
|
1408
|
-
maxLength,
|
|
1409
|
-
"aria-invalid": ariaInvalid,
|
|
1410
|
-
"aria-describedby": ariaDescribedBy,
|
|
1411
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1412
|
-
"aria-label": ariaLabel,
|
|
1413
|
-
"aria-disabled": ariaDisabled,
|
|
1414
|
-
"data-testid": dataTestId,
|
|
1415
|
-
...rest
|
|
1416
|
-
}
|
|
1417
|
-
);
|
|
1418
|
-
}
|
|
1419
|
-
);
|
|
1420
|
-
InputPrimitive2.displayName = "InputPrimitive";
|
|
1421
|
-
var StyledTextArea = import_styled_components8.default.textarea`
|
|
1422
|
-
background: transparent;
|
|
1423
|
-
border: none;
|
|
1424
|
-
outline: none;
|
|
1425
|
-
width: 100%;
|
|
1426
|
-
height: 100%;
|
|
1427
|
-
padding: 0;
|
|
1428
|
-
margin: 0;
|
|
1429
|
-
color: ${(props) => props.color || "inherit"};
|
|
1430
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1431
|
-
font-family: inherit;
|
|
1432
|
-
text-align: inherit;
|
|
1433
|
-
resize: none;
|
|
1434
|
-
|
|
1435
|
-
&::placeholder {
|
|
1436
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
&:disabled {
|
|
1440
|
-
cursor: not-allowed;
|
|
1441
|
-
}
|
|
1442
|
-
`;
|
|
1443
|
-
var TextAreaPrimitive2 = (0, import_react8.forwardRef)(
|
|
1444
|
-
({
|
|
1445
|
-
value,
|
|
1446
|
-
placeholder,
|
|
1447
|
-
onChangeText,
|
|
1448
|
-
onFocus,
|
|
1449
|
-
onBlur,
|
|
1450
|
-
onKeyDown,
|
|
1451
|
-
disabled,
|
|
1452
|
-
style,
|
|
1453
|
-
color,
|
|
1454
|
-
fontSize,
|
|
1455
|
-
placeholderTextColor,
|
|
1456
|
-
maxLength,
|
|
1457
|
-
rows
|
|
1458
|
-
}, ref) => {
|
|
1459
|
-
return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
|
|
1460
|
-
StyledTextArea,
|
|
1461
|
-
{
|
|
1462
|
-
ref,
|
|
1463
|
-
value,
|
|
1464
|
-
placeholder,
|
|
1465
|
-
onChange: (e) => onChangeText?.(e.target.value),
|
|
1466
|
-
onFocus,
|
|
1467
|
-
onBlur,
|
|
1468
|
-
onKeyDown,
|
|
1469
|
-
disabled,
|
|
1470
|
-
style,
|
|
1471
|
-
color,
|
|
1472
|
-
fontSize,
|
|
1473
|
-
placeholderTextColor,
|
|
1474
|
-
maxLength,
|
|
1475
|
-
rows
|
|
1476
|
-
}
|
|
1477
|
-
);
|
|
1478
|
-
}
|
|
1479
|
-
);
|
|
1480
|
-
TextAreaPrimitive2.displayName = "TextAreaPrimitive";
|
|
1481
|
-
var X2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(Icon3, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(X, { size: "100%" }) });
|
|
824
|
+
var X2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(Icon3, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(X, { size: "100%" }) });
|
|
1482
825
|
|
|
1483
826
|
// ../tag/dist/web/index.mjs
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
827
|
+
var import_jsx_runtime390 = require("react/jsx-runtime");
|
|
828
|
+
var StyledBox = import_styled_components3.default.div`
|
|
1486
829
|
display: flex;
|
|
1487
830
|
box-sizing: border-box;
|
|
1488
831
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -1567,7 +910,7 @@ var StyledBox2 = import_styled_components9.default.div`
|
|
|
1567
910
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
1568
911
|
}
|
|
1569
912
|
`;
|
|
1570
|
-
var
|
|
913
|
+
var Box2 = import_react4.default.forwardRef(
|
|
1571
914
|
({
|
|
1572
915
|
children,
|
|
1573
916
|
onPress,
|
|
@@ -1595,7 +938,7 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1595
938
|
...props
|
|
1596
939
|
}, ref) => {
|
|
1597
940
|
if (as === "img" && src) {
|
|
1598
|
-
return /* @__PURE__ */ (0,
|
|
941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
|
|
1599
942
|
"img",
|
|
1600
943
|
{
|
|
1601
944
|
src,
|
|
@@ -1615,8 +958,8 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1615
958
|
}
|
|
1616
959
|
);
|
|
1617
960
|
}
|
|
1618
|
-
return /* @__PURE__ */ (0,
|
|
1619
|
-
|
|
961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
|
|
962
|
+
StyledBox,
|
|
1620
963
|
{
|
|
1621
964
|
ref,
|
|
1622
965
|
as,
|
|
@@ -1645,8 +988,8 @@ var Box3 = import_react9.default.forwardRef(
|
|
|
1645
988
|
);
|
|
1646
989
|
}
|
|
1647
990
|
);
|
|
1648
|
-
|
|
1649
|
-
var
|
|
991
|
+
Box2.displayName = "Box";
|
|
992
|
+
var StyledText = import_styled_components4.default.span`
|
|
1650
993
|
color: ${(props) => props.color || "inherit"};
|
|
1651
994
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1652
995
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -1663,8 +1006,8 @@ var Text2 = ({
|
|
|
1663
1006
|
role,
|
|
1664
1007
|
...props
|
|
1665
1008
|
}) => {
|
|
1666
|
-
return /* @__PURE__ */ (0,
|
|
1667
|
-
|
|
1009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
|
|
1010
|
+
StyledText,
|
|
1668
1011
|
{
|
|
1669
1012
|
...props,
|
|
1670
1013
|
style,
|
|
@@ -1674,47 +1017,7 @@ var Text2 = ({
|
|
|
1674
1017
|
}
|
|
1675
1018
|
);
|
|
1676
1019
|
};
|
|
1677
|
-
var
|
|
1678
|
-
from {
|
|
1679
|
-
transform: rotate(0deg);
|
|
1680
|
-
}
|
|
1681
|
-
to {
|
|
1682
|
-
transform: rotate(360deg);
|
|
1683
|
-
}
|
|
1684
|
-
`;
|
|
1685
|
-
var StyledSpinner2 = import_styled_components11.default.div`
|
|
1686
|
-
width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1687
|
-
height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
|
|
1688
|
-
border: ${(props) => props.strokeWidth || 2}px solid
|
|
1689
|
-
${(props) => props.color || "currentColor"};
|
|
1690
|
-
border-bottom-color: transparent;
|
|
1691
|
-
border-radius: 50%;
|
|
1692
|
-
display: inline-block;
|
|
1693
|
-
box-sizing: border-box;
|
|
1694
|
-
animation: ${rotate2} 1s linear infinite;
|
|
1695
|
-
`;
|
|
1696
|
-
var Spinner3 = ({
|
|
1697
|
-
role = "status",
|
|
1698
|
-
"aria-label": ariaLabel,
|
|
1699
|
-
"aria-live": ariaLive = "polite",
|
|
1700
|
-
"aria-describedby": ariaDescribedBy,
|
|
1701
|
-
testID,
|
|
1702
|
-
...props
|
|
1703
|
-
}) => {
|
|
1704
|
-
return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
|
|
1705
|
-
StyledSpinner2,
|
|
1706
|
-
{
|
|
1707
|
-
role,
|
|
1708
|
-
"aria-label": ariaLabel,
|
|
1709
|
-
"aria-live": ariaLive,
|
|
1710
|
-
"aria-describedby": ariaDescribedBy,
|
|
1711
|
-
"data-testid": testID,
|
|
1712
|
-
...props
|
|
1713
|
-
}
|
|
1714
|
-
);
|
|
1715
|
-
};
|
|
1716
|
-
Spinner3.displayName = "Spinner";
|
|
1717
|
-
var StyledIcon3 = import_styled_components12.default.div`
|
|
1020
|
+
var StyledIcon3 = import_styled_components5.default.div`
|
|
1718
1021
|
display: flex;
|
|
1719
1022
|
align-items: center;
|
|
1720
1023
|
justify-content: center;
|
|
@@ -1730,178 +1033,8 @@ var StyledIcon3 = import_styled_components12.default.div`
|
|
|
1730
1033
|
}
|
|
1731
1034
|
`;
|
|
1732
1035
|
var Icon4 = ({ children, ...props }) => {
|
|
1733
|
-
return /* @__PURE__ */ (0,
|
|
1036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(StyledIcon3, { ...props, children });
|
|
1734
1037
|
};
|
|
1735
|
-
var StyledDivider2 = import_styled_components13.default.div`
|
|
1736
|
-
background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1737
|
-
width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
|
|
1738
|
-
height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1739
|
-
|
|
1740
|
-
${(props) => props.dashStroke && `
|
|
1741
|
-
border-style: dashed;
|
|
1742
|
-
border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
|
|
1743
|
-
border-width: 0;
|
|
1744
|
-
${props.vertical ? `
|
|
1745
|
-
border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
|
|
1746
|
-
height: 100%;
|
|
1747
|
-
` : `
|
|
1748
|
-
border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
|
|
1749
|
-
width: 100%;
|
|
1750
|
-
`}
|
|
1751
|
-
`}
|
|
1752
|
-
`;
|
|
1753
|
-
var StyledInput2 = import_styled_components14.default.input`
|
|
1754
|
-
background: transparent;
|
|
1755
|
-
border: none;
|
|
1756
|
-
outline: none;
|
|
1757
|
-
width: 100%;
|
|
1758
|
-
height: 100%;
|
|
1759
|
-
padding: 0;
|
|
1760
|
-
margin: 0;
|
|
1761
|
-
color: ${(props) => props.color || "inherit"};
|
|
1762
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1763
|
-
font-family: inherit;
|
|
1764
|
-
text-align: inherit;
|
|
1765
|
-
|
|
1766
|
-
&::placeholder {
|
|
1767
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
&:disabled {
|
|
1771
|
-
cursor: not-allowed;
|
|
1772
|
-
}
|
|
1773
|
-
`;
|
|
1774
|
-
var InputPrimitive3 = (0, import_react10.forwardRef)(
|
|
1775
|
-
({
|
|
1776
|
-
value,
|
|
1777
|
-
placeholder,
|
|
1778
|
-
onChange,
|
|
1779
|
-
onChangeText,
|
|
1780
|
-
onFocus,
|
|
1781
|
-
onBlur,
|
|
1782
|
-
onKeyDown,
|
|
1783
|
-
disabled,
|
|
1784
|
-
secureTextEntry,
|
|
1785
|
-
style,
|
|
1786
|
-
color,
|
|
1787
|
-
fontSize,
|
|
1788
|
-
placeholderTextColor,
|
|
1789
|
-
maxLength,
|
|
1790
|
-
name,
|
|
1791
|
-
type,
|
|
1792
|
-
inputMode,
|
|
1793
|
-
autoComplete,
|
|
1794
|
-
id,
|
|
1795
|
-
"aria-invalid": ariaInvalid,
|
|
1796
|
-
"aria-describedby": ariaDescribedBy,
|
|
1797
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1798
|
-
"aria-label": ariaLabel,
|
|
1799
|
-
"aria-disabled": ariaDisabled,
|
|
1800
|
-
"data-testid": dataTestId,
|
|
1801
|
-
...rest
|
|
1802
|
-
}, ref) => {
|
|
1803
|
-
const handleChange = (e) => {
|
|
1804
|
-
if (onChange) {
|
|
1805
|
-
onChange(e);
|
|
1806
|
-
}
|
|
1807
|
-
if (onChangeText) {
|
|
1808
|
-
onChangeText(e.target.value);
|
|
1809
|
-
}
|
|
1810
|
-
};
|
|
1811
|
-
const inputValue = value !== void 0 ? value : "";
|
|
1812
|
-
return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
|
|
1813
|
-
StyledInput2,
|
|
1814
|
-
{
|
|
1815
|
-
ref,
|
|
1816
|
-
id,
|
|
1817
|
-
value: inputValue,
|
|
1818
|
-
name,
|
|
1819
|
-
placeholder,
|
|
1820
|
-
onChange: handleChange,
|
|
1821
|
-
onFocus,
|
|
1822
|
-
onBlur,
|
|
1823
|
-
onKeyDown,
|
|
1824
|
-
disabled,
|
|
1825
|
-
type: secureTextEntry ? "password" : type || "text",
|
|
1826
|
-
inputMode,
|
|
1827
|
-
autoComplete,
|
|
1828
|
-
style,
|
|
1829
|
-
color,
|
|
1830
|
-
fontSize,
|
|
1831
|
-
placeholderTextColor,
|
|
1832
|
-
maxLength,
|
|
1833
|
-
"aria-invalid": ariaInvalid,
|
|
1834
|
-
"aria-describedby": ariaDescribedBy,
|
|
1835
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1836
|
-
"aria-label": ariaLabel,
|
|
1837
|
-
"aria-disabled": ariaDisabled,
|
|
1838
|
-
"data-testid": dataTestId,
|
|
1839
|
-
...rest
|
|
1840
|
-
}
|
|
1841
|
-
);
|
|
1842
|
-
}
|
|
1843
|
-
);
|
|
1844
|
-
InputPrimitive3.displayName = "InputPrimitive";
|
|
1845
|
-
var StyledTextArea2 = import_styled_components15.default.textarea`
|
|
1846
|
-
background: transparent;
|
|
1847
|
-
border: none;
|
|
1848
|
-
outline: none;
|
|
1849
|
-
width: 100%;
|
|
1850
|
-
height: 100%;
|
|
1851
|
-
padding: 0;
|
|
1852
|
-
margin: 0;
|
|
1853
|
-
color: ${(props) => props.color || "inherit"};
|
|
1854
|
-
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
1855
|
-
font-family: inherit;
|
|
1856
|
-
text-align: inherit;
|
|
1857
|
-
resize: none;
|
|
1858
|
-
|
|
1859
|
-
&::placeholder {
|
|
1860
|
-
color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
&:disabled {
|
|
1864
|
-
cursor: not-allowed;
|
|
1865
|
-
}
|
|
1866
|
-
`;
|
|
1867
|
-
var TextAreaPrimitive3 = (0, import_react11.forwardRef)(
|
|
1868
|
-
({
|
|
1869
|
-
value,
|
|
1870
|
-
placeholder,
|
|
1871
|
-
onChangeText,
|
|
1872
|
-
onFocus,
|
|
1873
|
-
onBlur,
|
|
1874
|
-
onKeyDown,
|
|
1875
|
-
disabled,
|
|
1876
|
-
style,
|
|
1877
|
-
color,
|
|
1878
|
-
fontSize,
|
|
1879
|
-
placeholderTextColor,
|
|
1880
|
-
maxLength,
|
|
1881
|
-
rows
|
|
1882
|
-
}, ref) => {
|
|
1883
|
-
return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
|
|
1884
|
-
StyledTextArea2,
|
|
1885
|
-
{
|
|
1886
|
-
ref,
|
|
1887
|
-
value,
|
|
1888
|
-
placeholder,
|
|
1889
|
-
onChange: (e) => onChangeText?.(e.target.value),
|
|
1890
|
-
onFocus,
|
|
1891
|
-
onBlur,
|
|
1892
|
-
onKeyDown,
|
|
1893
|
-
disabled,
|
|
1894
|
-
style,
|
|
1895
|
-
color,
|
|
1896
|
-
fontSize,
|
|
1897
|
-
placeholderTextColor,
|
|
1898
|
-
maxLength,
|
|
1899
|
-
rows
|
|
1900
|
-
}
|
|
1901
|
-
);
|
|
1902
|
-
}
|
|
1903
|
-
);
|
|
1904
|
-
TextAreaPrimitive3.displayName = "TextAreaPrimitive";
|
|
1905
1038
|
var Tag = ({
|
|
1906
1039
|
size = "md",
|
|
1907
1040
|
tone = "primary",
|
|
@@ -1961,8 +1094,8 @@ var Tag = ({
|
|
|
1961
1094
|
}
|
|
1962
1095
|
};
|
|
1963
1096
|
const { bg, text } = resolveColors();
|
|
1964
|
-
return /* @__PURE__ */ (0,
|
|
1965
|
-
|
|
1097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(
|
|
1098
|
+
Box2,
|
|
1966
1099
|
{
|
|
1967
1100
|
backgroundColor: bg,
|
|
1968
1101
|
borderRadius: sizeStyles.radius,
|
|
@@ -1978,8 +1111,8 @@ var Tag = ({
|
|
|
1978
1111
|
whiteSpace: "nowrap"
|
|
1979
1112
|
},
|
|
1980
1113
|
children: [
|
|
1981
|
-
icon && /* @__PURE__ */ (0,
|
|
1982
|
-
/* @__PURE__ */ (0,
|
|
1114
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Icon4, { size: sizeStyles.iconSize, color: text, children: icon }),
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
|
|
1983
1116
|
Text2,
|
|
1984
1117
|
{
|
|
1985
1118
|
color: text,
|
|
@@ -1993,7 +1126,7 @@ var Tag = ({
|
|
|
1993
1126
|
children
|
|
1994
1127
|
}
|
|
1995
1128
|
),
|
|
1996
|
-
onRemove && /* @__PURE__ */ (0,
|
|
1129
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Box2, { onPress: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(X2, { size: sizeStyles.iconSize, color: text }) })
|
|
1997
1130
|
]
|
|
1998
1131
|
}
|
|
1999
1132
|
);
|
|
@@ -2001,7 +1134,7 @@ var Tag = ({
|
|
|
2001
1134
|
|
|
2002
1135
|
// src/useMultiSelectControl.tsx
|
|
2003
1136
|
var import_xui_core2 = require("@xsolla/xui-core");
|
|
2004
|
-
var
|
|
1137
|
+
var import_jsx_runtime391 = require("react/jsx-runtime");
|
|
2005
1138
|
var COUNT_ITEM_VALUE = "count-item";
|
|
2006
1139
|
var useMultiSelectControl = ({
|
|
2007
1140
|
variant,
|
|
@@ -2016,15 +1149,15 @@ var useMultiSelectControl = ({
|
|
|
2016
1149
|
containerRef
|
|
2017
1150
|
}) => {
|
|
2018
1151
|
const { theme } = (0, import_xui_core2.useDesignSystem)();
|
|
2019
|
-
const displayStateRef = (0,
|
|
2020
|
-
const savedWidthsRef = (0,
|
|
2021
|
-
const itemsRef = (0,
|
|
2022
|
-
const [itemsWidth, setItemsWidth] = (0,
|
|
2023
|
-
const [selectedContent, setSelectedContent] = (0,
|
|
1152
|
+
const displayStateRef = (0, import_react5.useRef)(0 /* Placeholder */);
|
|
1153
|
+
const savedWidthsRef = (0, import_react5.useRef)(null);
|
|
1154
|
+
const itemsRef = (0, import_react5.useRef)(null);
|
|
1155
|
+
const [itemsWidth, setItemsWidth] = (0, import_react5.useState)(0);
|
|
1156
|
+
const [selectedContent, setSelectedContent] = (0, import_react5.useState)(
|
|
2024
1157
|
null
|
|
2025
1158
|
);
|
|
2026
1159
|
const isPlaceholder = !selectedItems || selectedItems.length === 0;
|
|
2027
|
-
(0,
|
|
1160
|
+
(0, import_react5.useEffect)(() => {
|
|
2028
1161
|
if (!containerRef.current) return;
|
|
2029
1162
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
2030
1163
|
for (const entry of entries) {
|
|
@@ -2034,7 +1167,7 @@ var useMultiSelectControl = ({
|
|
|
2034
1167
|
resizeObserver.observe(containerRef.current);
|
|
2035
1168
|
return () => resizeObserver.disconnect();
|
|
2036
1169
|
}, [containerRef]);
|
|
2037
|
-
const widthsDependencies = (0,
|
|
1170
|
+
const widthsDependencies = (0, import_react5.useMemo)(
|
|
2038
1171
|
() => ({
|
|
2039
1172
|
stateList: stateList.map((item) => item.value),
|
|
2040
1173
|
variant,
|
|
@@ -2061,7 +1194,7 @@ var useMultiSelectControl = ({
|
|
|
2061
1194
|
};
|
|
2062
1195
|
const setPlaceholder = () => {
|
|
2063
1196
|
setSelectedContent(
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2065
1198
|
Text,
|
|
2066
1199
|
{
|
|
2067
1200
|
color: theme.colors.control.input.placeholder,
|
|
@@ -2112,7 +1245,7 @@ var useMultiSelectControl = ({
|
|
|
2112
1245
|
const isCount = item.value === COUNT_ITEM_VALUE;
|
|
2113
1246
|
const isReducable = index === 0 && displayStateRef.current === 3 /* Render */ && displayedItemsCount === 0 || flexible;
|
|
2114
1247
|
if (variant === "tag") {
|
|
2115
|
-
return /* @__PURE__ */ (0,
|
|
1248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2116
1249
|
Box,
|
|
2117
1250
|
{
|
|
2118
1251
|
onPress: !isCount ? (e) => {
|
|
@@ -2124,7 +1257,7 @@ var useMultiSelectControl = ({
|
|
|
2124
1257
|
opacity: disabled ? 0.5 : 1,
|
|
2125
1258
|
cursor: disabled || isCount ? "not-allowed" : "pointer"
|
|
2126
1259
|
},
|
|
2127
|
-
children: /* @__PURE__ */ (0,
|
|
1260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
|
|
2128
1261
|
Tag,
|
|
2129
1262
|
{
|
|
2130
1263
|
size,
|
|
@@ -2142,7 +1275,7 @@ var useMultiSelectControl = ({
|
|
|
2142
1275
|
}
|
|
2143
1276
|
const isCountItem = hasHidden;
|
|
2144
1277
|
const needsComma = index < displayedItems.length - 2 || index < displayedItems.length - 1 && !isCountItem;
|
|
2145
|
-
return /* @__PURE__ */ (0,
|
|
1278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
|
|
2146
1279
|
Text,
|
|
2147
1280
|
{
|
|
2148
1281
|
color: theme.colors.content.primary,
|
|
@@ -2192,7 +1325,7 @@ var useMultiSelectControl = ({
|
|
|
2192
1325
|
displayStateRef.current = 3 /* Render */;
|
|
2193
1326
|
setItemsRender();
|
|
2194
1327
|
};
|
|
2195
|
-
(0,
|
|
1328
|
+
(0, import_react5.useEffect)(() => {
|
|
2196
1329
|
if (isPlaceholder) {
|
|
2197
1330
|
displayStateRef.current = 0 /* Placeholder */;
|
|
2198
1331
|
setPlaceholder();
|
|
@@ -2226,7 +1359,7 @@ var useMultiSelectControl = ({
|
|
|
2226
1359
|
widthsDependencies,
|
|
2227
1360
|
stateList
|
|
2228
1361
|
]);
|
|
2229
|
-
(0,
|
|
1362
|
+
(0, import_react5.useEffect)(() => {
|
|
2230
1363
|
if (displayStateRef.current !== 2 /* Calculation */) return;
|
|
2231
1364
|
const rafId = requestAnimationFrame(() => {
|
|
2232
1365
|
if (displayStateRef.current === 2 /* Calculation */) {
|
|
@@ -2244,8 +1377,8 @@ var useMultiSelectControl = ({
|
|
|
2244
1377
|
};
|
|
2245
1378
|
|
|
2246
1379
|
// src/MultiSelectControl.tsx
|
|
2247
|
-
var
|
|
2248
|
-
var MultiSelectControl = (0,
|
|
1380
|
+
var import_jsx_runtime392 = require("react/jsx-runtime");
|
|
1381
|
+
var MultiSelectControl = (0, import_react6.forwardRef)(
|
|
2249
1382
|
({
|
|
2250
1383
|
variant = "tag",
|
|
2251
1384
|
flexible = true,
|
|
@@ -2271,7 +1404,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2271
1404
|
const inputColors = theme.colors.control.input;
|
|
2272
1405
|
const state = externalState || (disabled ? "disable" : "default");
|
|
2273
1406
|
const isDisable = state === "disable" || disabled;
|
|
2274
|
-
const containerRef = (0,
|
|
1407
|
+
const containerRef = (0, import_react6.useRef)(null);
|
|
2275
1408
|
const { itemsRef, selectedContent, isCalculating } = useMultiSelectControl({
|
|
2276
1409
|
variant,
|
|
2277
1410
|
flexible,
|
|
@@ -2307,7 +1440,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2307
1440
|
borderColor = inputColors.borderHover;
|
|
2308
1441
|
}
|
|
2309
1442
|
const iconColor = isDisable ? inputColors.textDisable : inputColors.placeholder;
|
|
2310
|
-
return /* @__PURE__ */ (0,
|
|
1443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
|
|
2311
1444
|
Box,
|
|
2312
1445
|
{
|
|
2313
1446
|
ref,
|
|
@@ -2335,7 +1468,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2335
1468
|
borderColor: inputColors.borderHover
|
|
2336
1469
|
} : void 0,
|
|
2337
1470
|
children: [
|
|
2338
|
-
/* @__PURE__ */ (0,
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
|
|
2339
1472
|
Box,
|
|
2340
1473
|
{
|
|
2341
1474
|
ref: containerRef,
|
|
@@ -2345,8 +1478,8 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2345
1478
|
gap: 8,
|
|
2346
1479
|
style: { minWidth: 0 },
|
|
2347
1480
|
children: [
|
|
2348
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
2349
|
-
/* @__PURE__ */ (0,
|
|
1481
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Icon, { size: sizeStyles.iconSize, color: iconColor, variant: "line", children: iconLeft }),
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2350
1483
|
Box,
|
|
2351
1484
|
{
|
|
2352
1485
|
ref: itemsRef,
|
|
@@ -2365,8 +1498,8 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2365
1498
|
]
|
|
2366
1499
|
}
|
|
2367
1500
|
),
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
extraClear && selectedItems.length > 0 && !isDisable && /* @__PURE__ */ (0,
|
|
1501
|
+
/* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: [
|
|
1502
|
+
extraClear && selectedItems.length > 0 && !isDisable && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2370
1503
|
Box,
|
|
2371
1504
|
{
|
|
2372
1505
|
onPress: (e) => {
|
|
@@ -2374,17 +1507,17 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2374
1507
|
removeAllValues();
|
|
2375
1508
|
},
|
|
2376
1509
|
style: { cursor: "pointer" },
|
|
2377
|
-
children: /* @__PURE__ */ (0,
|
|
1510
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(Remove, { size: 18, color: iconColor, variant: "line" })
|
|
2378
1511
|
}
|
|
2379
1512
|
),
|
|
2380
|
-
isError && /* @__PURE__ */ (0,
|
|
1513
|
+
isError && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
|
|
2381
1514
|
ExclamationMarkCr,
|
|
2382
1515
|
{
|
|
2383
1516
|
size: 18,
|
|
2384
1517
|
color: theme.colors.content.alert.primary
|
|
2385
1518
|
}
|
|
2386
1519
|
),
|
|
2387
|
-
iconRight ? iconRight : isOpen ? /* @__PURE__ */ (0,
|
|
1520
|
+
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 })
|
|
2388
1521
|
] })
|
|
2389
1522
|
]
|
|
2390
1523
|
}
|
|
@@ -2394,7 +1527,7 @@ var MultiSelectControl = (0, import_react13.forwardRef)(
|
|
|
2394
1527
|
MultiSelectControl.displayName = "MultiSelectControl";
|
|
2395
1528
|
|
|
2396
1529
|
// src/useMultiSelect.ts
|
|
2397
|
-
var
|
|
1530
|
+
var import_react7 = require("react");
|
|
2398
1531
|
var initialState = {
|
|
2399
1532
|
values: [],
|
|
2400
1533
|
selectedItems: [],
|
|
@@ -2405,12 +1538,12 @@ var useMultiSelect = ({
|
|
|
2405
1538
|
value = [],
|
|
2406
1539
|
onChange
|
|
2407
1540
|
}) => {
|
|
2408
|
-
const [state, setState] = (0,
|
|
2409
|
-
const optionsRef = (0,
|
|
2410
|
-
(0,
|
|
1541
|
+
const [state, setState] = (0, import_react7.useState)(initialState);
|
|
1542
|
+
const optionsRef = (0, import_react7.useRef)(options);
|
|
1543
|
+
(0, import_react7.useEffect)(() => {
|
|
2411
1544
|
optionsRef.current = options;
|
|
2412
1545
|
}, [options]);
|
|
2413
|
-
(0,
|
|
1546
|
+
(0, import_react7.useEffect)(() => {
|
|
2414
1547
|
const selectedItems = options.filter((opt) => value.includes(opt.value));
|
|
2415
1548
|
setState((prevState) => ({
|
|
2416
1549
|
...prevState,
|
|
@@ -2418,7 +1551,7 @@ var useMultiSelect = ({
|
|
|
2418
1551
|
selectedItems
|
|
2419
1552
|
}));
|
|
2420
1553
|
}, [options, value]);
|
|
2421
|
-
const onChoose = (0,
|
|
1554
|
+
const onChoose = (0, import_react7.useCallback)(
|
|
2422
1555
|
(selectedIds) => {
|
|
2423
1556
|
const newValues = optionsRef.current.filter((opt) => selectedIds.includes(String(opt.value))).map((opt) => opt.value);
|
|
2424
1557
|
const newSelectedItems = optionsRef.current.filter(
|
|
@@ -2433,7 +1566,7 @@ var useMultiSelect = ({
|
|
|
2433
1566
|
},
|
|
2434
1567
|
[onChange]
|
|
2435
1568
|
);
|
|
2436
|
-
const onRemove = (0,
|
|
1569
|
+
const onRemove = (0, import_react7.useCallback)(
|
|
2437
1570
|
(value2, event) => {
|
|
2438
1571
|
event?.stopPropagation();
|
|
2439
1572
|
setState((prev) => {
|
|
@@ -2451,7 +1584,7 @@ var useMultiSelect = ({
|
|
|
2451
1584
|
},
|
|
2452
1585
|
[onChange]
|
|
2453
1586
|
);
|
|
2454
|
-
const onRemoveAll = (0,
|
|
1587
|
+
const onRemoveAll = (0, import_react7.useCallback)(() => {
|
|
2455
1588
|
setState((prevState) => ({
|
|
2456
1589
|
...prevState,
|
|
2457
1590
|
values: [],
|
|
@@ -2459,13 +1592,13 @@ var useMultiSelect = ({
|
|
|
2459
1592
|
}));
|
|
2460
1593
|
onChange?.([]);
|
|
2461
1594
|
}, [onChange]);
|
|
2462
|
-
const onSelectClick = (0,
|
|
1595
|
+
const onSelectClick = (0, import_react7.useCallback)(() => {
|
|
2463
1596
|
setState((prevState) => ({
|
|
2464
1597
|
...prevState,
|
|
2465
1598
|
isOpen: !prevState.isOpen
|
|
2466
1599
|
}));
|
|
2467
1600
|
}, []);
|
|
2468
|
-
const onClose = (0,
|
|
1601
|
+
const onClose = (0, import_react7.useCallback)(() => {
|
|
2469
1602
|
setState((prevState) => ({
|
|
2470
1603
|
...prevState,
|
|
2471
1604
|
isOpen: false
|
|
@@ -2485,8 +1618,8 @@ var useMultiSelect = ({
|
|
|
2485
1618
|
};
|
|
2486
1619
|
|
|
2487
1620
|
// src/MultiSelect.tsx
|
|
2488
|
-
var
|
|
2489
|
-
var MultiSelect = (0,
|
|
1621
|
+
var import_jsx_runtime393 = require("react/jsx-runtime");
|
|
1622
|
+
var MultiSelect = (0, import_react8.forwardRef)(
|
|
2490
1623
|
({
|
|
2491
1624
|
options,
|
|
2492
1625
|
errorMessage,
|
|
@@ -2506,8 +1639,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2506
1639
|
maxHeight = 300
|
|
2507
1640
|
}, ref) => {
|
|
2508
1641
|
const { theme } = (0, import_xui_core4.useDesignSystem)();
|
|
2509
|
-
const controlRef = (0,
|
|
2510
|
-
const menuRef = (0,
|
|
1642
|
+
const controlRef = (0, import_react8.useRef)(null);
|
|
1643
|
+
const menuRef = (0, import_react8.useRef)(null);
|
|
2511
1644
|
const sizeStyles = theme.sizing.input(size);
|
|
2512
1645
|
const state = externalState || (disabled ? "disable" : "default");
|
|
2513
1646
|
const isDisable = state === "disable" || disabled;
|
|
@@ -2528,7 +1661,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2528
1661
|
value,
|
|
2529
1662
|
onChange
|
|
2530
1663
|
});
|
|
2531
|
-
(0,
|
|
1664
|
+
(0, import_react8.useEffect)(() => {
|
|
2532
1665
|
if (isDisable) {
|
|
2533
1666
|
onClose();
|
|
2534
1667
|
}
|
|
@@ -2549,8 +1682,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2549
1682
|
const newValues = checked ? [...values, value2] : values.filter((v) => v !== value2);
|
|
2550
1683
|
onChoose(newValues.map(String));
|
|
2551
1684
|
};
|
|
2552
|
-
return /* @__PURE__ */ (0,
|
|
2553
|
-
label && /* @__PURE__ */ (0,
|
|
1685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(Box, { flexDirection: "column", gap: sizeStyles.fieldGap, children: [
|
|
1686
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2554
1687
|
Text,
|
|
2555
1688
|
{
|
|
2556
1689
|
color: theme.colors.content.secondary,
|
|
@@ -2559,7 +1692,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2559
1692
|
children: label
|
|
2560
1693
|
}
|
|
2561
1694
|
),
|
|
2562
|
-
/* @__PURE__ */ (0,
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
|
|
2563
1696
|
Box,
|
|
2564
1697
|
{
|
|
2565
1698
|
ref,
|
|
@@ -2567,7 +1700,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2567
1700
|
position: "relative"
|
|
2568
1701
|
},
|
|
2569
1702
|
children: [
|
|
2570
|
-
/* @__PURE__ */ (0,
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2571
1704
|
MultiSelectControl,
|
|
2572
1705
|
{
|
|
2573
1706
|
ref: controlRef,
|
|
@@ -2591,8 +1724,8 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2591
1724
|
extraClear
|
|
2592
1725
|
}
|
|
2593
1726
|
),
|
|
2594
|
-
isOpen && !isDisable && /* @__PURE__ */ (0,
|
|
2595
|
-
/* @__PURE__ */ (0,
|
|
1727
|
+
isOpen && !isDisable && /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(import_jsx_runtime393.Fragment, { children: [
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2596
1729
|
Box,
|
|
2597
1730
|
{
|
|
2598
1731
|
style: {
|
|
@@ -2607,7 +1740,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2607
1740
|
onPress: onClose
|
|
2608
1741
|
}
|
|
2609
1742
|
),
|
|
2610
|
-
/* @__PURE__ */ (0,
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2611
1744
|
Box,
|
|
2612
1745
|
{
|
|
2613
1746
|
ref: menuRef,
|
|
@@ -2631,7 +1764,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2631
1764
|
children: menuItems.map((item, _index) => {
|
|
2632
1765
|
const brandColors = theme.colors.control.brand.primary;
|
|
2633
1766
|
const contentColors = theme.colors.content;
|
|
2634
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2635
1768
|
Box,
|
|
2636
1769
|
{
|
|
2637
1770
|
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
@@ -2652,7 +1785,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2652
1785
|
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
2653
1786
|
opacity: item.disabled ? 0.5 : 1
|
|
2654
1787
|
},
|
|
2655
|
-
children: /* @__PURE__ */ (0,
|
|
1788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2656
1789
|
Text,
|
|
2657
1790
|
{
|
|
2658
1791
|
color: item.checked ? contentColors.on.brand : theme.colors.content.secondary,
|
|
@@ -2671,7 +1804,7 @@ var MultiSelect = (0, import_react15.forwardRef)(
|
|
|
2671
1804
|
]
|
|
2672
1805
|
}
|
|
2673
1806
|
),
|
|
2674
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1807
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
|
|
2675
1808
|
Text,
|
|
2676
1809
|
{
|
|
2677
1810
|
color: theme.colors.content.alert.primary,
|