@matchain/matchid-sdk-react 0.1.45 → 0.1.46-alpha.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/dist/assets/icon/index.d.mts +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/chunk-CNQJUDKT.mjs +59 -0
- package/dist/chunk-CNQJUDKT.mjs.map +1 -0
- package/dist/chunk-EQ752DLJ.mjs +4511 -0
- package/dist/chunk-EQ752DLJ.mjs.map +1 -0
- package/dist/{chunk-R7Y4L7CG.mjs → chunk-H6M6OSVR.mjs} +70 -4555
- package/dist/chunk-H6M6OSVR.mjs.map +1 -0
- package/dist/{chunk-L5G34SC6.mjs → chunk-VY6Y6PLW.mjs} +2 -2
- package/dist/components/index.d.mts +3 -2
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +10 -10
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -8
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +10 -10
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -2
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +10 -10
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +4 -2
- package/dist/{index-CoTirILQ.d.ts → index-BMWq_SVq.d.ts} +1 -1
- package/dist/index-BXCdzLbc.d.mts +26 -0
- package/dist/{index-CWYElOA2.d.mts → index-C_XI1qNB.d.mts} +1 -1
- package/dist/index-CsHEukeG.d.ts +26 -0
- package/dist/{index-CTSg5TRS.d.ts → index-D9-2IgL1.d.ts} +3 -2
- package/dist/index-DSLYDlMJ.d.ts +40 -0
- package/dist/{index-DVlCrOjr.d.ts → index-DWOnfdeP.d.ts} +4 -24
- package/dist/{index-CFWR1boZ.d.ts → index-DhSoJs_L.d.ts} +1 -1
- package/dist/{index-D2pNP7Bz.d.mts → index-RT9tEHMs.d.mts} +1 -1
- package/dist/{index-DR2JTaoi.d.mts → index-a9wDsxOI.d.mts} +3 -2
- package/dist/index-bpGeBrps.d.mts +40 -0
- package/dist/{index-B0VpxAI2.d.mts → index-nqmU7njp.d.mts} +4 -24
- package/dist/index.css +69 -0
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +47 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CRumDe2M.d.mts → types-Cpmx3fld.d.mts} +5 -1
- package/dist/{types-CRumDe2M.d.ts → types-Cpmx3fld.d.ts} +5 -1
- package/dist/ui/index.d.mts +6 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +659 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +31 -0
- package/dist/ui/index.mjs.map +1 -0
- package/example/src/App.tsx +7 -0
- package/example/src/pages/UI/components/Switch.tsx +13 -0
- package/example/src/pages/UI/index.tsx +7 -0
- package/package.json +5 -1
- package/dist/chunk-R7Y4L7CG.mjs.map +0 -1
- /package/dist/{chunk-L5G34SC6.mjs.map → chunk-VY6Y6PLW.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { q as IconProps$1 } from '../../types-Cpmx3fld.mjs';
|
|
4
4
|
|
|
5
5
|
declare function BackIcon({ color, size, className, style }: {
|
|
6
6
|
color?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { q as IconProps$1 } from '../../types-Cpmx3fld.js';
|
|
4
4
|
|
|
5
5
|
declare function BackIcon({ color, size, className, style }: {
|
|
6
6
|
color?: string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Drawer,
|
|
4
|
+
Field,
|
|
5
|
+
HashPanel_default,
|
|
6
|
+
Input,
|
|
7
|
+
Modal,
|
|
8
|
+
ModalDrawer,
|
|
9
|
+
ModalWithHeader,
|
|
10
|
+
Overlay,
|
|
11
|
+
Popover
|
|
12
|
+
} from "./chunk-H6M6OSVR.mjs";
|
|
13
|
+
import {
|
|
14
|
+
LoadingIcon_default
|
|
15
|
+
} from "./chunk-DPXMCLYK.mjs";
|
|
16
|
+
import {
|
|
17
|
+
__export
|
|
18
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
19
|
+
|
|
20
|
+
// src/ui/index.ts
|
|
21
|
+
var ui_exports = {};
|
|
22
|
+
__export(ui_exports, {
|
|
23
|
+
Button: () => Button,
|
|
24
|
+
Drawer: () => Drawer,
|
|
25
|
+
Field: () => Field,
|
|
26
|
+
HashPanel: () => HashPanel_default,
|
|
27
|
+
Input: () => Input,
|
|
28
|
+
Modal: () => Modal,
|
|
29
|
+
ModalDrawer: () => ModalDrawer,
|
|
30
|
+
ModalWithHeader: () => ModalWithHeader,
|
|
31
|
+
Overlay: () => Overlay,
|
|
32
|
+
Popover: () => Popover,
|
|
33
|
+
Switch: () => Switch
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// src/ui/Switch/index.tsx
|
|
37
|
+
import { jsx } from "react/jsx-runtime";
|
|
38
|
+
function Switch({
|
|
39
|
+
size = "default",
|
|
40
|
+
checked = false,
|
|
41
|
+
loading = false,
|
|
42
|
+
onChange,
|
|
43
|
+
className,
|
|
44
|
+
disabled = false,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
const onClick = () => {
|
|
48
|
+
if (!disabled && !loading) {
|
|
49
|
+
onChange && onChange(!checked);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ 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__ */ jsx(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ jsx("div", { className: "matchid-switch-ball" }) });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
Switch,
|
|
57
|
+
ui_exports
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-CNQJUDKT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/index.ts","../src/ui/Switch/index.tsx"],"sourcesContent":["export { default as Button } from './Button';\nexport { default as Drawer } from './Drawer';\nexport { default as Field } from './Field';\nexport { default as HashPanel } from './HashPanel';\nexport { default as Input } from './Input';\nexport { default as Modal,ModalWithHeader } from './Modal';\nexport { default as ModalDrawer } from './ModalDrawer';\nexport { default as Overlay } from './Overlay';\nexport { default as Popover } from './Popover';\nexport { default as Switch } from './Switch';","import {UIProps} from \"../../types\";\nimport {LoadingIcon} from \"../../assets/icon\";\n\nexport default function Switch({\n size=\"default\",\n checked=false,\n loading=false,\n onChange,\n className,\n disabled=false,\n ...props\n }:{\n size?:\"default\"|\"sm\",\n checked?:boolean,\n loading?:boolean,\n disabled?:boolean,\n onChange?:(checked:boolean)=>void,\n}&UIProps){\n const onClick = ()=>{\n if(!disabled && !loading){\n onChange && onChange(!checked)\n }\n }\n return <div onClick={onClick} className={`matchid-switch matchid-switch-${size} ${checked ? \"matchid-switch-checked\":\"\"} ${disabled ? \"matchid-switch-disabled\":\"\"} ${loading ? \"matchid-switch-loading\":\"\"}`} {...props}>\n\n {\n loading ?\n <LoadingIcon className=\"matchid-switch-loading-icon\" size={size==\"default\"?24:18} color=\"var(--matchid-swicth-loading-color)\"/> :\n <div className={\"matchid-switch-ball\"}></div>\n }\n </div>\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2BgB;AAxBD,SAAR,OAAwB;AAAA,EAC3B,OAAK;AAAA,EACL,UAAQ;AAAA,EACR,UAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,WAAS;AAAA,EACT,GAAG;AACwB,GAMrB;AACN,QAAM,UAAU,MAAI;AAChB,QAAG,CAAC,YAAY,CAAC,SAAQ;AACrB,kBAAY,SAAS,CAAC,OAAO;AAAA,IACjC;AAAA,EACJ;AACA,SAAO,oBAAC,SAAI,SAAkB,WAAW,iCAAiC,IAAI,IAAI,UAAU,2BAAyB,EAAE,IAAI,WAAW,4BAA0B,EAAE,IAAI,UAAU,2BAAyB,EAAE,IAAK,GAAG,OAG3M,oBACI,oBAAC,uBAAY,WAAU,+BAA8B,MAAM,QAAM,YAAU,KAAG,IAAI,OAAM,uCAAqC,IAC7H,oBAAC,SAAI,WAAW,uBAAuB,GAEnD;AACJ;","names":[]}
|