elbe-ui 0.2.5 → 0.2.11
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/index.js +2 -2
- package/dist/ui/color_theme.d.ts +5 -0
- package/dist/ui/components/badge.d.ts +25 -0
- package/dist/ui/components/box.d.ts +1027 -0
- package/dist/ui/components/button.d.ts +23 -0
- package/dist/ui/components/card.d.ts +14 -0
- package/dist/ui/components/dialog.d.ts +8 -0
- package/dist/ui/components/flex.d.ts +11 -0
- package/dist/ui/components/icon_button.d.ts +19 -0
- package/dist/ui/components/input/checkbox.d.ts +6 -0
- package/dist/ui/components/input/input_field.d.ts +22 -0
- package/dist/ui/components/input/range.d.ts +8 -0
- package/dist/ui/components/input/select.d.ts +10 -0
- package/dist/ui/components/input/text_area.d.ts +10 -0
- package/dist/ui/components/padded.d.ts +25 -0
- package/dist/ui/components/text.d.ts +33 -0
- package/dist/ui/components/toggle_button.d.ts +12 -0
- package/dist/ui/components/util.d.ts +3 -0
- package/dist/ui/util/confirm_dialog.d.ts +10 -0
- package/dist/ui/util/error_view.d.ts +1 -0
- package/dist/ui/util/toast.d.ts +5 -0
- package/dist/ui/util/util.d.ts +3 -0
- package/package.json +6 -3
- package/src/index.ts +24 -0
- package/src/ui/color_theme.ts +24 -0
- package/src/ui/components/badge.tsx +78 -0
- package/src/ui/components/box.tsx +49 -0
- package/src/ui/components/button.tsx +61 -0
- package/src/ui/components/card.tsx +45 -0
- package/src/ui/components/dialog.tsx +51 -0
- package/src/ui/components/flex.tsx +64 -0
- package/src/ui/components/icon_button.tsx +57 -0
- package/src/ui/components/input/checkbox.tsx +32 -0
- package/src/ui/components/input/input_field.tsx +57 -0
- package/src/ui/components/input/range.tsx +37 -0
- package/src/ui/components/input/select.tsx +29 -0
- package/src/ui/components/input/text_area.tsx +45 -0
- package/src/ui/components/padded.tsx +62 -0
- package/src/ui/components/text.tsx +78 -0
- package/src/ui/components/toggle_button.tsx +51 -0
- package/src/ui/components/util.tsx +3 -0
- package/src/ui/util/confirm_dialog.ts +53 -0
- package/src/ui/util/error_view.tsx +16 -0
- package/src/ui/util/toast.ts +14 -0
- package/src/ui/util/util.ts +4 -0
- package/style/color_style.scss +148 -0
- package/style/components.scss +574 -0
- package/style/root.scss +50 -0
- package/style/type_style.scss +22 -0
package/dist/index.js
CHANGED
|
@@ -17038,6 +17038,7 @@ var _Flex = function(row, p3, elbe) {
|
|
|
17038
17038
|
};
|
|
17039
17039
|
// src/ui/components/icon_button.tsx
|
|
17040
17040
|
var _btn2 = function({ icon, onTap, ...elbe }, colorManner = "major") {
|
|
17041
|
+
console.log("icon", icon);
|
|
17041
17042
|
return u3("button", {
|
|
17042
17043
|
...applyProps(elbe, [
|
|
17043
17044
|
"row",
|
|
@@ -17052,8 +17053,7 @@ var _btn2 = function({ icon, onTap, ...elbe }, colorManner = "major") {
|
|
|
17052
17053
|
height: "3rem",
|
|
17053
17054
|
width: "3rem"
|
|
17054
17055
|
}),
|
|
17055
|
-
onClick: () => onTap && onTap()
|
|
17056
|
-
children: typeof icon === "function" ? icon({}) : icon
|
|
17056
|
+
onClick: () => onTap && onTap()
|
|
17057
17057
|
}, undefined, false, undefined, this);
|
|
17058
17058
|
};
|
|
17059
17059
|
class IconButton extends Rn.Component {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ElbeColorStyles = "accent" | "error" | "warning" | "success" | "info";
|
|
2
|
+
export type ElbeColorManners = "major" | "minor" | "action" | "integrated";
|
|
3
|
+
export type ElbeColorThemes = "primary" | "secondary" | "inverse";
|
|
4
|
+
export type ElbeColorModes = "light" | "dark";
|
|
5
|
+
export type ElbeTypeStyles = "header-1" | "header-2" | "header-3" | "header-4" | "header-5" | "header-6" | "text-s" | "text-m" | "text-l" | "code";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "preact/compat";
|
|
2
|
+
import type { ElbeColorStyles } from "../color_theme";
|
|
3
|
+
import type { ElbeChild, ElbeChildren } from "../util/util";
|
|
4
|
+
import type { ElbeProps } from "./box";
|
|
5
|
+
export type BadgeProps = {
|
|
6
|
+
count?: number;
|
|
7
|
+
message?: string;
|
|
8
|
+
child?: ElbeChild;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
children?: ElbeChildren;
|
|
11
|
+
} & ElbeProps;
|
|
12
|
+
export declare function TestBadge(p: BadgeProps): Badge;
|
|
13
|
+
export declare class Badge extends React.Component<BadgeProps & {
|
|
14
|
+
colorStyle: ElbeColorStyles;
|
|
15
|
+
}> {
|
|
16
|
+
constructor(props: BadgeProps & {
|
|
17
|
+
colorStyle: ElbeColorStyles;
|
|
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;
|
|
25
|
+
}
|