elbe-ui 0.4.26 → 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.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/dist/bit/_bit_provider.d.ts +1 -1
  3. package/dist/bit/_bit_provider.js +11 -6
  4. package/dist/bit/_bit_utils.d.ts +5 -1
  5. package/dist/bit/bit.d.ts +2 -2
  6. package/dist/bit/bit.js +2 -2
  7. package/dist/elbe.css +97 -61
  8. package/dist/elbe.css.map +1 -1
  9. package/dist/index.d.ts +1529 -1527
  10. package/dist/index.js +3 -2
  11. package/dist/ui/components/badge.d.ts +7 -7
  12. package/dist/ui/components/badge.js +3 -3
  13. package/dist/ui/components/banner.d.ts +2 -2
  14. package/dist/ui/components/banner.js +8 -8
  15. package/dist/ui/components/base/box.d.ts +4140 -2520
  16. package/dist/ui/components/base/box.js +4 -4
  17. package/dist/ui/components/base/card.d.ts +1 -1
  18. package/dist/ui/components/base/card.js +1 -1
  19. package/dist/ui/components/base/padded.d.ts +4 -4
  20. package/dist/ui/components/base/padded.js +2 -2
  21. package/dist/ui/components/button/button.d.ts +10 -9
  22. package/dist/ui/components/button/button.js +15 -13
  23. package/dist/ui/components/button/choose_button.d.ts +2 -2
  24. package/dist/ui/components/button/choose_button.js +5 -4
  25. package/dist/ui/components/button/icon_button.d.ts +9 -8
  26. package/dist/ui/components/button/icon_button.js +16 -4
  27. package/dist/ui/components/button/toggle_button.d.ts +2 -2
  28. package/dist/ui/components/button/toggle_button.js +8 -4
  29. package/dist/ui/components/dev/todo.d.ts +4 -4
  30. package/dist/ui/components/dev/todo.js +2 -2
  31. package/dist/ui/components/dialog.d.ts +4 -3
  32. package/dist/ui/components/dialog.js +21 -4
  33. package/dist/ui/components/error_view.d.ts +2 -2
  34. package/dist/ui/components/error_view.js +12 -8
  35. package/dist/ui/components/footer.d.ts +3 -3
  36. package/dist/ui/components/footer.js +3 -3
  37. package/dist/ui/components/input/checkbox.d.ts +1 -1
  38. package/dist/ui/components/input/checkbox.js +5 -5
  39. package/dist/ui/components/input/range.d.ts +1 -1
  40. package/dist/ui/components/input/range.js +1 -1
  41. package/dist/ui/components/input/select.d.ts +1 -1
  42. package/dist/ui/components/input/select.js +2 -2
  43. package/dist/ui/components/input/switch.d.ts +1 -1
  44. package/dist/ui/components/input/switch.js +1 -1
  45. package/dist/ui/components/input/text/input_field.d.ts +9 -9
  46. package/dist/ui/components/input/text/input_field.js +7 -7
  47. package/dist/ui/components/input/text/multi_line.d.ts +1 -1
  48. package/dist/ui/components/input/text/multi_line.js +3 -3
  49. package/dist/ui/components/input/text/single_line.d.ts +1 -1
  50. package/dist/ui/components/input/text/single_line.js +4 -4
  51. package/dist/ui/components/layout/alignment.d.ts +3 -2
  52. package/dist/ui/components/layout/alignment.js +2 -2
  53. package/dist/ui/components/layout/app_base.d.ts +1 -1
  54. package/dist/ui/components/layout/app_base.js +33 -9
  55. package/dist/ui/components/layout/ctx_app_base.d.ts +8 -3
  56. package/dist/ui/components/layout/ctx_app_base.js +1 -2
  57. package/dist/ui/components/layout/flex.d.ts +3 -3
  58. package/dist/ui/components/layout/flex.js +5 -5
  59. package/dist/ui/components/layout/header.d.ts +5 -8
  60. package/dist/ui/components/layout/header.js +11 -13
  61. package/dist/ui/components/layout/menu.d.ts +1 -1
  62. package/dist/ui/components/layout/menu.js +6 -6
  63. package/dist/ui/components/layout/page.d.ts +3 -1
  64. package/dist/ui/components/layout/page.js +14 -12
  65. package/dist/ui/components/layout/scroll.d.ts +4 -4
  66. package/dist/ui/components/layout/scroll.js +3 -3
  67. package/dist/ui/components/layout/spaced.d.ts +1 -1
  68. package/dist/ui/components/layout/spaced.js +1 -1
  69. package/dist/ui/components/layout/toolbar.d.ts +2 -2
  70. package/dist/ui/components/layout/toolbar.js +4 -6
  71. package/dist/ui/components/link.d.ts +1 -1
  72. package/dist/ui/components/link.js +2 -2
  73. package/dist/ui/components/progress_bar.d.ts +1 -1
  74. package/dist/ui/components/progress_bar.js +1 -1
  75. package/dist/ui/components/routing/route.d.ts +8 -8
  76. package/dist/ui/components/routing/route.js +4 -4
  77. package/dist/ui/components/spinner.d.ts +4 -4
  78. package/dist/ui/components/spinner.js +33 -33
  79. package/dist/ui/components/text.d.ts +15 -15
  80. package/dist/ui/components/text.js +6 -6
  81. package/dist/ui/theme/colors.js +0 -1
  82. package/dist/ui/theme/theme.d.ts +1 -1
  83. package/dist/ui/theme/theme.js +3 -3
  84. package/dist/ui/theme/theme_context.d.ts +2 -2
  85. package/dist/ui/theme/theme_context.js +1 -2
  86. package/dist/ui/util/ctx_toolbar.d.ts +1 -2
  87. package/dist/ui/util/ctx_toolbar.js +2 -2
  88. package/dist/ui/util/error_view.d.ts +1 -1
  89. package/dist/ui/util/error_view.js +8 -2
  90. package/dist/ui/util/l10n/_l10n_util.d.ts +1 -1
  91. package/dist/ui/util/l10n/_l10n_util.js +1 -1
  92. package/dist/ui/util/l10n/l10n.d.ts +1 -1
  93. package/dist/ui/util/l10n/l10n.js +2 -2
  94. package/dist/ui/util/types.d.ts +3 -2
  95. package/dist/ui/util/util.js +1 -2
  96. package/package.json +6 -8
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
- import { jsx as _jsx } from "preact/jsx-runtime";
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 wouter from "wouter";
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 "preact/compat";
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): React.JSX.Element;
20
- static error(p: BadgeProps): React.JSX.Element;
21
- static warning(p: BadgeProps): React.JSX.Element;
22
- static success(p: BadgeProps): React.JSX.Element;
23
- static info(p: BadgeProps): React.JSX.Element;
24
- render(): React.JSX.Element;
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 "preact/jsx-runtime";
2
- import React from "preact/compat";
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", { class: `b ${this.props.kind} major ${(_a = this.props.class) !== 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 })] }));
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
- }): any;
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("preact").JSX.Element;
13
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,23 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
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 icon = CircleHelpIcon;
5
+ let Icon = CircleHelpIcon;
6
6
  if (kind === "info")
7
- icon = InfoIcon;
7
+ Icon = InfoIcon;
8
8
  if (kind === "warning")
9
- icon = AlertTriangleIcon;
9
+ Icon = AlertTriangleIcon;
10
10
  if (kind === "error")
11
- icon = OctagonAlertIcon;
11
+ Icon = OctagonAlertIcon;
12
12
  if (kind === "success")
13
- icon = CheckCircle2Icon;
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 icon({ size: `${scale * 1.5}rem` });
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, class: "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 }))] }) }));
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
  }