@matchain/matchid-sdk-react 0.1.53-alpha.7 → 0.1.53-alpha.9
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.js +35 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/{chunk-3USZ4ZZY.mjs → chunk-FKXS2XRG.mjs} +96 -2
- package/dist/chunk-FKXS2XRG.mjs.map +1 -0
- package/dist/{chunk-OCQ2AIM3.mjs → chunk-IZOOVZAD.mjs} +5 -5
- package/dist/chunk-IZOOVZAD.mjs.map +1 -0
- package/dist/{chunk-W7CCPGOT.mjs → chunk-NCVBLRAJ.mjs} +310 -123
- package/dist/chunk-NCVBLRAJ.mjs.map +1 -0
- package/dist/{chunk-AYMVU44P.mjs → chunk-X5HGL3ZX.mjs} +2 -2
- package/dist/components/index.js +625 -406
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -5
- package/dist/hooks/api/index.js +209 -92
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +5 -5
- package/dist/hooks/index.js +274 -256
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/index.css +9 -1
- package/dist/index.js +835 -524
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -10
- package/dist/ui/index.js +68 -65
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.js +4 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/example/package.json +3 -1
- package/example/src/pages/Contact/index.tsx +89 -3
- package/package.json +1 -1
- package/dist/assets/icon/index.d.mts +0 -147
- package/dist/assets/icon/index.d.ts +0 -147
- package/dist/chunk-3USZ4ZZY.mjs.map +0 -1
- package/dist/chunk-OCQ2AIM3.mjs.map +0 -1
- package/dist/chunk-W7CCPGOT.mjs.map +0 -1
- package/dist/components/index.d.mts +0 -6
- package/dist/components/index.d.ts +0 -6
- package/dist/config/chains/index.d.mts +0 -2
- package/dist/config/chains/index.d.ts +0 -2
- package/dist/hooks/api/index.d.mts +0 -5
- package/dist/hooks/api/index.d.ts +0 -5
- package/dist/hooks/index.d.mts +0 -10
- package/dist/hooks/index.d.ts +0 -10
- package/dist/index-BIvPr81B.d.ts +0 -160
- package/dist/index-BXNFULAw.d.mts +0 -117
- package/dist/index-BkWS_v10.d.mts +0 -3324
- package/dist/index-C2-EMz0t.d.ts +0 -78
- package/dist/index-CZHjwqDb.d.ts +0 -26
- package/dist/index-DDCyj-Fl.d.ts +0 -117
- package/dist/index-DKFnMFMm.d.mts +0 -78
- package/dist/index-DXRGMAbv.d.mts +0 -83
- package/dist/index-DXRGMAbv.d.ts +0 -83
- package/dist/index-DYkN9eDY.d.mts +0 -26
- package/dist/index-TVbqpk9T.d.mts +0 -160
- package/dist/index-TsJwrYwh.d.mts +0 -67
- package/dist/index-tFT-63LO.d.ts +0 -3324
- package/dist/index-uhLehOUk.d.ts +0 -67
- package/dist/index.d.mts +0 -38
- package/dist/index.d.ts +0 -38
- package/dist/types/index.d.mts +0 -3
- package/dist/types/index.d.ts +0 -3
- package/dist/types-i_ugbm5B.d.mts +0 -429
- package/dist/types-i_ugbm5B.d.ts +0 -429
- package/dist/ui/index.d.mts +0 -7
- package/dist/ui/index.d.ts +0 -7
- package/dist/utils/index.d.mts +0 -28
- package/dist/utils/index.d.ts +0 -28
- /package/dist/{chunk-AYMVU44P.mjs.map → chunk-X5HGL3ZX.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
chains_exports
|
|
3
|
+
} from "./chunk-3CR66BEX.mjs";
|
|
4
|
+
import {
|
|
5
|
+
types_exports
|
|
6
|
+
} from "./chunk-HBOS3RBL.mjs";
|
|
1
7
|
import {
|
|
2
8
|
MatchProvider,
|
|
3
9
|
ModalProvider,
|
|
@@ -6,26 +12,23 @@ import {
|
|
|
6
12
|
components_exports,
|
|
7
13
|
hooks_exports,
|
|
8
14
|
useMatch
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import
|
|
11
|
-
types_exports
|
|
12
|
-
} from "./chunk-HBOS3RBL.mjs";
|
|
15
|
+
} from "./chunk-NCVBLRAJ.mjs";
|
|
16
|
+
import "./chunk-JX73EY6V.mjs";
|
|
13
17
|
import "./chunk-UA6XHZHX.mjs";
|
|
18
|
+
import "./chunk-IZOOVZAD.mjs";
|
|
14
19
|
import {
|
|
15
20
|
ui_exports
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-OCQ2AIM3.mjs";
|
|
21
|
+
} from "./chunk-X5HGL3ZX.mjs";
|
|
18
22
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-JX73EY6V.mjs";
|
|
22
|
-
import "./chunk-3USZ4ZZY.mjs";
|
|
23
|
+
icon_exports
|
|
24
|
+
} from "./chunk-FKXS2XRG.mjs";
|
|
23
25
|
import "./chunk-J5LGTIGS.mjs";
|
|
24
26
|
export {
|
|
25
27
|
api_exports as Api,
|
|
26
28
|
chains_exports as Chains,
|
|
27
29
|
components_exports as Components,
|
|
28
30
|
hooks_exports as Hooks,
|
|
31
|
+
icon_exports as Icon,
|
|
29
32
|
MatchProvider,
|
|
30
33
|
ModalProvider,
|
|
31
34
|
ToastProvider,
|
package/dist/ui/index.js
CHANGED
|
@@ -272,8 +272,11 @@ var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
|
272
272
|
// src/assets/icon/PhantomIcon.tsx
|
|
273
273
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
274
274
|
|
|
275
|
-
// src/
|
|
275
|
+
// src/assets/icon/MoreIcon.tsx
|
|
276
276
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
277
|
+
|
|
278
|
+
// src/ui/Button/index.tsx
|
|
279
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
277
280
|
function Button({
|
|
278
281
|
size = "df",
|
|
279
282
|
disabled = false,
|
|
@@ -292,7 +295,7 @@ function Button({
|
|
|
292
295
|
onClick && onClick();
|
|
293
296
|
}
|
|
294
297
|
};
|
|
295
|
-
return /* @__PURE__ */ (0,
|
|
298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
296
299
|
"button",
|
|
297
300
|
{
|
|
298
301
|
type,
|
|
@@ -302,14 +305,14 @@ function Button({
|
|
|
302
305
|
...style
|
|
303
306
|
},
|
|
304
307
|
onClick: onAction,
|
|
305
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
308
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
306
309
|
}
|
|
307
310
|
);
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
// src/ui/Overlay/index.tsx
|
|
311
314
|
var import_react = require("react");
|
|
312
|
-
var
|
|
315
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
313
316
|
function Overlay({
|
|
314
317
|
isOpen = false,
|
|
315
318
|
children,
|
|
@@ -325,7 +328,7 @@ function Overlay({
|
|
|
325
328
|
document.body.style.overflow = "";
|
|
326
329
|
};
|
|
327
330
|
}, [isOpen]);
|
|
328
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
331
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
329
332
|
"div",
|
|
330
333
|
{
|
|
331
334
|
className: "matchid-overlay",
|
|
@@ -334,11 +337,11 @@ function Overlay({
|
|
|
334
337
|
},
|
|
335
338
|
children
|
|
336
339
|
}
|
|
337
|
-
) : /* @__PURE__ */ (0,
|
|
340
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, {});
|
|
338
341
|
}
|
|
339
342
|
|
|
340
343
|
// src/ui/Drawer/index.tsx
|
|
341
|
-
var
|
|
344
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
342
345
|
function Drawer({
|
|
343
346
|
children,
|
|
344
347
|
showClose = true,
|
|
@@ -349,22 +352,22 @@ function Drawer({
|
|
|
349
352
|
onBack
|
|
350
353
|
}) {
|
|
351
354
|
if (!isOpen) {
|
|
352
|
-
return /* @__PURE__ */ (0,
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, {});
|
|
353
356
|
}
|
|
354
|
-
return /* @__PURE__ */ (0,
|
|
355
|
-
/* @__PURE__ */ (0,
|
|
356
|
-
/* @__PURE__ */ (0,
|
|
357
|
-
onBack && /* @__PURE__ */ (0,
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "matchid-drawer", children: [
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
360
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
358
361
|
title
|
|
359
362
|
] }),
|
|
360
|
-
showClose && /* @__PURE__ */ (0,
|
|
363
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
361
364
|
] }),
|
|
362
365
|
children
|
|
363
366
|
] }) });
|
|
364
367
|
}
|
|
365
368
|
|
|
366
369
|
// src/ui/Field/index.tsx
|
|
367
|
-
var
|
|
370
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
368
371
|
function Field({
|
|
369
372
|
label,
|
|
370
373
|
children,
|
|
@@ -372,13 +375,13 @@ function Field({
|
|
|
372
375
|
required,
|
|
373
376
|
className = ""
|
|
374
377
|
}) {
|
|
375
|
-
return /* @__PURE__ */ (0,
|
|
376
|
-
/* @__PURE__ */ (0,
|
|
377
|
-
required && /* @__PURE__ */ (0,
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "matchid-field-label", children: [
|
|
380
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
378
381
|
label
|
|
379
382
|
] }),
|
|
380
383
|
children,
|
|
381
|
-
error && /* @__PURE__ */ (0,
|
|
384
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-field-error", children: error })
|
|
382
385
|
] });
|
|
383
386
|
}
|
|
384
387
|
|
|
@@ -402,7 +405,7 @@ function useDownMd() {
|
|
|
402
405
|
}
|
|
403
406
|
|
|
404
407
|
// src/ui/Modal/index.tsx
|
|
405
|
-
var
|
|
408
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
406
409
|
function Modal({
|
|
407
410
|
children,
|
|
408
411
|
isOpen,
|
|
@@ -410,10 +413,10 @@ function Modal({
|
|
|
410
413
|
zIndex = 100,
|
|
411
414
|
className = ""
|
|
412
415
|
}) {
|
|
413
|
-
return /* @__PURE__ */ (0,
|
|
416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
414
417
|
width
|
|
415
418
|
}, children: [
|
|
416
|
-
/* @__PURE__ */ (0,
|
|
419
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
417
420
|
children
|
|
418
421
|
] }) });
|
|
419
422
|
}
|
|
@@ -427,20 +430,20 @@ function ModalWithHeader({
|
|
|
427
430
|
...props
|
|
428
431
|
}) {
|
|
429
432
|
const isDownMd = useDownMd();
|
|
430
|
-
return /* @__PURE__ */ (0,
|
|
431
|
-
/* @__PURE__ */ (0,
|
|
432
|
-
/* @__PURE__ */ (0,
|
|
433
|
-
onBack && /* @__PURE__ */ (0,
|
|
434
|
-
/* @__PURE__ */ (0,
|
|
433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Modal, { ...props, children: [
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
436
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
435
438
|
] }),
|
|
436
|
-
onClose && /* @__PURE__ */ (0,
|
|
439
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
437
440
|
] }),
|
|
438
441
|
children
|
|
439
442
|
] });
|
|
440
443
|
}
|
|
441
444
|
|
|
442
445
|
// src/ui/ModalDrawer/index.tsx
|
|
443
|
-
var
|
|
446
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
444
447
|
function ModalDrawer({
|
|
445
448
|
title,
|
|
446
449
|
drawerTitleVisible = true,
|
|
@@ -448,9 +451,9 @@ function ModalDrawer({
|
|
|
448
451
|
}) {
|
|
449
452
|
const isDownMd = useDownMd();
|
|
450
453
|
if (isDownMd) {
|
|
451
|
-
return /* @__PURE__ */ (0,
|
|
454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalWithHeader, { ...props, title });
|
|
452
455
|
}
|
|
453
|
-
return /* @__PURE__ */ (0,
|
|
456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
454
457
|
}
|
|
455
458
|
|
|
456
459
|
// src/assets/img/confirm.gif
|
|
@@ -522,7 +525,7 @@ function useHash({
|
|
|
522
525
|
}
|
|
523
526
|
|
|
524
527
|
// src/ui/HashPanel/index.tsx
|
|
525
|
-
var
|
|
528
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
526
529
|
function HashPanel({
|
|
527
530
|
hash,
|
|
528
531
|
chain,
|
|
@@ -581,14 +584,14 @@ function HashPanel({
|
|
|
581
584
|
}
|
|
582
585
|
}, [hashQuery.data]);
|
|
583
586
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
584
|
-
return /* @__PURE__ */ (0,
|
|
587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
585
588
|
ModalDrawer,
|
|
586
589
|
{
|
|
587
590
|
isOpen,
|
|
588
591
|
showClose: true,
|
|
589
592
|
onClose,
|
|
590
593
|
zIndex,
|
|
591
|
-
title: /* @__PURE__ */ (0,
|
|
594
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
592
595
|
"div",
|
|
593
596
|
{
|
|
594
597
|
className: "matchid-hashpanel-header",
|
|
@@ -598,29 +601,29 @@ function HashPanel({
|
|
|
598
601
|
children: statusValue.text
|
|
599
602
|
}
|
|
600
603
|
),
|
|
601
|
-
children: /* @__PURE__ */ (0,
|
|
602
|
-
/* @__PURE__ */ (0,
|
|
603
|
-
/* @__PURE__ */ (0,
|
|
604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
606
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
604
607
|
color: statusValue.color
|
|
605
608
|
}, children: statusValue.text }),
|
|
606
|
-
/* @__PURE__ */ (0,
|
|
607
|
-
hash && /* @__PURE__ */ (0,
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
610
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
608
611
|
"Hash:",
|
|
609
|
-
/* @__PURE__ */ (0,
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
610
613
|
] })
|
|
611
614
|
] }),
|
|
612
|
-
/* @__PURE__ */ (0,
|
|
615
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
613
616
|
] })
|
|
614
617
|
}
|
|
615
618
|
);
|
|
616
619
|
}
|
|
617
620
|
function HashPanel_default(props) {
|
|
618
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
621
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(HashPanel, { ...props });
|
|
619
622
|
}
|
|
620
623
|
|
|
621
624
|
// src/ui/Input/index.tsx
|
|
622
625
|
var import_react4 = require("react");
|
|
623
|
-
var
|
|
626
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
624
627
|
function Input({
|
|
625
628
|
onChange,
|
|
626
629
|
type,
|
|
@@ -630,17 +633,17 @@ function Input({
|
|
|
630
633
|
}) {
|
|
631
634
|
const [inputType, setInputType] = (0, import_react4.useState)(type);
|
|
632
635
|
const isDownMd = useDownMd();
|
|
633
|
-
return /* @__PURE__ */ (0,
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
634
637
|
"div",
|
|
635
638
|
{
|
|
636
639
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
637
640
|
children: [
|
|
638
|
-
/* @__PURE__ */ (0,
|
|
639
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
642
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
640
643
|
if (onChange) {
|
|
641
644
|
onChange({ target: { value: "" } });
|
|
642
645
|
}
|
|
643
|
-
}, children: /* @__PURE__ */ (0,
|
|
646
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
644
647
|
DeleteRoundIcon,
|
|
645
648
|
{
|
|
646
649
|
height: isDownMd ? 16 : 21,
|
|
@@ -648,9 +651,9 @@ function Input({
|
|
|
648
651
|
color: "var(--matchid-input-delete-icon-color)"
|
|
649
652
|
}
|
|
650
653
|
) }),
|
|
651
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
654
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
652
655
|
setInputType(inputType === "password" ? "text" : "password");
|
|
653
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
656
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
654
657
|
after
|
|
655
658
|
]
|
|
656
659
|
}
|
|
@@ -659,7 +662,7 @@ function Input({
|
|
|
659
662
|
|
|
660
663
|
// src/ui/Popover/index.tsx
|
|
661
664
|
var import_react5 = require("react");
|
|
662
|
-
var
|
|
665
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
663
666
|
function Popover({
|
|
664
667
|
children,
|
|
665
668
|
content,
|
|
@@ -669,7 +672,7 @@ function Popover({
|
|
|
669
672
|
gap = "20px"
|
|
670
673
|
}) {
|
|
671
674
|
const [active, setActive] = (0, import_react5.useState)(false);
|
|
672
|
-
return children && /* @__PURE__ */ (0,
|
|
675
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
673
676
|
"div",
|
|
674
677
|
{
|
|
675
678
|
onClick: () => {
|
|
@@ -680,16 +683,16 @@ function Popover({
|
|
|
680
683
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
681
684
|
children: [
|
|
682
685
|
children,
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
|
|
684
687
|
paddingTop: gap
|
|
685
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
688
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
686
689
|
]
|
|
687
690
|
}
|
|
688
691
|
);
|
|
689
692
|
}
|
|
690
693
|
|
|
691
694
|
// src/ui/Switch/index.tsx
|
|
692
|
-
var
|
|
695
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
693
696
|
function Switch({
|
|
694
697
|
size = "default",
|
|
695
698
|
checked = false,
|
|
@@ -704,12 +707,12 @@ function Switch({
|
|
|
704
707
|
onChange && onChange(!checked);
|
|
705
708
|
}
|
|
706
709
|
};
|
|
707
|
-
return /* @__PURE__ */ (0,
|
|
710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.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_runtime60.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
708
711
|
}
|
|
709
712
|
|
|
710
713
|
// src/ui/AlphaAvatar/index.tsx
|
|
711
714
|
var import_react6 = require("react");
|
|
712
|
-
var
|
|
715
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
713
716
|
function AlphaAvatar({
|
|
714
717
|
name,
|
|
715
718
|
size = "default",
|
|
@@ -726,7 +729,7 @@ function AlphaAvatar({
|
|
|
726
729
|
return "";
|
|
727
730
|
}, [name]);
|
|
728
731
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
729
|
-
return /* @__PURE__ */ (0,
|
|
732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
730
733
|
width: numberSize,
|
|
731
734
|
height: numberSize,
|
|
732
735
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -735,7 +738,7 @@ function AlphaAvatar({
|
|
|
735
738
|
}
|
|
736
739
|
|
|
737
740
|
// src/ui/Radio/index.tsx
|
|
738
|
-
var
|
|
741
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
739
742
|
function Radio({
|
|
740
743
|
checked = false,
|
|
741
744
|
onChange,
|
|
@@ -744,20 +747,20 @@ function Radio({
|
|
|
744
747
|
className = "",
|
|
745
748
|
style = {}
|
|
746
749
|
}) {
|
|
747
|
-
return /* @__PURE__ */ (0,
|
|
750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
748
751
|
width: size,
|
|
749
752
|
height: size,
|
|
750
753
|
...style,
|
|
751
754
|
// @ts-ignore
|
|
752
755
|
"--matchid-radio-checked": color
|
|
753
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
756
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
754
757
|
width: Math.floor(size * 0.7),
|
|
755
758
|
height: Math.floor(size * 0.7)
|
|
756
759
|
} }) });
|
|
757
760
|
}
|
|
758
761
|
|
|
759
762
|
// src/ui/Skeleton/index.tsx
|
|
760
|
-
var
|
|
763
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
761
764
|
var Skeleton = ({
|
|
762
765
|
style = {},
|
|
763
766
|
className = "",
|
|
@@ -768,7 +771,7 @@ var Skeleton = ({
|
|
|
768
771
|
children
|
|
769
772
|
}) => {
|
|
770
773
|
if (!loading) {
|
|
771
|
-
return /* @__PURE__ */ (0,
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children });
|
|
772
775
|
}
|
|
773
776
|
const skeletonStyle = {
|
|
774
777
|
width,
|
|
@@ -776,7 +779,7 @@ var Skeleton = ({
|
|
|
776
779
|
borderRadius: radius,
|
|
777
780
|
...style
|
|
778
781
|
};
|
|
779
|
-
return /* @__PURE__ */ (0,
|
|
782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
780
783
|
"div",
|
|
781
784
|
{
|
|
782
785
|
className: "matchid-skeleton " + className,
|
|
@@ -787,10 +790,10 @@ var Skeleton = ({
|
|
|
787
790
|
var Skeleton_default = Skeleton;
|
|
788
791
|
|
|
789
792
|
// src/ui/Tabs/index.tsx
|
|
790
|
-
var
|
|
793
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
791
794
|
function Tabs(props) {
|
|
792
|
-
return /* @__PURE__ */ (0,
|
|
793
|
-
return /* @__PURE__ */ (0,
|
|
795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-tabs`, children: props.tabs.map((tab, index) => {
|
|
796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { onClick: () => props.setActiveTab(index), className: `matchid-tab ${props.activeTab === index ? "matchid-tab-active" : ""}`, children: tab }, index);
|
|
794
797
|
}) });
|
|
795
798
|
}
|
|
796
799
|
// Annotate the CommonJS export names for ESM import in node:
|