@next-bricks/presentational 1.1.2 → 1.2.0

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.
@@ -175,56 +175,6 @@
175
175
  "description": "代码展示",
176
176
  "category": "display-component"
177
177
  },
178
- {
179
- "name": "eo-pagination",
180
- "properties": [
181
- {
182
- "name": "total",
183
- "description": "数据总数",
184
- "default": "0",
185
- "type": "number"
186
- },
187
- {
188
- "name": "page",
189
- "description": "当前页数",
190
- "default": "1",
191
- "type": "number"
192
- },
193
- {
194
- "name": "pageSize",
195
- "description": "每页条数",
196
- "default": "20",
197
- "type": "number"
198
- },
199
- {
200
- "name": "pageSizeOptions",
201
- "description": "指定每页可以显示多少条",
202
- "default": "[10, 20, 50, 100]",
203
- "attribute": false,
204
- "type": "number[]"
205
- },
206
- {
207
- "name": "showSizeChanger",
208
- "description": "是否展示`pageSize`分页器",
209
- "default": "true",
210
- "type": "boolean"
211
- }
212
- ],
213
- "events": [
214
- {
215
- "name": "change",
216
- "description": "页码及每页条数改变事件",
217
- "detail": {
218
- "type": "{ page: number; pageSize: number }"
219
- }
220
- }
221
- ],
222
- "slots": [],
223
- "methods": [],
224
- "parts": [],
225
- "description": "分页",
226
- "category": "navigation"
227
- },
228
178
  {
229
179
  "name": "eo-card-item",
230
180
  "properties": [
@@ -302,9 +252,22 @@
302
252
  "name": "avatarPosition",
303
253
  "description": "图标是否放置在卡片封面",
304
254
  "type": "\"content\" | \"cover\""
255
+ },
256
+ {
257
+ "name": "tagConfig",
258
+ "attribute": false,
259
+ "type": "TagConfig"
260
+ }
261
+ ],
262
+ "events": [
263
+ {
264
+ "name": "tag.click",
265
+ "description": "徽标点击事件",
266
+ "detail": {
267
+ "type": "void"
268
+ }
305
269
  }
306
270
  ],
307
- "events": [],
308
271
  "slots": [
309
272
  {
310
273
  "name": "expanded-area-1",
@@ -320,6 +283,56 @@
320
283
  "description": "信息类卡片 —— 通用卡片",
321
284
  "category": "card-info"
322
285
  },
286
+ {
287
+ "name": "eo-pagination",
288
+ "properties": [
289
+ {
290
+ "name": "total",
291
+ "description": "数据总数",
292
+ "default": "0",
293
+ "type": "number"
294
+ },
295
+ {
296
+ "name": "page",
297
+ "description": "当前页数",
298
+ "default": "1",
299
+ "type": "number"
300
+ },
301
+ {
302
+ "name": "pageSize",
303
+ "description": "每页条数",
304
+ "default": "20",
305
+ "type": "number"
306
+ },
307
+ {
308
+ "name": "pageSizeOptions",
309
+ "description": "指定每页可以显示多少条",
310
+ "default": "[10, 20, 50, 100]",
311
+ "attribute": false,
312
+ "type": "number[]"
313
+ },
314
+ {
315
+ "name": "showSizeChanger",
316
+ "description": "是否展示`pageSize`分页器",
317
+ "default": "true",
318
+ "type": "boolean"
319
+ }
320
+ ],
321
+ "events": [
322
+ {
323
+ "name": "change",
324
+ "description": "页码及每页条数改变事件",
325
+ "detail": {
326
+ "type": "{ page: number; pageSize: number }"
327
+ }
328
+ }
329
+ ],
330
+ "slots": [],
331
+ "methods": [],
332
+ "parts": [],
333
+ "description": "分页",
334
+ "category": "navigation"
335
+ },
323
336
  {
324
337
  "name": "eo-divider",
325
338
  "properties": [
package/dist/types.json CHANGED
@@ -358,9 +358,29 @@
358
358
  }
359
359
  ]
360
360
  }
361
+ },
362
+ {
363
+ "name": "tagConfig",
364
+ "annotation": {
365
+ "type": "reference",
366
+ "typeName": {
367
+ "type": "identifier",
368
+ "name": "TagConfig"
369
+ }
370
+ }
371
+ }
372
+ ],
373
+ "events": [
374
+ {
375
+ "name": "tag.click",
376
+ "detail": {
377
+ "annotation": {
378
+ "type": "keyword",
379
+ "value": "void"
380
+ }
381
+ }
361
382
  }
362
383
  ],
363
- "events": [],
364
384
  "methods": [],
