@pdf-viewer/react 1.9.0-beta.3 → 1.9.0-beta.5
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/Checkbox.module-3edaacbb.js +7 -0
- package/dist/Combination-da8647d4.js +693 -0
- package/dist/Container.module-f8b5c306.js +6 -0
- package/dist/DropDown.module-a78567cb.js +11 -0
- package/dist/MenuItem.module-bc11d0d3.js +6 -0
- package/dist/MenuSeparator.module-89b2ff7f.js +6 -0
- package/dist/PropertyItem.module-db0150cc.js +8 -0
- package/dist/RPSplitter.module-13d612c4.js +7 -0
- package/dist/RPTheme.module-bd9038da.js +8 -0
- package/dist/RotateTool.module-03987eba.js +6 -0
- package/dist/SearchTool.module-016f3a8d.js +16 -0
- package/dist/ToolbarLayout.module-60c3d6e8.js +2434 -0
- package/dist/WrapperLayout.module-147bc943.js +6 -0
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/components/RPController.js +9 -9
- package/dist/components/RPDropFileZone.js +21 -23
- package/dist/components/RPPages.js +21 -19
- package/dist/components/RPProvider.js +19 -15
- package/dist/components/layout/Container.js +10 -11
- package/dist/components/layout/LayoutContainer.js +21 -18
- package/dist/components/layout/RPDefaultLayout.js +76 -14
- package/dist/components/layout/RPLayout.js +74 -25
- package/dist/components/layout/WrapperLayout.js +7 -8
- package/dist/components/layout/sidebar/RPSidebar.js +51 -12
- package/dist/components/layout/sidebar/RPSplitter.js +7 -9
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +3 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +307 -25
- package/dist/components/layout/toolbar/DocumentProperties.js +23 -19
- package/dist/components/layout/toolbar/FileDownloadTool.js +23 -13
- package/dist/components/layout/toolbar/MenuItem.js +6 -7
- package/dist/components/layout/toolbar/MenuSeparator.js +4 -5
- package/dist/components/layout/toolbar/MostPageTool.js +50 -24
- package/dist/components/layout/toolbar/OtherTool.js +115 -22
- package/dist/components/layout/toolbar/Paginate.js +99 -17
- package/dist/components/layout/toolbar/PrintTool.js +43 -13
- package/dist/components/layout/toolbar/PropertyItem.js +5 -8
- package/dist/components/layout/toolbar/RPToolbar.js +28 -7
- package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -7
- package/dist/components/layout/toolbar/RotateTool.js +20 -21
- package/dist/components/layout/toolbar/ScrollModeTool.js +35 -37
- package/dist/components/layout/toolbar/SearchCloseButton.js +19 -7
- package/dist/components/layout/toolbar/SearchResultNavigator.js +42 -8
- package/dist/components/layout/toolbar/SearchTool.js +198 -30
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
- package/dist/components/layout/toolbar/ToolbarCustom.js +48 -21
- package/dist/components/layout/toolbar/ToolbarDefault.js +82 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +140 -27
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/tools/InputPageTool.js +7 -7
- package/dist/components/layout/toolbar/tools/NextPageTool.js +21 -19
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +14 -14
- package/dist/components/layout/toolbar/tools/defaults/{TopbarDefaultTools.js → RPHorizontalBar.js} +29 -20
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
- package/dist/components/page/AnnotationLayer.js +20 -18
- package/dist/components/page/CanvasLayer.js +20 -18
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +21 -18
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +20 -18
- package/dist/components/page/TextLayer.js +20 -18
- package/dist/components/ui/Button.js +8 -8
- package/dist/components/ui/Checkbox.js +70 -61
- package/dist/components/ui/DropDown.js +14 -20
- package/dist/components/ui/Input.js +11 -11
- package/dist/components/ui/LoadingIndicator.js +22 -5
- package/dist/components/ui/RPTooltip.js +62 -64
- package/dist/contexts/PaginationContext.js +4 -4
- package/dist/contexts/PrintContext.js +2 -2
- package/dist/contexts/SearchContext.js +3 -3
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ViewportContext.js +42 -35
- package/dist/floating-ui.react-dom-f3f380e0.js +1447 -0
- package/dist/index-473557b1.js +1191 -0
- package/dist/{index-1cb41342.js → index-8547fbc6.js} +12 -12
- package/dist/main.js +76 -73
- package/dist/types/components/layout/LayoutContainer.d.ts +5 -1
- package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -1
- package/dist/types/components/layout/RPLayout.d.ts +2 -1
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +3 -1
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +2 -1
- package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +2 -2
- package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
- package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
- package/dist/types/components/page/RPPage.d.ts +3 -1
- package/dist/types/components/ui/Button.d.ts +3 -1
- package/dist/types/components/ui/Checkbox.d.ts +1 -0
- package/dist/types/components/ui/DropDown.d.ts +2 -1
- package/dist/types/components/ui/Input.d.ts +3 -1
- package/dist/types/components/ui/RPTooltip.d.ts +3 -1
- package/dist/types/main.d.ts +3 -3
- package/dist/types/utils/types.d.ts +17 -17
- package/dist/types/utils/withRef.d.ts +4 -0
- package/dist/utils/hooks/useFileDownload.js +20 -18
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +20 -18
- package/dist/utils/hooks/usePresentPage.js +20 -18
- package/dist/utils/hooks/usePrint.js +20 -18
- package/dist/utils/hooks/useScrollToPage.js +20 -18
- package/dist/utils/hooks/useSearch.js +20 -18
- package/dist/utils/hooks/useThumbnail.js +20 -18
- package/dist/utils/hooks/useVirtualReactWindow.js +20 -18
- package/dist/utils/withRef.js +8 -0
- package/package.json +1 -1
- package/dist/Popover-1faa77f6.js +0 -1445
- package/dist/RPLayout-897cb09d.js +0 -3393
- package/dist/SearchCloseButton-ddb9877e.js +0 -32
- package/dist/assets/Popover.css +0 -1
- package/dist/assets/RPLayout.css +0 -1
- package/dist/component-1da194e8.js +0 -337
- package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +0 -16
- package/dist/components/ui/Popover.js +0 -6
- package/dist/floating-ui.react-dom-15b9b819.js +0 -1310
- package/dist/index-7279fb4e.js +0 -1557
- package/dist/index-aa2d3884.js +0 -140
- package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +0 -3
- package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +0 -3
- package/dist/types/components/ui/Popover.d.ts +0 -9
- /package/dist/assets/{RPDropFileZone.css → RPTheme.css} +0 -0
- /package/dist/assets/{SearchCloseButton.css → SearchTool.css} +0 -0
|
@@ -1,14 +1,53 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../icons/Thumbnail.js";
|
|
4
|
-
import "../../ui/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import "./RPSplitter.js";
|
|
7
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
8
|
-
import "../../../contexts/IconContext.js";
|
|
9
|
-
import "../../ui/RPTooltip.js";
|
|
10
|
-
import "../../../contexts/LocalizationContext.js";
|
|
11
|
-
import "../../../contexts/IconToolContext.js";
|
|
1
|
+
import { jsx as t, Fragment as b, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useRef as f, useCallback as T, useMemo as C } from "react";
|
|
3
|
+
import { ThumbnailIcon as x } from "../../icons/Thumbnail.js";
|
|
4
|
+
import { UIButton as I } from "../../ui/Button.js";
|
|
5
|
+
import { f as k, j as a, k as v } from "../../../ToolbarLayout.module-60c3d6e8.js";
|
|
6
|
+
import { RPSplitter as w } from "./RPSplitter.js";
|
|
7
|
+
import { useToolbarComponentContext as R } from "../../../contexts/ToolbarComponentContext.js";
|
|
8
|
+
import { useIconContext as S } from "../../../contexts/IconContext.js";
|
|
9
|
+
import j from "../../ui/RPTooltip.js";
|
|
10
|
+
import { useLocalizationContext as y } from "../../../contexts/LocalizationContext.js";
|
|
11
|
+
import { useIconToolContext as N } from "../../../contexts/IconToolContext.js";
|
|
12
|
+
const P = () => {
|
|
13
|
+
const { thumbnailIcon: o } = S(), { thumbnailIcon: r } = N();
|
|
14
|
+
return o || r || /* @__PURE__ */ t(x, {});
|
|
15
|
+
}, G = () => {
|
|
16
|
+
const { active: o, setActive: r } = k(), [s, c] = d(200), l = f(null), { thumbnailTool: i, sidebarEnable: u } = R(), { localeMessages: n } = y(), e = T(() => {
|
|
17
|
+
r((p) => !p);
|
|
18
|
+
}, []), h = C(() => typeof i != "boolean" && i ? /* @__PURE__ */ t(i, { onClick: e, active: o }) : i ? /* @__PURE__ */ t(j, { content: n == null ? void 0 : n.thumbnailTooltip, children: /* @__PURE__ */ t(
|
|
19
|
+
I,
|
|
20
|
+
{
|
|
21
|
+
onClick: e,
|
|
22
|
+
active: o,
|
|
23
|
+
"aria-label": n == null ? void 0 : n.thumbnailTooltip,
|
|
24
|
+
children: /* @__PURE__ */ t(P, {})
|
|
25
|
+
}
|
|
26
|
+
) }) : null, [i, o, e, n]);
|
|
27
|
+
return /* @__PURE__ */ t(b, { children: u && /* @__PURE__ */ m(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
style: { "--rp-thumbnail-width": `${s}px` },
|
|
31
|
+
className: a["rp-sidebar-content-wrapper"],
|
|
32
|
+
"data-rp": "sidebar",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ t("div", { className: a["rp-sidebar-content"], children: h }),
|
|
35
|
+
/* @__PURE__ */ m(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-rp": "thumbnailSidebar",
|
|
39
|
+
hidden: !o,
|
|
40
|
+
className: a["rp-thumbnails-wrapper"],
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ t(v, { show: o, ref: l }),
|
|
43
|
+
/* @__PURE__ */ t(w, { onWidthChange: c, thumbnailRef: l })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) });
|
|
50
|
+
};
|
|
12
51
|
export {
|
|
13
|
-
|
|
52
|
+
G as RPSidebar
|
|
14
53
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const r = a(null);
|
|
8
|
-
return /* @__PURE__ */ g("div", { ref: r, className: e["rp-thumbnail-dragger"] });
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as s } from "react";
|
|
3
|
+
import { c as t } from "../../../RPSplitter.module-13d612c4.js";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const r = s(null);
|
|
6
|
+
return /* @__PURE__ */ e("div", { ref: r, className: t["rp-thumbnail-dragger"] });
|
|
9
7
|
};
|
|
10
8
|
export {
|
|
11
|
-
|
|
9
|
+
f as RPSplitter
|
|
12
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { J as b } from "../../../ToolbarLayout.module-60c3d6e8.js";
|
|
4
4
|
import "../../../clsx-0c6e471a.js";
|
|
5
5
|
import "../../icons/LoaderIcon.js";
|
|
6
6
|
import "../../../contexts/PagesRotateContext.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { k as a } from "../../../ToolbarLayout.module-60c3d6e8.js";
|
|
4
4
|
import "../../../utils/hooks/useInfiniteScroll.js";
|
|
5
|
+
import "../../../utils/withRef.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
a as Thumbnails
|
|
7
8
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../../
|
|
5
|
-
import "
|
|
6
|
-
import "../../../
|
|
7
|
-
import "../../../contexts/
|
|
1
|
+
import { jsx as a, jsxs as b, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { useMemo as J } from "react";
|
|
4
|
+
import { c as Q, u as R, P as D, a as v, b as N, S as X, d as M, e as ee } from "../../../index-8547fbc6.js";
|
|
5
|
+
import { D as te, u as P } from "../../../floating-ui.react-dom-f3f380e0.js";
|
|
6
|
+
import { R as oe, h as re, u as ne, F as ie, P as ae } from "../../../Combination-da8647d4.js";
|
|
7
|
+
import { useLayoutContainer as le } from "../../../contexts/LayoutContainerContext.js";
|
|
8
|
+
import { p as m } from "../../../ToolbarLayout.module-60c3d6e8.js";
|
|
9
|
+
import { CloseIcon as ce } from "../../icons/CloseIcon.js";
|
|
10
|
+
import { dateFormatter as A } from "../../../utils/dateFormatter.js";
|
|
11
|
+
import { useDocumentContext as se } from "../../../contexts/RPDocumentContext.js";
|
|
8
12
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
9
13
|
import "../../../contexts/DarkModeContext.js";
|
|
10
14
|
import "../../../contexts/RotationContext.js";
|
|
@@ -20,7 +24,7 @@ import "../../../contexts/FullScreenContext.js";
|
|
|
20
24
|
import "../../../contexts/FileInputContext.js";
|
|
21
25
|
import "../../../contexts/DropFileZoneContext.js";
|
|
22
26
|
import "../../../contexts/DimensionPagesContext.js";
|
|
23
|
-
import "../../../contexts/LocalizationContext.js";
|
|
27
|
+
import { useLocalizationContext as pe } from "../../../contexts/LocalizationContext.js";
|
|
24
28
|
import "../../../contexts/HighlightContext.js";
|
|
25
29
|
import "../../../contexts/LicenseContext.js";
|
|
26
30
|
import "../../../contexts/DownloadContext.js";
|
|
@@ -28,27 +32,305 @@ import "../../../contexts/SmoothScrollContext.js";
|
|
|
28
32
|
import "../../../contexts/ElementPageContext.js";
|
|
29
33
|
import "../../../contexts/PagesRotateContext.js";
|
|
30
34
|
import "../../../contexts/LoaderContext.js";
|
|
31
|
-
import "../../RPConfig.js";
|
|
32
|
-
import "../../../contexts/ThemeContext.js";
|
|
33
|
-
import "../../RPDropFileZone.js";
|
|
34
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
35
35
|
import "../../../contexts/ToolComponentContext.js";
|
|
36
|
+
import "../../../contexts/IconToolContext.js";
|
|
37
|
+
import { useOtherToolContext as ue } from "../../../contexts/OtherToolContext.js";
|
|
38
|
+
import "../../RPConfig.js";
|
|
36
39
|
import "../../ui/Button.js";
|
|
37
|
-
import "../../../SearchCloseButton-ddb9877e.js";
|
|
38
40
|
import "../../ui/Input.js";
|
|
39
|
-
import "../../ui/Checkbox.js";
|
|
40
|
-
import "../../icons/LoaderIcon.js";
|
|
41
41
|
import "../../../contexts/IconContext.js";
|
|
42
|
-
import "
|
|
43
|
-
import "../../../Popover-1faa77f6.js";
|
|
42
|
+
import "../../../contexts/ToolbarComponentContext.js";
|
|
44
43
|
import "../../../contexts/ViewportContext.js";
|
|
45
|
-
import "
|
|
46
|
-
import "
|
|
47
|
-
import "
|
|
48
|
-
import "
|
|
49
|
-
import "../../../
|
|
50
|
-
import "
|
|
51
|
-
import "
|
|
44
|
+
import "../../ui/RPTooltip.js";
|
|
45
|
+
import "../../../MenuItem.module-bc11d0d3.js";
|
|
46
|
+
import "../../../DropDown.module-a78567cb.js";
|
|
47
|
+
import "../../../MenuSeparator.module-89b2ff7f.js";
|
|
48
|
+
import "../../../RotateTool.module-03987eba.js";
|
|
49
|
+
import "../../../SearchTool.module-016f3a8d.js";
|
|
50
|
+
import "../../../Checkbox.module-3edaacbb.js";
|
|
51
|
+
import "../../icons/LoaderIcon.js";
|
|
52
|
+
import "../../../RPSplitter.module-13d612c4.js";
|
|
53
|
+
import "../../../Container.module-f8b5c306.js";
|
|
54
|
+
import "../../../WrapperLayout.module-147bc943.js";
|
|
55
|
+
import "../../../RPTheme.module-bd9038da.js";
|
|
56
|
+
import "../../../contexts/ThemeContext.js";
|
|
57
|
+
import { PropertyItem as de } from "./PropertyItem.js";
|
|
58
|
+
var _ = "Dialog", [T, Tt] = Q(_), [me, p] = T(_), L = (t) => {
|
|
59
|
+
const {
|
|
60
|
+
__scopeDialog: r,
|
|
61
|
+
children: n,
|
|
62
|
+
open: i,
|
|
63
|
+
defaultOpen: e,
|
|
64
|
+
onOpenChange: o,
|
|
65
|
+
modal: l = !0
|
|
66
|
+
} = t, s = c.useRef(null), u = c.useRef(null), [d = !1, g] = ee({
|
|
67
|
+
prop: i,
|
|
68
|
+
defaultProp: e,
|
|
69
|
+
onChange: o
|
|
70
|
+
});
|
|
71
|
+
return /* @__PURE__ */ a(
|
|
72
|
+
me,
|
|
73
|
+
{
|
|
74
|
+
scope: r,
|
|
75
|
+
triggerRef: s,
|
|
76
|
+
contentRef: u,
|
|
77
|
+
contentId: P(),
|
|
78
|
+
titleId: P(),
|
|
79
|
+
descriptionId: P(),
|
|
80
|
+
open: d,
|
|
81
|
+
onOpenChange: g,
|
|
82
|
+
onOpenToggle: c.useCallback(() => g((C) => !C), [g]),
|
|
83
|
+
modal: l,
|
|
84
|
+
children: n
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
L.displayName = _;
|
|
89
|
+
var F = "DialogTrigger", fe = c.forwardRef(
|
|
90
|
+
(t, r) => {
|
|
91
|
+
const { __scopeDialog: n, ...i } = t, e = p(F, n), o = R(r, e.triggerRef);
|
|
92
|
+
return /* @__PURE__ */ a(
|
|
93
|
+
D.button,
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
"aria-haspopup": "dialog",
|
|
97
|
+
"aria-expanded": e.open,
|
|
98
|
+
"aria-controls": e.contentId,
|
|
99
|
+
"data-state": E(e.open),
|
|
100
|
+
...i,
|
|
101
|
+
ref: o,
|
|
102
|
+
onClick: v(t.onClick, e.onOpenToggle)
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
fe.displayName = F;
|
|
108
|
+
var y = "DialogPortal", [ge, w] = T(y, {
|
|
109
|
+
forceMount: void 0
|
|
110
|
+
}), S = (t) => {
|
|
111
|
+
const { __scopeDialog: r, forceMount: n, children: i, container: e } = t, o = p(y, r);
|
|
112
|
+
return /* @__PURE__ */ a(ge, { scope: r, forceMount: n, children: c.Children.map(i, (l) => /* @__PURE__ */ a(N, { present: n || o.open, children: /* @__PURE__ */ a(ae, { asChild: !0, container: e, children: l }) })) });
|
|
113
|
+
};
|
|
114
|
+
S.displayName = y;
|
|
115
|
+
var h = "DialogOverlay", W = c.forwardRef(
|
|
116
|
+
(t, r) => {
|
|
117
|
+
const n = w(h, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = p(h, t.__scopeDialog);
|
|
118
|
+
return o.modal ? /* @__PURE__ */ a(N, { present: i || o.open, children: /* @__PURE__ */ a(ve, { ...e, ref: r }) }) : null;
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
W.displayName = h;
|
|
122
|
+
var ve = c.forwardRef(
|
|
123
|
+
(t, r) => {
|
|
124
|
+
const { __scopeDialog: n, ...i } = t, e = p(h, n);
|
|
125
|
+
return (
|
|
126
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
127
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
128
|
+
/* @__PURE__ */ a(oe, { as: X, allowPinchZoom: !0, shards: [e.contentRef], children: /* @__PURE__ */ a(
|
|
129
|
+
D.div,
|
|
130
|
+
{
|
|
131
|
+
"data-state": E(e.open),
|
|
132
|
+
...i,
|
|
133
|
+
ref: r,
|
|
134
|
+
style: { pointerEvents: "auto", ...i.style }
|
|
135
|
+
}
|
|
136
|
+
) })
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
), f = "DialogContent", k = c.forwardRef(
|
|
140
|
+
(t, r) => {
|
|
141
|
+
const n = w(f, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = p(f, t.__scopeDialog);
|
|
142
|
+
return /* @__PURE__ */ a(N, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(De, { ...e, ref: r }) : /* @__PURE__ */ a(Ce, { ...e, ref: r }) });
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
k.displayName = f;
|
|
146
|
+
var De = c.forwardRef(
|
|
147
|
+
(t, r) => {
|
|
148
|
+
const n = p(f, t.__scopeDialog), i = c.useRef(null), e = R(r, n.contentRef, i);
|
|
149
|
+
return c.useEffect(() => {
|
|
150
|
+
const o = i.current;
|
|
151
|
+
if (o)
|
|
152
|
+
return re(o);
|
|
153
|
+
}, []), /* @__PURE__ */ a(
|
|
154
|
+
G,
|
|
155
|
+
{
|
|
156
|
+
...t,
|
|
157
|
+
ref: e,
|
|
158
|
+
trapFocus: n.open,
|
|
159
|
+
disableOutsidePointerEvents: !0,
|
|
160
|
+
onCloseAutoFocus: v(t.onCloseAutoFocus, (o) => {
|
|
161
|
+
var l;
|
|
162
|
+
o.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
163
|
+
}),
|
|
164
|
+
onPointerDownOutside: v(t.onPointerDownOutside, (o) => {
|
|
165
|
+
const l = o.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
|
|
166
|
+
(l.button === 2 || s) && o.preventDefault();
|
|
167
|
+
}),
|
|
168
|
+
onFocusOutside: v(
|
|
169
|
+
t.onFocusOutside,
|
|
170
|
+
(o) => o.preventDefault()
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
), Ce = c.forwardRef(
|
|
176
|
+
(t, r) => {
|
|
177
|
+
const n = p(f, t.__scopeDialog), i = c.useRef(!1), e = c.useRef(!1);
|
|
178
|
+
return /* @__PURE__ */ a(
|
|
179
|
+
G,
|
|
180
|
+
{
|
|
181
|
+
...t,
|
|
182
|
+
ref: r,
|
|
183
|
+
trapFocus: !1,
|
|
184
|
+
disableOutsidePointerEvents: !1,
|
|
185
|
+
onCloseAutoFocus: (o) => {
|
|
186
|
+
var l, s;
|
|
187
|
+
(l = t.onCloseAutoFocus) == null || l.call(t, o), o.defaultPrevented || (i.current || (s = n.triggerRef.current) == null || s.focus(), o.preventDefault()), i.current = !1, e.current = !1;
|
|
188
|
+
},
|
|
189
|
+
onInteractOutside: (o) => {
|
|
190
|
+
var u, d;
|
|
191
|
+
(u = t.onInteractOutside) == null || u.call(t, o), o.defaultPrevented || (i.current = !0, o.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
192
|
+
const l = o.target;
|
|
193
|
+
((d = n.triggerRef.current) == null ? void 0 : d.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
), G = c.forwardRef(
|
|
199
|
+
(t, r) => {
|
|
200
|
+
const { __scopeDialog: n, trapFocus: i, onOpenAutoFocus: e, onCloseAutoFocus: o, ...l } = t, s = p(f, n), u = c.useRef(null), d = R(r, u);
|
|
201
|
+
return ne(), /* @__PURE__ */ b(x, { children: [
|
|
202
|
+
/* @__PURE__ */ a(
|
|
203
|
+
ie,
|
|
204
|
+
{
|
|
205
|
+
asChild: !0,
|
|
206
|
+
loop: !0,
|
|
207
|
+
trapped: i,
|
|
208
|
+
onMountAutoFocus: e,
|
|
209
|
+
onUnmountAutoFocus: o,
|
|
210
|
+
children: /* @__PURE__ */ a(
|
|
211
|
+
te,
|
|
212
|
+
{
|
|
213
|
+
role: "dialog",
|
|
214
|
+
id: s.contentId,
|
|
215
|
+
"aria-describedby": s.descriptionId,
|
|
216
|
+
"aria-labelledby": s.titleId,
|
|
217
|
+
"data-state": E(s.open),
|
|
218
|
+
...l,
|
|
219
|
+
ref: d,
|
|
220
|
+
onDismiss: () => s.onOpenChange(!1)
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
/* @__PURE__ */ b(x, { children: [
|
|
226
|
+
/* @__PURE__ */ a(he, { titleId: s.titleId }),
|
|
227
|
+
/* @__PURE__ */ a(Re, { contentRef: u, descriptionId: s.descriptionId })
|
|
228
|
+
] })
|
|
229
|
+
] });
|
|
230
|
+
}
|
|
231
|
+
), O = "DialogTitle", $ = c.forwardRef(
|
|
232
|
+
(t, r) => {
|
|
233
|
+
const { __scopeDialog: n, ...i } = t, e = p(O, n);
|
|
234
|
+
return /* @__PURE__ */ a(D.h2, { id: e.titleId, ...i, ref: r });
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
$.displayName = O;
|
|
238
|
+
var j = "DialogDescription", be = c.forwardRef(
|
|
239
|
+
(t, r) => {
|
|
240
|
+
const { __scopeDialog: n, ...i } = t, e = p(j, n);
|
|
241
|
+
return /* @__PURE__ */ a(D.p, { id: e.descriptionId, ...i, ref: r });
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
be.displayName = j;
|
|
245
|
+
var V = "DialogClose", z = c.forwardRef(
|
|
246
|
+
(t, r) => {
|
|
247
|
+
const { __scopeDialog: n, ...i } = t, e = p(V, n);
|
|
248
|
+
return /* @__PURE__ */ a(
|
|
249
|
+
D.button,
|
|
250
|
+
{
|
|
251
|
+
type: "button",
|
|
252
|
+
...i,
|
|
253
|
+
ref: r,
|
|
254
|
+
onClick: v(t.onClick, () => e.onOpenChange(!1))
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
z.displayName = V;
|
|
260
|
+
function E(t) {
|
|
261
|
+
return t ? "open" : "closed";
|
|
262
|
+
}
|
|
263
|
+
var B = "DialogTitleWarning", [Lt, H] = M(B, {
|
|
264
|
+
contentName: f,
|
|
265
|
+
titleName: O,
|
|
266
|
+
docsSlug: "dialog"
|
|
267
|
+
}), he = ({ titleId: t }) => {
|
|
268
|
+
const r = H(B), n = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
269
|
+
|
|
270
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
271
|
+
|
|
272
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;
|
|
273
|
+
return c.useEffect(() => {
|
|
274
|
+
t && (document.getElementById(t) || console.error(n));
|
|
275
|
+
}, [n, t]), null;
|
|
276
|
+
}, Pe = "DialogDescriptionWarning", Re = ({ contentRef: t, descriptionId: r }) => {
|
|
277
|
+
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H(Pe).contentName}}.`;
|
|
278
|
+
return c.useEffect(() => {
|
|
279
|
+
var o;
|
|
280
|
+
const e = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
281
|
+
r && e && (document.getElementById(r) || console.warn(i));
|
|
282
|
+
}, [i, t, r]), null;
|
|
283
|
+
}, Ne = L, _e = S, ye = W, Oe = k, Ee = $, Ie = z;
|
|
284
|
+
const Ft = () => {
|
|
285
|
+
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } = ue(), { localeMessages: e } = pe(), o = J(() => {
|
|
286
|
+
if (!t)
|
|
287
|
+
return [];
|
|
288
|
+
const {
|
|
289
|
+
fileSize: l,
|
|
290
|
+
filename: s,
|
|
291
|
+
title: u,
|
|
292
|
+
author: d,
|
|
293
|
+
subject: g,
|
|
294
|
+
createdOn: C,
|
|
295
|
+
creator: K,
|
|
296
|
+
keywords: q,
|
|
297
|
+
modifiedOn: I,
|
|
298
|
+
pdfProducer: U,
|
|
299
|
+
pdfVersion: Y,
|
|
300
|
+
pageCount: Z
|
|
301
|
+
} = t;
|
|
302
|
+
return [
|
|
303
|
+
{ label: e == null ? void 0 : e.propertiesFilenameLabel, value: s },
|
|
304
|
+
{ label: e == null ? void 0 : e.propertiesFileSizeLabel, value: l },
|
|
305
|
+
{ separate: !0 },
|
|
306
|
+
{ label: e == null ? void 0 : e.propertiesTitleLabel, value: u },
|
|
307
|
+
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value: d },
|
|
308
|
+
{ label: e == null ? void 0 : e.propertiesSubjectLabel, value: g },
|
|
309
|
+
{ label: e == null ? void 0 : e.propertiesKeywordLabel, value: q },
|
|
310
|
+
{ label: e == null ? void 0 : e.propertiesCreatorLabel, value: K },
|
|
311
|
+
{
|
|
312
|
+
label: e == null ? void 0 : e.propertiesCreateOnLabel,
|
|
313
|
+
value: C ? A(C) : ""
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
label: e == null ? void 0 : e.propertiesModifiedOnLabel,
|
|
317
|
+
value: I ? A(I) : ""
|
|
318
|
+
},
|
|
319
|
+
{ separate: !0 },
|
|
320
|
+
{ label: e == null ? void 0 : e.propertiesPDFProducerLabel, value: U },
|
|
321
|
+
{ label: e == null ? void 0 : e.propertiesPDFVersionLabel, value: Y },
|
|
322
|
+
{ label: e == null ? void 0 : e.propertiesPageCountLabel, value: Z }
|
|
323
|
+
];
|
|
324
|
+
}, [t, e]);
|
|
325
|
+
return /* @__PURE__ */ a(Ne, { open: n, onOpenChange: i, children: /* @__PURE__ */ a(_e, { container: r, children: /* @__PURE__ */ b("div", { className: m["rp-dialog-wrapper"], children: [
|
|
326
|
+
/* @__PURE__ */ a(ye, { className: m["rp-dialog-overlay"] }),
|
|
327
|
+
/* @__PURE__ */ b(Oe, { className: m["rp-document-dialog"], children: [
|
|
328
|
+
/* @__PURE__ */ a(Ee, { className: m["rp-dialog-title"], children: e == null ? void 0 : e.documentPropertiesLabel }),
|
|
329
|
+
/* @__PURE__ */ a("div", { className: m["rp-document-properties"], children: o.map((l, s) => /* @__PURE__ */ a("div", { children: l.separate ? /* @__PURE__ */ a("div", { className: m["rp-properties-divider"] }) : /* @__PURE__ */ a(de, { label: l.label, value: l.value }) }, s)) }),
|
|
330
|
+
/* @__PURE__ */ a(Ie, { asChild: !0, className: m["rp-dialog-close"], children: /* @__PURE__ */ a(ce, {}) })
|
|
331
|
+
] })
|
|
332
|
+
] }) }) });
|
|
333
|
+
};
|
|
52
334
|
export {
|
|
53
|
-
|
|
335
|
+
Ft as DocumentDialog
|
|
54
336
|
};
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MenuItem as
|
|
3
|
-
import { InfoIcon as
|
|
4
|
-
import { useOtherToolContext as
|
|
1
|
+
import { jsxs as n, Fragment as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem as u } from "./MenuItem.js";
|
|
3
|
+
import { InfoIcon as s } from "../../icons/InfoIcon.js";
|
|
4
|
+
import { useOtherToolContext as l } from "../../../contexts/OtherToolContext.js";
|
|
5
5
|
import { useToolbarComponentContext as d } from "../../../contexts/ToolbarComponentContext.js";
|
|
6
|
-
import { useIconContext as
|
|
7
|
-
import
|
|
8
|
-
import { useLocalizationContext as
|
|
9
|
-
import { useIconToolContext as
|
|
10
|
-
import { useToolComponentContext as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
import { useIconContext as f } from "../../../contexts/IconContext.js";
|
|
7
|
+
import P from "../../ui/RPTooltip.js";
|
|
8
|
+
import { useLocalizationContext as x } from "../../../contexts/LocalizationContext.js";
|
|
9
|
+
import { useIconToolContext as C } from "../../../contexts/IconToolContext.js";
|
|
10
|
+
import { useToolComponentContext as I } from "../../../contexts/ToolComponentContext.js";
|
|
11
|
+
import { MenuSeparator as T } from "./MenuSeparator.js";
|
|
12
|
+
const a = () => {
|
|
13
|
+
const { documentPropertiesIcon: e } = f(), { documentPropertiesIcon: r } = C();
|
|
14
|
+
return e || r || /* @__PURE__ */ t(s, {});
|
|
15
|
+
}, F = () => {
|
|
16
|
+
const { setActiveDocumentProperties: e } = l(), { documentProperties: r = !0 } = d(), { documentProperties: m = !0, scrollModeTool: i } = I(), { localeMessages: o } = x();
|
|
17
|
+
return !r || !m ? null : /* @__PURE__ */ n(p, { children: [
|
|
18
|
+
i && /* @__PURE__ */ t(T, {}),
|
|
19
|
+
/* @__PURE__ */ t(u, { onClick: () => e((c) => !c), children: /* @__PURE__ */ n(P, { className: "rp-menu-item", content: o == null ? void 0 : o.documentPropertiesTooltip, children: [
|
|
20
|
+
/* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(a, {}) }),
|
|
21
|
+
o == null ? void 0 : o.documentPropertiesLabel
|
|
22
|
+
] }) })
|
|
23
|
+
] });
|
|
20
24
|
};
|
|
21
25
|
export {
|
|
22
|
-
|
|
26
|
+
F as DocumentProperties
|
|
23
27
|
};
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "../../icons/FileDownloadDefaultIcon.js";
|
|
3
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
4
|
-
import "../../../contexts/IconContext.js";
|
|
5
|
-
import "../../ui/Button.js";
|
|
6
|
-
import {
|
|
7
|
-
import "./MenuItem.js";
|
|
8
|
-
import "../../../contexts/ViewportContext.js";
|
|
9
|
-
import "../../ui/RPTooltip.js";
|
|
10
|
-
import "../../../contexts/LocalizationContext.js";
|
|
11
|
-
import "../../../contexts/IconToolContext.js";
|
|
12
|
-
import "../../../contexts/ToolComponentContext.js";
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { FileDownloadDefaultIcon as f } from "../../icons/FileDownloadDefaultIcon.js";
|
|
3
|
+
import { useToolbarComponentContext as w } from "../../../contexts/ToolbarComponentContext.js";
|
|
4
|
+
import { useIconContext as e } from "../../../contexts/IconContext.js";
|
|
5
|
+
import { UIButton as T } from "../../ui/Button.js";
|
|
6
|
+
import { a as D } from "../../../ToolbarLayout.module-60c3d6e8.js";
|
|
7
|
+
import { MenuItem as C } from "./MenuItem.js";
|
|
8
|
+
import { useViewportContext as x } from "../../../contexts/ViewportContext.js";
|
|
9
|
+
import d from "../../ui/RPTooltip.js";
|
|
10
|
+
import { useLocalizationContext as F } from "../../../contexts/LocalizationContext.js";
|
|
11
|
+
import { useIconToolContext as I } from "../../../contexts/IconToolContext.js";
|
|
12
|
+
import { useToolComponentContext as h } from "../../../contexts/ToolComponentContext.js";
|
|
13
|
+
const m = () => {
|
|
14
|
+
const { downloadIcon: t } = e(), { downloadIcon: o } = I();
|
|
15
|
+
return t || o || /* @__PURE__ */ n(f, {});
|
|
16
|
+
}, p = ({ children: t, className: o, localeMessages: r }) => /* @__PURE__ */ n(d, { className: o, content: r == null ? void 0 : r.downloadFileTooltip, children: t }), a = ({ download: t, localeMessages: o }) => /* @__PURE__ */ n(p, { localeMessages: o, children: /* @__PURE__ */ n(T, { onClick: t, "aria-label": o == null ? void 0 : o.downloadFileTooltip, children: /* @__PURE__ */ n(m, {}) }) }), b = ({ download: t, localeMessages: o }) => /* @__PURE__ */ n(C, { onClick: t, children: /* @__PURE__ */ u(p, { className: "rp-menu-item", localeMessages: o, children: [
|
|
17
|
+
/* @__PURE__ */ n("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ n(m, {}) }),
|
|
18
|
+
o == null ? void 0 : o.downloadFileLabel
|
|
19
|
+
] }) }), U = () => {
|
|
20
|
+
const { download: t } = D(), { downloadTool: o = !0 } = w(), { downloadTool: r = !0 } = h(), { isSmallScreen: c } = x(), { localeMessages: i } = F(), l = i == null ? void 0 : i.downloadFileTooltip;
|
|
21
|
+
return !o || !r ? null : c ? /* @__PURE__ */ n(b, { download: t, localeMessages: i }) : typeof o == "function" ? /* @__PURE__ */ n(d, { content: l, children: /* @__PURE__ */ n(o, { download: t }) }) : typeof r == "function" ? /* @__PURE__ */ n(d, { content: l, children: /* @__PURE__ */ n(r, { download: t }) }) : /* @__PURE__ */ n(a, { download: t, localeMessages: i });
|
|
22
|
+
};
|
|
13
23
|
export {
|
|
14
|
-
|
|
24
|
+
U as FileDownloadTool
|
|
15
25
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { I as o } from "../../../index-
|
|
2
|
+
import { I as o } from "../../../index-473557b1.js";
|
|
3
|
+
import { c as a } from "../../../MenuItem.module-bc11d0d3.js";
|
|
3
4
|
import { c } from "../../../clsx-0c6e471a.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { children: m, className: s, ...r } = e;
|
|
8
|
-
return /* @__PURE__ */ t(o, { ...r, tabIndex: 0, className: c(n["rp-menu-item"], s), children: m });
|
|
5
|
+
const f = (s) => {
|
|
6
|
+
const { children: r, className: m, ...e } = s;
|
|
7
|
+
return /* @__PURE__ */ t(o, { ...e, tabIndex: 0, className: c(a["rp-menu-item"], m), children: r });
|
|
9
8
|
};
|
|
10
9
|
export {
|
|
11
|
-
|
|
10
|
+
f as MenuItem
|
|
12
11
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { S as a } from "../../../index-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
}, p = () => /* @__PURE__ */ r(a, { className: e["rp-menu-separator"] });
|
|
2
|
+
import { S as a } from "../../../index-473557b1.js";
|
|
3
|
+
import { c as o } from "../../../MenuSeparator.module-89b2ff7f.js";
|
|
4
|
+
const m = () => /* @__PURE__ */ r(a, { className: o["rp-menu-separator"] });
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
m as MenuSeparator
|
|
8
7
|
};
|