@pdf-viewer/react 1.6.0-beta.6 → 1.6.0-beta.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-password-
|
|
1
|
+
._rp-password-overlay_2kyt7_1{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:100}._rp-password-modal_2kyt7_14{background:var(--rp-password-background);padding:24px;margin-left:10px;margin-right:10px;border-radius:8px;max-width:360px;box-shadow:0 4px 6px #0000001a;display:flex;flex-direction:column;justify-content:start}._rp-password-title_2kyt7_27{font-family:var(--rp-font-family);margin-bottom:16px;font-size:16px;font-weight:500;color:var(--rp-password-title-color)}._rp-password-content_2kyt7_35{font-size:14px;font-family:var(--rp-font-family);color:var(--rp-password-content-color)}._rp-password-form_2kyt7_41{margin-top:32px}._rp-password-input_2kyt7_45{height:32px;width:100%;padding:7.5px;font-size:14px;border:1px solid var(--rp-password-input-border);border-radius:8px;box-sizing:border-box;background-color:var(--rp-password-background);caret-color:var(--rp-password-input-color);color:var(--rp-password-input-color)}._rp-password-input_2kyt7_45::placeholder{color:var(--rp-password-input-placeholder-color)}._rp-password-input-invalid_2kyt7_62{border-color:#ff2f61}._rp-password-message-invalid_2kyt7_66{color:#ff2f61;margin-top:4px}._rp-password-submit-button_2kyt7_71{width:100%;padding:8px;margin-top:32px;border-radius:8px;background-color:var(--rp-password-button-background);color:var(--rp-password-button-color);cursor:pointer;font-family:var(--rp-font-family);transition:background-color .2s;border:1px solid var(--rp-password-button-border)}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { c as o } from "../../clsx-0c6e471a.js";
|
|
4
4
|
import { useLocalizationContext as u } from "../../contexts/LocalizationContext.js";
|
|
5
5
|
import { useDocumentPasswordContext as _ } from "../../contexts/DocumentPasswordContext.js";
|
|
6
6
|
import '../../assets/PasswordModal.css';const r = {
|
|
7
|
-
"rp-password-overlay": "_rp-password-
|
|
8
|
-
"rp-password-modal": "_rp-password-
|
|
9
|
-
"rp-password-title": "_rp-password-
|
|
10
|
-
"rp-password-content": "_rp-password-
|
|
11
|
-
"rp-password-form": "_rp-password-
|
|
12
|
-
"rp-password-input": "_rp-password-
|
|
13
|
-
"rp-password-input-invalid": "_rp-password-input-
|
|
14
|
-
"rp-password-message-invalid": "_rp-password-message-
|
|
15
|
-
"rp-password-submit-button": "_rp-password-submit-
|
|
16
|
-
},
|
|
17
|
-
const [
|
|
18
|
-
e(
|
|
19
|
-
}, n = (
|
|
20
|
-
|
|
21
|
-
}, w = !
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
7
|
+
"rp-password-overlay": "_rp-password-overlay_2kyt7_1",
|
|
8
|
+
"rp-password-modal": "_rp-password-modal_2kyt7_14",
|
|
9
|
+
"rp-password-title": "_rp-password-title_2kyt7_27",
|
|
10
|
+
"rp-password-content": "_rp-password-content_2kyt7_35",
|
|
11
|
+
"rp-password-form": "_rp-password-form_2kyt7_41",
|
|
12
|
+
"rp-password-input": "_rp-password-input_2kyt7_45",
|
|
13
|
+
"rp-password-input-invalid": "_rp-password-input-invalid_2kyt7_62",
|
|
14
|
+
"rp-password-message-invalid": "_rp-password-message-invalid_2kyt7_66",
|
|
15
|
+
"rp-password-submit-button": "_rp-password-submit-button_2kyt7_71"
|
|
16
|
+
}, k = () => {
|
|
17
|
+
const [t, e] = c(""), { localeMessages: s } = u(), { setPassword: l, invalidPassword: i } = _(), m = (p) => {
|
|
18
|
+
e(p.target.value);
|
|
19
|
+
}, n = (p) => {
|
|
20
|
+
p.preventDefault(), t && t.trim() && l(t);
|
|
21
|
+
}, w = !t.trim();
|
|
22
|
+
return /* @__PURE__ */ a("div", { className: o(r["rp-password-overlay"]), children: /* @__PURE__ */ d("div", { className: o(r["rp-password-modal"]), children: [
|
|
23
|
+
/* @__PURE__ */ a("div", { className: o(r["rp-password-title"]), children: s == null ? void 0 : s.passwordModalTitle }),
|
|
24
|
+
/* @__PURE__ */ a("div", { className: o(r["rp-password-content"]), children: s == null ? void 0 : s.passwordModalMessage }),
|
|
25
|
+
/* @__PURE__ */ d("form", { onSubmit: n, children: [
|
|
26
|
+
/* @__PURE__ */ d("div", { className: o(r["rp-password-form"]), children: [
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
28
|
"input",
|
|
29
29
|
{
|
|
30
30
|
type: "password",
|
|
31
|
-
value:
|
|
32
|
-
onChange:
|
|
31
|
+
value: t,
|
|
32
|
+
onChange: m,
|
|
33
33
|
className: o(
|
|
34
34
|
r["rp-password-input"],
|
|
35
35
|
i && r["rp-password-input-invalid"]
|
|
@@ -38,9 +38,9 @@ import '../../assets/PasswordModal.css';const r = {
|
|
|
38
38
|
autoComplete: "off"
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
i && /* @__PURE__ */
|
|
41
|
+
i && /* @__PURE__ */ a("div", { className: o(r["rp-password-message-invalid"]), children: "Incorrect password" })
|
|
42
42
|
] }),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
44
|
"button",
|
|
45
45
|
{
|
|
46
46
|
type: "submit",
|
|
@@ -54,5 +54,5 @@ import '../../assets/PasswordModal.css';const r = {
|
|
|
54
54
|
] }) });
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
k as default
|
|
58
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as g, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as c } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2025-05-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2025-05-20T08:32:38.484Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${l}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${l}`,
|
|
6
6
|
expired: `Your license key has expired. ${l}`,
|