@next-bricks/form 0.4.5 → 0.5.0
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/dist/bricks.json +6 -2
- package/dist/chunks/{2255.a8429f39.js → 2255.91dc8128.js} +2 -2
- package/dist/chunks/2255.91dc8128.js.map +1 -0
- package/dist/chunks/{3494.a6ce8b8b.js → 3494.4a17db19.js} +2 -2
- package/dist/chunks/{3494.a6ce8b8b.js.map → 3494.4a17db19.js.map} +1 -1
- package/dist/chunks/{7822.1ee7749c.js → 7822.53604e29.js} +2 -2
- package/dist/chunks/{7822.1ee7749c.js.map → 7822.53604e29.js.map} +1 -1
- package/dist/chunks/9396.f9127ea6.js +2 -0
- package/dist/chunks/9396.f9127ea6.js.map +1 -0
- package/dist/chunks/{dynamic-form-item.465a24a5.js → dynamic-form-item.97b25da2.js} +2 -2
- package/dist/chunks/{dynamic-form-item.465a24a5.js.map → dynamic-form-item.97b25da2.js.map} +1 -1
- package/dist/chunks/general-input.243352ff.js +3 -0
- package/dist/chunks/general-input.243352ff.js.map +1 -0
- package/dist/chunks/{general-radio.dae2691a.js → general-radio.21553834.js} +3 -3
- package/dist/chunks/{general-radio.dae2691a.js.map → general-radio.21553834.js.map} +1 -1
- package/dist/chunks/general-search.0ba9a7cb.js +3 -0
- package/dist/chunks/general-search.0ba9a7cb.js.LICENSE.txt +5 -0
- package/dist/chunks/general-search.0ba9a7cb.js.map +1 -0
- package/dist/chunks/main.c796802d.js +2 -0
- package/dist/chunks/{main.e81ae8c4.js.map → main.c796802d.js.map} +1 -1
- package/dist/index.7af0aa96.js +2 -0
- package/dist/index.7af0aa96.js.map +1 -0
- package/dist/manifest.json +983 -0
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/search/index.d.ts +60 -0
- package/dist-types/search/index.spec.d.ts +1 -0
- package/docs/general-search.md +22 -0
- package/package.json +7 -4
- package/dist/chunks/2255.a8429f39.js.map +0 -1
- package/dist/chunks/249.f97b46f0.js +0 -2
- package/dist/chunks/249.f97b46f0.js.map +0 -1
- package/dist/chunks/general-input.e273c453.js +0 -3
- package/dist/chunks/general-input.e273c453.js.map +0 -1
- package/dist/chunks/main.e81ae8c4.js +0 -2
- package/dist/index.cc24c9e3.js +0 -2
- package/dist/index.cc24c9e3.js.map +0 -1
- /package/dist/chunks/{general-input.e273c453.js.LICENSE.txt → general-input.243352ff.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{general-radio.dae2691a.js.LICENSE.txt → general-radio.21553834.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface SearchProps {
|
|
5
|
+
value: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
trim?: boolean;
|
|
10
|
+
debounceTime?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface SearchEvents {
|
|
13
|
+
blur: Event;
|
|
14
|
+
change: Event;
|
|
15
|
+
search: Event;
|
|
16
|
+
}
|
|
17
|
+
export interface SearchEventsMap {
|
|
18
|
+
onBlur: "blur";
|
|
19
|
+
onChange: "change";
|
|
20
|
+
onSearch: "search";
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 搜索框
|
|
24
|
+
*/
|
|
25
|
+
export declare class GeneralSearch extends ReactNextElement implements SearchProps {
|
|
26
|
+
#private;
|
|
27
|
+
/**
|
|
28
|
+
* 搜索框的值
|
|
29
|
+
*/
|
|
30
|
+
accessor value: string;
|
|
31
|
+
/**
|
|
32
|
+
* 提示语
|
|
33
|
+
*/
|
|
34
|
+
accessor placeholder: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 是否自动聚焦
|
|
37
|
+
*/
|
|
38
|
+
accessor autoFocus: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* 可以点击清除图标删除内容
|
|
41
|
+
*/
|
|
42
|
+
accessor clearable: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* 是否剔除前后空格
|
|
45
|
+
*/
|
|
46
|
+
accessor trim: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* 默认延迟时间
|
|
49
|
+
*/
|
|
50
|
+
accessor debounceTime: number;
|
|
51
|
+
render(): JSX.Element;
|
|
52
|
+
}
|
|
53
|
+
interface SearchComponentProps extends SearchProps {
|
|
54
|
+
onBlur?: (value: string) => void;
|
|
55
|
+
onSearch?: (value: string) => void;
|
|
56
|
+
onChange?: (value: string) => void;
|
|
57
|
+
onDebouncedChange?: (value: string) => void;
|
|
58
|
+
}
|
|
59
|
+
export declare function GeneralSearchComponent(props: SearchComponentProps): JSX.Element;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
搜索框
|
|
2
|
+
|
|
3
|
+
## Examples
|
|
4
|
+
|
|
5
|
+
### Basic
|
|
6
|
+
|
|
7
|
+
```yaml preview
|
|
8
|
+
- brick: form.general-search
|
|
9
|
+
properties:
|
|
10
|
+
placeholder: 请输入
|
|
11
|
+
clearable: true
|
|
12
|
+
trim: true
|
|
13
|
+
events:
|
|
14
|
+
change:
|
|
15
|
+
action: console.log
|
|
16
|
+
args:
|
|
17
|
+
- "<% EVENT.detail %>"
|
|
18
|
+
search:
|
|
19
|
+
action: console.log
|
|
20
|
+
args:
|
|
21
|
+
- "<% EVENT.detail %>"
|
|
22
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/form",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
"sideEffects": true,
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
|
-
"dist-types"
|
|
14
|
+
"dist-types",
|
|
15
|
+
"docs"
|
|
15
16
|
],
|
|
16
17
|
"exports": {
|
|
17
18
|
"./package.json": "./package.json",
|
|
18
19
|
"./dist/bricks.json": "./dist/bricks.json",
|
|
20
|
+
"./dist/manifest.json": "./dist/manifest.json",
|
|
19
21
|
"./*": {
|
|
20
22
|
"types": "./dist-types/*/index.d.ts"
|
|
21
23
|
}
|
|
@@ -25,14 +27,15 @@
|
|
|
25
27
|
"build": "npm run build:main && npm run build:types",
|
|
26
28
|
"build:main": "cross-env NODE_ENV=production build-next-bricks",
|
|
27
29
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json",
|
|
30
|
+
"build:manifest": "cross-env NODE_ENV=production build-next-bricks --manifest-only",
|
|
28
31
|
"test": "cross-env NODE_ENV='test' test-next",
|
|
29
32
|
"test:ci": "cross-env NODE_ENV='test' CI=true test-next",
|
|
30
33
|
"prepublishOnly": "cp package.json package.json.bak && npm pkg delete dependencies",
|
|
31
34
|
"postpublish": "mv package.json.bak package.json"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
|
-
"@next-core/build-next-bricks": "^1.
|
|
37
|
+
"@next-core/build-next-bricks": "^1.7.2",
|
|
35
38
|
"@next-core/test-next": "^1.0.6"
|
|
36
39
|
},
|
|
37
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "39c905308f0f4db5e5d84b8ffdde38aa94dbe394"
|
|
38
41
|
}
|