@htmlbricks/hb-dashboard-indicator 0.71.36 → 0.72.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/README.md CHANGED
@@ -19,9 +19,9 @@ Accent color (“karma”) is either a **Bulma semantic palette** on `:host` (`s
19
19
 
20
20
  ### Rendering
21
21
 
22
- - **`number`:** Shown as the main value (Bulma `title is-3`, with tightened line-height for a compact header). In markup, pass it as a **string** (web component attributes are always strings); the component coerces to a number internally (default `0` if omitted in implementation).
22
+ - **`number`:** Shown as the main value (Bulma `title is-3`, with tightened line-height for a compact header). In markup, pass it as a **string** (web component attributes are always strings); the component coerces to a number internally (default **`0`** when omitted).
23
23
  - **`text`:** Optional subtitle under the number (Bulma `subtitle is-7`). Empty string hides the subtitle line container content but the layout still reserves flow; empty caption is visually minimal.
24
- - **`icon`:** Bootstrap Icons **glyph name only** (no `bi-` prefix). Rendered as `<i class="bi bi-{icon}">`. Implementation default if unset is **`hypnotize`**; TypeScript types mark `icon` as required—treat omission as “framework default icon” when integrating from HTML.
24
+ - **`icon`:** Bootstrap Icons **glyph name only** (no `bi-` prefix). Rendered as `<i class="bi bi-{icon}">`. Implementation default if unset is **`hypnotize`**; the authoring type marks `icon` as optional to mirror HTML usage.
25
25
  - **`link_label`:** If **non-empty**, a **footer** strip is rendered with the label and a right-pointing circle arrow icon. If empty or unset, **no footer** and **no** `dashboardIndicatorClick` from this control (there is nothing to click).
26
26
  - **`id`:** Optional string forwarded in **`dashboardIndicatorClick`** detail as `{ id: string }`. If unset, detail is `{ id: "" }`.
27
27
 
@@ -86,9 +86,9 @@ Web components reflect **string** attributes. Use JSON only where a future API r
86
86
  | Attribute | Required | Default (behavior) | Description |
87
87
  | --- | --- | --- | --- |
88
88
  | `id` | No | `""` | Passed through in `dashboardIndicatorClick` detail. |
89
- | `number` | Recommended | `0` | Main KPI; pass as string, e.g. `"42"`. |
89
+ | `number` | No | `0` | Main KPI; pass as string, e.g. `"42"`. |
90
90
  | `text` | No | `""` | Caption under the number. |
91
- | `icon` | Yes (types) | `"hypnotize"` in implementation | Bootstrap Icons name without `bi-` prefix. |
91
+ | `icon` | No | `"hypnotize"` in implementation | Bootstrap Icons name without `bi-` prefix. |
92
92
  | `link_label` | No | `""` | If set, shows footer and enables click + event. |
93
93
  | `karma` | No | `"success"` | Accent mode; see Behavior. |
94
94
  | `style` | No | — | Standard HTML: useful to set `--hb--dashboard-indicator-background` and other variables on the host. |
@@ -157,9 +157,9 @@ export type Karma =
157
157
  export type Component = {
158
158
  id?: string;
159
159
  style?: string;
160
- number: number;
160
+ number?: number;
161
161
  text?: string;
162
- icon: string;
162
+ icon?: string;
163
163
  link_label?: string;
164
164
  karma?: Karma;
165
165
  };
package/manifest.json CHANGED
@@ -57,10 +57,6 @@
57
57
  "type": "string"
58
58
  }
59
59
  },
60
- "required": [
61
- "number",
62
- "icon"
63
- ],
64
60
  "type": "object"
65
61
  },
66
62
  "Karma": {
@@ -207,5 +203,5 @@
207
203
  "size": {},
208
204
  "iifePath": "main.iife.js",
209
205
  "repoName": "@htmlbricks/hb-dashboard-indicator",
210
- "version": "0.71.36"
206
+ "version": "0.72.0"
211
207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-dashboard-indicator",
3
- "version": "0.71.36",
3
+ "version": "0.72.0",
4
4
  "contributors": [],
5
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": [
@@ -28,10 +28,6 @@
28
28
  "type": "string"
29
29
  }
30
30
  },
31
- "required": [
32
- "number",
33
- "icon"
34
- ],
35
31
  "type": "object"
36
32
  },
37
33
  "Karma": {
@@ -11,9 +11,9 @@ export type Karma =
11
11
  export type Component = {
12
12
  id?: string;
13
13
  style?: string;
14
- number: number;
14
+ number?: number;
15
15
  text?: string;
16
- icon: string;
16
+ icon?: string;
17
17
  link_label?: string;
18
18
  /**
19
19
  * Semantic accent from Bulma (`secondary` → `dark` tokens), or `none` for a custom host color via