@kne/react-form-antd 3.0.3 → 3.0.5

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,10 +1,27 @@
1
1
  {
2
2
  "name": "@kne/react-form-antd",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "把@kne/react-form 表单校验逻辑应用到antd",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.modern.js",
7
7
  "source": "src/index.js",
8
+ "scripts": {
9
+ "init": "npm install && cd example && npm install",
10
+ "create-fields": "node ./scripts/createIndex.js",
11
+ "start": "run-p start:lib start:example",
12
+ "build": "run-s create-fields build:lib build:example",
13
+ "build:lib": "microbundle --no-compress --format modern,cjs --jsx React.createElement --jsxFragment React.Fragment",
14
+ "start:lib": "microbundle watch --no-compress --format modern,cjs --jsx React.createElement --jsxFragment React.Fragment",
15
+ "test": "run-s test:unit test:lint test:build",
16
+ "test:build": "run-s build",
17
+ "test:lint": "eslint .",
18
+ "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
19
+ "test:watch": "react-scripts test --env=jsdom",
20
+ "build:example": "cd example && npm run build",
21
+ "start:example": "cd example && npm run start",
22
+ "deploy": "gh-pages -d example/build",
23
+ "prettier": "prettier --config .prettierrc --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'"
24
+ },
8
25
  "repository": {
9
26
  "type": "git",
10
27
  "url": "git+https://github.com/kne-union/react-form-antd.git"
@@ -49,13 +66,13 @@
49
66
  "@kne/use-event": "^0.1.2",
50
67
  "@kne/with-layer": "^0.1.5",
51
68
  "classnames": "^2.2.6",
52
- "dayjs": "^1.11.7",
53
69
  "lodash": "^4.17.15",
70
+ "moment": "^2.29.1",
54
71
  "react-avatar-editor": "^12.0.0"
55
72
  },
56
73
  "devDependencies": {
57
74
  "@kne/react-fetch": "^0.1.12",
58
- "antd": "^5.0.7",
75
+ "antd": "^5.0.2",
59
76
  "axios": "^0.21.4",
60
77
  "cross-env": "^7.0.3",
61
78
  "fs-extra": "^9.0.1",
@@ -70,22 +87,5 @@
70
87
  "react": "^18.2.0",
71
88
  "react-dom": "^18.2.0",
72
89
  "react-scripts": "^4.0.3"
73
- },
74
- "scripts": {
75
- "init": "npm install && cd example && npm install",
76
- "create-fields": "node ./scripts/createIndex.js",
77
- "start": "run-p start:lib start:example",
78
- "build": "run-s create-fields build:lib build:example",
79
- "build:lib": "microbundle --no-compress --format modern,cjs --jsx React.createElement --jsxFragment React.Fragment",
80
- "start:lib": "microbundle watch --no-compress --format modern,cjs --jsx React.createElement --jsxFragment React.Fragment",
81
- "test": "run-s test:unit test:lint test:build",
82
- "test:build": "run-s build",
83
- "test:lint": "eslint .",
84
- "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
85
- "test:watch": "react-scripts test --env=jsdom",
86
- "build:example": "cd example && npm run build",
87
- "start:example": "cd example && npm run start",
88
- "deploy": "gh-pages -d example/build",
89
- "prettier": "prettier --config .prettierrc --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'"
90
90
  }
91
- }
91
+ }
package/dist/index.css DELETED
@@ -1,154 +0,0 @@
1
- .react-form, .react-form--large, .react-form--small, .react-form--inner, .react-form--inner--large, .react-form--inner--small, .react-form--inline, .react-form--inline--large, .react-form--inline--small {
2
- text-align: left;
3
- font-size: 12px; }
4
- .react-form .ant-select, .react-form--large .ant-select, .react-form--small .ant-select, .react-form--inner .ant-select, .react-form--inner--large .ant-select, .react-form--inner--small .ant-select, .react-form--inline .ant-select, .react-form--inline--large .ant-select, .react-form--inline--small .ant-select {
5
- width: 100%; }
6
- .react-form--large .react-form__field-label {
7
- font-size: 14px;
8
- margin-right: 20px;
9
- line-height: 34px; }
10
- .react-form--small .react-form__field-label {
11
- margin-right: 12px;
12
- line-height: 24px; }
13
- .react-form--inner .react-form__field, .react-form--inner--large .react-form__field, .react-form--inner--small .react-form__field {
14
- margin-bottom: 22px; }
15
- .react-form--inner .react-form__field-main, .react-form--inner--large .react-form__field-main, .react-form--inner--small .react-form__field-main {
16
- flex-direction: column; }
17
- .react-form--inner .react-form__field-input, .react-form--inner--large .react-form__field-input, .react-form--inner--small .react-form__field-input {
18
- align-self: auto; }
19
- .react-form--inner .react-form__field-label, .react-form--inner--large .react-form__field-label, .react-form--inner--small .react-form__field-label {
20
- font-size: 14px;
21
- text-align: left;
22
- font-weight: bold;
23
- margin-left: 0;
24
- margin-bottom: 2px; }
25
- .react-form--inner--small .react-form__field-label {
26
- font-size: 12px;
27
- margin-bottom: 1px; }
28
- .react-form--inline, .react-form--inline--large, .react-form--inline--small {
29
- padding: 30px 30px 6px; }
30
- .react-form--inline .react-form__field, .react-form--inline--large .react-form__field, .react-form--inline--small .react-form__field {
31
- display: inline-block;
32
- margin-right: 40px; }
33
- .react-form--inline .react-form__field:last-child, .react-form--inline--large .react-form__field:last-child, .react-form--inline--small .react-form__field:last-child {
34
- margin-right: 0; }
35
- .react-form--inline .react-form__field-label, .react-form--inline--large .react-form__field-label, .react-form--inline--small .react-form__field-label {
36
- min-width: auto !important;
37
- padding-left: 0; }
38
- .react-form--inline .react-form__field-label.is-req:before, .react-form--inline--large .react-form__field-label.is-req:before, .react-form--inline--small .react-form__field-label.is-req:before {
39
- position: static; }
40
- .react-form--inline--large .react-form__field-label {
41
- font-size: 14px;
42
- line-height: 34px; }
43
- .react-form--inline--small .react-form__field-label {
44
- margin-right: 12px; }
45
- .react-form__field-main {
46
- display: flex; }
47
- .react-form__field-label {
48
- text-align: right;
49
- margin-right: 16px;
50
- line-height: 30px;
51
- margin-left: 10px;
52
- position: relative; }
53
- .react-form__field-label.is-req:before {
54
- position: absolute;
55
- color: #fc3333;
56
- font-weight: bold;
57
- content: '*';
58
- margin-right: 4px;
59
- transform: translateX(-10px); }
60
- .react-form__field-input {
61
- align-self: center;
62
- flex: 1;
63
- position: relative; }
64
- .react-form__field-describable {
65
- font-size: 12px;
66
- color: #999999;
67
- line-height: 20px; }
68
- .react-form__field {
69
- margin-bottom: 24px;
70
- transition: border-color 300ms; }
71
- .react-form__field.is-req-error .react-form__field-component, .react-form__field.is-error .react-form__field-component {
72
- border-color: #fc3333; }
73
- .react-form__field.is-req-error .react-form__field-component:focus, .react-form__field.is-error .react-form__field-component:focus {
74
- box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }
75
- .react-form__field.is-req-error .react-form__field-component .ant-select-selection, .react-form__field.is-req-error .react-form__field-component .ant-input, .react-form__field.is-req-error .react-form__field-component .ant-radio-inner, .react-form__field.is-error .react-form__field-component .ant-select-selection, .react-form__field.is-error .react-form__field-component .ant-input, .react-form__field.is-error .react-form__field-component .ant-radio-inner {
76
- border-color: #fc3333; }
77
- .react-form__field.is-req-error .react-form__field-component .ant-select-selection:focus, .react-form__field.is-req-error .react-form__field-component .ant-input:focus, .react-form__field.is-req-error .react-form__field-component .ant-radio-inner:focus, .react-form__field.is-error .react-form__field-component .ant-select-selection:focus, .react-form__field.is-error .react-form__field-component .ant-input:focus, .react-form__field.is-error .react-form__field-component .ant-radio-inner:focus {
78
- box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }
79
- .react-form__field.is-req-error .react-form__field-component .ant-upload.ant-upload-select-picture-card, .react-form__field.is-error .react-form__field-component .ant-upload.ant-upload-select-picture-card {
80
- border-color: #fc3333; }
81
- .react-form__field.is-req-error .react-form__field-component.ant-input-affix-wrapper .ant-input, .react-form__field.is-error .react-form__field-component.ant-input-affix-wrapper .ant-input {
82
- box-shadow: none; }
83
- .react-form__field.is-req-error .react-form__field-component.ant-input-affix-wrapper-focused, .react-form__field.is-error .react-form__field-component.ant-input-affix-wrapper-focused {
84
- box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }
85
- .react-form__field.is-req-error .react-form__field-component.ant-select > .ant-select-selector, .react-form__field.is-error .react-form__field-component.ant-select > .ant-select-selector {
86
- border-color: #fc3333; }
87
- .react-form__field.is-req-error .react-form__field-component.ant-select.ant-select-focused > .ant-select-selector, .react-form__field.is-error .react-form__field-component.ant-select.ant-select-focused > .ant-select-selector {
88
- box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }
89
- .react-form__field-error {
90
- color: #fc3333;
91
- font-size: 12px;
92
- position: absolute;
93
- top: calc(100% + 1px);
94
- left: 0; }
95
-
96
- .react-form-modal .ant-modal-content > .ant-modal-body {
97
- padding: 0; }
98
-
99
- .react-form-modal .ant-modal-confirm-btns {
100
- display: none; }
101
-
102
- .react-form-modal.ant-modal-confirm .ant-modal-header, .react-form-modal.ant-modal-confirm .ant-modal-close {
103
- display: block; }
104
-
105
- .react-form-avatar .preview {
106
- width: 85px;
107
- height: 85px;
108
- overflow: hidden;
109
- display: flex;
110
- justify-content: center;
111
- align-items: center; }
112
- .react-form-avatar .preview img {
113
- max-width: 100%;
114
- max-height: 100%; }
115
-
116
- .data_range_picker {
117
- color: rgba(0, 0, 0, 0.85);
118
- position: relative; }
119
- .data_range_picker .zhijin {
120
- position: absolute;
121
- line-height: 31px;
122
- font-size: 14px;
123
- color: rgba(0, 0, 0, 0.85);
124
- margin-left: 12px;
125
- pointer-events: auto; }
126
- .data_range_picker .zhijin_show {
127
- z-index: 9; }
128
-
129
- .data_range_picker_dis .ant-picker-input input {
130
- color: transparent; }
131
-
132
- .svg_box {
133
- display: flex;
134
- align-items: center;
135
- color: rgba(0, 0, 0, 0.5);
136
- margin: 0 4px; }
137
- .svg_box svg {
138
- width: 16px;
139
- height: 16px; }
140
-
141
- .react-form-avatar-btn {
142
- cursor: pointer;
143
- padding: 5px;
144
- box-sizing: content-box;
145
- border-radius: 2px; }
146
- .react-form-avatar-btn:hover {
147
- background: #F8F8F8; }
148
-
149
- .react-form-avatar-tips {
150
- margin-bottom: 14px;
151
- color: #999;
152
- font-size: 12px; }
153
-
154
- /*# sourceMappingURL=index.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.scss"],"names":[],"mappings":"AAAA;EACE,gBAAgB;EAChB,eAAe,EAAE;EACjB;IACE,WAAW,EAA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ACZ,gBAAgB;EAChB,aAAa;EACb,uBAAuB;EACvB,mBAAmB,EAAE;EACrB;IACE,eAAe;IACf,gBAAgB,EAAE;;AAEtB;EACE,0BAA0B;EAC1B,kBAAkB,EAAE;EACpB;IACE,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,0BAA0B;IAC1B,iBAAiB;IACjB,oBAAoB,EAAE;EACxB;IACE,UAAU,EAAE;;AAEhB;EACE,kBAAkB,EAAE;;AAEtB;EACE,aAAa;EACb,mBAAmB;EACnB,yBAAyB;EACzB,aAAa,EAAE;EACf;IACE,WAAW;IACX,YAAY,EAAE;;AAElB;EACE,eAAe;EACf,YAAY;EACZ,uBAAuB;EACvB,kBAAkB,EAAE;EACpB;IACE,mBAAmB,EAAE;;AAEzB;EACE,mBAAmB;EACnB,WAAW;EACX,eAAe,EAAE","file":"index.css","sourcesContent":[".react-form, .react-form--large, .react-form--small, .react-form--inner, .react-form--inner--large, .react-form--inner--small, .react-form--inline, .react-form--inline--large, .react-form--inline--small {\n text-align: left;\n font-size: 12px; }\n .react-form .ant-select, .react-form--large .ant-select, .react-form--small .ant-select, .react-form--inner .ant-select, .react-form--inner--large .ant-select, .react-form--inner--small .ant-select, .react-form--inline .ant-select, .react-form--inline--large .ant-select, .react-form--inline--small .ant-select {\n width: 100%; }\n .react-form--large .react-form__field-label {\n font-size: 14px;\n margin-right: 20px;\n line-height: 34px; }\n .react-form--small .react-form__field-label {\n margin-right: 12px;\n line-height: 24px; }\n .react-form--inner .react-form__field, .react-form--inner--large .react-form__field, .react-form--inner--small .react-form__field {\n margin-bottom: 22px; }\n .react-form--inner .react-form__field-main, .react-form--inner--large .react-form__field-main, .react-form--inner--small .react-form__field-main {\n flex-direction: column; }\n .react-form--inner .react-form__field-input, .react-form--inner--large .react-form__field-input, .react-form--inner--small .react-form__field-input {\n align-self: auto; }\n .react-form--inner .react-form__field-label, .react-form--inner--large .react-form__field-label, .react-form--inner--small .react-form__field-label {\n font-size: 14px;\n text-align: left;\n font-weight: bold;\n margin-left: 0;\n margin-bottom: 2px; }\n .react-form--inner--small .react-form__field-label {\n font-size: 12px;\n margin-bottom: 1px; }\n .react-form--inline, .react-form--inline--large, .react-form--inline--small {\n padding: 30px 30px 6px; }\n .react-form--inline .react-form__field, .react-form--inline--large .react-form__field, .react-form--inline--small .react-form__field {\n display: inline-block;\n margin-right: 40px; }\n .react-form--inline .react-form__field:last-child, .react-form--inline--large .react-form__field:last-child, .react-form--inline--small .react-form__field:last-child {\n margin-right: 0; }\n .react-form--inline .react-form__field-label, .react-form--inline--large .react-form__field-label, .react-form--inline--small .react-form__field-label {\n min-width: auto !important;\n padding-left: 0; }\n .react-form--inline .react-form__field-label.is-req:before, .react-form--inline--large .react-form__field-label.is-req:before, .react-form--inline--small .react-form__field-label.is-req:before {\n position: static; }\n .react-form--inline--large .react-form__field-label {\n font-size: 14px;\n line-height: 34px; }\n .react-form--inline--small .react-form__field-label {\n margin-right: 12px; }\n .react-form__field-main {\n display: flex; }\n .react-form__field-label {\n text-align: right;\n margin-right: 16px;\n line-height: 30px;\n margin-left: 10px;\n position: relative; }\n .react-form__field-label.is-req:before {\n position: absolute;\n color: #fc3333;\n font-weight: bold;\n content: '*';\n margin-right: 4px;\n transform: translateX(-10px); }\n .react-form__field-input {\n align-self: center;\n flex: 1;\n position: relative; }\n .react-form__field-describable {\n font-size: 12px;\n color: #999999;\n line-height: 20px; }\n .react-form__field {\n margin-bottom: 24px;\n transition: border-color 300ms; }\n .react-form__field.is-req-error .react-form__field-component, .react-form__field.is-error .react-form__field-component {\n border-color: #fc3333; }\n .react-form__field.is-req-error .react-form__field-component:focus, .react-form__field.is-error .react-form__field-component:focus {\n box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }\n .react-form__field.is-req-error .react-form__field-component .ant-select-selection, .react-form__field.is-req-error .react-form__field-component .ant-input, .react-form__field.is-req-error .react-form__field-component .ant-radio-inner, .react-form__field.is-error .react-form__field-component .ant-select-selection, .react-form__field.is-error .react-form__field-component .ant-input, .react-form__field.is-error .react-form__field-component .ant-radio-inner {\n border-color: #fc3333; }\n .react-form__field.is-req-error .react-form__field-component .ant-select-selection:focus, .react-form__field.is-req-error .react-form__field-component .ant-input:focus, .react-form__field.is-req-error .react-form__field-component .ant-radio-inner:focus, .react-form__field.is-error .react-form__field-component .ant-select-selection:focus, .react-form__field.is-error .react-form__field-component .ant-input:focus, .react-form__field.is-error .react-form__field-component .ant-radio-inner:focus {\n box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }\n .react-form__field.is-req-error .react-form__field-component .ant-upload.ant-upload-select-picture-card, .react-form__field.is-error .react-form__field-component .ant-upload.ant-upload-select-picture-card {\n border-color: #fc3333; }\n .react-form__field.is-req-error .react-form__field-component.ant-input-affix-wrapper .ant-input, .react-form__field.is-error .react-form__field-component.ant-input-affix-wrapper .ant-input {\n box-shadow: none; }\n .react-form__field.is-req-error .react-form__field-component.ant-input-affix-wrapper-focused, .react-form__field.is-error .react-form__field-component.ant-input-affix-wrapper-focused {\n box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }\n .react-form__field.is-req-error .react-form__field-component.ant-select > .ant-select-selector, .react-form__field.is-error .react-form__field-component.ant-select > .ant-select-selector {\n border-color: #fc3333; }\n .react-form__field.is-req-error .react-form__field-component.ant-select.ant-select-focused > .ant-select-selector, .react-form__field.is-error .react-form__field-component.ant-select.ant-select-focused > .ant-select-selector {\n box-shadow: 0 0 0 2px rgba(252, 51, 51, 0.2); }\n .react-form__field-error {\n color: #fc3333;\n font-size: 12px;\n position: absolute;\n top: calc(100% + 1px);\n left: 0; }\n\n.react-form-modal .ant-modal-content > .ant-modal-body {\n padding: 0; }\n\n.react-form-modal .ant-modal-confirm-btns {\n display: none; }\n\n.react-form-modal.ant-modal-confirm .ant-modal-header, .react-form-modal.ant-modal-confirm .ant-modal-close {\n display: block; }\n\n.react-form-avatar .preview {\n width: 85px;\n height: 85px;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center; }\n .react-form-avatar .preview img {\n max-width: 100%;\n max-height: 100%; }\n\n.data_range_picker {\n color: rgba(0, 0, 0, 0.85);\n position: relative; }\n .data_range_picker .zhijin {\n position: absolute;\n line-height: 31px;\n font-size: 14px;\n color: rgba(0, 0, 0, 0.85);\n margin-left: 12px;\n pointer-events: auto; }\n .data_range_picker .zhijin_show {\n z-index: 9; }\n\n.data_range_picker_dis .ant-picker-input input {\n color: transparent; }\n\n.svg_box {\n display: flex;\n align-items: center;\n color: rgba(0, 0, 0, 0.5);\n margin: 0 4px; }\n .svg_box svg {\n width: 16px;\n height: 16px; }\n\n.react-form-avatar-btn {\n cursor: pointer;\n padding: 5px;\n box-sizing: content-box;\n border-radius: 2px; }\n .react-form-avatar-btn:hover {\n background: #F8F8F8; }\n\n.react-form-avatar-tips {\n margin-bottom: 14px;\n color: #999;\n font-size: 12px; }\n"]}