@edu-tosel/design 1.0.60 → 1.0.61
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/interface/Action.d.ts +4 -3
- package/interface/Board.d.ts +4 -4
- package/interface/Color.d.ts +3 -0
- package/interface/Color.js +7 -0
- package/interface/Layout.d.ts +4 -3
- package/interface/Modal.d.ts +2 -1
- package/interface/Overlay.d.ts +3 -3
- package/interface/Property.d.ts +2 -2
- package/interface/index.d.ts +2 -2
- package/interface/index.js +2 -2
- package/interface/widget/index.d.ts +55 -0
- package/interface/widget/index.js +7 -0
- package/layout/design/Row.design.d.ts +1 -1
- package/layout/design/Row.design.js +6 -5
- package/layout/template/Row.d.ts +3 -3
- package/layout/template/Row.js +6 -6
- package/layout/widget/sign/WithTitle.d.ts +2 -2
- package/modal/template/Confirm/Input.d.ts +2 -2
- package/package.json +1 -1
- package/version.txt +1 -1
- package/widget/CheckBox.d.ts +2 -2
- package/widget/DatePicker.d.ts +2 -2
- package/widget/EmailInput.d.ts +2 -2
- package/widget/EmailInput.js +1 -1
- package/widget/Toggle.d.ts +2 -2
- package/widget/design/Label.design.d.ts +2 -2
- package/widget/template/Input.d.ts +3 -3
- package/widget/template/Label.d.ts +3 -3
- package/widget/template/Select/Select.LG.d.ts +2 -2
- package/widget/template/Select/Select.d.ts +2 -2
- package/widget/template/Switch/Switch.d.ts +1 -1
- package/interface/HTMLElement.d.ts +0 -56
- package/interface/HTMLElement.js +0 -7
package/interface/Action.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LabelWidget } from "./widget";
|
|
2
2
|
import { DataField, OnClick } from "./Property";
|
|
3
|
+
import { Color } from "./Color";
|
|
3
4
|
export interface ActionEvent {
|
|
4
5
|
event: string;
|
|
5
6
|
type: "view" | "modal";
|
|
@@ -38,8 +39,8 @@ export interface RowProps<T> {
|
|
|
38
39
|
item: T;
|
|
39
40
|
dataField?: DataField<T>;
|
|
40
41
|
onClick?: OnClick<T>;
|
|
41
|
-
buttons?:
|
|
42
|
-
|
|
42
|
+
buttons?: LabelWidget[];
|
|
43
|
+
dot?: Color;
|
|
43
44
|
options?: {
|
|
44
45
|
height?: string;
|
|
45
46
|
size?: string;
|
package/interface/Board.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataField, DataSet, Size, Titles } from "./Property";
|
|
2
2
|
import { EventsProps } from "./Action";
|
|
3
|
-
import {
|
|
3
|
+
import { InputWidget, LabelWidget, SelectWidget } from "./widget";
|
|
4
4
|
interface OptionsProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
width?: Size;
|
|
@@ -18,15 +18,15 @@ export interface BoardProps<B> {
|
|
|
18
18
|
action?: EventsProps;
|
|
19
19
|
options?: OptionsProps;
|
|
20
20
|
debug?: string;
|
|
21
|
-
buttons?:
|
|
21
|
+
buttons?: LabelWidget[];
|
|
22
22
|
}
|
|
23
23
|
export interface BoardHeaderProps<B> {
|
|
24
24
|
titles?: Omit<Titles, "subtitle"> & {
|
|
25
25
|
icon?: string;
|
|
26
26
|
};
|
|
27
27
|
tag?: {
|
|
28
|
-
selects?:
|
|
29
|
-
inputs?:
|
|
28
|
+
selects?: SelectWidget<B>[];
|
|
29
|
+
inputs?: InputWidget[];
|
|
30
30
|
};
|
|
31
31
|
options?: {
|
|
32
32
|
titleBorder?: string;
|
package/interface/Layout.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { OnClick, State } from "./Property";
|
|
2
3
|
import { ShowAction } from "./Action";
|
|
3
4
|
interface Notification {
|
|
@@ -29,7 +30,7 @@ export interface MenuProps {
|
|
|
29
30
|
}
|
|
30
31
|
export interface DashboardHeaderProps {
|
|
31
32
|
title: string;
|
|
32
|
-
logo?:
|
|
33
|
+
logo?: ReactNode;
|
|
33
34
|
notification: NotificationProps;
|
|
34
35
|
menu?: MenuProps;
|
|
35
36
|
options?: {
|
|
@@ -40,8 +41,8 @@ export interface DashboardHeaderProps {
|
|
|
40
41
|
}
|
|
41
42
|
export interface DashboardProps {
|
|
42
43
|
header: DashboardHeaderProps;
|
|
43
|
-
navigations:
|
|
44
|
-
children:
|
|
44
|
+
navigations: ReactNode[];
|
|
45
|
+
children: ReactNode;
|
|
45
46
|
options?: {
|
|
46
47
|
background?: string;
|
|
47
48
|
};
|
package/interface/Modal.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { Button, Scripts, Size, State, Titles } from "./Property";
|
|
2
3
|
import { ShowAction } from "./Action";
|
|
3
4
|
interface Options {
|
|
@@ -12,7 +13,7 @@ interface Options {
|
|
|
12
13
|
}
|
|
13
14
|
interface ModalProps {
|
|
14
15
|
titles: Titles;
|
|
15
|
-
children:
|
|
16
|
+
children: ReactNode;
|
|
16
17
|
showAction?: ShowAction;
|
|
17
18
|
className?: string;
|
|
18
19
|
options?: Partial<Options>;
|
package/interface/Overlay.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WidgetFrame, LabelWidget } from "./widget";
|
|
2
2
|
import { Titles } from "./Property";
|
|
3
3
|
import { ShowAction } from "./Action";
|
|
4
4
|
export interface OverlayProps {
|
|
@@ -9,6 +9,6 @@ export interface OverlayProps {
|
|
|
9
9
|
export interface InfoOverlayProps extends OverlayProps {
|
|
10
10
|
}
|
|
11
11
|
export interface ManageOverlayProps extends OverlayProps {
|
|
12
|
-
elements?:
|
|
13
|
-
buttons?:
|
|
12
|
+
elements?: WidgetFrame[];
|
|
13
|
+
buttons?: LabelWidget[];
|
|
14
14
|
}
|
package/interface/Property.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { Replace } from "./Action";
|
|
3
|
-
import {
|
|
3
|
+
import { LabelWidget } from "./widget";
|
|
4
4
|
/**
|
|
5
5
|
* State type for the React component
|
|
6
6
|
* @template T
|
|
@@ -37,7 +37,7 @@ export type Size = "4xs" | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2
|
|
|
37
37
|
* @property {"full"} full - Full size
|
|
38
38
|
*/
|
|
39
39
|
export type OnClick<Request = unknown, Response = unknown> = (prop?: Request) => Response | ((prop?: Request) => Promise<Response>);
|
|
40
|
-
export interface Button extends
|
|
40
|
+
export interface Button extends LabelWidget {
|
|
41
41
|
}
|
|
42
42
|
export type FileRead = string | ArrayBuffer | null;
|
|
43
43
|
export type Disabled = boolean | OnClick;
|
package/interface/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./Action";
|
|
2
2
|
export * from "./Card";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./Color";
|
|
4
|
+
export * from "./widget";
|
|
4
5
|
export * from "./Layout";
|
|
5
6
|
export * from "./Overlay";
|
|
6
7
|
export * from "./Property";
|
|
7
8
|
export * from "./Theme";
|
|
8
9
|
export * from "./Shelf";
|
|
9
|
-
export * from "./widget";
|
package/interface/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./Action";
|
|
2
2
|
export * from "./Card";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./Color";
|
|
4
|
+
export * from "./widget";
|
|
4
5
|
export * from "./Layout";
|
|
5
6
|
export * from "./Overlay";
|
|
6
7
|
export * from "./Property";
|
|
7
8
|
export * from "./Theme";
|
|
8
9
|
export * from "./Shelf";
|
|
9
|
-
export * from "./widget";
|
|
@@ -1,2 +1,57 @@
|
|
|
1
|
+
import { Color } from "../Color";
|
|
2
|
+
import { Disabled, OnClick, Size, State } from "../Property";
|
|
1
3
|
export * from "./Carousel";
|
|
2
4
|
export * from "./Switch";
|
|
5
|
+
export declare const WidgetType: {
|
|
6
|
+
readonly TEXT: "text";
|
|
7
|
+
readonly BUTTON: "button";
|
|
8
|
+
readonly INPUT: "input";
|
|
9
|
+
readonly SELECT: "select";
|
|
10
|
+
readonly TOGGLE: "toggle";
|
|
11
|
+
};
|
|
12
|
+
export type WidgetType = (typeof WidgetType)[keyof typeof WidgetType];
|
|
13
|
+
export interface Widget {
|
|
14
|
+
options?: {
|
|
15
|
+
className?: string;
|
|
16
|
+
width?: Size;
|
|
17
|
+
height?: Size;
|
|
18
|
+
background?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
disabled?: Disabled;
|
|
21
|
+
rounded?: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface LabelWidget extends Widget {
|
|
25
|
+
title: string;
|
|
26
|
+
hoverState?: State<boolean>;
|
|
27
|
+
onClick?: OnClick;
|
|
28
|
+
}
|
|
29
|
+
export type SelectOption<T> = [T, string];
|
|
30
|
+
export interface SelectWidget<T> extends Widget {
|
|
31
|
+
state: State<T>;
|
|
32
|
+
selectOptions?: SelectOption<T>[];
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
}
|
|
35
|
+
type InputType = "text" | "password" | "date" | "email" | "phone" | "number";
|
|
36
|
+
export interface InputWidget extends Widget {
|
|
37
|
+
state: State<string> | State<string | undefined>;
|
|
38
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
flag?: boolean;
|
|
41
|
+
type?: InputType;
|
|
42
|
+
label?: LabelWidget;
|
|
43
|
+
}
|
|
44
|
+
export interface CheckBoxWidget extends Widget {
|
|
45
|
+
state: State<boolean>;
|
|
46
|
+
labels: string;
|
|
47
|
+
color: Color;
|
|
48
|
+
}
|
|
49
|
+
export interface WidgetFrame {
|
|
50
|
+
title: string;
|
|
51
|
+
type: WidgetType;
|
|
52
|
+
state: State<any>;
|
|
53
|
+
selectOptions?: SelectOption<string | number>[];
|
|
54
|
+
labels?: [string | boolean, string][];
|
|
55
|
+
disabled?: Disabled;
|
|
56
|
+
onClick?: OnClick;
|
|
57
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RowProps } from "../../interface";
|
|
2
|
-
export default function RowDesign<T>({ item, dataField, options, onClick, buttons,
|
|
2
|
+
export default function RowDesign<T>({ item, dataField, options, onClick, buttons, dot, }: RowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
+
import { ColorSet } from "../../interface";
|
|
3
4
|
import { cn } from "../../util";
|
|
4
5
|
import { Label } from "../../widget";
|
|
5
|
-
export default function RowDesign({ item, dataField, options, onClick, buttons,
|
|
6
|
+
export default function RowDesign({ item, dataField, options, onClick, buttons, dot, }) {
|
|
6
7
|
const { size, padding, text, noHover, className, isPointer } = options ?? {};
|
|
7
8
|
const id = useId();
|
|
8
9
|
const container = {
|
|
@@ -18,13 +19,13 @@ export default function RowDesign({ item, dataField, options, onClick, buttons,
|
|
|
18
19
|
styles: "truncate",
|
|
19
20
|
className,
|
|
20
21
|
};
|
|
21
|
-
const flagBox =
|
|
22
|
+
const flagBox = {
|
|
22
23
|
positions: "absolute left-3.5",
|
|
23
|
-
backgrounds:
|
|
24
|
+
backgrounds: dot && ColorSet[dot],
|
|
24
25
|
sizes: "w-2 h-2",
|
|
25
26
|
styles: "rounded-full",
|
|
26
|
-
}
|
|
27
|
-
return (_jsxs("div", { className: cn(container), onClick: () => onClick?.(), children: [typeof
|
|
27
|
+
};
|
|
28
|
+
return (_jsxs("div", { className: cn(container), onClick: () => onClick?.(), children: [typeof dot !== "undefined" && _jsx("div", { className: cn(flagBox) }), dataField &&
|
|
28
29
|
Object.keys(dataField).map((key) => (_jsx("div", { className: cn(`w-${dataField[key]?.size}/100`, itemBox), children: String(item[key]) }, id + key))), _jsx("div", { className: "absolute right-4 xl:right-8 flex gap-4", children: buttons?.map(({ title, onClick, options }) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
|
|
29
30
|
background: options?.background ?? "bg-crimson-dark",
|
|
30
31
|
text: options?.text ?? "text-white",
|
package/layout/template/Row.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RowProps } from "../../interface";
|
|
2
|
-
declare function Row<T>({ item, dataField, onClick, buttons,
|
|
2
|
+
declare function Row<T>({ item, dataField, onClick, buttons, dot }: RowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Row {
|
|
4
|
-
var Card: <T>({ item, dataField, onClick, buttons, height, noPadding, noHover,
|
|
4
|
+
var Card: <T>({ item, dataField, onClick, buttons, height, noPadding, noHover, dot, }: Omit<RowProps<T>, "options"> & {
|
|
5
5
|
height?: string | undefined;
|
|
6
6
|
noPadding?: boolean | undefined;
|
|
7
7
|
noHover?: boolean | undefined;
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
var Board: <T>({ item, dataField, onClick, buttons,
|
|
9
|
+
var Board: <T>({ item, dataField, onClick, buttons, dot, options, }: RowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default Row;
|
package/layout/template/Row.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import RowDesign from "../design/Row.design";
|
|
4
|
-
function Row({ item, dataField, onClick, buttons,
|
|
5
|
-
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons,
|
|
4
|
+
function Row({ item, dataField, onClick, buttons, dot }) {
|
|
5
|
+
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons, dot: dot, options: {
|
|
6
6
|
size: "w-full h-12",
|
|
7
7
|
noHover: true,
|
|
8
8
|
text: "text-xs",
|
|
9
9
|
className: "text-center",
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
12
|
-
function Board({ item, dataField, onClick, buttons,
|
|
12
|
+
function Board({ item, dataField, onClick, buttons, dot, options, }) {
|
|
13
13
|
const id = useId();
|
|
14
|
-
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons,
|
|
14
|
+
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons, dot: dot, options: {
|
|
15
15
|
...options,
|
|
16
16
|
size: "w-full h-12",
|
|
17
17
|
padding: "px-2 xs:px-4 xl:px-7.5",
|
|
18
18
|
text: "text-xl",
|
|
19
19
|
} }, id));
|
|
20
20
|
}
|
|
21
|
-
function Card({ item, dataField, onClick, buttons, height, noPadding, noHover,
|
|
21
|
+
function Card({ item, dataField, onClick, buttons, height, noPadding, noHover, dot, }) {
|
|
22
22
|
const id = useId();
|
|
23
|
-
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons,
|
|
23
|
+
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons, dot: dot, options: {
|
|
24
24
|
size: `w-full ${height ?? "h-12"}`,
|
|
25
25
|
padding: !noPadding ? "px-2 xs:px-4 xl:px-7.5" : "",
|
|
26
26
|
text: "text-base",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface InputWithTitleProps extends
|
|
1
|
+
import { InputWidget } from "../../../interface";
|
|
2
|
+
interface InputWithTitleProps extends InputWidget {
|
|
3
3
|
title: string;
|
|
4
4
|
}
|
|
5
5
|
declare function WithTitle({ title, placeholder, state, flag, type, }: InputWithTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfirmModalProps } from "../../../interface/Modal";
|
|
2
|
-
import {
|
|
2
|
+
import { InputWidget } from "../../../interface";
|
|
3
3
|
interface InputProps extends Omit<ConfirmModalProps, "children"> {
|
|
4
|
-
inputs: (
|
|
4
|
+
inputs: (InputWidget & {
|
|
5
5
|
title: string;
|
|
6
6
|
})[];
|
|
7
7
|
}
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.61
|
package/widget/CheckBox.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function Checkbox({ state: [checked, setChecked], labels, options, color, }:
|
|
1
|
+
import { CheckBoxWidget } from "../interface";
|
|
2
|
+
export default function Checkbox({ state: [checked, setChecked], labels, options, color, }: CheckBoxWidget): import("react/jsx-runtime").JSX.Element;
|
package/widget/DatePicker.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputWidget } from "../interface";
|
|
2
2
|
import "react-datepicker/dist/react-datepicker.css";
|
|
3
|
-
export default function DatePicker({ options }:
|
|
3
|
+
export default function DatePicker({ options }: InputWidget): import("react/jsx-runtime").JSX.Element;
|
package/widget/EmailInput.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function EmailInput({ state, placeholder, options }:
|
|
1
|
+
import { InputWidget } from "../interface";
|
|
2
|
+
export default function EmailInput({ state, placeholder, options, }: InputWidget): import("react/jsx-runtime").JSX.Element;
|
package/widget/EmailInput.js
CHANGED
|
@@ -10,7 +10,7 @@ const widthSize = {
|
|
|
10
10
|
"2xl": "w-144",
|
|
11
11
|
full: "w-full",
|
|
12
12
|
};
|
|
13
|
-
export default function EmailInput({ state, placeholder, options }) {
|
|
13
|
+
export default function EmailInput({ state, placeholder, options, }) {
|
|
14
14
|
const { width } = options ?? {};
|
|
15
15
|
const id = useId();
|
|
16
16
|
const [value, setValue] = state;
|
package/widget/Toggle.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface HTMLToggleElement extends
|
|
1
|
+
import { Widget, State } from "../interface";
|
|
2
|
+
export interface HTMLToggleElement extends Widget {
|
|
3
3
|
state: State<boolean>;
|
|
4
4
|
labels?: [[true, string], [false, string]];
|
|
5
5
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function LabelDesign({ title, onClick, options, hoverState, }:
|
|
1
|
+
import { LabelWidget } from "../../interface";
|
|
2
|
+
export default function LabelDesign({ title, onClick, options, hoverState, }: LabelWidget): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function Input({ state, onKeyDown, placeholder, options }:
|
|
1
|
+
import { InputWidget } from "../../interface";
|
|
2
|
+
declare function Input({ state, onKeyDown, placeholder, options }: InputWidget): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Input {
|
|
4
|
-
var LG: ({ state, placeholder, flag, type, label }:
|
|
4
|
+
var LG: ({ state, placeholder, flag, type, label }: InputWidget) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
}
|
|
6
6
|
export default Input;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function Label({ title, options }: Omit<
|
|
1
|
+
import { LabelWidget } from "../../interface";
|
|
2
|
+
declare function Label({ title, options }: Omit<LabelWidget, "onClick">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Label {
|
|
4
|
-
var Button: ({ title, hoverTitle, onClick, options, }: Omit<
|
|
4
|
+
var Button: ({ title, hoverTitle, onClick, options, }: Omit<LabelWidget, "hoverState"> & {
|
|
5
5
|
hoverTitle?: string | undefined;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function SelectLG<T>({ state, selectOptions, placeholder, options, }:
|
|
1
|
+
import { SelectWidget } from "../../../interface";
|
|
2
|
+
export default function SelectLG<T>({ state, selectOptions, placeholder, options, }: SelectWidget<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function Select<T>({ state, selectOptions, placeholder, options, }:
|
|
1
|
+
import { SelectWidget } from "../../../interface";
|
|
2
|
+
export default function Select<T>({ state, selectOptions, placeholder, options, }: SelectWidget<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Disabled, OnClick, Size, State } from "./Property";
|
|
2
|
-
export declare const HTMLElementType: {
|
|
3
|
-
readonly TEXT: "text";
|
|
4
|
-
readonly BUTTON: "button";
|
|
5
|
-
readonly INPUT: "input";
|
|
6
|
-
readonly SELECT: "select";
|
|
7
|
-
readonly TOGGLE: "toggle";
|
|
8
|
-
};
|
|
9
|
-
export type HTMLElementType = (typeof HTMLElementType)[keyof typeof HTMLElementType];
|
|
10
|
-
export interface HTMLElement {
|
|
11
|
-
options?: {
|
|
12
|
-
className?: string;
|
|
13
|
-
width?: Size;
|
|
14
|
-
height?: Size;
|
|
15
|
-
background?: string;
|
|
16
|
-
text?: string;
|
|
17
|
-
disabled?: Disabled;
|
|
18
|
-
rounded?: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface HTMLLabelElement extends HTMLElement {
|
|
22
|
-
title: string;
|
|
23
|
-
hoverState?: State<boolean>;
|
|
24
|
-
onClick?: OnClick;
|
|
25
|
-
}
|
|
26
|
-
export type SelectOption<T> = [T, string];
|
|
27
|
-
export interface HTMLSelectElement<T> extends HTMLElement {
|
|
28
|
-
state: State<T>;
|
|
29
|
-
selectOptions?: SelectOption<T>[];
|
|
30
|
-
placeholder?: string;
|
|
31
|
-
}
|
|
32
|
-
type HTMLInputType = "text" | "password" | "date" | "email" | "phone" | "number";
|
|
33
|
-
export interface HTMLInput extends HTMLElement {
|
|
34
|
-
state: State<string> | State<string | undefined>;
|
|
35
|
-
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
36
|
-
placeholder?: string;
|
|
37
|
-
flag?: boolean;
|
|
38
|
-
type?: HTMLInputType;
|
|
39
|
-
label?: HTMLLabelElement;
|
|
40
|
-
}
|
|
41
|
-
export type ColorType = "red" | "blue" | "green";
|
|
42
|
-
export interface HTMLCheckBoxElement extends HTMLElement {
|
|
43
|
-
state: State<boolean>;
|
|
44
|
-
labels: string;
|
|
45
|
-
color: ColorType;
|
|
46
|
-
}
|
|
47
|
-
export interface HTMLElementFrame {
|
|
48
|
-
title: string;
|
|
49
|
-
type: HTMLElementType;
|
|
50
|
-
state: State<any>;
|
|
51
|
-
selectOptions?: SelectOption<string | number>[];
|
|
52
|
-
labels?: [string | boolean, string][];
|
|
53
|
-
disabled?: Disabled;
|
|
54
|
-
onClick?: OnClick;
|
|
55
|
-
}
|
|
56
|
-
export {};
|