pv-design 1.0.20 → 1.0.22
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/README.md +6 -7
- package/dist/pv-design.js +213 -50
- package/dist/types/baseModal/four/index.d.ts +7 -0
- package/dist/types/baseModal/index.d.ts +7 -1
- package/dist/types/baseModal/two/index.d.ts +7 -0
- package/package.json +1 -1
- package/dist/style.css +0 -1
- /package/dist/types/baseModal/{third → three}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -23,16 +23,15 @@
|
|
|
23
23
|
1. 创建组件:在 /components 目录下创建组件文件夹和文件。
|
|
24
24
|
2. 编写文档:在 /src/template 目录下为每个组件编写使用文档(目录名称与components下的一致)。
|
|
25
25
|
3. 组件命名约束:使用Pv拼接组件名,如:PvTabs
|
|
26
|
-
4. 编译组件:npm run build
|
|
27
|
-
5.
|
|
28
|
-
6.
|
|
26
|
+
4. 编译组件:npm run build:watch,确保组件库的实时更新。
|
|
27
|
+
5. 可以在template目录下查看组件的demo,确保组件的正常使用。
|
|
28
|
+
6. 确保没问题后在stories下添加组件的stories,确保组件的正常展示。
|
|
29
29
|
7. 发布组件库:使用 npm publish 发布
|
|
30
30
|
|
|
31
31
|
### 本地调试 link
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
32
|
+
1. 为了确保开发过程中可能会更新组件,所以先在终端执行npm run build:watch,确保组件库的实时更新。
|
|
33
|
+
2. 进入components目录:cd components
|
|
34
34
|
3. 链接组件库:npm link
|
|
35
35
|
4. 在其他项目中使用组件库:npm link pv-design
|
|
36
36
|
5. 后续正常的使用组件库和开发即可
|
|
37
|
-
6.
|
|
38
|
-
7. 当需要取消使用组件库时,执行:npm unlink pv-design
|
|
37
|
+
6. 当需要取消使用组件库时,执行:npm unlink pv-design
|
package/dist/pv-design.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._iconButton_1fiji_1{color:#9d9d9d;cursor:pointer}._iconButton_1fiji_1._iconButton-primary_1fiji_5:hover{color:#2777e5}._iconButton_1fiji_1._iconButton-danger_1fiji_8:hover{color:#dc4446}._iconButton_1fiji_1._iconButton-disable_1fiji_11{color:#4f4f4f!important;cursor:not-allowed}._iconButton_1fiji_1._iconButton-disable_1fiji_11:hover{color:#4f4f4f!important}._iconButton_1fiji_1._iconButton-block_1fiji_18{display:block}")),document.head.appendChild(o)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
import { lazy as n } from "react";
|
|
3
|
+
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { ConfigProvider as i, Modal as m } from "antd";
|
|
5
|
+
const h = ({ theme: o, ...t }) => {
|
|
6
|
+
var r;
|
|
7
|
+
const d = {
|
|
7
8
|
titleColor: "rgba(204,204,204,0.85)",
|
|
8
|
-
...((
|
|
9
|
+
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
9
10
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
11
|
+
return /* @__PURE__ */ p(
|
|
12
|
+
i,
|
|
12
13
|
{
|
|
13
14
|
prefixCls: "pv-base-modal-third",
|
|
14
15
|
theme: {
|
|
15
16
|
...o || {},
|
|
16
17
|
components: {
|
|
17
|
-
Modal:
|
|
18
|
+
Modal: d
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
children: [
|
|
@@ -69,7 +70,7 @@ const v = ({ theme: o, ...t }) => {
|
|
|
69
70
|
}
|
|
70
71
|
` }),
|
|
71
72
|
/* @__PURE__ */ a(
|
|
72
|
-
|
|
73
|
+
m,
|
|
73
74
|
{
|
|
74
75
|
width: 780,
|
|
75
76
|
...t,
|
|
@@ -79,20 +80,20 @@ const v = ({ theme: o, ...t }) => {
|
|
|
79
80
|
]
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
|
-
},
|
|
83
|
-
var
|
|
84
|
-
const
|
|
83
|
+
}, b = ({ theme: o, ...t }) => {
|
|
84
|
+
var r;
|
|
85
|
+
const d = {
|
|
85
86
|
titleColor: "rgba(204,204,204,0.85)",
|
|
86
|
-
...((
|
|
87
|
+
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
87
88
|
};
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
|
|
89
|
+
return /* @__PURE__ */ p(
|
|
90
|
+
i,
|
|
90
91
|
{
|
|
91
92
|
prefixCls: "pv-base-modal-default",
|
|
92
93
|
theme: {
|
|
93
94
|
...o || {},
|
|
94
95
|
components: {
|
|
95
|
-
Modal:
|
|
96
|
+
Modal: d
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
children: [
|
|
@@ -144,7 +145,7 @@ const v = ({ theme: o, ...t }) => {
|
|
|
144
145
|
}
|
|
145
146
|
` }),
|
|
146
147
|
/* @__PURE__ */ a(
|
|
147
|
-
|
|
148
|
+
m,
|
|
148
149
|
{
|
|
149
150
|
...t,
|
|
150
151
|
className: [t.className, "pv-base-modal-default-body"].join(" ")
|
|
@@ -153,58 +154,220 @@ const v = ({ theme: o, ...t }) => {
|
|
|
153
154
|
]
|
|
154
155
|
}
|
|
155
156
|
);
|
|
157
|
+
}, g = ({ theme: o, ...t }) => {
|
|
158
|
+
var r;
|
|
159
|
+
const d = {
|
|
160
|
+
titleColor: "rgba(204,204,204,0.85)",
|
|
161
|
+
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
162
|
+
};
|
|
163
|
+
return /* @__PURE__ */ p(
|
|
164
|
+
i,
|
|
165
|
+
{
|
|
166
|
+
prefixCls: "pv-base-modal-four",
|
|
167
|
+
theme: {
|
|
168
|
+
...o || {},
|
|
169
|
+
components: {
|
|
170
|
+
Modal: d
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ a("style", { children: `
|
|
175
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-content {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
padding: 20px 28px !important;
|
|
179
|
+
border-radius: 12px !important;
|
|
180
|
+
box-shadow: 0px 8px 48px 0px rgba(0,0,0,0.4) !important;
|
|
181
|
+
width: 1052px !important;
|
|
182
|
+
height: 682px !important;
|
|
183
|
+
background-color: #252526 !important;
|
|
184
|
+
}
|
|
185
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-title {
|
|
186
|
+
text-align: center;
|
|
187
|
+
height: 24px;
|
|
188
|
+
line-height: 24px !important;
|
|
189
|
+
}
|
|
190
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-close-icon {
|
|
191
|
+
color: rgba(204, 204, 204, 0.85) !important;
|
|
192
|
+
}
|
|
193
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-close {
|
|
194
|
+
top: 17px !important;
|
|
195
|
+
right: 20px !important;
|
|
196
|
+
}
|
|
197
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-header {
|
|
198
|
+
margin-bottom: 20px !important;
|
|
199
|
+
background-color: transparent !important;
|
|
200
|
+
}
|
|
201
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-body {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex: 1;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-footer {
|
|
207
|
+
margin-top: 20px !important;
|
|
208
|
+
}
|
|
209
|
+
.pv-base-modal-four-body .pv-base-modal-four-modal-footer{
|
|
210
|
+
button:nth-of-type(1) {
|
|
211
|
+
background: transparent;
|
|
212
|
+
}
|
|
213
|
+
button:nth-of-type(1):hover {
|
|
214
|
+
background-color: transparent !important;
|
|
215
|
+
border: 1px solid #4B4A4A !important;
|
|
216
|
+
color: #d9d9d9 !important;
|
|
217
|
+
}
|
|
218
|
+
button {
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
` }),
|
|
223
|
+
/* @__PURE__ */ a(
|
|
224
|
+
m,
|
|
225
|
+
{
|
|
226
|
+
width: 1052,
|
|
227
|
+
...t,
|
|
228
|
+
className: [t.className, "pv-base-modal-four-body"].join(" ")
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}, y = ({ theme: o, ...t }) => {
|
|
235
|
+
var r;
|
|
236
|
+
const d = {
|
|
237
|
+
titleColor: "rgba(204,204,204,0.85)",
|
|
238
|
+
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
239
|
+
};
|
|
240
|
+
return /* @__PURE__ */ p(
|
|
241
|
+
i,
|
|
242
|
+
{
|
|
243
|
+
prefixCls: "pv-base-modal-two",
|
|
244
|
+
theme: {
|
|
245
|
+
...o || {},
|
|
246
|
+
components: {
|
|
247
|
+
Modal: d
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ a("style", { children: `
|
|
252
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-content {
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-direction: column;
|
|
255
|
+
padding: 20px 28px !important;
|
|
256
|
+
border-radius: 12px !important;
|
|
257
|
+
box-shadow: 0px 8px 48px 0px rgba(0,0,0,0.4) !important;
|
|
258
|
+
min-height: 362px !important;
|
|
259
|
+
max-height: 580px !important;
|
|
260
|
+
width: 486px !important;
|
|
261
|
+
background-color: #252526 !important;
|
|
262
|
+
}
|
|
263
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-title {
|
|
264
|
+
text-align: center;
|
|
265
|
+
height: 24px;
|
|
266
|
+
line-height: 24px !important;
|
|
267
|
+
}
|
|
268
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-close-icon {
|
|
269
|
+
color: rgba(204, 204, 204, 0.85) !important;
|
|
270
|
+
}
|
|
271
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-close {
|
|
272
|
+
top: 17px !important;
|
|
273
|
+
right: 20px !important;
|
|
274
|
+
}
|
|
275
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-header {
|
|
276
|
+
margin-bottom: 20px !important;
|
|
277
|
+
background-color: transparent !important;
|
|
278
|
+
}
|
|
279
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-body {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex: 1;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
}
|
|
284
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-footer {
|
|
285
|
+
margin-top: 20px !important;
|
|
286
|
+
}
|
|
287
|
+
.pv-base-modal-two-body .pv-base-modal-two-modal-footer{
|
|
288
|
+
button:nth-of-type(1) {
|
|
289
|
+
background: transparent;
|
|
290
|
+
}
|
|
291
|
+
button:nth-of-type(1):hover {
|
|
292
|
+
background-color: transparent !important;
|
|
293
|
+
border: 1px solid #4B4A4A !important;
|
|
294
|
+
color: #d9d9d9 !important;
|
|
295
|
+
}
|
|
296
|
+
button {
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
` }),
|
|
301
|
+
/* @__PURE__ */ a(
|
|
302
|
+
m,
|
|
303
|
+
{
|
|
304
|
+
width: 486,
|
|
305
|
+
...t,
|
|
306
|
+
className: [t.className, "pv-base-modal-two-body"].join(" ")
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
);
|
|
156
312
|
};
|
|
157
|
-
var c = /* @__PURE__ */ ((o) => (o[o.default = 0] = "default", o[o.third = 3] = "third", o))(c || {});
|
|
158
|
-
const
|
|
313
|
+
var c = /* @__PURE__ */ ((o) => (o[o.default = 0] = "default", o[o.third = 3] = "third", o[o.four = 4] = "four", o[o.one = 1] = "one", o[o.two = 2] = "two", o))(c || {});
|
|
314
|
+
const w = {
|
|
159
315
|
default: 0,
|
|
160
|
-
third: 3
|
|
161
|
-
|
|
316
|
+
third: 3,
|
|
317
|
+
four: 4,
|
|
318
|
+
one: 1,
|
|
319
|
+
two: 2
|
|
320
|
+
}, B = ({ modalType: o, ...t }) => {
|
|
162
321
|
switch (o) {
|
|
163
322
|
case 0:
|
|
164
|
-
return /* @__PURE__ */ a(
|
|
323
|
+
return /* @__PURE__ */ a(b, { ...t });
|
|
324
|
+
case 2:
|
|
325
|
+
return /* @__PURE__ */ a(y, { ...t });
|
|
165
326
|
case 3:
|
|
166
|
-
return /* @__PURE__ */ a(
|
|
327
|
+
return /* @__PURE__ */ a(h, { ...t });
|
|
328
|
+
case 4:
|
|
329
|
+
return /* @__PURE__ */ a(g, { ...t });
|
|
167
330
|
default:
|
|
168
|
-
return /* @__PURE__ */ a(
|
|
331
|
+
return /* @__PURE__ */ a(b, { ...t });
|
|
169
332
|
}
|
|
170
333
|
}, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
171
334
|
__proto__: null,
|
|
172
335
|
ModalType: c,
|
|
173
|
-
ModalTypeMap:
|
|
174
|
-
default:
|
|
175
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
176
|
-
iconButton:
|
|
177
|
-
"iconButton-primary": "
|
|
178
|
-
"iconButton-danger": "
|
|
179
|
-
"iconButton-disable": "
|
|
180
|
-
"iconButton-block": "
|
|
336
|
+
ModalTypeMap: w,
|
|
337
|
+
default: B
|
|
338
|
+
}, Symbol.toStringTag, { value: "Module" })), k = "_iconButton_1fiji_1", e = {
|
|
339
|
+
iconButton: k,
|
|
340
|
+
"iconButton-primary": "_iconButton-primary_1fiji_5",
|
|
341
|
+
"iconButton-danger": "_iconButton-danger_1fiji_8",
|
|
342
|
+
"iconButton-disable": "_iconButton-disable_1fiji_11",
|
|
343
|
+
"iconButton-block": "_iconButton-block_1fiji_18"
|
|
181
344
|
}, l = {
|
|
182
345
|
primary: "primary",
|
|
183
346
|
danger: "danger"
|
|
184
|
-
},
|
|
347
|
+
}, j = ({ children: o, onClick: t, className: d, size: r = 12, disable: s = !1, type: u = l.primary, block: f = !1 }) => {
|
|
185
348
|
const x = () => {
|
|
186
349
|
switch (u) {
|
|
187
350
|
case l.primary:
|
|
188
|
-
return
|
|
351
|
+
return e["iconButton-primary"];
|
|
189
352
|
case l.danger:
|
|
190
|
-
return
|
|
353
|
+
return e["iconButton-danger"];
|
|
191
354
|
}
|
|
192
|
-
},
|
|
193
|
-
|
|
355
|
+
}, v = () => {
|
|
356
|
+
s || t == null || t();
|
|
194
357
|
};
|
|
195
|
-
return /* @__PURE__ */ a("span", { className: [
|
|
196
|
-
},
|
|
358
|
+
return /* @__PURE__ */ a("span", { className: [e.iconButton, d, s ? e["iconButton-disable"] : "", x(), f ? e["iconButton-block"] : ""].join(" "), onClick: v, style: { fontSize: `${r}px` }, children: o });
|
|
359
|
+
}, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
197
360
|
__proto__: null,
|
|
198
361
|
IconButtonType: l,
|
|
199
|
-
default:
|
|
200
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
362
|
+
default: j
|
|
363
|
+
}, Symbol.toStringTag, { value: "Module" })), C = n(() => import("./index-C5hvxSxS.js")), P = n(() => import("./index-Dyq3zBZo.js")), S = n(() => import("./index-FYoViA-E.js")), O = n(() => import("./index-CaYRL7KG.js")), $ = n(() => Promise.resolve().then(() => _)), I = n(() => Promise.resolve().then(() => M));
|
|
201
364
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
365
|
+
$ as BaseModal,
|
|
366
|
+
I as IconButton,
|
|
204
367
|
l as IconButtonType,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
368
|
+
w as ModalTypeMap,
|
|
369
|
+
S as PvModal,
|
|
370
|
+
P as PvTable,
|
|
371
|
+
C as PvTabs,
|
|
372
|
+
O as ThirdModal
|
|
210
373
|
};
|
|
@@ -2,11 +2,17 @@ import type { ModalProps, ThemeConfig } from 'antd';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare enum ModalType {
|
|
4
4
|
'default' = 0,
|
|
5
|
-
'third' = 3
|
|
5
|
+
'third' = 3,
|
|
6
|
+
'four' = 4,
|
|
7
|
+
'one' = 1,
|
|
8
|
+
'two' = 2
|
|
6
9
|
}
|
|
7
10
|
export declare const ModalTypeMap: {
|
|
8
11
|
default: number;
|
|
9
12
|
third: number;
|
|
13
|
+
four: number;
|
|
14
|
+
one: number;
|
|
15
|
+
two: number;
|
|
10
16
|
};
|
|
11
17
|
export interface ExtendedModalProps extends ModalProps {
|
|
12
18
|
theme?: ThemeConfig;
|
package/package.json
CHANGED
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.index-module__iconButton__Y5V-H{color:#9d9d9d;cursor:pointer}.index-module__iconButton__Y5V-H.index-module__iconButton-primary__NAYmJ:hover{color:#2777e5}.index-module__iconButton__Y5V-H.index-module__iconButton-danger__8mavX:hover{color:#dc4446}.index-module__iconButton__Y5V-H.index-module__iconButton-disable__F-gC-{color:#4f4f4f!important;cursor:not-allowed}.index-module__iconButton__Y5V-H.index-module__iconButton-disable__F-gC-:hover{color:#4f4f4f!important}.index-module__iconButton__Y5V-H.index-module__iconButton-block__yXYYN{display:block}
|
|
File without changes
|