@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.
Files changed (114) hide show
  1. package/dist/ToolbarLayout.module-00eddd49.js +3746 -0
  2. package/dist/assets/style.css +1 -1
  3. package/dist/assets/style.js +1 -1
  4. package/dist/components/RPController.js +7 -6
  5. package/dist/components/RPPages.js +6 -5
  6. package/dist/components/RPProvider.js +7 -6
  7. package/dist/components/layout/LayoutContainer.js +6 -5
  8. package/dist/components/layout/RPDefaultLayout.js +6 -5
  9. package/dist/components/layout/RPLayout.js +28 -25
  10. package/dist/components/layout/SkipLink.js +28 -0
  11. package/dist/components/layout/sidebar/RPSidebar.js +6 -5
  12. package/dist/components/layout/sidebar/Thumbnail.js +6 -5
  13. package/dist/components/layout/sidebar/Thumbnails.js +6 -5
  14. package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
  15. package/dist/components/layout/toolbar/DocumentDialog.js +6 -5
  16. package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
  17. package/dist/components/layout/toolbar/FileDownloadTool.js +6 -5
  18. package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
  19. package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
  20. package/dist/components/layout/toolbar/MenuItem.js +3 -3
  21. package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
  22. package/dist/components/layout/toolbar/MostPageTool.js +6 -5
  23. package/dist/components/layout/toolbar/OtherTool.js +6 -5
  24. package/dist/components/layout/toolbar/Paginate.js +6 -5
  25. package/dist/components/layout/toolbar/PrintTool.js +6 -5
  26. package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
  27. package/dist/components/layout/toolbar/RPMoreOptions.js +17 -16
  28. package/dist/components/layout/toolbar/RPToolbar.js +6 -5
  29. package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
  30. package/dist/components/layout/toolbar/RotateTool.js +3 -3
  31. package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
  32. package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
  33. package/dist/components/layout/toolbar/SearchResultNavigator.js +6 -5
  34. package/dist/components/layout/toolbar/SearchTool.js +6 -5
  35. package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
  36. package/dist/components/layout/toolbar/ThumbnailTool.js +7 -6
  37. package/dist/components/layout/toolbar/ToolbarCustom.js +43 -25
  38. package/dist/components/layout/toolbar/ToolbarDefault.js +38 -28
  39. package/dist/components/layout/toolbar/ToolbarLayout.js +7 -6
  40. package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
  41. package/dist/components/layout/toolbar/ZoomTool.js +6 -5
  42. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +7 -6
  43. package/dist/components/layout/toolbar/tools/DualPageTool.js +17 -24
  44. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +7 -6
  45. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +11 -10
  46. package/dist/components/layout/toolbar/tools/FileUploadTool.js +6 -6
  47. package/dist/components/layout/toolbar/tools/FullScreenTool.js +18 -17
  48. package/dist/components/layout/toolbar/tools/InputPageTool.js +40 -32
  49. package/dist/components/layout/toolbar/tools/NextPageTool.js +15 -13
  50. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +18 -16
  51. package/dist/components/layout/toolbar/tools/PrintTool.js +9 -8
  52. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +13 -6
  53. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +10 -10
  54. package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +18 -10
  55. package/dist/components/layout/toolbar/tools/SinglePageTool.js +8 -7
  56. package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +12 -4
  57. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +18 -16
  58. package/dist/components/layout/toolbar/tools/ZoomInTool.js +16 -15
  59. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +6 -5
  60. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +75 -40
  61. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +13 -12
  62. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
  63. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +7 -6
  64. package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +11 -11
  65. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -17
  66. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +24 -16
  67. package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +22 -14
  68. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +38 -21
  69. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -17
  70. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +33 -19
  71. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +47 -29
  72. package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +40 -24
  73. package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +48 -31
  74. package/dist/components/page/AnnotationLayer.js +6 -5
  75. package/dist/components/page/CanvasLayer.js +6 -5
  76. package/dist/components/page/DualPage.js +6 -5
  77. package/dist/components/page/DualPageWithCover.js +6 -5
  78. package/dist/components/page/RPPage.js +6 -5
  79. package/dist/components/page/SinglePage.js +6 -5
  80. package/dist/components/page/TextHighlightLayer.js +6 -5
  81. package/dist/components/page/TextLayer.js +6 -5
  82. package/dist/components/ui/Button.js +14 -12
  83. package/dist/components/ui/Checkbox.js +75 -68
  84. package/dist/components/ui/DropDown.js +3 -3
  85. package/dist/components/ui/Input.js +12 -11
  86. package/dist/components/ui/LoadingIndicator.js +6 -5
  87. package/dist/components/ui/PasswordModal.js +43 -29
  88. package/dist/components/ui/RPTooltip.js +201 -415
  89. package/dist/contexts/PaginationContext.js +8 -7
  90. package/dist/contexts/PrintContext.js +8 -7
  91. package/dist/contexts/RenderQueueProvider.js +8 -7
  92. package/dist/contexts/SearchContext.js +8 -7
  93. package/dist/contexts/ThumbnailsContext.js +8 -7
  94. package/dist/index-808ea7bf.js +1685 -0
  95. package/dist/index-a48ec088.js +1672 -0
  96. package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
  97. package/dist/main.js +91 -90
  98. package/dist/types/components/layout/SkipLink.d.ts +7 -0
  99. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  100. package/dist/types/utils/annotations.d.ts +10 -0
  101. package/dist/utils/annotations.js +184 -158
  102. package/dist/utils/hooks/useFileDownload.js +6 -5
  103. package/dist/utils/hooks/useLicense.js +1 -1
  104. package/dist/utils/hooks/usePaginate.js +6 -5
  105. package/dist/utils/hooks/usePresentPage.js +6 -5
  106. package/dist/utils/hooks/usePrint.js +6 -5
  107. package/dist/utils/hooks/useScrollToPage.js +6 -5
  108. package/dist/utils/hooks/useSearch.js +6 -5
  109. package/dist/utils/hooks/useThumbnail.js +6 -5
  110. package/dist/utils/hooks/useVirtualReactWindow.js +6 -5
  111. package/package.json +1 -1
  112. package/dist/ToolbarLayout.module-0245d511.js +0 -3653
  113. package/dist/floating-ui.react-dom-6b2fe0df.js +0 -1474
  114. 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 E, a as S, b as G, d as K, e as X } from "../../index-35c7f4a2.js";
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, P] = V(g);
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: h,
18
+ form: u,
19
19
  name: f,
