elbe-ui 1.0.8 → 2.0.1
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/bit/_bit_provider.d.ts +1 -1
- package/dist/bit/_bit_provider.js +4 -4
- package/dist/bit/bit.d.ts +1 -1
- package/dist/bit/bit.js +1 -0
- package/dist/elbe.css +150 -562
- package/dist/elbe.css.map +1 -1
- package/dist/index.d.ts +188 -46
- package/dist/index.js +8 -6
- package/dist/ui/app/app.d.ts +13 -0
- package/dist/ui/app/app.js +81 -0
- package/dist/ui/app/app_ctxt.d.ts +35 -0
- package/dist/ui/app/app_ctxt.js +10 -0
- package/dist/ui/components/badge.d.ts +3 -3
- package/dist/ui/components/badge.js +16 -5
- package/dist/ui/components/banner.d.ts +3 -3
- package/dist/ui/components/banner.js +1 -1
- package/dist/ui/components/base/box.d.ts +82 -35
- package/dist/ui/components/base/box.js +56 -8
- package/dist/ui/components/base/card.d.ts +11 -12
- package/dist/ui/components/base/card.js +41 -19
- package/dist/ui/components/base/padded.d.ts +2 -4
- package/dist/ui/components/base/state_builder.d.ts +9 -0
- package/dist/ui/components/base/state_builder.js +33 -0
- package/dist/ui/components/button/button.d.ts +8 -6
- package/dist/ui/components/button/button.js +27 -16
- package/dist/ui/components/button/choose_button.d.ts +5 -3
- package/dist/ui/components/button/choose_button.js +9 -6
- package/dist/ui/components/button/icon_button.d.ts +6 -5
- package/dist/ui/components/button/icon_button.js +33 -23
- package/dist/ui/components/button/toggle_button.d.ts +5 -5
- package/dist/ui/components/button/toggle_button.js +13 -7
- package/dist/ui/components/dialog/dialog.d.ts +13 -0
- package/dist/ui/components/dialog/dialog.js +69 -0
- package/dist/ui/components/dialog/dialog_ctx.d.ts +34 -0
- package/dist/ui/components/dialog/dialog_ctx.js +44 -0
- package/dist/ui/components/dialog/dialogs/_alert.d.ts +7 -0
- package/dist/ui/components/dialog/dialogs/_alert.js +9 -0
- package/dist/ui/components/dialog/dialogs/_confirm.d.ts +9 -0
- package/dist/ui/components/dialog/dialogs/_confirm.js +21 -0
- package/dist/ui/components/error_view.js +3 -3
- package/dist/ui/components/footer.js +7 -7
- package/dist/ui/components/input/_labeled_input.d.ts +21 -0
- package/dist/ui/components/input/_labeled_input.js +21 -0
- package/dist/ui/components/input/checkbox.d.ts +4 -2
- package/dist/ui/components/input/checkbox.js +16 -8
- package/dist/ui/components/input/range.d.ts +5 -3
- package/dist/ui/components/input/range.js +19 -18
- package/dist/ui/components/input/select.d.ts +4 -3
- package/dist/ui/components/input/select.js +13 -40
- package/dist/ui/components/input/switch.d.ts +4 -2
- package/dist/ui/components/input/switch.js +30 -40
- package/dist/ui/components/input/text/input_field.d.ts +14 -19
- package/dist/ui/components/input/text/input_field.js +59 -61
- package/dist/ui/components/input/text/single_line.d.ts +11 -9
- package/dist/ui/components/input/text/single_line.js +15 -21
- package/dist/ui/components/layout/flex.d.ts +7 -3
- package/dist/ui/components/layout/flex.js +15 -12
- package/dist/ui/components/layout/header.d.ts +2 -2
- package/dist/ui/components/layout/header.js +26 -18
- package/dist/ui/components/layout/menu.d.ts +1 -1
- package/dist/ui/components/layout/menu.js +80 -49
- package/dist/ui/components/layout/scroll.d.ts +1 -0
- package/dist/ui/components/layout/scroll.js +3 -1
- package/dist/ui/components/layout/toolbar.js +9 -6
- package/dist/ui/components/link.d.ts +4 -2
- package/dist/ui/components/link.js +24 -11
- package/dist/ui/components/progress_bar.d.ts +2 -2
- package/dist/ui/components/progress_bar.js +12 -9
- package/dist/ui/components/spinner.d.ts +2 -7
- package/dist/ui/components/spinner.js +15 -16
- package/dist/ui/components/text.d.ts +5 -6
- package/dist/ui/components/text.js +34 -21
- package/dist/ui/components/tooltip.d.ts +5 -0
- package/dist/ui/components/tooltip.js +48 -0
- package/dist/ui/theme/subthemes/_theme_geometry.d.ts +9 -0
- package/dist/ui/theme/subthemes/_theme_geometry.js +22 -0
- package/dist/ui/theme/subthemes/_theme_menu.d.ts +9 -0
- package/dist/ui/theme/subthemes/_theme_menu.js +12 -0
- package/dist/ui/theme/subthemes/_theme_motion.d.ts +9 -0
- package/dist/ui/theme/subthemes/_theme_motion.js +13 -0
- package/dist/ui/theme/subthemes/_theme_toast.d.ts +8 -0
- package/dist/ui/theme/subthemes/_theme_toast.js +11 -0
- package/dist/ui/theme/subthemes/_theme_type.d.ts +49 -0
- package/dist/ui/theme/subthemes/_theme_type.js +73 -0
- package/dist/ui/theme/subthemes/color/_seed.d.ts +2 -0
- package/dist/ui/theme/subthemes/color/_seed.js +105 -0
- package/dist/ui/theme/subthemes/color/_theme_color.d.ts +865 -0
- package/dist/ui/theme/subthemes/color/_theme_color.js +83 -0
- package/dist/ui/theme/subthemes/color/colors/_color_contrast.d.ts +284 -0
- package/dist/ui/theme/subthemes/color/colors/_color_contrast.js +17 -0
- package/dist/ui/theme/subthemes/color/colors/_color_kind.d.ts +242 -0
- package/dist/ui/theme/subthemes/color/colors/_color_kind.js +45 -0
- package/dist/ui/theme/subthemes/color/colors/_color_layer.d.ts +226 -0
- package/dist/ui/theme/subthemes/color/colors/_color_layer.js +95 -0
- package/dist/ui/theme/subthemes/color/colors/_color_manner.d.ts +280 -0
- package/dist/ui/theme/subthemes/color/colors/_color_manner.js +17 -0
- package/dist/ui/theme/subthemes/color/colors/_color_mode.d.ts +269 -0
- package/dist/ui/theme/subthemes/color/colors/_color_mode.js +16 -0
- package/dist/ui/theme/subthemes/color/colors/_color_rgba.d.ts +166 -0
- package/dist/ui/theme/subthemes/color/colors/_color_rgba.js +86 -0
- package/dist/ui/theme/subthemes/color/colors/_color_scheme.d.ts +256 -0
- package/dist/ui/theme/subthemes/color/colors/_color_scheme.js +17 -0
- package/dist/ui/theme/subthemes/color/colors/_color_state.d.ts +252 -0
- package/dist/ui/theme/subthemes/color/colors/_color_state.js +49 -0
- package/dist/ui/theme/subthemes/color/colors/_colordef.d.ts +22 -0
- package/dist/ui/theme/subthemes/color/colors/_colordef.js +34 -0
- package/dist/ui/theme/subthemes/color/colors/colors.d.ts +511 -0
- package/dist/ui/theme/subthemes/color/colors/colors.js +24 -0
- package/dist/ui/theme/theme.d.ts +984 -30
- package/dist/ui/theme/theme.js +14 -82
- package/dist/ui/theme/theme_context.d.ts +15 -17
- package/dist/ui/theme/theme_context.js +79 -18
- package/dist/ui/util/_util.d.ts +8 -0
- package/dist/ui/util/_util.js +42 -0
- package/dist/ui/util/error_view.js +3 -3
- package/dist/ui/util/merge_deep.d.ts +1 -0
- package/dist/ui/util/merge_deep.js +18 -0
- package/dist/ui/util/root.d.ts +17 -0
- package/dist/ui/util/root.js +23 -0
- package/dist/ui/util/toast/_toast.d.ts +5 -0
- package/dist/ui/util/toast/_toast.js +7 -0
- package/dist/ui/util/toast/toast_ctx.d.ts +28 -0
- package/dist/ui/util/toast/toast_ctx.js +62 -0
- package/dist/ui/util/toast/toast_legacy.d.ts +5 -0
- package/dist/ui/util/{toast.js → toast/toast_legacy.js} +4 -4
- package/dist/ui/util/util.d.ts +15 -0
- package/dist/ui/util/util.js +69 -1
- package/package.json +11 -9
- package/dist/ui/components/dialog.d.ts +0 -10
- package/dist/ui/components/dialog.js +0 -35
- package/dist/ui/components/layout/app_base.d.ts +0 -15
- package/dist/ui/components/layout/app_base.js +0 -76
- package/dist/ui/components/layout/ctx_app_base.d.ts +0 -19
- package/dist/ui/components/layout/ctx_app_base.js +0 -12
- package/dist/ui/theme/color_theme.d.ts +0 -2
- package/dist/ui/theme/color_theme.js +0 -92
- package/dist/ui/theme/colors.d.ts +0 -133
- package/dist/ui/theme/colors.js +0 -309
- package/dist/ui/theme/geometry_theme.d.ts +0 -16
- package/dist/ui/theme/geometry_theme.js +0 -28
- package/dist/ui/theme/seed.d.ts +0 -53
- package/dist/ui/theme/seed.js +0 -4
- package/dist/ui/theme/type_theme.d.ts +0 -38
- package/dist/ui/theme/type_theme.js +0 -73
- package/dist/ui/util/confirm_dialog.d.ts +0 -10
- package/dist/ui/util/confirm_dialog.js +0 -46
- package/dist/ui/util/toast.d.ts +0 -5
- /package/dist/bit/{_bit_utils.d.ts → _bit_types.d.ts} +0 -0
- /package/dist/bit/{_bit_utils.js → _bit_types.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -4,14 +4,17 @@ import "./elbe.css";
|
|
|
4
4
|
export * as Wouter from "wouter";
|
|
5
5
|
export * as wouter_hash from "wouter/use-hash-location";
|
|
6
6
|
// exports
|
|
7
|
+
export * from "./ui/util/root";
|
|
7
8
|
export * from "./api/api_worker";
|
|
8
9
|
export * from "./api/error";
|
|
9
10
|
export * from "./api/errors";
|
|
10
11
|
export * from "./bit/bit";
|
|
11
|
-
export * from "./ui/
|
|
12
|
+
export * from "./ui/components/dialog/dialog";
|
|
13
|
+
export * from "./ui/components/dialog/dialog_ctx";
|
|
12
14
|
export * from "./ui/util/ctx_toolbar";
|
|
13
15
|
export * from "./ui/util/l10n/l10n";
|
|
14
|
-
export * from "./ui/util/toast";
|
|
16
|
+
export * from "./ui/util/toast/toast_ctx";
|
|
17
|
+
export * from "./ui/util/toast/toast_legacy";
|
|
15
18
|
export * from "./ui/util/types";
|
|
16
19
|
export * from "./ui/util/util";
|
|
17
20
|
export * from "./ui/components/base/box";
|
|
@@ -23,8 +26,6 @@ export * from "./ui/components/button/choose_button";
|
|
|
23
26
|
export * from "./ui/components/button/icon_button";
|
|
24
27
|
export * from "./ui/components/button/toggle_button";
|
|
25
28
|
export * from "./ui/components/layout/alignment";
|
|
26
|
-
export * from "./ui/components/layout/app_base";
|
|
27
|
-
export * from "./ui/components/layout/ctx_app_base";
|
|
28
29
|
export * from "./ui/components/layout/flex";
|
|
29
30
|
export * from "./ui/components/layout/header";
|
|
30
31
|
export * from "./ui/components/layout/page";
|
|
@@ -37,15 +38,16 @@ export * from "./ui/components/input/switch";
|
|
|
37
38
|
export * from "./ui/components/input/text/input_field";
|
|
38
39
|
export * from "./ui/components/badge";
|
|
39
40
|
export * from "./ui/components/banner";
|
|
40
|
-
export * from "./ui/components/dialog";
|
|
41
|
+
export * from "./ui/components/dialog/dialog";
|
|
41
42
|
export * from "./ui/components/error_view";
|
|
42
43
|
export * from "./ui/components/footer";
|
|
43
44
|
export * from "./ui/components/link";
|
|
44
45
|
export * from "./ui/components/progress_bar";
|
|
45
46
|
export * from "./ui/components/spinner";
|
|
46
47
|
export * from "./ui/components/text";
|
|
48
|
+
export * from "./ui/app/app";
|
|
47
49
|
export * from "./ui/components/dev/todo";
|
|
48
|
-
export * from "./ui/theme/
|
|
50
|
+
export * from "./ui/theme/subthemes/color/colors/colors";
|
|
49
51
|
export * from "./ui/theme/theme";
|
|
50
52
|
export * from "./ui/theme/theme_context";
|
|
51
53
|
function None({}) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElbeRoute, ElbeThemeConfig, ElbeThemeContext, ElbeThemeData } from "../..";
|
|
2
|
+
import { AppConfig } from "./app_ctxt";
|
|
3
|
+
type _AppThemeConfig = {
|
|
4
|
+
themeContext: ElbeThemeContext;
|
|
5
|
+
themeSeed?: Partial<Parameters<_AppThemeConfig["themeContext"]["WithTheme"]>[0]["seed"]>;
|
|
6
|
+
themeSelector?: (config: ElbeThemeConfig<ElbeThemeData>) => Partial<ElbeThemeConfig<ElbeThemeData>>;
|
|
7
|
+
};
|
|
8
|
+
type _AppProps = AppConfig & _AppThemeConfig;
|
|
9
|
+
type AppProps = _AppProps & {
|
|
10
|
+
children?: ElbeRoute | ElbeRoute[];
|
|
11
|
+
};
|
|
12
|
+
export declare function ElbeApp(p: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { Box, DialogsProvider, isMenuRoute, omit, ToastProvider, Wouter, } from "../..";
|
|
4
|
+
import { Menu } from "../components/layout/menu";
|
|
5
|
+
import { AppContext } from "./app_ctxt";
|
|
6
|
+
export function ElbeApp(p) {
|
|
7
|
+
var _a;
|
|
8
|
+
useMemo(() => {
|
|
9
|
+
if (p.title)
|
|
10
|
+
document.title = p.title;
|
|
11
|
+
}, [p.title]);
|
|
12
|
+
const trueBase = useMemo(() => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const path = (_b = (_a = p.routerConfig) === null || _a === void 0 ? void 0 : _a.basePath) !== null && _b !== void 0 ? _b : "/";
|
|
15
|
+
return path === "/" ? undefined : path;
|
|
16
|
+
}, [(_a = p.routerConfig) === null || _a === void 0 ? void 0 : _a.basePath]);
|
|
17
|
+
return (_jsx(p.themeContext.WithTheme, { seed: p.themeSeed, children: _jsx(Wouter.Router, { base: trueBase, children: _jsx(_App, { config: omit(p, "children", "themeContext", "themeSeed", "themeSelector"), themeContext: p.themeContext, themeSelector: p.themeSelector, children: p.children }) }) }));
|
|
18
|
+
}
|
|
19
|
+
function _initialLocation() {
|
|
20
|
+
return (window.location.pathname + window.location.search + window.location.hash);
|
|
21
|
+
}
|
|
22
|
+
function _App(p) {
|
|
23
|
+
const menuItems = useMemo(() => {
|
|
24
|
+
return _extractMenuItems(p.children);
|
|
25
|
+
}, [p.children]);
|
|
26
|
+
const [location, navigate] = Wouter.useLocation();
|
|
27
|
+
const [history, setHistory] = useState([_initialLocation()]);
|
|
28
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
29
|
+
/*const themeSelected = p.themeContext
|
|
30
|
+
.useTheme()
|
|
31
|
+
.useWith(p.themeSelector ?? (() => ({})), [p.config, p.themeSelector]);*/
|
|
32
|
+
return (_jsx(AppContext.Provider, { value: {
|
|
33
|
+
appConfig: p.config,
|
|
34
|
+
_appThemeContext: p.themeContext,
|
|
35
|
+
router: {
|
|
36
|
+
goBack: (steps = 1) => {
|
|
37
|
+
if (history.length === 0)
|
|
38
|
+
return;
|
|
39
|
+
const targetIndex = Math.max(0, history.length - 1 - steps);
|
|
40
|
+
const target = history[targetIndex];
|
|
41
|
+
setHistory((h) => h.slice(0, targetIndex + 1));
|
|
42
|
+
navigate(target, { replace: true });
|
|
43
|
+
},
|
|
44
|
+
go: (p, replace) => {
|
|
45
|
+
setHistory((h) => {
|
|
46
|
+
if (replace === "all")
|
|
47
|
+
return [p];
|
|
48
|
+
const repl = Math.max(0, replace !== null && replace !== void 0 ? replace : 0);
|
|
49
|
+
if (repl === 0)
|
|
50
|
+
return [...h, p];
|
|
51
|
+
return [...h.slice(0, -repl), p];
|
|
52
|
+
});
|
|
53
|
+
navigate(p, { replace: (replace !== null && replace !== void 0 ? replace : 0) !== 0 });
|
|
54
|
+
},
|
|
55
|
+
history: history,
|
|
56
|
+
location: location,
|
|
57
|
+
},
|
|
58
|
+
menu: menuItems.length === 0
|
|
59
|
+
? undefined
|
|
60
|
+
: {
|
|
61
|
+
isOpen: menuOpen,
|
|
62
|
+
setOpen: (s) => setMenuOpen(s),
|
|
63
|
+
},
|
|
64
|
+
}, children: _jsx(ToastProvider, { children: _jsx(DialogsProvider, { children: _jsxs(Box, { typeLabel: "app_base", scheme: "primary", style: {
|
|
65
|
+
display: "flex",
|
|
66
|
+
width: "100%",
|
|
67
|
+
minHeight: "100vh",
|
|
68
|
+
}, children: [menuItems.length > 0 && _jsx(Menu, { items: menuItems }), _jsx("div", { style: { flex: 1, width: "0px" }, children: _jsx(Wouter.Switch, { children: p.children }) })] }) }) }) }));
|
|
69
|
+
}
|
|
70
|
+
function _extractMenuItems(children) {
|
|
71
|
+
if (!children)
|
|
72
|
+
return [];
|
|
73
|
+
const childs = Array.isArray(children) ? children : [children];
|
|
74
|
+
const items = [];
|
|
75
|
+
for (const child of childs) {
|
|
76
|
+
if (!isMenuRoute(child))
|
|
77
|
+
continue;
|
|
78
|
+
items.push(child.props);
|
|
79
|
+
}
|
|
80
|
+
return items;
|
|
81
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HeaderLogos } from "../components/layout/header";
|
|
2
|
+
import { ElbeThemeContext } from "../theme/theme_context";
|
|
3
|
+
import { ElbeChild, ElbeChildren, int } from "../util/types";
|
|
4
|
+
export type AppConfig = {
|
|
5
|
+
title?: string;
|
|
6
|
+
icons?: HeaderLogos;
|
|
7
|
+
globalActions?: ElbeChild[];
|
|
8
|
+
footer?: ElbeChildren | null;
|
|
9
|
+
routerConfig?: {
|
|
10
|
+
basePath?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type _MenuState = {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
setOpen: (s: boolean) => void;
|
|
16
|
+
};
|
|
17
|
+
type _RouterState = {
|
|
18
|
+
go: (path: string, replace?: int | "all") => void;
|
|
19
|
+
goBack: (steps?: number) => void;
|
|
20
|
+
history: string[];
|
|
21
|
+
location: string;
|
|
22
|
+
};
|
|
23
|
+
export interface AppState {
|
|
24
|
+
appConfig: AppConfig;
|
|
25
|
+
router: _RouterState;
|
|
26
|
+
menu?: _MenuState;
|
|
27
|
+
/**
|
|
28
|
+
* @private this field is only to be used within elbe components.
|
|
29
|
+
*/
|
|
30
|
+
_appThemeContext: ElbeThemeContext;
|
|
31
|
+
}
|
|
32
|
+
export declare const AppContext: import("react").Context<AppState | null>;
|
|
33
|
+
export declare function useApp(): AppState;
|
|
34
|
+
export declare function useMaybeApp(): AppState | null;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import { throwError, tryOrNull } from "../util/util";
|
|
3
|
+
export const AppContext = createContext(null);
|
|
4
|
+
export function useApp() {
|
|
5
|
+
var _a;
|
|
6
|
+
return ((_a = tryOrNull(() => useContext(AppContext))) !== null && _a !== void 0 ? _a : throwError("useApp must be used within an ElbeApp context. try using useMaybeApp()"));
|
|
7
|
+
}
|
|
8
|
+
export function useMaybeApp() {
|
|
9
|
+
return tryOrNull(() => useContext(AppContext));
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { ColorSelection } from "../theme/subthemes/color/colors/colors";
|
|
3
3
|
import type { ElbeChild, ElbeChildren } from "../util/types";
|
|
4
4
|
import type { ElbeProps } from "./base/box";
|
|
5
5
|
export type BadgeProps = {
|
|
@@ -11,10 +11,10 @@ export type BadgeProps = {
|
|
|
11
11
|
} & ElbeProps;
|
|
12
12
|
export declare function TestBadge(p: BadgeProps): Badge;
|
|
13
13
|
export declare class Badge extends React.Component<BadgeProps & {
|
|
14
|
-
kind:
|
|
14
|
+
kind: ColorSelection.Kinds;
|
|
15
15
|
}> {
|
|
16
16
|
constructor(props: BadgeProps & {
|
|
17
|
-
kind:
|
|
17
|
+
kind: ColorSelection.Kinds;
|
|
18
18
|
});
|
|
19
19
|
static accent(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
static error(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { useApp } from "../app/app_ctxt";
|
|
3
4
|
export function TestBadge(p) {
|
|
4
5
|
return new Badge(Object.assign(Object.assign({}, p), { kind: "accent" }));
|
|
5
6
|
}
|
|
@@ -23,10 +24,20 @@ export class Badge extends React.Component {
|
|
|
23
24
|
return _jsx(Badge, Object.assign({}, p, { kind: "info" }));
|
|
24
25
|
}
|
|
25
26
|
render() {
|
|
26
|
-
|
|
27
|
-
return (_jsxs("div", { style: {
|
|
28
|
-
position: "relative",
|
|
29
|
-
display: "inline-block",
|
|
30
|
-
}, children: [this.props.child, this.props.children, _jsx("div", { className: `b ${this.props.kind} major ${(_a = this.props.className) !== null && _a !== void 0 ? _a : ""}`, style: Object.assign({ position: "absolute", top: "-0.25rem", right: "-0.25rem", minWidth: "1.5rem", minHeight: "1.5rem", padding: "0rem .4rem", borderRadius: "3rem", fontWeight: "bold", display: "flex", justifyContent: "center", alignItems: "center", visibility: this.props.hidden ? "hidden" : "visible" }, this.props.style), children: (_b = this.props.label) !== null && _b !== void 0 ? _b : this.props.count })] }));
|
|
27
|
+
return _jsx(_Badge, Object.assign({}, this.props));
|
|
31
28
|
}
|
|
32
29
|
}
|
|
30
|
+
function _Badge(p) {
|
|
31
|
+
var _a;
|
|
32
|
+
const { _appThemeContext } = useApp();
|
|
33
|
+
const theme = _appThemeContext.useTheme().useWith(({ color }) => {
|
|
34
|
+
var _a;
|
|
35
|
+
return ({
|
|
36
|
+
color: Object.assign(Object.assign({}, color), { selection: Object.assign(Object.assign({}, color.selection), { kind: (_a = p.kind) !== null && _a !== void 0 ? _a : "accent", manner: "major" }) }),
|
|
37
|
+
});
|
|
38
|
+
}, [p.kind]);
|
|
39
|
+
return (_jsxs("div", { style: {
|
|
40
|
+
position: "relative",
|
|
41
|
+
display: "inline-block",
|
|
42
|
+
}, children: [p.child, p.children, _jsx("div", { style: Object.assign({ position: "absolute", top: "-0.25rem", right: "-0.25rem", minWidth: "1.5rem", minHeight: "1.5rem", padding: "0rem .4rem", borderRadius: "3rem", fontWeight: "bold", display: "flex", justifyContent: "center", alignItems: "center", visibility: p.hidden ? "hidden" : "visible", backgroundColor: theme.theme.color.currentColor.back.asCss(), color: theme.theme.color.currentColor.front.asCss() }, p.style), children: (_a = p.label) !== null && _a !== void 0 ? _a : p.count })] }));
|
|
43
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorSelection, IconChild } from "../..";
|
|
2
2
|
export declare function KindAlertIcon({ kind, size, }: {
|
|
3
|
-
kind:
|
|
3
|
+
kind: ColorSelection.KindsAlert;
|
|
4
4
|
size?: "body-s" | "body-m" | "body-l";
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare function Banner({ kind, manner, title, onDismiss, dismissIcon, children, }: {
|
|
7
|
-
kind:
|
|
7
|
+
kind: ColorSelection.KindsAlert;
|
|
8
8
|
manner?: "major" | "minor";
|
|
9
9
|
title?: string;
|
|
10
10
|
onDismiss?: () => void;
|
|
@@ -19,5 +19,5 @@ export function KindAlertIcon({ kind, size = "body-m", }) {
|
|
|
19
19
|
return _jsx(Icon, { size: `${scale * 1.5}rem` });
|
|
20
20
|
}
|
|
21
21
|
export function Banner({ kind, manner = "major", title, onDismiss, dismissIcon = XIcon, children, }) {
|
|
22
|
-
return (_jsx(Card, { kind: kind, manner: manner, padding: 0, children: _jsxs(Row, { cross: "start", gap: 0, children: [_jsx(Align, { size: 3, children: _jsx(KindAlertIcon, { kind: kind }) }), _jsxs(Column, { gap: 0.5,
|
|
22
|
+
return (_jsx(Card, { kind: kind, manner: manner, padding: 0, children: _jsxs(Row, { cross: "start", gap: 0, children: [_jsx(Align, { size: 3, children: _jsx(KindAlertIcon, { kind: kind }) }), _jsxs(Column, { gap: 0.5, flex: true, style: { padding: ".9rem 0", paddingRight: onDismiss ? "0" : "1rem" }, children: [title && _jsx(Text, { bold: true, v: title }), children] }), onDismiss && (_jsx(IconButton, { manner: manner, kind: kind, transparent: manner === "minor", ariaLabel: "close", icon: dismissIcon, onTap: onDismiss }))] }) }));
|
|
23
23
|
}
|
|
@@ -1,54 +1,101 @@
|
|
|
1
1
|
import { Component } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ColorSelection, ElbeChildren } from "../../..";
|
|
3
3
|
import { AriaRoles } from "./roles";
|
|
4
|
+
export declare const styleColorFromContext: React.CSSProperties;
|
|
5
|
+
export declare const styleBorderFromContext: React.CSSProperties;
|
|
4
6
|
export type ElbeProps = {
|
|
5
7
|
id?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: React.CSSProperties;
|
|
8
8
|
tooltip?: string;
|
|
9
9
|
flex?: boolean | number;
|
|
10
10
|
typeLabel?: string;
|
|
11
11
|
ariaLabel?: string | null;
|
|
12
12
|
role?: AriaRoles | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
className?: string | string[];
|
|
15
|
+
native?: {
|
|
16
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
17
|
+
onKeyUp?: (e: React.KeyboardEvent) => void;
|
|
18
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
19
|
+
onContextMenu?: (e: React.MouseEvent) => void;
|
|
20
|
+
onDoubleClick?: (e: React.MouseEvent) => void;
|
|
21
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
|
22
|
+
onMouseUp?: (e: React.MouseEvent) => void;
|
|
23
|
+
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
24
|
+
onMouseLeave?: (e: React.MouseEvent) => void;
|
|
25
|
+
onFocus?: (e: React.FocusEvent) => void;
|
|
26
|
+
onBlur?: (e: React.FocusEvent) => void;
|
|
27
|
+
tabIndex?: number;
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
};
|
|
26
30
|
};
|
|
27
|
-
export type
|
|
31
|
+
export type ElbeActionProps = ElbeProps & {
|
|
28
32
|
ariaLabel: string | null;
|
|
29
33
|
};
|
|
34
|
+
export type ElbeStyleProps = {
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
};
|
|
37
|
+
export type ElbeChildrenProps = {
|
|
38
|
+
children?: ElbeChildren;
|
|
39
|
+
};
|
|
30
40
|
export declare function applyProps(typeLabel: string, p: ElbeProps, classes?: string | null | (string | false | null | undefined)[], style?: React.CSSProperties): {
|
|
31
41
|
[key: string]: any;
|
|
32
42
|
};
|
|
33
|
-
export type ElbeBoxProps = {
|
|
34
|
-
mode?:
|
|
43
|
+
export type ElbeBoxProps = ElbeProps & ElbeStyleProps & ElbeChildrenProps & {
|
|
44
|
+
mode?: ColorSelection.Modes;
|
|
45
|
+
kind?: ColorSelection.Kinds;
|
|
46
|
+
manner?: ColorSelection.Manners;
|
|
47
|
+
state?: ColorSelection.States;
|
|
35
48
|
padding?: number;
|
|
36
49
|
margin?: number;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
frosted?: boolean;
|
|
51
|
+
elevated?: boolean;
|
|
52
|
+
};
|
|
53
|
+
export declare class Box extends Component<ElbeBoxProps & ElbeStyleProps & {
|
|
54
|
+
scheme?: ColorSelection.Schemes;
|
|
41
55
|
}> {
|
|
42
|
-
static primary: (p: ElbeBoxProps) => import("react").
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
56
|
+
static primary: (p: ElbeBoxProps) => import("react").CElement<ElbeProps & ElbeStyleProps & ElbeChildrenProps & {
|
|
57
|
+
mode?: ColorSelection.Modes;
|
|
58
|
+
kind?: ColorSelection.Kinds;
|
|
59
|
+
manner?: ColorSelection.Manners;
|
|
60
|
+
state?: ColorSelection.States;
|
|
61
|
+
padding?: number;
|
|
62
|
+
margin?: number;
|
|
63
|
+
frosted?: boolean;
|
|
64
|
+
elevated?: boolean;
|
|
65
|
+
} & {
|
|
66
|
+
scheme?: ColorSelection.Schemes;
|
|
67
|
+
}, Box>;
|
|
68
|
+
static secondary: (p: ElbeBoxProps) => import("react").CElement<ElbeProps & ElbeStyleProps & ElbeChildrenProps & {
|
|
69
|
+
mode?: ColorSelection.Modes;
|
|
70
|
+
kind?: ColorSelection.Kinds;
|
|
71
|
+
manner?: ColorSelection.Manners;
|
|
72
|
+
state?: ColorSelection.States;
|
|
73
|
+
padding?: number;
|
|
74
|
+
margin?: number;
|
|
75
|
+
frosted?: boolean;
|
|
76
|
+
elevated?: boolean;
|
|
77
|
+
} & {
|
|
78
|
+
scheme?: ColorSelection.Schemes;
|
|
79
|
+
}, Box>;
|
|
80
|
+
static inverse: (p: ElbeBoxProps) => import("react").CElement<ElbeProps & ElbeStyleProps & ElbeChildrenProps & {
|
|
81
|
+
mode?: ColorSelection.Modes;
|
|
82
|
+
kind?: ColorSelection.Kinds;
|
|
83
|
+
manner?: ColorSelection.Manners;
|
|
84
|
+
state?: ColorSelection.States;
|
|
85
|
+
padding?: number;
|
|
86
|
+
margin?: number;
|
|
87
|
+
frosted?: boolean;
|
|
88
|
+
elevated?: boolean;
|
|
89
|
+
} & {
|
|
90
|
+
scheme?: ColorSelection.Schemes;
|
|
91
|
+
}, Box>;
|
|
92
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
54
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
* @param p
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
export declare function _Box(p: ElbeBoxProps & {
|
|
100
|
+
scheme?: ColorSelection.Schemes;
|
|
101
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,23 +9,71 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { Component, createElement } from "react";
|
|
14
|
+
import { useApp } from "../../app/app_ctxt";
|
|
15
|
+
import { elevatedShadow } from "../../util/_util";
|
|
16
|
+
export const styleColorFromContext = {
|
|
17
|
+
backgroundColor: "var(--elbe-context-color-back)",
|
|
18
|
+
color: "var(--elbe-context-color-front)",
|
|
19
|
+
borderColor: "var(--elbe-context-color-border)",
|
|
20
|
+
};
|
|
21
|
+
export const styleBorderFromContext = {
|
|
22
|
+
borderTopColor: "var(--elbe-context-color-border)",
|
|
23
|
+
borderRightColor: "var(--elbe-context-color-border)",
|
|
24
|
+
borderBottomColor: "var(--elbe-context-color-border)",
|
|
25
|
+
borderLeftColor: "var(--elbe-context-color-border)",
|
|
26
|
+
borderTopStyle: "solid",
|
|
27
|
+
borderRightStyle: "solid",
|
|
28
|
+
borderBottomStyle: "solid",
|
|
29
|
+
borderLeftStyle: "solid",
|
|
30
|
+
borderTopWidth: "var(--elbe-context-geometry-border-width)",
|
|
31
|
+
borderRightWidth: "var(--elbe-context-geometry-border-width)",
|
|
32
|
+
borderBottomWidth: "var(--elbe-context-geometry-border-width)",
|
|
33
|
+
borderLeftWidth: "var(--elbe-context-geometry-border-width)",
|
|
34
|
+
borderRadius: "var(--elbe-context-geometry-border-radius)",
|
|
35
|
+
};
|
|
13
36
|
export function applyProps(typeLabel, p, classes, style) {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
const eNonNative = Object.assign(Object.assign({}, p), { native: undefined });
|
|
39
|
+
const eNative = (_a = p.native) !== null && _a !== void 0 ? _a : {};
|
|
15
40
|
if (Array.isArray(classes)) {
|
|
16
41
|
classes = classes.filter((c) => c).join(" ");
|
|
17
42
|
}
|
|
18
|
-
const args = Object.assign(Object.assign({ id:
|
|
43
|
+
const args = Object.assign(Object.assign(Object.assign(Object.assign({ id: eNonNative.id }, eNative), { role: (_b = eNonNative.role) !== null && _b !== void 0 ? _b : undefined, className: `${classes || ""} ${(_c = eNonNative === null || eNonNative === void 0 ? void 0 : eNonNative.className) !== null && _c !== void 0 ? _c : ""}`, style: Object.assign(Object.assign(Object.assign({}, (style !== null && style !== void 0 ? style : {})), ((_d = eNonNative === null || eNonNative === void 0 ? void 0 : eNonNative.style) !== null && _d !== void 0 ? _d : {})), (eNonNative.flex
|
|
44
|
+
? { flex: eNonNative.flex === true ? 1 : eNonNative.flex }
|
|
45
|
+
: {})) }), (eNonNative.tooltip ? { ["data-tooltip"]: eNonNative.tooltip } : {})), { ["aria-label"]: (_e = eNonNative.ariaLabel) !== null && _e !== void 0 ? _e : undefined,
|
|
19
46
|
//@ts-ignore
|
|
20
|
-
["data-type"]: (
|
|
47
|
+
["data-type"]: (_f = eNonNative.typeLabel) !== null && _f !== void 0 ? _f : (!!typeLabel ? `elbe_${typeLabel}` : undefined) });
|
|
21
48
|
return args;
|
|
22
49
|
}
|
|
23
50
|
export class Box extends Component {
|
|
24
51
|
render() {
|
|
25
|
-
|
|
26
|
-
return createElement("div", applyProps("box", elbe, [scheme, mode], Object.assign({ padding: `${padding}rem`, margin: `${margin}rem` }, elbe.style)), children);
|
|
52
|
+
return _jsx(_Box, Object.assign({}, this.props));
|
|
27
53
|
}
|
|
28
54
|
}
|
|
29
|
-
Box.primary = (p) =>
|
|
30
|
-
Box.secondary = (p) =>
|
|
31
|
-
Box.inverse = (p) =>
|
|
55
|
+
Box.primary = (p) => createElement(Box, Object.assign(Object.assign({}, p), { scheme: "primary" }));
|
|
56
|
+
Box.secondary = (p) => createElement(Box, Object.assign(Object.assign({}, p), { scheme: "secondary" }));
|
|
57
|
+
Box.inverse = (p) => createElement(Box, Object.assign(Object.assign({}, p), { scheme: "inverse" }));
|
|
58
|
+
/**
|
|
59
|
+
* @private
|
|
60
|
+
* @param p
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
export function _Box(p) {
|
|
64
|
+
const { _appThemeContext } = useApp();
|
|
65
|
+
const usedTheme = _appThemeContext.useTheme().useWith(({ color }) => {
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
67
|
+
return {
|
|
68
|
+
color: Object.assign(Object.assign({}, color), { selection: Object.assign(Object.assign({}, color.selection), { scheme: (_b = (_a = p.scheme) !== null && _a !== void 0 ? _a : color.selection.scheme) !== null && _b !== void 0 ? _b : "primary", mode: (_d = (_c = p.mode) !== null && _c !== void 0 ? _c : color.selection.mode) !== null && _d !== void 0 ? _d : "light", kind: (_f = (_e = p.kind) !== null && _e !== void 0 ? _e : color.selection.kind) !== null && _f !== void 0 ? _f : "plain", manner: (_h = (_g = p.manner) !== null && _g !== void 0 ? _g : color.selection.manner) !== null && _h !== void 0 ? _h : "plain", state: (_k = (_j = p.state) !== null && _j !== void 0 ? _j : color.selection.state) !== null && _k !== void 0 ? _k : "neutral" }) }),
|
|
69
|
+
};
|
|
70
|
+
}, [p.scheme, p.mode, p.kind, p.manner, p.state]);
|
|
71
|
+
const { scheme, mode, padding, margin, frosted, elevated, children } = p, elbe = __rest(p, ["scheme", "mode", "padding", "margin", "frosted", "elevated", "children"]);
|
|
72
|
+
return (_jsx(_appThemeContext.WithTheme, { theme: usedTheme, children: _jsx("div", Object.assign({}, applyProps("box", elbe, [], Object.assign({ padding: `${padding}rem`, margin: `${margin}rem`, backgroundColor: frosted
|
|
73
|
+
? usedTheme.theme.color.currentColor.back.withAlpha(0.4).asCss()
|
|
74
|
+
: usedTheme.theme.color.currentColor.back.asCss(), boxShadow: elevated
|
|
75
|
+
? elevatedShadow(usedTheme.theme.color.isDark)
|
|
76
|
+
: undefined, backdropFilter: frosted ? "blur(.5rem)" : undefined, transition: usedTheme.theme.motion.reduced
|
|
77
|
+
? undefined
|
|
78
|
+
: "background 0.3s ease" }, elbe.style)), { children: children })) }));
|
|
79
|
+
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ColorSelection, ElbeChildren, ElbeChildrenProps, ElbeProps, ElbeStyleProps } from "../../..";
|
|
2
|
+
export declare function Card({ mode, scheme, kind, manner, state, padding, margin, onTap, onLongTap, frosted, bordered, elevated, sharp, overflow, children, ...elbe }: {
|
|
3
|
+
mode?: ColorSelection.Modes;
|
|
4
|
+
scheme?: ColorSelection.Schemes;
|
|
5
|
+
kind?: ColorSelection.Kinds;
|
|
6
|
+
manner?: ColorSelection.Manners;
|
|
7
|
+
state?: ColorSelection.States;
|
|
8
8
|
padding?: number;
|
|
9
9
|
margin?: number;
|
|
10
|
-
onTap?: () => void;
|
|
11
|
-
onLongTap?: () => void;
|
|
10
|
+
onTap?: (() => void) | null;
|
|
11
|
+
onLongTap?: (() => void) | null;
|
|
12
12
|
frosted?: boolean;
|
|
13
13
|
elevated?: boolean;
|
|
14
14
|
bordered?: boolean;
|
|
15
15
|
sharp?: boolean;
|
|
16
|
-
|
|
17
|
-
overflow?: "hidden" | "scroll" | "auto";
|
|
16
|
+
overflow?: "auto" | "hidden" | "scroll";
|
|
18
17
|
children?: ElbeChildren;
|
|
19
|
-
} & ElbeProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
} & ElbeProps & ElbeStyleProps & ElbeChildrenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,24 +10,46 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import { useMemo } from "react";
|
|
14
|
+
import { _Box, } from "../../..";
|
|
15
|
+
import { useApp } from "../../app/app_ctxt";
|
|
16
|
+
import { css } from "../../util/_util";
|
|
17
|
+
import { WithTooltip } from "../tooltip";
|
|
15
18
|
export function Card(_a) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
var _b, _c;
|
|
20
|
+
var { mode, scheme, kind, manner, state, padding = 1, margin = 0, onTap, onLongTap, frosted, bordered, elevated, sharp, overflow, children } = _a, elbe = __rest(_a, ["mode", "scheme", "kind", "manner", "state", "padding", "margin", "onTap", "onLongTap", "frosted", "bordered", "elevated", "sharp", "overflow", "children"]);
|
|
21
|
+
const { _appThemeContext } = useApp();
|
|
22
|
+
const { theme } = _appThemeContext.useTheme();
|
|
23
|
+
const isBordered = useMemo(() => {
|
|
24
|
+
return (bordered !== null && bordered !== void 0 ? bordered : false) || theme.color.isContrast;
|
|
25
|
+
}, [bordered, theme.color.isContrast]);
|
|
26
|
+
const styles = {
|
|
27
|
+
radius: sharp ? 0 : `${theme.geometry.radius}rem`,
|
|
28
|
+
borderStyle: isBordered ? "solid" : undefined,
|
|
29
|
+
borderWidth: isBordered ? `${theme.geometry.borderWidth}rem` : undefined,
|
|
30
|
+
borderColor: isBordered
|
|
31
|
+
? "var(--elbe-context-color-border, transparent)"
|
|
32
|
+
: undefined,
|
|
33
|
+
};
|
|
34
|
+
return (_jsx(WithTooltip, { tooltip: elbe.tooltip, children: _jsx(_Box, { mode: mode, scheme: scheme, kind: kind, manner: manner, padding: padding, margin: margin, state: state, className: elbe.className, flex: elbe.flex, elevated: elevated, frosted: frosted, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ overflow: overflow }, css.borderRadius(styles.radius)), css.borderStyle(styles.borderStyle)), css.borderWidth(styles.borderWidth)), css.borderColor(styles.borderColor)), { opacity: onTap === null ? 0.5 : 1 }), ((_b = elbe.style) !== null && _b !== void 0 ? _b : {})), native: Object.assign(Object.assign(Object.assign({}, (onTap !== undefined
|
|
35
|
+
? {
|
|
36
|
+
onClick: (e) => {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
if (onTap === null)
|
|
40
|
+
return;
|
|
41
|
+
onTap === null || onTap === void 0 ? void 0 : onTap();
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
: {})), (onLongTap !== undefined
|
|
45
|
+
? {
|
|
46
|
+
onContextMenu: (e) => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
if (onLongTap === null)
|
|
50
|
+
return;
|
|
51
|
+
onLongTap === null || onLongTap === void 0 ? void 0 : onLongTap();
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
: {})), ((_c = elbe.native) !== null && _c !== void 0 ? _c : {})), children: children }) }));
|
|
33
55
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ElbeProps } from "./box";
|
|
3
|
-
export type PaddedProps = ElbeProps &
|
|
4
|
-
children: any;
|
|
5
|
-
};
|
|
2
|
+
import { ElbeChildrenProps, ElbeProps } from "./box";
|
|
3
|
+
export type PaddedProps = ElbeProps & ElbeChildrenProps;
|
|
6
4
|
export declare class Padded extends React.Component<PaddedProps & {
|
|
7
5
|
top?: number;
|
|
8
6
|
right?: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColorSelection } from "../../theme/subthemes/color/colors/colors";
|
|
2
|
+
import { ElbeThemeContextData } from "../../theme/theme";
|
|
3
|
+
import { ElbeChildren } from "../../util/types";
|
|
4
|
+
export declare function WithStateTheme(p: {
|
|
5
|
+
theme: ElbeThemeContextData<{}>;
|
|
6
|
+
manner?: Exclude<ColorSelection.Manners, "major" | "minor">;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
children: ElbeChildren;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|