@f-ewald/components 1.8.0 → 1.10.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 +3 -0
- package/custom-elements.json +359 -0
- package/dist/button-group.d.ts +38 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +170 -0
- package/dist/button-group.js.map +1 -0
- package/dist/card-grid.d.ts +19 -0
- package/dist/card-grid.d.ts.map +1 -0
- package/dist/card-grid.js +44 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/link-card.d.ts +34 -0
- package/dist/link-card.d.ts.map +1 -0
- package/dist/link-card.js +197 -0
- package/dist/link-card.js.map +1 -0
- package/dist/stat-meter.d.ts +2 -0
- package/dist/stat-meter.d.ts.map +1 -1
- package/dist/stat-meter.js +8 -2
- package/dist/stat-meter.js.map +1 -1
- package/docs/button-group.md +64 -0
- package/docs/card-grid.md +44 -0
- package/docs/link-card.md +65 -0
- package/docs/stat-meter.md +1 -0
- package/llms.txt +83 -1
- package/package.json +1 -1
package/docs/stat-meter.md
CHANGED
|
@@ -27,6 +27,7 @@ import "@f-ewald/components/stat-meter.js";
|
|
|
27
27
|
| `label` | `label` | `string` | `""` | Short label shown before the bar, e.g. "CPU" or "MEM". |
|
|
28
28
|
| `percent` | `percent` | `number | null` | `null` | Percentage 0-100. `null` renders an empty bar and a "—" value instead of "0%". |
|
|
29
29
|
| `color` | `color` | `string` | `""` | Fill color override; falls back to the `--ui-success` token. |
|
|
30
|
+
| `trackColor` | `track-color` | `string` | `""` | Track (inactive portion) background override; falls back to the `--ui-surface-muted` token. |
|
|
30
31
|
|
|
31
32
|
## Events
|
|
32
33
|
|
package/llms.txt
CHANGED
|
@@ -212,6 +212,36 @@ Example:
|
|
|
212
212
|
</script>
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
+
## <button-group>
|
|
216
|
+
|
|
217
|
+
Single-select segmented control — a strip of buttons joined into one
|
|
218
|
+
shared-border shape, for a small, persistent set of mutually exclusive
|
|
219
|
+
choices (a view switcher, a theme picker) where the *currently selected*
|
|
220
|
+
option should read as visually "pressed," not just checked. For many
|
|
221
|
+
short, individually pill-shaped choices, use `radio-pills` instead. Wraps
|
|
222
|
+
native radio inputs for keyboard/a11y and fires `change` rather than
|
|
223
|
+
relying on form submission.
|
|
224
|
+
|
|
225
|
+
Import: `import "@f-ewald/components/button-group.js";`
|
|
226
|
+
|
|
227
|
+
Properties: `options` (JS property only) : ButtonGroupOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
|
|
228
|
+
Events: `change`
|
|
229
|
+
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`
|
|
230
|
+
|
|
231
|
+
Example:
|
|
232
|
+
```html
|
|
233
|
+
<button-group></button-group>
|
|
234
|
+
<script type="module">
|
|
235
|
+
const el = document.querySelector("button-group");
|
|
236
|
+
el.options = [
|
|
237
|
+
{ value: "list", label: "List" },
|
|
238
|
+
{ value: "kanban", label: "Kanban" },
|
|
239
|
+
];
|
|
240
|
+
el.value = "list";
|
|
241
|
+
el.addEventListener("change", (e) => console.log(e.detail.value));
|
|
242
|
+
</script>
|
|
243
|
+
```
|
|
244
|
+
|
|
215
245
|
## <calendar-entry>
|
|
216
246
|
|
|
217
247
|
Declarative metadata for one calendar event, consumed by a parent
|
|
@@ -310,6 +340,32 @@ Example:
|
|
|
310
340
|
</calendar-year>
|
|
311
341
|
```
|
|
312
342
|
|
|
343
|
+
## <card-grid>
|
|
344
|
+
|
|
345
|
+
A responsive auto-filling grid shell for `link-card` (or any card-shaped
|
|
346
|
+
content) — each slotted child becomes a grid item, wrapping to a new row
|
|
347
|
+
once the container is too narrow for another `15rem` column.
|
|
348
|
+
|
|
349
|
+
Import: `import "@f-ewald/components/card-grid.js";`
|
|
350
|
+
|
|
351
|
+
Properties: none
|
|
352
|
+
Events: none
|
|
353
|
+
CSS custom properties: none
|
|
354
|
+
|
|
355
|
+
Example:
|
|
356
|
+
```html
|
|
357
|
+
<card-grid>
|
|
358
|
+
<link-card
|
|
359
|
+
heading="Grafana"
|
|
360
|
+
description="Metrics dashboards."
|
|
361
|
+
href="https://grafana.example.com"
|
|
362
|
+
logo="/logos/grafana.svg"
|
|
363
|
+
status="up"
|
|
364
|
+
></link-card>
|
|
365
|
+
<link-card heading="Plex" description="Media server." href="https://plex.example.com" status="up"></link-card>
|
|
366
|
+
</card-grid>
|
|
367
|
+
```
|
|
368
|
+
|
|
313
369
|
## <chat-message>
|
|
314
370
|
|
|
315
371
|
One conversation entry in a chat-style activity feed. Tool calls and
|
|
@@ -809,6 +865,32 @@ Example:
|
|
|
809
865
|
<kbd-hint keys="Mod+Shift+Enter" platform="mac"></kbd-hint>
|
|
810
866
|
```
|
|
811
867
|
|
|
868
|
+
## <link-card>
|
|
869
|
+
|
|
870
|
+
A single linked-resource tile — logo (or an initial-letter fallback),
|
|
871
|
+
heading, optional description, and an optional reachability status dot.
|
|
872
|
+
Renders as a real `<a>` (opening in a new tab) when `href` is set, or a
|
|
873
|
+
non-interactive `<div>` otherwise. Meant to be laid out inside
|
|
874
|
+
`card-grid`, mirroring how `gallery-item` pairs with `photo-gallery`.
|
|
875
|
+
|
|
876
|
+
Import: `import "@f-ewald/components/link-card.js";`
|
|
877
|
+
|
|
878
|
+
Properties: `heading` (attribute `heading`) : string, default ""; `description` (attribute `description`) : string, default ""; `href` (attribute `href`) : string, default ""; `logo` (attribute `logo`) : string, default ""; `status` (attribute `status`) : LinkCardStatus, default ""
|
|
879
|
+
Events: none
|
|
880
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-lg`, `--ui-font-weight-semibold`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-radius`, `--ui-shadow`, `--ui-success`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
881
|
+
|
|
882
|
+
Example:
|
|
883
|
+
```html
|
|
884
|
+
<link-card
|
|
885
|
+
heading="Grafana"
|
|
886
|
+
description="Metrics dashboards."
|
|
887
|
+
href="https://grafana.example.com"
|
|
888
|
+
logo="/logos/grafana.svg"
|
|
889
|
+
status="up"
|
|
890
|
+
></link-card>
|
|
891
|
+
<link-card heading="Backup Server" description="Nightly restic snapshots." status="checking"></link-card>
|
|
892
|
+
```
|
|
893
|
+
|
|
812
894
|
## <live-timer>
|
|
813
895
|
|
|
814
896
|
Per-second ticking count-up timer, e.g. a live "running for 12s" or
|
|
@@ -1235,7 +1317,7 @@ bar then renders empty and the value shows an em dash instead of "0%".
|
|
|
1235
1317
|
|
|
1236
1318
|
Import: `import "@f-ewald/components/stat-meter.js";`
|
|
1237
1319
|
|
|
1238
|
-
Properties: `label` (attribute `label`) : string, default ""; `percent` (attribute `percent`) : number | null, default null; `color` (attribute `color`) : string, default ""
|
|
1320
|
+
Properties: `label` (attribute `label`) : string, default ""; `percent` (attribute `percent`) : number | null, default null; `color` (attribute `color`) : string, default ""; `trackColor` (attribute `track-color`) : string, default ""
|
|
1239
1321
|
Events: none
|
|
1240
1322
|
CSS custom properties: `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-success`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`, `--ui-tracking-wide`
|
|
1241
1323
|
|