@cardinali-studio/adminkit 2.2.14 → 2.2.15
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.
|
@@ -84,7 +84,7 @@ function HeroScreen({ value, onChange, pick }) {
|
|
|
84
84
|
const patch = (next) => onChange({ ...value, hero: { ...hero, ...next } });
|
|
85
85
|
const title = strings(hero.title);
|
|
86
86
|
const narrow = strings(hero.narrow);
|
|
87
|
-
return (_jsx(Screen, { hint: "La prima schermata: la foto a tutta pagina e il titolo sopra.", children: _jsxs("div", { className: "hm-split", children: [_jsx(Photo, { value: str(hero.photo), label: "Foto", onPick: () => pick((photo) => patch({ photo })), onClear: () => patch({ photo: "" }) }), _jsxs("div", { className: "hm-side", children: [_jsxs(Block, { title: "Titolo", children: [_jsx("div", { className: "hm-title-preview", "aria-hidden": "true", children: (title.length ? title : ["Il titolo della home"]).map((line, index) => (_jsx("span", { className: title.length ? "" : "is-empty", children: line }, index))) }), _jsx(Rows, { items: title, ids: title.map((_, i) => `riga-${i}`), onChange: (next) => patch({ title: next }), onAdd: () => patch({ title: [...title, ""] }), addLabel: "Aggiungi riga", empty: "Nessuna riga: il titolo non comparirebbe.", render: (line, index, set) => (_jsx("input", { className: "pw-field", value: line, maxLength: 30, placeholder: `Riga ${index + 1}`, "aria-label": `Riga ${index + 1} del titolo`, onChange: (event) => set(event.target.value) })) })] }), _jsxs(Block, { title: "Titolo su schermi stretti", children: [_jsx("p", { className: "pw-empty-note", children: "Su un telefono le righe larghe rimpicciolirebbero tutto il titolo, quindi qui si spezza pi\u00F9 corto. Lasciandolo vuoto si usano comunque le righe qui sopra." }), _jsx(Rows, { items: narrow, ids: narrow.map((_, i) => `stretta-${i}`), onChange: (next) => patch({ narrow: next }), onAdd: () => patch({ narrow: [...narrow, ""] }), addLabel: "Aggiungi riga", render: (line, index, set) => (_jsx("input", { className: "pw-field", value: line, maxLength: 20, placeholder: `Riga ${index + 1}`, "aria-label": `Riga ${index + 1} del titolo su schermi stretti`, onChange: (event) => set(event.target.value) })) })] }), _jsx(Block, { children: _jsx(Field, { label: "Invito allo scroll", note: "in fondo alla schermata", children: _jsx(Text, { value: str(hero.scroll), maxLength: 20, placeholder: "Scroll", onChange: (scroll) => patch({ scroll }) }) }) })] })] }) }));
|
|
87
|
+
return (_jsx(Screen, { hint: "La prima schermata: la foto a tutta pagina e il titolo sopra.", children: _jsxs("div", { className: "hm-split", children: [_jsxs("div", { className: "hm-photos", children: [_jsx(Photo, { value: str(hero.photo), label: "Foto", note: "schermi larghi", onPick: () => pick((photo) => patch({ photo })), onClear: () => patch({ photo: "" }) }), _jsx(Photo, { value: str(hero.mobile), label: "Foto", note: "telefono", ratio: "portrait", onPick: () => pick((mobile) => patch({ mobile })), onClear: () => patch({ mobile: "" }) })] }), _jsxs("div", { className: "hm-side", children: [_jsxs(Block, { title: "Titolo", children: [_jsx("div", { className: "hm-title-preview", "aria-hidden": "true", children: (title.length ? title : ["Il titolo della home"]).map((line, index) => (_jsx("span", { className: title.length ? "" : "is-empty", children: line }, index))) }), _jsx(Rows, { items: title, ids: title.map((_, i) => `riga-${i}`), onChange: (next) => patch({ title: next }), onAdd: () => patch({ title: [...title, ""] }), addLabel: "Aggiungi riga", empty: "Nessuna riga: il titolo non comparirebbe.", render: (line, index, set) => (_jsx("input", { className: "pw-field", value: line, maxLength: 30, placeholder: `Riga ${index + 1}`, "aria-label": `Riga ${index + 1} del titolo`, onChange: (event) => set(event.target.value) })) })] }), _jsxs(Block, { title: "Titolo su schermi stretti", children: [_jsx("p", { className: "pw-empty-note", children: "Su un telefono le righe larghe rimpicciolirebbero tutto il titolo, quindi qui si spezza pi\u00F9 corto. Lasciandolo vuoto si usano comunque le righe qui sopra." }), _jsx(Rows, { items: narrow, ids: narrow.map((_, i) => `stretta-${i}`), onChange: (next) => patch({ narrow: next }), onAdd: () => patch({ narrow: [...narrow, ""] }), addLabel: "Aggiungi riga", render: (line, index, set) => (_jsx("input", { className: "pw-field", value: line, maxLength: 20, placeholder: `Riga ${index + 1}`, "aria-label": `Riga ${index + 1} del titolo su schermi stretti`, onChange: (event) => set(event.target.value) })) })] }), _jsx(Block, { children: _jsx(Field, { label: "Invito allo scroll", note: "in fondo alla schermata", children: _jsx(Text, { value: str(hero.scroll), maxLength: 20, placeholder: "Scroll", onChange: (scroll) => patch({ scroll }) }) }) })] })] }) }));
|
|
88
88
|
}
|
|
89
89
|
/* ---- Statistiche ----------------------------------------------------------------------------- */
|
|
90
90
|
function StatsScreen({ value, onChange, pick }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardinali-studio/adminkit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Motore riusabile di un pannello di amministrazione per siti Hugo su Cloudflare Pages: codec del front matter guidato dallo schema, form React, libreria media su R2. NIENTE di specifico di un sito qui dentro.",
|
|
6
6
|
"license": "UNLICENSED",
|