mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Update
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { signal } from "@preact/signals";
|
||||
import type {
|
||||
MdDialog as _MdDialog,
|
||||
MdOutlinedButton as _MdOutlinedButton,
|
||||
MdOutlinedSelect as _MdOutlinedSelect,
|
||||
MdOutlinedTextField as _MdOutlinedTextField,
|
||||
MdSelectOption as _MdSelectOption,
|
||||
MdTextButton as _MdTextButton,
|
||||
MdTonalButton as _MdTonalButton,
|
||||
} from "./md3.ts";
|
||||
|
||||
@@ -27,6 +29,10 @@ export const MdOutlinedSelect = signal<typeof _MdOutlinedSelect | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
export const MdDialog = signal<typeof _MdDialog | undefined>(undefined);
|
||||
|
||||
export const MdTextButton = signal<typeof _MdTextButton | undefined>(undefined);
|
||||
|
||||
export async function load_dmodule() {
|
||||
const md3 = await import("./md3.ts");
|
||||
MdOutlinedTextField.value = md3.MdOutlinedTextField;
|
||||
@@ -34,4 +40,6 @@ export async function load_dmodule() {
|
||||
MdTonalButton.value = md3.MdTonalButton;
|
||||
MdSelectOption.value = md3.MdSelectOption;
|
||||
MdOutlinedSelect.value = md3.MdOutlinedSelect;
|
||||
MdDialog.value = md3.MdDialog;
|
||||
MdTextButton.value = md3.MdTextButton;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import { MdOutlinedButton as _MdOutlinedButton } from "@material/web/button/outl
|
||||
import { MdTonalButton as _MdTonalButton } from "@material/web/button/tonal-button.js?dts=1";
|
||||
import { MdSelectOption as _MdSelectOption } from "@material/web/select/select-option.js?dts=1";
|
||||
import { MdOutlinedSelect as _MdOutlinedSelect } from "@material/web/select/outlined-select.js?dts=1";
|
||||
import { MdDialog as _MdDialog } from "@material/web/dialog/dialog.js?dts=1";
|
||||
import { MdTextButton as _MdTextButton } from "@material/web/button/text-button.js?dts=1";
|
||||
import { createComponent } from "@lit-labs/react/?target=es2022";
|
||||
import * as Preact from "preact/compat";
|
||||
|
||||
@@ -41,8 +43,34 @@ export const MdOutlinedSelect = createComponent({
|
||||
react: Preact,
|
||||
});
|
||||
|
||||
export type DialogAction = {
|
||||
action: string;
|
||||
};
|
||||
|
||||
export const MdDialog = createComponent({
|
||||
tagName: "md-dialog",
|
||||
elementClass: _MdDialog,
|
||||
// @ts-ignore Checked
|
||||
react: Preact,
|
||||
events: {
|
||||
"onopening": "opening",
|
||||
"onopened": "opened",
|
||||
"onclosing": "closing",
|
||||
"onclosed": "closed",
|
||||
},
|
||||
});
|
||||
|
||||
export const MdTextButton = createComponent({
|
||||
tagName: "md-text-button",
|
||||
elementClass: _MdTextButton,
|
||||
// @ts-ignore Checked
|
||||
react: Preact,
|
||||
});
|
||||
|
||||
export { _MdOutlinedTextField };
|
||||
export { _MdOutlinedButton };
|
||||
export { _MdTonalButton };
|
||||
export { _MdSelectOption };
|
||||
export { _MdOutlinedSelect };
|
||||
export { _MdDialog };
|
||||
export { _MdTextButton };
|
||||
|
||||
Reference in New Issue
Block a user