pv-design 1.0.21 → 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
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,15 +1,15 @@
|
|
|
1
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
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { ConfigProvider as
|
|
5
|
-
const
|
|
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
6
|
var r;
|
|
7
7
|
const d = {
|
|
8
8
|
titleColor: "rgba(204,204,204,0.85)",
|
|
9
9
|
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
10
10
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
11
|
+
return /* @__PURE__ */ p(
|
|
12
|
+
i,
|
|
13
13
|
{
|
|
14
14
|
prefixCls: "pv-base-modal-third",
|
|
15
15
|
theme: {
|
|
@@ -70,7 +70,7 @@ const v = ({ theme: o, ...t }) => {
|
|
|
70
70
|
}
|
|
71
71
|
` }),
|
|
72
72
|
/* @__PURE__ */ a(
|
|
73
|
-
|
|
73
|
+
m,
|
|
74
74
|
{
|
|
75
75
|
width: 780,
|
|
76
76
|
...t,
|
|
@@ -80,14 +80,14 @@ const v = ({ theme: o, ...t }) => {
|
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
},
|
|
83
|
+
}, b = ({ theme: o, ...t }) => {
|
|
84
84
|
var r;
|
|
85
85
|
const d = {
|
|
86
86
|
titleColor: "rgba(204,204,204,0.85)",
|
|
87
87
|
...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
|
|
88
88
|
};
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
|
|
89
|
+
return /* @__PURE__ */ p(
|
|
90
|
+
i,
|
|
91
91
|
{
|
|
92
92
|
prefixCls: "pv-base-modal-default",
|
|
93
93
|
theme: {
|
|
@@ -145,7 +145,7 @@ const v = ({ theme: o, ...t }) => {
|
|
|
145
145
|
}
|
|
146
146
|
` }),
|
|
147
147
|
/* @__PURE__ */ a(
|
|
148
|
-
|
|
148
|
+
m,
|
|
149
149
|
{
|
|
150
150
|
...t,
|
|
151
151
|
className: [t.className, "pv-base-modal-default-body"].join(" ")
|
|
@@ -154,27 +154,189 @@ const v = ({ theme: o, ...t }) => {
|
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
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
|
+
);
|
|
157
312
|
};
|
|
158
|
-
var c = /* @__PURE__ */ ((o) => (o[o.default = 0] = "default", o[o.third = 3] = "third", o))(c || {});
|
|
159
|
-
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 = {
|
|
160
315
|
default: 0,
|
|
161
|
-
third: 3
|
|
162
|
-
|
|
316
|
+
third: 3,
|
|
317
|
+
four: 4,
|
|
318
|
+
one: 1,
|
|
319
|
+
two: 2
|
|
320
|
+
}, B = ({ modalType: o, ...t }) => {
|
|
163
321
|
switch (o) {
|
|
164
322
|
case 0:
|
|
165
|
-
return /* @__PURE__ */ a(
|
|
323
|
+
return /* @__PURE__ */ a(b, { ...t });
|
|
324
|
+
case 2:
|
|
325
|
+
return /* @__PURE__ */ a(y, { ...t });
|
|
166
326
|
case 3:
|
|
167
|
-
return /* @__PURE__ */ a(
|
|
327
|
+
return /* @__PURE__ */ a(h, { ...t });
|
|
328
|
+
case 4:
|
|
329
|
+
return /* @__PURE__ */ a(g, { ...t });
|
|
168
330
|
default:
|
|
169
|
-
return /* @__PURE__ */ a(
|
|
331
|
+
return /* @__PURE__ */ a(b, { ...t });
|
|
170
332
|
}
|
|
171
|
-
},
|
|
333
|
+
}, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
172
334
|
__proto__: null,
|
|
173
335
|
ModalType: c,
|
|
174
|
-
ModalTypeMap:
|
|
175
|
-
default:
|
|
176
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
177
|
-
iconButton:
|
|
336
|
+
ModalTypeMap: w,
|
|
337
|
+
default: B
|
|
338
|
+
}, Symbol.toStringTag, { value: "Module" })), k = "_iconButton_1fiji_1", e = {
|
|
339
|
+
iconButton: k,
|
|
178
340
|
"iconButton-primary": "_iconButton-primary_1fiji_5",
|
|
179
341
|
"iconButton-danger": "_iconButton-danger_1fiji_8",
|
|
180
342
|
"iconButton-disable": "_iconButton-disable_1fiji_11",
|
|
@@ -182,30 +344,30 @@ const y = {
|
|
|
182
344
|
}, l = {
|
|
183
345
|
primary: "primary",
|
|
184
346
|
danger: "danger"
|
|
185
|
-
}, j = ({ children: o, onClick: t, className: d, size: r = 12, disable:
|
|
347
|
+
}, j = ({ children: o, onClick: t, className: d, size: r = 12, disable: s = !1, type: u = l.primary, block: f = !1 }) => {
|
|
186
348
|
const x = () => {
|
|
187
349
|
switch (u) {
|
|
188
350
|
case l.primary:
|
|
189
|
-
return
|
|
351
|
+
return e["iconButton-primary"];
|
|
190
352
|
case l.danger:
|
|
191
|
-
return
|
|
353
|
+
return e["iconButton-danger"];
|
|
192
354
|
}
|
|
193
|
-
},
|
|
194
|
-
|
|
355
|
+
}, v = () => {
|
|
356
|
+
s || t == null || t();
|
|
195
357
|
};
|
|
196
|
-
return /* @__PURE__ */ a("span", { className: [
|
|
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 });
|
|
197
359
|
}, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
198
360
|
__proto__: null,
|
|
199
361
|
IconButtonType: l,
|
|
200
362
|
default: j
|
|
201
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
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));
|
|
202
364
|
export {
|
|
203
|
-
|
|
204
|
-
|
|
365
|
+
$ as BaseModal,
|
|
366
|
+
I as IconButton,
|
|
205
367
|
l as IconButtonType,
|
|
206
|
-
|
|
368
|
+
w as ModalTypeMap,
|
|
207
369
|
S as PvModal,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
370
|
+
P as PvTable,
|
|
371
|
+
C as PvTabs,
|
|
372
|
+
O as ThirdModal
|
|
211
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
|
File without changes
|