@rufous/ui 0.1.64 → 0.1.66
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/Contexts/rufousThemeProvider.cjs +39 -31
- package/dist/Contexts/rufousThemeProvider.js +1 -1
- package/dist/Dialogs/BaseDialog.js +6 -6
- package/dist/Dialogs/index.js +6 -6
- package/dist/TextFields/AddressLookup.js +2 -2
- package/dist/{chunk-P3I6CP2I.js → chunk-4GPYGFPP.js} +1 -1
- package/dist/chunk-BOE27BFQ.js +71 -0
- package/dist/{chunk-MGFGSPHM.js → chunk-EB6MPFGC.js} +1 -1
- package/dist/main.cjs +39 -31
- package/dist/main.js +12 -12
- package/package.json +1 -1
- package/dist/chunk-CSQGNUVU.js +0 -62
|
@@ -191,47 +191,55 @@ var APP_THEMES = {
|
|
|
191
191
|
// lib/Contexts/rufousThemeProvider.tsx
|
|
192
192
|
var RufousThemeContext = (0, import_react.createContext)(null);
|
|
193
193
|
var RufousThemeProvider = ({ children }) => {
|
|
194
|
-
const [
|
|
195
|
-
const [
|
|
194
|
+
const [committedThemeKey, setCommittedThemeKey] = (0, import_react.useState)("default");
|
|
195
|
+
const [previewThemeKey, setPreviewThemeKey] = (0, import_react.useState)("default");
|
|
196
|
+
const [settings, setSettings] = (0, import_react.useState)(null);
|
|
197
|
+
const getGeneralSettings = async () => {
|
|
198
|
+
try {
|
|
199
|
+
const theme = localStorage.getItem("theme") || "default";
|
|
200
|
+
setCommittedThemeKey(theme);
|
|
201
|
+
setPreviewThemeKey(theme);
|
|
202
|
+
} catch (err) {
|
|
203
|
+
console.error("Error fetching general settings:", err);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
196
206
|
(0, import_react.useEffect)(() => {
|
|
197
|
-
|
|
198
|
-
const savedMode = localStorage.getItem("themeMode") || "light";
|
|
199
|
-
setColorScheme(savedScheme);
|
|
200
|
-
setMode(savedMode);
|
|
207
|
+
getGeneralSettings();
|
|
201
208
|
}, []);
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
localStorage.setItem("colorScheme", colorScheme);
|
|
214
|
-
};
|
|
215
|
-
const updateSettings = (settings) => {
|
|
216
|
-
if (settings.theme) setColorScheme(settings.theme);
|
|
217
|
-
if (settings.mode) setMode(settings.mode);
|
|
209
|
+
const fullTheme = (0, import_react.useMemo)(() => {
|
|
210
|
+
return {
|
|
211
|
+
themeKey: previewThemeKey || settings.theme,
|
|
212
|
+
customStyles: APP_THEMES[previewThemeKey || settings.theme]
|
|
213
|
+
};
|
|
214
|
+
}, [previewThemeKey, settings]);
|
|
215
|
+
const previewTheme = (key) => setPreviewThemeKey(key);
|
|
216
|
+
const saveTheme = (inputKey) => {
|
|
217
|
+
const key = inputKey || previewThemeKey || settings.theme;
|
|
218
|
+
localStorage.setItem("theme", key);
|
|
219
|
+
setCommittedThemeKey(key);
|
|
218
220
|
};
|
|
221
|
+
const cancelTheme = () => setPreviewThemeKey(committedThemeKey);
|
|
219
222
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
220
223
|
RufousThemeContext.Provider,
|
|
221
224
|
{
|
|
222
225
|
value: {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
toggleMode,
|
|
226
|
-
changeScheme,
|
|
227
|
-
previewTheme: changeScheme,
|
|
226
|
+
theme: fullTheme,
|
|
227
|
+
previewTheme,
|
|
228
228
|
saveTheme,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
cancelTheme,
|
|
230
|
+
currentThemeKey: previewThemeKey,
|
|
231
|
+
committedThemeKey,
|
|
232
|
+
settings,
|
|
233
|
+
updateSettings: (v) => setSettings(v)
|
|
232
234
|
}
|
|
233
235
|
},
|
|
234
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
236
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
className: `theme-${previewThemeKey || committedThemeKey || "default"}`
|
|
240
|
+
},
|
|
241
|
+
children
|
|
242
|
+
)
|
|
235
243
|
);
|
|
236
244
|
};
|
|
237
245
|
var useRufousTheme = () => (0, import_react.useContext)(RufousThemeContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseDialog_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4GPYGFPP.js";
|
|
4
4
|
import "../chunk-E5RTHYCU.js";
|
|
5
5
|
import "../chunk-EZI3QGYJ.js";
|
|
6
6
|
import "../chunk-QTGVW36I.js";
|
|
@@ -54,24 +54,24 @@ import "../chunk-XPJVVKOU.js";
|
|
|
54
54
|
import "../chunk-GL43GPEM.js";
|
|
55
55
|
import "../chunk-FZCFFVXW.js";
|
|
56
56
|
import "../chunk-N26C33E6.js";
|
|
57
|
+
import "../chunk-EB6MPFGC.js";
|
|
58
|
+
import "../chunk-UPCMMCPQ.js";
|
|
57
59
|
import "../chunk-AH6RCYDL.js";
|
|
58
60
|
import "../chunk-3IBCGGN3.js";
|
|
59
61
|
import "../chunk-MNPAE2ZF.js";
|
|
60
62
|
import "../chunk-Q5XKCUE3.js";
|
|
61
|
-
import "../chunk-7KRG7VNW.js";
|
|
62
|
-
import "../chunk-MGFGSPHM.js";
|
|
63
|
-
import "../chunk-UPCMMCPQ.js";
|
|
64
63
|
import "../chunk-X357WQOT.js";
|
|
64
|
+
import "../chunk-7KRG7VNW.js";
|
|
65
|
+
import "../chunk-J6E3UO2W.js";
|
|
65
66
|
import "../chunk-GJGRMMAQ.js";
|
|
66
67
|
import "../chunk-66HHM7VI.js";
|
|
67
|
-
import "../chunk-J6E3UO2W.js";
|
|
68
68
|
import "../chunk-QPGJCRBS.js";
|
|
69
69
|
import "../chunk-U7SARO5B.js";
|
|
70
70
|
import "../chunk-BMMDUQDJ.js";
|
|
71
71
|
import "../chunk-R3GARAVJ.js";
|
|
72
72
|
import "../chunk-YRLN3TBF.js";
|
|
73
73
|
import "../chunk-CTBYVXFP.js";
|
|
74
|
-
import "../chunk-
|
|
74
|
+
import "../chunk-BOE27BFQ.js";
|
|
75
75
|
import "../chunk-S7BNFVQO.js";
|
|
76
76
|
import "../chunk-LI4N7JWK.js";
|
|
77
77
|
export {
|
package/dist/Dialogs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseDialog_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4GPYGFPP.js";
|
|
4
4
|
import "../chunk-E5RTHYCU.js";
|
|
5
5
|
import "../chunk-EZI3QGYJ.js";
|
|
6
6
|
import "../chunk-QTGVW36I.js";
|
|
@@ -54,24 +54,24 @@ import "../chunk-XPJVVKOU.js";
|
|
|
54
54
|
import "../chunk-GL43GPEM.js";
|
|
55
55
|
import "../chunk-FZCFFVXW.js";
|
|
56
56
|
import "../chunk-N26C33E6.js";
|
|
57
|
+
import "../chunk-EB6MPFGC.js";
|
|
58
|
+
import "../chunk-UPCMMCPQ.js";
|
|
57
59
|
import "../chunk-AH6RCYDL.js";
|
|
58
60
|
import "../chunk-3IBCGGN3.js";
|
|
59
61
|
import "../chunk-MNPAE2ZF.js";
|
|
60
62
|
import "../chunk-Q5XKCUE3.js";
|
|
61
|
-
import "../chunk-7KRG7VNW.js";
|
|
62
|
-
import "../chunk-MGFGSPHM.js";
|
|
63
|
-
import "../chunk-UPCMMCPQ.js";
|
|
64
63
|
import "../chunk-X357WQOT.js";
|
|
64
|
+
import "../chunk-7KRG7VNW.js";
|
|
65
|
+
import "../chunk-J6E3UO2W.js";
|
|
65
66
|
import "../chunk-GJGRMMAQ.js";
|
|
66
67
|
import "../chunk-66HHM7VI.js";
|
|
67
|
-
import "../chunk-J6E3UO2W.js";
|
|
68
68
|
import "../chunk-QPGJCRBS.js";
|
|
69
69
|
import "../chunk-U7SARO5B.js";
|
|
70
70
|
import "../chunk-BMMDUQDJ.js";
|
|
71
71
|
import "../chunk-R3GARAVJ.js";
|
|
72
72
|
import "../chunk-YRLN3TBF.js";
|
|
73
73
|
import "../chunk-CTBYVXFP.js";
|
|
74
|
-
import "../chunk-
|
|
74
|
+
import "../chunk-BOE27BFQ.js";
|
|
75
75
|
import "../chunk-S7BNFVQO.js";
|
|
76
76
|
import "../chunk-LI4N7JWK.js";
|
|
77
77
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddressLookup_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EB6MPFGC.js";
|
|
4
4
|
import "../chunk-UPCMMCPQ.js";
|
|
5
5
|
import "../chunk-CTBYVXFP.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-BOE27BFQ.js";
|
|
7
7
|
import "../chunk-S7BNFVQO.js";
|
|
8
8
|
import "../chunk-LI4N7JWK.js";
|
|
9
9
|
export {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
APP_THEMES
|
|
3
|
+
} from "./chunk-S7BNFVQO.js";
|
|
4
|
+
|
|
5
|
+
// lib/Contexts/rufousThemeProvider.tsx
|
|
6
|
+
import React, {
|
|
7
|
+
createContext,
|
|
8
|
+
useContext,
|
|
9
|
+
useEffect,
|
|
10
|
+
useMemo,
|
|
11
|
+
useState
|
|
12
|
+
} from "react";
|
|
13
|
+
var RufousThemeContext = createContext(null);
|
|
14
|
+
var RufousThemeProvider = ({ children }) => {
|
|
15
|
+
const [committedThemeKey, setCommittedThemeKey] = useState("default");
|
|
16
|
+
const [previewThemeKey, setPreviewThemeKey] = useState("default");
|
|
17
|
+
const [settings, setSettings] = useState(null);
|
|
18
|
+
const getGeneralSettings = async () => {
|
|
19
|
+
try {
|
|
20
|
+
const theme = localStorage.getItem("theme") || "default";
|
|
21
|
+
setCommittedThemeKey(theme);
|
|
22
|
+
setPreviewThemeKey(theme);
|
|
23
|
+
} catch (err) {
|
|
24
|
+
console.error("Error fetching general settings:", err);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
getGeneralSettings();
|
|
29
|
+
}, []);
|
|
30
|
+
const fullTheme = useMemo(() => {
|
|
31
|
+
return {
|
|
32
|
+
themeKey: previewThemeKey || settings.theme,
|
|
33
|
+
customStyles: APP_THEMES[previewThemeKey || settings.theme]
|
|
34
|
+
};
|
|
35
|
+
}, [previewThemeKey, settings]);
|
|
36
|
+
const previewTheme = (key) => setPreviewThemeKey(key);
|
|
37
|
+
const saveTheme = (inputKey) => {
|
|
38
|
+
const key = inputKey || previewThemeKey || settings.theme;
|
|
39
|
+
localStorage.setItem("theme", key);
|
|
40
|
+
setCommittedThemeKey(key);
|
|
41
|
+
};
|
|
42
|
+
const cancelTheme = () => setPreviewThemeKey(committedThemeKey);
|
|
43
|
+
return /* @__PURE__ */ React.createElement(
|
|
44
|
+
RufousThemeContext.Provider,
|
|
45
|
+
{
|
|
46
|
+
value: {
|
|
47
|
+
theme: fullTheme,
|
|
48
|
+
previewTheme,
|
|
49
|
+
saveTheme,
|
|
50
|
+
cancelTheme,
|
|
51
|
+
currentThemeKey: previewThemeKey,
|
|
52
|
+
committedThemeKey,
|
|
53
|
+
settings,
|
|
54
|
+
updateSettings: (v) => setSettings(v)
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
/* @__PURE__ */ React.createElement(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: `theme-${previewThemeKey || committedThemeKey || "default"}`
|
|
61
|
+
},
|
|
62
|
+
children
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
var useRufousTheme = () => useContext(RufousThemeContext);
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
RufousThemeProvider,
|
|
70
|
+
useRufousTheme
|
|
71
|
+
};
|
package/dist/main.cjs
CHANGED
|
@@ -29973,47 +29973,55 @@ var BaseDialog_default = BaseDialog;
|
|
|
29973
29973
|
var import_react14 = __toESM(require("react"), 1);
|
|
29974
29974
|
var RufousThemeContext = (0, import_react14.createContext)(null);
|
|
29975
29975
|
var RufousThemeProvider = ({ children }) => {
|
|
29976
|
-
const [
|
|
29977
|
-
const [
|
|
29976
|
+
const [committedThemeKey, setCommittedThemeKey] = (0, import_react14.useState)("default");
|
|
29977
|
+
const [previewThemeKey, setPreviewThemeKey] = (0, import_react14.useState)("default");
|
|
29978
|
+
const [settings, setSettings] = (0, import_react14.useState)(null);
|
|
29979
|
+
const getGeneralSettings = async () => {
|
|
29980
|
+
try {
|
|
29981
|
+
const theme = localStorage.getItem("theme") || "default";
|
|
29982
|
+
setCommittedThemeKey(theme);
|
|
29983
|
+
setPreviewThemeKey(theme);
|
|
29984
|
+
} catch (err) {
|
|
29985
|
+
console.error("Error fetching general settings:", err);
|
|
29986
|
+
}
|
|
29987
|
+
};
|
|
29978
29988
|
(0, import_react14.useEffect)(() => {
|
|
29979
|
-
|
|
29980
|
-
const savedMode = localStorage.getItem("themeMode") || "light";
|
|
29981
|
-
setColorScheme(savedScheme);
|
|
29982
|
-
setMode(savedMode);
|
|
29989
|
+
getGeneralSettings();
|
|
29983
29990
|
}, []);
|
|
29984
|
-
const
|
|
29985
|
-
|
|
29986
|
-
|
|
29987
|
-
|
|
29988
|
-
|
|
29989
|
-
|
|
29990
|
-
|
|
29991
|
-
|
|
29992
|
-
|
|
29993
|
-
|
|
29994
|
-
|
|
29995
|
-
localStorage.setItem("colorScheme", colorScheme);
|
|
29996
|
-
};
|
|
29997
|
-
const updateSettings = (settings) => {
|
|
29998
|
-
if (settings.theme) setColorScheme(settings.theme);
|
|
29999
|
-
if (settings.mode) setMode(settings.mode);
|
|
29991
|
+
const fullTheme = (0, import_react14.useMemo)(() => {
|
|
29992
|
+
return {
|
|
29993
|
+
themeKey: previewThemeKey || settings.theme,
|
|
29994
|
+
customStyles: APP_THEMES[previewThemeKey || settings.theme]
|
|
29995
|
+
};
|
|
29996
|
+
}, [previewThemeKey, settings]);
|
|
29997
|
+
const previewTheme = (key) => setPreviewThemeKey(key);
|
|
29998
|
+
const saveTheme = (inputKey) => {
|
|
29999
|
+
const key = inputKey || previewThemeKey || settings.theme;
|
|
30000
|
+
localStorage.setItem("theme", key);
|
|
30001
|
+
setCommittedThemeKey(key);
|
|
30000
30002
|
};
|
|
30003
|
+
const cancelTheme = () => setPreviewThemeKey(committedThemeKey);
|
|
30001
30004
|
return /* @__PURE__ */ import_react14.default.createElement(
|
|
30002
30005
|
RufousThemeContext.Provider,
|
|
30003
30006
|
{
|
|
30004
30007
|
value: {
|
|
30005
|
-
|
|
30006
|
-
|
|
30007
|
-
toggleMode,
|
|
30008
|
-
changeScheme,
|
|
30009
|
-
previewTheme: changeScheme,
|
|
30008
|
+
theme: fullTheme,
|
|
30009
|
+
previewTheme,
|
|
30010
30010
|
saveTheme,
|
|
30011
|
-
|
|
30012
|
-
|
|
30013
|
-
|
|
30011
|
+
cancelTheme,
|
|
30012
|
+
currentThemeKey: previewThemeKey,
|
|
30013
|
+
committedThemeKey,
|
|
30014
|
+
settings,
|
|
30015
|
+
updateSettings: (v) => setSettings(v)
|
|
30014
30016
|
}
|
|
30015
30017
|
},
|
|
30016
|
-
/* @__PURE__ */ import_react14.default.createElement(
|
|
30018
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
30019
|
+
"div",
|
|
30020
|
+
{
|
|
30021
|
+
className: `theme-${previewThemeKey || committedThemeKey || "default"}`
|
|
30022
|
+
},
|
|
30023
|
+
children
|
|
30024
|
+
)
|
|
30017
30025
|
);
|
|
30018
30026
|
};
|
|
30019
30027
|
var useRufousTheme = () => (0, import_react14.useContext)(RufousThemeContext);
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseDialog_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4GPYGFPP.js";
|
|
4
4
|
import "./chunk-E5RTHYCU.js";
|
|
5
5
|
import {
|
|
6
6
|
unsubscribeIcon_default
|
|
@@ -158,6 +158,12 @@ import {
|
|
|
158
158
|
import {
|
|
159
159
|
downloadPdfIcon_default
|
|
160
160
|
} from "./chunk-N26C33E6.js";
|
|
161
|
+
import {
|
|
162
|
+
AddressLookup_default
|
|
163
|
+
} from "./chunk-EB6MPFGC.js";
|
|
164
|
+
import {
|
|
165
|
+
FloatingInput
|
|
166
|
+
} from "./chunk-UPCMMCPQ.js";
|
|
161
167
|
import {
|
|
162
168
|
activateUserIcon_default
|
|
163
169
|
} from "./chunk-AH6RCYDL.js";
|
|
@@ -170,23 +176,17 @@ import {
|
|
|
170
176
|
import {
|
|
171
177
|
closeIcon_default
|
|
172
178
|
} from "./chunk-Q5XKCUE3.js";
|
|
173
|
-
import "./chunk-7KRG7VNW.js";
|
|
174
|
-
import {
|
|
175
|
-
AddressLookup_default
|
|
176
|
-
} from "./chunk-MGFGSPHM.js";
|
|
177
|
-
import {
|
|
178
|
-
FloatingInput
|
|
179
|
-
} from "./chunk-UPCMMCPQ.js";
|
|
180
179
|
import {
|
|
181
180
|
Checkbox
|
|
182
181
|
} from "./chunk-X357WQOT.js";
|
|
182
|
+
import "./chunk-7KRG7VNW.js";
|
|
183
|
+
import {
|
|
184
|
+
DataGrid
|
|
185
|
+
} from "./chunk-J6E3UO2W.js";
|
|
183
186
|
import "./chunk-GJGRMMAQ.js";
|
|
184
187
|
import {
|
|
185
188
|
RichTextEditor
|
|
186
189
|
} from "./chunk-66HHM7VI.js";
|
|
187
|
-
import {
|
|
188
|
-
DataGrid
|
|
189
|
-
} from "./chunk-J6E3UO2W.js";
|
|
190
190
|
import "./chunk-QPGJCRBS.js";
|
|
191
191
|
import {
|
|
192
192
|
addButton_default
|
|
@@ -206,7 +206,7 @@ import {
|
|
|
206
206
|
import {
|
|
207
207
|
RufousThemeProvider,
|
|
208
208
|
useRufousTheme
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-BOE27BFQ.js";
|
|
210
210
|
import {
|
|
211
211
|
APP_THEMES
|
|
212
212
|
} from "./chunk-S7BNFVQO.js";
|
package/package.json
CHANGED
package/dist/chunk-CSQGNUVU.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
APP_THEMES
|
|
3
|
-
} from "./chunk-S7BNFVQO.js";
|
|
4
|
-
|
|
5
|
-
// lib/Contexts/rufousThemeProvider.tsx
|
|
6
|
-
import React, {
|
|
7
|
-
createContext,
|
|
8
|
-
useContext,
|
|
9
|
-
useEffect,
|
|
10
|
-
useState
|
|
11
|
-
} from "react";
|
|
12
|
-
var RufousThemeContext = createContext(null);
|
|
13
|
-
var RufousThemeProvider = ({ children }) => {
|
|
14
|
-
const [colorScheme, setColorScheme] = useState("rufous");
|
|
15
|
-
const [mode, setMode] = useState("light");
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const savedScheme = localStorage.getItem("colorScheme") || "rufous";
|
|
18
|
-
const savedMode = localStorage.getItem("themeMode") || "light";
|
|
19
|
-
setColorScheme(savedScheme);
|
|
20
|
-
setMode(savedMode);
|
|
21
|
-
}, []);
|
|
22
|
-
const toggleMode = () => {
|
|
23
|
-
const newMode = mode === "light" ? "dark" : "light";
|
|
24
|
-
setMode(newMode);
|
|
25
|
-
localStorage.setItem("themeMode", newMode);
|
|
26
|
-
};
|
|
27
|
-
const changeScheme = (scheme) => {
|
|
28
|
-
setColorScheme(scheme);
|
|
29
|
-
localStorage.setItem("colorScheme", scheme);
|
|
30
|
-
};
|
|
31
|
-
const saveTheme = () => {
|
|
32
|
-
localStorage.setItem("themeMode", mode);
|
|
33
|
-
localStorage.setItem("colorScheme", colorScheme);
|
|
34
|
-
};
|
|
35
|
-
const updateSettings = (settings) => {
|
|
36
|
-
if (settings.theme) setColorScheme(settings.theme);
|
|
37
|
-
if (settings.mode) setMode(settings.mode);
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ React.createElement(
|
|
40
|
-
RufousThemeContext.Provider,
|
|
41
|
-
{
|
|
42
|
-
value: {
|
|
43
|
-
colorScheme,
|
|
44
|
-
mode,
|
|
45
|
-
toggleMode,
|
|
46
|
-
changeScheme,
|
|
47
|
-
previewTheme: changeScheme,
|
|
48
|
-
saveTheme,
|
|
49
|
-
updateSettings,
|
|
50
|
-
theme: APP_THEMES[colorScheme][mode],
|
|
51
|
-
themeConfig: APP_THEMES[colorScheme][mode]
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
/* @__PURE__ */ React.createElement("div", { className: `rufous-theme-root scheme-${colorScheme} mode-${mode}` }, children)
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
var useRufousTheme = () => useContext(RufousThemeContext);
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
RufousThemeProvider,
|
|
61
|
-
useRufousTheme
|
|
62
|
-
};
|