@matchain/matchid-sdk-react 0.1.15 → 0.1.16
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/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -43,6 +43,7 @@ type OverviewInfo = {
|
|
|
43
43
|
type ModalProps = PropsWithChildren & {
|
|
44
44
|
isOpen: boolean,
|
|
45
45
|
width?: number
|
|
46
|
+
className?: string
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
type ModalWithHeaderProps = ModalProps & {
|
|
@@ -61,6 +62,7 @@ type InputProps = {
|
|
|
61
62
|
readonly?: boolean
|
|
62
63
|
type?: string
|
|
63
64
|
maxLength?: number
|
|
65
|
+
className?: string
|
|
64
66
|
after?: React.ReactNode
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -159,19 +161,20 @@ declare const useMatch: () => MatchContextType;
|
|
|
159
161
|
|
|
160
162
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
161
163
|
|
|
162
|
-
declare function Field({ label, children, error, required }: {
|
|
164
|
+
declare function Field({ label, children, error, required, className }: {
|
|
163
165
|
label: ReactNode;
|
|
164
166
|
error?: ReactNode;
|
|
165
167
|
required?: boolean;
|
|
168
|
+
className?: string;
|
|
166
169
|
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
167
170
|
|
|
168
|
-
declare function Input({ onChange, type, after, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
169
172
|
|
|
170
173
|
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
171
174
|
|
|
172
175
|
declare function LoginBox({ methods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
173
176
|
|
|
174
|
-
declare function Modal({ children, isOpen, width }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
177
|
+
declare function Modal({ children, isOpen, width, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
175
178
|
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
176
179
|
|
|
177
180
|
declare function LoginButton({ loginRender, methods, onLoginClick, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ type OverviewInfo = {
|
|
|
43
43
|
type ModalProps = PropsWithChildren & {
|
|
44
44
|
isOpen: boolean,
|
|
45
45
|
width?: number
|
|
46
|
+
className?: string
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
type ModalWithHeaderProps = ModalProps & {
|
|
@@ -61,6 +62,7 @@ type InputProps = {
|
|
|
61
62
|
readonly?: boolean
|
|
62
63
|
type?: string
|
|
63
64
|
maxLength?: number
|
|
65
|
+
className?: string
|
|
64
66
|
after?: React.ReactNode
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -159,19 +161,20 @@ declare const useMatch: () => MatchContextType;
|
|
|
159
161
|
|
|
160
162
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
161
163
|
|
|
162
|
-
declare function Field({ label, children, error, required }: {
|
|
164
|
+
declare function Field({ label, children, error, required, className }: {
|
|
163
165
|
label: ReactNode;
|
|
164
166
|
error?: ReactNode;
|
|
165
167
|
required?: boolean;
|
|
168
|
+
className?: string;
|
|
166
169
|
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
167
170
|
|
|
168
|
-
declare function Input({ onChange, type, after, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
169
172
|
|
|
170
173
|
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
171
174
|
|
|
172
175
|
declare function LoginBox({ methods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
173
176
|
|
|
174
|
-
declare function Modal({ children, isOpen, width }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
177
|
+
declare function Modal({ children, isOpen, width, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
175
178
|
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
176
179
|
|
|
177
180
|
declare function LoginButton({ loginRender, methods, onLoginClick, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
package/dist/index.js
CHANGED
|
@@ -397,13 +397,14 @@ var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
|
397
397
|
function Modal({
|
|
398
398
|
children,
|
|
399
399
|
isOpen,
|
|
400
|
-
width = 480
|
|
400
|
+
width = 480,
|
|
401
|
+
className = ""
|
|
401
402
|
}) {
|
|
402
403
|
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
403
404
|
"div",
|
|
404
405
|
{
|
|
405
406
|
className: "matchid-overlay",
|
|
406
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className:
|
|
407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `matchid-modal ${className}`, style: {
|
|
407
408
|
width
|
|
408
409
|
}, children })
|
|
409
410
|
}
|
|
@@ -440,10 +441,11 @@ function Input({
|
|
|
440
441
|
onChange,
|
|
441
442
|
type,
|
|
442
443
|
after,
|
|
444
|
+
className = "",
|
|
443
445
|
...props
|
|
444
446
|
}) {
|
|
445
447
|
const [inputType, setInputType] = (0, import_react.useState)(type);
|
|
446
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `matchid-input-box ${props.value.length > 0 ? "matchid-input-has-content" : ""}`, children: [
|
|
448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `matchid-input-box ${props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`, children: [
|
|
447
449
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
448
450
|
props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DeleteRoundIcon, { onClick: (e) => {
|
|
449
451
|
if (onChange) {
|
|
@@ -463,9 +465,10 @@ function Field({
|
|
|
463
465
|
label,
|
|
464
466
|
children,
|
|
465
467
|
error,
|
|
466
|
-
required
|
|
468
|
+
required,
|
|
469
|
+
className = ""
|
|
467
470
|
}) {
|
|
468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className:
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
469
472
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "matchid-field-label", children: [
|
|
470
473
|
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
471
474
|
label
|