20
- onCheckedChange: u,
20
+ onCheckedChange: l,
21
21
  required: k,
22
22
  value: C = "on",
23
23
  // @ts-expect-error
24
- internal_do_not_use_render: l
25
- } = e, [p, v] = X({
24
+ internal_do_not_use_render: p
25
+ } = e, [h, v] = X({
26
26
  prop: o,
27
27
  defaultProp: n ?? !1,
28
- onChange: u,
28
+ onChange: l,
29
29
  caller: g
30
- }), [m, x] = s.useState(null), [_, c] = s.useState(null), a = s.useRef(!1), I = m ? !!h || !!m.closest("form") : (
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: p,
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: h,
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(l) ? l(R) : d
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: h,
62
+ value: u,
63
63
  disabled: f,
64
- checked: u,
64
+ checked: l,
65
65
  required: k,
66
66
  setControl: C,
67
- setChecked: l,
68
- hasConsumerStoppedPropagationRef: p,
67
+ setChecked: p,
68
+ hasConsumerStoppedPropagationRef: h,
69
69
  isFormControl: v,
70
70
  bubbleInput: m
71
- } = P(M, e), x = B(n, C), _ = s.useRef(u);
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 = () => l(_.current);
75
+ const a = () => p(_.current);
76
76
  return c.addEventListener("reset", a), () => c.removeEventListener("reset", a);
77
77
  }
