@next-bricks/presentational 0.16.3 → 0.17.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.
@@ -3,6 +3,55 @@
3
3
  "package": "@next-bricks/presentational",
4
4
  "name": "presentational",
5
5
  "bricks": [
6
+ {
7
+ "name": "eo-alert",
8
+ "alias": [
9
+ "presentational.general-alert"
10
+ ],
11
+ "properties": [
12
+ {
13
+ "name": "type",
14
+ "description": "警告类型",
15
+ "attribute": false,
16
+ "type": "AlertType"
17
+ },
18
+ {
19
+ "name": "hasTitle",
20
+ "description": "是否显示标题。开启后,可以使用 `title` 插槽",
21
+ "type": "boolean"
22
+ },
23
+ {
24
+ "name": "closable",
25
+ "description": "是否显示关闭按钮",
26
+ "type": "boolean"
27
+ },
28
+ {
29
+ "name": "localStorageKey",
30
+ "description": "以该值和页面 url 作为命名空间,决定是否显示该警告提示",
31
+ "type": "string"
32
+ },
33
+ {
34
+ "name": "disableUrlNamespace",
35
+ "description": "关闭后仅以 `localStorageKey` 作为命名空间",
36
+ "type": "boolean"
37
+ }
38
+ ],
39
+ "events": [],
40
+ "slots": [
41
+ {
42
+ "name": null,
43
+ "description": "内容区"
44
+ },
45
+ {
46
+ "name": "title",
47
+ "description": "标题"
48
+ }
49
+ ],
50
+ "methods": [],
51
+ "parts": [],
52
+ "description": "告警提示",
53
+ "category": "display-component"
54
+ },
6
55
  {
7
56
  "name": "eo-descriptions",
8
57
  "alias": [
@@ -64,55 +113,6 @@
64
113
  "description": "通用描述列表构件",
65
114
  "category": "text"
66
115
  },
67
- {
68
- "name": "eo-alert",
69
- "alias": [
70
- "presentational.general-alert"
71
- ],
72
- "properties": [
73
- {
74
- "name": "type",
75
- "description": "警告类型",
76
- "attribute": false,
77
- "type": "AlertType"
78
- },
79
- {
80
- "name": "hasTitle",
81
- "description": "是否显示标题。开启后,可以使用 `title` 插槽",
82
- "type": "boolean"
83
- },
84
- {
85
- "name": "closable",
86
- "description": "是否显示关闭按钮",
87
- "type": "boolean"
88
- },
89
- {
90
- "name": "localStorageKey",
91
- "description": "以该值和页面 url 作为命名空间,决定是否显示该警告提示",
92
- "type": "string"
93
- },
94
- {
95
- "name": "disableUrlNamespace",
96
- "description": "关闭后仅以 `localStorageKey` 作为命名空间",
97
- "type": "boolean"
98
- }
99
- ],
100
- "events": [],
101
- "slots": [
102
- {
103
- "name": null,
104
- "description": "内容区"
105
- },
106
- {
107
- "name": "title",
108
- "description": "标题"
109
- }
110
- ],
111
- "methods": [],
112
- "parts": [],
113
- "description": "告警提示",
114
- "category": "display-component"
115
- },
116
116
  {
117
117
  "name": "eo-code-display",
118
118
  "alias": [
@@ -431,6 +431,81 @@
431
431
  "parts": [],
432
432
  "description": "人性化时间展示",
433
433
  "category": "text"
434
+ },
435
+ {
436
+ "name": "eo-statistics-card",
437
+ "properties": [
438
+ {
439
+ "name": "cardTitle",
440
+ "description": "卡片标题",
441
+ "type": "string"
442
+ },
443
+ {
444
+ "name": "value",
445
+ "description": "值",
446
+ "type": "string"
447
+ },
448
+ {
449
+ "name": "unit",
450
+ "description": "单位",
451
+ "type": "string"
452
+ },
453
+ {
454
+ "name": "icon",
455
+ "description": "图标",
456
+ "attribute": false,
457
+ "type": "EoStatisticsCardProps[\"icon\"]"
458
+ },
459
+ {
460
+ "name": "size",
461
+ "description": "尺寸",
462
+ "default": "\"medium\"",
463
+ "type": "\"large\" | \"medium\" | \"small\""
464
+ },
465
+ {
466
+ "name": "outline",
467
+ "description": "卡片轮廓",
468
+ "default": "\"border\"",
469
+ "type": "\"border\" | \"background\" | \"none\""
470
+ },
471
+ {
472
+ "name": "background",
473
+ "description": "背景",
474
+ "type": "string"
475
+ },
476
+ {
477
+ "name": "descriptionPosition",
478
+ "description": "描述位置",
479
+ "default": "\"bottom\"",
480
+ "type": "\"bottom\" | \"right\""
481
+ }
482
+ ],
483
+ "events": [],
484
+ "slots": [
485
+ {
486
+ "name": "titlePrefix",
487
+ "description": "标题前缀,放置辅助信息"
488
+ },
489
+ {
490
+ "name": "titleSuffix",
491
+ "description": "标题前缀,放置辅助信息"
492
+ },
493
+ {
494
+ "name": "description",
495
+ "description": "描述信息,通常是对于统计值的描述"
496
+ },
497
+ {
498
+ "name": "basicContent",
499
+ "description": "卡片右侧内容区,适合放置迷你图表,常用于小卡片"
500
+ },
501
+ {
502
+ "name": "extraContent",
503
+ "description": "卡片下方内容区,适合放置图表,用于展示更多信息的场景"
504
+ }
505
+ ],
506
+ "methods": [],
507
+ "parts": [],
508
+ "description": "统计卡片"
434
509
  }
435
510
  ],
436
511
  "providers": []
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";
@@ -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 "./";