@jswork/antd-components 1.0.57 → 1.0.59

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.
Files changed (40) hide show
  1. package/dist/index.esm.js +10 -0
  2. package/dist/index.js +10 -0
  3. package/dist/lib/_abstract-upload.d.ts +40 -0
  4. package/dist/lib/breadcrumb.d.ts +29 -0
  5. package/dist/lib/checkable-dropdown.d.ts +52 -0
  6. package/dist/lib/checkable-tag-list.d.ts +51 -0
  7. package/dist/lib/checkable-tag.d.ts +43 -0
  8. package/dist/lib/checkbox-group.d.ts +38 -0
  9. package/dist/lib/checkbox.d.ts +27 -0
  10. package/dist/lib/codeflask.d.ts +9 -0
  11. package/dist/lib/confirm-button.d.ts +33 -0
  12. package/dist/lib/date-picker.d.ts +28 -0
  13. package/dist/lib/editable-tag-group.d.ts +92 -0
  14. package/dist/lib/input-hidden.d.ts +7 -0
  15. package/dist/lib/input-number.d.ts +27 -0
  16. package/dist/lib/input-token.d.ts +39 -0
  17. package/dist/lib/input.d.ts +29 -0
  18. package/dist/lib/pre-select.d.ts +57 -0
  19. package/dist/lib/radio-group.d.ts +36 -0
  20. package/dist/lib/range-picker.d.ts +27 -0
  21. package/dist/lib/rate.d.ts +23 -0
  22. package/dist/lib/search.d.ts +29 -0
  23. package/dist/lib/select.d.ts +43 -0
  24. package/dist/lib/slider-range.d.ts +23 -0
  25. package/dist/lib/slider.d.ts +22 -0
  26. package/dist/lib/switch.d.ts +27 -0
  27. package/dist/lib/textarea.d.ts +22 -0
  28. package/dist/lib/time-picker.d.ts +29 -0
  29. package/dist/lib/transfer.d.ts +37 -0
  30. package/dist/lib/tree-select.d.ts +31 -0
  31. package/dist/lib/tree.d.ts +30 -0
  32. package/dist/lib/upload-dragger.d.ts +28 -0
  33. package/dist/lib/upload-picture-card.d.ts +14 -0
  34. package/dist/lib/upload-picture.d.ts +14 -0
  35. package/dist/lib/upload.d.ts +28 -0
  36. package/dist/main.d.ts +32 -0
  37. package/dist/style.css +218 -0
  38. package/dist/style.scss +191 -0
  39. package/dist/styles/override.scss +29 -0
  40. package/package.json +2 -2
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { AcAbstractUpload } from './_abstract-upload';
3
+ export declare class AcUploadPicture extends AcAbstractUpload {
4
+ static displayName: string;
5
+ static formSchema: string;
6
+ static defaultProps: {
7
+ onChange: any;
8
+ value: never[];
9
+ maxCount: number;
10
+ transformURL: (pid: any) => any;
11
+ transformResponse: (inFileList: any) => any;
12
+ };
13
+ render(): React.JSX.Element;
14
+ }
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { UploadProps, ButtonProps } from 'antd';
3
+ type StdEventTarget = {
4
+ target: {
5
+ value: any;
6
+ };
7
+ };
8
+ type StdCallback = (inEvent: StdEventTarget) => void;
9
+ type CustomRequest = (inEvent: any) => Promise<any>;
10
+ type Props = {
11
+ className?: string;
12
+ value?: number;
13
+ onChange?: StdCallback;
14
+ onRequest?: CustomRequest;
15
+ btnProps?: ButtonProps;
16
+ } & UploadProps;
17
+ export declare class AcUpload extends React.Component<Props> {
18
+ static displayName: string;
19
+ static formSchema: string;
20
+ static defaultProps: {
21
+ onChange: any;
22
+ onRequest: (inEvent: any) => Promise<any>;
23
+ };
24
+ handleChange: (inEvent: any) => void;
25
+ handleCustomRequest: (inRequestOption: any) => void;
26
+ render(): React.JSX.Element;
27
+ }
28
+ export {};
package/dist/main.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ export * from './lib/breadcrumb';
2
+ export * from './lib/checkable-dropdown';
3
+ export * from './lib/checkable-tag';
4
+ export * from './lib/checkable-tag-list';
5
+ export * from './lib/checkbox';
6
+ export * from './lib/checkbox-group';
7
+ export * from './lib/codeflask';
8
+ export * from './lib/confirm-button';
9
+ export * from './lib/date-picker';
10
+ export * from './lib/editable-tag-group';
11
+ export * from './lib/input';
12
+ export * from './lib/input-hidden';
13
+ export * from './lib/input-number';
14
+ export * from './lib/input-token';
15
+ export * from './lib/pre-select';
16
+ export * from './lib/radio-group';
17
+ export * from './lib/range-picker';
18
+ export * from './lib/rate';
19
+ export * from './lib/search';
20
+ export * from './lib/select';
21
+ export * from './lib/slider';
22
+ export * from './lib/slider-range';
23
+ export * from './lib/switch';
24
+ export * from './lib/textarea';
25
+ export * from './lib/time-picker';
26
+ export * from './lib/transfer';
27
+ export * from './lib/tree';
28
+ export * from './lib/tree-select';
29
+ export * from './lib/upload-dragger';
30
+ export * from './lib/upload-picture';
31
+ export * from './lib/upload-picture-card';
32
+ export * from './lib/upload';
package/dist/style.css ADDED
@@ -0,0 +1,218 @@
1
+ @charset "UTF-8";
2
+ .ant-upload.ant-upload-dragger,
3
+ .ant-upload.ant-upload-drag {
4
+ border: 5px dashed rgba(0, 0, 0, 0.16);
5
+ border-radius: 5px;
6
+ }
7
+ .ant-upload.ant-upload-dragger:hover,
8
+ .ant-upload.ant-upload-drag:hover {
9
+ border: 5px dashed rgba(64, 169, 255, 0.8196078431);
10
+ }
11
+
12
+ .ant-dropdown-menu .ant-dropdown-menu-item .ant-dropdown-menu-title-content {
13
+ display: block;
14
+ }
15
+ .ant-dropdown-menu .ant-dropdown-menu-item .ant-dropdown-menu-title-content .ant-checkbox-wrapper {
16
+ display: flex;
17
+ }
18
+ .ant-dropdown-menu .ant-dropdown-menu-item .ant-dropdown-menu-title-content .ant-checkbox-wrapper > span:last-child {
19
+ flex: 1;
20
+ }
21
+
22
+ .react-codeflask {
23
+ width: 100%;
24
+ outline: 1px solid #ccc;
25
+ position: relative;
26
+ --codeflask-loading-size: 40px;
27
+ }
28
+ .react-codeflask__spin {
29
+ background: rgba(255, 255, 255, 0.1);
30
+ backdrop-filter: blur(2px);
31
+ position: absolute;
32
+ z-index: 1000;
33
+ width: 100%;
34
+ height: 100%;
35
+ }
36
+ .react-codeflask__spin [hidden] {
37
+ display: none;
38
+ z-index: -1;
39
+ }
40
+ .react-codeflask__spin > img {
41
+ left: 50%;
42
+ top: 50%;
43
+ position: absolute;
44
+ transform: translate(-50%, -50%);
45
+ width: var(--codeflask-loading-size);
46
+ height: var(--codeflask-loading-size);
47
+ }
48
+ .react-codeflask[disabled] > .is-editor {
49
+ opacity: 0.6;
50
+ pointer-events: none;
51
+ }
52
+ .react-codeflask > .language-name {
53
+ position: absolute;
54
+ right: 10px;
55
+ top: 0;
56
+ padding: 0.1rem 0.3rem 0.15rem;
57
+ border-bottom-left-radius: 4px;
58
+ border-bottom-right-radius: 4px;
59
+ background: #627eee;
60
+ color: #eee;
61
+ font-family: "JetBrains Mono", Monaco, monospace, sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue";
62
+ font-size: 0.7rem;
63
+ }
64
+
65
+ .ac-checkable-tag {
66
+ user-select: none;
67
+ background: #ededed;
68
+ }
69
+ .ac-checkable-tag[disabled] {
70
+ pointer-events: none;
71
+ opacity: 0.7;
72
+ }
73
+ .ac-checkable-tag.ant-tag-checkable-checked {
74
+ background: #1677ff;
75
+ }
76
+ .ac-checkable-tag > [role=img] {
77
+ margin-left: 2px;
78
+ }
79
+
80
+ .ac-checkable-tag-list {
81
+ --ac-checkable-tag-list-active-bg: #1677ff;
82
+ --ac-checkable-tag-list-inactive-bg: #ededed;
83
+ }
84
+ .ac-checkable-tag-list .ac-is-aside {
85
+ border-radius: 3px;
86
+ }
87
+ .ac-checkable-tag-list .ac-is-item {
88
+ padding: 1px 7px;
89
+ background: var(--ac-checkable-tag-list-inactive-bg);
90
+ }
91
+ .ac-checkable-tag-list .ac-is-item.ant-tag-checkable-checked {
92
+ background: var(--ac-checkable-tag-list-active-bg);
93
+ }
94
+
95
+ .ac-editable-tag-group {
96
+ display: inline-block;
97
+ }
98
+ .ac-editable-tag-group .ant-tag {
99
+ margin-bottom: 5px;
100
+ position: relative;
101
+ display: inline-flex;
102
+ align-items: center;
103
+ justify-content: space-between;
104
+ }
105
+ .ac-editable-tag-group .ant-btn {
106
+ position: relative;
107
+ padding-left: 15px;
108
+ }
109
+ .ac-editable-tag-group__input {
110
+ flex: 1;
111
+ }
112
+ .ac-editable-tag-group__input input {
113
+ border-color: transparent;
114
+ background: none;
115
+ text-align: center;
116
+ }
117
+ .ac-editable-tag-group__create {
118
+ font-size: 12px;
119
+ line-height: 22px;
120
+ }
121
+ .ac-editable-tag-group__plus {
122
+ width: 10px;
123
+ height: 10px;
124
+ opacity: 0.3;
125
+ cursor: pointer;
126
+ position: relative;
127
+ display: inline-block;
128
+ }
129
+ .ac-editable-tag-group__plus:hover {
130
+ opacity: 1;
131
+ }
132
+ .ac-editable-tag-group__plus:before, .ac-editable-tag-group__plus:after {
133
+ position: absolute;
134
+ left: 0;
135
+ content: "";
136
+ height: 10px;
137
+ width: 1px;
138
+ background-color: #333;
139
+ }
140
+ .ac-editable-tag-group__plus:before {
141
+ transform: rotate(90deg);
142
+ }
143
+ .ac-editable-tag-group__plus:after {
144
+ transform: rotate(180deg);
145
+ }
146
+ .ac-editable-tag-group__close {
147
+ position: relative;
148
+ margin-left: 3px;
149
+ width: 10px;
150
+ height: 10px;
151
+ opacity: 0.3;
152
+ cursor: pointer;
153
+ }
154
+ .ac-editable-tag-group__close:hover {
155
+ opacity: 1;
156
+ }
157
+ .ac-editable-tag-group__close:before, .ac-editable-tag-group__close:after {
158
+ position: absolute;
159
+ left: 0;
160
+ content: "";
161
+ height: 10px;
162
+ width: 1px;
163
+ background-color: #333;
164
+ }
165
+ .ac-editable-tag-group__close:before {
166
+ transform: rotate(45deg);
167
+ }
168
+ .ac-editable-tag-group__close:after {
169
+ transform: rotate(-45deg);
170
+ }
171
+
172
+ .ac-upload-picture-card {
173
+ /**
174
+ 定义 css 变量,可以改变 image-item 的大小
175
+ */
176
+ }
177
+ .ac-upload-picture-card .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
178
+ .ac-upload-picture-card .ant-upload.ant-upload-select {
179
+ --ac-upload-images-size: 102px;
180
+ border-width: 3px !important;
181
+ width: var(--ac-upload-images-size) !important;
182
+ height: var(--ac-upload-images-size) !important;
183
+ }
184
+ .ac-upload-picture-card .ant-upload-list-item-container {
185
+ user-select: none;
186
+ }
187
+ .ac-upload-picture-card .ant-upload-list-item-container:hover .ant-upload-list-item {
188
+ border-width: 2px !important;
189
+ border-style: dashed !important;
190
+ border-color: orange !important;
191
+ }
192
+ .ac-upload-picture-card__modal {
193
+ width: 800px;
194
+ text-align: center;
195
+ }
196
+ .ac-upload-picture-card__modal .is-img {
197
+ width: 100%;
198
+ height: 100%;
199
+ }
200
+
201
+ .ac-checkable-dropdown__btn {
202
+ display: inline-flex;
203
+ align-items: center;
204
+ justify-content: space-between;
205
+ }
206
+ .ac-checkable-dropdown__btn .is-label {
207
+ overflow: hidden;
208
+ text-overflow: ellipsis;
209
+ }
210
+
211
+ .ac-upload-picture {
212
+ --ac-upload-picture-height: 120px;
213
+ }
214
+
215
+ .ac-input-token__token {
216
+ user-select: none;
217
+ cursor: pointer;
218
+ }
@@ -0,0 +1,191 @@
1
+ @import "./styles/override";
2
+ @import "@jswork/react-codeflask/dist/style.scss";
3
+
4
+
5
+ .ac-checkable-tag {
6
+ user-select: none;
7
+ background: #ededed;
8
+
9
+ &[disabled] {
10
+ pointer-events: none;
11
+ opacity: 0.7;
12
+ }
13
+
14
+ &.ant-tag-checkable-checked {
15
+ background: #1677ff;
16
+ }
17
+
18
+ > [role="img"] {
19
+ margin-left: 2px;
20
+ }
21
+ }
22
+
23
+ .ac-checkable-tag-list {
24
+ --ac-checkable-tag-list-active-bg: #1677ff;
25
+ --ac-checkable-tag-list-inactive-bg: #ededed;
26
+
27
+ .ac-is-aside {
28
+ border-radius: 3px;
29
+ }
30
+
31
+ .ac-is-item {
32
+ padding: 1px 7px;
33
+ background: var(--ac-checkable-tag-list-inactive-bg);
34
+
35
+ &.ant-tag-checkable-checked {
36
+ background: var(--ac-checkable-tag-list-active-bg)
37
+ }
38
+ }
39
+ }
40
+
41
+ .ac-editable-tag-group {
42
+ display: inline-block;
43
+
44
+ .ant-tag {
45
+ margin-bottom: 5px;
46
+ position: relative;
47
+ display: inline-flex;
48
+ align-items: center;
49
+ justify-content: space-between;
50
+ }
51
+
52
+ .ant-btn {
53
+ position: relative;
54
+ padding-left: 15px;
55
+ }
56
+
57
+ &__input {
58
+ flex: 1;
59
+ input {
60
+ border-color: transparent;
61
+ background: none;
62
+ text-align: center;
63
+ }
64
+ }
65
+
66
+ &__create {
67
+ font-size: 12px;
68
+ line-height: 22px;
69
+ }
70
+
71
+ &__plus {
72
+ width: 10px;
73
+ height: 10px;
74
+ opacity: 0.3;
75
+ cursor: pointer;
76
+ position: relative;
77
+ display: inline-block;
78
+
79
+ &:hover {
80
+ opacity: 1;
81
+ }
82
+
83
+ &:before,
84
+ &:after {
85
+ position: absolute;
86
+ left: 0;
87
+ content: "";
88
+ height: 10px;
89
+ width: 1px;
90
+ background-color: #333;
91
+ }
92
+
93
+ &:before {
94
+ transform: rotate(90deg);
95
+ }
96
+
97
+ &:after {
98
+ transform: rotate(180deg);
99
+ }
100
+ }
101
+
102
+ &__close {
103
+ position: relative;
104
+ margin-left: 3px;
105
+ width: 10px;
106
+ height: 10px;
107
+ opacity: 0.3;
108
+ cursor: pointer;
109
+
110
+ &:hover {
111
+ opacity: 1;
112
+ }
113
+
114
+ &:before,
115
+ &:after {
116
+ position: absolute;
117
+ left: 0;
118
+ content: "";
119
+ height: 10px;
120
+ width: 1px;
121
+ background-color: #333;
122
+ }
123
+
124
+ &:before {
125
+ transform: rotate(45deg);
126
+ }
127
+
128
+ &:after {
129
+ transform: rotate(-45deg);
130
+ }
131
+ }
132
+ }
133
+
134
+ .ac-upload-picture-card {
135
+ /**
136
+ 定义 css 变量,可以改变 image-item 的大小
137
+ */
138
+ .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
139
+ .ant-upload.ant-upload-select {
140
+ --ac-upload-images-size: 102px;
141
+ border-width: 3px !important;
142
+ width: var(--ac-upload-images-size) !important;
143
+ height: var(--ac-upload-images-size) !important;
144
+ }
145
+
146
+ .ant-upload-list-item-container {
147
+ user-select: none;
148
+
149
+ &:hover {
150
+ .ant-upload-list-item {
151
+ border-width: 2px !important;
152
+ border-style: dashed !important;
153
+ border-color: orange !important;
154
+ }
155
+ }
156
+ }
157
+
158
+ &__modal {
159
+ width: 800px;
160
+ text-align: center;
161
+
162
+ .is-img {
163
+ width: 100%;
164
+ height: 100%;
165
+ }
166
+ }
167
+ }
168
+
169
+ .ac-checkable-dropdown {
170
+ &__btn {
171
+ display: inline-flex;
172
+ align-items: center;
173
+ justify-content: space-between;
174
+
175
+ .is-label {
176
+ overflow: hidden;
177
+ text-overflow: ellipsis;
178
+ }
179
+ }
180
+ }
181
+
182
+ .ac-upload-picture {
183
+ --ac-upload-picture-height: 120px;
184
+ }
185
+
186
+ .ac-input-token {
187
+ &__token {
188
+ user-select: none;
189
+ cursor: pointer;
190
+ }
191
+ }
@@ -0,0 +1,29 @@
1
+ // upload-dragger
2
+ // .dragger for < 5.0.0
3
+ // .drag for 5.0.0+
4
+ .ant-upload.ant-upload-dragger,
5
+ .ant-upload.ant-upload-drag {
6
+ border: 5px dashed rgb(0 0 0 / 16%);
7
+ border-radius: 5px;
8
+
9
+ &:hover {
10
+ border: 5px dashed #40a9ffd1;
11
+ }
12
+ }
13
+
14
+
15
+ .ant-dropdown-menu {
16
+ .ant-dropdown-menu-item {
17
+ .ant-dropdown-menu-title-content {
18
+ display: block;
19
+
20
+ .ant-checkbox-wrapper {
21
+ display: flex;
22
+
23
+ > span:last-child {
24
+ flex: 1;
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jswork/antd-components",
3
3
  "homepage": "https://js.work",
4
- "version": "1.0.57",
4
+ "version": "1.0.59",
5
5
  "description": "Antd wrapped components.",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
@@ -102,5 +102,5 @@
102
102
  "type": "git",
103
103
  "url": "https://github.com/afeiship/boilerplate-react-ts-component.git"
104
104
  },
105
- "gitHead": "ff023a2ded3ed7aec1fc53792274a995d6ba442f"
105
+ "gitHead": "c093c28fb4e696903b28995e4f6cb0f9839180b6"
106
106
  }