@hgdc/ui 0.55.0 → 0.56.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/dist/theme.js +3 -3
- package/package.json +1 -1
package/dist/theme.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
/* eslint-disable react-refresh/only-export-components */
|
|
3
3
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
const THEME_STORAGE_KEY = "theme";
|
|
5
|
-
//
|
|
6
|
-
const THEME_DEFAULT = "
|
|
5
|
+
// Suit le réglage du système tant que l'utilisateur n'a rien choisi dans le menu.
|
|
6
|
+
const THEME_DEFAULT = "system";
|
|
7
7
|
/**
|
|
8
8
|
* Couleur de la barre du navigateur, au fond de l'app dans chaque thème. Elle suit le thème de
|
|
9
9
|
* l'app, pas celui du système : le script anti-flash et `ThemeProvider` réécrivent les balises
|
|
@@ -22,7 +22,7 @@ function buildThemeScript(storageKey, defaultTheme) {
|
|
|
22
22
|
*/
|
|
23
23
|
export const themeInitScript = buildThemeScript(THEME_STORAGE_KEY, THEME_DEFAULT);
|
|
24
24
|
const ThemeProviderContext = createContext({
|
|
25
|
-
theme: "
|
|
25
|
+
theme: "system",
|
|
26
26
|
setTheme: () => { },
|
|
27
27
|
});
|
|
28
28
|
function resolveTheme(theme) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hgdc/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.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",
|