78
- }, [t, l]), /* @__PURE__ */ i(
79
- E.button,
78
+ }, [t, p]), /* @__PURE__ */ i(
79
+ y.button,
80
80
  {
81
81
  type: "button",
82
82
  role: "checkbox",
83
- "aria-checked": b(u) ? "mixed" : u,
83
+ "aria-checked": b(l) ? "mixed" : l,
84
84
  "aria-required": k,
85
- "data-state": O(u),
85
+ "data-state": j(l),
86
86
  "data-disabled": f ? "" : void 0,
87
87
  disabled: f,
88
- value: h,
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
- l((a) => b(a) ? !0 : !a), m && v && (p.current = c.isPropagationStopped(), p.current || c.stopPropagation());
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: h,
109
+ required: u,
110
110
  disabled: f,
111
- value: u,
111
+ value: l,
112
112
  onCheckedChange: k,
113
113
  form: C,
114
- ...l
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: h,
123
+ required: u,
124
124
  onCheckedChange: k,
125
125
  name: d,
126
126
  form: C,
127
- value: u,
128
- internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ w(U, { children: [
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
- ...l,
132
+ ...p,
133
133
  ref: r,
134
134
  __scopeCheckbox: o
135
135
  }
136
136
  ),
137
- p && /* @__PURE__ */ i(
138
- L,
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 = P(A, o);
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
- E.span,
157
+ y.span,
158
158
  {
159
- "data-state": O(t.checked),
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", L = s.forwardRef(
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: h,
177
+ defaultChecked: u,
178
178
  required: f,
179
- disabled: u,
179
+ disabled: l,
180
180
  name: k,
181
181
  value: C,
182
- form: l,
183
- bubbleInput: p,
182
+ form: p,
183
+ bubbleInput: h,
184
184
  setBubbleInput: v
185
- } = P(D, e), m = B(o, v), x = Q(t), _ = K(d);
185
+ } = E(D, e), m = B(o, v), x = Q(t), _ = K(d);
186
186
  s.useEffect(() => {
187
- const a = p;
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, j = !n.current;
193
+ ).set, H = !n.current;
194
194
  if (x !== t && N) {
195
- const H = new Event("click", { bubbles: j });
196
- a.indeterminate = b(t), N.call(a, b(t) ? !1 : t), a.dispatchEvent(H);
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
- }, [p, x, t, n]);
198
+ }, [h, x, t, n]);
199
199
  const c = s.useRef(b(t) ? !1 : t);
200
200
  return /* @__PURE__ */ i(
201
- E.input,
201
+ y.input,
202
202
  {
203
203
  type: "checkbox",
204
204
  "aria-hidden": !0,
205
- defaultChecked: h ?? c.current,
205
+ defaultChecked: u ?? c.current,
206
206
  required: f,
207
- disabled: u,
207
+ disabled: l,
208
208
  name: k,
209
209
  value: C,
210
- form: l,
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
- L.displayName = D;
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 O(e) {
237
+ function j(e) {
238
238
  return b(e) ? "indeterminate" : e ? "checked" : "unchecked";
239
239
  }
240
- const y = {
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
- }) => /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", position: "relative" }, children: [
250
- /* @__PURE__ */ i(
251
- q,
252
- {
253
- tabIndex: n,
254
- className: y["rp-checkbox"],
255
- checked: r,
256
- id: o,
257
- onCheckedChange: d,
258
- children: /* @__PURE__ */ i(F, { className: y["rp-checkbox-indicator"], children: /* @__PURE__ */ i(J, {}) })
259
- }
260
- ),
261
- /* @__PURE__ */ i("label", { className: y["rp-checkbox-label"], htmlFor: o, children: e })
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-f563c6f0.js";
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-35c7f4a2.js";
5
+ import "../../index-c9a2990a.js";
6
6
  import "react-dom";
7
- import "../../floating-ui.react-dom-6b2fe0df.js";
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 e } from "../../clsx-0c6e471a.js";
3
- import { withRef as u } from "../../utils/withRef.js";
2
+ import { c as u } from "../../clsx-0c6e471a.js";
3
+ import { withRef as l } from "../../utils/withRef.js";
4
4
  import "react";
5
- const r = {
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 = u((n, t) => {
10
- const { className: s, icon: p, children: o, ...c } = n;
11
- return /* @__PURE__ */ a("div", { className: r["rp-input-wrapper"], children: [
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
- ...c,
15
+ ...r,
16
+ role: c,
16
17
  "data-icon": !!p,
17
- ref: t,
18
- className: e(s, r["rp-input"], "ignore-hover")
18
+ ref: e,
19
+ className: u(o, t["rp-input"], "ignore-hover")
19
20
  }
20
21
  ),
21
- p && /* @__PURE__ */ i("span", { className: r["rp-input-icon"], children: p }),
22
- o
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 Fr } from "../../ToolbarLayout.module-0245d511.js";
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-35c7f4a2.js";
79
+ import "../../index-c9a2990a.js";
79
80
  import "react-dom";
80
- import "../../floating-ui.react-dom-6b2fe0df.js";
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-f563c6f0.js";
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
- Fr as default
140
+ Gr as default
140
141
  };
@@ -1,12 +1,12 @@
1
- import { jsx as p, jsxs as t } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
2
2
  import { useState as u } from "react";
3
- import { c as o } from "../../clsx-0c6e471a.js";
4
- import { useLocalizationContext as c } from "../../contexts/LocalizationContext.js";
5
- import { useDocumentPasswordContext as _ } from "../../contexts/DocumentPasswordContext.js";
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 r = {
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
- }, y = () => {
20
- const [a, m] = u(""), { localeMessages: s } = c(), { setPassword: e, invalidPassword: i } = _(), w = (d) => {
21
- m(d.target.value);
22
- }, n = (d) => {
23
- d.preventDefault(), a && a.trim() && e(a);
24
- }, l = !a.trim();
25
- return /* @__PURE__ */ p("div", { className: o(r["rp-password-overlay"]), children: /* @__PURE__ */ t("div", { className: o(r["rp-password-modal"]), children: [
26
- /* @__PURE__ */ p("div", { className: o(r["rp-password-title"]), children: s == null ? void 0 : s.passwordModalTitle }),
27
- /* @__PURE__ */ p("div", { className: o(r["rp-password-content"]), children: s == null ? void 0 : s.passwordModalMessage }),
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: o(r["rp-password-form"]), children: [
30
- /* @__PURE__ */ p(
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: a,
35
- onChange: w,
36
- className: o(
37
- r["rp-password-input"],
38
- i && r["rp-password-input-invalid"]
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: s == null ? void 0 : s.passwordPlaceholder,
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__ */ p("div", { className: o(r["rp-password-message-invalid"]), children: i && /* @__PURE__ */ p("span", { children: s == null ? void 0 : s.passwordError }) })
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__ */ p(
59
+ /* @__PURE__ */ o(
47
60
  "button",
48
61
  {
49
62
  type: "submit",
50
- disabled: l,
51
- className: o(r["rp-password-submit-button"]),
63
+ disabled: w,
64
+ className: a(s["rp-password-submit-button"]),
52
65
  onClick: n,
53
- children: s == null ? void 0 : s.passwordConfirmLabel
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
- y as default
74
+ x as default
61
75
  };