reifyui 0.6.2 → 0.7.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/index.cjs +525 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +513 -77
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/src/components/FileCard.jsx +64 -0
- package/src/components/FilePreview.jsx +207 -0
- package/src/components/FileTypeIcon.jsx +48 -0
- package/src/components/form.jsx +82 -0
- package/src/components/icons.jsx +2 -0
- package/src/index.js +10 -2
- package/src/sheet/SheetGrid.jsx +33 -4
- package/styles/file.css +129 -0
- package/styles/form.css +65 -0
- package/styles/sheet.css +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reifyui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI \u2014 model-agnostic, framework-agnostic, design-system-native. The foundation for building generative-UI and agent products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"highlight.js": "^11",
|
|
71
71
|
"mermaid": "^10 || ^11",
|
|
72
72
|
"react": ">=18",
|
|
73
|
-
"react-dom": ">=18"
|
|
73
|
+
"react-dom": ">=18",
|
|
74
|
+
"react-file-icon": "^1"
|
|
74
75
|
},
|
|
75
76
|
"peerDependenciesMeta": {
|
|
76
77
|
"highlight.js": {
|
|
@@ -81,6 +82,9 @@
|
|
|
81
82
|
},
|
|
82
83
|
"echarts": {
|
|
83
84
|
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"react-file-icon": {
|
|
87
|
+
"optional": true
|
|
84
88
|
}
|
|
85
89
|
},
|
|
86
90
|
"devDependencies": {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// One produced file, as a card: type glyph, name, what it is, download, preview.
|
|
2
|
+
//
|
|
3
|
+
// The same card under a chat answer and inside a spreadsheet cell. Those two started as different
|
|
4
|
+
// things — a full-width row with a Preview button, and a bare text chip — which is how one surface
|
|
5
|
+
// ends up with a download affordance the other never got.
|
|
6
|
+
//
|
|
7
|
+
// `compact` is the only difference between them, and it is a size, not a second component: in a
|
|
8
|
+
// grid cell there is room for a glyph and a name, so the sub-line and the button labels collapse
|
|
9
|
+
// to icons. Everything remains reachable.
|
|
10
|
+
import { Fragment } from 'react';
|
|
11
|
+
import { FileTypeIcon, extOf } from './FileTypeIcon.jsx';
|
|
12
|
+
import { IcDownload, IcEye } from './icons.jsx';
|
|
13
|
+
|
|
14
|
+
/** "PPTX · output" — what it is, then where it came from. `origin` is the caller's word. */
|
|
15
|
+
function subtitle(name, origin, bytes) {
|
|
16
|
+
const parts = [(extOf(name) || 'file').toUpperCase()];
|
|
17
|
+
if (origin) parts.push(origin);
|
|
18
|
+
if (bytes != null) parts.push(bytesLabel(bytes));
|
|
19
|
+
return parts.join(' · ');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function bytesLabel(n) {
|
|
23
|
+
if (n == null) return '';
|
|
24
|
+
if (n < 1024) return `${n} B`;
|
|
25
|
+
if (n < 1048576) return `${Math.round(n / 1024)} KB`;
|
|
26
|
+
return `${(n / 1048576).toFixed(1)} MB`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function FileCard({
|
|
30
|
+
name, origin, bytes, onPreview, onDownload, compact = false, className = '',
|
|
31
|
+
}) {
|
|
32
|
+
// The whole card opens the preview, and the eye repeats it as an explicit target — a card that
|
|
33
|
+
// is clickable without saying so is a card people do not click.
|
|
34
|
+
const open = onPreview ? (e) => { e.stopPropagation(); onPreview(); } : undefined;
|
|
35
|
+
return (
|
|
36
|
+
<div className={'uic-filecard' + (compact ? ' is-compact' : '') + (open ? ' is-clickable' : '')
|
|
37
|
+
+ (className ? ' ' + className : '')}
|
|
38
|
+
onClick={open}
|
|
39
|
+
role={open ? 'button' : undefined}
|
|
40
|
+
tabIndex={open ? 0 : undefined}
|
|
41
|
+
onKeyDown={open ? (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(e); } } : undefined}
|
|
42
|
+
title={name}>
|
|
43
|
+
<span className="uic-filecard-ic"><FileTypeIcon name={name} size={compact ? 20 : 30} /></span>
|
|
44
|
+
<span className="uic-filecard-meta">
|
|
45
|
+
<span className="uic-filecard-name">{name}</span>
|
|
46
|
+
{!compact && <span className="uic-filecard-sub">{subtitle(name, origin, bytes)}</span>}
|
|
47
|
+
</span>
|
|
48
|
+
<Fragment>
|
|
49
|
+
{onDownload && (
|
|
50
|
+
<button type="button" className="uic-filecard-btn" aria-label={`Download ${name}`} title="Download"
|
|
51
|
+
onClick={(e) => { e.stopPropagation(); onDownload(); }}>
|
|
52
|
+
<IcDownload />
|
|
53
|
+
</button>
|
|
54
|
+
)}
|
|
55
|
+
{onPreview && (
|
|
56
|
+
<button type="button" className="uic-filecard-btn" aria-label={`Preview ${name}`} title="Preview"
|
|
57
|
+
onClick={open}>
|
|
58
|
+
<IcEye />
|
|
59
|
+
</button>
|
|
60
|
+
)}
|
|
61
|
+
</Fragment>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// One produced file, rendered. Images, pdf, video, audio, Markdown, spreadsheets, delimited text
|
|
2
|
+
// and code all render inline; anything else says so and offers the download.
|
|
3
|
+
//
|
|
4
|
+
// Ported from the HarnessRouter console, where it was already the answer, so a file previews the
|
|
5
|
+
// same wherever it is opened. Two things changed on the way in, both because a package cannot
|
|
6
|
+
// assume a product:
|
|
7
|
+
//
|
|
8
|
+
// - transport is injected. The console fetches with an auth header; a kit is same-origin and
|
|
9
|
+
// needs none. `fetchFile` defaults to a plain fetch, which is right for same-origin callers.
|
|
10
|
+
// - markdown and code render through props. The package does not depend on a markdown library,
|
|
11
|
+
// and it already ships one code renderer (CodeBlock) — adding a second highlighter to render
|
|
12
|
+
// the same text twice is the duplication this component exists to argue against.
|
|
13
|
+
//
|
|
14
|
+
// `officePdfUrl` is how a caller offers a server-rendered PDF for formats no browser draws
|
|
15
|
+
// (pptx, docx, odp). Without it those fall through to the download, honestly labelled.
|
|
16
|
+
import { useEffect, useState } from 'react';
|
|
17
|
+
import { FileTypeIcon, extOf } from './FileTypeIcon.jsx';
|
|
18
|
+
import { CodeBlock } from './CodeBlock.jsx';
|
|
19
|
+
import { IcDownload, IcX } from './icons.jsx';
|
|
20
|
+
|
|
21
|
+
const LANG = {
|
|
22
|
+
js: 'javascript', mjs: 'javascript', cjs: 'javascript', jsx: 'javascript', ts: 'typescript',
|
|
23
|
+
tsx: 'typescript', py: 'python', rb: 'ruby', go: 'go', rs: 'rust', java: 'java', c: 'c', h: 'c',
|
|
24
|
+
cpp: 'cpp', hpp: 'cpp', cs: 'csharp', php: 'php', swift: 'swift', kt: 'kotlin', scala: 'scala',
|
|
25
|
+
sh: 'bash', bash: 'bash', zsh: 'bash', sql: 'sql', css: 'css', scss: 'scss', less: 'less',
|
|
26
|
+
html: 'xml', htm: 'xml', xml: 'xml', svg: 'xml', json: 'json', yaml: 'yaml', yml: 'yaml',
|
|
27
|
+
toml: 'ini', ini: 'ini', r: 'r', lua: 'lua', pl: 'perl', dockerfile: 'dockerfile', diff: 'diff',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// Presentations and word documents render faithfully through the server's PDF rendition.
|
|
31
|
+
// Spreadsheets render as a real grid instead — a PDF of a sheet is the wrong mental model.
|
|
32
|
+
const OFFICE = new Set(['pptx', 'ppt', 'pptm', 'odp', 'doc', 'docx', 'odt', 'rtf']);
|
|
33
|
+
const SHEET = new Set(['xls', 'xlsx', 'xlsm', 'xlsb', 'ods']);
|
|
34
|
+
|
|
35
|
+
function kindOf(name, mime = '') {
|
|
36
|
+
const e = extOf(name);
|
|
37
|
+
if (mime.startsWith('image/') || /^(png|jpe?g|gif|webp|svg|bmp|ico|avif)$/.test(e)) return 'image';
|
|
38
|
+
if (mime === 'application/pdf' || e === 'pdf') return 'pdf';
|
|
39
|
+
if (mime.startsWith('video/') || ['mp4', 'webm', 'mov', 'm4v'].includes(e)) return 'video';
|
|
40
|
+
if (mime.startsWith('audio/') || ['mp3', 'wav', 'ogg', 'm4a', 'flac'].includes(e)) return 'audio';
|
|
41
|
+
if (e === 'csv' || e === 'tsv') return 'csv';
|
|
42
|
+
if (e === 'md' || e === 'markdown') return 'markdown';
|
|
43
|
+
if (SHEET.has(e)) return 'sheet';
|
|
44
|
+
if (OFFICE.has(e)) return 'office';
|
|
45
|
+
if (mime.startsWith('text/') || LANG[e] || /^(txt|log|env|conf|cfg|gitignore)$/.test(e)) return 'code';
|
|
46
|
+
return 'binary';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function delimitedToRows(text, sep) {
|
|
50
|
+
return text.split(/\r?\n/).filter((l) => l.length).slice(0, 1000).map((line) => {
|
|
51
|
+
const out = []; let cur = ''; let q = false;
|
|
52
|
+
for (const ch of line) {
|
|
53
|
+
if (ch === '"') q = !q;
|
|
54
|
+
else if (ch === sep && !q) { out.push(cur); cur = ''; }
|
|
55
|
+
else cur += ch;
|
|
56
|
+
}
|
|
57
|
+
out.push(cur);
|
|
58
|
+
return out.map((c) => c.replace(/^"|"$/g, ''));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function Grid({ rows }) {
|
|
63
|
+
if (!rows?.length) return <div className="uic-fp-empty">This file is empty.</div>;
|
|
64
|
+
const [head, ...body] = rows;
|
|
65
|
+
return (
|
|
66
|
+
<div className="uic-fp-sheet">
|
|
67
|
+
<table>
|
|
68
|
+
<thead><tr>{head.map((c, i) => <th key={i}>{c}</th>)}</tr></thead>
|
|
69
|
+
<tbody>{body.map((r, i) => <tr key={i}>{r.map((c, j) => <td key={j}>{c}</td>)}</tr>)}</tbody>
|
|
70
|
+
</table>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const defaultDownload = (url, name) => {
|
|
76
|
+
const a = document.createElement('a');
|
|
77
|
+
a.href = url; a.download = name; a.rel = 'noreferrer';
|
|
78
|
+
document.body.appendChild(a); a.click(); a.remove();
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export function FilePreview({
|
|
82
|
+
file, onClose, fetchFile, officePdfUrl, renderMarkdown, onDownload, title,
|
|
83
|
+
}) {
|
|
84
|
+
const { url, name } = file || {};
|
|
85
|
+
const [st, setSt] = useState({ kind: 'loading' });
|
|
86
|
+
const [tab, setTab] = useState(0);
|
|
87
|
+
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (!url) return undefined;
|
|
90
|
+
let alive = true;
|
|
91
|
+
let obj;
|
|
92
|
+
setSt({ kind: 'loading' });
|
|
93
|
+
setTab(0);
|
|
94
|
+
const get = fetchFile || ((u) => fetch(u, { cache: 'no-store' }));
|
|
95
|
+
|
|
96
|
+
(async () => {
|
|
97
|
+
const res = await get(url);
|
|
98
|
+
if (!res.ok) throw new Error(`${res.status}`);
|
|
99
|
+
const mime = (res.headers.get('content-type') || '').toLowerCase();
|
|
100
|
+
const kind = kindOf(name, mime);
|
|
101
|
+
|
|
102
|
+
if (kind === 'office') {
|
|
103
|
+
// The rendition needs the same transport, so it is fetched to a blob rather than handed
|
|
104
|
+
// to an <iframe src> that would carry no credentials.
|
|
105
|
+
if (!officePdfUrl) {
|
|
106
|
+
setSt({ kind: 'binary', error: 'This format has no inline preview here — download it to open it.' });
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const r = await get(officePdfUrl(url));
|
|
110
|
+
if (!r.ok) throw new Error(`${r.status}`);
|
|
111
|
+
obj = URL.createObjectURL(await r.blob());
|
|
112
|
+
if (alive) setSt({ kind: 'pdf', objUrl: obj });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (kind === 'sheet') {
|
|
116
|
+
try {
|
|
117
|
+
const buf = await res.arrayBuffer();
|
|
118
|
+
const XLSX = await import('xlsx');
|
|
119
|
+
const wb = XLSX.read(buf, { type: 'array' });
|
|
120
|
+
// sheet_to_json THROWS on a sheet with no '!ref' — an empty one — and losing that threw
|
|
121
|
+
// away the whole workbook rather than one tab. Tools routinely leave an empty default
|
|
122
|
+
// Sheet1 in front of the real data, so this was most spreadsheets.
|
|
123
|
+
const sheets = wb.SheetNames.map((n) => {
|
|
124
|
+
const ws = wb.Sheets[n] || {};
|
|
125
|
+
const filled = Boolean(ws['!ref']);
|
|
126
|
+
return { name: n, filled, rows: filled ? XLSX.utils.sheet_to_json(ws, { header: 1, raw: false }) : [] };
|
|
127
|
+
});
|
|
128
|
+
// Open on the first sheet that has something: opening on an empty one reads as a broken
|
|
129
|
+
// preview rather than as an empty tab.
|
|
130
|
+
const first = sheets.findIndex((s) => s.filled);
|
|
131
|
+
if (alive) { setTab(first < 0 ? 0 : first); setSt({ kind: 'sheet', sheets }); }
|
|
132
|
+
} catch (e) {
|
|
133
|
+
if (alive) setSt({ kind: 'binary', error: `This spreadsheet couldn’t be read (${String(e?.message || 'parse failed').slice(0, 80)}).` });
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (kind === 'csv' || kind === 'markdown' || kind === 'code') {
|
|
138
|
+
const text = await res.text();
|
|
139
|
+
if (!alive) return;
|
|
140
|
+
if (kind === 'csv') setSt({ kind: 'csv', rows: delimitedToRows(text, extOf(name) === 'tsv' ? '\t' : ',') });
|
|
141
|
+
else setSt({ kind, text: text.slice(0, 400000) });
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (kind === 'binary') { if (alive) setSt({ kind: 'binary' }); return; }
|
|
145
|
+
obj = URL.createObjectURL(await res.blob());
|
|
146
|
+
if (alive) setSt({ kind, objUrl: obj });
|
|
147
|
+
})().catch(() => { if (alive) setSt({ kind: 'binary', error: 'Could not load this file.' }); });
|
|
148
|
+
|
|
149
|
+
return () => { alive = false; if (obj) URL.revokeObjectURL(obj); };
|
|
150
|
+
}, [url, name, fetchFile, officePdfUrl]);
|
|
151
|
+
|
|
152
|
+
const download = () => (onDownload ? onDownload(url, name) : defaultDownload(url, name));
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<aside className="uic-fp" aria-label={title || `Preview of ${name}`}>
|
|
156
|
+
<header className="uic-fp-head">
|
|
157
|
+
<span className="uic-fp-ic"><FileTypeIcon name={name} size={20} /></span>
|
|
158
|
+
<span className="uic-fp-name" title={name}>{name}</span>
|
|
159
|
+
<button type="button" className="uic-fp-btn" aria-label={`Download ${name}`} title="Download"
|
|
160
|
+
onClick={download}><IcDownload /></button>
|
|
161
|
+
{onClose && (
|
|
162
|
+
<button type="button" className="uic-fp-btn" aria-label="Close preview" title="Close"
|
|
163
|
+
onClick={onClose}><IcX size={18} /></button>
|
|
164
|
+
)}
|
|
165
|
+
</header>
|
|
166
|
+
|
|
167
|
+
<div className="uic-fp-body">
|
|
168
|
+
{st.kind === 'loading' && <div className="uic-fp-pad"><span className="uic-skel uic-fp-skel" /></div>}
|
|
169
|
+
{st.kind === 'image' && st.objUrl && <div className="uic-fp-center"><img className="uic-fp-img" src={st.objUrl} alt={name} /></div>}
|
|
170
|
+
{st.kind === 'pdf' && st.objUrl && <iframe className="uic-fp-frame" src={st.objUrl} title={name} />}
|
|
171
|
+
{st.kind === 'video' && st.objUrl && <div className="uic-fp-center"><video className="uic-fp-media" src={st.objUrl} controls /></div>}
|
|
172
|
+
{st.kind === 'audio' && st.objUrl && <div className="uic-fp-center"><audio src={st.objUrl} controls /></div>}
|
|
173
|
+
{st.kind === 'markdown' && (
|
|
174
|
+
<div className="uic-fp-doc">
|
|
175
|
+
{renderMarkdown ? renderMarkdown(st.text || '') : <pre className="uic-fp-pre">{st.text}</pre>}
|
|
176
|
+
</div>
|
|
177
|
+
)}
|
|
178
|
+
{st.kind === 'code' && <CodeBlock code={st.text || ''} lang={LANG[extOf(name)] || 'plaintext'} />}
|
|
179
|
+
{st.kind === 'csv' && <Grid rows={st.rows} />}
|
|
180
|
+
{st.kind === 'sheet' && st.sheets && (
|
|
181
|
+
<div className="uic-fp-xlsx">
|
|
182
|
+
{st.sheets[tab]?.filled ? <Grid rows={st.sheets[tab].rows} />
|
|
183
|
+
: <div className="uic-fp-empty">This sheet is empty.</div>}
|
|
184
|
+
{/* Shown even for one sheet: the tab bar is what tells someone they are looking at a
|
|
185
|
+
workbook, and hiding it is what made an empty first sheet read as a failure. */}
|
|
186
|
+
<div className="uic-fp-tabs">
|
|
187
|
+
{st.sheets.map((s, i) => (
|
|
188
|
+
<button key={s.name + i} type="button"
|
|
189
|
+
className={'uic-fp-tab' + (i === tab ? ' is-on' : '') + (s.filled ? '' : ' is-empty')}
|
|
190
|
+
onClick={() => setTab(i)} title={s.filled ? s.name : `${s.name} (empty)`}>{s.name}</button>
|
|
191
|
+
))}
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
)}
|
|
195
|
+
{st.kind === 'binary' && (
|
|
196
|
+
<div className="uic-fp-center">
|
|
197
|
+
<div className="uic-fp-fallback">
|
|
198
|
+
<FileTypeIcon name={name} size={56} />
|
|
199
|
+
<p>{st.error || 'No inline preview for this file type.'}</p>
|
|
200
|
+
<button type="button" className="uic-fp-dl" onClick={download}>Download</button>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
)}
|
|
204
|
+
</div>
|
|
205
|
+
</aside>
|
|
206
|
+
);
|
|
207
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// The coloured file-type glyph — pdf red, docx blue, xlsx green, pptx orange, py yellow.
|
|
2
|
+
//
|
|
3
|
+
// react-file-icon is the standard library for this and it is already what the HarnessRouter
|
|
4
|
+
// console draws, so a file looks the same wherever it appears: a card under an answer, a card in
|
|
5
|
+
// a spreadsheet cell, the header of a preview pane. Redrawing these per surface is how two
|
|
6
|
+
// products end up disagreeing about what a .pptx looks like.
|
|
7
|
+
//
|
|
8
|
+
// The dependency is OPTIONAL. Where it is absent the extension is drawn as a plain badge rather
|
|
9
|
+
// than nothing, because a file with no glyph still needs to be identifiable.
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
export function extOf(name) {
|
|
13
|
+
const m = String(name || '').toLowerCase().match(/\.([a-z0-9]+)$/);
|
|
14
|
+
return m ? m[1] : '';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let mod = null; // { FileIcon, defaultStyles } once resolved
|
|
18
|
+
let tried = false;
|
|
19
|
+
|
|
20
|
+
export function FileTypeIcon({ name, size = 36 }) {
|
|
21
|
+
const [, force] = useState(0);
|
|
22
|
+
const ext = extOf(name);
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (tried || mod) return;
|
|
26
|
+
tried = true;
|
|
27
|
+
import('react-file-icon')
|
|
28
|
+
.then((m) => { mod = m; force((n) => n + 1); })
|
|
29
|
+
.catch(() => { /* not installed; the badge below is the answer */ });
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const box = { width: size, height: Math.round(size * 1.16), display: 'inline-block', flex: '0 0 auto' };
|
|
33
|
+
|
|
34
|
+
if (!mod) {
|
|
35
|
+
return (
|
|
36
|
+
<span className="uic-fileglyph" style={box} aria-hidden="true">
|
|
37
|
+
<span className="uic-fileglyph-ext">{(ext || 'file').slice(0, 4)}</span>
|
|
38
|
+
</span>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const { FileIcon, defaultStyles } = mod;
|
|
42
|
+
const style = defaultStyles?.[ext] || {};
|
|
43
|
+
return (
|
|
44
|
+
<span style={box}>
|
|
45
|
+
<FileIcon extension={ext || undefined} {...style} />
|
|
46
|
+
</span>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Form primitives: a labelled field, and the three controls that go in one.
|
|
2
|
+
//
|
|
3
|
+
// Every surface in this stack had been hand-rolling `<label>Text<select className="…-input">`,
|
|
4
|
+
// which is why the same form looks different in each of them — different label weight, different
|
|
5
|
+
// focus ring, a hint that is a paragraph in one place and a caption in another. These are the
|
|
6
|
+
// smallest components that make that impossible.
|
|
7
|
+
//
|
|
8
|
+
// A Field owns the label, the hint and the error, so a control never has to render its own and
|
|
9
|
+
// they never disagree about spacing. Passing `error` replaces the hint rather than stacking on it:
|
|
10
|
+
// once something is wrong, the thing to read is what is wrong.
|
|
11
|
+
import { useId } from 'react';
|
|
12
|
+
import { Chevron } from './icons.jsx';
|
|
13
|
+
|
|
14
|
+
export function Field({ label, hint, error, htmlFor, required, children, className = '' }) {
|
|
15
|
+
return (
|
|
16
|
+
<div className={'uic-field' + (error ? ' is-error' : '') + (className ? ' ' + className : '')}>
|
|
17
|
+
{label && (
|
|
18
|
+
<label className="uic-field-label" htmlFor={htmlFor}>
|
|
19
|
+
{label}{required && <span className="uic-field-req" aria-hidden="true">*</span>}
|
|
20
|
+
</label>
|
|
21
|
+
)}
|
|
22
|
+
{children}
|
|
23
|
+
{error ? <p className="uic-field-err">{error}</p>
|
|
24
|
+
: hint ? <p className="uic-field-hint">{hint}</p> : null}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** A field whose control is generated for it — the common case, wired for accessibility. */
|
|
30
|
+
function withField(Control) {
|
|
31
|
+
return function Fielded({ label, hint, error, required, id, className, ...rest }) {
|
|
32
|
+
const auto = useId();
|
|
33
|
+
const inputId = id || auto;
|
|
34
|
+
return (
|
|
35
|
+
<Field label={label} hint={hint} error={error} required={required} htmlFor={inputId} className={className}>
|
|
36
|
+
<Control id={inputId} invalid={!!error} required={required} {...rest} />
|
|
37
|
+
</Field>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function BareInput({ invalid, ...rest }) {
|
|
43
|
+
return <input className={'uic-input' + (invalid ? ' is-error' : '')} aria-invalid={invalid || undefined} {...rest} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function BareTextarea({ invalid, rows = 4, ...rest }) {
|
|
47
|
+
return <textarea className={'uic-input uic-textarea' + (invalid ? ' is-error' : '')}
|
|
48
|
+
rows={rows} aria-invalid={invalid || undefined} {...rest} />;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Options are [{value, label, disabled}] or plain strings. The chevron is drawn rather than left
|
|
52
|
+
* to the platform, because the platform's differs per OS and the rest of this form does not. */
|
|
53
|
+
function BareSelect({ invalid, options = [], placeholder, ...rest }) {
|
|
54
|
+
return (
|
|
55
|
+
<span className="uic-select-wrap">
|
|
56
|
+
<select className={'uic-input uic-select' + (invalid ? ' is-error' : '')}
|
|
57
|
+
aria-invalid={invalid || undefined} {...rest}>
|
|
58
|
+
{placeholder && <option value="">{placeholder}</option>}
|
|
59
|
+
{options.map((o) => {
|
|
60
|
+
const opt = typeof o === 'string' ? { value: o, label: o } : o;
|
|
61
|
+
return <option key={opt.value} value={opt.value} disabled={opt.disabled}>{opt.label}</option>;
|
|
62
|
+
})}
|
|
63
|
+
</select>
|
|
64
|
+
<span className="uic-select-chev" aria-hidden="true"><Chevron dir="down" size={14} /></span>
|
|
65
|
+
</span>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const Input = withField(BareInput);
|
|
70
|
+
export const Textarea = withField(BareTextarea);
|
|
71
|
+
export const Select = withField(BareSelect);
|
|
72
|
+
|
|
73
|
+
/** The row a form ends with. `align` is 'end' by default because the primary action belongs where
|
|
74
|
+
* the eye leaves the last control. */
|
|
75
|
+
export function FormActions({ children, align = 'end', className = '' }) {
|
|
76
|
+
return <div className={`uic-form-actions is-${align}${className ? ' ' + className : ''}`}>{children}</div>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** The two buttons that row almost always holds, so their order stops being a per-form decision. */
|
|
80
|
+
export function Button({ variant = 'default', size = 'md', type = 'button', className = '', ...rest }) {
|
|
81
|
+
return <button type={type} className={`uic-btn is-${variant} is-${size}${className ? ' ' + className : ''}`} {...rest} />;
|
|
82
|
+
}
|
package/src/components/icons.jsx
CHANGED
|
@@ -40,3 +40,5 @@ export const IcX = ({ size = 14 }) => <Svg s={size}><path d="M18 6 6 18M6 6l12 1
|
|
|
40
40
|
export const IcMic = ({ size = 15 }) => <Svg s={size}><rect x="9" y="2" width="6" height="12" rx="3" /><path d="M5 11a7 7 0 0 0 14 0M12 18v4M8 22h8" /></Svg>;
|
|
41
41
|
export const IcPaperclip = ({ size = 16 }) => <Svg s={size}><path d="M21.4 11.1 12.2 20.3a5.5 5.5 0 0 1-7.8-7.8l9.2-9.2a3.7 3.7 0 0 1 5.2 5.2l-9.2 9.2a1.8 1.8 0 0 1-2.6-2.6l8.5-8.5" /></Svg>;
|
|
42
42
|
export const IcPanelRight = ({ size = 17 }) => <Svg s={size}><rect x="3" y="4" width="18" height="16" rx="2" /><path d="M15 4v16" /></Svg>;
|
|
43
|
+
export const IcDownload = ({ size = 16 }) => <Svg s={size}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><path d="M7 10l5 5 5-5" /><path d="M12 15V3" /></Svg>;
|
|
44
|
+
export const IcEye = ({ size = 15 }) => <Svg s={size}><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z" /><circle cx="12" cy="12" r="3" /></Svg>;
|
package/src/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { createConversationStore } from './state/conversationStore.js';
|
|
|
8
8
|
// here too because ChatPanel's loadHistory takes messages, and converting history must not require
|
|
9
9
|
// importing a transport. Pure function, no fetch.
|
|
10
10
|
export { turnsToMessages } from './state/turns.js';
|
|
11
|
-
export { Svg, Chevron, IcTool, IcPlug, IcSkill, IcTerminal, IcDoc, IcList, IcGlobe, IcSearch, IcScroll, IcSpawn, IcCheck, IcThink, IcSend, IcX, IcMic, IcPaperclip, IcPanelRight } from './components/icons.jsx';
|
|
11
|
+
export { Svg, Chevron, IcDownload, IcEye, IcTool, IcPlug, IcSkill, IcTerminal, IcDoc, IcList, IcGlobe, IcSearch, IcScroll, IcSpawn, IcCheck, IcThink, IcSend, IcX, IcMic, IcPaperclip, IcPanelRight } from './components/icons.jsx';
|
|
12
12
|
export { humanize, parseArgs, baseName, prettyJson, toolMeta, summarizeSteps } from './components/toolMeta.js';
|
|
13
13
|
export { ToolGroup, ToolRow } from './components/ToolSteps.jsx';
|
|
14
14
|
export { ChatMessages, ChatMessagesSkeleton, UserTurn, AssistantTurn, DEFAULT_STATUS_LABELS } from './components/ChatMessages.jsx';
|
|
@@ -44,7 +44,15 @@ export {
|
|
|
44
44
|
export { AuthForm } from './auth/AuthForm.jsx';
|
|
45
45
|
export { GoogleButton, GOOGLE_ENABLED } from './auth/GoogleButton.jsx';
|
|
46
46
|
// Shared AI-spreadsheet grid (reusable in the Sheets product AND studio Spaces).
|
|
47
|
-
export { SheetGrid, sheetToDelimited, sheetToAoA } from './sheet/SheetGrid.jsx';
|
|
47
|
+
export { SheetGrid, sheetToDelimited, sheetToAoA, fitRowHeights } from './sheet/SheetGrid.jsx';
|
|
48
|
+
// Files, drawn the same wherever they appear. FileTypeIcon uses react-file-icon when it is
|
|
49
|
+
// installed (an optional peer) and falls back to an extension badge when it is not.
|
|
50
|
+
export { FileTypeIcon, extOf } from './components/FileTypeIcon.jsx';
|
|
51
|
+
export { FileCard } from './components/FileCard.jsx';
|
|
52
|
+
export { FilePreview } from './components/FilePreview.jsx';
|
|
53
|
+
// Form primitives. Every surface here had been hand-rolling label+select+textarea, which is why
|
|
54
|
+
// the same form looked different in each of them.
|
|
55
|
+
export { Field, Input, Textarea, Select, FormActions, Button } from './components/form.jsx';
|
|
48
56
|
// ── the library page: the surface a document product opens on ────────────────
|
|
49
57
|
// Small, product-agnostic pieces that existed 3-6 times each across the products built on this
|
|
50
58
|
// package, every copy slightly different. Needs styles/library.css (+ chip.css, preview.css).
|
package/src/sheet/SheetGrid.jsx
CHANGED
|
@@ -468,7 +468,7 @@ export function SheetGrid({
|
|
|
468
468
|
</thead>
|
|
469
469
|
<tbody>
|
|
470
470
|
{rows.map((row, ri) => (
|
|
471
|
-
<tr key={row.id}
|
|
471
|
+
<tr key={row.id} data-row-id={row.id}
|
|
472
472
|
style={{
|
|
473
473
|
...(rowHeight(row) ? { height: rowHeight(row) } : null),
|
|
474
474
|
'--shg-clamp': Math.max(1, Math.floor(((rowHeight(row) || 34) - 10) / 18)),
|
|
@@ -496,7 +496,7 @@ export function SheetGrid({
|
|
|
496
496
|
runCell: onRunCell && !readOnly ? () => onRunCell(row.id, col.id) : null,
|
|
497
497
|
});
|
|
498
498
|
return (
|
|
499
|
-
<td key={col.id}
|
|
499
|
+
<td key={col.id} data-col-id={col.id}
|
|
500
500
|
className={'shg-cell' + (computed ? ' shg-cell-compute' : '')
|
|
501
501
|
+ (c.status && computed ? ` shg-cell-${c.status}` : '')
|
|
502
502
|
+ (peer ? ' shg-cell-peer' : '')}
|
|
@@ -521,8 +521,7 @@ export function SheetGrid({
|
|
|
521
521
|
)}
|
|
522
522
|
{peer && <span className="shg-peer-flag" style={{ background: peer.color }}>{peer.name}</span>}
|
|
523
523
|
{isEditing ? renderEditor(col) : (
|
|
524
|
-
<div className="shg-val"
|
|
525
|
-
style={{ maxWidth: (colWidth(col) ? colWidth(col) - 20 : 400) }}>
|
|
524
|
+
<div className="shg-val">
|
|
526
525
|
{custom !== undefined ? custom : (
|
|
527
526
|
<>
|
|
528
527
|
{computed && <StatusDot status={c.status} />}
|
|
@@ -714,6 +713,36 @@ function ColumnMenu({ col, columns, anchor, columnTypes, renderColumnConfig, onA
|
|
|
714
713
|
);
|
|
715
714
|
}
|
|
716
715
|
|
|
716
|
+
/**
|
|
717
|
+
* The height each row would need to show its content in full, measured from what is on screen.
|
|
718
|
+
*
|
|
719
|
+
* A row is clamped to its height by design — a sheet you cannot scan is not a sheet. But after a
|
|
720
|
+
* run, the thing a person wants is the answer, and an answer cut off at one line with no way to
|
|
721
|
+
* see the rest is the grid hiding the work it just paid for. So the host measures and commits a
|
|
722
|
+
* height, ONCE, rather than the grid guessing continuously.
|
|
723
|
+
*
|
|
724
|
+
* Measured, not estimated: `scrollHeight` is what the content actually occupies at this width,
|
|
725
|
+
* including the file cards. A formula over character counts would be a number nobody derived.
|
|
726
|
+
*
|
|
727
|
+
* Returns { rowId: px } for the rows given (or every row), clamped to [min, max].
|
|
728
|
+
*/
|
|
729
|
+
export function fitRowHeights(container, { rowIds, min = 34, max = 320, padding = 12 } = {}) {
|
|
730
|
+
if (!container) return {};
|
|
731
|
+
const out = {};
|
|
732
|
+
const rows = container.querySelectorAll('tr[data-row-id]');
|
|
733
|
+
for (const tr of rows) {
|
|
734
|
+
const id = tr.getAttribute('data-row-id');
|
|
735
|
+
if (rowIds && !rowIds.includes(id)) continue;
|
|
736
|
+
let tallest = 0;
|
|
737
|
+
for (const cell of tr.querySelectorAll('td[data-col-id] .shg-val')) {
|
|
738
|
+
// The value box is clipped to the row; its scrollHeight is the content's real height.
|
|
739
|
+
tallest = Math.max(tallest, cell.scrollHeight);
|
|
740
|
+
}
|
|
741
|
+
if (tallest) out[id] = Math.min(max, Math.max(min, Math.round(tallest + padding)));
|
|
742
|
+
}
|
|
743
|
+
return out;
|
|
744
|
+
}
|
|
745
|
+
|
|
717
746
|
// ── Export helpers (CSV / TSV / array-of-arrays) ─────────────────────────────
|
|
718
747
|
// cellText(cell, column) lets a host say what one of its own column types is worth in a flat
|
|
719
748
|
// file. Without it a cell whose value is an object exports as raw JSON, which is what a
|
package/styles/file.css
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/* Files: the card that names one, and the pane that renders it.
|
|
2
|
+
Ported from the HarnessRouter console so a file looks the same wherever it appears — under a
|
|
3
|
+
chat answer, inside a spreadsheet cell, in a preview header. Product-neutral: every colour is
|
|
4
|
+
a --uic-* token. */
|
|
5
|
+
|
|
6
|
+
/* ── the card ──────────────────────────────────────────────────────────── */
|
|
7
|
+
.uic-filecard {
|
|
8
|
+
display: flex; align-items: center; gap: 10px; min-width: 0;
|
|
9
|
+
padding: 10px 12px; border-radius: 12px;
|
|
10
|
+
border: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
|
|
11
|
+
box-shadow: var(--uic-shadow-1, 0 1px 2px rgba(17, 24, 39, .04));
|
|
12
|
+
}
|
|
13
|
+
.uic-filecard.is-clickable { cursor: pointer; }
|
|
14
|
+
.uic-filecard.is-clickable:hover { border-color: var(--uic-brand-soft, #E1E9FF); }
|
|
15
|
+
.uic-filecard:focus-visible { outline: 2px solid var(--uic-brand, #285AFF); outline-offset: 2px; }
|
|
16
|
+
.uic-filecard-ic { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
|
|
17
|
+
.uic-filecard-meta { flex: 1 1 auto; min-width: 0; }
|
|
18
|
+
.uic-filecard-name {
|
|
19
|
+
display: block; font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317);
|
|
20
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
21
|
+
}
|
|
22
|
+
.uic-filecard-sub {
|
|
23
|
+
display: block; margin-top: 2px; font-size: 12px; color: var(--uic-mute, #5B5D66);
|
|
24
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
25
|
+
}
|
|
26
|
+
.uic-filecard-btn {
|
|
27
|
+
width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px;
|
|
28
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
29
|
+
border: 1px solid transparent; background: transparent; cursor: pointer;
|
|
30
|
+
color: var(--uic-mute, #5B5D66);
|
|
31
|
+
}
|
|
32
|
+
.uic-filecard-btn:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-brand, #285AFF); }
|
|
33
|
+
|
|
34
|
+
/* Compact is a size, not a second component: in a grid cell there is room for a glyph and a name,
|
|
35
|
+
so the sub-line goes and the buttons appear on hover. Everything stays reachable by keyboard. */
|
|
36
|
+
.uic-filecard.is-compact {
|
|
37
|
+
gap: 6px; padding: 3px 5px; border-radius: 8px; box-shadow: none;
|
|
38
|
+
background: var(--uic-brand-faint, #EFF3FF); border-color: transparent;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
}
|
|
41
|
+
.uic-filecard.is-compact .uic-filecard-name { font-size: 11.5px; font-weight: 500; }
|
|
42
|
+
.uic-filecard.is-compact .uic-filecard-btn { width: 20px; height: 20px; opacity: 0; }
|
|
43
|
+
.uic-filecard.is-compact:hover .uic-filecard-btn,
|
|
44
|
+
.uic-filecard.is-compact:focus-within .uic-filecard-btn { opacity: 1; }
|
|
45
|
+
|
|
46
|
+
/* The fallback glyph, for a build without react-file-icon. A file with no icon still has to be
|
|
47
|
+
identifiable, so the extension itself is the icon. */
|
|
48
|
+
.uic-fileglyph {
|
|
49
|
+
border-radius: 4px; background: var(--uic-surface-2, #F7F8FA);
|
|
50
|
+
border: 1px solid var(--uic-line, #DDDFE6);
|
|
51
|
+
display: inline-flex !important; align-items: flex-end; justify-content: center; padding-bottom: 2px;
|
|
52
|
+
}
|
|
53
|
+
.uic-fileglyph-ext {
|
|
54
|
+
font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
|
|
55
|
+
color: var(--uic-mute, #5B5D66);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ── the preview pane ──────────────────────────────────────────────────── */
|
|
59
|
+
.uic-fp {
|
|
60
|
+
display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%;
|
|
61
|
+
background: var(--uic-surface, #FFFFFF);
|
|
62
|
+
}
|
|
63
|
+
.uic-fp-head {
|
|
64
|
+
flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
|
|
65
|
+
padding: 10px 12px; border-bottom: 1px solid var(--uic-line, #DDDFE6);
|
|
66
|
+
}
|
|
67
|
+
.uic-fp-ic { flex: 0 0 auto; display: flex; }
|
|
68
|
+
.uic-fp-name {
|
|
69
|
+
flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317);
|
|
70
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
.uic-fp-btn {
|
|
73
|
+
width: 30px; height: 30px; flex: 0 0 auto; border: none; background: transparent;
|
|
74
|
+
border-radius: 8px; cursor: pointer; color: var(--uic-mute, #5B5D66);
|
|
75
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
76
|
+
}
|
|
77
|
+
.uic-fp-btn:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-ink, #111317); }
|
|
78
|
+
|
|
79
|
+
.uic-fp-body { flex: 1; min-height: 0; overflow: auto; }
|
|
80
|
+
.uic-fp-pad { padding: 18px; }
|
|
81
|
+
.uic-fp-skel { display: block; width: 100%; height: 220px; border-radius: 10px; }
|
|
82
|
+
.uic-fp-center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px; }
|
|
83
|
+
.uic-fp-img, .uic-fp-media { max-width: 100%; max-height: 100%; border-radius: 8px; }
|
|
84
|
+
.uic-fp-frame { width: 100%; height: 100%; min-height: 480px; border: 0; display: block; }
|
|
85
|
+
.uic-fp-doc {
|
|
86
|
+
padding: 22px 26px; max-width: 820px; margin: 0 auto;
|
|
87
|
+
font-size: 14px; line-height: 1.65; color: var(--uic-ink, #111317);
|
|
88
|
+
}
|
|
89
|
+
.uic-fp-doc table { border-collapse: collapse; margin: 0 0 1em; }
|
|
90
|
+
.uic-fp-doc td, .uic-fp-doc th { border: 1px solid var(--uic-line, #DDDFE6); padding: 5px 9px; }
|
|
91
|
+
.uic-fp-doc img { max-width: 100%; }
|
|
92
|
+
.uic-fp-pre { margin: 0; white-space: pre-wrap; font-family: var(--uic-mono, ui-monospace, Menlo, monospace); font-size: 12.5px; }
|
|
93
|
+
|
|
94
|
+
.uic-fp-sheet { padding: 14px; overflow: auto; }
|
|
95
|
+
.uic-fp-sheet table { border-collapse: collapse; font-size: 12.5px; width: max-content; }
|
|
96
|
+
.uic-fp-sheet td, .uic-fp-sheet th {
|
|
97
|
+
border: 1px solid var(--uic-line, #DDDFE6); padding: 4px 10px; white-space: nowrap;
|
|
98
|
+
min-width: 56px; color: var(--uic-ink-2, #3A3D45);
|
|
99
|
+
}
|
|
100
|
+
.uic-fp-sheet th { background: var(--uic-surface-2, #F7F8FA); font-weight: 600; text-align: left; }
|
|
101
|
+
.uic-fp-xlsx { display: flex; flex-direction: column; height: 100%; min-height: 0; }
|
|
102
|
+
.uic-fp-xlsx .uic-fp-sheet { flex: 1; min-height: 0; }
|
|
103
|
+
.uic-fp-tabs {
|
|
104
|
+
flex: 0 0 auto; display: flex; gap: 2px; padding: 6px 8px; overflow-x: auto;
|
|
105
|
+
border-top: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface-2, #F7F8FA);
|
|
106
|
+
}
|
|
107
|
+
.uic-fp-tab {
|
|
108
|
+
flex: 0 0 auto; max-width: 180px; padding: 5px 12px; cursor: pointer;
|
|
109
|
+
font-size: 12px; font-weight: 600; font-family: inherit; color: var(--uic-mute, #5B5D66);
|
|
110
|
+
background: transparent; border: 1px solid transparent; border-radius: 7px 7px 0 0;
|
|
111
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
112
|
+
}
|
|
113
|
+
.uic-fp-tab.is-on {
|
|
114
|
+
color: var(--uic-brand, #285AFF); background: var(--uic-surface, #FFFFFF);
|
|
115
|
+
border-color: var(--uic-line, #DDDFE6); border-bottom-color: var(--uic-surface, #FFFFFF);
|
|
116
|
+
}
|
|
117
|
+
.uic-fp-tab.is-empty { opacity: .55; font-weight: 500; }
|
|
118
|
+
.uic-fp-empty {
|
|
119
|
+
display: flex; align-items: center; justify-content: center; padding: 32px;
|
|
120
|
+
color: var(--uic-mute, #5B5D66); font-size: 13px;
|
|
121
|
+
}
|
|
122
|
+
.uic-fp-fallback { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
|
|
123
|
+
.uic-fp-fallback p { margin: 0; font-size: 13px; color: var(--uic-mute, #5B5D66); }
|
|
124
|
+
.uic-fp-dl {
|
|
125
|
+
font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
|
|
126
|
+
padding: 7px 14px; border-radius: 9px;
|
|
127
|
+
color: var(--uic-brand, #285AFF); background: var(--uic-brand-faint, #EFF3FF);
|
|
128
|
+
border: 1px solid var(--uic-brand-soft, #E1E9FF);
|
|
129
|
+
}
|