@f-ewald/components 1.19.0 → 1.21.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.
@@ -0,0 +1,40 @@
1
+ # `<tab-item>`
2
+
3
+ A single labeled panel inside a `tab-bar`. Renders its default slot as an
4
+ ARIA `tabpanel`, shown or hidden based on `selected` — `tab-bar` reads
5
+ `label`/`value` to build its tab strip and toggles `selected` on the
6
+ active panel.
7
+
8
+ ## Install
9
+
10
+ ```js
11
+ import "@f-ewald/components/tab-item.js";
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```html
17
+ <tab-item></tab-item>
18
+ ```
19
+
20
+ ## Attributes / properties
21
+
22
+ | Property | Attribute | Type | Default | Description |
23
+ | --- | --- | --- | --- | --- |
24
+ | `label` | `label` | `string` | `""` | Text shown in the tab-bar's tab button for this panel. |
25
+ | `value` | `value` | `string` | `""` | Stable identifier reported in `tab-bar`'s `change` event; defaults to `label`. |
26
+ | `selected` | `selected` | `boolean` | `false` | Whether this panel is the active one; `tab-bar` owns this. |
27
+
28
+ ## Events
29
+
30
+ _None._
31
+
32
+ ## Slots
33
+
34
+ | Slot | Description |
35
+ | --- | --- |
36
+ | `(default)` | Panel content, shown only while `selected`. |
37
+
38
+ ## CSS custom properties
39
+
40
+ _None._
package/llms.txt CHANGED
@@ -1120,6 +1120,37 @@ Example:
1120
1120
  </script>
1121
1121
  ```
1122
1122
 
1123
+ ## <markdown-editor>
1124
+
1125
+ GitHub-style markdown editor: a "Write" tab holding a plain textarea and a
1126
+ "Preview" tab rendering the markdown body (via `markdown-view`). Leading
1127
+ YAML front matter (a `---`-delimited block) is detected, parsed, and shown
1128
+ as a key-value table above the rendered body rather than as raw text.
1129
+
1130
+ Import: `import "@f-ewald/components/markdown-editor.js";`
1131
+
1132
+ Properties: `value` (attribute `value`) : string, default ""; `rows` (attribute `rows`) : number, default 12; `placeholder` (attribute `placeholder`) : string, default ""
1133
+ Events: `input`, `change`
1134
+ CSS custom properties: `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-normal`, `--ui-text`, `--ui-text-muted`
1135
+
1136
+ Example:
1137
+ ```html
1138
+ <markdown-editor></markdown-editor>
1139
+ <script type="module">
1140
+ const el = document.querySelector("markdown-editor");
1141
+ el.value = `---
1142
+ title: Weekly status
1143
+ author: Ada Lovelace
1144
+ tags: [engineering, updates]
1145
+ ---
1146
+
1147
+ # Weekly status
1148
+
1149
+ Some **markdown** content here.`;
1150
+ el.addEventListener("input", (e) => console.log(e.detail.value));
1151
+ </script>
1152
+ ```
1153
+
1123
1154
  ## <markdown-view>
1124
1155
 
1125
1156
  Renders a markdown string as sanitized, styled HTML — headings, lists,
@@ -1665,6 +1696,33 @@ Example:
1665
1696
  <stat-meter label="GPU" percent="88" color="#dc2626"></stat-meter>
