@next-bricks/presentational 1.8.3 → 1.9.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.
package/dist/types.json CHANGED
@@ -315,6 +315,22 @@
315
315
  }
316
316
  }
317
317
  },
318
+ {
319
+ "name": "showActions",
320
+ "annotation": {
321
+ "type": "union",
322
+ "types": [
323
+ {
324
+ "type": "jsLiteral",
325
+ "value": "always"
326
+ },
327
+ {
328
+ "type": "jsLiteral",
329
+ "value": "hover"
330
+ }
331
+ ]
332
+ }
333
+ },
318
334
  {
319
335
  "name": "selected",
320
336
  "annotation": {
@@ -399,6 +415,23 @@
399
415
  "name": "TagConfig"
400
416
  }
401
417
  }
418
+ },
419
+ {
420
+ "name": "cardStyle",
421
+ "annotation": {
422
+ "type": "reference",
423
+ "typeName": {
424
+ "type": "qualifiedName",
425
+ "left": {
426
+ "type": "identifier",
427
+ "name": "React"
428
+ },
429
+ "right": {
430
+ "type": "identifier",
431
+ "name": "CSSProperties"
432
+ }
433
+ }
434
+ }
402
435
  }
403
436
  ],
404
437
  "events": [
@@ -1524,171 +1557,6 @@
1524
1557
  "events": [],
1525
1558
  "methods": []
1526
1559
  },
1527
- "eo-alert": {
1528
- "properties": [
1529
- {
1530
- "name": "type",
1531
- "annotation": {
1532
- "type": "reference",
1533
- "typeName": {
1534
- "type": "identifier",
1535
- "name": "AlertType"
1536
- }
1537
- }
1538
- },
1539
- {
1540
- "name": "hasTitle",
1541
- "annotation": {
1542
- "type": "keyword",
1543
- "value": "boolean"
1544
- }
1545
- },
1546
- {
1547
- "name": "showIcon",
1548
- "annotation": {
1549
- "type": "keyword",
1550
- "value": "boolean"
1551
- }
1552
- },
1553
- {
1554
- "name": "closable",
1555
- "annotation": {
1556
- "type": "keyword",
1557
- "value": "boolean"
1558
- }
1559
- },
1560
- {
1561
- "name": "localStorageKey",
1562
- "annotation": {
1563
- "type": "keyword",
1564
- "value": "string"
1565
- }
1566
- },
1567
- {
1568
- "name": "disableUrlNamespace",
1569
- "annotation": {
1570
- "type": "keyword",
1571
- "value": "boolean"
1572
- }
1573
- }
1574
- ],
1575
- "events": [],
1576
- "methods": [],
1577
- "types": [
1578
- {
1579
- "type": "enum",
1580
- "name": "AlertType",
1581
- "members": [
1582
- {
1583
- "type": "enumMember",
1584
- "id": {
1585
- "type": "jsLiteral",
1586
- "value": "SUCCESS"
1587
- },
1588
- "initializer": {
1589
- "type": "jsLiteral",
1590
- "value": "success"
1591
- }
1592
- },
1593
- {
1594
- "type": "enumMember",
1595
- "id": {
1596
- "type": "jsLiteral",
1597
- "value": "INFO"
1598
- },
1599
- "initializer": {
1600
- "type": "jsLiteral",
1601
- "value": "info"
1602
- }
1603
- },
1604
- {
1605
- "type": "enumMember",
1606
- "id": {
1607
- "type": "jsLiteral",
1608
- "value": "WARNING"
1609
- },
1610
- "initializer": {
1611
- "type": "jsLiteral",
1612
- "value": "warning"
1613
- }
1614
- },
1615
- {
1616
- "type": "enumMember",
1617
- "id": {
1618
- "type": "jsLiteral",
1619
- "value": "ERROR"
1620
- },
1621
- "initializer": {
1622
- "type": "jsLiteral",
1623
- "value": "error"
1624
- }
1625
- }
1626
- ]
1627
- }
1628
- ]
1629
- },
1630
- "eo-code-display": {
1631
- "properties": [
1632
- {
1633
- "name": "value",
1634
- "annotation": {
1635
- "type": "keyword",
1636
- "value": "string"
1637
- }
1638
- },
1639
- {
1640
- "name": "language",
1641
- "annotation": {
1642
- "type": "keyword",
1643
- "value": "string"
1644
- }
1645
- },
1646
- {
1647
- "name": "hideLineNumber",
1648
- "annotation": {
1649
- "type": "keyword",
1650
- "value": "boolean"
1651
- }
1652
- },
1653
- {
1654
- "name": "maxLines",
1655
- "annotation": {
1656
- "type": "keyword",
1657
- "value": "number"
1658
- }
1659
- },
1660
- {
1661
- "name": "minLines",
1662
- "annotation": {
1663
- "type": "keyword",
1664
- "value": "number"
1665
- }
1666
- },
1667
- {
1668
- "name": "showCopyButton",
1669
- "annotation": {
1670
- "type": "keyword",
1671
- "value": "boolean"
1672
- }
1673
- },
1674
- {
1675
- "name": "showExportButton",
1676
- "annotation": {
1677
- "type": "keyword",
1678
- "value": "boolean"
1679
- }
1680
- },
1681
- {
1682
- "name": "exportFileName",
1683
- "annotation": {
1684
- "type": "keyword",
1685
- "value": "string"
1686
- }
1687
- }
1688
- ],
1689
- "events": [],
1690
- "methods": []
1691
- },
1692
1560
  "eo-pagination": {
1693
1561
  "properties": [
1694
1562
  {
@@ -1873,5 +1741,170 @@
1873
1741
  ]
1874
1742
  }
1875
1743
  ]
