@next-bricks/presentational 0.16.4 → 0.18.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.
Files changed (46) hide show
  1. package/dist/bricks.json +6 -2
  2. package/dist/chunks/7201.3a164056.js +3 -0
  3. package/dist/chunks/7201.3a164056.js.map +1 -0
  4. package/dist/chunks/9359.4c1896f7.js +2 -0
  5. package/dist/chunks/9359.4c1896f7.js.map +1 -0
  6. package/dist/chunks/eo-descriptions.fab17d0a.js +3 -0
  7. package/dist/chunks/eo-descriptions.fab17d0a.js.map +1 -0
  8. package/dist/chunks/eo-divider.cbf33b7c.js +3 -0
  9. package/dist/chunks/{eo-divider.a0a46e09.js.map → eo-divider.cbf33b7c.js.map} +1 -1
  10. package/dist/chunks/eo-info-card-item.19f8dac2.js +3 -0
  11. package/dist/chunks/eo-info-card-item.19f8dac2.js.map +1 -0
  12. package/dist/chunks/eo-pagination.b3823288.js +2 -0
  13. package/dist/chunks/eo-pagination.b3823288.js.map +1 -0
  14. package/dist/chunks/eo-statistics-card.4317c99c.js +2 -0
  15. package/dist/chunks/eo-statistics-card.4317c99c.js.map +1 -0
  16. package/dist/chunks/{main.6565f602.js → main.d58834ce.js} +2 -2
  17. package/dist/chunks/{main.6565f602.js.map → main.d58834ce.js.map} +1 -1
  18. package/dist/examples.json +5 -2
  19. package/dist/index.3f851c25.js +2 -0
  20. package/dist/index.3f851c25.js.map +1 -0
  21. package/dist/manifest.json +75 -0
  22. package/dist/types.json +293 -0
  23. package/dist-types/bootstrap.d.ts +1 -0
  24. package/dist-types/info-card-item/index.d.ts +7 -1
  25. package/dist-types/pagination/index.d.ts +1 -0
  26. package/dist-types/statistics-card/index.d.ts +63 -0
  27. package/dist-types/statistics-card/index.spec.d.ts +1 -0
  28. package/docs/eo-descriptions.md +2 -4
  29. package/docs/eo-info-card-item.md +168 -83
  30. package/docs/eo-statistics-card.md +509 -0
  31. package/package.json +2 -2
  32. package/dist/chunks/8333.738cc94d.js +0 -2
  33. package/dist/chunks/8333.738cc94d.js.map +0 -1
  34. package/dist/chunks/eo-descriptions.591895f4.js +0 -3
  35. package/dist/chunks/eo-descriptions.591895f4.js.map +0 -1
  36. package/dist/chunks/eo-divider.a0a46e09.js +0 -3
  37. package/dist/chunks/eo-info-card-item.0801b674.js +0 -3
  38. package/dist/chunks/eo-info-card-item.0801b674.js.map +0 -1
  39. package/dist/chunks/eo-pagination.d8930c99.js +0 -3
  40. package/dist/chunks/eo-pagination.d8930c99.js.map +0 -1
  41. package/dist/index.36c4ea25.js +0 -2
  42. package/dist/index.36c4ea25.js.map +0 -1
  43. /package/dist/chunks/{eo-descriptions.591895f4.js.LICENSE.txt → 7201.3a164056.js.LICENSE.txt} +0 -0
  44. /package/dist/chunks/{eo-divider.a0a46e09.js.LICENSE.txt → eo-descriptions.fab17d0a.js.LICENSE.txt} +0 -0
  45. /package/dist/chunks/{eo-info-card-item.0801b674.js.LICENSE.txt → eo-divider.cbf33b7c.js.LICENSE.txt} +0 -0
  46. /package/dist/chunks/{eo-pagination.d8930c99.js.LICENSE.txt → eo-info-card-item.19f8dac2.js.LICENSE.txt} +0 -0
package/dist/types.json CHANGED
@@ -819,6 +819,299 @@
819
819
  }
820
820
  ]
821
821
  },
