@pdf-viewer/react 1.17.0-beta.0 → 1.17.0-beta.1
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/ToolbarLayout.module-00eddd49.js +3746 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +1 -1
- package/dist/components/RPController.js +7 -6
- package/dist/components/RPPages.js +6 -5
- package/dist/components/RPProvider.js +7 -6
- package/dist/components/layout/LayoutContainer.js +6 -5
- package/dist/components/layout/RPDefaultLayout.js +6 -5
- package/dist/components/layout/RPLayout.js +28 -25
- package/dist/components/layout/SkipLink.js +28 -0
- package/dist/components/layout/sidebar/RPSidebar.js +6 -5
- package/dist/components/layout/sidebar/Thumbnail.js +6 -5
- package/dist/components/layout/sidebar/Thumbnails.js +6 -5
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +6 -5
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +6 -5
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +3 -3
- package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
- package/dist/components/layout/toolbar/MostPageTool.js +6 -5
- package/dist/components/layout/toolbar/OtherTool.js +6 -5
- package/dist/components/layout/toolbar/Paginate.js +6 -5
- package/dist/components/layout/toolbar/PrintTool.js +6 -5
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +17 -16
- package/dist/components/layout/toolbar/RPToolbar.js +6 -5
- package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +6 -5
- package/dist/components/layout/toolbar/SearchTool.js +6 -5
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +7 -6
- package/dist/components/layout/toolbar/ToolbarCustom.js +43 -25
- package/dist/components/layout/toolbar/ToolbarDefault.js +38 -28
- package/dist/components/layout/toolbar/ToolbarLayout.js +7 -6
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +6 -5
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +7 -6
- package/dist/components/layout/toolbar/tools/DualPageTool.js +17 -24
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +7 -6
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +11 -10
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +6 -6
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +18 -17
- package/dist/components/layout/toolbar/tools/InputPageTool.js +40 -32
- package/dist/components/layout/toolbar/tools/NextPageTool.js +15 -13
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +18 -16
- package/dist/components/layout/toolbar/tools/PrintTool.js +9 -8
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +13 -6
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +10 -10
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +18 -10
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +8 -7
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +12 -4
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +18 -16
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +16 -15
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +6 -5
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +75 -40
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +13 -12
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +11 -11
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -17
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +24 -16
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +22 -14
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +38 -21
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -17
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +33 -19
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +47 -29
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +40 -24
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +48 -31
- package/dist/components/page/AnnotationLayer.js +6 -5
- package/dist/components/page/CanvasLayer.js +6 -5
- package/dist/components/page/DualPage.js +6 -5
- package/dist/components/page/DualPageWithCover.js +6 -5
- package/dist/components/page/RPPage.js +6 -5
- package/dist/components/page/SinglePage.js +6 -5
- package/dist/components/page/TextHighlightLayer.js +6 -5
- package/dist/components/page/TextLayer.js +6 -5
- package/dist/components/ui/Button.js +14 -12
- package/dist/components/ui/Checkbox.js +75 -68
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/Input.js +12 -11
- package/dist/components/ui/LoadingIndicator.js +6 -5
- package/dist/components/ui/PasswordModal.js +43 -29
- package/dist/components/ui/RPTooltip.js +201 -415
- package/dist/contexts/PaginationContext.js +8 -7
- package/dist/contexts/PrintContext.js +8 -7
- package/dist/contexts/RenderQueueProvider.js +8 -7
- package/dist/contexts/SearchContext.js +8 -7
- package/dist/contexts/ThumbnailsContext.js +8 -7
- package/dist/index-808ea7bf.js +1685 -0
- package/dist/index-a48ec088.js +1672 -0
- package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
- package/dist/main.js +91 -90
- package/dist/types/components/layout/SkipLink.d.ts +7 -0
- package/dist/types/components/ui/Checkbox.d.ts +1 -0
- package/dist/types/utils/annotations.d.ts +10 -0
- package/dist/utils/annotations.js +184 -158
- package/dist/utils/hooks/useFileDownload.js +6 -5
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +6 -5
- package/dist/utils/hooks/usePresentPage.js +6 -5
- package/dist/utils/hooks/usePrint.js +6 -5
- package/dist/utils/hooks/useScrollToPage.js +6 -5
- package/dist/utils/hooks/useSearch.js +6 -5
- package/dist/utils/hooks/useThumbnail.js +6 -5
- package/dist/utils/hooks/useVirtualReactWindow.js +6 -5
- package/package.json +1 -1
- package/dist/ToolbarLayout.module-0245d511.js +0 -3653
- package/dist/floating-ui.react-dom-6b2fe0df.js +0 -1474
- package/dist/index-f563c6f0.js +0 -1889
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as i, jsxs as w, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { c as z, u as B, P as
|
|
3
|
+
import { c as z, u as B, P as y, a as S, b as G, d as K, e as X } from "../../index-c9a2990a.js";
|
|
4
4
|
import { CheckIcon as J } from "../icons/CheckIcon.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
function Q(e) {
|
|
7
7
|
const r = s.useRef({ value: e, previous: e });
|
|
8
8
|
return s.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
9
9
|
}
|
|
10
|
-
var g = "Checkbox", [V, oe] = z(g), [W,
|
|
10
|
+
var g = "Checkbox", [V, oe] = z(g), [W, E] = V(g);
|
|
11
11
|
function Y(e) {
|
|
12
12
|
const {
|
|
13
13
|
__scopeCheckbox: r,
|
|
@@ -15,29 +15,29 @@ function Y(e) {
|
|
|
15
15
|
children: d,
|
|
16
16
|
defaultChecked: n,
|
|
17
17
|
disabled: t,
|
|
18
|
-
form:
|
|
18
|
+
form: u,
|
|
19
19
|
name: f,
|
|
20
|
-
onCheckedChange:
|
|
20
|
+
onCheckedChange: l,
|
|
21
21
|
required: k,
|
|
22
22
|
value: C = "on",
|
|
23
23
|
// @ts-expect-error
|
|
24
|
-
internal_do_not_use_render:
|
|
25
|
-
} = e, [
|
|
24
|
+
internal_do_not_use_render: p
|
|
25
|
+
} = e, [h, v] = X({
|
|
26
26
|
prop: o,
|
|
27
27
|
defaultProp: n ?? !1,
|
|
28
|
-
onChange:
|
|
28
|
+
onChange: l,
|
|
29
29
|
caller: g
|
|
30
|
-
}), [m, x] = s.useState(null), [_, c] = s.useState(null), a = s.useRef(!1), I = m ? !!
|
|
30
|
+
}), [m, x] = s.useState(null), [_, c] = s.useState(null), a = s.useRef(!1), I = m ? !!u || !!m.closest("form") : (
|
|
31
31
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
32
32
|
!0
|
|
33
33
|
), R = {
|
|
34
|
-
checked:
|
|
34
|
+
checked: h,
|
|
35
35
|
disabled: t,
|
|
36
36
|
setChecked: v,
|
|
37
37
|
control: m,
|
|
38
38
|
setControl: x,
|
|
39
39
|
name: f,
|
|
40
|
-
form:
|
|
40
|
+
form: u,
|
|
41
41
|
value: C,
|
|
42
42
|
hasConsumerStoppedPropagationRef: a,
|
|
43
43
|
required: k,
|
|
@@ -51,7 +51,7 @@ function Y(e) {
|
|
|
51
51
|
{
|
|
52
52
|
scope: r,
|
|
53
53
|
...R,
|
|
54
|
-
children: Z(
|
|
54
|
+
children: Z(p) ? p(R) : d
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -59,40 +59,40 @@ var M = "CheckboxTrigger", T = s.forwardRef(
|
|
|
59
59
|
({ __scopeCheckbox: e, onKeyDown: r, onClick: o, ...d }, n) => {
|
|
60
60
|
const {
|
|
61
61
|
control: t,
|
|
62
|
-
value:
|
|
62
|
+
value: u,
|
|
63
63
|
disabled: f,
|
|
64
|
-
checked:
|
|
64
|
+
checked: l,
|
|
65
65
|
required: k,
|
|
66
66
|
setControl: C,
|
|
67
|
-
setChecked:
|
|
68
|
-
hasConsumerStoppedPropagationRef:
|
|
67
|
+
setChecked: p,
|
|
68
|
+
hasConsumerStoppedPropagationRef: h,
|
|
69
69
|
isFormControl: v,
|
|
70
70
|
bubbleInput: m
|
|
71
|
-
} =
|
|
71
|
+
} = E(M, e), x = B(n, C), _ = s.useRef(l);
|
|
72
72
|
return s.useEffect(() => {
|
|
73
73
|
const c = t == null ? void 0 : t.form;
|
|
74
74
|
if (c) {
|
|
75
|
-
const a = () =>
|
|
75
|
+
const a = () => p(_.current);
|
|
76
76
|
return c.addEventListener("reset", a), () => c.removeEventListener("reset", a);
|
|
77
77
|
}
|
|
78
|
-
}, [t,
|
|
79
|
-
|
|
78
|
+
}, [t, p]), /* @__PURE__ */ i(
|
|
79
|
+
y.button,
|
|
80
80
|
{
|
|
81
81
|
type: "button",
|
|
82
82
|
role: "checkbox",
|
|
83
|
-
"aria-checked": b(
|
|
83
|
+
"aria-checked": b(l) ? "mixed" : l,
|
|
84
84
|
"aria-required": k,
|
|
85
|
-
"data-state":
|
|
85
|
+
"data-state": j(l),
|
|
86
86
|
"data-disabled": f ? "" : void 0,
|
|
87
87
|
disabled: f,
|
|
88
|
-
value:
|
|
88
|
+
value: u,
|
|
89
89
|
...d,
|
|
90
90
|
ref: x,
|
|
91
91
|
onKeyDown: S(r, (c) => {
|
|
92
92
|
c.key === "Enter" && c.preventDefault();
|
|
93
93
|
}),
|
|
94
94
|
onClick: S(o, (c) => {
|
|
95
|
-
|
|
95
|
+
p((a) => b(a) ? !0 : !a), m && v && (h.current = c.isPropagationStopped(), h.current || c.stopPropagation());
|
|
96
96
|
})
|
|
97
97
|
}
|
|
98
98
|
);
|
|
@@ -106,12 +106,12 @@ var q = s.forwardRef(
|
|
|
106
106
|
name: d,
|
|
107
107
|
checked: n,
|
|
108
108
|
defaultChecked: t,
|
|
109
|
-
required:
|
|
109
|
+
required: u,
|
|
110
110
|
disabled: f,
|
|
111
|
-
value:
|
|
111
|
+
value: l,
|
|
112
112
|
onCheckedChange: k,
|
|
113
113
|
form: C,
|
|
114
|
-
...
|
|
114
|
+
...p
|
|
115
115
|
} = e;
|
|
116
116
|
return /* @__PURE__ */ i(
|
|
117
117
|
Y,
|
|
@@ -120,22 +120,22 @@ var q = s.forwardRef(
|
|
|
120
120
|
checked: n,
|
|
121
121
|
defaultChecked: t,
|
|
122
122
|
disabled: f,
|
|
123
|
-
required:
|
|
123
|
+
required: u,
|
|
124
124
|
onCheckedChange: k,
|
|
125
125
|
name: d,
|
|
126
126
|
form: C,
|
|
127
|
-
value:
|
|
128
|
-
internal_do_not_use_render: ({ isFormControl:
|
|
127
|
+
value: l,
|
|
128
|
+
internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ w(U, { children: [
|
|
129
129
|
/* @__PURE__ */ i(
|
|
130
130
|
T,
|
|
131
131
|
{
|
|
132
|
-
...
|
|
132
|
+
...p,
|
|
133
133
|
ref: r,
|
|
134
134
|
__scopeCheckbox: o
|
|
135
135
|
}
|
|
136
136
|
),
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
h && /* @__PURE__ */ i(
|
|
138
|
+
O,
|
|
139
139
|
{
|
|
140
140
|
__scopeCheckbox: o
|
|
141
141
|
}
|
|
@@ -148,15 +148,15 @@ var q = s.forwardRef(
|
|
|
148
148
|
q.displayName = g;
|
|
149
149
|
var A = "CheckboxIndicator", F = s.forwardRef(
|
|
150
150
|
(e, r) => {
|
|
151
|
-
const { __scopeCheckbox: o, forceMount: d, ...n } = e, t =
|
|
151
|
+
const { __scopeCheckbox: o, forceMount: d, ...n } = e, t = E(A, o);
|
|
152
152
|
return /* @__PURE__ */ i(
|
|
153
153
|
G,
|
|
154
154
|
{
|
|
155
155
|
present: d || b(t.checked) || t.checked === !0,
|
|
156
156
|
children: /* @__PURE__ */ i(
|
|
157
|
-
|
|
157
|
+
y.span,
|
|
158
158
|
{
|
|
159
|
-
"data-state":
|
|
159
|
+
"data-state": j(t.checked),
|
|
160
160
|
"data-disabled": t.disabled ? "" : void 0,
|
|
161
161
|
...n,
|
|
162
162
|
ref: r,
|
|
@@ -168,46 +168,46 @@ var A = "CheckboxIndicator", F = s.forwardRef(
|
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
170
|
F.displayName = A;
|
|
171
|
-
var D = "CheckboxBubbleInput",
|
|
171
|
+
var D = "CheckboxBubbleInput", O = s.forwardRef(
|
|
172
172
|
({ __scopeCheckbox: e, ...r }, o) => {
|
|
173
173
|
const {
|
|
174
174
|
control: d,
|
|
175
175
|
hasConsumerStoppedPropagationRef: n,
|
|
176
176
|
checked: t,
|
|
177
|
-
defaultChecked:
|
|
177
|
+
defaultChecked: u,
|
|
178
178
|
required: f,
|
|
179
|
-
disabled:
|
|
179
|
+
disabled: l,
|
|
180
180
|
name: k,
|
|
181
181
|
value: C,
|
|
182
|
-
form:
|
|
183
|
-
bubbleInput:
|
|
182
|
+
form: p,
|
|
183
|
+
bubbleInput: h,
|
|
184
184
|
setBubbleInput: v
|
|
185
|
-
} =
|
|
185
|
+
} = E(D, e), m = B(o, v), x = Q(t), _ = K(d);
|
|
186
186
|
s.useEffect(() => {
|
|
187
|
-
const a =
|
|
187
|
+
const a = h;
|
|
188
188
|
if (!a)
|
|
189
189
|
return;
|
|
190
190
|
const I = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
191
191
|
I,
|
|
192
192
|
"checked"
|
|
193
|
-
).set,
|
|
193
|
+
).set, H = !n.current;
|
|
194
194
|
if (x !== t && N) {
|
|
195
|
-
const
|
|
196
|
-
a.indeterminate = b(t), N.call(a, b(t) ? !1 : t), a.dispatchEvent(
|
|
195
|
+
const L = new Event("click", { bubbles: H });
|
|
196
|
+
a.indeterminate = b(t), N.call(a, b(t) ? !1 : t), a.dispatchEvent(L);
|
|
197
197
|
}
|
|
198
|
-
}, [
|
|
198
|
+
}, [h, x, t, n]);
|
|
199
199
|
const c = s.useRef(b(t) ? !1 : t);
|
|
200
200
|
return /* @__PURE__ */ i(
|
|
201
|
-
|
|
201
|
+
y.input,
|
|
202
202
|
{
|
|
203
203
|
type: "checkbox",
|
|
204
204
|
"aria-hidden": !0,
|
|
205
|
-
defaultChecked:
|
|
205
|
+
defaultChecked: u ?? c.current,
|
|
206
206
|
required: f,
|
|
207
|
-
disabled:
|
|
207
|
+
disabled: l,
|
|
208
208
|
name: k,
|
|
209
209
|
value: C,
|
|
210
|
-
form:
|
|
210
|
+
form: p,
|
|
211
211
|
...r,
|
|
212
212
|
tabIndex: -1,
|
|
213
213
|
ref: m,
|
|
@@ -227,17 +227,17 @@ var D = "CheckboxBubbleInput", L = s.forwardRef(
|
|
|
227
227
|
);
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
|
-
|
|
230
|
+
O.displayName = D;
|
|
231
231
|
function Z(e) {
|
|
232
232
|
return typeof e == "function";
|
|
233
233
|
}
|
|
234
234
|
function b(e) {
|
|
235
235
|
return e === "indeterminate";
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function j(e) {
|
|
238
238
|
return b(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const P = {
|
|
241
241
|
"rp-checkbox": "_rp-checkbox_1vwg8_1",
|
|
242
242
|
"rp-checkbox-indicator": "_rp-checkbox-indicator_1vwg8_25"
|
|
243
243
|
}, ne = ({
|
|
@@ -245,21 +245,28 @@ const y = {
|
|
|
245
245
|
value: r,
|
|
246
246
|
name: o,
|
|
247
247
|
onChange: d,
|
|
248
|
-
tabIndex: n
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
248
|
+
tabIndex: n,
|
|
249
|
+
"aria-label": t
|
|
250
|
+
}) => {
|
|
251
|
+
const u = t ? { "aria-label": t } : {};
|
|
252
|
+
return /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", position: "relative" }, children: [
|
|
253
|
+
/* @__PURE__ */ i(
|
|
254
|
+
q,
|
|
255
|
+
{
|
|
256
|
+
tabIndex: n,
|
|
257
|
+
className: P["rp-checkbox"],
|
|
258
|
+
checked: r,
|
|
259
|
+
id: o,
|
|
260
|
+
onCheckedChange: d,
|
|
261
|
+
role: "checkbox",
|
|
262
|
+
"aria-checked": r,
|
|
263
|
+
...u,
|
|
264
|
+
children: /* @__PURE__ */ i(F, { className: P["rp-checkbox-indicator"], "aria-hidden": "true", children: /* @__PURE__ */ i(J, {}) })
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ i("label", { className: P["rp-checkbox-label"], htmlFor: o, children: e })
|
|
268
|
+
] });
|
|
269
|
+
};
|
|
263
270
|
export {
|
|
264
271
|
ne as UICheckbox
|
|
265
272
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as p, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { R as l, T as c, P as _, C as m } from "../../index-
|
|
2
|
+
import { R as l, T as c, P as _, C as m } from "../../index-a48ec088.js";
|
|
3
3
|
import { c as A } from "../../clsx-0c6e471a.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../../index-
|
|
5
|
+
import "../../index-c9a2990a.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "../../
|
|
7
|
+
import "../../index-808ea7bf.js";
|
|
8
8
|
const F = "_slideDownAndFade_1vzkq_1", w = "_slideLeftAndFade_1vzkq_1", f = "_slideUpAndFade_1vzkq_1", g = "_slideRightAndFade_1vzkq_1", h = {
|
|
9
9
|
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
|
|
10
10
|
slideDownAndFade: F,
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { withRef as
|
|
2
|
+
import { c as u } from "../../clsx-0c6e471a.js";
|
|
3
|
+
import { withRef as l } from "../../utils/withRef.js";
|
|
4
4
|
import "react";
|
|
5
|
-
const
|
|
5
|
+
const t = {
|
|
6
6
|
"rp-input": "_rp-input_3rj4v_1",
|
|
7
7
|
"rp-input-wrapper": "_rp-input-wrapper_3rj4v_22",
|
|
8
8
|
"rp-input-icon": "_rp-input-icon_3rj4v_26"
|
|
9
|
-
}, h =
|
|
10
|
-
const { className:
|
|
11
|
-
return /* @__PURE__ */ a("div", { className:
|
|
9
|
+
}, h = l((n, e) => {
|
|
10
|
+
const { className: o, icon: p, children: s, ...r } = n, c = r.role || (r.type === "text" || !r.type ? "textbox" : void 0);
|
|
11
|
+
return /* @__PURE__ */ a("div", { className: t["rp-input-wrapper"], children: [
|
|
12
12
|
/* @__PURE__ */ i(
|
|
13
13
|
"input",
|
|
14
14
|
{
|
|
15
|
-
...
|
|
15
|
+
...r,
|
|
16
|
+
role: c,
|
|
16
17
|
"data-icon": !!p,
|
|
17
|
-
ref:
|
|
18
|
-
className:
|
|
18
|
+
ref: e,
|
|
19
|
+
className: u(o, t["rp-input"], "ignore-hover")
|
|
19
20
|
}
|
|
20
21
|
),
|
|
21
|
-
p && /* @__PURE__ */ i("span", { className:
|
|
22
|
-
|
|
22
|
+
p && /* @__PURE__ */ i("span", { className: t["rp-input-icon"], "aria-hidden": "true", children: p }),
|
|
23
|
+
s
|
|
23
24
|
] });
|
|
24
25
|
});
|
|
25
26
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { q as
|
|
2
|
+
import { q as Gr } from "../../ToolbarLayout.module-00eddd49.js";
|
|
3
3
|
import "../../clsx-0c6e471a.js";
|
|
4
4
|
import "../../contexts/LocalizationContext.js";
|
|
5
5
|
import "react";
|
|
@@ -73,17 +73,18 @@ import "../icons/LightPdfIcon.js";
|
|
|
73
73
|
import "../icons/DarkPdfIcon.js";
|
|
74
74
|
import "../../utils/hooks/useLocalization.js";
|
|
75
75
|
import "../../LayoutWrapper-3f4d0a19.js";
|
|
76
|
+
import "../layout/SkipLink.js";
|
|
76
77
|
import "../../SearchCloseButton-08d57275.js";
|
|
77
78
|
import "./RPTooltip.js";
|
|
78
|
-
import "../../index-
|
|
79
|
+
import "../../index-c9a2990a.js";
|
|
79
80
|
import "react-dom";
|
|
80
|
-
import "../../
|
|
81
|
+
import "../../index-808ea7bf.js";
|
|
81
82
|
import "../icons/CloseIcon.js";
|
|
82
83
|
import "./Checkbox.js";
|
|
83
84
|
import "../icons/CheckIcon.js";
|
|
84
85
|
import "../../contexts/IconContext.js";
|
|
85
86
|
import "./DropDown.js";
|
|
86
|
-
import "../../index-
|
|
87
|
+
import "../../index-a48ec088.js";
|
|
87
88
|
import "../layout/toolbar/MenuItem.js";
|
|
88
89
|
import "../layout/toolbar/MenuSeparator.js";
|
|
89
90
|
import "../../utils/dateFormatter.js";
|
|
@@ -136,5 +137,5 @@ import "../../utils/zoom.js";
|
|
|
136
137
|
import "../icons/SearchIcon.js";
|
|
137
138
|
import "../icons/ClearIcon.js";
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
Gr as default
|
|
140
141
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useLocalizationContext as
|
|
5
|
-
import { useDocumentPasswordContext as
|
|
3
|
+
import { c as a } from "../../clsx-0c6e471a.js";
|
|
4
|
+
import { useLocalizationContext as _ } from "../../contexts/LocalizationContext.js";
|
|
5
|
+
import { useDocumentPasswordContext as c } from "../../contexts/DocumentPasswordContext.js";
|
|
6
6
|
import "../../utils/appConsole.js";
|
|
7
7
|
import "../../utils/hooks/useLocalization.js";
|
|
8
8
|
import "../../th_TH-d1686d95.js";
|
|
9
|
-
const
|
|
9
|
+
const s = {
|
|
10
10
|
"rp-password-overlay": "_rp-password-overlay_18s56_1",
|
|
11
11
|
"rp-password-modal": "_rp-password-modal_18s56_13",
|
|
12
12
|
"rp-password-title": "_rp-password-title_18s56_27",
|
|
@@ -16,46 +16,60 @@ const r = {
|
|
|
16
16
|
"rp-password-input-invalid": "_rp-password-input-invalid_18s56_62",
|
|
17
17
|
"rp-password-message-invalid": "_rp-password-message-invalid_18s56_66",
|
|
18
18
|
"rp-password-submit-button": "_rp-password-submit-button_18s56_72"
|
|
19
|
-
},
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
}, n = (
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
19
|
+
}, x = () => {
|
|
20
|
+
const [d, e] = u(""), { localeMessages: r } = _(), { setPassword: l, invalidPassword: p } = c(), m = (i) => {
|
|
21
|
+
e(i.target.value);
|
|
22
|
+
}, n = (i) => {
|
|
23
|
+
i.preventDefault(), d && d.trim() && l(d);
|
|
24
|
+
}, w = !d.trim();
|
|
25
|
+
return /* @__PURE__ */ o("div", { className: a(s["rp-password-overlay"]), role: "dialog", "aria-modal": "true", "aria-labelledby": "password-modal-title", children: /* @__PURE__ */ t("div", { className: a(s["rp-password-modal"]), children: [
|
|
26
|
+
/* @__PURE__ */ o("div", { id: "password-modal-title", className: a(s["rp-password-title"]), children: r == null ? void 0 : r.passwordModalTitle }),
|
|
27
|
+
/* @__PURE__ */ o("div", { className: a(s["rp-password-content"]), children: r == null ? void 0 : r.passwordModalMessage }),
|
|
28
28
|
/* @__PURE__ */ t("form", { onSubmit: n, children: [
|
|
29
|
-
/* @__PURE__ */ t("div", { className:
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ t("div", { className: a(s["rp-password-form"]), children: [
|
|
30
|
+
/* @__PURE__ */ o(
|
|
31
31
|
"input",
|
|
32
32
|
{
|
|
33
33
|
type: "password",
|
|
34
|
-
value:
|
|
35
|
-
onChange:
|
|
36
|
-
className:
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
value: d,
|
|
35
|
+
onChange: m,
|
|
36
|
+
className: a(
|
|
37
|
+
s["rp-password-input"],
|
|
38
|
+
p && s["rp-password-input-invalid"]
|
|
39
39
|
),
|
|
40
|
-
placeholder:
|
|
41
|
-
autoComplete: "off"
|
|
40
|
+
placeholder: r == null ? void 0 : r.passwordPlaceholder,
|
|
41
|
+
autoComplete: "off",
|
|
42
|
+
"aria-label": r == null ? void 0 : r.passwordPlaceholder,
|
|
43
|
+
"aria-required": "true",
|
|
44
|
+
"aria-invalid": p,
|
|
45
|
+
"aria-describedby": p ? "password-error" : void 0
|
|
42
46
|
}
|
|
43
47
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
id: "password-error",
|
|
52
|
+
className: a(s["rp-password-message-invalid"]),
|
|
53
|
+
role: "alert",
|
|
54
|
+
"aria-live": "polite",
|
|
55
|
+
children: p && /* @__PURE__ */ o("span", { children: r == null ? void 0 : r.passwordError })
|
|
56
|
+
}
|
|
57
|
+
)
|
|
45
58
|
] }),
|
|
46
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ o(
|
|
47
60
|
"button",
|
|
48
61
|
{
|
|
49
62
|
type: "submit",
|
|
50
|
-
disabled:
|
|
51
|
-
className:
|
|
63
|
+
disabled: w,
|
|
64
|
+
className: a(s["rp-password-submit-button"]),
|
|
52
65
|
onClick: n,
|
|
53
|
-
|
|
66
|
+
"aria-label": r == null ? void 0 : r.passwordConfirmLabel,
|
|
67
|
+
children: r == null ? void 0 : r.passwordConfirmLabel
|
|
54
68
|
}
|
|
55
69
|
)
|
|
56
70
|
] })
|
|
57
71
|
] }) });
|
|
58
72
|
};
|
|
59
73
|
export {
|
|
60
|
-
|
|
74
|
+
x as default
|
|
61
75
|
};
|