@matchain/matchid-sdk-react 0.1.29 → 0.1.30
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 +16 -6
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -12
- package/dist/index.mjs.map +1 -1
- package/example/src/App.tsx +20 -15
- package/example/src/components/Login/index.tsx +1 -1
- package/example/src/pages/User.tsx +2 -2
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -239,9 +239,14 @@ body {
|
|
|
239
239
|
padding:16px;
|
|
240
240
|
gap: 32px 16px;
|
|
241
241
|
grid-template-columns: repeat(5, 1fr);
|
|
242
|
-
|
|
242
|
+
|
|
243
|
+
@media screen and (max-width: 400px) {
|
|
243
244
|
grid-template-columns: repeat(4, 1fr);
|
|
244
245
|
}
|
|
246
|
+
|
|
247
|
+
@media screen and (max-width: 350px) {
|
|
248
|
+
grid-template-columns: repeat(3, 1fr);
|
|
249
|
+
}
|
|
245
250
|
.matchid-login-method-item{
|
|
246
251
|
cursor: pointer;
|
|
247
252
|
display: flex;
|
|
@@ -358,12 +363,14 @@ body {
|
|
|
358
363
|
width: 100%;
|
|
359
364
|
height: 72px;
|
|
360
365
|
padding-left: 24px;
|
|
366
|
+
padding-right: 24px;
|
|
361
367
|
border-radius: 12px;
|
|
362
368
|
border: 1px solid var(--matchid-input-border-color);
|
|
363
369
|
display: flex;
|
|
364
370
|
align-items: center;
|
|
365
371
|
justify-content: space-between;
|
|
366
372
|
background: var(--matchid-input-bg);
|
|
373
|
+
gap:24px;
|
|
367
374
|
}
|
|
368
375
|
|
|
369
376
|
.matchid-input-box:active, .matchid-input-box:focus, .matchid-input-box:focus-within {
|
|
@@ -374,8 +381,9 @@ body {
|
|
|
374
381
|
.matchid-input-delete-icon {
|
|
375
382
|
opacity: 0;
|
|
376
383
|
cursor: pointer;
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
width: 20px;
|
|
385
|
+
flex-shrink: 1;
|
|
386
|
+
|
|
379
387
|
}
|
|
380
388
|
|
|
381
389
|
.matchid-input-box:focus-within .matchid-input-delete-icon {
|
|
@@ -384,8 +392,10 @@ body {
|
|
|
384
392
|
|
|
385
393
|
.matchid-input-eye-icon {
|
|
386
394
|
cursor: pointer;
|
|
387
|
-
|
|
388
|
-
|
|
395
|
+
display: flex;
|
|
396
|
+
align-items: center;
|
|
397
|
+
width: 20px;
|
|
398
|
+
flex-shrink: 1;
|
|
389
399
|
}
|
|
390
400
|
|
|
391
401
|
.matchid-input-box.matchid-input-has-content {
|
|
@@ -400,7 +410,7 @@ body {
|
|
|
400
410
|
font-size: 18px;
|
|
401
411
|
font-weight: 600;
|
|
402
412
|
background: none;
|
|
403
|
-
|
|
413
|
+
min-width: 0;
|
|
404
414
|
}
|
|
405
415
|
|
|
406
416
|
.matchid-input-field::placeholder {
|
package/dist/index.js
CHANGED
|
@@ -729,18 +729,24 @@ function Input({
|
|
|
729
729
|
...props
|
|
730
730
|
}) {
|
|
731
731
|
const [inputType, setInputType] = (0, import_react.useState)(type);
|
|
732
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
733
|
+
"div",
|
|
734
|
+
{
|
|
735
|
+
className: `matchid-input-box ${props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
738
|
+
props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
739
|
+
if (onChange) {
|
|
740
|
+
onChange({ target: { value: "" } });
|
|
741
|
+
}
|
|
742
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DeleteRoundIcon, { className: "", color: "var(--matchid-input-delete-icon-color)" }) }),
|
|
743
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
744
|
+
setInputType(inputType === "password" ? "text" : "password");
|
|
745
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CloseEyeIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(OpenEyeIcon, {}) }),
|
|
746
|
+
after
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
);
|
|
744
750
|
}
|
|
745
751
|
|
|
746
752
|
// src/components/Field/index.tsx
|