@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewbox/den-web",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "main": "index.js",
5
5
  "types": "index-web.d.ts",
6
6
  "repository": "https://github.com/FewBox/fewbox-den.git",
@@ -0,0 +1,2 @@
1
+ declare const ViewAttributes: string[];
2
+ export default ViewAttributes;
@@ -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) => object;
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: import("react").ForwardRefExoticComponent<IVBoundaryProps & import("react").RefAttributes<HTMLDivElement>>;
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: import("react").ForwardRefExoticComponent<IVHiddenProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ declare const VHidden: (props: IVHiddenProps) => React.JSX.Element;
8
5
  export default VHidden;
@@ -1,5 +1,6 @@
1
1
  import { IBaseInputProps } from "..";
2
2
  export interface IVSubmitProps extends IBaseInputProps {
3
+ ref?: React.Ref<HTMLInputElement>;
3
4
  caption: string | React.JSX.Element;
4
5
  isFormNoValidate?: boolean;
5
6
  }
@@ -2,5 +2,5 @@ import { IBaseInputProps } from "..";
2
2
  export interface IVTextBoxProps extends IBaseInputProps {
3
3
  enableClear?: boolean;
4
4
  }
5
- declare const VTextBox: import("react").ForwardRefExoticComponent<IVTextBoxProps & import("react").RefAttributes<HTMLInputElement>>;
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: import("react").ForwardRefExoticComponent<IVInputProps & import("react").RefAttributes<HTMLInputElement>>;
29
+ declare const VInput: (props: IVInputProps) => React.JSX.Element;
31
30
  export default VInput;
@@ -0,0 +1,5 @@
1
+ type IVMountProps = React.PropsWithChildren<{
2
+ id: string;
3
+ }>;
4
+ declare const VMount: (props: IVMountProps) => React.JSX.Element;
5
+ export default VMount;
@@ -1,6 +1,14 @@
1
- import { IBaseProps } from '../../Engine/Base';
2
- export interface IVRootProps extends IBaseProps<any> {
3
- vClassName: string;
1
+ import { IBaseReturn } from '../../Engine/Base';
2
+ export declare enum RootCategory {
3
+ Display = "display",
4
+ Rich = "rich"
4
5
  }
5
- declare const VRoot: import("react").ForwardRefExoticComponent<Omit<IVRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
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: import("react").ForwardRefExoticComponent<IVTextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
11
+ declare const VTextArea: (props: IVTextAreaProps) => React.JSX.Element;
16
12
  export default VTextArea;
@@ -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.getProps()}>
65
+ <div className={_base.getClassName(`function-component${state.isSelected ? ' selected' : ''}`)} style={_base.getStyle()} {..._base.getHtmlProps()}>
66
66
  Click Me
67
67
  </div>
68
68
  );