365
385
  "types": [
366
386
  {
@@ -547,6 +567,67 @@
547
567
  "computed": false
548
568
  }
549
569
  ]
570
+ },
571
+ {
572
+ "type": "interface",
573
+ "name": "TagConfig",
574
+ "body": [
575
+ {
576
+ "type": "propertySignature",
577
+ "key": {
578
+ "type": "identifier",
579
+ "name": "text"
580
+ },
581
+ "annotation": {
582
+ "type": "keyword",
583
+ "value": "string"
584
+ },
585
+ "optional": true,
586
+ "computed": false
587
+ },
588
+ {
589
+ "type": "propertySignature",
590
+ "key": {
591
+ "type": "identifier",
592
+ "name": "icon"
593
+ },
594
+ "annotation": {
595
+ "type": "reference",
596
+ "typeName": {
597
+ "type": "identifier",
598
+ "name": "GeneralIconProps"
599
+ }
600
+ },
601
+ "optional": true,
602
+ "computed": false
603
+ },
604
+ {
605
+ "type": "propertySignature",
606
+ "key": {
607
+ "type": "identifier",
608
+ "name": "bgColor"
609
+ },
610
+ "annotation": {
611
+ "type": "keyword",
612
+ "value": "string"
613
+ },
614
+ "optional": true,
615
+ "computed": false
616
+ },
617
+ {
618
+ "type": "propertySignature",
619
+ "key": {
620
+ "type": "identifier",
621
+ "name": "color"
622
+ },
623
+ "annotation": {
624
+ "type": "keyword",
625
+ "value": "string"
626
+ },
627
+ "optional": true,
628
+ "computed": false
629
+ }
630
+ ]
550
631
  }
551
632
  ]
552
633
  },
@@ -20,6 +20,24 @@ interface ImgAvatar {
20
20
  shape?: "circle" | "square" | "round-square";
21
21
  bgColor?: string;
22
22
  }
