@kyro-cms/admin 0.10.12 → 0.10.13
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 +8 -8
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/src/components/fields/BlocksField.tsx +22 -4
package/package.json
CHANGED
|
@@ -257,12 +257,18 @@ const SortableBlockComponent = ({
|
|
|
257
257
|
onKeyDown={(e) => { if (e.key === "Enter") commitName(); if (e.key === "Escape") { setNameDraft((block.name as string) || ""); setEditingName(false); } }}
|
|
258
258
|
onClick={(e) => e.stopPropagation()}
|
|
259
259
|
placeholder={getBlockLabel(block.type as string)}
|
|
260
|
-
className="w-full bg-[var(--kyro-surface-accent)] border border-[var(--kyro-primary)] rounded px-2 py-0.5 text-xs font-semibold text-[var(--kyro-text-primary)] outline-none"
|
|
260
|
+
className="w-[150px] sm:w-[250px] md:w-full bg-[var(--kyro-surface-accent)] border border-[var(--kyro-primary)] rounded px-2 py-0.5 text-xs font-semibold text-[var(--kyro-text-primary)] outline-none"
|
|
261
261
|
/>
|
|
262
262
|
) : (
|
|
263
263
|
<div
|
|
264
|
-
onClick={(e) => {
|
|
265
|
-
|
|
264
|
+
onClick={(e) => {
|
|
265
|
+
if (window.innerWidth >= 768) {
|
|
266
|
+
e.stopPropagation();
|
|
267
|
+
setNameDraft((block.name as string) || "");
|
|
268
|
+
setEditingName(true);
|
|
269
|
+
}
|
|
270
|
+
}}
|
|
271
|
+
className="text-xs font-semibold text-[var(--kyro-text-secondary)] truncate md:cursor-text hover:text-[var(--kyro-text-primary)] transition-colors"
|
|
266
272
|
title="Click to rename"
|
|
267
273
|
>
|
|
268
274
|
{itemLabel}
|
|
@@ -310,7 +316,19 @@ const SortableBlockComponent = ({
|
|
|
310
316
|
</button>
|
|
311
317
|
</div>
|
|
312
318
|
) : (
|
|
313
|
-
<div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
|
319
|
+
<div className="flex items-center gap-1 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity">
|
|
320
|
+
<button
|
|
321
|
+
type="button"
|
|
322
|
+
onClick={(e) => {
|
|
323
|
+
e.stopPropagation();
|
|
324
|
+
setNameDraft((block.name as string) || "");
|
|
325
|
+
setEditingName(true);
|
|
326
|
+
}}
|
|
327
|
+
className="md:hidden p-1 hover:bg-[var(--kyro-surface-accent)] rounded text-[var(--kyro-text-secondary)] transition-colors"
|
|
328
|
+
title="Rename Block"
|
|
329
|
+
>
|
|
330
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
|
|
331
|
+
</button>
|
|
314
332
|
<button
|
|
315
333
|
type="button"
|
|
316
334
|
onClick={(e) => {
|