elbe-ui 0.4.27 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bit/_bit_provider.d.ts +1 -1
- package/dist/bit/_bit_provider.js +11 -6
- package/dist/bit/_bit_utils.d.ts +5 -1
- package/dist/bit/bit.d.ts +2 -2
- package/dist/bit/bit.js +2 -2
- package/dist/elbe.css +97 -61
- package/dist/elbe.css.map +1 -1
- package/dist/index.d.ts +1529 -1527
- package/dist/index.js +3 -2
- package/dist/ui/components/badge.d.ts +7 -7
- package/dist/ui/components/badge.js +3 -3
- package/dist/ui/components/banner.d.ts +2 -2
- package/dist/ui/components/banner.js +8 -8
- package/dist/ui/components/base/box.d.ts +4140 -2520
- package/dist/ui/components/base/box.js +4 -4
- package/dist/ui/components/base/card.d.ts +1 -1
- package/dist/ui/components/base/card.js +1 -1
- package/dist/ui/components/base/padded.d.ts +4 -4
- package/dist/ui/components/base/padded.js +2 -2
- package/dist/ui/components/button/button.d.ts +10 -9
- package/dist/ui/components/button/button.js +15 -13
- package/dist/ui/components/button/choose_button.d.ts +2 -2
- package/dist/ui/components/button/choose_button.js +5 -4
- package/dist/ui/components/button/icon_button.d.ts +9 -8
- package/dist/ui/components/button/icon_button.js +16 -4
- package/dist/ui/components/button/toggle_button.d.ts +2 -2
- package/dist/ui/components/button/toggle_button.js +8 -4
- package/dist/ui/components/dev/todo.d.ts +4 -4
- package/dist/ui/components/dev/todo.js +2 -2
- package/dist/ui/components/dialog.d.ts +4 -3
- package/dist/ui/components/dialog.js +21 -4
- package/dist/ui/components/error_view.d.ts +2 -2
- package/dist/ui/components/error_view.js +12 -8
- package/dist/ui/components/footer.d.ts +3 -3
- package/dist/ui/components/footer.js +3 -3
- package/dist/ui/components/input/checkbox.d.ts +1 -1
- package/dist/ui/components/input/checkbox.js +5 -5
- package/dist/ui/components/input/range.d.ts +1 -1
- package/dist/ui/components/input/range.js +1 -1
- package/dist/ui/components/input/select.d.ts +1 -1
- package/dist/ui/components/input/select.js +2 -2
- package/dist/ui/components/input/switch.d.ts +1 -1
- package/dist/ui/components/input/switch.js +1 -1
- package/dist/ui/components/input/text/input_field.d.ts +9 -9
- package/dist/ui/components/input/text/input_field.js +7 -7
- package/dist/ui/components/input/text/multi_line.d.ts +1 -1
- package/dist/ui/components/input/text/multi_line.js +3 -3
- package/dist/ui/components/input/text/single_line.d.ts +1 -1
- package/dist/ui/components/input/text/single_line.js +4 -4
- package/dist/ui/components/layout/alignment.d.ts +3 -2
- package/dist/ui/components/layout/alignment.js +2 -2
- package/dist/ui/components/layout/app_base.d.ts +1 -1
- package/dist/ui/components/layout/app_base.js +33 -9
- package/dist/ui/components/layout/ctx_app_base.d.ts +8 -3
- package/dist/ui/components/layout/ctx_app_base.js +1 -2
- package/dist/ui/components/layout/flex.d.ts +3 -3
- package/dist/ui/components/layout/flex.js +5 -5
- package/dist/ui/components/layout/header.d.ts +5 -8
- package/dist/ui/components/layout/header.js +11 -13
- package/dist/ui/components/layout/menu.d.ts +1 -1
- package/dist/ui/components/layout/menu.js +6 -6
- package/dist/ui/components/layout/page.d.ts +3 -1
- package/dist/ui/components/layout/page.js +3 -1
- package/dist/ui/components/layout/scroll.d.ts +4 -4
- package/dist/ui/components/layout/scroll.js +3 -3
- package/dist/ui/components/layout/spaced.d.ts +1 -1
- package/dist/ui/components/layout/spaced.js +1 -1
- package/dist/ui/components/layout/toolbar.d.ts +2 -2
- package/dist/ui/components/layout/toolbar.js +4 -6
- package/dist/ui/components/link.d.ts +1 -1
- package/dist/ui/components/link.js +2 -2
- package/dist/ui/components/progress_bar.d.ts +1 -1
- package/dist/ui/components/progress_bar.js +1 -1
- package/dist/ui/components/routing/route.d.ts +8 -8
- package/dist/ui/components/routing/route.js +4 -4
- package/dist/ui/components/spinner.d.ts +4 -4
- package/dist/ui/components/spinner.js +33 -33
- package/dist/ui/components/text.d.ts +15 -15
- package/dist/ui/components/text.js +6 -6
- package/dist/ui/theme/colors.js +0 -1
- package/dist/ui/theme/theme.d.ts +1 -1
- package/dist/ui/theme/theme.js +3 -3
- package/dist/ui/theme/theme_context.d.ts +2 -2
- package/dist/ui/theme/theme_context.js +1 -2
- package/dist/ui/util/ctx_toolbar.d.ts +1 -2
- package/dist/ui/util/ctx_toolbar.js +2 -2
- package/dist/ui/util/error_view.d.ts +1 -1
- package/dist/ui/util/error_view.js +8 -2
- package/dist/ui/util/l10n/_l10n_util.d.ts +1 -1
- package/dist/ui/util/l10n/_l10n_util.js +1 -1
- package/dist/ui/util/l10n/l10n.d.ts +1 -1
- package/dist/ui/util/l10n/l10n.js +2 -2
- package/dist/ui/util/types.d.ts +3 -2
- package/dist/ui/util/util.js +1 -2
- package/package.json +6 -8
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as Lucide from "lucide-react";
|
|
3
3
|
import "./elbe.css";
|
|
4
|
-
export * as
|
|
4
|
+
export * as Wouter from "wouter";
|
|
5
|
+
export * as wouter_hash from "wouter/use-hash-location";
|
|
5
6
|
// exports
|
|
6
7
|
export * from "./api/api_worker";
|
|
7
8
|
export * from "./api/error";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "
|
|
1
|
+
import React from "react";
|
|
2
2
|
import type { ElbeColorKinds } from "../theme/colors";
|
|
3
3
|
import type { ElbeChild, ElbeChildren } from "../util/types";
|
|
4
4
|
import type { ElbeProps } from "./base/box";
|
|
@@ -16,10 +16,10 @@ export declare class Badge extends React.Component<BadgeProps & {
|
|
|
16
16
|
constructor(props: BadgeProps & {
|
|
17
17
|
kind: ElbeColorKinds;
|
|
18
18
|
});
|
|
19
|
-
static accent(p: BadgeProps):
|
|
20
|
-
static error(p: BadgeProps):
|
|
21
|
-
static warning(p: BadgeProps):
|
|
22
|
-
static success(p: BadgeProps):
|
|
23
|
-
static info(p: BadgeProps):
|
|
24
|
-
render():
|
|
19
|
+
static accent(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
static error(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
static warning(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
static success(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
static info(p: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import React from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
3
|
export function TestBadge(p) {
|
|
4
4
|
return new Badge(Object.assign(Object.assign({}, p), { kind: "accent" }));
|
|
5
5
|
}
|
|
@@ -27,6 +27,6 @@ export class Badge extends React.Component {
|
|
|
27
27
|
return (_jsxs("div", { style: {
|
|
28
28
|
position: "relative",
|
|
29
29
|
display: "inline-block",
|
|
30
|
-
}, children: [this.props.child, this.props.children, _jsx("div", {
|
|
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 })] }));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -2,7 +2,7 @@ import { ElbeAlertKinds, IconChild } from "../..";
|
|
|
2
2
|
export declare function KindAlertIcon({ kind, size, }: {
|
|
3
3
|
kind: ElbeAlertKinds;
|
|
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
7
|
kind: ElbeAlertKinds;
|
|
8
8
|
manner?: "major" | "minor";
|
|
@@ -10,4 +10,4 @@ export declare function Banner({ kind, manner, title, onDismiss, dismissIcon, ch
|
|
|
10
10
|
onDismiss?: () => void;
|
|
11
11
|
dismissIcon?: IconChild;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
|
-
}): import("
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AlertTriangleIcon, CheckCircle2Icon, CircleHelpIcon, InfoIcon, OctagonAlertIcon, XIcon, } from "lucide-react";
|
|
3
3
|
import { Align, Card, Column, IconButton, Row, Text, } from "../..";
|
|
4
4
|
export function KindAlertIcon({ kind, size = "body-m", }) {
|
|
5
|
-
let
|
|
5
|
+
let Icon = CircleHelpIcon;
|
|
6
6
|
if (kind === "info")
|
|
7
|
-
|
|
7
|
+
Icon = InfoIcon;
|
|
8
8
|
if (kind === "warning")
|
|
9
|
-
|
|
9
|
+
Icon = AlertTriangleIcon;
|
|
10
10
|
if (kind === "error")
|
|
11
|
-
|
|
11
|
+
Icon = OctagonAlertIcon;
|
|
12
12
|
if (kind === "success")
|
|
13
|
-
|
|
13
|
+
Icon = CheckCircle2Icon;
|
|
14
14
|
let scale = 1;
|
|
15
15
|
if (size === "body-s")
|
|
16
16
|
scale = 0.8;
|
|
17
17
|
if (size === "body-l")
|
|
18
18
|
scale = 1.2;
|
|
19
|
-
return
|
|
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, className: "flex-1", 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
|
}
|