@hgdc/ui 0.33.0 → 0.35.0
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/README.md +6 -6
- package/dist/family-svg.d.ts +2 -2
- package/dist/family-svg.js +16 -16
- package/dist/product-badge.d.ts +2 -3
- package/dist/product-badge.js +2 -3
- package/dist/products.d.ts +22 -0
- package/dist/products.js +24 -1
- package/email-icons/account.png +0 -0
- package/email-icons/analytics.png +0 -0
- package/email-icons/docs.png +0 -0
- package/email-icons/host.png +0 -0
- package/email-icons/mail.png +0 -0
- package/email-icons/portal.png +0 -0
- package/email-icons/status.png +0 -0
- package/family/app/account/apple-touch-icon.png +0 -0
- package/family/app/account/icon-192.png +0 -0
- package/family/app/account/icon-512.png +0 -0
- package/family/app/account/icon-maskable-512.png +0 -0
- package/family/app/analytics/apple-touch-icon.png +0 -0
- package/family/app/analytics/icon-192.png +0 -0
- package/family/app/analytics/icon-512.png +0 -0
- package/family/app/analytics/icon-maskable-512.png +0 -0
- package/family/app/docs/apple-touch-icon.png +0 -0
- package/family/app/docs/icon-192.png +0 -0
- package/family/app/docs/icon-512.png +0 -0
- package/family/app/docs/icon-maskable-512.png +0 -0
- package/family/app/host/apple-touch-icon.png +0 -0
- package/family/app/host/icon-192.png +0 -0
- package/family/app/host/icon-512.png +0 -0
- package/family/app/host/icon-maskable-512.png +0 -0
- package/family/app/mail/apple-touch-icon.png +0 -0
- package/family/app/mail/icon-192.png +0 -0
- package/family/app/mail/icon-512.png +0 -0
- package/family/app/mail/icon-maskable-512.png +0 -0
- package/family/app/portal/apple-touch-icon.png +0 -0
- package/family/app/portal/icon-192.png +0 -0
- package/family/app/portal/icon-512.png +0 -0
- package/family/app/portal/icon-maskable-512.png +0 -0
- package/family/app/status/apple-touch-icon.png +0 -0
- package/family/app/status/icon-192.png +0 -0
- package/family/app/status/icon-512.png +0 -0
- package/family/app/status/icon-maskable-512.png +0 -0
- package/family/tile/account.svg +1 -1
- package/family/tile/analytics.svg +1 -1
- package/family/tile/docs.svg +1 -1
- package/family/tile/host.svg +1 -1
- package/family/tile/mail.svg +1 -1
- package/family/tile/portal.svg +1 -1
- package/family/tile/status.svg +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,12 +75,12 @@ Une seule règle dans les sept produits, posée par la coque :
|
|
|
75
75
|
|
|
76
76
|
## Identité H Collection
|
|
77
77
|
|
|
78
|
-
| Import | Rôle
|
|
79
|
-
| --------------------------------------- |
|
|
80
|
-
| `product-badge` | `<ProductBadge product="host" className="size-8" />` (
|
|
81
|
-
| `@hgdc/ui/family/<mot>.svg` | Pictogrammes des produits (`account`, `host`, `mail`, `portal`, `status`, `analytics`, `docs`), originaux du site ; `family/tile/<mot>.svg` (
|
|
82
|
-
| `@hgdc/ui/family/hcollection-icon*.svg` | Le H « Double », marque de la H Collection, sur fond clair (`hcollection-icon.svg`) ou sombre (`-dark`), jamais recoloré
|
|
83
|
-
| `styles.css` | `--product-<mot>-from` / `--product-<mot>-to` (dégradé de chaque icône sur fond clair), `--glow-blue`, `--glow-violet`, `--glow-pink`, `--glow-orange`
|
|
78
|
+
| Import | Rôle |
|
|
79
|
+
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| `product-badge` | `<ProductBadge product="host" className="size-8" />` (pictogramme seul, sans fond), `<FamilyMark />` (le H « Double », clair et sombre selon le thème), `PRODUCT_GRADIENT` |
|
|
81
|
+
| `@hgdc/ui/family/<mot>.svg` | Pictogrammes des produits (`account`, `host`, `mail`, `portal`, `status`, `analytics`, `docs`), originaux du site ; `family/tile/<mot>.svg` (le même dessin, sans fond, à la taille du cadre) ; `family/app/<mot>/` : favicon.svg, favicon.ico, apple-touch-icon.png, icon-192/512.png, icon-maskable-512.png, posés dans `public/` au build par `hgdc-brand sync <mot>` (jamais versionnés) |
|
|
82
|
+
| `@hgdc/ui/family/hcollection-icon*.svg` | Le H « Double », marque de la H Collection, sur fond clair (`hcollection-icon.svg`) ou sombre (`-dark`), jamais recoloré |
|
|
83
|
+
| `styles.css` | `--product-<mot>-from` / `--product-<mot>-to` (dégradé de chaque icône sur fond clair), `--glow-blue`, `--glow-violet`, `--glow-pink`, `--glow-orange` |
|
|
84
84
|
|
|
85
85
|
Couleurs pleines ; pour éclaircir, mélanger au blanc `color-mix(in oklab, …)`, jamais `in oklch`. Une icône de produit se pose toujours sur son fond blanc, en clair comme en sombre, sans bordure ni ombre : carré arrondi 22 % partout, pictogramme à 12 % de marge (barre, menu, « Propulsé par », e-mails, icône d'app), plein cadre pour apple-touch et maskable. Le favicon est sans fond et suit le thème du système (ADR 0017). Le H reste sans fond. Les originaux vivent dans le dépôt du site hgdc.ch : les recopier dans `packages/ui/family/`, puis `bun scripts/family.ts && bun run format` (SVG embarqués, PNG des e-mails, icônes d'application). Geste complet : `docs/runbooks/changer-une-icone.md`.
|
|
86
86
|
|
package/dist/family-svg.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type ThemedSvg = Readonly<{
|
|
|
9
9
|
dark: string;
|
|
10
10
|
}>;
|
|
11
11
|
/**
|
|
12
|
-
* SVG de l'icône de chaque produit
|
|
13
|
-
*
|
|
12
|
+
* SVG de l'icône de chaque produit : le pictogramme clair seul, sans fond
|
|
13
|
+
* (`family/tile/<mot>.svg`).
|
|
14
14
|
*/
|
|
15
15
|
export declare const PRODUCT_BADGE_SVG: Readonly<Record<FamilyProduct, string>>;
|
|
16
16
|
/**
|
package/dist/family-svg.js
CHANGED
|
@@ -6,30 +6,30 @@ export function isFamilyProduct(word) {
|
|
|
6
6
|
return FAMILY_PRODUCTS.includes(word);
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* SVG de l'icône de chaque produit
|
|
10
|
-
*
|
|
9
|
+
* SVG de l'icône de chaque produit : le pictogramme clair seul, sans fond
|
|
10
|
+
* (`family/tile/<mot>.svg`).
|
|
11
11
|
*/
|
|
12
12
|
export const PRODUCT_BADGE_SVG = {
|
|
13
|
-
account: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
14
|
-
host: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
15
|
-
mail: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
16
|
-
portal: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
17
|
-
status: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
18
|
-
analytics: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
19
|
-
docs: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
13
|
+
account: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="12 12.5 40 40"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ff6a3d"/><stop offset="1" stop-color="#fc582e"/></linearGradient></defs><path d="M22 17H42A5 5 0 0 1 47 22V40A5 5 0 0 1 42 45H22A5 5 0 0 1 17 40V22A5 5 0 0 1 22 17Z" fill="url(#g)" fill-opacity="0.28" fill-rule="evenodd"/><path d="M17.5 21H46.5A5.5 5.5 0 0 1 52 26.5V42.5A5.5 5.5 0 0 1 46.5 48H17.5A5.5 5.5 0 0 1 12 42.5V26.5A5.5 5.5 0 0 1 17.5 21ZM20.5 30.9A3.5 3.5 0 1 0 27.5 30.9A3.5 3.5 0 1 0 20.5 30.9ZM17.6 40.6C17.6 37.6 20.5 35.6 24 35.6C27.5 35.6 30.4 37.6 30.4 40.6ZM35.5 30H44.5A1.5 1.5 0 0 1 46 31.5V31.5A1.5 1.5 0 0 1 44.5 33H35.5A1.5 1.5 0 0 1 34 31.5V31.5A1.5 1.5 0 0 1 35.5 30ZM35.5 36H40.5A1.5 1.5 0 0 1 42 37.5V37.5A1.5 1.5 0 0 1 40.5 39H35.5A1.5 1.5 0 0 1 34 37.5V37.5A1.5 1.5 0 0 1 35.5 36Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
14
|
+
host: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 14 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3b7bff"/><stop offset="1" stop-color="#2b63f2"/></linearGradient></defs><path d="M20 14H44A3 3 0 0 1 47 17V20A3 3 0 0 1 44 23H20A3 3 0 0 1 17 20V17A3 3 0 0 1 20 14ZM39.8 18.5A1.7 1.7 0 1 0 43.2 18.5A1.7 1.7 0 1 0 39.8 18.5Z" fill="url(#g)" fill-opacity="0.4" fill-rule="evenodd"/><path d="M20 26.5H44A3 3 0 0 1 47 29.5V32.5A3 3 0 0 1 44 35.5H20A3 3 0 0 1 17 32.5V29.5A3 3 0 0 1 20 26.5ZM39.8 31A1.7 1.7 0 1 0 43.2 31A1.7 1.7 0 1 0 39.8 31Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M20.5 39H43.5A3.5 3.5 0 0 1 47 42.5V46.5A3.5 3.5 0 0 1 43.5 50H20.5A3.5 3.5 0 0 1 17 46.5V42.5A3.5 3.5 0 0 1 20.5 39ZM39.6 44.5A1.9 1.9 0 1 0 43.4 44.5A1.9 1.9 0 1 0 39.6 44.5ZM22.7 43.3H29.3A1.2 1.2 0 0 1 30.5 44.5V44.49999999999999A1.2 1.2 0 0 1 29.3 45.699999999999996H22.7A1.2 1.2 0 0 1 21.5 44.49999999999999V44.5A1.2 1.2 0 0 1 22.7 43.3Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
15
|
+
mail: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 13 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fa3a58"/><stop offset="1" stop-color="#ec3052"/></linearGradient></defs><path d="M17.5 25H46.5A3.5 3.5 0 0 1 50 28.5V45.5A3.5 3.5 0 0 1 46.5 49H17.5A3.5 3.5 0 0 1 14 45.5V28.5A3.5 3.5 0 0 1 17.5 25Z" fill="url(#g)" fill-opacity="0.25" fill-rule="evenodd"/><path d="M22.5 13H41.5A2.5 2.5 0 0 1 44 15.5V44.5A2.5 2.5 0 0 1 41.5 47H22.5A2.5 2.5 0 0 1 20 44.5V15.5A2.5 2.5 0 0 1 22.5 13ZM25.2 18H38.8A1.2 1.2 0 0 1 40 19.2V19.2A1.2 1.2 0 0 1 38.8 20.4H25.2A1.2 1.2 0 0 1 24 19.2V19.2A1.2 1.2 0 0 1 25.2 18ZM25.2 23H33.8A1.2 1.2 0 0 1 35 24.2V24.2A1.2 1.2 0 0 1 33.8 25.4H25.2A1.2 1.2 0 0 1 24 24.2V24.2A1.2 1.2 0 0 1 25.2 23Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M14 29.5L32 40.5L50 29.5V45.5A3.5 3.5 0 0 1 46.5 49H17.5A3.5 3.5 0 0 1 14 45.5Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
16
|
+
portal: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="13 13 38 38"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8b5cff"/><stop offset="1" stop-color="#7b4bf7"/></linearGradient></defs><path d="M21 13H43A3 3 0 0 1 46 16V47A3 3 0 0 1 43 50H21A3 3 0 0 1 18 47V16A3 3 0 0 1 21 13Z" fill="url(#g)" fill-opacity="0.28" fill-rule="evenodd"/><path d="M20.6 13.3L32.6 16.5A2 2 0 0 1 34 18.4V45.6A2 2 0 0 1 32.6 47.5L20.6 50.7A2 2 0 0 1 18 48.8V15.2A2 2 0 0 1 20.6 13.3ZM28.2 32A1.8 1.8 0 1 0 31.8 32A1.8 1.8 0 1 0 28.2 32Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
17
|
+
status: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 14 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11ce8b"/><stop offset="1" stop-color="#09b077"/></linearGradient></defs><path d="M14 32A18 18 0 1 0 50 32A18 18 0 1 0 14 32Z" fill="url(#g)" fill-opacity="0.22" fill-rule="evenodd"/><path d="M19.5 32A12.5 12.5 0 1 0 44.5 32A12.5 12.5 0 1 0 19.5 32Z" fill="url(#g)" fill-opacity="0.45" fill-rule="evenodd"/><path d="M25 32A7 7 0 1 0 39 32A7 7 0 1 0 25 32Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
18
|
+
analytics: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="15 15 34 34"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffb020"/><stop offset="1" stop-color="#e58309"/></linearGradient></defs><path d="M18.3 34H21.7A2.8 2.8 0 0 1 24.5 36.8V46.2A2.8 2.8 0 0 1 21.7 49H18.3A2.8 2.8 0 0 1 15.5 46.2V36.8A2.8 2.8 0 0 1 18.3 34Z" fill="url(#g)" fill-opacity="0.4" fill-rule="evenodd"/><path d="M30.3 25H33.7A2.8 2.8 0 0 1 36.5 27.8V46.2A2.8 2.8 0 0 1 33.7 49H30.3A2.8 2.8 0 0 1 27.5 46.2V27.8A2.8 2.8 0 0 1 30.3 25Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M42.3 15H45.7A2.8 2.8 0 0 1 48.5 17.8V46.2A2.8 2.8 0 0 1 45.7 49H42.3A2.8 2.8 0 0 1 39.5 46.2V17.8A2.8 2.8 0 0 1 42.3 15Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>',
|
|
19
|
+
docs: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 13 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0ec1dc"/><stop offset="1" stop-color="#0aa3c1"/></linearGradient></defs><path d="M26 13H46A3 3 0 0 1 49 16V43A3 3 0 0 1 46 46H26A3 3 0 0 1 23 43V16A3 3 0 0 1 26 13Z" fill="url(#g)" fill-opacity="0.22" fill-rule="evenodd"/><path d="M18 18H32V24.5A2.5 2.5 0 0 0 34.5 27H41V46A3 3 0 0 1 38 49H18A3 3 0 0 1 15 46V21A3 3 0 0 1 18 18ZM21.3 33H34.7A1.3 1.3 0 0 1 36 34.3V34.300000000000004A1.3 1.3 0 0 1 34.7 35.6H21.3A1.3 1.3 0 0 1 20 34.300000000000004V34.3A1.3 1.3 0 0 1 21.3 33ZM21.3 39H29.7A1.3 1.3 0 0 1 31 40.3V40.300000000000004A1.3 1.3 0 0 1 29.7 41.6H21.3A1.3 1.3 0 0 1 20 40.300000000000004V40.3A1.3 1.3 0 0 1 21.3 39Z" fill="url(#g)" fill-rule="evenodd"/><path d="M32 18L41 27H34.5A2.5 2.5 0 0 1 32 24.5Z" fill="url(#g)" fill-opacity="0.45" fill-rule="evenodd"/></svg></svg>',
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Empreinte de chaque icône d'e-mail (`email-icons/<mot>.png`), ajoutée à son adresse : un client
|
|
23
23
|
* mail qui garde l'ancienne image en cache (proxy d'images de Gmail) charge la nouvelle.
|
|
24
24
|
*/
|
|
25
25
|
export const EMAIL_ICON_VERSION = {
|
|
26
|
-
account: "
|
|
27
|
-
host: "
|
|
28
|
-
mail: "
|
|
29
|
-
portal: "
|
|
30
|
-
status: "
|
|
31
|
-
analytics: "
|
|
32
|
-
docs: "
|
|
26
|
+
account: "3585e697",
|
|
27
|
+
host: "b501c9a8",
|
|
28
|
+
mail: "c3a003ef",
|
|
29
|
+
portal: "493abbd5",
|
|
30
|
+
status: "90f70c05",
|
|
31
|
+
analytics: "83add9fb",
|
|
32
|
+
docs: "77f11f0b",
|
|
33
33
|
};
|
|
34
34
|
/** SVG du H « Double », la marque de la H Collection, sans fond (`family/hcollection-icon(-dark).svg`). */
|
|
35
35
|
export const FAMILY_MARK_SVG = {
|
package/dist/product-badge.d.ts
CHANGED
|
@@ -14,9 +14,8 @@ type MarkProps = {
|
|
|
14
14
|
label?: string;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Icône d'un produit : le pictogramme
|
|
18
|
-
*
|
|
19
|
-
* défaut, à agrandir par `className`.
|
|
17
|
+
* Icône d'un produit : le pictogramme clair seul, sans fond, le même dans tous les contextes.
|
|
18
|
+
* Il remplit le cadre (`size-4` par défaut, à agrandir par `className`).
|
|
20
19
|
*/
|
|
21
20
|
export declare function ProductBadge({ product, className, label }: MarkProps & {
|
|
22
21
|
product: FamilyProduct;
|
package/dist/product-badge.js
CHANGED
|
@@ -28,9 +28,8 @@ function ThemedMark({ svg, slot, className, label }) {
|
|
|
28
28
|
return (_jsxs("span", { "data-slot": slot, ...(label ? { role: "img", "aria-label": label } : { "aria-hidden": true }), className: cn("inline-block size-4 shrink-0 select-none", className), children: [_jsx("img", { src: dataUri(svg.light), alt: "", width: 16, height: 16, draggable: false, "data-mark-theme": "light", className: "block size-full" }), _jsx("img", { src: dataUri(svg.dark), alt: "", width: 16, height: 16, draggable: false, "data-mark-theme": "dark", className: "block size-full" })] }));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Icône d'un produit : le pictogramme
|
|
32
|
-
*
|
|
33
|
-
* défaut, à agrandir par `className`.
|
|
31
|
+
* Icône d'un produit : le pictogramme clair seul, sans fond, le même dans tous les contextes.
|
|
32
|
+
* Il remplit le cadre (`size-4` par défaut, à agrandir par `className`).
|
|
34
33
|
*/
|
|
35
34
|
export function ProductBadge({ product, className, label }) {
|
|
36
35
|
return (_jsx("img", { src: dataUri(PRODUCT_BADGE_SVG[product]), alt: label ?? "", "aria-hidden": label ? undefined : true, width: 16, height: 16, draggable: false, "data-slot": "product-badge", className: cn("size-4 shrink-0 select-none", className) }));
|
package/dist/products.d.ts
CHANGED
|
@@ -41,6 +41,28 @@ export type HgdcCatalogProduct = {
|
|
|
41
41
|
* quand cette session existe.
|
|
42
42
|
*/
|
|
43
43
|
export declare const PRODUCT_ENTRY_PATH = "/auth/hgdc";
|
|
44
|
+
/** Où un produit est servi : l'origine et, s'il partage son hôte avec d'autres, sa base de chemin. */
|
|
45
|
+
export type ProductOrigin = {
|
|
46
|
+
origin: string;
|
|
47
|
+
basePath: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Adresse de l'app de chaque produit, par mot en minuscules. Défaut : `https://<mot>.hgdc.ch` sans
|
|
51
|
+
* base. Un produit servi sous `https://app.hgdc.ch/<mot>` (`@hgdc/auth`, `appBasePath`) migre en
|
|
52
|
+
* ajoutant sa ligne ici, une à la fois, quand son déploiement est prêt :
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* analytics: { origin: "https://app.hgdc.ch", basePath: "/analytics" },
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Ne change que l'entrée dans l'app (`entryHref`, menus et barre) : la page d'accueil publique
|
|
59
|
+
* (`href`) reste `https://<mot>.hgdc.ch`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const PRODUCT_ORIGINS: Readonly<Record<string, ProductOrigin>>;
|
|
62
|
+
/** Adresse de l'app d'un produit : celle de `PRODUCT_ORIGINS`, sinon `https://<mot>.hgdc.ch`. */
|
|
63
|
+
export declare function productOrigin(word: string, origins?: Readonly<Record<string, ProductOrigin>>): ProductOrigin;
|
|
64
|
+
/** Entrée dans l'app d'un produit avec la session HGDC : `https://app.hgdc.ch/analytics/auth/hgdc?refresh=background&next=/`. */
|
|
65
|
+
export declare function productEntryHref(word: string, origins?: Readonly<Record<string, ProductOrigin>>): string;
|
|
44
66
|
/**
|
|
45
67
|
* Requête de l'entrée depuis un autre produit : arriver sur l'accueil, relire les organisations en
|
|
46
68
|
* arrière-plan (`refresh=background`, ADR 0016).
|
package/dist/products.js
CHANGED
|
@@ -18,6 +18,29 @@ export const PRODUCT_STAGE_LABEL = {
|
|
|
18
18
|
* quand cette session existe.
|
|
19
19
|
*/
|
|
20
20
|
export const PRODUCT_ENTRY_PATH = "/auth/hgdc";
|
|
21
|
+
/**
|
|
22
|
+
* Adresse de l'app de chaque produit, par mot en minuscules. Défaut : `https://<mot>.hgdc.ch` sans
|
|
23
|
+
* base. Un produit servi sous `https://app.hgdc.ch/<mot>` (`@hgdc/auth`, `appBasePath`) migre en
|
|
24
|
+
* ajoutant sa ligne ici, une à la fois, quand son déploiement est prêt :
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* analytics: { origin: "https://app.hgdc.ch", basePath: "/analytics" },
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Ne change que l'entrée dans l'app (`entryHref`, menus et barre) : la page d'accueil publique
|
|
31
|
+
* (`href`) reste `https://<mot>.hgdc.ch`.
|
|
32
|
+
*/
|
|
33
|
+
export const PRODUCT_ORIGINS = {};
|
|
34
|
+
/** Adresse de l'app d'un produit : celle de `PRODUCT_ORIGINS`, sinon `https://<mot>.hgdc.ch`. */
|
|
35
|
+
export function productOrigin(word, origins = PRODUCT_ORIGINS) {
|
|
36
|
+
const key = word.toLowerCase();
|
|
37
|
+
return Object.hasOwn(origins, key) ? origins[key] : { origin: `https://${key}.hgdc.ch`, basePath: "" };
|
|
38
|
+
}
|
|
39
|
+
/** Entrée dans l'app d'un produit avec la session HGDC : `https://app.hgdc.ch/analytics/auth/hgdc?refresh=background&next=/`. */
|
|
40
|
+
export function productEntryHref(word, origins = PRODUCT_ORIGINS) {
|
|
41
|
+
const app = productOrigin(word, origins);
|
|
42
|
+
return `${app.origin}${app.basePath}${PRODUCT_ENTRY_PATH}?${PRODUCT_ENTRY_REFRESH_QUERY}`;
|
|
43
|
+
}
|
|
21
44
|
/**
|
|
22
45
|
* Requête de l'entrée depuis un autre produit : arriver sur l'accueil, relire les organisations en
|
|
23
46
|
* arrière-plan (`refresh=background`, ADR 0016).
|
|
@@ -34,7 +57,7 @@ function product(word, pitch, icon, stage) {
|
|
|
34
57
|
name: word,
|
|
35
58
|
subdomain,
|
|
36
59
|
href,
|
|
37
|
-
entryHref:
|
|
60
|
+
entryHref: productEntryHref(badge),
|
|
38
61
|
pitch,
|
|
39
62
|
badge,
|
|
40
63
|
icon,
|
package/email-icons/account.png
CHANGED
|
Binary file
|
|
Binary file
|
package/email-icons/docs.png
CHANGED
|
Binary file
|
package/email-icons/host.png
CHANGED
|
Binary file
|
package/email-icons/mail.png
CHANGED
|
Binary file
|
package/email-icons/portal.png
CHANGED
|
Binary file
|
package/email-icons/status.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/family/tile/account.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="12 12.5 40 40"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ff6a3d"/><stop offset="1" stop-color="#fc582e"/></linearGradient></defs><path d="M22 17H42A5 5 0 0 1 47 22V40A5 5 0 0 1 42 45H22A5 5 0 0 1 17 40V22A5 5 0 0 1 22 17Z" fill="url(#g)" fill-opacity="0.28" fill-rule="evenodd"/><path d="M17.5 21H46.5A5.5 5.5 0 0 1 52 26.5V42.5A5.5 5.5 0 0 1 46.5 48H17.5A5.5 5.5 0 0 1 12 42.5V26.5A5.5 5.5 0 0 1 17.5 21ZM20.5 30.9A3.5 3.5 0 1 0 27.5 30.9A3.5 3.5 0 1 0 20.5 30.9ZM17.6 40.6C17.6 37.6 20.5 35.6 24 35.6C27.5 35.6 30.4 37.6 30.4 40.6ZM35.5 30H44.5A1.5 1.5 0 0 1 46 31.5V31.5A1.5 1.5 0 0 1 44.5 33H35.5A1.5 1.5 0 0 1 34 31.5V31.5A1.5 1.5 0 0 1 35.5 30ZM35.5 36H40.5A1.5 1.5 0 0 1 42 37.5V37.5A1.5 1.5 0 0 1 40.5 39H35.5A1.5 1.5 0 0 1 34 37.5V37.5A1.5 1.5 0 0 1 35.5 36Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="15 15 34 34"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffb020"/><stop offset="1" stop-color="#e58309"/></linearGradient></defs><path d="M18.3 34H21.7A2.8 2.8 0 0 1 24.5 36.8V46.2A2.8 2.8 0 0 1 21.7 49H18.3A2.8 2.8 0 0 1 15.5 46.2V36.8A2.8 2.8 0 0 1 18.3 34Z" fill="url(#g)" fill-opacity="0.4" fill-rule="evenodd"/><path d="M30.3 25H33.7A2.8 2.8 0 0 1 36.5 27.8V46.2A2.8 2.8 0 0 1 33.7 49H30.3A2.8 2.8 0 0 1 27.5 46.2V27.8A2.8 2.8 0 0 1 30.3 25Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M42.3 15H45.7A2.8 2.8 0 0 1 48.5 17.8V46.2A2.8 2.8 0 0 1 45.7 49H42.3A2.8 2.8 0 0 1 39.5 46.2V17.8A2.8 2.8 0 0 1 42.3 15Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
package/family/tile/docs.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 13 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0ec1dc"/><stop offset="1" stop-color="#0aa3c1"/></linearGradient></defs><path d="M26 13H46A3 3 0 0 1 49 16V43A3 3 0 0 1 46 46H26A3 3 0 0 1 23 43V16A3 3 0 0 1 26 13Z" fill="url(#g)" fill-opacity="0.22" fill-rule="evenodd"/><path d="M18 18H32V24.5A2.5 2.5 0 0 0 34.5 27H41V46A3 3 0 0 1 38 49H18A3 3 0 0 1 15 46V21A3 3 0 0 1 18 18ZM21.3 33H34.7A1.3 1.3 0 0 1 36 34.3V34.300000000000004A1.3 1.3 0 0 1 34.7 35.6H21.3A1.3 1.3 0 0 1 20 34.300000000000004V34.3A1.3 1.3 0 0 1 21.3 33ZM21.3 39H29.7A1.3 1.3 0 0 1 31 40.3V40.300000000000004A1.3 1.3 0 0 1 29.7 41.6H21.3A1.3 1.3 0 0 1 20 40.300000000000004V40.3A1.3 1.3 0 0 1 21.3 39Z" fill="url(#g)" fill-rule="evenodd"/><path d="M32 18L41 27H34.5A2.5 2.5 0 0 1 32 24.5Z" fill="url(#g)" fill-opacity="0.45" fill-rule="evenodd"/></svg></svg>
|
package/family/tile/host.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 14 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3b7bff"/><stop offset="1" stop-color="#2b63f2"/></linearGradient></defs><path d="M20 14H44A3 3 0 0 1 47 17V20A3 3 0 0 1 44 23H20A3 3 0 0 1 17 20V17A3 3 0 0 1 20 14ZM39.8 18.5A1.7 1.7 0 1 0 43.2 18.5A1.7 1.7 0 1 0 39.8 18.5Z" fill="url(#g)" fill-opacity="0.4" fill-rule="evenodd"/><path d="M20 26.5H44A3 3 0 0 1 47 29.5V32.5A3 3 0 0 1 44 35.5H20A3 3 0 0 1 17 32.5V29.5A3 3 0 0 1 20 26.5ZM39.8 31A1.7 1.7 0 1 0 43.2 31A1.7 1.7 0 1 0 39.8 31Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M20.5 39H43.5A3.5 3.5 0 0 1 47 42.5V46.5A3.5 3.5 0 0 1 43.5 50H20.5A3.5 3.5 0 0 1 17 46.5V42.5A3.5 3.5 0 0 1 20.5 39ZM39.6 44.5A1.9 1.9 0 1 0 43.4 44.5A1.9 1.9 0 1 0 39.6 44.5ZM22.7 43.3H29.3A1.2 1.2 0 0 1 30.5 44.5V44.49999999999999A1.2 1.2 0 0 1 29.3 45.699999999999996H22.7A1.2 1.2 0 0 1 21.5 44.49999999999999V44.5A1.2 1.2 0 0 1 22.7 43.3Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
package/family/tile/mail.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 13 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fa3a58"/><stop offset="1" stop-color="#ec3052"/></linearGradient></defs><path d="M17.5 25H46.5A3.5 3.5 0 0 1 50 28.5V45.5A3.5 3.5 0 0 1 46.5 49H17.5A3.5 3.5 0 0 1 14 45.5V28.5A3.5 3.5 0 0 1 17.5 25Z" fill="url(#g)" fill-opacity="0.25" fill-rule="evenodd"/><path d="M22.5 13H41.5A2.5 2.5 0 0 1 44 15.5V44.5A2.5 2.5 0 0 1 41.5 47H22.5A2.5 2.5 0 0 1 20 44.5V15.5A2.5 2.5 0 0 1 22.5 13ZM25.2 18H38.8A1.2 1.2 0 0 1 40 19.2V19.2A1.2 1.2 0 0 1 38.8 20.4H25.2A1.2 1.2 0 0 1 24 19.2V19.2A1.2 1.2 0 0 1 25.2 18ZM25.2 23H33.8A1.2 1.2 0 0 1 35 24.2V24.2A1.2 1.2 0 0 1 33.8 25.4H25.2A1.2 1.2 0 0 1 24 24.2V24.2A1.2 1.2 0 0 1 25.2 23Z" fill="url(#g)" fill-opacity="0.7" fill-rule="evenodd"/><path d="M14 29.5L32 40.5L50 29.5V45.5A3.5 3.5 0 0 1 46.5 49H17.5A3.5 3.5 0 0 1 14 45.5Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
package/family/tile/portal.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="13 13 38 38"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8b5cff"/><stop offset="1" stop-color="#7b4bf7"/></linearGradient></defs><path d="M21 13H43A3 3 0 0 1 46 16V47A3 3 0 0 1 43 50H21A3 3 0 0 1 18 47V16A3 3 0 0 1 21 13Z" fill="url(#g)" fill-opacity="0.28" fill-rule="evenodd"/><path d="M20.6 13.3L32.6 16.5A2 2 0 0 1 34 18.4V45.6A2 2 0 0 1 32.6 47.5L20.6 50.7A2 2 0 0 1 18 48.8V15.2A2 2 0 0 1 20.6 13.3ZM28.2 32A1.8 1.8 0 1 0 31.8 32A1.8 1.8 0 1 0 28.2 32Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
package/family/tile/status.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><svg x="0" y="0" width="64" height="64" viewBox="14 14 36 36"><defs><linearGradient id="g" x1="14" y1="14" x2="50" y2="50" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11ce8b"/><stop offset="1" stop-color="#09b077"/></linearGradient></defs><path d="M14 32A18 18 0 1 0 50 32A18 18 0 1 0 14 32Z" fill="url(#g)" fill-opacity="0.22" fill-rule="evenodd"/><path d="M19.5 32A12.5 12.5 0 1 0 44.5 32A12.5 12.5 0 1 0 19.5 32Z" fill="url(#g)" fill-opacity="0.45" fill-rule="evenodd"/><path d="M25 32A7 7 0 1 0 39 32A7 7 0 1 0 25 32Z" fill="url(#g)" fill-rule="evenodd"/></svg></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hgdc/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Interface de la H Collection : jetons de la DA, thèmes, polices et composants.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/hugogebel-boop/hgdc-kit/tree/main/packages/ui#readme",
|