@fewbox/den-web 0.1.25 → 0.1.26
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/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Engine/Base/ViewAttributes.d.ts +2 -0
- package/src/components/Engine/Base/index.d.ts +6 -3
- package/src/components/View/VBoundary/index.d.ts +1 -1
- package/src/components/View/VInput/VDropdown/index.d.ts +2 -2
- package/src/components/View/VInput/VHidden/index.d.ts +1 -4
- package/src/components/View/VInput/VSubmit/index.d.ts +1 -0
- package/src/components/View/VInput/VTextBox/index.d.ts +1 -1
- package/src/components/View/VInput/index.d.ts +2 -3
- package/src/components/View/VMount/index.d.ts +5 -0
- package/src/components/View/VRoot/index.d.ts +12 -4
- package/src/components/View/VTextArea/index.d.ts +2 -6
- package/templates/FEWBOX.md +1 -1
package/package.json
CHANGED
|
@@ -39,17 +39,20 @@ export interface IViewProps {
|
|
|
39
39
|
overflowX?: Property.OverflowX;
|
|
40
40
|
overflowY?: Property.OverflowY;
|
|
41
41
|
isDefaultValue?: boolean;
|
|
42
|
-
readonlyRef?: React.RefObject<any>;
|
|
43
42
|
customAttibutes?: Object;
|
|
44
43
|
}
|
|
45
44
|
export type IBaseProps<T extends keyof React.JSX.IntrinsicElements = 'div'> = IViewProps & React.ComponentPropsWithoutRef<T>;
|
|
46
45
|
export interface IBaseStates {
|
|
47
46
|
}
|
|
47
|
+
export interface IProps {
|
|
48
|
+
view: object;
|
|
49
|
+
html: object;
|
|
50
|
+
}
|
|
48
51
|
export interface IBaseReturn {
|
|
49
52
|
getClassName: (vClassName: string) => string;
|
|
50
|
-
getStyle: () => object;
|
|
53
|
+
getStyle: (style?: React.CSSProperties) => object;
|
|
51
54
|
getChildren: () => React.ReactNode;
|
|
52
|
-
getProps: <T extends keyof React.JSX.IntrinsicElements = 'div'>(tag: T) =>
|
|
55
|
+
getProps: <T extends keyof React.JSX.IntrinsicElements = 'div'>(tag: T) => IProps;
|
|
53
56
|
}
|
|
54
57
|
declare const Base: (restProps: IBaseProps<any>) => IBaseReturn;
|
|
55
58
|
export default Base;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBaseProps } from '../../Engine/Base';
|
|
2
2
|
export interface IVBoundaryProps extends IBaseProps {
|
|
3
3
|
}
|
|
4
|
-
declare const VBoundary:
|
|
4
|
+
declare const VBoundary: (props: IVBoundaryProps) => React.JSX.Element;
|
|
5
5
|
export default VBoundary;
|
|
@@ -5,7 +5,8 @@ export interface IDropdownItemData {
|
|
|
5
5
|
caption: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}
|
|
8
|
-
export interface IVDropdownProps extends IBaseProps {
|
|
8
|
+
export interface IVDropdownProps extends IBaseProps<'input'> {
|
|
9
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
9
10
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
10
11
|
name?: string;
|
|
11
12
|
icon?: React.JSX.Element;
|
|
@@ -13,7 +14,6 @@ export interface IVDropdownProps extends IBaseProps {
|
|
|
13
14
|
downIcon: React.JSX.Element;
|
|
14
15
|
upIcon: React.JSX.Element;
|
|
15
16
|
enableClear?: boolean;
|
|
16
|
-
isReadonly?: boolean;
|
|
17
17
|
items: IDropdownItemData[];
|
|
18
18
|
dockCategory?: DockCategory;
|
|
19
19
|
dockAlignment?: DockAlignment;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { IBaseInputProps } from "..";
|
|
2
2
|
export interface IVHiddenProps extends IBaseInputProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
name: string | undefined;
|
|
5
|
-
value?: string | ReadonlyArray<string> | number | undefined;
|
|
6
3
|
}
|
|
7
|
-
declare const VHidden:
|
|
4
|
+
declare const VHidden: (props: IVHiddenProps) => React.JSX.Element;
|
|
8
5
|
export default VHidden;
|
|
@@ -2,5 +2,5 @@ import { IBaseInputProps } from "..";
|
|
|
2
2
|
export interface IVTextBoxProps extends IBaseInputProps {
|
|
3
3
|
enableClear?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const VTextBox:
|
|
5
|
+
declare const VTextBox: (props: IVTextBoxProps) => React.JSX.Element;
|
|
6
6
|
export default VTextBox;
|
|
@@ -3,15 +3,14 @@ import { ColorType, FontSizeType } from "../../Engine";
|
|
|
3
3
|
import { LabelCategory } from "../VLabel";
|
|
4
4
|
import { Property } from 'csstype';
|
|
5
5
|
export interface IBaseInputProps extends IBaseProps<'input'> {
|
|
6
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
6
7
|
type?: React.HTMLInputTypeAttribute | undefined;
|
|
7
|
-
isFocus?: boolean;
|
|
8
8
|
label?: string;
|
|
9
9
|
icon?: React.JSX.Element;
|
|
10
10
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
11
11
|
valueHook?: string;
|
|
12
12
|
setStateHook?: (value: string) => void;
|
|
13
13
|
isValueShow?: boolean;
|
|
14
|
-
isReadonly?: boolean;
|
|
15
14
|
valueSize?: FontSizeType;
|
|
16
15
|
valueColor?: ColorType;
|
|
17
16
|
valueCategory?: LabelCategory;
|
|
@@ -27,5 +26,5 @@ export interface IVInputProps extends IBaseInputProps {
|
|
|
27
26
|
export interface IVInputStates {
|
|
28
27
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
29
28
|
}
|
|
30
|
-
declare const VInput:
|
|
29
|
+
declare const VInput: (props: IVInputProps) => React.JSX.Element;
|
|
31
30
|
export default VInput;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { IBaseReturn } from '../../Engine/Base';
|
|
2
|
+
export declare enum RootCategory {
|
|
3
|
+
Display = "display",
|
|
4
|
+
Rich = "rich"
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
+
export interface IVRootProps {
|
|
7
|
+
_base: IBaseReturn;
|
|
8
|
+
className: string;
|
|
9
|
+
category?: RootCategory;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const VRoot: (props: IVRootProps) => React.JSX.Element;
|
|
6
14
|
export default VRoot;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { IBaseProps, IBaseStates } from '../../Engine/Base';
|
|
2
2
|
export interface IVTextAreaProps extends IBaseProps<'textarea'> {
|
|
3
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
3
4
|
icon?: React.JSX.Element;
|
|
4
|
-
isFocus?: boolean;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
isRequired?: boolean;
|
|
7
|
-
rows: number;
|
|
8
|
-
value?: string | ReadonlyArray<string> | number | undefined;
|
|
9
5
|
valueHook?: string;
|
|
10
6
|
setStateHook?: (value: string) => void;
|
|
11
7
|
}
|
|
12
8
|
export interface IVTextAreaStates extends IBaseStates {
|
|
13
9
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
14
10
|
}
|
|
15
|
-
declare const VTextArea:
|
|
11
|
+
declare const VTextArea: (props: IVTextAreaProps) => React.JSX.Element;
|
|
16
12
|
export default VTextArea;
|
package/templates/FEWBOX.md
CHANGED
|
@@ -62,7 +62,7 @@ const FunctionComponent = (props: IFunctionComponentProps) => {
|
|
|
62
62
|
const _base = Den.Components.Base(rest);
|
|
63
63
|
const [state, setState] = React.useState<IFunctionComponentStates>({ isSelected: props.isSelected });
|
|
64
64
|
return (
|
|
65
|
-
<div className={_base.getClassName(`function-component${state.isSelected ? ' selected' : ''}`)} style={_base.getStyle()} {..._base.
|
|
65
|
+
<div className={_base.getClassName(`function-component${state.isSelected ? ' selected' : ''}`)} style={_base.getStyle()} {..._base.getHtmlProps()}>
|
|
66
66
|
Click Me
|
|
67
67
|
</div>
|
|
68
68
|
);
|