1666
1697
  ```
1667
1698
 
1699
+ ## <status-banner>
1700
+
1701
+ Full-width, app-level status bar for a persistent condition — "Reconnecting…",
1702
+ "Read-only mode", "New version available". Unlike `toast-notification` (which
1703
+ is transient, imperative, and stacks in a corner) this stays put for as long
1704
+ as the condition holds, so the consumer controls its presence by rendering it
1705
+ or not.
1706
+
1707
+ Colors mirror `status-pill`: a tinted background with accent-colored text.
1708
+ Announced to assistive tech via `role="status"` (or `role="alert"` for the
1709
+ `danger` variant, matching `toast-notification`'s split).
1710
+
1711
+ Import: `import "@f-ewald/components/status-banner.js";`
1712
+
1713
+ Properties: `variant` (attribute `variant`) : StatusBannerVariant, default "info"; `icon` (JS property only) : TemplateResult | null, default null
1714
+ Events: none
1715
+ CSS custom properties: `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-info`, `--ui-line-height-normal`, `--ui-success`, `--ui-text-muted`, `--ui-warning`
1716
+
1717
+ Example:
1718
+ ```html
1719
+ <status-banner variant="warning">Reconnecting… — data may be stale</status-banner>
1720
+ <status-banner variant="info">
1721
+ A new version is available.
1722
+ <button slot="actions">Reload</button>
1723
+ </status-banner>
1724
+ ```
1725
+
1668
1726
  ## <status-pill>
1669
1727
 
1670
1728
  Small colored status pill, optionally with a spinning icon — for task/run
@@ -1682,6 +1740,54 @@ Example:
1682
1740
  <status-pill label="Blocked" color="danger"></status-pill>
1683
1741
  ```
1684
1742
 
1743
+ ## <tab-bar>
1744
+
1745
+ WAI-ARIA tabs pattern (automatic activation, roving tabindex) driving a
1746
+ strip of declarative `tab-item` children. `tab-bar` renders the `role="tab"`
1747
+ button strip itself, reading `label`/`value`/`selected` off each slotted
1748
+ `tab-item`; each `tab-item` owns its own visibility via its reflected
1749
+ `selected` attribute.
1750
+
1751
+ The active tab's underline uses `--ui-primary`; a `--ui-border` line spans
1752
+ the full strip beneath every tab, standing in for the inactive state since
1753
+ this design system has no dedicated secondary accent color.
1754
+
1755
+ Import: `import "@f-ewald/components/tab-bar.js";`
1756
+
1757
+ Properties: `label` (attribute `label`) : string, default ""
1758
+ Events: `change`
1759
+ CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
1760
+
1761
+ Example:
1762
+ ```html
1763
+ <tab-bar label="Project sections">
1764
+ <tab-item label="Overview" value="overview" selected>Overview content</tab-item>
1765
+ <tab-item label="Activity" value="activity">Activity content</tab-item>
1766
+ <tab-item label="Settings" value="settings">Settings content</tab-item>
1767
+ </tab-bar>
1768
+ <script type="module">
1769
+ document.querySelector("tab-bar").addEventListener("change", (e) => console.log(e.detail.value));
1770
+ </script>
1771
+ ```
1772
+
1773
+ ## <tab-item>
1774
+
1775
+ A single labeled panel inside a `tab-bar`. Renders its default slot as an
1776
+ ARIA `tabpanel`, shown or hidden based on `selected` — `tab-bar` reads
1777
+ `label`/`value` to build its tab strip and toggles `selected` on the
1778
+ active panel.
1779
+
1780
+ Import: `import "@f-ewald/components/tab-item.js";`
1781
+
1782
+ Properties: `label` (attribute `label`) : string, default ""; `value` (attribute `value`) : string, default ""; `selected` (attribute `selected`) : boolean, default false
1783
+ Events: none
1784
+ CSS custom properties: none
1785
+
1786
+ Example:
1787
+ ```html
1788
+ <tab-item></tab-item>
1789
+ ```
1790
+
1685
1791
  ## <text-area>
1686
1792
 
1687
1793
  Plain multi-line text field — a thin, tokenized wrapper around a native
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.19.0",
4
+ "version": "1.21.1",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -67,6 +67,7 @@
67
67
  "lit": "^3.3.3",
68
68
  "mapbox-gl": "^3.9.0",
69
69
  "marked": "^18.0.7",
70
+ "yaml": "^2.9.0",
70
71
  "zod": "^4.4.3"
71
72
  },
72
73
  "publishConfig": {