23
+ interface TagConfig {
24
+ text?: string;
25
+ icon?: GeneralIconProps;
26
+ bgColor?: string;
27
+ color?: string;
28
+ }
29
+ export declare enum TagColor {
30
+ blue = "blue",
31
+ cyan = "cyan",
32
+ geekblue = "geekblue",
33
+ grayblue = "grayblue",
34
+ gray = "gray",
35
+ green = "green",
36
+ orange = "orange",
37
+ purple = "purple",
38
+ red = "red",
39
+ yellow = "yellow"
40
+ }
23
41
  export interface EoCardItemProps {
24
42
  hasHeader?: boolean;
25
43
  cardTitle: string;
@@ -36,6 +54,7 @@ export interface EoCardItemProps {
36
54
  hasCover?: boolean;
37
55
  coverImage?: string;
38
56
  coverColor?: string;
57
+ tagConfig?: TagConfig;
39
58
  avatarPosition?: "content" | "cover";
40
59
  }
41
60
  /**
@@ -102,6 +121,7 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
102
121
  * 图标是否放置在卡片封面
103
122
  */
104
123
  accessor avatarPosition: "content" | "cover";
124
+ accessor tagConfig: TagConfig | undefined;
105
125
  /**
106
126
  * 是否有扩展区域 1
107
127
  * @internal
@@ -117,6 +137,7 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
117
137
  interface EoCardItemComponentProps extends EoCardItemProps {
118
138
  callback?: Ref<HTMLDivElement>;
119
139
  onActionClick?: (action: SimpleActionType) => void;
140
+ onTagClick?: () => void;
120
141
  }
121
142
  export declare function EoCardItemComponent(props: EoCardItemComponentProps): React.JSX.Element;
122
143
  export {};
@@ -251,3 +251,167 @@ properties:
251
251
  icon: monitor
252
252
  size: 20
253
253
  ```
254
+
255
+ ### Tag
256
+
257
+ ```yaml preview
258
+ - brick: div
259
+ properties:
260
+ textContent: Text Tag
261
+ style:
262
+ marginBottom: 10px
263
+ - brick: eo-grid-layout
264
+ properties:
265
+ gap: 16px
266
+ columns: 4
267
+ children:
268
+ - brick: eo-card-item
269
+ properties:
270
+ tagConfig:
271
+ text: 禁用
272
+ bgColor: gray
273
+ cardTitle: 资源监控微应用
274
+ description: 资源监控微应用相关前后台
275
+ - brick: eo-card-item
276
+ properties:
277
+ tagConfig:
278
+ text: 蓝色
279
+ bgColor: blue
280
+ cardTitle: 资源监控微应用
281
+ description: 资源监控微应用相关前后台
282
+ - brick: eo-card-item
283
+ properties:
284
+ tagConfig:
285
+ text: 绿色
286
+ bgColor: green
287
+ cardTitle: 资源监控微应用
288
+ description: 资源监控微应用相关前后台
289
+ - brick: eo-card-item
290
+ properties:
291
+ tagConfig:
292
+ text: 黄色
293
+ bgColor: yellow
294
+ cardTitle: 资源监控微应用
295
+ description: 资源监控微应用相关前后台
296
+ - brick: eo-card-item
297
+ properties:
298
+ tagConfig:
299
+ text: 红色
300
+ bgColor: red
301
+ cardTitle: 资源监控微应用
302
+ description: 资源监控微应用相关前后台
303
+ - brick: eo-card-item
304
+ properties:
305
+ tagConfig:
306
+ text: 青色
307
+ bgColor: cyan
308
+ cardTitle: 资源监控微应用
309
+ description: 资源监控微应用相关前后台
310
+ - brick: eo-card-item
311
+ properties:
312
+ tagConfig:
313
+ text: 灰蓝色
314
+ bgColor: grayblue
315
+ cardTitle: 资源监控微应用
316
+ description: 资源监控微应用相关前后台
317
+ - brick: eo-card-item
318
+ properties:
319
+ tagConfig:
320
+ text: 紫色
321
+ bgColor: purple
322
+ cardTitle: 资源监控微应用
323
+ description: 资源监控微应用相关前后台
324
+ - brick: eo-card-item
325
+ properties:
326
+ tagConfig:
327
+ text: 自定义
328
+ bgColor: "rgb(228 236 183)"
329
+ color: "#000"
330
+ cardTitle: 资源监控微应用
331
+ description: 资源监控微应用相关前后台
332
+ - brick: div
333
+ properties:
334
+ textContent: Icon Tag
335
+ style:
336
+ margin: 10px
337
+ - brick: eo-grid-layout
338
+ properties:
339
+ gap: 16px
340
+ columns: 4
341
+ children:
342
+ - brick: eo-card-item
343
+ properties:
344
+ tagConfig:
345
+ icon:
346
+ lib: antd
347
+ icon: info-circle
348
+ theme: outlined
349
+ bgColor: blue
350
+ cardTitle: 资源监控微应用
351
+ description: 资源监控微应用相关前后台
352
+ url: /test
353
+ target: _blank
354
+ - brick: eo-card-item
355
+ properties:
356
+ tagConfig:
357
+ icon:
358
+ lib: antd
359
+ icon: check-circle
360
+ theme: outlined
361
+ bgColor: green
362
+ cardTitle: 资源监控微应用
363
+ description: 资源监控微应用相关前后台
364
+ url: /test
365
+ target: _blank
366
+ - brick: eo-card-item
367
+ properties:
368
+ tagConfig:
369
+ icon:
370
+ lib: antd
371
+ icon: info-circle
372
+ theme: outlined
373
+ bgColor: yellow
374
+ cardTitle: 资源监控微应用
375
+ description: 资源监控微应用相关前后台
376
+ url: /test
377
+ target: _blank
378
+ - brick: eo-card-item
379
+ properties:
380
+ tagConfig:
381
+ icon:
382
+ lib: antd
383
+ icon: close-circle
384
+ theme: outlined
385
+ bgColor: red
386
+ cardTitle: 资源监控微应用
387
+ description: 资源监控微应用相关前后台
388
+ url: /test
389
+ target: _blank
390
+ - brick: eo-card-item
391
+ events:
392
+ tag.click:
393
+ - action: message.success
394
+ args:
395
+ - 收藏成功
396
+ - target: _self
397
+ properties:
398
+ tagConfig:
399
+ icon:
400
+ lib: antd
401
+ icon: star
402
+ theme: filled
403
+ startColor: yellow
404
+ endColor: yellow
405
+ bgColor: blue
406
+ properties:
407
+ tagConfig:
408
+ icon:
409
+ lib: antd
410
+ icon: star
411
+ theme: filled
412
+ bgColor: blue
413
+ cardTitle: 资源监控微应用
414
+ description: 资源监控微应用相关前后台
415
+ url: /test
416
+ target: _blank
417
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/presentational",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,5 +43,5 @@
43
43
  "@next-bricks/containers": "*",
44
44
  "@next-bricks/icons": "*"
45
45
  },
46
- "gitHead": "d05b444547bfcf04029a80c83342a50a3cb49eb9"
46
+ "gitHead": "a46e15a0df53a6b416fabe7e5477eec1ecdb3289"
47
47
  }