@matchain/matchid-sdk-react 0.1.14 → 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.css +9 -1
- package/dist/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -362,13 +362,14 @@ import { Fragment, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
|
362
362
|
function Modal({
|
|
363
363
|
children,
|
|
364
364
|
isOpen,
|
|
365
|
-
width = 480
|
|
365
|
+
width = 480,
|
|
366
|
+
className = ""
|
|
366
367
|
}) {
|
|
367
368
|
return isOpen ? /* @__PURE__ */ jsx20(
|
|
368
369
|
"div",
|
|
369
370
|
{
|
|
370
371
|
className: "matchid-overlay",
|
|
371
|
-
children: /* @__PURE__ */ jsx20("div", { className:
|
|
372
|
+
children: /* @__PURE__ */ jsx20("div", { className: `matchid-modal ${className}`, style: {
|
|
372
373
|
width
|
|
373
374
|
}, children })
|
|
374
375
|
}
|
|
@@ -379,11 +380,12 @@ function ModalWithHeader({
|
|
|
379
380
|
onBack,
|
|
380
381
|
onClose,
|
|
381
382
|
title,
|
|
383
|
+
showBorder = true,
|
|
382
384
|
showClose = true,
|
|
383
385
|
...props
|
|
384
386
|
}) {
|
|
385
387
|
return /* @__PURE__ */ jsxs12(Modal, { ...props, children: [
|
|
386
|
-
/* @__PURE__ */ jsxs12("div", { className: `matchid-modal-header`, children: [
|
|
388
|
+
/* @__PURE__ */ jsxs12("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
387
389
|
/* @__PURE__ */ jsxs12("div", { className: "matchid-modal-header-content", children: [
|
|
388
390
|
onBack && /* @__PURE__ */ jsx20(ArrowLeftIcon, { className: "matchid-modal-header-back", onClick: onBack }),
|
|
389
391
|
/* @__PURE__ */ jsx20("span", { className: "matchid-modal-header-title", children: title })
|
|
@@ -404,10 +406,11 @@ function Input({
|
|
|
404
406
|
onChange,
|
|
405
407
|
type,
|
|
406
408
|
after,
|
|
409
|
+
className = "",
|
|
407
410
|
...props
|
|
408
411
|
}) {
|
|
409
412
|
const [inputType, setInputType] = useState(type);
|
|
410
|
-
return /* @__PURE__ */ jsxs13("div", { className: `matchid-input-box ${props.value.length > 0 ? "matchid-input-has-content" : ""}`, children: [
|
|
413
|
+
return /* @__PURE__ */ jsxs13("div", { className: `matchid-input-box ${props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`, children: [
|
|
411
414
|
/* @__PURE__ */ jsx21("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
412
415
|
props.value.length > 0 && /* @__PURE__ */ jsx21(DeleteRoundIcon, { onClick: (e) => {
|
|
413
416
|
if (onChange) {
|
|
@@ -426,10 +429,15 @@ import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
|
426
429
|
function Field({
|
|
427
430
|
label,
|
|
428
431
|
children,
|
|
429
|
-
error
|
|
432
|
+
error,
|
|
433
|
+
required,
|
|
434
|
+
className = ""
|
|
430
435
|
}) {
|
|
431
|
-
return /* @__PURE__ */ jsxs14("div", { className:
|
|
432
|
-
/* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ jsxs14("div", { className: `matchid-field-box ${className}`, children: [
|
|
437
|
+
/* @__PURE__ */ jsxs14("div", { className: "matchid-field-label", children: [
|
|
438
|
+
required && /* @__PURE__ */ jsx22("span", { className: "matchid-field-required", children: "*" }),
|
|
439
|
+
label
|
|
440
|
+
] }),
|
|
433
441
|
children,
|
|
434
442
|
error && /* @__PURE__ */ jsx22("div", { className: "matchid-field-error", children: error })
|
|
435
443
|
] });
|