1744
+ },
1745
+ "eo-alert": {
1746
+ "properties": [
1747
+ {
1748
+ "name": "type",
1749
+ "annotation": {
1750
+ "type": "reference",
1751
+ "typeName": {
1752
+ "type": "identifier",
1753
+ "name": "AlertType"
1754
+ }
1755
+ }
1756
+ },
1757
+ {
1758
+ "name": "hasTitle",
1759
+ "annotation": {
1760
+ "type": "keyword",
1761
+ "value": "boolean"
1762
+ }
1763
+ },
1764
+ {
1765
+ "name": "showIcon",
1766
+ "annotation": {
1767
+ "type": "keyword",
1768
+ "value": "boolean"
1769
+ }
1770
+ },
1771
+ {
1772
+ "name": "closable",
1773
+ "annotation": {
1774
+ "type": "keyword",
1775
+ "value": "boolean"
1776
+ }
1777
+ },
1778
+ {
1779
+ "name": "localStorageKey",
1780
+ "annotation": {
1781
+ "type": "keyword",
1782
+ "value": "string"
1783
+ }
1784
+ },
1785
+ {
1786
+ "name": "disableUrlNamespace",
1787
+ "annotation": {
1788
+ "type": "keyword",
1789
+ "value": "boolean"
1790
+ }
1791
+ }
1792
+ ],
1793
+ "events": [],
1794
+ "methods": [],
1795
+ "types": [
1796
+ {
1797
+ "type": "enum",
1798
+ "name": "AlertType",
1799
+ "members": [
1800
+ {
1801
+ "type": "enumMember",
1802
+ "id": {
1803
+ "type": "jsLiteral",
1804
+ "value": "SUCCESS"
1805
+ },
1806
+ "initializer": {
1807
+ "type": "jsLiteral",
1808
+ "value": "success"
1809
+ }
1810
+ },
1811
+ {
1812
+ "type": "enumMember",
1813
+ "id": {
1814
+ "type": "jsLiteral",
1815
+ "value": "INFO"
1816
+ },
1817
+ "initializer": {
1818
+ "type": "jsLiteral",
1819
+ "value": "info"
1820
+ }
1821
+ },
1822
+ {
1823
+ "type": "enumMember",
1824
+ "id": {
1825
+ "type": "jsLiteral",
1826
+ "value": "WARNING"
1827
+ },
1828
+ "initializer": {
1829
+ "type": "jsLiteral",
1830
+ "value": "warning"
1831
+ }
1832
+ },
1833
+ {
1834
+ "type": "enumMember",
1835
+ "id": {
1836
+ "type": "jsLiteral",
1837
+ "value": "ERROR"
1838
+ },
1839
+ "initializer": {
1840
+ "type": "jsLiteral",
1841
+ "value": "error"
1842
+ }
1843
+ }
1844
+ ]
1845
+ }
1846
+ ]
1847
+ },
1848
+ "eo-code-display": {
1849
+ "properties": [
1850
+ {
1851
+ "name": "value",
1852
+ "annotation": {
1853
+ "type": "keyword",
1854
+ "value": "string"
1855
+ }
1856
+ },
1857
+ {
1858
+ "name": "language",
1859
+ "annotation": {
1860
+ "type": "keyword",
1861
+ "value": "string"
1862
+ }
1863
+ },
1864
+ {
1865
+ "name": "hideLineNumber",
1866
+ "annotation": {
1867
+ "type": "keyword",
1868
+ "value": "boolean"
1869
+ }
1870
+ },
1871
+ {
1872
+ "name": "maxLines",
1873
+ "annotation": {
1874
+ "type": "keyword",
1875
+ "value": "number"
1876
+ }
1877
+ },
1878
+ {
1879
+ "name": "minLines",
1880
+ "annotation": {
1881
+ "type": "keyword",
1882
+ "value": "number"
1883
+ }
1884
+ },
1885
+ {
1886
+ "name": "showCopyButton",
1887
+ "annotation": {
1888
+ "type": "keyword",
1889
+ "value": "boolean"
1890
+ }
1891
+ },
1892
+ {
1893
+ "name": "showExportButton",
1894
+ "annotation": {
1895
+ "type": "keyword",
1896
+ "value": "boolean"
1897
+ }
1898
+ },
1899
+ {
1900
+ "name": "exportFileName",
1901
+ "annotation": {
1902
+ "type": "keyword",
1903
+ "value": "string"
1904
+ }
1905
+ }
1906
+ ],
1907
+ "events": [],
1908
+ "methods": []
1876
1909
  }
