@semiont/react-ui 0.5.20 → 0.5.21
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semiont/react-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=24.0.0"
|
|
6
6
|
},
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"test:split:coverage": "npm run test:coverage"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"react": "^19.
|
|
81
|
-
"react-dom": "^19.
|
|
80
|
+
"react": "^19.2.8",
|
|
81
|
+
"react-dom": "^19.2.8",
|
|
82
82
|
"styled-components": "^6.0.0",
|
|
83
83
|
"vitest": "^4.0.0"
|
|
84
84
|
},
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"directory": "packages/react-ui"
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"@semiont/core": "0.5.
|
|
126
|
-
"@semiont/http-transport": "0.5.
|
|
127
|
-
"@semiont/sdk": "0.5.
|
|
125
|
+
"@semiont/core": "0.5.21",
|
|
126
|
+
"@semiont/http-transport": "0.5.21",
|
|
127
|
+
"@semiont/sdk": "0.5.21",
|
|
128
128
|
"pdfjs-dist": "^6.1.200",
|
|
129
129
|
"react-error-boundary": "^6.1.2",
|
|
130
130
|
"react-markdown": "^10.1.0",
|
|
@@ -71,6 +71,16 @@ describe('Annotate Bar display forms (Phase 3)', () => {
|
|
|
71
71
|
it('stylesheet carries the compact form (static gate — icon-only, chromeless)', () => {
|
|
72
72
|
const css = readFileSync(resolve(process.cwd(), 'src/components/toolbar/Toolbar.css'), 'utf8');
|
|
73
73
|
expect(css).toMatch(/\.semiont-annotate-toolbar--compact\s*\{/);
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
// Icon-only VISUALLY, but the label stays in the accessibility tree: its
|
|
76
|
+
// sibling is a bare emoji span with no accessible name, so `display: none`
|
|
77
|
+
// would leave the collapsed trigger unnamed for screen readers. The
|
|
78
|
+
// clipped-1px technique (same as .semiont-sr-only) is the contract.
|
|
79
|
+
const compactLabel = css.match(
|
|
80
|
+
/\.semiont-annotate-toolbar--compact\s+\.semiont-dropdown-label\s*\{([^}]*)\}/,
|
|
81
|
+
);
|
|
82
|
+
expect(compactLabel).not.toBeNull();
|
|
83
|
+
expect(compactLabel![1]).toMatch(/clip:\s*rect\(0,\s*0,\s*0,\s*0\)/);
|
|
84
|
+
expect(compactLabel![1]).not.toMatch(/display:\s*none/);
|
|
75
85
|
});
|
|
76
86
|
});
|
|
@@ -230,6 +230,18 @@
|
|
|
230
230
|
border-bottom: none;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
/* Icon-only collapsed triggers — but the label stays in the accessibility
|
|
234
|
+
tree rather than `display: none`. Its sibling is a bare emoji span with no
|
|
235
|
+
accessible name, so hiding the label outright would leave the trigger
|
|
236
|
+
unnamed for screen readers. Same technique as .semiont-sr-only. */
|
|
233
237
|
.semiont-annotate-toolbar--compact .semiont-dropdown-label {
|
|
234
|
-
|
|
238
|
+
position: absolute;
|
|
239
|
+
width: 1px;
|
|
240
|
+
height: 1px;
|
|
241
|
+
padding: 0;
|
|
242
|
+
margin: -1px;
|
|
243
|
+
overflow: hidden;
|
|
244
|
+
clip: rect(0, 0, 0, 0);
|
|
245
|
+
white-space: nowrap;
|
|
246
|
+
border-width: 0;
|
|
235
247
|
}
|
|
@@ -121,6 +121,14 @@
|
|
|
121
121
|
background: var(--semiont-color-primary-50, rgba(59, 130, 246, 0.06));
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
/* Dark mode needs its own tint: primary-50 is a near-white wash that would
|
|
125
|
+
glare inside a dark dropzone. Lighter border for contrast, translucent
|
|
126
|
+
fill — matching the upload-area hover treatment above. */
|
|
127
|
+
[data-theme="dark"] .semiont-form__upload-dropzone[data-drag-over="true"] {
|
|
128
|
+
border-color: var(--semiont-color-blue-400);
|
|
129
|
+
background: rgba(59, 130, 246, 0.15);
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
.semiont-form__upload-text {
|
|
125
133
|
font-size: 0.875rem;
|
|
126
134
|
color: var(--semiont-color-gray-600);
|