@efolusi/meridian 1.9.0 → 1.9.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/code/CopyField.js +5 -1
- package/components.css +3 -2
- package/package.json +1 -1
package/code/CopyField.js
CHANGED
|
@@ -13,10 +13,13 @@ export function CopyField({
|
|
|
13
13
|
}) {
|
|
14
14
|
const [show, setShow] = React.useState(!secret);
|
|
15
15
|
const [copied, setCopied] = React.useState(false);
|
|
16
|
+
const timer = React.useRef(null);
|
|
17
|
+
React.useEffect(() => () => clearTimeout(timer.current), []);
|
|
16
18
|
const copy = () => {
|
|
17
19
|
if (navigator.clipboard) navigator.clipboard.writeText(value).catch(() => {});
|
|
18
20
|
setCopied(true);
|
|
19
|
-
|
|
21
|
+
clearTimeout(timer.current);
|
|
22
|
+
timer.current = setTimeout(() => setCopied(false), 1600);
|
|
20
23
|
};
|
|
21
24
|
const shown = show ? value : '•'.repeat(Math.min(24, String(value).length));
|
|
22
25
|
const box = /*#__PURE__*/React.createElement("span", {
|
|
@@ -35,6 +38,7 @@ export function CopyField({
|
|
|
35
38
|
onClick: copy
|
|
36
39
|
}));
|
|
37
40
|
if (!label) return /*#__PURE__*/React.cloneElement(box, {
|
|
41
|
+
...rest,
|
|
38
42
|
className: 'ef-copyfield__box' + (className ? ' ' + className : ''),
|
|
39
43
|
style
|
|
40
44
|
});
|
package/components.css
CHANGED
|
@@ -436,8 +436,9 @@ a.ef-sourcecard:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
|
436
436
|
/* components/code/CopyField.jsx */
|
|
437
437
|
.ef-copyfield{display:flex;flex-direction:column;gap:6px}
|
|
438
438
|
.ef-copyfield__label{font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--text-primary)}
|
|
439
|
-
.ef-
|
|
440
|
-
.ef-
|
|
439
|
+
.ef-copyfield{min-width:0}
|
|
440
|
+
.ef-copyfield__box{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;height:var(--control-h-md);padding:0 4px 0 12px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface-sunken)}
|
|
441
|
+
.ef-copyfield__value{flex:1;min-width:0;font-family:var(--font-mono);font-size:13px;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:all}
|
|
441
442
|
/* components/code/Diff.jsx */
|
|
442
443
|
.ef-diff{border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--surface-card);overflow:hidden;font-family:var(--font-mono);font-size:12.5px;line-height:1.7}
|
|
443
444
|
.ef-diff__head{display:flex;align-items:center;gap:10px;padding:8px 13px;background:var(--surface-subtle);border-bottom:1px solid var(--border-default);font-size:12px;color:var(--text-secondary);font-family:var(--font-sans)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efolusi/meridian",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "A general-purpose open-source design system by Efolusi: accessible React components, design tokens, blocks and example apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://meridian.efolusi.com",
|