1877
1910
  }
@@ -47,6 +47,7 @@ export interface EoCardItemProps {
47
47
  url?: LinkProps["url"];
48
48
  target?: LinkProps["target"];
49
49
  actions?: ActionType[];
50
+ showActions?: "always" | "hover";
50
51
  hasExpandedArea1?: boolean;
51
52
  hasExpandedArea2?: boolean;
52
53
  selected?: boolean;
@@ -57,6 +58,7 @@ export interface EoCardItemProps {
57
58
  tagConfig?: TagConfig;
58
59
  avatarPosition?: "content" | "cover";
59
60
  coverImageSize?: React.CSSProperties["backgroundSize"];
61
+ cardStyle?: React.CSSProperties;
60
62
  }
61
63
  /**
62
64
  * 信息类卡片 —— 通用卡片
@@ -102,6 +104,10 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
102
104
  * 操作按钮组
103
105
  */
104
106
  accessor actions: ActionType[] | undefined;
107
+ /**
108
+ * 展示操作按钮组
109
+ */
110
+ accessor showActions: "always" | "hover";
105
111
  /**
106
112
  * 是否选中
107
113
  */
@@ -131,6 +137,10 @@ export declare class EoCardItem extends ReactNextElement implements EoCardItemPr
131
137
  */
132
138
  accessor avatarPosition: "content" | "cover";
133
139
  accessor tagConfig: TagConfig | undefined;
140
+ /**
141
+ * 卡片样式
142
+ */
143
+ accessor cardStyle: React.CSSProperties;
134
144
  /**
135
145
  * 是否有扩展区域 1
136
146
  * @internal
@@ -47,6 +47,50 @@ properties:
47
47
  event: download
48
48
  ```
49
49
 
50
+ ### showActions
51
+
52
+ ```yaml preview
53
+ brick: eo-card-item
54
+ properties:
55
+ style:
56
+ width: 300px
57
+ hasHeader: true
58
+ auxiliaryText: 初级应用
59
+ cardTitle: 资源监控微应用
60
+ description: 资源监控微应用相关前后台
61
+ avatar:
62
+ icon:
63
+ lib: easyops
64
+ category: default
65
+ icon: monitor
66
+ color: "#167be0"
67
+ size: 20
68
+ bgColor: var(--theme-geekblue-background)
69
+ actions:
70
+ - icon:
71
+ lib: antd
72
+ theme: outlined
73
+ icon: star
74
+ isDropdown: false
75
+ event: collect
76
+ - icon:
77
+ lib: antd
78
+ icon: copy
79
+ theme: outlined
80
+ text: 复制链接
81
+ isDropdown: true
82
+ event: copy
83
+ - icon:
84
+ lib: antd
85
+ icon: download
86
+ theme: outlined
87
+ text: 下载
88
+ isDropdown: true
89
+ disabled: true
90
+ event: download
91
+ showActions: hover
92
+ ```
93
+
50
94
  ### Single Expanded Area
51
95
 
52
96
  ```yaml preview gap
@@ -232,6 +276,19 @@ properties:
232
276
  event: download
233
277
  ```
234
278
 
279
+ ### cardStyle
280
+
281
+ ```yaml preview
282
+ - brick: eo-card-item
283
+ properties:
284
+ style:
285
+ width: 280px
286
+ cardStyle:
287
+ backgroundColor: var(--palette-gray-blue-6)
288
+ cardTitle: 信息卡片
289
+ description: 这是一只可爱的北极熊
290
+ ```
291
+
235
292
  ### Style type
236
293
 
237
294
  ```yaml preview
@@ -252,6 +309,38 @@ properties:
252
309
  size: 20
253
310
  ```
254
311
 
312
+ ### selected
313
+
314
+ ```yaml preview
315
+ - brick: eo-card-item
316
+ properties:
317
+ selected: true
318
+ style:
319
+ width: 300px
320
+ cardTitle: 资源监控微应用
321
+ description: 资源监控微应用相关前后台
322
+ avatar:
323
+ icon:
324
+ lib: easyops
325
+ category: default
326
+ icon: monitor
327
+ size: 20
328
+ - brick: eo-card-item
329
+ properties:
330
+ styleType: grayish
331
+ selected: true
332
+ style:
333
+ width: 300px
334
+ cardTitle: 资源监控微应用
335
+ description: 资源监控微应用相关前后台
336
+ avatar:
337
+ icon:
338
+ lib: easyops
339
+ category: default
340
+ icon: monitor
341
+ size: 20
342
+ ```
343
+
255
344
  ### Tag
256
345
 
257
346
  ```yaml preview
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational",
3
- "version": "1.8.3",
3
+ "version": "1.9.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/presentational",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,5 +44,5 @@
44
44
  "@next-bricks/containers": "*",
45
45
  "@next-bricks/icons": "*"
46
46
  },
47
- "gitHead": "e475c84dbc82fc4bfc3904c889a8e1c3baee6077"
47
+ "gitHead": "5bb4fcf821765d90a235774e47f7da97236c3f2d"
48
48
  }