@f-ewald/components 1.18.0 → 1.20.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/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,
@@ -1682,6 +1713,54 @@ Example:
1682
1713
  <status-pill label="Blocked" color="danger"></status-pill>
1683
1714
  ```
1684
1715
 
1716
+ ## <tab-bar>
1717
+
1718
+ WAI-ARIA tabs pattern (automatic activation, roving tabindex) driving a
1719
+ strip of declarative `tab-item` children. `tab-bar` renders the `role="tab"`
1720
+ button strip itself, reading `label`/`value`/`selected` off each slotted
1721
+ `tab-item`; each `tab-item` owns its own visibility via its reflected
1722
+ `selected` attribute.
1723
+
1724
+ The active tab's underline uses `--ui-primary`; a `--ui-border` line spans
1725
+ the full strip beneath every tab, standing in for the inactive state since
1726
+ this design system has no dedicated secondary accent color.
1727
+
1728
+ Import: `import "@f-ewald/components/tab-bar.js";`
1729
+
1730
+ Properties: `label` (attribute `label`) : string, default ""
1731
+ Events: `change`
1732
+ 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`
1733
+
1734
+ Example:
1735
+ ```html
1736
+ <tab-bar label="Project sections">
1737
+ <tab-item label="Overview" value="overview" selected>Overview content</tab-item>
1738
+ <tab-item label="Activity" value="activity">Activity content</tab-item>
1739
+ <tab-item label="Settings" value="settings">Settings content</tab-item>
1740
+ </tab-bar>
1741
+ <script type="module">
1742
+ document.querySelector("tab-bar").addEventListener("change", (e) => console.log(e.detail.value));
1743
+ </script>
1744
+ ```
1745
+
1746
+ ## <tab-item>
1747
+
1748
+ A single labeled panel inside a `tab-bar`. Renders its default slot as an
1749
+ ARIA `tabpanel`, shown or hidden based on `selected` — `tab-bar` reads
1750
+ `label`/`value` to build its tab strip and toggles `selected` on the
1751
+ active panel.
1752
+
1753
+ Import: `import "@f-ewald/components/tab-item.js";`
1754
+
1755
+ Properties: `label` (attribute `label`) : string, default ""; `value` (attribute `value`) : string, default ""; `selected` (attribute `selected`) : boolean, default false
1756
+ Events: none
1757
+ CSS custom properties: none
1758
+
1759
+ Example:
1760
+ ```html
1761
+ <tab-item></tab-item>
1762
+ ```
1763
+
1685
1764
  ## <text-area>
1686
1765
 
1687
1766
  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.18.0",
4
+ "version": "1.20.0",
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": {