@sensorario/sg-components 0.0.101 → 0.0.103
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/components/AppAccessGate/AppAccessGate.d.ts +10 -0
- package/dist/components/AppAccessGate/AppAccessGate.stories.d.ts +8 -0
- package/dist/components/AppLauncher/AppLauncher.d.ts +5 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Quadrato/Header/QuadratoHeader.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +180 -83
- package/dist/sg-components.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './AppAccessGate.css';
|
|
2
|
+
export declare const DEFAULT_HEIMDALL_URL = "https://api.simonegentili.com/heimdall";
|
|
3
|
+
interface AppAccessGateProps {
|
|
4
|
+
/** Logged-in user's JWT. Without it there's nothing to check: the app's own login flow applies. */
|
|
5
|
+
token: string | null;
|
|
6
|
+
/** Base URL of the Heimdall API (`/access`, `/access-requests`). */
|
|
7
|
+
heimdallUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const AppAccessGate: ({ token, heimdallUrl }: AppAccessGateProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default AppAccessGate;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import AppAccessGate from './AppAccessGate';
|
|
3
|
+
declare const meta: Meta<typeof AppAccessGate>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AppAccessGate>;
|
|
6
|
+
export declare const NotGranted: Story;
|
|
7
|
+
export declare const Pending: Story;
|
|
8
|
+
export declare const Rejected: Story;
|
|
@@ -3,12 +3,16 @@ export declare const DEFAULT_APPS_URL = "https://api.simonegentili.com/heimdall/
|
|
|
3
3
|
export type LauncherApp = {
|
|
4
4
|
name: string;
|
|
5
5
|
url: string;
|
|
6
|
+
/** Not granted to the logged-in user: opening it shows AppAccessGate's "Richiedi accesso". */
|
|
7
|
+
locked?: boolean;
|
|
6
8
|
};
|
|
7
9
|
interface AppLauncherProps {
|
|
8
10
|
/** Endpoint returning `{ apps: LauncherApp[] }` - the enabled apps, managed from Heimdall. */
|
|
9
11
|
appsUrl?: string;
|
|
10
12
|
/** Accessible name of the grid button - this library has no i18n of its own. */
|
|
11
13
|
label?: string;
|
|
14
|
+
/** Logged-in user's JWT: the API then lists only the apps this user may use. */
|
|
15
|
+
token?: string | null;
|
|
12
16
|
}
|
|
13
|
-
export declare const AppLauncher: ({ appsUrl, label }: AppLauncherProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const AppLauncher: ({ appsUrl, label, token }: AppLauncherProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export default AppLauncher;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Icon.css';
|
|
3
|
-
export type IconName = 'menu' | 'layout' | 'edit' | 'help-circle' | 'check' | 'x' | 'file-plus' | 'link' | 'share-2' | 'download' | 'book' | 'printer' | 'eye' | 'columns' | 'sidebar-left' | 'sidebar-right' | 'play' | 'pause' | 'volume-2' | 'tech-node' | 'tech-go' | 'tech-php' | 'grid';
|
|
3
|
+
export type IconName = 'menu' | 'layout' | 'edit' | 'help-circle' | 'check' | 'x' | 'file-plus' | 'link' | 'share-2' | 'download' | 'book' | 'printer' | 'eye' | 'columns' | 'sidebar-left' | 'sidebar-right' | 'play' | 'pause' | 'volume-2' | 'tech-node' | 'tech-go' | 'tech-php' | 'grid' | 'lock';
|
|
4
4
|
export interface IconProps extends React.SVGAttributes<SVGSVGElement> {
|
|
5
5
|
name: IconName;
|
|
6
6
|
size?: number;
|
|
@@ -17,6 +17,8 @@ interface QuadratoHeaderProps {
|
|
|
17
17
|
onUserAuthenticated?: (isAuthenticated: boolean, username: string | null) => void;
|
|
18
18
|
/** Endpoint of the app launcher menu. Default: the Heimdall-managed list on api.simonegentili.com. */
|
|
19
19
|
appsUrl?: string;
|
|
20
|
+
/** Base URL of the Heimdall API, used to check whether the logged-in user may use this app. */
|
|
21
|
+
heimdallUrl?: string;
|
|
20
22
|
}
|
|
21
23
|
export interface QuadratoHeaderHandle {
|
|
22
24
|
/** Forces the login modal open, e.g. when a consumer action requires auth first. */
|
package/dist/index.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export * from './components/ColorPicker/ColorPicker';
|
|
|
16
16
|
export * from './components/FontPicker/FontPicker';
|
|
17
17
|
export * from './components/Toggle/Toggle';
|
|
18
18
|
export * from './components/AppLauncher/AppLauncher';
|
|
19
|
+
export * from './components/AppAccessGate/AppAccessGate';
|
package/dist/index.es.js
CHANGED
|
@@ -228,7 +228,14 @@ var u = {
|
|
|
228
228
|
cy: e,
|
|
229
229
|
r: "2"
|
|
230
230
|
}, `${t}-${e}`)))
|
|
231
|
-
})
|
|
231
|
+
}),
|
|
232
|
+
lock: /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("rect", {
|
|
233
|
+
x: "5",
|
|
234
|
+
y: "11",
|
|
235
|
+
width: "14",
|
|
236
|
+
height: "10",
|
|
237
|
+
rx: "2"
|
|
238
|
+
}), /* @__PURE__ */ c("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })] })
|
|
232
239
|
}, d = ({ name: e, size: t = 18, ...n }) => /* @__PURE__ */ c("svg", {
|
|
233
240
|
className: "sg-icon",
|
|
234
241
|
width: t,
|
|
@@ -347,66 +354,146 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
347
354
|
onNavigate: e,
|
|
348
355
|
title: "Simone Gentili - senior web developer, tech author and chess enthusiast",
|
|
349
356
|
homePageKey: "home"
|
|
350
|
-
}), C = "https://api.simonegentili.com/heimdall
|
|
351
|
-
let
|
|
357
|
+
}), C = "https://api.simonegentili.com/heimdall", w = (e) => e.endsWith("/") ? e : `${e}/`, T = (e) => {
|
|
358
|
+
let t = w(window.location.origin + window.location.pathname);
|
|
359
|
+
return e.filter((e) => t.startsWith(w(e.url))).sort((e, t) => t.url.length - e.url.length)[0] ?? null;
|
|
360
|
+
}, E = ({ token: e, heimdallUrl: t = C }) => {
|
|
361
|
+
let [r, i] = o(null), [a, u] = o(!1), [d, p] = o(!1);
|
|
362
|
+
n(() => {
|
|
363
|
+
e && fetch(`${t}/access`, { headers: { Authorization: `Bearer ${e}` } }).then((e) => e.ok ? e.json() : Promise.reject(e.status)).then((t) => i({
|
|
364
|
+
token: e,
|
|
365
|
+
app: T(t.apps)
|
|
366
|
+
})).catch(() => i({
|
|
367
|
+
token: e,
|
|
368
|
+
app: null
|
|
369
|
+
}));
|
|
370
|
+
}, [e, t]);
|
|
371
|
+
let m = r?.token === e ? r.app : null;
|
|
372
|
+
return !e || m === null || m.access === "open" || m.access === "approved" ? null : /* @__PURE__ */ c("div", {
|
|
373
|
+
className: "sg-access-gate",
|
|
374
|
+
role: "dialog",
|
|
375
|
+
"aria-modal": "true",
|
|
376
|
+
"aria-labelledby": "sg-access-gate-title",
|
|
377
|
+
children: /* @__PURE__ */ l("div", {
|
|
378
|
+
className: "sg-access-gate-card",
|
|
379
|
+
children: [/* @__PURE__ */ l("h2", {
|
|
380
|
+
id: "sg-access-gate-title",
|
|
381
|
+
children: ["Non hai accesso a ", m.name]
|
|
382
|
+
}), m.access === "pending" ? /* @__PURE__ */ c("p", { children: "La tua richiesta è in attesa di approvazione." }) : /* @__PURE__ */ l(s, { children: [
|
|
383
|
+
/* @__PURE__ */ c("p", { children: m.access === "rejected" ? "La tua richiesta di accesso è stata rifiutata. Puoi inviarne una nuova." : "Per usare questa app devi chiedere l’accesso a un amministratore." }),
|
|
384
|
+
d && /* @__PURE__ */ c("p", {
|
|
385
|
+
className: "sg-access-gate-error",
|
|
386
|
+
children: "Invio non riuscito, riprova."
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ c(f, {
|
|
389
|
+
label: a ? "Invio…" : "Richiedi accesso",
|
|
390
|
+
disabled: a,
|
|
391
|
+
onClick: async () => {
|
|
392
|
+
u(!0), p(!1);
|
|
393
|
+
try {
|
|
394
|
+
let n = await fetch(`${t}/access-requests`, {
|
|
395
|
+
method: "POST",
|
|
396
|
+
headers: {
|
|
397
|
+
Authorization: `Bearer ${e}`,
|
|
398
|
+
"Content-Type": "application/json"
|
|
399
|
+
},
|
|
400
|
+
body: JSON.stringify({ app: m.slug })
|
|
401
|
+
});
|
|
402
|
+
n.ok || n.status === 409 ? i({
|
|
403
|
+
token: e,
|
|
404
|
+
app: {
|
|
405
|
+
...m,
|
|
406
|
+
access: "pending"
|
|
407
|
+
}
|
|
408
|
+
}) : p(!0);
|
|
409
|
+
} catch {
|
|
410
|
+
p(!0);
|
|
411
|
+
} finally {
|
|
412
|
+
u(!1);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
})
|
|
416
|
+
] })]
|
|
417
|
+
})
|
|
418
|
+
});
|
|
419
|
+
}, D = "https://api.simonegentili.com/heimdall/launcher", O = ({ appsUrl: e = D, label: t = "App", token: r = null }) => {
|
|
420
|
+
let [i, s] = o(!1), [u, f] = o(null), p = u?.token === r ? u.apps : null, [m, h] = o(!1), g = a(null);
|
|
352
421
|
return n(() => {
|
|
353
|
-
!
|
|
422
|
+
!i || p !== null || fetch(e, r ? { headers: { Authorization: `Bearer ${r}` } } : void 0).then((e) => e.ok ? e.json() : Promise.reject(e.status)).then((e) => f({
|
|
423
|
+
token: r,
|
|
424
|
+
apps: e.apps
|
|
425
|
+
})).catch(() => h(!0));
|
|
354
426
|
}, [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
e
|
|
427
|
+
i,
|
|
428
|
+
p,
|
|
429
|
+
e,
|
|
430
|
+
r
|
|
358
431
|
]), n(() => {
|
|
359
|
-
if (!
|
|
432
|
+
if (!i) return;
|
|
360
433
|
let e = (e) => {
|
|
361
|
-
|
|
434
|
+
g.current?.contains(e.target) || s(!1);
|
|
362
435
|
}, t = (e) => {
|
|
363
|
-
e.key === "Escape" &&
|
|
436
|
+
e.key === "Escape" && s(!1);
|
|
364
437
|
};
|
|
365
438
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
366
439
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
367
440
|
};
|
|
368
|
-
}, [
|
|
441
|
+
}, [i]), /* @__PURE__ */ l("div", {
|
|
369
442
|
className: "sg-app-launcher",
|
|
370
|
-
ref:
|
|
443
|
+
ref: g,
|
|
371
444
|
children: [/* @__PURE__ */ c("button", {
|
|
372
445
|
type: "button",
|
|
373
446
|
className: "sg-app-launcher-toggle",
|
|
374
447
|
"aria-label": t,
|
|
375
448
|
title: t,
|
|
376
|
-
"aria-expanded":
|
|
449
|
+
"aria-expanded": i,
|
|
377
450
|
onClick: () => {
|
|
378
|
-
|
|
451
|
+
i || h(!1), s(!i);
|
|
379
452
|
},
|
|
380
453
|
children: /* @__PURE__ */ c(d, {
|
|
381
454
|
name: "grid",
|
|
382
455
|
size: 22
|
|
383
456
|
})
|
|
384
|
-
}),
|
|
457
|
+
}), i && /* @__PURE__ */ c("div", {
|
|
385
458
|
className: "sg-app-launcher-panel",
|
|
386
|
-
children:
|
|
459
|
+
children: m ? /* @__PURE__ */ c("p", {
|
|
387
460
|
className: "sg-app-launcher-message",
|
|
388
461
|
children: "Impossibile caricare le app."
|
|
389
|
-
}) :
|
|
462
|
+
}) : p === null ? /* @__PURE__ */ c("p", {
|
|
390
463
|
className: "sg-app-launcher-message",
|
|
391
464
|
children: "Caricamento…"
|
|
392
465
|
}) : /* @__PURE__ */ c("ul", {
|
|
393
466
|
className: "sg-app-launcher-grid",
|
|
394
|
-
children:
|
|
467
|
+
children: p.map((e) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l("a", {
|
|
395
468
|
href: e.url,
|
|
396
|
-
className:
|
|
397
|
-
|
|
469
|
+
className: [
|
|
470
|
+
"sg-app-launcher-app",
|
|
471
|
+
new URL(e.url).origin === window.location.origin ? "current" : "",
|
|
472
|
+
e.locked ? "locked" : ""
|
|
473
|
+
].filter(Boolean).join(" "),
|
|
474
|
+
title: e.locked ? `${e.name}: accesso su richiesta` : void 0,
|
|
475
|
+
children: [/* @__PURE__ */ l("span", {
|
|
398
476
|
className: "sg-app-launcher-tile",
|
|
399
477
|
"aria-hidden": "true",
|
|
400
|
-
children: e.name.charAt(0).toUpperCase()
|
|
401
|
-
|
|
478
|
+
children: [e.name.charAt(0).toUpperCase(), e.locked && /* @__PURE__ */ c("span", {
|
|
479
|
+
className: "sg-app-launcher-lock",
|
|
480
|
+
children: /* @__PURE__ */ c(d, {
|
|
481
|
+
name: "lock",
|
|
482
|
+
size: 12
|
|
483
|
+
})
|
|
484
|
+
})]
|
|
485
|
+
}), /* @__PURE__ */ l("span", {
|
|
402
486
|
className: "sg-app-launcher-name",
|
|
403
|
-
children: e.name
|
|
487
|
+
children: [e.name, e.locked && /* @__PURE__ */ c("span", {
|
|
488
|
+
className: "sg-visually-hidden",
|
|
489
|
+
children: " (accesso su richiesta)"
|
|
490
|
+
})]
|
|
404
491
|
})]
|
|
405
492
|
}) }, e.url))
|
|
406
493
|
})
|
|
407
494
|
})]
|
|
408
495
|
});
|
|
409
|
-
},
|
|
496
|
+
}, k = ({ isLoggedIn: e, handleLogin: t, handleLogout: n }) => /* @__PURE__ */ c(s, { children: e ? /* @__PURE__ */ c("button", {
|
|
410
497
|
onClick: n,
|
|
411
498
|
className: "sg-authenticator-button",
|
|
412
499
|
children: "logout"
|
|
@@ -414,14 +501,14 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
414
501
|
onClick: t,
|
|
415
502
|
className: "sg-authenticator-button",
|
|
416
503
|
children: "Login"
|
|
417
|
-
}) }),
|
|
504
|
+
}) }), A = 220, j = ({ open: t, onClose: r, title: i, icon: a, children: s, buttons: u, footer: d, closeLabel: p = "Close", className: m }) => {
|
|
418
505
|
let [h, g] = o(!1), [_, v] = o({
|
|
419
506
|
x: 0,
|
|
420
507
|
y: 0
|
|
421
508
|
}), y = e.useRef(null), [b, x] = o(!1), S = (e) => {
|
|
422
509
|
h || (g(!0), setTimeout(() => {
|
|
423
510
|
g(!1), e();
|
|
424
|
-
},
|
|
511
|
+
}, A));
|
|
425
512
|
};
|
|
426
513
|
n(() => {
|
|
427
514
|
if (!t) return;
|
|
@@ -443,7 +530,7 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
443
530
|
offsetY: _.y
|
|
444
531
|
}, x(!0), e.currentTarget.setPointerCapture(e.pointerId));
|
|
445
532
|
}
|
|
446
|
-
function
|
|
533
|
+
function E(e) {
|
|
447
534
|
if (!y.current) return;
|
|
448
535
|
let { pointerX: t, pointerY: n, offsetX: r, offsetY: i } = y.current;
|
|
449
536
|
v({
|
|
@@ -451,7 +538,7 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
451
538
|
y: i + (e.clientY - n)
|
|
452
539
|
});
|
|
453
540
|
}
|
|
454
|
-
function
|
|
541
|
+
function D() {
|
|
455
542
|
y.current = null, x(!1);
|
|
456
543
|
}
|
|
457
544
|
return /* @__PURE__ */ c("div", {
|
|
@@ -468,9 +555,9 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
468
555
|
/* @__PURE__ */ l("div", {
|
|
469
556
|
className: `modal-header${b ? " modal-header-dragging" : ""}`,
|
|
470
557
|
onPointerDown: T,
|
|
471
|
-
onPointerMove:
|
|
472
|
-
onPointerUp:
|
|
473
|
-
onPointerCancel:
|
|
558
|
+
onPointerMove: E,
|
|
559
|
+
onPointerUp: D,
|
|
560
|
+
onPointerCancel: D,
|
|
474
561
|
children: [
|
|
475
562
|
a && /* @__PURE__ */ c("span", {
|
|
476
563
|
className: "modal-icon",
|
|
@@ -509,7 +596,7 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
509
596
|
]
|
|
510
597
|
})
|
|
511
598
|
});
|
|
512
|
-
},
|
|
599
|
+
}, M = ({ label: e, invalid: t, className: n, id: i, ...a }) => {
|
|
513
600
|
let o = r(), s = i ?? o;
|
|
514
601
|
return /* @__PURE__ */ l("div", {
|
|
515
602
|
className: "input-wrapper",
|
|
@@ -527,7 +614,7 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
527
614
|
...a
|
|
528
615
|
})]
|
|
529
616
|
});
|
|
530
|
-
},
|
|
617
|
+
}, N = ({ label: e, className: t, id: n, ...i }) => {
|
|
531
618
|
let a = r(), o = n ?? a;
|
|
532
619
|
return /* @__PURE__ */ l("div", {
|
|
533
620
|
className: "input-wrapper",
|
|
@@ -542,9 +629,9 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
542
629
|
...i
|
|
543
630
|
})]
|
|
544
631
|
});
|
|
545
|
-
},
|
|
632
|
+
}, P = ({ open: e, onClose: t, onLogin: n }) => {
|
|
546
633
|
let [r, i] = o(""), [a, s] = o("");
|
|
547
|
-
return /* @__PURE__ */ c(
|
|
634
|
+
return /* @__PURE__ */ c(j, {
|
|
548
635
|
open: e,
|
|
549
636
|
onClose: t,
|
|
550
637
|
title: "Login",
|
|
@@ -553,13 +640,13 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
553
640
|
e.preventDefault(), n(r, a);
|
|
554
641
|
},
|
|
555
642
|
children: [
|
|
556
|
-
/* @__PURE__ */ c(
|
|
643
|
+
/* @__PURE__ */ c(M, {
|
|
557
644
|
label: "Username",
|
|
558
645
|
value: r,
|
|
559
646
|
onChange: (e) => i(e.target.value),
|
|
560
647
|
autoFocus: !0
|
|
561
648
|
}),
|
|
562
|
-
/* @__PURE__ */ c(
|
|
649
|
+
/* @__PURE__ */ c(N, {
|
|
563
650
|
label: "Password",
|
|
564
651
|
value: a,
|
|
565
652
|
onChange: (e) => s(e.target.value)
|
|
@@ -572,57 +659,67 @@ var v = ({ privacyPolicyHref: e = "https://simonegentili.com/privacy" }) => {
|
|
|
572
659
|
]
|
|
573
660
|
})
|
|
574
661
|
});
|
|
575
|
-
},
|
|
662
|
+
}, F = "simonegentili.com-access-token", I = (e) => document.cookie.split("; ").some((t) => t.startsWith(`${e}=`) && t.slice(e.length + 1).length > 0), L = (e) => {
|
|
576
663
|
let t = document.cookie.split("; ").find((t) => t.startsWith(`${e}=`));
|
|
577
664
|
return t ? t.slice(e.length + 1) : null;
|
|
578
|
-
},
|
|
665
|
+
}, R = (e, t) => {
|
|
579
666
|
try {
|
|
580
667
|
return JSON.parse(atob(e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/")))[t] ?? null;
|
|
581
668
|
} catch {
|
|
582
669
|
return null;
|
|
583
670
|
}
|
|
584
|
-
},
|
|
585
|
-
let [
|
|
586
|
-
i(
|
|
587
|
-
let
|
|
671
|
+
}, z = t(({ title: e = "Quadrato", homePageKey: t = "home", onNavigate: r, cookieName: a = F, username: u = null, usernameJwtField: d = "sub", onLogin: f, onLogout: p, onUserAuthenticated: m, appsUrl: h, heimdallUrl: g }, _) => {
|
|
672
|
+
let [v, y] = o(() => I(a)), [b, S] = o(!1);
|
|
673
|
+
i(_, () => ({ openLoginModal: () => S(!0) }));
|
|
674
|
+
let C = v ? L(a) : null, w = u ?? (C ? R(C, d) : null);
|
|
588
675
|
return n(() => {
|
|
589
|
-
m?.(
|
|
590
|
-
}, []), /* @__PURE__ */ l(s, { children: [
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
676
|
+
m?.(v, v ? w : null);
|
|
677
|
+
}, []), /* @__PURE__ */ l(s, { children: [
|
|
678
|
+
/* @__PURE__ */ l(x, {
|
|
679
|
+
onNavigate: r,
|
|
680
|
+
title: e,
|
|
681
|
+
homePageKey: t,
|
|
682
|
+
className: "quadrato-header",
|
|
683
|
+
children: [/* @__PURE__ */ c(O, {
|
|
684
|
+
appsUrl: h,
|
|
685
|
+
token: C
|
|
686
|
+
}), /* @__PURE__ */ l("div", {
|
|
687
|
+
className: "quadrato-header-auth",
|
|
688
|
+
children: [v && w && /* @__PURE__ */ c("span", {
|
|
689
|
+
className: "quadrato-header-username",
|
|
690
|
+
children: w
|
|
691
|
+
}), /* @__PURE__ */ c(k, {
|
|
692
|
+
isLoggedIn: v,
|
|
693
|
+
handleLogin: () => S(!0),
|
|
694
|
+
handleLogout: () => {
|
|
695
|
+
p?.();
|
|
696
|
+
let e = I(a);
|
|
697
|
+
y(e), m?.(e, null);
|
|
698
|
+
}
|
|
699
|
+
})]
|
|
608
700
|
})]
|
|
609
|
-
})
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
701
|
+
}),
|
|
702
|
+
/* @__PURE__ */ c(E, {
|
|
703
|
+
token: C,
|
|
704
|
+
heimdallUrl: g
|
|
705
|
+
}),
|
|
706
|
+
/* @__PURE__ */ c(P, {
|
|
707
|
+
open: b,
|
|
708
|
+
onClose: () => S(!1),
|
|
709
|
+
onLogin: async (e, t) => {
|
|
710
|
+
await f(e, t);
|
|
711
|
+
let n = I(a);
|
|
712
|
+
y(n), S(!1), m?.(n, n ? u ?? e : null);
|
|
713
|
+
}
|
|
714
|
+
})
|
|
715
|
+
] });
|
|
619
716
|
});
|
|
620
|
-
|
|
717
|
+
z.displayName = "QuadratoHeader";
|
|
621
718
|
//#endregion
|
|
622
719
|
//#region src/components/SetPasswordModal/SetPasswordModal.tsx
|
|
623
|
-
var
|
|
720
|
+
var B = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
624
721
|
let [r, i] = o(""), [a, s] = o(""), [u, d] = o("");
|
|
625
|
-
return /* @__PURE__ */ c(
|
|
722
|
+
return /* @__PURE__ */ c(j, {
|
|
626
723
|
open: e,
|
|
627
724
|
onClose: t,
|
|
628
725
|
title: "Imposta una nuova password",
|
|
@@ -640,13 +737,13 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
640
737
|
d(""), n(r);
|
|
641
738
|
},
|
|
642
739
|
children: [
|
|
643
|
-
/* @__PURE__ */ c(
|
|
740
|
+
/* @__PURE__ */ c(N, {
|
|
644
741
|
label: "Nuova password",
|
|
645
742
|
value: r,
|
|
646
743
|
onChange: (e) => i(e.target.value),
|
|
647
744
|
autoFocus: !0
|
|
648
745
|
}),
|
|
649
|
-
/* @__PURE__ */ c(
|
|
746
|
+
/* @__PURE__ */ c(N, {
|
|
650
747
|
label: "Conferma password",
|
|
651
748
|
value: a,
|
|
652
749
|
onChange: (e) => s(e.target.value)
|
|
@@ -663,7 +760,7 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
663
760
|
]
|
|
664
761
|
})
|
|
665
762
|
});
|
|
666
|
-
},
|
|
763
|
+
}, V = ({ value: e, onChange: t, swatches: r }) => {
|
|
667
764
|
let [i, s] = o(!1), u = a(null);
|
|
668
765
|
return n(() => {
|
|
669
766
|
if (!i) return;
|
|
@@ -712,7 +809,7 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
712
809
|
})]
|
|
713
810
|
})]
|
|
714
811
|
});
|
|
715
|
-
},
|
|
812
|
+
}, H = (e) => e.split(",")[0].replace(/'/g, ""), U = ({ value: e, onChange: t, options: r }) => {
|
|
716
813
|
let [i, s] = o(!1), u = a(null);
|
|
717
814
|
return n(() => {
|
|
718
815
|
if (!i) return;
|
|
@@ -734,7 +831,7 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
734
831
|
style: { fontFamily: e },
|
|
735
832
|
children: [/* @__PURE__ */ c("span", {
|
|
736
833
|
className: "sg-font-picker-toggle-label",
|
|
737
|
-
children:
|
|
834
|
+
children: H(e)
|
|
738
835
|
}), /* @__PURE__ */ c("span", {
|
|
739
836
|
className: "sg-font-picker-toggle-caret",
|
|
740
837
|
children: i ? "▲" : "▼"
|
|
@@ -748,11 +845,11 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
748
845
|
t(n), s(!1);
|
|
749
846
|
},
|
|
750
847
|
style: { fontFamily: n },
|
|
751
|
-
children:
|
|
848
|
+
children: H(n)
|
|
752
849
|
}) }, n))
|
|
753
850
|
})]
|
|
754
851
|
});
|
|
755
|
-
},
|
|
852
|
+
}, W = ({ checked: e, onChange: t, label: n }) => /* @__PURE__ */ l("label", {
|
|
756
853
|
className: "sg-toggle",
|
|
757
854
|
children: [
|
|
758
855
|
/* @__PURE__ */ c("input", {
|
|
@@ -772,4 +869,4 @@ var I = ({ open: e, onClose: t, onSubmit: n }) => {
|
|
|
772
869
|
]
|
|
773
870
|
});
|
|
774
871
|
//#endregion
|
|
775
|
-
export {
|
|
872
|
+
export { E as AppAccessGate, O as AppLauncher, k as Authenticator, f as Button, V as ColorPicker, v as CookieConsent, D as DEFAULT_APPS_URL, C as DEFAULT_HEIMDALL_URL, U as FontPicker, p as Footer, x as Header, d as Icon, M as Input, j as Modal, N as PasswordInput, z as QuadratoHeader, b as SGFooter, S as SGHeader, B as SetPasswordModal, W as Toggle };
|
package/dist/sg-components.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.custom-button{border-radius:var(--button-radius);background:var(--button-bg);color:var(--button-color);cursor:pointer;font-size:var(--primary-font);font-weight:600;font-family:var(--font-family);box-shadow:var(--button-shadow);transition:background .15s var(--button-ease-standard), transform var(--button-ease-bounce) .2s;border:none;padding:8px 20px}.custom-button:hover:not(:disabled){background:var(--button-bg-hover);transform:translateY(-1px)}.custom-button:active:not(:disabled){transform:scale(.97)}.custom-button:disabled{opacity:.6;cursor:default}.custom-button-with-icon{align-items:center;gap:8px;display:inline-flex}.custom-button-label-visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sg-icon{vertical-align:middle;flex-shrink:0;display:inline-block}.footer{background-color:var(--primary-bg);border-top:1px solid var(--primary-border);font-family:var(--font-family);color:#555;justify-content:space-between;align-items:center;width:100%;padding:16px 32px;font-size:14px;display:flex;position:fixed;bottom:0;left:0}.footer a{color:#1ea7fd;text-decoration:none}.footer a:hover{text-decoration:underline}.cookie-consent{background-color:var(--primary-bg);border-top:1px solid var(--primary-border);font-family:var(--font-family);color:#555;z-index:1000;box-sizing:border-box;flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;width:100%;padding:16px 32px;font-size:14px;display:flex;position:fixed;bottom:0;left:0}.cookie-consent-text{flex:320px;margin:0}.cookie-consent a{color:#1ea7fd;text-decoration:none}.cookie-consent a:hover{text-decoration:underline}.cookie-consent-accept{flex:none}.logo-text{font-size:var(--font-size-h1);font-family:var(--font-family);margin:0;font-weight:400}.header{z-index:100;width:100%;font-size:var(--font-size);background-color:#fff;border-bottom:1px solid #e1e5e9;position:sticky;top:0;box-shadow:0 2px 4px #0000001a}.header-container{justify-content:flex-start;align-items:center;max-width:1200px;margin:0 auto;padding:16px;display:flex}.header-actions{align-items:center;gap:12px;margin-left:auto;display:flex}.logo{cursor:pointer;color:#333;font-size:24px;font-weight:700;transition:color .2s}.logo:hover{color:#007acc}.logo-full{display:inline}.logo-short{display:none}@media (width<=768px){.header-container{padding:12px 16px}.logo{font-size:var(--font-size)}.logo-full{display:none}.logo-short{display:inline}}@media (width<=480px){.header-container{padding:8px 12px}.logo{font-size:var(--font-size)}}.sg-app-launcher{font-family:var(--font-family);position:relative}.sg-app-launcher-toggle{width:40px;height:40px;color:var(--ink-muted);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex}.sg-app-launcher-toggle:hover,.sg-app-launcher-toggle[aria-expanded=true]{background:var(--primary-hover-bg)}.sg-app-launcher-panel{z-index:1000;box-sizing:border-box;border:1px solid var(--primary-border);border-radius:calc(var(--radius) * 3);background:var(--modal-bg);width:320px;max-width:calc(100vw - 24px);max-height:70vh;box-shadow:var(--shadow-2);padding:12px;position:absolute;top:calc(100% + 8px);right:0;overflow-y:auto}.sg-app-launcher-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none;display:grid}.sg-app-launcher-app{border-radius:var(--radius);color:inherit;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;text-decoration:none;display:flex}.sg-app-launcher-app:hover,.sg-app-launcher-app:focus-visible{background:var(--primary-hover-bg)}.sg-app-launcher-app.current{background:var(--accent-soft)}.sg-app-launcher-tile{border-radius:var(--radius);background:var(--accent);color:#fff;justify-content:center;align-items:center;width:40px;height:40px;font-size:18px;font-weight:600;display:flex}.sg-app-launcher-name{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13px;overflow:hidden}.sg-app-launcher-message{color:var(--ink-muted);margin:0;padding:8px;font-size:13px}.sg-authenticator-button{font-size:.9rem;font-family:var(--font-family);border:1px solid var(--primary-border);border-radius:var(--radius);background:var(--primary-bg);color:#333;cursor:pointer;padding:.4rem 1rem;transition:background .15s,border-color .15s}.sg-authenticator-button:hover{background:var(--primary-hover-bg);border-color:var(--ink-muted)}.modal-overlay{background:var(--modal-overlay);z-index:1000;justify-content:center;align-items:center;width:100vw;height:100vh;animation:.25s ease-out sg-modal-overlay-fade-in;display:flex;position:fixed;top:0;left:0}.modal-overlay.modal-overlay-closing{animation:.22s ease-in forwards sg-modal-overlay-fade-out}.modal-content{--drag-x:0px;--drag-y:0px;background:var(--modal-bg);border-radius:var(--primary-radius);font-size:var(--primary-font);min-width:320px;max-width:calc(100vw - 40px);max-height:90vh;transform:translate(var(--drag-x), var(--drag-y));flex-direction:column;animation:.3s ease-out sg-modal-slide-in;display:flex;overflow:hidden;box-shadow:0 2px 16px #00000026}.modal-content.modal-content-closing{animation:.22s ease-in forwards sg-modal-slide-out}@keyframes sg-modal-overlay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sg-modal-overlay-fade-out{0%{opacity:1}to{opacity:0}}@keyframes sg-modal-slide-in{0%{transform:translate(var(--drag-x), calc(var(--drag-y) - 24px)) scale(.97);opacity:0}to{transform:translate(var(--drag-x), var(--drag-y)) scale(1);opacity:1}}@keyframes sg-modal-slide-out{0%{transform:translate(var(--drag-x), var(--drag-y)) scale(1);opacity:1}to{transform:translate(var(--drag-x), calc(var(--drag-y) - 24px)) scale(.97);opacity:0}}.modal-header{background:var(--primary-bg);border-top-left-radius:var(--primary-radius);border-top-right-radius:var(--primary-radius);cursor:grab;touch-action:none;flex:none;align-items:center;gap:8px;padding:16px;display:flex}.modal-header-dragging{cursor:grabbing;-webkit-user-select:none;user-select:none}.modal-icon{color:var(--modal-title-color);display:inline-flex}.modal-title{color:var(--modal-title-color);font-family:var(--font-family);font-size:var(--primary-font);flex:1;margin:0}.modal-close{cursor:pointer;color:var(--modal-title-color);background:0 0;border:none;padding:4px 8px;font-size:20px;line-height:1}.modal-close:disabled{cursor:default;opacity:.6}.modal-children{font-family:var(--font-family);padding:16px;overflow-y:auto}.modal-footer{border-top:1px solid var(--primary-border);flex-wrap:wrap;flex:none;justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.input-label{font-weight:500;font-family:var(--font-family);font-size:var(--primary-font);margin-bottom:4px;display:block}.input-field--invalid{background-color:#ffe5e5;border-color:#c00}.input-wrapper{margin-bottom:16px}.input-label{font-weight:500;font-size:var(--primary-font);margin-bottom:4px;display:block}.input-field{box-sizing:border-box;border-radius:var(--radius);width:100%;font-size:var(--primary-font);border-style:solid;border-width:1px;padding:8px}.login-modal-form{font-family:var(--font-family);font-size:var(--primary-font);flex-direction:column;gap:16px;display:flex}.header.quadrato-header{z-index:999}.quadrato-header-auth{align-items:center;gap:12px;display:flex}.quadrato-header-username{font-size:var(--font-size);color:#333;transition:color .2s}.quadrato-header-username:hover{color:var(--accent)}form{font-family:var(--font-family)}.set-password-modal-form{font-family:var(--font-family);font-size:var(--primary-font);flex-direction:column;gap:16px;display:flex}.set-password-modal-error{color:#d32f2f;font-size:var(--primary-font);margin:0}.sg-color-picker{font-family:var(--font-family);position:relative}.sg-color-picker-toggle{border-radius:var(--input-radius);border:1px solid var(--input-border);background:var(--input-bg);width:100%;color:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-family:inherit;font-size:13px;display:flex}.sg-color-picker-toggle-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sg-color-picker-swatch{border:1px solid #00000026;border-radius:4px;flex:none;width:18px;height:18px}.sg-color-picker-popover{z-index:30;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--shadow-1);width:170px;padding:10px;position:absolute;top:calc(100% + 4px);left:0}.sg-color-picker-grid{grid-template-columns:repeat(6,1fr);gap:6px;display:grid}.sg-color-picker-swatch-button{cursor:pointer;border:1px solid #00000026;border-radius:4px;width:20px;height:20px;padding:0}.sg-color-picker-swatch-button.active{border:2px solid var(--accent)}.sg-color-picker-custom{border-top:1px solid var(--input-border);color:var(--ink-muted);cursor:pointer;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding-top:8px;font-size:11px;display:flex}.sg-color-picker-custom input[type=color]{cursor:pointer;border:none;width:26px;height:20px;padding:0}.sg-font-picker{font-family:var(--font-family);position:relative}.sg-font-picker-toggle{border-radius:var(--input-radius);border:1px solid var(--input-border);background:var(--input-bg);width:100%;color:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.sg-font-picker-toggle-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sg-font-picker-toggle-caret{opacity:.5;flex:none;font-size:10px}.sg-font-picker-list{background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);max-height:260px;box-shadow:var(--shadow-1);z-index:30;margin:0;padding:4px 0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.sg-font-picker-option{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:none;padding:8px 10px;font-size:15px;display:block}.sg-font-picker-option.active{background:var(--accent-soft)}:root{--unit:3px;--primary-bg:#f5f5f5;--primary-border:#ccc;--radius:calc(var(--unit) * 2);--primary-radius:var(--radius);--primary-font:var(--font-size);--primary-hover-bg:#e0e0e0;--modal-bg:#fff;--modal-overlay:#0000004d;--modal-title-color:#222;--input-bg:#fff;--input-border:#ccc;--input-radius:var(--radius);--input-font:1rem;--font-size:14px;--font-family:Arial, sans-serif;--font-size-h1:calc(var(--font-size) * 1.5);--button-bg:#6f9cf7;--button-bg-hover:#5480e6;--button-color:#fff;--button-radius:999px;--button-shadow:0 1px 2px #5480e61f, 0 1px 3px #5480e61a;--button-ease-standard:cubic-bezier(.4, 0, .2, 1);--button-ease-bounce:cubic-bezier(.34, 1.56, .64, 1);--accent:#3d5fc4;--accent-strong:#2e4aa0;--accent-soft:#e2e7f8;--ink-muted:#647089;--shadow-1:0 1px 2px #0f172a14, 0 1px 3px #0f172a0f;--shadow-2:0 4px 12px #0f172a1f}.theme-dark{--primary-bg:#222;--primary-border:#444;--primary-font:1rem;--font-family:"Inter", Arial, sans-serif;--primary-hover-bg:#333;--modal-bg:#222;--modal-title-color:#fff;--input-bg:#333;--input-border:#555;--input-font:1rem;--button-bg:#6f9cf7;--button-bg-hover:#86aefc;--button-color:#fff;--accent:#6f9cf7;--accent-strong:#86aefc;--accent-soft:#6f9cf72e;--ink-muted:#9aa3b5;--shadow-1:0 1px 2px #0000004d, 0 1px 3px #0000003d;--shadow-2:0 4px 12px #0006}.sg-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--font-family);align-items:center;gap:6px;display:flex}.sg-toggle-input{opacity:0;width:1px;height:1px;position:absolute}.sg-toggle-track{background:var(--input-border);border-radius:999px;flex:none;width:34px;height:20px;transition:background .15s cubic-bezier(.4,0,.2,1);position:relative}.sg-toggle-input:checked+.sg-toggle-track{background:var(--accent)}.sg-toggle-thumb{background:var(--input-bg);width:16px;height:16px;box-shadow:var(--shadow-1);border-radius:50%;transition:left .15s cubic-bezier(.4,0,.2,1);position:absolute;top:2px;left:2px}.sg-toggle-input:checked+.sg-toggle-track .sg-toggle-thumb{left:16px}.sg-toggle-input:focus-visible+.sg-toggle-track{outline:2px solid var(--accent-strong);outline-offset:2px}.sg-toggle-label{color:var(--ink-muted);white-space:nowrap;font-size:13px}
|
|
1
|
+
.custom-button{border-radius:var(--button-radius);background:var(--button-bg);color:var(--button-color);cursor:pointer;font-size:var(--primary-font);font-weight:600;font-family:var(--font-family);box-shadow:var(--button-shadow);transition:background .15s var(--button-ease-standard), transform var(--button-ease-bounce) .2s;border:none;padding:8px 20px}.custom-button:hover:not(:disabled){background:var(--button-bg-hover);transform:translateY(-1px)}.custom-button:active:not(:disabled){transform:scale(.97)}.custom-button:disabled{opacity:.6;cursor:default}.custom-button-with-icon{align-items:center;gap:8px;display:inline-flex}.custom-button-label-visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sg-icon{vertical-align:middle;flex-shrink:0;display:inline-block}.footer{background-color:var(--primary-bg);border-top:1px solid var(--primary-border);font-family:var(--font-family);color:#555;justify-content:space-between;align-items:center;width:100%;padding:16px 32px;font-size:14px;display:flex;position:fixed;bottom:0;left:0}.footer a{color:#1ea7fd;text-decoration:none}.footer a:hover{text-decoration:underline}.cookie-consent{background-color:var(--primary-bg);border-top:1px solid var(--primary-border);font-family:var(--font-family);color:#555;z-index:1000;box-sizing:border-box;flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;width:100%;padding:16px 32px;font-size:14px;display:flex;position:fixed;bottom:0;left:0}.cookie-consent-text{flex:320px;margin:0}.cookie-consent a{color:#1ea7fd;text-decoration:none}.cookie-consent a:hover{text-decoration:underline}.cookie-consent-accept{flex:none}.logo-text{font-size:var(--font-size-h1);font-family:var(--font-family);margin:0;font-weight:400}.header{z-index:100;width:100%;font-size:var(--font-size);background-color:#fff;border-bottom:1px solid #e1e5e9;position:sticky;top:0;box-shadow:0 2px 4px #0000001a}.header-container{justify-content:flex-start;align-items:center;max-width:1200px;margin:0 auto;padding:16px;display:flex}.header-actions{align-items:center;gap:12px;margin-left:auto;display:flex}.logo{cursor:pointer;color:#333;font-size:24px;font-weight:700;transition:color .2s}.logo:hover{color:#007acc}.logo-full{display:inline}.logo-short{display:none}@media (width<=768px){.header-container{padding:12px 16px}.logo{font-size:var(--font-size)}.logo-full{display:none}.logo-short{display:inline}}@media (width<=480px){.header-container{padding:8px 12px}.logo{font-size:var(--font-size)}}.sg-access-gate{z-index:998;box-sizing:border-box;background:var(--primary-bg);font-family:var(--font-family);justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.sg-access-gate-card{border:1px solid var(--primary-border);border-radius:calc(var(--radius) * 3);background:var(--modal-bg);max-width:420px;box-shadow:var(--shadow-2);text-align:center;padding:24px}.sg-access-gate-card h2{font-size:var(--font-size-h1);color:var(--modal-title-color);margin:0 0 12px}.sg-access-gate-card p{color:var(--ink-muted);margin:0 0 16px}.sg-access-gate-card .sg-access-gate-error{color:#c0392b}.sg-app-launcher{font-family:var(--font-family);position:relative}.sg-app-launcher-toggle{width:40px;height:40px;color:var(--ink-muted);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex}.sg-app-launcher-toggle:hover,.sg-app-launcher-toggle[aria-expanded=true]{background:var(--primary-hover-bg)}.sg-app-launcher-panel{z-index:1000;box-sizing:border-box;border:1px solid var(--primary-border);border-radius:calc(var(--radius) * 3);background:var(--modal-bg);width:320px;max-width:calc(100vw - 24px);max-height:70vh;box-shadow:var(--shadow-2);padding:12px;position:absolute;top:calc(100% + 8px);right:0;overflow-y:auto}.sg-app-launcher-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none;display:grid}.sg-app-launcher-app{border-radius:var(--radius);color:inherit;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;text-decoration:none;display:flex}.sg-app-launcher-app:hover,.sg-app-launcher-app:focus-visible{background:var(--primary-hover-bg)}.sg-app-launcher-app.current{background:var(--accent-soft)}.sg-app-launcher-tile{border-radius:var(--radius);background:var(--accent);color:#fff;justify-content:center;align-items:center;width:40px;height:40px;font-size:18px;font-weight:600;display:flex}.sg-app-launcher-name{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13px;overflow:hidden}.sg-app-launcher-message{color:var(--ink-muted);margin:0;padding:8px;font-size:13px}.sg-app-launcher-tile{position:relative}.sg-app-launcher-app.locked .sg-app-launcher-tile{background:var(--ink-muted)}.sg-app-launcher-app.locked .sg-app-launcher-name{color:var(--ink-muted)}.sg-app-launcher-lock{border:2px solid var(--modal-bg);background:var(--modal-title-color);width:20px;height:20px;color:var(--modal-bg);border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;bottom:-6px;right:-6px}.sg-visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.sg-authenticator-button{font-size:.9rem;font-family:var(--font-family);border:1px solid var(--primary-border);border-radius:var(--radius);background:var(--primary-bg);color:#333;cursor:pointer;padding:.4rem 1rem;transition:background .15s,border-color .15s}.sg-authenticator-button:hover{background:var(--primary-hover-bg);border-color:var(--ink-muted)}.modal-overlay{background:var(--modal-overlay);z-index:1000;justify-content:center;align-items:center;width:100vw;height:100vh;animation:.25s ease-out sg-modal-overlay-fade-in;display:flex;position:fixed;top:0;left:0}.modal-overlay.modal-overlay-closing{animation:.22s ease-in forwards sg-modal-overlay-fade-out}.modal-content{--drag-x:0px;--drag-y:0px;background:var(--modal-bg);border-radius:var(--primary-radius);font-size:var(--primary-font);min-width:320px;max-width:calc(100vw - 40px);max-height:90vh;transform:translate(var(--drag-x), var(--drag-y));flex-direction:column;animation:.3s ease-out sg-modal-slide-in;display:flex;overflow:hidden;box-shadow:0 2px 16px #00000026}.modal-content.modal-content-closing{animation:.22s ease-in forwards sg-modal-slide-out}@keyframes sg-modal-overlay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sg-modal-overlay-fade-out{0%{opacity:1}to{opacity:0}}@keyframes sg-modal-slide-in{0%{transform:translate(var(--drag-x), calc(var(--drag-y) - 24px)) scale(.97);opacity:0}to{transform:translate(var(--drag-x), var(--drag-y)) scale(1);opacity:1}}@keyframes sg-modal-slide-out{0%{transform:translate(var(--drag-x), var(--drag-y)) scale(1);opacity:1}to{transform:translate(var(--drag-x), calc(var(--drag-y) - 24px)) scale(.97);opacity:0}}.modal-header{background:var(--primary-bg);border-top-left-radius:var(--primary-radius);border-top-right-radius:var(--primary-radius);cursor:grab;touch-action:none;flex:none;align-items:center;gap:8px;padding:16px;display:flex}.modal-header-dragging{cursor:grabbing;-webkit-user-select:none;user-select:none}.modal-icon{color:var(--modal-title-color);display:inline-flex}.modal-title{color:var(--modal-title-color);font-family:var(--font-family);font-size:var(--primary-font);flex:1;margin:0}.modal-close{cursor:pointer;color:var(--modal-title-color);background:0 0;border:none;padding:4px 8px;font-size:20px;line-height:1}.modal-close:disabled{cursor:default;opacity:.6}.modal-children{font-family:var(--font-family);padding:16px;overflow-y:auto}.modal-footer{border-top:1px solid var(--primary-border);flex-wrap:wrap;flex:none;justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.input-label{font-weight:500;font-family:var(--font-family);font-size:var(--primary-font);margin-bottom:4px;display:block}.input-field--invalid{background-color:#ffe5e5;border-color:#c00}.input-wrapper{margin-bottom:16px}.input-label{font-weight:500;font-size:var(--primary-font);margin-bottom:4px;display:block}.input-field{box-sizing:border-box;border-radius:var(--radius);width:100%;font-size:var(--primary-font);border-style:solid;border-width:1px;padding:8px}.login-modal-form{font-family:var(--font-family);font-size:var(--primary-font);flex-direction:column;gap:16px;display:flex}.header.quadrato-header{z-index:999}.quadrato-header-auth{align-items:center;gap:12px;display:flex}.quadrato-header-username{font-size:var(--font-size);color:#333;transition:color .2s}.quadrato-header-username:hover{color:var(--accent)}form{font-family:var(--font-family)}.set-password-modal-form{font-family:var(--font-family);font-size:var(--primary-font);flex-direction:column;gap:16px;display:flex}.set-password-modal-error{color:#d32f2f;font-size:var(--primary-font);margin:0}.sg-color-picker{font-family:var(--font-family);position:relative}.sg-color-picker-toggle{border-radius:var(--input-radius);border:1px solid var(--input-border);background:var(--input-bg);width:100%;color:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-family:inherit;font-size:13px;display:flex}.sg-color-picker-toggle-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sg-color-picker-swatch{border:1px solid #00000026;border-radius:4px;flex:none;width:18px;height:18px}.sg-color-picker-popover{z-index:30;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--shadow-1);width:170px;padding:10px;position:absolute;top:calc(100% + 4px);left:0}.sg-color-picker-grid{grid-template-columns:repeat(6,1fr);gap:6px;display:grid}.sg-color-picker-swatch-button{cursor:pointer;border:1px solid #00000026;border-radius:4px;width:20px;height:20px;padding:0}.sg-color-picker-swatch-button.active{border:2px solid var(--accent)}.sg-color-picker-custom{border-top:1px solid var(--input-border);color:var(--ink-muted);cursor:pointer;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding-top:8px;font-size:11px;display:flex}.sg-color-picker-custom input[type=color]{cursor:pointer;border:none;width:26px;height:20px;padding:0}.sg-font-picker{font-family:var(--font-family);position:relative}.sg-font-picker-toggle{border-radius:var(--input-radius);border:1px solid var(--input-border);background:var(--input-bg);width:100%;color:inherit;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.sg-font-picker-toggle-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sg-font-picker-toggle-caret{opacity:.5;flex:none;font-size:10px}.sg-font-picker-list{background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);max-height:260px;box-shadow:var(--shadow-1);z-index:30;margin:0;padding:4px 0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.sg-font-picker-option{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:none;padding:8px 10px;font-size:15px;display:block}.sg-font-picker-option.active{background:var(--accent-soft)}:root{--unit:3px;--primary-bg:#f5f5f5;--primary-border:#ccc;--radius:calc(var(--unit) * 2);--primary-radius:var(--radius);--primary-font:var(--font-size);--primary-hover-bg:#e0e0e0;--modal-bg:#fff;--modal-overlay:#0000004d;--modal-title-color:#222;--input-bg:#fff;--input-border:#ccc;--input-radius:var(--radius);--input-font:1rem;--font-size:14px;--font-family:Arial, sans-serif;--font-size-h1:calc(var(--font-size) * 1.5);--button-bg:#6f9cf7;--button-bg-hover:#5480e6;--button-color:#fff;--button-radius:999px;--button-shadow:0 1px 2px #5480e61f, 0 1px 3px #5480e61a;--button-ease-standard:cubic-bezier(.4, 0, .2, 1);--button-ease-bounce:cubic-bezier(.34, 1.56, .64, 1);--accent:#3d5fc4;--accent-strong:#2e4aa0;--accent-soft:#e2e7f8;--ink-muted:#647089;--shadow-1:0 1px 2px #0f172a14, 0 1px 3px #0f172a0f;--shadow-2:0 4px 12px #0f172a1f}.theme-dark{--primary-bg:#222;--primary-border:#444;--primary-font:1rem;--font-family:"Inter", Arial, sans-serif;--primary-hover-bg:#333;--modal-bg:#222;--modal-title-color:#fff;--input-bg:#333;--input-border:#555;--input-font:1rem;--button-bg:#6f9cf7;--button-bg-hover:#86aefc;--button-color:#fff;--accent:#6f9cf7;--accent-strong:#86aefc;--accent-soft:#6f9cf72e;--ink-muted:#9aa3b5;--shadow-1:0 1px 2px #0000004d, 0 1px 3px #0000003d;--shadow-2:0 4px 12px #0006}.sg-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--font-family);align-items:center;gap:6px;display:flex}.sg-toggle-input{opacity:0;width:1px;height:1px;position:absolute}.sg-toggle-track{background:var(--input-border);border-radius:999px;flex:none;width:34px;height:20px;transition:background .15s cubic-bezier(.4,0,.2,1);position:relative}.sg-toggle-input:checked+.sg-toggle-track{background:var(--accent)}.sg-toggle-thumb{background:var(--input-bg);width:16px;height:16px;box-shadow:var(--shadow-1);border-radius:50%;transition:left .15s cubic-bezier(.4,0,.2,1);position:absolute;top:2px;left:2px}.sg-toggle-input:checked+.sg-toggle-track .sg-toggle-thumb{left:16px}.sg-toggle-input:focus-visible+.sg-toggle-track{outline:2px solid var(--accent-strong);outline-offset:2px}.sg-toggle-label{color:var(--ink-muted);white-space:nowrap;font-size:13px}
|
|
2
2
|
/*$vite$:1*/
|