822
+ "eo-statistics-card": {
823
+ "properties": [
824
+ {
825
+ "name": "cardTitle",
826
+ "annotation": {
827
+ "type": "keyword",
828
+ "value": "string"
829
+ }
830
+ },
831
+ {
832
+ "name": "value",
833
+ "annotation": {
834
+ "type": "keyword",
835
+ "value": "string"
836
+ }
837
+ },
838
+ {
839
+ "name": "unit",
840
+ "annotation": {
841
+ "type": "keyword",
842
+ "value": "string"
843
+ }
844
+ },
845
+ {
846
+ "name": "icon",
847
+ "annotation": {
848
+ "type": "indexedAccess",
849
+ "objectType": {
850
+ "type": "reference",
851
+ "typeName": {
852
+ "type": "identifier",
853
+ "name": "EoStatisticsCardProps"
854
+ }
855
+ },
856
+ "indexType": {
857
+ "type": "jsLiteral",
858
+ "value": "icon"
859
+ }
860
+ }
861
+ },
862
+ {
863
+ "name": "size",
864
+ "annotation": {
865
+ "type": "union",
866
+ "types": [
867
+ {
868
+ "type": "jsLiteral",
869
+ "value": "large"
870
+ },
871
+ {
872
+ "type": "jsLiteral",
873
+ "value": "medium"
874
+ },
875
+ {
876
+ "type": "jsLiteral",
877
+ "value": "small"
878
+ }
879
+ ]
880
+ }
881
+ },
882
+ {
883
+ "name": "outline",
884
+ "annotation": {
885
+ "type": "union",
886
+ "types": [
887
+ {
888
+ "type": "jsLiteral",
889
+ "value": "border"
890
+ },
891
+ {
892
+ "type": "jsLiteral",
893
+ "value": "background"
894
+ },
895
+ {
896
+ "type": "jsLiteral",
897
+ "value": "none"
898
+ }
899
+ ]
900
+ }
901
+ },
902
+ {
903
+ "name": "background",
904
+ "annotation": {
905
+ "type": "keyword",
906
+ "value": "string"
907
+ }
908
+ },
909
+ {
910
+ "name": "descriptionPosition",
911
+ "annotation": {
912
+ "type": "union",
913
+ "types": [
914
+ {
915
+ "type": "jsLiteral",
916
+ "value": "bottom"
917
+ },
918
+ {
919
+ "type": "jsLiteral",
920
+ "value": "right"
921
+ }
922
+ ]
923
+ }
924
+ }
925
+ ],
926
+ "events": [],
927
+ "methods": [],
928
+ "types": [
929
+ {
930
+ "type": "interface",
931
+ "name": "EoStatisticsCardProps",
932
+ "body": [
933
+ {
934
+ "type": "propertySignature",
935
+ "key": {
936
+ "type": "identifier",
937
+ "name": "cardTitle"
938
+ },
939
+ "annotation": {
940
+ "type": "keyword",
941
+ "value": "string"
942
+ },
943
+ "optional": true,
944
+ "computed": false
945
+ },
946
+ {
947
+ "type": "propertySignature",
948
+ "key": {
949
+ "type": "identifier",
950
+ "name": "value"
951
+ },
952
+ "annotation": {
953
+ "type": "keyword",
954
+ "value": "string"
955
+ },
956
+ "optional": true,
957
+ "computed": false
958
+ },
959
+ {
960
+ "type": "propertySignature",
961
+ "key": {
962
+ "type": "identifier",
963
+ "name": "unit"
964
+ },
965
+ "annotation": {
966
+ "type": "keyword",
967
+ "value": "string"
968
+ },
969
+ "optional": true,
970
+ "computed": false
971
+ },
972
+ {
973
+ "type": "propertySignature",
974
+ "key": {
975
+ "type": "identifier",
976
+ "name": "icon"
977
+ },
978
+ "annotation": {
979
+ "type": "intersection",
980
+ "types": [
981
+ {
982
+ "type": "reference",
983
+ "typeName": {
984
+ "type": "identifier",
985
+ "name": "GeneralIconProps"
986
+ }
987
+ },
988
+ {
989
+ "type": "typeLiteral",
990
+ "members": [
991
+ {
992
+ "type": "propertySignature",
993
+ "key": {
994
+ "type": "identifier",
995
+ "name": "color"
996
+ },
997
+ "annotation": {
998
+ "type": "keyword",
999
+ "value": "string"
1000
+ },
1001
+ "optional": true,
1002
+ "computed": false
1003
+ },
1004
+ {
1005
+ "type": "propertySignature",
1006
+ "key": {
1007
+ "type": "identifier",
1008
+ "name": "bgColor"
1009
+ },
1010
+ "annotation": {
1011
+ "type": "keyword",
1012
+ "value": "string"
1013
+ },
1014
+ "optional": true,
1015
+ "computed": false
1016
+ }
1017
+ ]
1018
+ }
1019
+ ]
1020
+ },
1021
+ "optional": true,
1022
+ "computed": false
1023
+ },
1024
+ {
1025
+ "type": "propertySignature",
1026
+ "key": {
1027
+ "type": "identifier",
1028
+ "name": "size"
1029
+ },
1030
+ "annotation": {
1031
+ "type": "union",
1032
+ "types": [
1033
+ {
1034
+ "type": "jsLiteral",
1035
+ "value": "large"
1036
+ },
1037
+ {
1038
+ "type": "jsLiteral",
1039
+ "value": "medium"
1040
+ },
1041
+ {
1042
+ "type": "jsLiteral",
1043
+ "value": "small"
1044
+ }
1045
+ ]
1046
+ },
1047
+ "optional": true,
1048
+ "computed": false
1049
+ },
1050
+ {
1051
+ "type": "propertySignature",
1052
+ "key": {
1053
+ "type": "identifier",
1054
+ "name": "outline"
1055
+ },
1056
+ "annotation": {
1057
+ "type": "union",
1058
+ "types": [
1059
+ {
1060
+ "type": "jsLiteral",
1061
+ "value": "border"
1062
+ },
1063
+ {
1064
+ "type": "jsLiteral",
1065
+ "value": "background"
1066
+ },
1067
+ {
1068
+ "type": "jsLiteral",
1069
+ "value": "none"
1070
+ }
1071
+ ]
1072
+ },
1073
+ "optional": true,
1074
+ "computed": false
1075
+ },
1076
+ {
1077
+ "type": "propertySignature",
1078
+ "key": {
1079
+ "type": "identifier",
1080
+ "name": "background"
1081
+ },
1082
+ "annotation": {
1083
+ "type": "keyword",
1084
+ "value": "string"
1085
+ },
1086
+ "optional": true,
1087
+ "computed": false
1088
+ },
1089
+ {
1090
+ "type": "propertySignature",
1091
+ "key": {
1092
+ "type": "identifier",
1093
+ "name": "descriptionPosition"
1094
+ },
1095
+ "annotation": {
1096
+ "type": "union",
1097
+ "types": [
1098
+ {
1099
+ "type": "jsLiteral",
1100
+ "value": "bottom"
1101
+ },
1102
+ {
1103
+ "type": "jsLiteral",
1104
+ "value": "right"
1105
+ }
1106
+ ]
1107
+ },
1108
+ "optional": true,
1109
+ "computed": false
1110
+ }
1111
+ ]
1112
+ }
1113
+ ]
1114
+ },
822
1115
  "eo-alert": {
823
1116
  "properties": [
824
1117
  {
@@ -6,3 +6,4 @@ import "./card-item/index.js";
6
6
  import "./divider/index.js";
7
7
  import "./info-card-item/index.js";
8
8
  import "./humanize-time/index.js";
9
+ import "./statistics-card/index.js";
@@ -40,6 +40,11 @@ export declare class EoInfoCardItem extends ReactNextElement {
40
40
  * @internal
41
41
  */
42
42
  accessor hasIcon: boolean | undefined;
43
+ /**
44
+ * 是否hoverable
45
+ * @internal
46
+ */
47
+ accessor hoverable: boolean | undefined;
43
48
  render(): React.JSX.Element;
44
49
  }
45
50
  interface IconAvatar {
@@ -62,6 +67,7 @@ interface EoInfoCardItemComponentProps {
62
67
  cardIcon?: IconAvatar | undefined;
63
68
  detailList?: InfoCardDetail[];
64
69
  callback?: Ref<HTMLDivElement>;
70
+ hoverable?: boolean;
65
71
  }
66
- export declare function EoInfoCardItemComponent({ url, target, cardTitle, description, cardIcon, detailList, callback, }: EoInfoCardItemComponentProps): React.JSX.Element;
72
+ export declare function EoInfoCardItemComponent({ url, target, cardTitle, description, cardIcon, detailList, callback, hoverable, }: EoInfoCardItemComponentProps): React.JSX.Element;
67
73
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
+ import "./host-context.css";
4
5
  interface EoPaginationProps {
5
6
  total: number;
6
7
  page: number;
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import { ReactNextElement } from "@next-core/react-element";
3
+ import "@next-core/theme";
4
+ import { GeneralIconProps } from "@next-bricks/icons/general-icon";
5
+ export interface EoStatisticsCardProps {
6
+ cardTitle?: string;
7
+ value?: string;
8
+ unit?: string;
9
+ icon?: GeneralIconProps & {
10
+ color?: string;
11
+ bgColor?: string;
12
+ };
13
+ size?: "large" | "medium" | "small";
14
+ outline?: "border" | "background" | "none";
15
+ background?: string;
16
+ descriptionPosition?: "bottom" | "right";
17
+ }
18
+ /**
19
+ * 统计卡片
20
+ *
21
+ * @slot titlePrefix - 标题前缀,放置辅助信息
22
+ * @slot titleSuffix - 标题前缀,放置辅助信息
23
+ * @slot description - 描述信息,通常是对于统计值的描述
24
+ * @slot basicContent - 卡片右侧内容区,适合放置迷你图表,常用于小卡片
25
+ * @slot extraContent - 卡片下方内容区,适合放置图表,用于展示更多信息的场景
26
+ *
27
+ */
28
+ export declare class EoStatisticsCard extends ReactNextElement {
29
+ /**
30
+ * 卡片标题
31
+ */
32
+ accessor cardTitle: string | undefined;
33
+ /**
34
+ * 值
35
+ */
36
+ accessor value: string | undefined;
37
+ /**
38
+ * 单位
39
+ */
40
+ accessor unit: string | undefined;
41
+ /**
42
+ * 图标
43
+ */
44
+ accessor icon: EoStatisticsCardProps["icon"] | undefined;
45
+ /**
46
+ * 尺寸
47
+ */
48
+ accessor size: "large" | "medium" | "small";
49
+ /**
50
+ * 卡片轮廓
51
+ */
52
+ accessor outline: "border" | "background" | "none";
53
+ /**
54
+ * 背景
55
+ */
56
+ accessor background: string | undefined;
57
+ /**
58
+ * 描述位置
59
+ */
60
+ accessor descriptionPosition: "bottom" | "right";
61
+ render(): React.JSX.Element;
62
+ }
63
+ export declare function EoStatisticsCardComponent(props: EoStatisticsCardProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ import "./";
@@ -46,10 +46,7 @@
46
46
  key: 2
47
47
  color: green
48
48
 
49
- - brick: div
50
- properties:
51
- style:
52
- margin: 10px 0px
49
+ - brick: eo-divider
53
50
  - brick: eo-descriptions
54
51
  properties:
55
52
  column: 4
@@ -107,6 +104,7 @@
107
104
  - text: 大男孩
108
105
  key: 2
109
106
  color: green
107
+ - brick: eo-divider
110
108
  - brick: eo-descriptions
111
109
  properties:
112
110
  layout: vertical
@@ -5,87 +5,172 @@
5
5
  ### Basic
6
6
 
7
7
  ```yaml preview
8
- brick: eo-info-card-item
9
- properties:
10
- style:
11
- width: 100%
12
- cardTitle: 资源监控微应用
13
- cardIcon:
14
- color: blue
15
- icon:
16
- icon: chart-pie
17
- lib: fa
18
- description: F5管理将企业F5BIG-IP设备统一管理,可在F5设备卡片页概览全部设备的状态,了解 VirtualServer、Pool、iRules资源信息
19
- detailList:
20
- - useBrick:
21
- brick: eo-switch
22
- properties:
23
- name: enabled
24
- size: small
25
- style:
26
- marginTop: "-2.5px"
27
- value: true
28
- title: 是否启用
29
- - desc: "7663"
30
- title: 下载次数
31
- - desc: 90%
32
- title: 下载率
33
- - desc: 3%
34
- title: 失败率
35
- slots:
36
- title:
37
- type: bricks
38
- bricks:
39
- - brick: eo-tag
40
- properties:
41
- textContent: 测试
42
- color: green
43
- action:
44
- type: bricks
45
- bricks:
46
- - brick: eo-dropdown-actions
47
- events:
48
- advanced.setting:
49
- - action: message.success
50
- args:
51
- - click advanced button
52
- button.delete:
53
- - useProvider: basic.show-dialog
54
- args:
55
- - type: confirm
56
- title: Please Confirm
57
- content: Are you sure?
58
- callback:
59
- success:
60
- action: message.success
61
- args:
62
- - You just confirmed!
63
- error:
64
- action: message.warn
65
- args:
66
- - You just canceled.
67
- children:
68
- - brick: eo-button
69
- properties:
70
- type: link
71
- icon:
72
- lib: fa
73
- icon: ellipsis-v
74
- size: small
75
- properties:
76
- actions:
77
- - text: 高级设置
78
- icon:
79
- icon: setting
80
- lib: antd
81
- event: advanced.setting
82
- - text: 删除
83
- icon:
84
- lib: easyops
85
- category: default
86
- icon: delete
87
- event: button.delete
88
- tooltip: 删除
89
- tooltipPlacement: right
90
- color: var(--theme-red-color)
8
+ - brick: eo-info-card-item
9
+ properties:
10
+ style:
11
+ width: 100%
12
+ cardTitle: 资产盘点
13
+ cardIcon:
14
+ color: orange
15
+ icon:
16
+ icon: patch-management
17
+ lib: easyops
18
+ category: app
19
+ description: 资产盘点为设备运维人员提供便捷的设备资产盘点能力,使用自动化的盘点方式替换原有人工盘点,解放设备运维人员的双手
20
+ detailList:
21
+ - desc: 7M
22
+ title: 大小
23
+ - desc: "863"
24
+ title: 下载次数
25
+ - desc: 80%
26
+ title: 下载率
27
+ - desc: 2%
28
+ title: 失败率
29
+ slots:
30
+ title:
31
+ type: bricks
32
+ bricks:
33
+ - brick: eo-tag
34
+ properties:
35
+ textContent: 生产
36
+ color: blue
37
+ action:
38
+ type: bricks
39
+ bricks:
40
+ - brick: eo-dropdown-actions
41
+ events:
42
+ advanced.setting:
43
+ - action: message.success
44
+ args:
45
+ - click advanced button
46
+ button.delete:
47
+ - useProvider: basic.show-dialog
48
+ args:
49
+ - type: confirm
50
+ title: Please Confirm
51
+ content: Are you sure?
52
+ callback:
53
+ success:
54
+ action: message.success
55
+ args:
56
+ - You just confirmed!
57
+ error:
58
+ action: message.warn
59
+ args:
60
+ - You just canceled.
61
+ children:
62
+ - brick: eo-button
63
+ properties:
64
+ type: link
65
+ icon:
66
+ lib: fa
67
+ icon: ellipsis-v
68
+ size: small
69
+ properties:
70
+ actions:
71
+ - text: 高级设置
72
+ icon:
73
+ icon: setting
74
+ lib: antd
75
+ event: advanced.setting
76
+ - text: 删除
77
+ icon:
78
+ lib: easyops
79
+ category: default
80
+ icon: delete
81
+ event: button.delete
82
+ tooltip: 删除
83
+ tooltipPlacement: right
84
+ color: var(--theme-red-color)
85
+ - brick: div
86
+ properties:
87
+ style:
88
+ height: 20px
89
+ - brick: eo-info-card-item
90
+ properties:
91
+ style:
92
+ width: 100%
93
+ cardTitle: 资源监控微应用
94
+ cardIcon:
95
+ color: blue
96
+ icon:
97
+ icon: chart-pie
98
+ lib: fa
99
+ description: F5管理将企业F5BIG-IP设备统一管理,可在F5设备卡片页概览全部设备的状态,了解 VirtualServer、Pool、iRules资源信息
100
+ detailList:
101
+ - useBrick:
102
+ brick: eo-switch
103
+ properties:
104
+ name: enabled
105
+ size: small
106
+ style:
107
+ marginTop: "-2.5px"
108
+ value: true
109
+ title: 是否启用
110
+ - desc: "7663"
111
+ title: 下载次数
112
+ - desc: 90%
113
+ title: 下载率
114
+ - desc: 3%
115
+ title: 失败率
116
+ slots:
117
+ title:
118
+ type: bricks
119
+ bricks:
120
+ - brick: eo-tag
121
+ properties:
122
+ textContent: 测试
123
+ color: green
124
+ action:
125
+ type: bricks
126
+ bricks:
127
+ - brick: eo-dropdown-actions
128
+ events:
129
+ advanced.setting:
130
+ - action: message.success
131
+ args:
132
+ - click advanced button
133
+ button.delete:
134
+ - useProvider: basic.show-dialog
135
+ args:
136
+ - type: confirm
137
+ title: Please Confirm
138
+ content: Are you sure?
139
+ callback:
140
+ success:
141
+ action: message.success
142
+ args:
143
+ - You just confirmed!
144
+ error:
145
+ action: message.warn
146
+ args:
147
+ - You just canceled.
148
+ children:
149
+ - brick: eo-button
150
+ properties:
151
+ type: link
152
+ icon:
153
+ lib: fa
154
+ icon: ellipsis-v
155
+ size: small
156
+ properties:
157
+ actions:
158
+ - text: 高级设置
159
+ icon:
160
+ icon: setting
161
+ lib: antd
162
+ event: advanced.setting
163
+ - text: 删除
164
+ icon:
165
+ lib: easyops
166
+ category: default
167
+ icon: delete
168
+ event: button.delete
169
+ tooltip: 删除
170
+ tooltipPlacement: right
171
+ color: var(--theme-red-color)
172
+ - brick: div
173
+ properties:
174
+ style:
175
+ height: 50px
91
176
  ```