-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from liuxian496/developer
优化打包后的文件
- Loading branch information
Showing
49 changed files
with
283 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ package-lock.json | |
|
||
# production | ||
/build | ||
/dist | ||
/storybook-static | ||
|
||
# npm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Button } from "./components/button/button"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Checkbox } from "./components/checkbox/checkbox"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { FocusEvent } from "react"; | ||
|
||
import { UserControlProps } from "./userControl.types"; | ||
|
||
export interface FocusControlProps<T> extends UserControlProps { | ||
/** | ||
* 设置元素是否可以聚焦 | ||
*/ | ||
tabIndex?: number; | ||
/** | ||
* | ||
* @returns void | ||
*/ | ||
onFocus?: (e: FocusEvent<T>) => void; | ||
/** | ||
* | ||
* @returns void | ||
*/ | ||
onBlur?: (e: FocusEvent<T>) => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,90 @@ | ||
import { FocusEvent } from "react"; | ||
import { CSSProperties } from "react"; | ||
|
||
import { UserControlProps } from "./control.types"; | ||
import { | ||
EnableState, | ||
FocusState, | ||
MouseState, | ||
ControlType, | ||
} from "../../global/enum"; | ||
|
||
export interface FocusControlProps<T> extends UserControlProps { | ||
export interface UserControlProps { | ||
/** | ||
* 设置元素是否可以聚焦 | ||
* 设置自定义控件前缀 | ||
*/ | ||
tabIndex?: number; | ||
prefixCls?: string | undefined; | ||
/** | ||
* | ||
* @returns void | ||
* 设置内联样式 | ||
*/ | ||
onFocus?: (e: FocusEvent<T>) => void; | ||
style?: CSSProperties | undefined; | ||
/** | ||
* | ||
* @returns void | ||
* UserControl类型,代表在litten中的唯一标识 | ||
*/ | ||
onBlur?: (e: FocusEvent<T>) => void; | ||
controlType?: ControlType | undefined; | ||
} | ||
|
||
export type StyleValue<T> = T; | ||
|
||
export type ResponsiveStyleValue<T> = T | { [key: string]: T | null }; | ||
|
||
export type LittenValue = | ||
| string | ||
| ReadonlyArray<string> | ||
| number | ||
| boolean | ||
| undefined; | ||
|
||
/** | ||
* 极值 | ||
*/ | ||
export type Extremum = { | ||
readonly min: number; | ||
readonly max: number; | ||
}; | ||
|
||
/** | ||
* 视觉状态组 | ||
*/ | ||
export interface VisualStates { | ||
/** | ||
* 设置一个值,该值表示控件的焦点状态。 | ||
*/ | ||
focusState?: FocusState; | ||
/** | ||
* 设置一个值,表示是控件的可用状态。 | ||
*/ | ||
enableState?: EnableState; | ||
/** | ||
* 设置一个值,该值表示控件的鼠标状态。 | ||
*/ | ||
mouseState?: MouseState; | ||
} | ||
|
||
/** | ||
* 相对于目标DOM节点的位置 | ||
*/ | ||
export type RelativeRect = { | ||
/** | ||
* 鼠标位置与目标DOM的相对位置的左坐标 | ||
*/ | ||
readonly left: number; | ||
/** | ||
* 鼠标位置与目标DOM的相对位置的右坐标 | ||
*/ | ||
readonly right: number; | ||
/** | ||
* 鼠标位置与目标DOM的相对位置的上坐标 | ||
*/ | ||
readonly top: number; | ||
/** | ||
* 鼠标位置与目标DOM的相对位置的下坐标 | ||
*/ | ||
readonly bottom: number; | ||
/** | ||
* 目标节点的宽度 | ||
*/ | ||
readonly targetWidth: number; | ||
/** | ||
* 目标节点的高度 | ||
*/ | ||
readonly targetHeight: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.