pv-design 1.0.21 → 1.0.23

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. 生成API文档:npm run build:doc
28
- 6. 生成组件文档:npm run build:template
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. 进入components目录:cd components
33
- 2. 本地打包:npm run build
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. 当组件更新时,执行:npm run build
38
- 7. 当需要取消使用组件库时,执行:npm unlink pv-design
37
+ 6. 当需要取消使用组件库时,执行:npm unlink pv-design
package/dist/pv-design.js CHANGED
@@ -1,21 +1,21 @@
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 e } from "react";
3
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
4
- import { ConfigProvider as m, Modal as b } from "antd";
5
- const v = ({ theme: o, ...t }) => {
2
+ import { lazy as d } from "react";
3
+ import { jsxs as l, jsx as a } from "react/jsx-runtime";
4
+ import { ConfigProvider as p, Modal as i } from "antd";
5
+ const h = ({ theme: o, ...t }) => {
6
6
  var r;
7
- const d = {
7
+ const n = {
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__ */ s(
12
- m,
11
+ return /* @__PURE__ */ l(
12
+ p,
13
13
  {
14
14
  prefixCls: "pv-base-modal-third",
15
15
  theme: {
16
16
  ...o || {},
17
17
  components: {
18
- Modal: d
18
+ Modal: n
19
19
  }
20
20
  },
21
21
  children: [
@@ -70,7 +70,7 @@ const v = ({ theme: o, ...t }) => {
70
70
  }
71
71
  ` }),
72
72
  /* @__PURE__ */ a(
73
- b,
73
+ i,
74
74
  {
75
75
  width: 780,
76
76
  ...t,
@@ -80,20 +80,20 @@ const v = ({ theme: o, ...t }) => {
80
80
  ]
81
81
  }
82
82
  );
83
- }, p = ({ theme: o, ...t }) => {
83
+ }, b = ({ theme: o, ...t }) => {
84
84
  var r;
85
- const d = {
85
+ const n = {
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__ */ s(
90
- m,
89
+ return /* @__PURE__ */ l(
90
+ p,
91
91
  {
92
92
  prefixCls: "pv-base-modal-default",
93
93
  theme: {
94
94
  ...o || {},
95
95
  components: {
96
- Modal: d
96
+ Modal: n
97
97
  }
98
98
  },
99
99
  children: [
@@ -145,7 +145,7 @@ const v = ({ theme: o, ...t }) => {
145
145
  }
146
146
  ` }),
147
147
  /* @__PURE__ */ a(
148
- b,
148
+ i,
149
149
  {
150
150
  ...t,
151
151
  className: [t.className, "pv-base-modal-default-body"].join(" ")
@@ -154,58 +154,299 @@ const v = ({ theme: o, ...t }) => {
154
154
  ]
155
155
  }
156
156
  );
157
+ }, g = ({ theme: o, ...t }) => {
158
+ var r;
159
+ const n = {
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__ */ l(
164
+ p,
165
+ {
166
+ prefixCls: "pv-base-modal-four",
167
+ theme: {
168
+ ...o || {},
169
+ components: {
170
+ Modal: n
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
+ i,
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 n = {
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__ */ l(
241
+ p,
242
+ {
243
+ prefixCls: "pv-base-modal-two",
244
+ theme: {
245
+ ...o || {},
246
+ components: {
247
+ Modal: n
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
+ i,
303
+ {
304
+ width: 486,
305
+ ...t,
306
+ className: [t.className, "pv-base-modal-two-body"].join(" ")
307
+ }
308
+ )
309
+ ]
310
+ }
311
+ );
312
+ }, w = ({ theme: o, ...t }) => {
313
+ var r;
314
+ const n = {
315
+ titleColor: "rgba(204,204,204,0.85)",
316
+ ...((r = o == null ? void 0 : o.components) == null ? void 0 : r.Modal) || {}
317
+ };
318
+ return /* @__PURE__ */ l(
319
+ p,
320
+ {
321
+ prefixCls: "pv-base-modal-one",
322
+ theme: {
323
+ ...o || {},
324
+ components: {
325
+ Modal: n
326
+ }
327
+ },
328
+ children: [
329
+ /* @__PURE__ */ a("style", { children: `
330
+ .pv-base-modal-one-body .pv-base-modal-one-modal-content {
331
+ display: flex;
332
+ flex-direction: column;
333
+ padding: 20px 28px !important;
334
+ border-radius: 12px !important;
335
+ box-shadow: 0px 8px 48px 0px rgba(0,0,0,0.4) !important;
336
+ width: 338px !important;
337
+ min-height: 228px !important;
338
+ max-height: 580px !important;
339
+ background-color: #252526 !important;
340
+ }
341
+ .pv-base-modal-one-body .pv-base-modal-one-modal-title {
342
+ text-align: center;
343
+ height: 24px;
344
+ line-height: 24px !important;
345
+ }
346
+ .pv-base-modal-one-body .pv-base-modal-one-modal-close-icon {
347
+ color: rgba(204, 204, 204, 0.85) !important;
348
+ }
349
+ .pv-base-modal-one-body .pv-base-modal-one-modal-close {
350
+ top: 17px !important;
351
+ right: 20px !important;
352
+ }
353
+ .pv-base-modal-one-body .pv-base-modal-one-modal-header {
354
+ margin-bottom: 20px !important;
355
+ background-color: transparent !important;
356
+ }
357
+ .pv-base-modal-one-body .pv-base-modal-one-modal-body {
358
+ display: flex;
359
+ flex: 1;
360
+ overflow: hidden;
361
+ }
362
+ .pv-base-modal-one-body .pv-base-modal-one-modal-footer {
363
+ margin-top: 20px !important;
364
+ }
365
+ .pv-base-modal-one-body .pv-base-modal-one-modal-footer{
366
+ button:nth-of-type(1) {
367
+ background: transparent;
368
+ }
369
+ button:nth-of-type(1):hover {
370
+ background-color: transparent !important;
371
+ border: 1px solid #4B4A4A !important;
372
+ color: #d9d9d9 !important;
373
+ }
374
+ button {
375
+ font-size: 12px;
376
+ }
377
+ }
378
+ ` }),
379
+ /* @__PURE__ */ a(
380
+ i,
381
+ {
382
+ ...t,
383
+ className: [t.className, "pv-base-modal-one-body"].join(" ")
384
+ }
385
+ )
386
+ ]
387
+ }
388
+ );
157
389
  };
158
- var c = /* @__PURE__ */ ((o) => (o[o.default = 0] = "default", o[o.third = 3] = "third", o))(c || {});
159
- const y = {
390
+ 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 || {});
391
+ const B = {
160
392
  default: 0,
161
- third: 3
162
- }, g = ({ modalType: o, ...t }) => {
393
+ third: 3,
394
+ four: 4,
395
+ one: 1,
396
+ two: 2
397
+ }, _ = ({ modalType: o, ...t }) => {
163
398
  switch (o) {
164
399
  case 0:
165
- return /* @__PURE__ */ a(p, { ...t });
400
+ return /* @__PURE__ */ a(b, { ...t });
401
+ case 1:
402
+ return /* @__PURE__ */ a(w, { ...t });
403
+ case 2:
404
+ return /* @__PURE__ */ a(y, { ...t });
166
405
  case 3:
167
- return /* @__PURE__ */ a(v, { ...t });
406
+ return /* @__PURE__ */ a(h, { ...t });
407
+ case 4:
408
+ return /* @__PURE__ */ a(g, { ...t });
168
409
  default:
169
- return /* @__PURE__ */ a(p, { ...t });
410
+ return /* @__PURE__ */ a(b, { ...t });
170
411
  }
171
- }, B = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
+ }, k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
172
413
  __proto__: null,
173
414
  ModalType: c,
174
- ModalTypeMap: y,
175
- default: g
176
- }, Symbol.toStringTag, { value: "Module" })), _ = "_iconButton_1fiji_1", n = {
177
- iconButton: _,
415
+ ModalTypeMap: B,
416
+ default: _
417
+ }, Symbol.toStringTag, { value: "Module" })), j = "_iconButton_1fiji_1", e = {
418
+ iconButton: j,
178
419
  "iconButton-primary": "_iconButton-primary_1fiji_5",
179
420
  "iconButton-danger": "_iconButton-danger_1fiji_8",
180
421
  "iconButton-disable": "_iconButton-disable_1fiji_11",
181
422
  "iconButton-block": "_iconButton-block_1fiji_18"
182
- }, l = {
423
+ }, m = {
183
424
  primary: "primary",
184
425
  danger: "danger"
185
- }, j = ({ children: o, onClick: t, className: d, size: r = 12, disable: i = !1, type: u = l.primary, block: f = !1 }) => {
186
- const x = () => {
426
+ }, M = ({ children: o, onClick: t, className: n, size: r = 12, disable: s = !1, type: u = m.primary, block: x = !1 }) => {
427
+ const f = () => {
187
428
  switch (u) {
188
- case l.primary:
189
- return n["iconButton-primary"];
190
- case l.danger:
191
- return n["iconButton-danger"];
429
+ case m.primary:
430
+ return e["iconButton-primary"];
431
+ case m.danger:
432
+ return e["iconButton-danger"];
192
433
  }
193
- }, h = () => {
194
- i || t == null || t();
434
+ }, v = () => {
435
+ s || t == null || t();
195
436
  };
196
- return /* @__PURE__ */ a("span", { className: [n.iconButton, d, i && n["iconButton-disable"], x(), f && n["iconButton-block"]].join(" "), onClick: h, style: { fontSize: `${r}px` }, children: o });
197
- }, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
437
+ return /* @__PURE__ */ a("span", { className: [e.iconButton, n, s ? e["iconButton-disable"] : "", f(), x ? e["iconButton-block"] : ""].join(" "), onClick: v, style: { fontSize: `${r}px` }, children: o });
438
+ }, N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
198
439
  __proto__: null,
199
- IconButtonType: l,
200
- default: j
201
- }, Symbol.toStringTag, { value: "Module" })), z = e(() => import("./index-C5hvxSxS.js")), N = e(() => import("./index-Dyq3zBZo.js")), S = e(() => import("./index-FYoViA-E.js")), T = e(() => import("./index-CaYRL7KG.js")), A = e(() => Promise.resolve().then(() => B)), C = e(() => Promise.resolve().then(() => M));
440
+ IconButtonType: m,
441
+ default: M
442
+ }, Symbol.toStringTag, { value: "Module" })), P = d(() => import("./index-C5hvxSxS.js")), O = d(() => import("./index-Dyq3zBZo.js")), S = d(() => import("./index-FYoViA-E.js")), $ = d(() => import("./index-CaYRL7KG.js")), I = d(() => Promise.resolve().then(() => k)), D = d(() => Promise.resolve().then(() => N));
202
443
  export {
203
- A as BaseModal,
204
- C as IconButton,
205
- l as IconButtonType,
206
- y as ModalTypeMap,
444
+ I as BaseModal,
445
+ D as IconButton,
446
+ m as IconButtonType,
447
+ B as ModalTypeMap,
207
448
  S as PvModal,
208
- N as PvTable,
209
- z as PvTabs,
210
- T as ThirdModal
449
+ O as PvTable,
450
+ P as PvTabs,
451
+ $ as ThirdModal
211
452
  };
@@ -0,0 +1,7 @@
1
+ import type { ModalProps, ThemeConfig } from 'antd';
2
+ import React from 'react';
3
+ export interface ExtendedModalProps extends ModalProps {
4
+ theme?: ThemeConfig;
5
+ }
6
+ declare const FourModal: React.FC<ExtendedModalProps>;
7
+ export default FourModal;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import type { ModalProps, ThemeConfig } from 'antd';
2
+ import React from 'react';
3
+ export interface ExtendedModalProps extends ModalProps {
4
+ theme?: ThemeConfig;
5
+ }
6
+ declare const OneModal: React.FC<ExtendedModalProps>;
7
+ export default OneModal;
@@ -0,0 +1,7 @@
1
+ import type { ModalProps, ThemeConfig } from 'antd';
2
+ import React from 'react';
3
+ export interface ExtendedModalProps extends ModalProps {
4
+ theme?: ThemeConfig;
5
+ }
6
+ declare const TwoModal: React.FC<ExtendedModalProps>;
7
+ export default TwoModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pv-design",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "pvmed ui design",
5
5
  "type": "module",
6
6
  "main": "./dist/pv-design.js",