@mw-kit/mw-ui 1.8.16 → 1.8.17
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.js +7 -10
- package/dist/index.mjs +8 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17297,9 +17297,11 @@ var CanvasContainer = import_styled_components72.default.div`
|
|
|
17297
17297
|
font-size: 59px;
|
|
17298
17298
|
line-height: 71px;
|
|
17299
17299
|
opacity: 0.1;
|
|
17300
|
+
z-index: 1;
|
|
17300
17301
|
}
|
|
17301
17302
|
|
|
17302
17303
|
canvas {
|
|
17304
|
+
position: relative;
|
|
17303
17305
|
display: block;
|
|
17304
17306
|
width: 100%;
|
|
17305
17307
|
height: 100%;
|
|
@@ -17307,6 +17309,7 @@ var CanvasContainer = import_styled_components72.default.div`
|
|
|
17307
17309
|
border: 1px solid
|
|
17308
17310
|
${({ theme: theme4, $invalid: invalid }) => theme4.colors[invalid ? "warningRed" : "lightGrey"]};
|
|
17309
17311
|
border-radius: 4px;
|
|
17312
|
+
z-index: 2;
|
|
17310
17313
|
}
|
|
17311
17314
|
|
|
17312
17315
|
/* icons container */
|
|
@@ -17316,6 +17319,7 @@ var CanvasContainer = import_styled_components72.default.div`
|
|
|
17316
17319
|
right: ${({ theme: theme4 }) => theme4.spacings.s3};
|
|
17317
17320
|
display: flex;
|
|
17318
17321
|
gap: ${({ theme: theme4 }) => theme4.spacings.s1};
|
|
17322
|
+
z-index: 3;
|
|
17319
17323
|
|
|
17320
17324
|
> button {
|
|
17321
17325
|
padding: 0;
|
|
@@ -17434,6 +17438,7 @@ var SignatureInput = ({
|
|
|
17434
17438
|
ref.clear();
|
|
17435
17439
|
setValue("");
|
|
17436
17440
|
}, [ref]);
|
|
17441
|
+
const empty = (0, import_react62.useMemo)(() => !value && (!ref || ref.isEmpty()), [ref, value]);
|
|
17437
17442
|
return /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(Container26, { children: [
|
|
17438
17443
|
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
|
|
17439
17444
|
Input_default,
|
|
@@ -17491,20 +17496,12 @@ var SignatureInput = ({
|
|
|
17491
17496
|
if (!ref || ref.isEmpty()) return;
|
|
17492
17497
|
setValue(ref.getTrimmedCanvas().toDataURL("image/png"));
|
|
17493
17498
|
},
|
|
17494
|
-
disabled:
|
|
17499
|
+
disabled: empty,
|
|
17495
17500
|
title: "Recortar",
|
|
17496
17501
|
children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(Icon_default, { type: "semantic", icon: "cut" })
|
|
17497
17502
|
}
|
|
17498
17503
|
),
|
|
17499
|
-
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
|
|
17500
|
-
"button",
|
|
17501
|
-
{
|
|
17502
|
-
onClick: onClearHandler,
|
|
17503
|
-
disabled: !ref || ref.isEmpty(),
|
|
17504
|
-
title: "Limpar",
|
|
17505
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(Icon_default, { type: "semantic", icon: "eraser" })
|
|
17506
|
-
}
|
|
17507
|
-
)
|
|
17504
|
+
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)("button", { onClick: onClearHandler, disabled: empty, title: "Limpar", children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(Icon_default, { type: "semantic", icon: "eraser" }) })
|
|
17508
17505
|
] }),
|
|
17509
17506
|
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
|
|
17510
17507
|
import_react_signature_canvas.default,
|
package/dist/index.mjs
CHANGED
|
@@ -17201,7 +17201,7 @@ var ProgressBar = ({ type, value, ...props }) => {
|
|
|
17201
17201
|
var ProgressBar_default = ProgressBar;
|
|
17202
17202
|
|
|
17203
17203
|
// src/components/Signature/index.tsx
|
|
17204
|
-
import { useCallback as useCallback5, useEffect as useEffect21, useState as useState24 } from "react";
|
|
17204
|
+
import { useCallback as useCallback5, useEffect as useEffect21, useMemo as useMemo2, useState as useState24 } from "react";
|
|
17205
17205
|
import SignatureCanvas from "react-signature-canvas";
|
|
17206
17206
|
|
|
17207
17207
|
// src/components/Signature/styles.ts
|
|
@@ -17233,9 +17233,11 @@ var CanvasContainer = styled69.div`
|
|
|
17233
17233
|
font-size: 59px;
|
|
17234
17234
|
line-height: 71px;
|
|
17235
17235
|
opacity: 0.1;
|
|
17236
|
+
z-index: 1;
|
|
17236
17237
|
}
|
|
17237
17238
|
|
|
17238
17239
|
canvas {
|
|
17240
|
+
position: relative;
|
|
17239
17241
|
display: block;
|
|
17240
17242
|
width: 100%;
|
|
17241
17243
|
height: 100%;
|
|
@@ -17243,6 +17245,7 @@ var CanvasContainer = styled69.div`
|
|
|
17243
17245
|
border: 1px solid
|
|
17244
17246
|
${({ theme: theme4, $invalid: invalid }) => theme4.colors[invalid ? "warningRed" : "lightGrey"]};
|
|
17245
17247
|
border-radius: 4px;
|
|
17248
|
+
z-index: 2;
|
|
17246
17249
|
}
|
|
17247
17250
|
|
|
17248
17251
|
/* icons container */
|
|
@@ -17252,6 +17255,7 @@ var CanvasContainer = styled69.div`
|
|
|
17252
17255
|
right: ${({ theme: theme4 }) => theme4.spacings.s3};
|
|
17253
17256
|
display: flex;
|
|
17254
17257
|
gap: ${({ theme: theme4 }) => theme4.spacings.s1};
|
|
17258
|
+
z-index: 3;
|
|
17255
17259
|
|
|
17256
17260
|
> button {
|
|
17257
17261
|
padding: 0;
|
|
@@ -17370,6 +17374,7 @@ var SignatureInput = ({
|
|
|
17370
17374
|
ref.clear();
|
|
17371
17375
|
setValue("");
|
|
17372
17376
|
}, [ref]);
|
|
17377
|
+
const empty = useMemo2(() => !value && (!ref || ref.isEmpty()), [ref, value]);
|
|
17373
17378
|
return /* @__PURE__ */ jsxs182(Container26, { children: [
|
|
17374
17379
|
/* @__PURE__ */ jsx360(
|
|
17375
17380
|
Input_default,
|
|
@@ -17427,20 +17432,12 @@ var SignatureInput = ({
|
|
|
17427
17432
|
if (!ref || ref.isEmpty()) return;
|
|
17428
17433
|
setValue(ref.getTrimmedCanvas().toDataURL("image/png"));
|
|
17429
17434
|
},
|
|
17430
|
-
disabled:
|
|
17435
|
+
disabled: empty,
|
|
17431
17436
|
title: "Recortar",
|
|
17432
17437
|
children: /* @__PURE__ */ jsx360(Icon_default, { type: "semantic", icon: "cut" })
|
|
17433
17438
|
}
|
|
17434
17439
|
),
|
|
17435
|
-
/* @__PURE__ */ jsx360(
|
|
17436
|
-
"button",
|
|
17437
|
-
{
|
|
17438
|
-
onClick: onClearHandler,
|
|
17439
|
-
disabled: !ref || ref.isEmpty(),
|
|
17440
|
-
title: "Limpar",
|
|
17441
|
-
children: /* @__PURE__ */ jsx360(Icon_default, { type: "semantic", icon: "eraser" })
|
|
17442
|
-
}
|
|
17443
|
-
)
|
|
17440
|
+
/* @__PURE__ */ jsx360("button", { onClick: onClearHandler, disabled: empty, title: "Limpar", children: /* @__PURE__ */ jsx360(Icon_default, { type: "semantic", icon: "eraser" }) })
|
|
17444
17441
|
] }),
|
|
17445
17442
|
/* @__PURE__ */ jsx360(
|
|
17446
17443
|
SignatureCanvas,
|