@matchain/matchid-sdk-react 0.1.48-alpha.10 → 0.1.48-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icon/index.d.mts +2 -11
- package/dist/assets/icon/index.d.ts +2 -11
- package/dist/assets/icon/index.js +2 -93
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +1 -9
- package/dist/{chunk-YGFOHQU6.mjs → chunk-6HRRPZPM.mjs} +2 -2
- package/dist/{chunk-LHNKZISB.mjs → chunk-A5D3NKTK.mjs} +4 -91
- package/dist/chunk-A5D3NKTK.mjs.map +1 -0
- package/dist/{chunk-2LRK5L4Z.mjs → chunk-D6IUBR7S.mjs} +446 -1442
- package/dist/chunk-D6IUBR7S.mjs.map +1 -0
- package/dist/{chunk-MXBUBTKR.mjs → chunk-LNSJ3ZXG.mjs} +5 -11
- package/dist/chunk-LNSJ3ZXG.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +448 -1689
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -12
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +185 -265
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +4 -5
- package/dist/hooks/index.d.mts +2 -3
- package/dist/hooks/index.d.ts +2 -3
- package/dist/hooks/index.js +171 -1563
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3 -12
- package/dist/index-BHVMQGZj.d.mts +173 -0
- package/dist/{index-BxPB2IQ2.d.ts → index-BIgM4fy0.d.mts} +8 -29
- package/dist/{index-NzZ-mfGZ.d.mts → index-BVatQlwF.d.mts} +2 -5
- package/dist/{index-DZ-eQkIA.d.mts → index-Bb7IkjUW.d.mts} +1 -1
- package/dist/{index-CE20hVl1.d.mts → index-BwD1ij0H.d.ts} +8 -29
- package/dist/{index-BQPieWF9.d.ts → index-C2-M-aBb.d.ts} +3 -4
- package/dist/{index-DAEvA2P4.d.ts → index-CGs_yTFg.d.ts} +4 -28
- package/dist/{index-C9s2Ea9O.d.ts → index-CKiK4KHj.d.ts} +1 -1
- package/dist/{index-BsmYcQQU.d.mts → index-DamklTOJ.d.mts} +3 -4
- package/dist/index-DgAnNnit.d.ts +173 -0
- package/dist/{index-BEwCPHZr.d.mts → index-M7ZB3yR5.d.mts} +4 -28
- package/dist/{index-88JSE0j2.d.ts → index-RfA22r-Z.d.ts} +2 -5
- package/dist/index.css +4 -468
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +1004 -2142
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -11
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-BZoVuUty.d.mts → types-DQq17lf4.d.mts} +33 -48
- package/dist/{types-BZoVuUty.d.ts → types-DQq17lf4.d.ts} +33 -48
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +62 -80
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/example/src/pages/Wallet/components/MatchWallet.tsx +10 -24
- package/package.json +1 -7
- package/dist/chunk-2LRK5L4Z.mjs.map +0 -1
- package/dist/chunk-5JHHHLG4.mjs +0 -136
- package/dist/chunk-5JHHHLG4.mjs.map +0 -1
- package/dist/chunk-LHNKZISB.mjs.map +0 -1
- package/dist/chunk-MXBUBTKR.mjs.map +0 -1
- package/dist/index-DIxrMLXq.d.ts +0 -3295
- package/dist/index-P71uc8y5.d.mts +0 -3295
- package/dist/utils/index.d.mts +0 -26
- package/dist/utils/index.d.ts +0 -26
- package/dist/utils/index.js +0 -181
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -30
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/{chunk-YGFOHQU6.mjs.map → chunk-6HRRPZPM.mjs.map} +0 -0
package/dist/ui/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function CloseRoundIcon({ size = 30, ...props }) {
|
|
|
72
72
|
|
|
73
73
|
// src/assets/icon/LoadingIcon.tsx
|
|
74
74
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
75
|
-
var LoadingIcon = ({ size = 22, className = "", color = "white"
|
|
75
|
+
var LoadingIcon = ({ size = 22, className = "", color = "white" }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
78
78
|
width: size,
|
|
@@ -80,7 +80,7 @@ var LoadingIcon = ({ size = 22, className = "", color = "white", rotate = false
|
|
|
80
80
|
viewBox: "0 0 22 22",
|
|
81
81
|
fill: "none",
|
|
82
82
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
-
className
|
|
83
|
+
className,
|
|
84
84
|
children: [
|
|
85
85
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M11 1V3.5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
86
86
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { opacity: "0.3", d: "M3.92834 3.92871L5.69977 5.70017", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -255,20 +255,8 @@ var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
|
255
255
|
// src/assets/icon/ErrorRoundIcon.tsx
|
|
256
256
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
257
257
|
|
|
258
|
-
// src/assets/icon/InfoLineIcon.tsx
|
|
259
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
260
|
-
|
|
261
|
-
// src/assets/icon/InfoRoundIcon.tsx
|
|
262
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
263
|
-
|
|
264
|
-
// src/assets/icon/TransferIcon.tsx
|
|
265
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
266
|
-
|
|
267
|
-
// src/assets/icon/ArrowSendIcon.tsx
|
|
268
|
-
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
269
|
-
|
|
270
258
|
// src/ui/Button/index.tsx
|
|
271
|
-
var
|
|
259
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
272
260
|
function Button({
|
|
273
261
|
size = "df",
|
|
274
262
|
disabled = false,
|
|
@@ -287,7 +275,7 @@ function Button({
|
|
|
287
275
|
onClick && onClick();
|
|
288
276
|
}
|
|
289
277
|
};
|
|
290
|
-
return /* @__PURE__ */ (0,
|
|
278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
291
279
|
"button",
|
|
292
280
|
{
|
|
293
281
|
type,
|
|
@@ -297,14 +285,14 @@ function Button({
|
|
|
297
285
|
...style
|
|
298
286
|
},
|
|
299
287
|
onClick: onAction,
|
|
300
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
288
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
301
289
|
}
|
|
302
290
|
);
|
|
303
291
|
}
|
|
304
292
|
|
|
305
293
|
// src/ui/Overlay/index.tsx
|
|
306
294
|
var import_react = require("react");
|
|
307
|
-
var
|
|
295
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
308
296
|
function Overlay({
|
|
309
297
|
isOpen = false,
|
|
310
298
|
children,
|
|
@@ -320,7 +308,7 @@ function Overlay({
|
|
|
320
308
|
document.body.style.overflow = "";
|
|
321
309
|
};
|
|
322
310
|
}, [isOpen]);
|
|
323
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
311
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
324
312
|
"div",
|
|
325
313
|
{
|
|
326
314
|
className: "matchid-overlay",
|
|
@@ -329,37 +317,33 @@ function Overlay({
|
|
|
329
317
|
},
|
|
330
318
|
children
|
|
331
319
|
}
|
|
332
|
-
) : /* @__PURE__ */ (0,
|
|
320
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {});
|
|
333
321
|
}
|
|
334
322
|
|
|
335
323
|
// src/ui/Drawer/index.tsx
|
|
336
|
-
var
|
|
324
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
337
325
|
function Drawer({
|
|
338
326
|
children,
|
|
339
327
|
showClose = true,
|
|
340
328
|
onClose,
|
|
341
329
|
isOpen = false,
|
|
342
330
|
title,
|
|
343
|
-
zIndex = 100
|
|
344
|
-
onBack
|
|
331
|
+
zIndex = 100
|
|
345
332
|
}) {
|
|
346
333
|
if (!isOpen) {
|
|
347
|
-
return /* @__PURE__ */ (0,
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {});
|
|
348
335
|
}
|
|
349
|
-
return /* @__PURE__ */ (0,
|
|
350
|
-
/* @__PURE__ */ (0,
|
|
351
|
-
/* @__PURE__ */ (0,
|
|
352
|
-
|
|
353
|
-
title
|
|
354
|
-
] }),
|
|
355
|
-
showClose && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "matchid-drawer", children: [
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: `matchid-drawer-header`, children: [
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: title }),
|
|
339
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
356
340
|
] }),
|
|
357
341
|
children
|
|
358
342
|
] }) });
|
|
359
343
|
}
|
|
360
344
|
|
|
361
345
|
// src/ui/Field/index.tsx
|
|
362
|
-
var
|
|
346
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
363
347
|
function Field({
|
|
364
348
|
label,
|
|
365
349
|
children,
|
|
@@ -367,13 +351,13 @@ function Field({
|
|
|
367
351
|
required,
|
|
368
352
|
className = ""
|
|
369
353
|
}) {
|
|
370
|
-
return /* @__PURE__ */ (0,
|
|
371
|
-
/* @__PURE__ */ (0,
|
|
372
|
-
required && /* @__PURE__ */ (0,
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "matchid-field-label", children: [
|
|
356
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
373
357
|
label
|
|
374
358
|
] }),
|
|
375
359
|
children,
|
|
376
|
-
error && /* @__PURE__ */ (0,
|
|
360
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "matchid-field-error", children: error })
|
|
377
361
|
] });
|
|
378
362
|
}
|
|
379
363
|
|
|
@@ -399,7 +383,7 @@ function useDownMd() {
|
|
|
399
383
|
}
|
|
400
384
|
|
|
401
385
|
// src/ui/Modal/index.tsx
|
|
402
|
-
var
|
|
386
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
403
387
|
function Modal({
|
|
404
388
|
children,
|
|
405
389
|
isOpen,
|
|
@@ -407,10 +391,10 @@ function Modal({
|
|
|
407
391
|
zIndex = 100,
|
|
408
392
|
className = ""
|
|
409
393
|
}) {
|
|
410
|
-
return /* @__PURE__ */ (0,
|
|
394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
411
395
|
width
|
|
412
396
|
}, children: [
|
|
413
|
-
/* @__PURE__ */ (0,
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
414
398
|
children
|
|
415
399
|
] }) });
|
|
416
400
|
}
|
|
@@ -424,20 +408,20 @@ function ModalWithHeader({
|
|
|
424
408
|
...props
|
|
425
409
|
}) {
|
|
426
410
|
const isDownMd = useDownMd();
|
|
427
|
-
return /* @__PURE__ */ (0,
|
|
428
|
-
/* @__PURE__ */ (0,
|
|
429
|
-
/* @__PURE__ */ (0,
|
|
430
|
-
onBack && /* @__PURE__ */ (0,
|
|
431
|
-
/* @__PURE__ */ (0,
|
|
411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Modal, { ...props, children: [
|
|
412
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
413
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
414
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
432
416
|
] }),
|
|
433
|
-
onClose && /* @__PURE__ */ (0,
|
|
417
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
434
418
|
] }),
|
|
435
419
|
children
|
|
436
420
|
] });
|
|
437
421
|
}
|
|
438
422
|
|
|
439
423
|
// src/ui/ModalDrawer/index.tsx
|
|
440
|
-
var
|
|
424
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
441
425
|
function ModalDrawer({
|
|
442
426
|
title,
|
|
443
427
|
drawerTitleVisible = true,
|
|
@@ -445,9 +429,9 @@ function ModalDrawer({
|
|
|
445
429
|
}) {
|
|
446
430
|
const isDownMd = useDownMd();
|
|
447
431
|
if (isDownMd) {
|
|
448
|
-
return /* @__PURE__ */ (0,
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModalWithHeader, { ...props, title });
|
|
449
433
|
}
|
|
450
|
-
return /* @__PURE__ */ (0,
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
451
435
|
}
|
|
452
436
|
|
|
453
437
|
// src/assets/img/confirm.gif
|
|
@@ -477,13 +461,12 @@ var matchlog = new Proxy(console, handler);
|
|
|
477
461
|
var matchlog_default = matchlog;
|
|
478
462
|
|
|
479
463
|
// src/ui/HashPanel/index.tsx
|
|
480
|
-
var
|
|
464
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
481
465
|
function HashPanel({
|
|
482
466
|
hash,
|
|
483
467
|
chain,
|
|
484
468
|
isOpen,
|
|
485
|
-
onClose
|
|
486
|
-
zIndex
|
|
469
|
+
onClose
|
|
487
470
|
}) {
|
|
488
471
|
const [status, setStatus] = (0, import_react3.useState)("confirm");
|
|
489
472
|
const statusMaps = {
|
|
@@ -549,14 +532,13 @@ function HashPanel({
|
|
|
549
532
|
}
|
|
550
533
|
);
|
|
551
534
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
552
|
-
return /* @__PURE__ */ (0,
|
|
535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
553
536
|
ModalDrawer,
|
|
554
537
|
{
|
|
555
538
|
isOpen,
|
|
556
539
|
showClose: true,
|
|
557
540
|
onClose,
|
|
558
|
-
|
|
559
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
541
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
560
542
|
"div",
|
|
561
543
|
{
|
|
562
544
|
className: "matchid-hashpanel-header",
|
|
@@ -566,29 +548,29 @@ function HashPanel({
|
|
|
566
548
|
children: statusValue.text
|
|
567
549
|
}
|
|
568
550
|
),
|
|
569
|
-
children: /* @__PURE__ */ (0,
|
|
570
|
-
/* @__PURE__ */ (0,
|
|
571
|
-
/* @__PURE__ */ (0,
|
|
551
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
572
554
|
color: statusValue.color
|
|
573
555
|
}, children: statusValue.text }),
|
|
574
|
-
/* @__PURE__ */ (0,
|
|
575
|
-
hash && /* @__PURE__ */ (0,
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
557
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
576
558
|
"Hash:",
|
|
577
|
-
/* @__PURE__ */ (0,
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
578
560
|
] })
|
|
579
561
|
] }),
|
|
580
|
-
/* @__PURE__ */ (0,
|
|
562
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
581
563
|
] })
|
|
582
564
|
}
|
|
583
565
|
);
|
|
584
566
|
}
|
|
585
567
|
function HashPanel_default(props) {
|
|
586
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
568
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(HashPanel, { ...props });
|
|
587
569
|
}
|
|
588
570
|
|
|
589
571
|
// src/ui/Input/index.tsx
|
|
590
572
|
var import_react4 = require("react");
|
|
591
|
-
var
|
|
573
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
592
574
|
function Input({
|
|
593
575
|
onChange,
|
|
594
576
|
type,
|
|
@@ -598,17 +580,17 @@ function Input({
|
|
|
598
580
|
}) {
|
|
599
581
|
const [inputType, setInputType] = (0, import_react4.useState)(type);
|
|
600
582
|
const isDownMd = useDownMd();
|
|
601
|
-
return /* @__PURE__ */ (0,
|
|
583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
602
584
|
"div",
|
|
603
585
|
{
|
|
604
586
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
605
587
|
children: [
|
|
606
|
-
/* @__PURE__ */ (0,
|
|
607
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
588
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
589
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
608
590
|
if (onChange) {
|
|
609
591
|
onChange({ target: { value: "" } });
|
|
610
592
|
}
|
|
611
|
-
}, children: /* @__PURE__ */ (0,
|
|
593
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
612
594
|
DeleteRoundIcon,
|
|
613
595
|
{
|
|
614
596
|
height: isDownMd ? 16 : 21,
|
|
@@ -616,9 +598,9 @@ function Input({
|
|
|
616
598
|
color: "var(--matchid-input-delete-icon-color)"
|
|
617
599
|
}
|
|
618
600
|
) }),
|
|
619
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
601
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
620
602
|
setInputType(inputType === "password" ? "text" : "password");
|
|
621
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
603
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
622
604
|
after
|
|
623
605
|
]
|
|
624
606
|
}
|
|
@@ -627,7 +609,7 @@ function Input({
|
|
|
627
609
|
|
|
628
610
|
// src/ui/Popover/index.tsx
|
|
629
611
|
var import_react5 = require("react");
|
|
630
|
-
var
|
|
612
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
631
613
|
function Popover({
|
|
632
614
|
children,
|
|
633
615
|
content,
|
|
@@ -637,7 +619,7 @@ function Popover({
|
|
|
637
619
|
gap = "20px"
|
|
638
620
|
}) {
|
|
639
621
|
const [active, setActive] = (0, import_react5.useState)(false);
|
|
640
|
-
return children && /* @__PURE__ */ (0,
|
|
622
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
641
623
|
"div",
|
|
642
624
|
{
|
|
643
625
|
onClick: () => {
|
|
@@ -648,16 +630,16 @@ function Popover({
|
|
|
648
630
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
649
631
|
children: [
|
|
650
632
|
children,
|
|
651
|
-
/* @__PURE__ */ (0,
|
|
633
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: {
|
|
652
634
|
paddingTop: gap
|
|
653
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
635
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
654
636
|
]
|
|
655
637
|
}
|
|
656
638
|
);
|
|
657
639
|
}
|
|
658
640
|
|
|
659
641
|
// src/ui/Switch/index.tsx
|
|
660
|
-
var
|
|
642
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
661
643
|
function Switch({
|
|
662
644
|
size = "default",
|
|
663
645
|
checked = false,
|
|
@@ -672,12 +654,12 @@ function Switch({
|
|
|
672
654
|
onChange && onChange(!checked);
|
|
673
655
|
}
|
|
674
656
|
};
|
|
675
|
-
return /* @__PURE__ */ (0,
|
|
657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { onClick, className: `matchid-switch matchid-switch-${size} ${checked ? "matchid-switch-checked" : ""} ${disabled ? "matchid-switch-disabled" : ""} ${loading ? "matchid-switch-loading" : ""}`, ...props, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
676
658
|
}
|
|
677
659
|
|
|
678
660
|
// src/ui/AlphaAvatar/index.tsx
|
|
679
661
|
var import_react6 = require("react");
|
|
680
|
-
var
|
|
662
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
681
663
|
function AlphaAvatar({
|
|
682
664
|
name,
|
|
683
665
|
size = "default",
|
|
@@ -694,7 +676,7 @@ function AlphaAvatar({
|
|
|
694
676
|
return "";
|
|
695
677
|
}, [name]);
|
|
696
678
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
697
|
-
return /* @__PURE__ */ (0,
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
698
680
|
width: numberSize,
|
|
699
681
|
height: numberSize,
|
|
700
682
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -703,7 +685,7 @@ function AlphaAvatar({
|
|
|
703
685
|
}
|
|
704
686
|
|
|
705
687
|
// src/ui/Radio/index.tsx
|
|
706
|
-
var
|
|
688
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
707
689
|
function Radio({
|
|
708
690
|
checked = false,
|
|
709
691
|
onChange,
|
|
@@ -712,13 +694,13 @@ function Radio({
|
|
|
712
694
|
className = "",
|
|
713
695
|
style = {}
|
|
714
696
|
}) {
|
|
715
|
-
return /* @__PURE__ */ (0,
|
|
697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
716
698
|
width: size,
|
|
717
699
|
height: size,
|
|
718
700
|
...style,
|
|
719
701
|
// @ts-ignore
|
|
720
702
|
"--matchid-radio-checked": color
|
|
721
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
703
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
722
704
|
width: Math.floor(size * 0.7),
|
|
723
705
|
height: Math.floor(size * 0.7)
|
|
724
706
|
} }) });
|