@papyrus-sdk/ui-react 0.2.4 → 0.2.6

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/README.md CHANGED
@@ -45,6 +45,8 @@ import '@papyrus-sdk/ui-react/base.css';
45
45
 
46
46
  Use `@papyrus-sdk/core` + engines and build your own UI.
47
47
 
48
+ Note: `@papyrus-sdk/ui-react` expects `@papyrus-sdk/core` and `@papyrus-sdk/types` as peer dependencies.
49
+
48
50
  ## Topbar customization
49
51
 
50
52
  `Topbar` accepts optional flags to show/hide controls.
package/base.css CHANGED
@@ -8,6 +8,9 @@
8
8
  height: 56px;
9
9
  justify-content: space-between;
10
10
  padding: 0 16px;
11
+ font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
12
+ font-size: 14px;
13
+ line-height: 1.4;
11
14
  }
12
15
 
13
16
  .papyrus-sidebar-left {
@@ -18,6 +21,9 @@
18
21
  flex-direction: column;
19
22
  height: 100%;
20
23
  width: 288px;
24
+ font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
25
+ font-size: 13px;
26
+ line-height: 1.4;
21
27
  }
22
28
 
23
29
  .papyrus-sidebar-right {
@@ -28,6 +34,9 @@
28
34
  flex-direction: column;
29
35
  height: 100%;
30
36
  width: 320px;
37
+ font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
38
+ font-size: 13px;
39
+ line-height: 1.4;
31
40
  }
32
41
 
33
42
  .papyrus-viewer {
@@ -35,17 +44,20 @@
35
44
  box-sizing: border-box;
36
45
  flex: 1 1 auto;
37
46
  overflow: auto;
47
+ font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
38
48
  }
39
49
 
40
50
  .papyrus-topbar button,
41
51
  .papyrus-sidebar-left button,
42
52
  .papyrus-sidebar-right button {
43
- background: none;
44
- border: 0;
53
+ background: #f3f4f6;
54
+ border: 1px solid #e5e7eb;
55
+ border-radius: 8px;
45
56
  color: inherit;
46
57
  cursor: pointer;
47
58
  font: inherit;
48
- padding: 0;
59
+ padding: 6px 10px;
60
+ transition: background 0.15s ease, border-color 0.15s ease;
49
61
  }
50
62
 
51
63
  .papyrus-topbar input,
@@ -63,6 +75,39 @@
63
75
  padding: 6px 8px;
64
76
  }
65
77
 
78
+ .papyrus-topbar button:hover,
79
+ .papyrus-sidebar-left button:hover,
80
+ .papyrus-sidebar-right button:hover {
81
+ background: #e5e7eb;
82
+ border-color: #d1d5db;
83
+ }
84
+
85
+ .papyrus-topbar svg,
86
+ .papyrus-sidebar-left svg,
87
+ .papyrus-sidebar-right svg {
88
+ display: block;
89
+ }
90
+
91
+ .papyrus-topbar input:focus,
92
+ .papyrus-sidebar-left input:focus,
93
+ .papyrus-sidebar-right input:focus,
94
+ .papyrus-topbar select:focus,
95
+ .papyrus-sidebar-left select:focus,
96
+ .papyrus-sidebar-right select:focus {
97
+ outline: 2px solid #93c5fd;
98
+ outline-offset: 1px;
99
+ }
100
+
101
+ .papyrus-sidebar-left .custom-scrollbar,
102
+ .papyrus-sidebar-right .custom-scrollbar {
103
+ overflow-y: auto;
104
+ }
105
+
106
+ .papyrus-viewer .page-container {
107
+ margin-bottom: 24px;
108
+ display: flex;
109
+ justify-content: center;
110
+ }
66
111
  .papyrus-viewer .page-container {
67
112
  margin-bottom: 24px;
68
113
  }
package/dist/index.d.mts CHANGED
@@ -5,6 +5,7 @@ interface TopbarProps {
5
5
  engine: DocumentEngine;
6
6
  showBrand?: boolean;
7
7
  brand?: React.ReactNode;
8
+ title?: React.ReactNode;
8
9
  showSidebarLeftToggle?: boolean;
9
10
  showPageControls?: boolean;
10
11
  showZoomControls?: boolean;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ interface TopbarProps {
5
5
  engine: DocumentEngine;
6
6
  showBrand?: boolean;
7
7
  brand?: React.ReactNode;
8
+ title?: React.ReactNode;
8
9
  showSidebarLeftToggle?: boolean;
9
10
  showPageControls?: boolean;
10
11
  showZoomControls?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papyrus-sdk/ui-react",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "papyrus",
@@ -38,14 +38,14 @@
38
38
  "bugs": {
39
39
  "url": "https://github.com/solrachix/Papyrus/issues"
40
40
  },
41
- "dependencies": {
42
- "@papyrus-sdk/core": "0.2.1",
43
- "@papyrus-sdk/types": "0.2.1"
44
- },
45
41
  "peerDependencies": {
42
+ "@papyrus-sdk/core": ">=0.2.1",
43
+ "@papyrus-sdk/types": ">=0.2.1",
46
44
  "react": ">=18.2.0 <20"
47
45
  },
48
46
  "devDependencies": {
47
+ "@papyrus-sdk/core": "0.2.1",
48
+ "@papyrus-sdk/types": "0.2.1",
49
49
  "react": "^18.2.0"
50
50
  },
51
51
  "scripts": {