mogh_ui 0.1.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/color.cjs +62 -0
- package/dist/color.cjs.map +1 -0
- package/dist/color.d.cts +5 -0
- package/dist/color.d.ts +5 -0
- package/dist/color.js +37 -0
- package/dist/color.js.map +1 -0
- package/dist/components/back-button.cjs +43 -0
- package/dist/components/back-button.cjs.map +1 -0
- package/dist/components/back-button.d.cts +9 -0
- package/dist/components/back-button.d.ts +9 -0
- package/dist/components/back-button.js +19 -0
- package/dist/components/back-button.js.map +1 -0
- package/dist/components/config/confirm.cjs +191 -0
- package/dist/components/config/confirm.cjs.map +1 -0
- package/dist/components/config/confirm.d.cts +20 -0
- package/dist/components/config/confirm.d.ts +20 -0
- package/dist/components/config/confirm.js +167 -0
- package/dist/components/config/confirm.js.map +1 -0
- package/dist/components/config/group.cjs +102 -0
- package/dist/components/config/group.cjs.map +1 -0
- package/dist/components/config/group.d.cts +11 -0
- package/dist/components/config/group.d.ts +11 -0
- package/dist/components/config/group.js +78 -0
- package/dist/components/config/group.js.map +1 -0
- package/dist/components/config/index.cjs +237 -0
- package/dist/components/config/index.cjs.map +1 -0
- package/dist/components/config/index.d.cts +62 -0
- package/dist/components/config/index.d.ts +62 -0
- package/dist/components/config/index.js +217 -0
- package/dist/components/config/index.js.map +1 -0
- package/dist/components/config/item.cjs +139 -0
- package/dist/components/config/item.cjs.map +1 -0
- package/dist/components/config/item.d.cts +45 -0
- package/dist/components/config/item.d.ts +45 -0
- package/dist/components/config/item.js +119 -0
- package/dist/components/config/item.js.map +1 -0
- package/dist/components/config/layout.cjs +44 -0
- package/dist/components/config/layout.cjs.map +1 -0
- package/dist/components/config/layout.d.cts +11 -0
- package/dist/components/config/layout.d.ts +11 -0
- package/dist/components/config/layout.js +20 -0
- package/dist/components/config/layout.js.map +1 -0
- package/dist/components/config/unsaved-changes.cjs +47 -0
- package/dist/components/config/unsaved-changes.cjs.map +1 -0
- package/dist/components/config/unsaved-changes.d.cts +7 -0
- package/dist/components/config/unsaved-changes.d.ts +7 -0
- package/dist/components/config/unsaved-changes.js +23 -0
- package/dist/components/config/unsaved-changes.js.map +1 -0
- package/dist/components/confirm-button.cjs +85 -0
- package/dist/components/confirm-button.cjs.map +1 -0
- package/dist/components/confirm-button.d.cts +23 -0
- package/dist/components/confirm-button.d.ts +23 -0
- package/dist/components/confirm-button.js +69 -0
- package/dist/components/confirm-button.js.map +1 -0
- package/dist/components/confirm-icon.cjs +70 -0
- package/dist/components/confirm-icon.cjs.map +1 -0
- package/dist/components/confirm-icon.d.cts +20 -0
- package/dist/components/confirm-icon.d.ts +20 -0
- package/dist/components/confirm-icon.js +54 -0
- package/dist/components/confirm-icon.js.map +1 -0
- package/dist/components/confirm-modal.cjs +146 -0
- package/dist/components/confirm-modal.cjs.map +1 -0
- package/dist/components/confirm-modal.d.cts +25 -0
- package/dist/components/confirm-modal.d.ts +25 -0
- package/dist/components/confirm-modal.js +130 -0
- package/dist/components/confirm-modal.js.map +1 -0
- package/dist/components/copy-button.cjs +68 -0
- package/dist/components/copy-button.cjs.map +1 -0
- package/dist/components/copy-button.d.cts +15 -0
- package/dist/components/copy-button.d.ts +15 -0
- package/dist/components/copy-button.js +46 -0
- package/dist/components/copy-button.js.map +1 -0
- package/dist/components/copy-text.cjs +63 -0
- package/dist/components/copy-text.cjs.map +1 -0
- package/dist/components/copy-text.d.cts +11 -0
- package/dist/components/copy-text.d.ts +11 -0
- package/dist/components/copy-text.js +39 -0
- package/dist/components/copy-text.js.map +1 -0
- package/dist/components/create-modal.cjs +100 -0
- package/dist/components/create-modal.cjs.map +1 -0
- package/dist/components/create-modal.d.cts +18 -0
- package/dist/components/create-modal.d.ts +18 -0
- package/dist/components/create-modal.js +82 -0
- package/dist/components/create-modal.js.map +1 -0
- package/dist/components/data-table.cjs +240 -0
- package/dist/components/data-table.cjs.map +1 -0
- package/dist/components/data-table.d.cts +36 -0
- package/dist/components/data-table.d.ts +36 -0
- package/dist/components/data-table.js +233 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/divided-children/index.cjs +53 -0
- package/dist/components/divided-children/index.cjs.map +1 -0
- package/dist/components/divided-children/index.d.cts +15 -0
- package/dist/components/divided-children/index.d.ts +15 -0
- package/dist/components/divided-children/index.js +19 -0
- package/dist/components/divided-children/index.js.map +1 -0
- package/dist/components/divided-children/index.module.scss +4 -0
- package/dist/components/enable-switch.cjs +67 -0
- package/dist/components/enable-switch.cjs.map +1 -0
- package/dist/components/enable-switch.d.cts +12 -0
- package/dist/components/enable-switch.d.ts +12 -0
- package/dist/components/enable-switch.js +43 -0
- package/dist/components/enable-switch.js.map +1 -0
- package/dist/components/entity-header.cjs +137 -0
- package/dist/components/entity-header.cjs.map +1 -0
- package/dist/components/entity-header.d.cts +20 -0
- package/dist/components/entity-header.d.ts +20 -0
- package/dist/components/entity-header.js +113 -0
- package/dist/components/entity-header.js.map +1 -0
- package/dist/components/entity-page.cjs +45 -0
- package/dist/components/entity-page.cjs.map +1 -0
- package/dist/components/entity-page.d.cts +11 -0
- package/dist/components/entity-page.d.ts +11 -0
- package/dist/components/entity-page.js +21 -0
- package/dist/components/entity-page.js.map +1 -0
- package/dist/components/fancy-card/index.cjs +52 -0
- package/dist/components/fancy-card/index.cjs.map +1 -0
- package/dist/components/fancy-card/index.d.cts +17 -0
- package/dist/components/fancy-card/index.d.ts +17 -0
- package/dist/components/fancy-card/index.js +18 -0
- package/dist/components/fancy-card/index.js.map +1 -0
- package/dist/components/fancy-card/index.module.scss +13 -0
- package/dist/components/hover-error.cjs +60 -0
- package/dist/components/hover-error.cjs.map +1 -0
- package/dist/components/hover-error.d.cts +9 -0
- package/dist/components/hover-error.d.ts +9 -0
- package/dist/components/hover-error.js +36 -0
- package/dist/components/hover-error.js.map +1 -0
- package/dist/components/info-card.cjs +44 -0
- package/dist/components/info-card.cjs.map +1 -0
- package/dist/components/info-card.d.cts +21 -0
- package/dist/components/info-card.d.ts +21 -0
- package/dist/components/info-card.js +25 -0
- package/dist/components/info-card.js.map +1 -0
- package/dist/components/input-list.cjs +68 -0
- package/dist/components/input-list.cjs.map +1 -0
- package/dist/components/input-list.d.cts +14 -0
- package/dist/components/input-list.d.ts +14 -0
- package/dist/components/input-list.js +44 -0
- package/dist/components/input-list.js.map +1 -0
- package/dist/components/labelled-switch.cjs +68 -0
- package/dist/components/labelled-switch.cjs.map +1 -0
- package/dist/components/labelled-switch.d.cts +14 -0
- package/dist/components/labelled-switch.d.ts +14 -0
- package/dist/components/labelled-switch.js +48 -0
- package/dist/components/labelled-switch.js.map +1 -0
- package/dist/components/labels-group.cjs +44 -0
- package/dist/components/labels-group.cjs.map +1 -0
- package/dist/components/labels-group.d.cts +10 -0
- package/dist/components/labels-group.d.ts +10 -0
- package/dist/components/labels-group.js +20 -0
- package/dist/components/labels-group.js.map +1 -0
- package/dist/components/loading-screen.cjs +37 -0
- package/dist/components/loading-screen.cjs.map +1 -0
- package/dist/components/loading-screen.d.cts +8 -0
- package/dist/components/loading-screen.d.ts +8 -0
- package/dist/components/loading-screen.js +13 -0
- package/dist/components/loading-screen.js.map +1 -0
- package/dist/components/mobile-friendly-tabs.cjs +141 -0
- package/dist/components/mobile-friendly-tabs.cjs.map +1 -0
- package/dist/components/mobile-friendly-tabs.d.cts +43 -0
- package/dist/components/mobile-friendly-tabs.d.ts +43 -0
- package/dist/components/mobile-friendly-tabs.js +120 -0
- package/dist/components/mobile-friendly-tabs.js.map +1 -0
- package/dist/components/monaco/index.cjs +244 -0
- package/dist/components/monaco/index.cjs.map +1 -0
- package/dist/components/monaco/index.d.cts +32 -0
- package/dist/components/monaco/index.d.ts +32 -0
- package/dist/components/monaco/index.js +208 -0
- package/dist/components/monaco/index.js.map +1 -0
- package/dist/components/monaco/index.scss +3 -0
- package/dist/components/monaco/init.cjs +73 -0
- package/dist/components/monaco/init.cjs.map +1 -0
- package/dist/components/monaco/init.d.cts +2 -0
- package/dist/components/monaco/init.d.ts +2 -0
- package/dist/components/monaco/init.js +49 -0
- package/dist/components/monaco/init.js.map +1 -0
- package/dist/components/monaco/syntax/fancy_toml.cjs +241 -0
- package/dist/components/monaco/syntax/fancy_toml.cjs.map +1 -0
- package/dist/components/monaco/syntax/fancy_toml.d.cts +2 -0
- package/dist/components/monaco/syntax/fancy_toml.d.ts +2 -0
- package/dist/components/monaco/syntax/fancy_toml.js +218 -0
- package/dist/components/monaco/syntax/fancy_toml.js.map +1 -0
- package/dist/components/monaco/syntax/key_value.cjs +107 -0
- package/dist/components/monaco/syntax/key_value.cjs.map +1 -0
- package/dist/components/monaco/syntax/key_value.d.cts +2 -0
- package/dist/components/monaco/syntax/key_value.d.ts +2 -0
- package/dist/components/monaco/syntax/key_value.js +84 -0
- package/dist/components/monaco/syntax/key_value.js.map +1 -0
- package/dist/components/monaco/syntax/shell.cjs +246 -0
- package/dist/components/monaco/syntax/shell.cjs.map +1 -0
- package/dist/components/monaco/syntax/shell.d.cts +2 -0
- package/dist/components/monaco/syntax/shell.d.ts +2 -0
- package/dist/components/monaco/syntax/shell.js +223 -0
- package/dist/components/monaco/syntax/shell.js.map +1 -0
- package/dist/components/monaco/syntax/string_list.cjs +75 -0
- package/dist/components/monaco/syntax/string_list.cjs.map +1 -0
- package/dist/components/monaco/syntax/string_list.d.cts +2 -0
- package/dist/components/monaco/syntax/string_list.d.ts +2 -0
- package/dist/components/monaco/syntax/string_list.js +52 -0
- package/dist/components/monaco/syntax/string_list.js.map +1 -0
- package/dist/components/monaco/syntax/toml.cjs +157 -0
- package/dist/components/monaco/syntax/toml.cjs.map +1 -0
- package/dist/components/monaco/syntax/toml.d.cts +2 -0
- package/dist/components/monaco/syntax/toml.d.ts +2 -0
- package/dist/components/monaco/syntax/toml.js +134 -0
- package/dist/components/monaco/syntax/toml.js.map +1 -0
- package/dist/components/monaco/syntax/yaml.cjs +250 -0
- package/dist/components/monaco/syntax/yaml.cjs.map +1 -0
- package/dist/components/monaco/syntax/yaml.d.cts +2 -0
- package/dist/components/monaco/syntax/yaml.d.ts +2 -0
- package/dist/components/monaco/syntax/yaml.js +227 -0
- package/dist/components/monaco/syntax/yaml.js.map +1 -0
- package/dist/components/monaco/theme.cjs +721 -0
- package/dist/components/monaco/theme.cjs.map +1 -0
- package/dist/components/monaco/theme.d.cts +2 -0
- package/dist/components/monaco/theme.d.ts +2 -0
- package/dist/components/monaco/theme.js +698 -0
- package/dist/components/monaco/theme.js.map +1 -0
- package/dist/components/page-guard.cjs +44 -0
- package/dist/components/page-guard.cjs.map +1 -0
- package/dist/components/page-guard.d.cts +13 -0
- package/dist/components/page-guard.d.ts +13 -0
- package/dist/components/page-guard.js +20 -0
- package/dist/components/page-guard.js.map +1 -0
- package/dist/components/page.cjs +81 -0
- package/dist/components/page.cjs.map +1 -0
- package/dist/components/page.d.cts +31 -0
- package/dist/components/page.d.ts +31 -0
- package/dist/components/page.js +63 -0
- package/dist/components/page.js.map +1 -0
- package/dist/components/search-input.cjs +51 -0
- package/dist/components/search-input.cjs.map +1 -0
- package/dist/components/search-input.d.cts +9 -0
- package/dist/components/search-input.d.ts +9 -0
- package/dist/components/search-input.js +27 -0
- package/dist/components/search-input.js.map +1 -0
- package/dist/components/section.cjs +100 -0
- package/dist/components/section.cjs.map +1 -0
- package/dist/components/section.d.cts +33 -0
- package/dist/components/section.d.ts +33 -0
- package/dist/components/section.js +83 -0
- package/dist/components/section.js.map +1 -0
- package/dist/components/shared-text-update.cjs +83 -0
- package/dist/components/shared-text-update.cjs.map +1 -0
- package/dist/components/shared-text-update.d.cts +20 -0
- package/dist/components/shared-text-update.d.ts +20 -0
- package/dist/components/shared-text-update.js +65 -0
- package/dist/components/shared-text-update.js.map +1 -0
- package/dist/components/show-hide-button.cjs +48 -0
- package/dist/components/show-hide-button.cjs.map +1 -0
- package/dist/components/show-hide-button.d.cts +8 -0
- package/dist/components/show-hide-button.d.ts +8 -0
- package/dist/components/show-hide-button.js +24 -0
- package/dist/components/show-hide-button.js.map +1 -0
- package/dist/components/stat-bar.cjs +68 -0
- package/dist/components/stat-bar.cjs.map +1 -0
- package/dist/components/stat-bar.d.cts +15 -0
- package/dist/components/stat-bar.d.ts +15 -0
- package/dist/components/stat-bar.js +44 -0
- package/dist/components/stat-bar.js.map +1 -0
- package/dist/components/stat-cell.cjs +72 -0
- package/dist/components/stat-cell.cjs.map +1 -0
- package/dist/components/stat-cell.d.cts +17 -0
- package/dist/components/stat-cell.d.ts +17 -0
- package/dist/components/stat-cell.js +54 -0
- package/dist/components/stat-cell.js.map +1 -0
- package/dist/components/status-badge.cjs +63 -0
- package/dist/components/status-badge.cjs.map +1 -0
- package/dist/components/status-badge.d.cts +20 -0
- package/dist/components/status-badge.d.ts +20 -0
- package/dist/components/status-badge.js +39 -0
- package/dist/components/status-badge.js.map +1 -0
- package/dist/components/tabbed-page.cjs +64 -0
- package/dist/components/tabbed-page.cjs.map +1 -0
- package/dist/components/tabbed-page.d.cts +18 -0
- package/dist/components/tabbed-page.d.ts +18 -0
- package/dist/components/tabbed-page.js +40 -0
- package/dist/components/tabbed-page.js.map +1 -0
- package/dist/components/table-skeleton.cjs +36 -0
- package/dist/components/table-skeleton.cjs.map +1 -0
- package/dist/components/table-skeleton.d.cts +8 -0
- package/dist/components/table-skeleton.d.ts +8 -0
- package/dist/components/table-skeleton.js +12 -0
- package/dist/components/table-skeleton.js.map +1 -0
- package/dist/components/text-update-modal.cjs +102 -0
- package/dist/components/text-update-modal.cjs.map +1 -0
- package/dist/components/text-update-modal.d.cts +19 -0
- package/dist/components/text-update-modal.d.ts +19 -0
- package/dist/components/text-update-modal.js +85 -0
- package/dist/components/text-update-modal.js.map +1 -0
- package/dist/components/theme-toggle.cjs +73 -0
- package/dist/components/theme-toggle.cjs.map +1 -0
- package/dist/components/theme-toggle.d.cts +5 -0
- package/dist/components/theme-toggle.d.ts +5 -0
- package/dist/components/theme-toggle.js +54 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/formatting.cjs +124 -0
- package/dist/formatting.cjs.map +1 -0
- package/dist/formatting.d.cts +14 -0
- package/dist/formatting.d.ts +14 -0
- package/dist/formatting.js +89 -0
- package/dist/formatting.js.map +1 -0
- package/dist/hooks.cjs +117 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.cts +30 -0
- package/dist/hooks.d.ts +30 -0
- package/dist/hooks.js +88 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.cjs +99 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +47 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/index.scss +81 -0
- package/dist/theme.cjs +332 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +15 -0
- package/dist/theme.d.ts +15 -0
- package/dist/theme.js +330 -0
- package/dist/theme.js.map +1 -0
- package/dist/theme.scss +76 -0
- package/dist/utils.cjs +48 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +15 -0
- package/dist/utils.d.ts +15 -0
- package/dist/utils.js +24 -0
- package/dist/utils.js.map +1 -0
- package/package.json +61 -0
package/dist/theme.cjs
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var theme_exports = {};
|
|
20
|
+
__export(theme_exports, {
|
|
21
|
+
DARK_BODY: () => DARK_BODY,
|
|
22
|
+
LIGHT_BODY: () => LIGHT_BODY,
|
|
23
|
+
ThemeProvider: () => ThemeProvider,
|
|
24
|
+
functionColorsTuple: () => functionColorsTuple,
|
|
25
|
+
opacityColorsTuple: () => opacityColorsTuple
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(theme_exports);
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var import_core = require("@mantine/core");
|
|
30
|
+
var import_color = require("./color");
|
|
31
|
+
const LIGHT_BODY = "#f8f9fa";
|
|
32
|
+
const DARK_BODY = "#0f1115";
|
|
33
|
+
const DEFAULT_COLOR_SCHEME = "auto";
|
|
34
|
+
function ThemeProvider({
|
|
35
|
+
children,
|
|
36
|
+
additionalColors
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
import_core.MantineProvider,
|
|
40
|
+
{
|
|
41
|
+
theme: theme(additionalColors),
|
|
42
|
+
cssVariablesResolver,
|
|
43
|
+
defaultColorScheme: DEFAULT_COLOR_SCHEME,
|
|
44
|
+
children
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function theme(additionalColors) {
|
|
49
|
+
return (0, import_core.createTheme)({
|
|
50
|
+
cursorType: "pointer",
|
|
51
|
+
primaryColor: "accent",
|
|
52
|
+
breakpoints: {
|
|
53
|
+
xs: "36em",
|
|
54
|
+
sm: "48em",
|
|
55
|
+
md: "66em",
|
|
56
|
+
lg: "82em",
|
|
57
|
+
xl: "96em",
|
|
58
|
+
xl2: "110em",
|
|
59
|
+
xl3: "126em",
|
|
60
|
+
xl4: "142em"
|
|
61
|
+
},
|
|
62
|
+
colors: {
|
|
63
|
+
// Accent background color
|
|
64
|
+
lightAccent: functionColorsTuple(
|
|
65
|
+
(0, import_core.darken)(LIGHT_BODY, 0.02),
|
|
66
|
+
(color) => (0, import_core.darken)(color, 0.01)
|
|
67
|
+
),
|
|
68
|
+
darkAccent: functionColorsTuple(
|
|
69
|
+
(0, import_core.lighten)(DARK_BODY, 0.025),
|
|
70
|
+
(color) => (0, import_core.lighten)(color, 0.02)
|
|
71
|
+
),
|
|
72
|
+
accent: (0, import_core.virtualColor)({
|
|
73
|
+
name: "accent",
|
|
74
|
+
light: "lightAccent",
|
|
75
|
+
dark: "darkAccent"
|
|
76
|
+
}),
|
|
77
|
+
// Accent border color
|
|
78
|
+
lightAccentBorder: functionColorsTuple(
|
|
79
|
+
(0, import_core.darken)(LIGHT_BODY, 0.1),
|
|
80
|
+
(color) => (0, import_core.darken)(color, 0.01)
|
|
81
|
+
),
|
|
82
|
+
darkAccentBorder: functionColorsTuple(
|
|
83
|
+
(0, import_core.lighten)(DARK_BODY, 0.08),
|
|
84
|
+
(color) => (0, import_core.lighten)(color, 0.03)
|
|
85
|
+
),
|
|
86
|
+
"accent-border": (0, import_core.virtualColor)({
|
|
87
|
+
name: "accent-border",
|
|
88
|
+
light: "lightAccentBorder",
|
|
89
|
+
dark: "darkAccentBorder"
|
|
90
|
+
}),
|
|
91
|
+
lightBw: (0, import_core.colorsTuple)("#000000"),
|
|
92
|
+
darkBw: (0, import_core.colorsTuple)("#FFFFFF"),
|
|
93
|
+
bw: (0, import_core.virtualColor)({
|
|
94
|
+
name: "bw",
|
|
95
|
+
light: "lightBw",
|
|
96
|
+
dark: "darkBw"
|
|
97
|
+
}),
|
|
98
|
+
// Intention colors
|
|
99
|
+
Good: (0, import_core.colorsTuple)((0, import_color.hexColorByIntention)("Good")),
|
|
100
|
+
Neutral: (0, import_core.colorsTuple)((0, import_color.hexColorByIntention)("Neutral")),
|
|
101
|
+
Warning: (0, import_core.colorsTuple)((0, import_color.hexColorByIntention)("Warning")),
|
|
102
|
+
Critical: (0, import_core.colorsTuple)((0, import_color.hexColorByIntention)("Critical")),
|
|
103
|
+
Unknown: (0, import_core.colorsTuple)((0, import_color.hexColorByIntention)("Unknown")),
|
|
104
|
+
// Additional colors (eg tags)
|
|
105
|
+
...additionalColors
|
|
106
|
+
},
|
|
107
|
+
components: {
|
|
108
|
+
Input: import_core.Input.extend({
|
|
109
|
+
vars: (theme2) => ({
|
|
110
|
+
wrapper: {
|
|
111
|
+
"--input-radius": theme2.radius.sm
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
styles: (theme2) => ({
|
|
115
|
+
input: {
|
|
116
|
+
backgroundColor: theme2.colors.accent[1],
|
|
117
|
+
border: "1px solid " + theme2.colors["accent-border"][4]
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
Select: import_core.Select.extend({
|
|
122
|
+
styles: (theme2) => ({
|
|
123
|
+
input: {
|
|
124
|
+
backgroundColor: theme2.colors.accent[1],
|
|
125
|
+
border: "1px solid " + theme2.colors["accent-border"][4]
|
|
126
|
+
},
|
|
127
|
+
dropdown: {
|
|
128
|
+
backgroundColor: theme2.colors.accent[1],
|
|
129
|
+
borderColor: theme2.colors["accent-border"][4]
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
}),
|
|
133
|
+
MultiSelect: import_core.MultiSelect.extend({
|
|
134
|
+
styles: (theme2) => ({
|
|
135
|
+
input: {
|
|
136
|
+
backgroundColor: theme2.colors.accent[1],
|
|
137
|
+
border: "1px solid " + theme2.colors["accent-border"][4]
|
|
138
|
+
},
|
|
139
|
+
dropdown: {
|
|
140
|
+
backgroundColor: theme2.colors.accent[1],
|
|
141
|
+
borderColor: theme2.colors["accent-border"][4]
|
|
142
|
+
}
|
|
143
|
+
}),
|
|
144
|
+
defaultProps: {
|
|
145
|
+
maxDropdownHeight: 250
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
Combobox: import_core.Combobox.extend({
|
|
149
|
+
styles: (theme2) => ({
|
|
150
|
+
dropdown: {
|
|
151
|
+
backgroundColor: theme2.colors.accent[1],
|
|
152
|
+
border: "1px solid " + theme2.colors["accent-border"][4]
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
MenuDropdown: import_core.MenuDropdown.extend({
|
|
157
|
+
defaultProps: {
|
|
158
|
+
bg: "var(--mantine-color-accent-1)",
|
|
159
|
+
bd: "1px solid var(--mantine-color-accent-border-4)",
|
|
160
|
+
bdrs: "md"
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
PopoverDropdown: import_core.PopoverDropdown.extend({
|
|
164
|
+
defaultProps: {
|
|
165
|
+
bg: "var(--mantine-color-accent-1)",
|
|
166
|
+
bd: "1px solid var(--mantine-color-accent-border-4)",
|
|
167
|
+
bdrs: "md"
|
|
168
|
+
}
|
|
169
|
+
}),
|
|
170
|
+
HoverCard: import_core.HoverCard.extend({
|
|
171
|
+
styles: (theme2) => ({
|
|
172
|
+
dropdown: {
|
|
173
|
+
backgroundColor: theme2.colors.accent[1],
|
|
174
|
+
border: "1px solid " + theme2.colors["accent-border"][4]
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
}),
|
|
178
|
+
Button: import_core.Button.extend({
|
|
179
|
+
vars: (theme2) => ({
|
|
180
|
+
root: {
|
|
181
|
+
"--button-color": theme2.colors.bw[0],
|
|
182
|
+
"--button-radius": theme2.radius.sm
|
|
183
|
+
}
|
|
184
|
+
}),
|
|
185
|
+
defaultProps: {
|
|
186
|
+
variant: "default"
|
|
187
|
+
},
|
|
188
|
+
classNames: { root: "bordered-heavy-outline" }
|
|
189
|
+
}),
|
|
190
|
+
ActionIcon: import_core.ActionIcon.extend({
|
|
191
|
+
vars: (theme2) => ({
|
|
192
|
+
root: {
|
|
193
|
+
"--ai-color": theme2.colors.bw[0],
|
|
194
|
+
"--ai-radius": theme2.radius.sm
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
}),
|
|
198
|
+
Switch: import_core.Switch.extend({
|
|
199
|
+
defaultProps: {
|
|
200
|
+
color: "green"
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
Badge: import_core.Badge.extend({
|
|
204
|
+
defaultProps: {
|
|
205
|
+
bdrs: "sm",
|
|
206
|
+
c: "var(--mantine-color-text)"
|
|
207
|
+
}
|
|
208
|
+
}),
|
|
209
|
+
Table: import_core.Table.extend({
|
|
210
|
+
vars: (theme2) => ({
|
|
211
|
+
table: {
|
|
212
|
+
"--table-striped-color": theme2.colors.accent[0],
|
|
213
|
+
"--table-border-color": theme2.colors["accent-border"][0],
|
|
214
|
+
"--table-highlight-on-hover-color": theme2.colors["accent-border"][0]
|
|
215
|
+
}
|
|
216
|
+
}),
|
|
217
|
+
defaultProps: {
|
|
218
|
+
striped: true,
|
|
219
|
+
highlightOnHover: true
|
|
220
|
+
}
|
|
221
|
+
}),
|
|
222
|
+
Drawer: import_core.Drawer.extend({
|
|
223
|
+
vars: () => ({
|
|
224
|
+
root: {
|
|
225
|
+
"--drawer-flex": ""
|
|
226
|
+
}
|
|
227
|
+
}),
|
|
228
|
+
defaultProps: {
|
|
229
|
+
position: "top",
|
|
230
|
+
radius: "md"
|
|
231
|
+
},
|
|
232
|
+
styles: {
|
|
233
|
+
inner: { justifyContent: "center" }
|
|
234
|
+
}
|
|
235
|
+
}),
|
|
236
|
+
Modal: import_core.Modal.extend({
|
|
237
|
+
defaultProps: {
|
|
238
|
+
styles: { content: { borderRadius: "var(--mantine-radius-md)" } }
|
|
239
|
+
}
|
|
240
|
+
}),
|
|
241
|
+
Code: import_core.Code.extend({
|
|
242
|
+
defaultProps: {
|
|
243
|
+
bg: "var(--mantine-color-accent-0)",
|
|
244
|
+
bdrs: "sm",
|
|
245
|
+
p: "md"
|
|
246
|
+
}
|
|
247
|
+
}),
|
|
248
|
+
Fieldset: import_core.Fieldset.extend({
|
|
249
|
+
styles: (theme2) => ({
|
|
250
|
+
root: {
|
|
251
|
+
backgroundColor: "var(--mantine-color-body)",
|
|
252
|
+
borderRadius: theme2.radius.md
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
classNames: { root: "bordered-light" }
|
|
256
|
+
}),
|
|
257
|
+
SegmentedControl: import_core.SegmentedControl.extend({
|
|
258
|
+
styles: (theme2) => ({
|
|
259
|
+
root: {
|
|
260
|
+
backgroundColor: theme2.colors.accent[2]
|
|
261
|
+
},
|
|
262
|
+
indicator: {
|
|
263
|
+
backgroundColor: theme2.colors.accent[9]
|
|
264
|
+
}
|
|
265
|
+
}),
|
|
266
|
+
classNames: { root: "bordered-heavy" }
|
|
267
|
+
}),
|
|
268
|
+
Progress: import_core.Progress.extend({
|
|
269
|
+
styles: (theme2) => ({
|
|
270
|
+
root: {
|
|
271
|
+
backgroundColor: theme2.colors.accent[4]
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
}),
|
|
275
|
+
Tabs: import_core.Tabs.extend({
|
|
276
|
+
vars: (theme2) => ({
|
|
277
|
+
root: {
|
|
278
|
+
"--tabs-radius": theme2.radius.sm
|
|
279
|
+
}
|
|
280
|
+
}),
|
|
281
|
+
styles: (theme2) => ({
|
|
282
|
+
list: {
|
|
283
|
+
backgroundColor: theme2.colors.accent[1],
|
|
284
|
+
borderRadius: theme2.radius.sm
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
})
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
const cssVariablesResolver = (theme2) => ({
|
|
292
|
+
variables: {},
|
|
293
|
+
light: {
|
|
294
|
+
"--mantine-color-default": theme2.colors.accent[5],
|
|
295
|
+
"--mantine-color-default-hover": theme2.colors.accent[9],
|
|
296
|
+
"--mantine-color-default-border": theme2.colors["accent-border"][5],
|
|
297
|
+
"--mantine-color-disabled": theme2.colors.accent[1]
|
|
298
|
+
},
|
|
299
|
+
dark: {
|
|
300
|
+
"--mantine-color-default": theme2.colors.accent[5],
|
|
301
|
+
"--mantine-color-default-hover": theme2.colors.accent[9],
|
|
302
|
+
"--mantine-color-default-border": theme2.colors["accent-border"][5],
|
|
303
|
+
"--mantine-color-disabled": theme2.colors.accent[1]
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
function opacityColorsTuple(baseHex, length = 10) {
|
|
307
|
+
return (0, import_core.colorsTuple)(
|
|
308
|
+
Array.from({ length }).map(
|
|
309
|
+
(_, i) => baseHex + (i * 10 + 9).toString(16).padStart(2, "0")
|
|
310
|
+
)
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
function functionColorsTuple(base, fn, length = 10) {
|
|
314
|
+
let b = base;
|
|
315
|
+
const array = [
|
|
316
|
+
base,
|
|
317
|
+
...Array.from({ length: length - 1 }).map(() => {
|
|
318
|
+
b = fn(b);
|
|
319
|
+
return b;
|
|
320
|
+
})
|
|
321
|
+
];
|
|
322
|
+
return (0, import_core.colorsTuple)(array);
|
|
323
|
+
}
|
|
324
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
325
|
+
0 && (module.exports = {
|
|
326
|
+
DARK_BODY,
|
|
327
|
+
LIGHT_BODY,
|
|
328
|
+
ThemeProvider,
|
|
329
|
+
functionColorsTuple,
|
|
330
|
+
opacityColorsTuple
|
|
331
|
+
});
|
|
332
|
+
//# sourceMappingURL=theme.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme.tsx"],"sourcesContent":["import {\n ActionIcon,\n Badge,\n Button,\n Code,\n colorsTuple,\n Combobox,\n createTheme,\n CSSVariablesResolver,\n darken,\n DefaultMantineColor,\n Drawer,\n Fieldset,\n HoverCard,\n Input,\n lighten,\n MantineColorScheme,\n MantineColorsTuple,\n MantineProvider,\n MenuDropdown,\n Modal,\n MultiSelect,\n PopoverDropdown,\n Progress,\n SegmentedControl,\n Select,\n Switch,\n Table,\n Tabs,\n virtualColor,\n} from \"@mantine/core\";\nimport { ReactNode } from \"react\";\nimport { hexColorByIntention } from \"./color\";\n\n// Match in ./index.css\nexport const LIGHT_BODY = \"#f8f9fa\";\nexport const DARK_BODY = \"#0f1115\";\n\nconst DEFAULT_COLOR_SCHEME: MantineColorScheme = \"auto\";\n\nexport function ThemeProvider({\n children,\n additionalColors,\n}: {\n children: ReactNode;\n additionalColors?: AdditionalColors;\n}) {\n return (\n <MantineProvider\n theme={theme(additionalColors)}\n cssVariablesResolver={cssVariablesResolver}\n defaultColorScheme={DEFAULT_COLOR_SCHEME}\n >\n {children}\n </MantineProvider>\n );\n}\n\nexport type AdditionalColors =\n | Partial<Record<DefaultMantineColor, MantineColorsTuple>>\n | undefined;\n\nfunction theme(additionalColors?: AdditionalColors) {\n return createTheme({\n cursorType: \"pointer\",\n primaryColor: \"accent\",\n breakpoints: {\n xs: \"36em\",\n sm: \"48em\",\n md: \"66em\",\n lg: \"82em\",\n xl: \"96em\",\n xl2: \"110em\",\n xl3: \"126em\",\n xl4: \"142em\",\n },\n colors: {\n // Accent background color\n lightAccent: functionColorsTuple(darken(LIGHT_BODY, 0.02), (color) =>\n darken(color, 0.01),\n ),\n darkAccent: functionColorsTuple(lighten(DARK_BODY, 0.025), (color) =>\n lighten(color, 0.02),\n ),\n accent: virtualColor({\n name: \"accent\",\n light: \"lightAccent\",\n dark: \"darkAccent\",\n }),\n // Accent border color\n lightAccentBorder: functionColorsTuple(darken(LIGHT_BODY, 0.1), (color) =>\n darken(color, 0.01),\n ),\n darkAccentBorder: functionColorsTuple(lighten(DARK_BODY, 0.08), (color) =>\n lighten(color, 0.03),\n ),\n \"accent-border\": virtualColor({\n name: \"accent-border\",\n light: \"lightAccentBorder\",\n dark: \"darkAccentBorder\",\n }),\n lightBw: colorsTuple(\"#000000\"),\n darkBw: colorsTuple(\"#FFFFFF\"),\n bw: virtualColor({\n name: \"bw\",\n light: \"lightBw\",\n dark: \"darkBw\",\n }),\n // Intention colors\n Good: colorsTuple(hexColorByIntention(\"Good\")!),\n Neutral: colorsTuple(hexColorByIntention(\"Neutral\")!),\n Warning: colorsTuple(hexColorByIntention(\"Warning\")!),\n Critical: colorsTuple(hexColorByIntention(\"Critical\")!),\n Unknown: colorsTuple(hexColorByIntention(\"Unknown\")!),\n // Additional colors (eg tags)\n ...additionalColors,\n },\n components: {\n Input: Input.extend({\n vars: (theme) => ({\n wrapper: {\n \"--input-radius\": theme.radius.sm,\n },\n }),\n styles: (theme) => ({\n input: {\n backgroundColor: theme.colors.accent[1],\n border: \"1px solid \" + theme.colors[\"accent-border\"][4],\n },\n }),\n }),\n Select: Select.extend({\n styles: (theme) => ({\n input: {\n backgroundColor: theme.colors.accent[1],\n border: \"1px solid \" + theme.colors[\"accent-border\"][4],\n },\n dropdown: {\n backgroundColor: theme.colors.accent[1],\n borderColor: theme.colors[\"accent-border\"][4],\n },\n }),\n }),\n MultiSelect: MultiSelect.extend({\n styles: (theme) => ({\n input: {\n backgroundColor: theme.colors.accent[1],\n border: \"1px solid \" + theme.colors[\"accent-border\"][4],\n },\n dropdown: {\n backgroundColor: theme.colors.accent[1],\n borderColor: theme.colors[\"accent-border\"][4],\n },\n }),\n defaultProps: {\n maxDropdownHeight: 250,\n },\n }),\n Combobox: Combobox.extend({\n styles: (theme) => ({\n dropdown: {\n backgroundColor: theme.colors.accent[1],\n border: \"1px solid \" + theme.colors[\"accent-border\"][4],\n },\n }),\n }),\n MenuDropdown: MenuDropdown.extend({\n defaultProps: {\n bg: \"var(--mantine-color-accent-1)\",\n bd: \"1px solid var(--mantine-color-accent-border-4)\",\n bdrs: \"md\",\n },\n }),\n PopoverDropdown: PopoverDropdown.extend({\n defaultProps: {\n bg: \"var(--mantine-color-accent-1)\",\n bd: \"1px solid var(--mantine-color-accent-border-4)\",\n bdrs: \"md\",\n },\n }),\n HoverCard: HoverCard.extend({\n styles: (theme) => ({\n dropdown: {\n backgroundColor: theme.colors.accent[1],\n border: \"1px solid \" + theme.colors[\"accent-border\"][4],\n },\n }),\n }),\n Button: Button.extend({\n vars: (theme) => ({\n root: {\n \"--button-color\": theme.colors.bw[0],\n \"--button-radius\": theme.radius.sm,\n },\n }),\n defaultProps: {\n variant: \"default\",\n },\n classNames: { root: \"bordered-heavy-outline\" },\n }),\n ActionIcon: ActionIcon.extend({\n vars: (theme) => ({\n root: {\n \"--ai-color\": theme.colors.bw[0],\n \"--ai-radius\": theme.radius.sm,\n },\n }),\n }),\n Switch: Switch.extend({\n defaultProps: {\n color: \"green\",\n },\n }),\n Badge: Badge.extend({\n defaultProps: {\n bdrs: \"sm\",\n c: \"var(--mantine-color-text)\",\n },\n }),\n Table: Table.extend({\n vars: (theme) => ({\n table: {\n \"--table-striped-color\": theme.colors.accent[0],\n \"--table-border-color\": theme.colors[\"accent-border\"][0],\n \"--table-highlight-on-hover-color\":\n theme.colors[\"accent-border\"][0],\n },\n }),\n defaultProps: {\n striped: true,\n highlightOnHover: true,\n },\n }),\n Drawer: Drawer.extend({\n vars: () => ({\n root: {\n \"--drawer-flex\": \"\",\n },\n }),\n defaultProps: {\n position: \"top\",\n radius: \"md\",\n },\n styles: {\n inner: { justifyContent: \"center\" },\n },\n }),\n Modal: Modal.extend({\n defaultProps: {\n styles: { content: { borderRadius: \"var(--mantine-radius-md)\" } },\n },\n }),\n Code: Code.extend({\n defaultProps: {\n bg: \"var(--mantine-color-accent-0)\",\n bdrs: \"sm\",\n p: \"md\",\n },\n }),\n Fieldset: Fieldset.extend({\n styles: (theme) => ({\n root: {\n backgroundColor: \"var(--mantine-color-body)\",\n borderRadius: theme.radius.md,\n },\n }),\n classNames: { root: \"bordered-light\" },\n }),\n SegmentedControl: SegmentedControl.extend({\n styles: (theme) => ({\n root: {\n backgroundColor: theme.colors.accent[2],\n },\n indicator: {\n backgroundColor: theme.colors.accent[9],\n },\n }),\n classNames: { root: \"bordered-heavy\" },\n }),\n Progress: Progress.extend({\n styles: (theme) => ({\n root: {\n backgroundColor: theme.colors.accent[4],\n },\n }),\n }),\n Tabs: Tabs.extend({\n vars: (theme) => ({\n root: {\n \"--tabs-radius\": theme.radius.sm,\n },\n }),\n styles: (theme) => ({\n list: {\n backgroundColor: theme.colors.accent[1],\n borderRadius: theme.radius.sm,\n },\n }),\n }),\n },\n });\n}\n\nconst cssVariablesResolver: CSSVariablesResolver = (theme) => ({\n variables: {},\n light: {\n \"--mantine-color-default\": theme.colors.accent[5],\n \"--mantine-color-default-hover\": theme.colors.accent[9],\n \"--mantine-color-default-border\": theme.colors[\"accent-border\"][5],\n \"--mantine-color-disabled\": theme.colors.accent[1],\n },\n dark: {\n \"--mantine-color-default\": theme.colors.accent[5],\n \"--mantine-color-default-hover\": theme.colors.accent[9],\n \"--mantine-color-default-border\": theme.colors[\"accent-border\"][5],\n \"--mantine-color-disabled\": theme.colors.accent[1],\n },\n});\n\nexport function opacityColorsTuple(baseHex: string, length = 10) {\n return colorsTuple(\n Array.from({ length }).map(\n (_, i) => baseHex + (i * 10 + 9).toString(16).padStart(2, \"0\"),\n ),\n );\n}\n\nexport function functionColorsTuple(\n base: string,\n fn: (color: string) => string,\n length = 10,\n) {\n let b = base;\n const array = [\n base,\n ...Array.from({ length: length - 1 }).map(() => {\n b = fn(b);\n return b;\n }),\n ];\n return colorsTuple(array);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDI;AAhDJ,kBA8BO;AAEP,mBAAoC;AAG7B,MAAM,aAAa;AACnB,MAAM,YAAY;AAEzB,MAAM,uBAA2C;AAE1C,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AACF,GAGG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,MAAM,gBAAgB;AAAA,MAC7B;AAAA,MACA,oBAAoB;AAAA,MAEnB;AAAA;AAAA,EACH;AAEJ;AAMA,SAAS,MAAM,kBAAqC;AAClD,aAAO,yBAAY;AAAA,IACjB,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,aAAa;AAAA,MACX,I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,MAAM,WAAW,IAAI,KAAK,GAAG,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG;AAAA,IAC/D;AAAA,EACF;AACF;AAEO,SAAS,oBACd,MACA,IACA,SAAS,IACT;AACA,MAAI,IAAI;AACR,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA,GAAG,MAAM,KAAK,EAAE,QAAQ,SAAS,EAAE,CAAC,EAAE,IAAI,MAAM;AAC9C,UAAI,GAAG,CAAC;AACR,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,aAAO,yBAAY,KAAK;AAC1B;","names":["theme"]}
|
package/dist/theme.d.cts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const LIGHT_BODY = "#f8f9fa";
|
|
6
|
+
declare const DARK_BODY = "#0f1115";
|
|
7
|
+
declare function ThemeProvider({ children, additionalColors, }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
additionalColors?: AdditionalColors;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
type AdditionalColors = Partial<Record<DefaultMantineColor, MantineColorsTuple>> | undefined;
|
|
12
|
+
declare function opacityColorsTuple(baseHex: string, length?: number): MantineColorsTuple;
|
|
13
|
+
declare function functionColorsTuple(base: string, fn: (color: string) => string, length?: number): MantineColorsTuple;
|
|
14
|
+
|
|
15
|
+
export { type AdditionalColors, DARK_BODY, LIGHT_BODY, ThemeProvider, functionColorsTuple, opacityColorsTuple };
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const LIGHT_BODY = "#f8f9fa";
|
|
6
|
+
declare const DARK_BODY = "#0f1115";
|
|
7
|
+
declare function ThemeProvider({ children, additionalColors, }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
additionalColors?: AdditionalColors;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
type AdditionalColors = Partial<Record<DefaultMantineColor, MantineColorsTuple>> | undefined;
|
|
12
|
+
declare function opacityColorsTuple(baseHex: string, length?: number): MantineColorsTuple;
|
|
13
|
+
declare function functionColorsTuple(base: string, fn: (color: string) => string, length?: number): MantineColorsTuple;
|
|
14
|
+
|
|
15
|
+
export { type AdditionalColors, DARK_BODY, LIGHT_BODY, ThemeProvider, functionColorsTuple, opacityColorsTuple };
|