@htmlbricks/hb-dashboard-indicator 0.66.27 → 0.67.1
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 +17 -3
- package/main.iife.js +112 -4
- package/main.iife.js.map +1 -1
- package/manifest.json +61 -6
- package/package.json +2 -2
- package/types/webcomponent.type.d.json +16 -0
- package/types/webcomponent.type.d.ts +15 -0
package/manifest.json
CHANGED
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
"id": {
|
|
41
41
|
"type": "string"
|
|
42
42
|
},
|
|
43
|
+
"karma": {
|
|
44
|
+
"$ref": "#/definitions/Karma",
|
|
45
|
+
"description": "Semantic accent from Bulma (`secondary` → `dark` tokens), or `none` for a custom host color via `--hb--dashboard-indicator-background`."
|
|
46
|
+
},
|
|
43
47
|
"link_label": {
|
|
44
48
|
"type": "string"
|
|
45
49
|
},
|
|
@@ -58,11 +62,23 @@
|
|
|
58
62
|
"icon"
|
|
59
63
|
],
|
|
60
64
|
"type": "object"
|
|
65
|
+
},
|
|
66
|
+
"Karma": {
|
|
67
|
+
"enum": [
|
|
68
|
+
"success",
|
|
69
|
+
"danger",
|
|
70
|
+
"warning",
|
|
71
|
+
"primary",
|
|
72
|
+
"secondary",
|
|
73
|
+
"info",
|
|
74
|
+
"none"
|
|
75
|
+
],
|
|
76
|
+
"type": "string"
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
79
|
}
|
|
64
80
|
},
|
|
65
|
-
"description": "Compact KPI tile: large `number`, caption `text`,
|
|
81
|
+
"description": "Compact KPI tile: large `number`, caption `text`, configurable Bootstrap Icon, and `karma` accent (`success` | `danger` | `warning` | `primary` | `secondary` | `info`) using Bulma theme tokens (`secondary` maps to Bulma `dark`), or `karma=\"none\"` with host CSS variable `--hb--dashboard-indicator-background` for a custom color. When `link_label` is set, a footer strip is shown and clicks dispatch `dashboardIndicatorClick` with the component `id`.",
|
|
66
82
|
"storybookArgs": {
|
|
67
83
|
"number": {
|
|
68
84
|
"control": {
|
|
@@ -84,6 +100,20 @@
|
|
|
84
100
|
"type": "text"
|
|
85
101
|
}
|
|
86
102
|
},
|
|
103
|
+
"karma": {
|
|
104
|
+
"control": {
|
|
105
|
+
"type": "select"
|
|
106
|
+
},
|
|
107
|
+
"options": [
|
|
108
|
+
"success",
|
|
109
|
+
"danger",
|
|
110
|
+
"warning",
|
|
111
|
+
"primary",
|
|
112
|
+
"secondary",
|
|
113
|
+
"info",
|
|
114
|
+
"none"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
87
117
|
"dashboardIndicatorClick": {
|
|
88
118
|
"action": "dashboardIndicatorClickEvent"
|
|
89
119
|
}
|
|
@@ -92,8 +122,9 @@
|
|
|
92
122
|
"vars": [
|
|
93
123
|
{
|
|
94
124
|
"name": "--hb--dashboard-indicator-background",
|
|
95
|
-
"valueType": "
|
|
96
|
-
"defaultValue": ""
|
|
125
|
+
"valueType": "color",
|
|
126
|
+
"defaultValue": "",
|
|
127
|
+
"description": "Header background and footer accent color. Used when `karma=\"none\"` (any valid CSS color). If unset with `karma=\"none\"`, falls back to Bulma `success`. Ignored when `karma` is a Bulma semantic value."
|
|
97
128
|
}
|
|
98
129
|
],
|
|
99
130
|
"parts": []
|
|
@@ -108,7 +139,8 @@
|
|
|
108
139
|
"number": 10,
|
|
109
140
|
"text": "ritestawdmento",
|
|
110
141
|
"icon": "window",
|
|
111
|
-
"link_label": "testaggio"
|
|
142
|
+
"link_label": "testaggio",
|
|
143
|
+
"karma": "success"
|
|
112
144
|
}
|
|
113
145
|
},
|
|
114
146
|
{
|
|
@@ -118,9 +150,32 @@
|
|
|
118
150
|
"icon": "window",
|
|
119
151
|
"link_label": "testaggio2"
|
|
120
152
|
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "karma-danger",
|
|
156
|
+
"description": "Header and footer accent use Bulma `danger` tokens.",
|
|
157
|
+
"data": {
|
|
158
|
+
"number": 3,
|
|
159
|
+
"text": "Failed jobs",
|
|
160
|
+
"icon": "exclamation-triangle",
|
|
161
|
+
"link_label": "Open queue",
|
|
162
|
+
"karma": "danger"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "custom-accent",
|
|
167
|
+
"description": "Set `karma` to `none` and define `--hb--dashboard-indicator-background` on the host (e.g. inline `style` or a parent stylesheet targeting `hb-dashboard-indicator`).",
|
|
168
|
+
"data": {
|
|
169
|
+
"number": 42,
|
|
170
|
+
"text": "Custom brand",
|
|
171
|
+
"icon": "palette",
|
|
172
|
+
"link_label": "Details",
|
|
173
|
+
"karma": "none"
|
|
174
|
+
}
|
|
121
175
|
}
|
|
122
176
|
],
|
|
123
|
-
"iifeIntegrity": "sha384-
|
|
177
|
+
"iifeIntegrity": "sha384-A2KPXcbueGqNbalZrAUuTAedMUipRNFae2wEUPYLx5pOW1WVIakF4HElQ0hLVFTa",
|
|
178
|
+
"dependencies": [],
|
|
124
179
|
"screenshots": [],
|
|
125
180
|
"licenses": [
|
|
126
181
|
{
|
|
@@ -140,5 +195,5 @@
|
|
|
140
195
|
"size": {},
|
|
141
196
|
"iifePath": "main.iife.js",
|
|
142
197
|
"repoName": "@htmlbricks/hb-dashboard-indicator",
|
|
143
|
-
"version": "0.
|
|
198
|
+
"version": "0.67.1"
|
|
144
199
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-dashboard-indicator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.1",
|
|
4
4
|
"contributors": [],
|
|
5
|
-
"description": "Compact KPI tile: large `number`, caption `text`,
|
|
5
|
+
"description": "Compact KPI tile: large `number`, caption `text`, configurable Bootstrap Icon, and `karma` accent (`success` | `danger` | `warning` | `primary` | `secondary` | `info`) using Bulma theme tokens (`secondary` maps to Bulma `dark`), or `karma=\"none\"` with host CSS variable `--hb--dashboard-indicator-background` for a custom color. When `link_label` is set, a footer strip is shown and clicks dispatch `dashboardIndicatorClick` with the component `id`.",
|
|
6
6
|
"licenses": [
|
|
7
7
|
{
|
|
8
8
|
"type": "Apache-2.0",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"id": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"karma": {
|
|
15
|
+
"$ref": "#/definitions/Karma",
|
|
16
|
+
"description": "Semantic accent from Bulma (`secondary` → `dark` tokens), or `none` for a custom host color via `--hb--dashboard-indicator-background`."
|
|
17
|
+
},
|
|
14
18
|
"link_label": {
|
|
15
19
|
"type": "string"
|
|
16
20
|
},
|
|
@@ -29,6 +33,18 @@
|
|
|
29
33
|
"icon"
|
|
30
34
|
],
|
|
31
35
|
"type": "object"
|
|
36
|
+
},
|
|
37
|
+
"Karma": {
|
|
38
|
+
"enum": [
|
|
39
|
+
"success",
|
|
40
|
+
"danger",
|
|
41
|
+
"warning",
|
|
42
|
+
"primary",
|
|
43
|
+
"secondary",
|
|
44
|
+
"info",
|
|
45
|
+
"none"
|
|
46
|
+
],
|
|
47
|
+
"type": "string"
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export type Karma =
|
|
2
|
+
| "success"
|
|
3
|
+
| "danger"
|
|
4
|
+
| "warning"
|
|
5
|
+
| "primary"
|
|
6
|
+
| "secondary"
|
|
7
|
+
| "info"
|
|
8
|
+
/** Use `--hb--dashboard-indicator-background` on the host instead of Bulma `karma` tokens. */
|
|
9
|
+
| "none";
|
|
10
|
+
|
|
1
11
|
export type Component = {
|
|
2
12
|
id?: string;
|
|
3
13
|
style?: string;
|
|
@@ -5,6 +15,11 @@ export type Component = {
|
|
|
5
15
|
text?: string;
|
|
6
16
|
icon: string;
|
|
7
17
|
link_label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Semantic accent from Bulma (`secondary` → `dark` tokens), or `none` for a custom host color via
|
|
20
|
+
* `--hb--dashboard-indicator-background`.
|
|
21
|
+
*/
|
|
22
|
+
karma?: Karma;
|
|
8
23
|
};
|
|
9
24
|
|
|
10
25
|
export type Events = {
|