@f-ewald/components 1.40.2 → 1.41.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 +11 -3
- package/custom-elements.json +788 -97
- package/dist/app-shell.js +1 -1
- package/dist/app-shell.js.map +1 -1
- package/dist/blink-cursor.d.ts +27 -0
- package/dist/blink-cursor.d.ts.map +1 -0
- package/dist/blink-cursor.js +78 -0
- package/dist/blink-cursor.js.map +1 -0
- package/dist/button-group.d.ts.map +1 -1
- package/dist/button-group.js +3 -0
- package/dist/button-group.js.map +1 -1
- package/dist/calendar-day.d.ts.map +1 -1
- package/dist/calendar-day.js +5 -0
- package/dist/calendar-day.js.map +1 -1
- package/dist/calendar-week.d.ts.map +1 -1
- package/dist/calendar-week.js +5 -0
- package/dist/calendar-week.js.map +1 -1
- package/dist/code-diff.d.ts +41 -0
- package/dist/code-diff.d.ts.map +1 -0
- package/dist/code-diff.js +161 -0
- package/dist/code-diff.js.map +1 -0
- package/dist/comment-label.d.ts +26 -0
- package/dist/comment-label.d.ts.map +1 -0
- package/dist/comment-label.js +81 -0
- package/dist/comment-label.js.map +1 -0
- package/dist/confirm-dialog.d.ts +12 -6
- package/dist/confirm-dialog.d.ts.map +1 -1
- package/dist/confirm-dialog.js +50 -88
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/frame-box.d.ts.map +1 -1
- package/dist/frame-box.js +4 -0
- package/dist/frame-box.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +1 -1
- package/dist/mcp-server.js.map +1 -1
- package/dist/modal-dialog.d.ts +16 -13
- package/dist/modal-dialog.d.ts.map +1 -1
- package/dist/modal-dialog.js +69 -104
- package/dist/modal-dialog.js.map +1 -1
- package/dist/photo-gallery.js +1 -1
- package/dist/photo-gallery.js.map +1 -1
- package/dist/price-history-chart.js +1 -1
- package/dist/price-history-chart.js.map +1 -1
- package/dist/progress-bar.d.ts.map +1 -1
- package/dist/progress-bar.js +23 -17
- package/dist/progress-bar.js.map +1 -1
- package/dist/radio-pills.d.ts.map +1 -1
- package/dist/radio-pills.js +3 -0
- package/dist/radio-pills.js.map +1 -1
- package/dist/slide-panel.d.ts +3 -3
- package/dist/slide-panel.d.ts.map +1 -1
- package/dist/slide-panel.js +38 -22
- package/dist/slide-panel.js.map +1 -1
- package/dist/stat-strip.d.ts +30 -0
- package/dist/stat-strip.d.ts.map +1 -0
- package/dist/stat-strip.js +111 -0
- package/dist/stat-strip.js.map +1 -0
- package/dist/step-ladder.d.ts +46 -0
- package/dist/step-ladder.d.ts.map +1 -0
- package/dist/step-ladder.js +175 -0
- package/dist/step-ladder.js.map +1 -0
- package/dist/terminal-block.d.ts +45 -0
- package/dist/terminal-block.d.ts.map +1 -0
- package/dist/terminal-block.js +113 -0
- package/dist/terminal-block.js.map +1 -0
- package/dist/tile-grid.d.ts.map +1 -1
- package/dist/tile-grid.js +3 -0
- package/dist/tile-grid.js.map +1 -1
- package/dist/toast-notification.d.ts +7 -0
- package/dist/toast-notification.d.ts.map +1 -1
- package/dist/toast-notification.js +34 -0
- package/dist/toast-notification.js.map +1 -1
- package/dist/tokens.css +60 -1
- package/dist/tokens.d.ts +58 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +135 -0
- package/dist/tokens.js.map +1 -1
- package/dist/ui-button.js +2 -2
- package/dist/ui-button.js.map +1 -1
- package/dist/window-chrome.d.ts +34 -0
- package/dist/window-chrome.d.ts.map +1 -0
- package/dist/window-chrome.js +141 -0
- package/dist/window-chrome.js.map +1 -0
- package/docs/app-shell.md +1 -1
- package/docs/blink-cursor.md +45 -0
- package/docs/code-diff.md +64 -0
- package/docs/comment-label.md +49 -0
- package/docs/confirm-dialog.md +4 -3
- package/docs/design-language.md +80 -28
- package/docs/layouts/marketing-landing.md +102 -0
- package/docs/modal-dialog.md +9 -9
- package/docs/photo-gallery.md +1 -1
- package/docs/price-history-chart.md +1 -0
- package/docs/radio-pills.md +1 -0
- package/docs/slide-panel.md +2 -2
- package/docs/stat-strip.md +57 -0
- package/docs/step-ladder.md +63 -0
- package/docs/terminal-block.md +69 -0
- package/docs/tile-grid.md +1 -0
- package/docs/ui-button.md +2 -0
- package/docs/window-chrome.md +64 -0
- package/llms.txt +227 -20
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `<window-chrome>`
|
|
2
|
+
|
|
3
|
+
Sticky editor/terminal-style chrome bar for the top edge of a page or panel:
|
|
4
|
+
three decorative traffic-light dots, a filename-style label, and a
|
|
5
|
+
right-aligned actions slot for controls such as a theme toggle.
|
|
6
|
+
|
|
7
|
+
The text property is named `label` rather than `title`, matching
|
|
8
|
+
`page-header`'s text-property precedent and avoiding confusion with the
|
|
9
|
+
global HTML `title` tooltip attribute. The dots are purely decorative, are
|
|
10
|
+
hidden from assistive technology, and reuse the semantic `--ui-danger`,
|
|
11
|
+
`--ui-warning`, and `--ui-success` tokens rather than introducing
|
|
12
|
+
chrome-only colors.
|
|
13
|
+
|
|
14
|
+
It sticks with `position: sticky; top: 0`, so callers must place it at the
|
|
15
|
+
top of the element that actually scrolls. Its `z-index: 1` is a deliberate
|
|
16
|
+
plain literal: just enough to keep the bar above in-flow content as it
|
|
17
|
+
sticks, while staying far below the shared overlay stack (dialogs/popovers
|
|
18
|
+
start at 100), so it does not participate in `utils/layer-stack.ts`.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import "@f-ewald/components/window-chrome.js";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<window-chrome label="~/product — README.md">
|
|
30
|
+
<icon-button slot="actions" label="Toggle theme"></icon-button>
|
|
31
|
+
</window-chrome>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Attributes / properties
|
|
35
|
+
|
|
36
|
+
| Property | Attribute | Type | Default | Description |
|
|
37
|
+
| --- | --- | --- | --- | --- |
|
|
38
|
+
| `label` | `label` | `string` | `""` | Filename-style text shown beside the decorative dots. |
|
|
39
|
+
|
|
40
|
+
## Events
|
|
41
|
+
|
|
42
|
+
_None._
|
|
43
|
+
|
|
44
|
+
## Slots
|
|
45
|
+
|
|
46
|
+
_None._
|
|
47
|
+
|
|
48
|
+
## CSS custom properties
|
|
49
|
+
|
|
50
|
+
| Custom property |
|
|
51
|
+
| --- |
|
|
52
|
+
| `--ui-border` |
|
|
53
|
+
| `--ui-border-width` |
|
|
54
|
+
| `--ui-danger` |
|
|
55
|
+
| `--ui-font` |
|
|
56
|
+
| `--ui-font-mono` |
|
|
57
|
+
| `--ui-font-size-sm` |
|
|
58
|
+
| `--ui-font-weight-regular` |
|
|
59
|
+
| `--ui-line-height-tight` |
|
|
60
|
+
| `--ui-radius-circle` |
|
|
61
|
+
| `--ui-success` |
|
|
62
|
+
| `--ui-surface-muted` |
|
|
63
|
+
| `--ui-text-muted` |
|
|
64
|
+
| `--ui-warning` |
|
package/llms.txt
CHANGED
|
@@ -226,7 +226,7 @@ Import: `import "@f-ewald/components/app-shell.js";`
|
|
|
226
226
|
|
|
227
227
|
Properties: `sidebarOpen` (attribute `sidebar-open`) : boolean, default false; `sidebarMode` (attribute `sidebar-mode`) : "overlay" | "push", default "overlay"; `sidebarWidth` (attribute `sidebar-width`) : "full" | "icon", default "full"; `detailOpen` (attribute `detail-open`) : boolean, default false; `detailWidth` (attribute `detail-width`) : "compact" | "comfortable", default "compact"; `noTopbar` (attribute `no-topbar`) : boolean, default false
|
|
228
228
|
Events: `sidebar-toggle`, `detail-close`
|
|
229
|
-
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-
|
|
229
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-overlay`, `--ui-radius-sm`, `--ui-shadow`, `--ui-shadow-lg`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`, `--ui-tooltip`, `--ui-tooltip-text`
|
|
230
230
|
|
|
231
231
|
Example:
|
|
232
232
|
```html
|
|
@@ -387,6 +387,30 @@ Example:
|
|
|
387
387
|
</script>
|
|
388
388
|
```
|
|
389
389
|
|
|
390
|
+
## <blink-cursor>
|
|
391
|
+
|
|
392
|
+
A small inline blinking cursor glyph for terminal- or editor-styled
|
|
393
|
+
headings, prompts, and status lines. It renders its own decorative
|
|
394
|
+
character so consumers can append it directly to adjacent text while
|
|
395
|
+
inheriting the surrounding typography.
|
|
396
|
+
|
|
397
|
+
The cursor uses the shared `--ui-primary` accent color so it reads as an
|
|
398
|
+
active insertion point across themes. Change `char` to swap the glyph (for
|
|
399
|
+
example `|` or `▋`). Under `prefers-reduced-motion` the blink stops and the
|
|
400
|
+
cursor remains visible.
|
|
401
|
+
|
|
402
|
+
Import: `import "@f-ewald/components/blink-cursor.js";`
|
|
403
|
+
|
|
404
|
+
Properties: `char` (attribute `char`) : string, default "▋"
|
|
405
|
+
Events: none
|
|
406
|
+
CSS custom properties: `--ui-line-height-glyph`, `--ui-primary`
|
|
407
|
+
|
|
408
|
+
Example:
|
|
409
|
+
```html
|
|
410
|
+
<h1>ponytail<blink-cursor></blink-cursor></h1>
|
|
411
|
+
<p>~/ponytail ❯ <blink-cursor char="|"></blink-cursor></p>
|
|
412
|
+
```
|
|
413
|
+
|
|
390
414
|
## <breadcrumb-nav>
|
|
391
415
|
|
|
392
416
|
A breadcrumb trail: a `<nav aria-label="Breadcrumb">` wrapping an ordered
|
|
@@ -707,6 +731,37 @@ Example:
|
|
|
707
731
|
</script>
|
|
708
732
|
```
|
|
709
733
|
|
|
734
|
+
## <code-diff>
|
|
735
|
+
|
|
736
|
+
A compact, read-only code diff viewer: a bordered panel with a header bar
|
|
737
|
+
for `filename` and `stat`, followed by a numbered `<pre>` listing of
|
|
738
|
+
`lines`. Each CodeDiffLine renders as `"add"`, `"del"`, or
|
|
739
|
+
`"context"` with fixed `"+ "` / `"- "` / `" "` prefixes so the diff
|
|
740
|
+
remains understandable even when color is unavailable.
|
|
741
|
+
|
|
742
|
+
Added and removed rows reuse `--ui-success` / `--ui-danger` for their text
|
|
743
|
+
and low-alpha background washes, while the shell itself reuses
|
|
744
|
+
`--ui-font-mono`, `--ui-border`, and `--ui-surface`. The caller owns the
|
|
745
|
+
data shape entirely: `filename` and `stat` are passed through verbatim, and
|
|
746
|
+
`lines` is a flat ordered array of `{ type, text }` objects.
|
|
747
|
+
|
|
748
|
+
Import: `import "@f-ewald/components/code-diff.js";`
|
|
749
|
+
|
|
750
|
+
Properties: `filename` (attribute `filename`) : string, default ""; `stat` (attribute `stat`) : string, default ""; `lines` (attribute `lines`) : CodeDiffLine[], default []
|
|
751
|
+
Events: none
|
|
752
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-danger`, `--ui-font-mono`, `--ui-font-size-sm`, `--ui-line-height-normal`, `--ui-numeric`, `--ui-radius`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
753
|
+
|
|
754
|
+
Example:
|
|
755
|
+
```html
|
|
756
|
+
<code-diff filename="cache.py" stat="−48 +1"></code-diff>
|
|
757
|
+
<script type="module">
|
|
758
|
+
document.querySelector("code-diff").lines = [
|
|
759
|
+
{ type: "del", text: "class CacheManager:" },
|
|
760
|
+
{ type: "add", text: "@lru_cache(maxsize=1000)" },
|
|
761
|
+
];
|
|
762
|
+
</script>
|
|
763
|
+
```
|
|
764
|
+
|
|
710
765
|
## <comment-composer>
|
|
711
766
|
|
|
712
767
|
GitHub/Slack-style comment composer: a one-line text field that expands
|
|
@@ -742,11 +797,33 @@ Example:
|
|
|
742
797
|
</script>
|
|
743
798
|
```
|
|
744
799
|
|
|
800
|
+
## <comment-label>
|
|
801
|
+
|
|
802
|
+
A code-comment-style eyebrow line for section chrome in terminal- or
|
|
803
|
+
editor-themed pages. It renders a colored comment marker (`##` by default)
|
|
804
|
+
before muted slotted text, so `<comment-label>the_whole_idea</comment-label>`
|
|
805
|
+
reads like a short section kicker. Set `prefix="//"` and `italic` for a
|
|
806
|
+
closing or footer quote line that keeps the marker upright while the message
|
|
807
|
+
itself turns italic.
|
|
808
|
+
|
|
809
|
+
Import: `import "@f-ewald/components/comment-label.js";`
|
|
810
|
+
|
|
811
|
+
Properties: `prefix` (attribute `prefix`) : string, default "##"; `italic` (attribute `italic`) : boolean, default false
|
|
812
|
+
Events: none
|
|
813
|
+
CSS custom properties: `--ui-font-mono`, `--ui-font-size-sm`, `--ui-font-weight-semibold`, `--ui-label-transform`, `--ui-line-height-tight`, `--ui-primary`, `--ui-text-muted`, `--ui-tracking-wide`
|
|
814
|
+
|
|
815
|
+
Example:
|
|
816
|
+
```html
|
|
817
|
+
<comment-label>the_whole_idea</comment-label>
|
|
818
|
+
<comment-label prefix="//" italic>the best code is the code never written.</comment-label>
|
|
819
|
+
```
|
|
820
|
+
|
|
745
821
|
## <confirm-dialog>
|
|
746
822
|
|
|
747
|
-
Reusable confirmation dialog:
|
|
748
|
-
|
|
749
|
-
|
|
823
|
+
Reusable confirmation dialog: a native modal `<dialog>` (top layer, inert
|
|
824
|
+
page behind it, built-in focus containment) with a slotted body, an
|
|
825
|
+
optional error line, and Cancel/Confirm actions. Instant open/close (no
|
|
826
|
+
transitions). Fires `confirm`/`cancel`
|
|
750
827
|
(bubbling, composed) instead of owning any deletion logic itself —
|
|
751
828
|
callers stay in charge of the request. Set `size="sm"` for compact
|
|
752
829
|
actions one step below the default, matching `ui-button`'s `sm` size.
|
|
@@ -1658,15 +1735,15 @@ See the [changelog](#markdown-view) for details.`;
|
|
|
1658
1735
|
|
|
1659
1736
|
## <modal-dialog>
|
|
1660
1737
|
|
|
1661
|
-
Generic centered modal-dialog shell:
|
|
1662
|
-
close button, and an arbitrary slotted body — the modal
|
|
1663
|
-
`slide-panel` (fixed-edge) and `popover-panel` (anchored).
|
|
1664
|
-
`confirm-dialog`, it has no baked-in actions; the consumer supplies
|
|
1665
|
-
body content (a form, a read-only viewer, a table) and any footer
|
|
1666
|
-
itself. Instant
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
`
|
|
1738
|
+
Generic centered modal-dialog shell: a native modal `<dialog>` card with
|
|
1739
|
+
header chrome, a close button, and an arbitrary slotted body — the modal
|
|
1740
|
+
sibling to `slide-panel` (fixed-edge) and `popover-panel` (anchored).
|
|
1741
|
+
Unlike `confirm-dialog`, it has no baked-in actions; the consumer supplies
|
|
1742
|
+
the body content (a form, a read-only viewer, a table) and any footer
|
|
1743
|
+
buttons itself. Instant open/close, no transition. Because it uses
|
|
1744
|
+
`showModal()`, it renders in the browser's top layer, makes the rest of the
|
|
1745
|
+
page inert, contains focus, and restores focus to the trigger on close;
|
|
1746
|
+
Escape is routed to the topmost layer only (see `utils/layer-stack`).
|
|
1670
1747
|
|
|
1671
1748
|
Import: `import "@f-ewald/components/modal-dialog.js";`
|
|
1672
1749
|
|
|
@@ -1851,7 +1928,7 @@ Import: `import "@f-ewald/components/photo-gallery.js";`
|
|
|
1851
1928
|
|
|
1852
1929
|
Properties: `currentIndex` (attribute `current-index`) : number, default 0; `delay` (attribute `delay`) : number, default 0; `showControls` (attribute `show-controls`) : boolean, default true; `showCounter` (attribute `show-counter`) : boolean, default false; `showIndicators` (attribute `show-indicators`) : boolean, default false; `showAutoplayControl` (attribute `show-autoplay-control`) : boolean, default true; `paused` (attribute `paused`) : boolean, default false; `aspectRatio` (attribute `aspect-ratio`) : string, default "16 / 9"; `objectFit` (attribute `object-fit`) : PhotoGalleryObjectFit, default "cover"
|
|
1853
1930
|
Events: `slide-change`
|
|
1854
|
-
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-
|
|
1931
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-overlay`, `--ui-overlay-text`, `--ui-primary`, `--ui-radius`, `--ui-radius-pill`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1855
1932
|
|
|
1856
1933
|
Example:
|
|
1857
1934
|
```html
|
|
@@ -1919,7 +1996,7 @@ Import: `import "@f-ewald/components/price-history-chart.js";`
|
|
|
1919
1996
|
|
|
1920
1997
|
Properties: `history` (attribute `history`) : PricePoint[], default []; `yLabels` (attribute `y-labels`) : "auto" | "always" | "never", default "auto"; `maxXLabels` (attribute `max-x-labels`) : number, default 3
|
|
1921
1998
|
Events: none
|
|
1922
|
-
CSS custom properties: `--ui-border`, `--ui-font`, `--ui-on-accent`, `--ui-primary`, `--ui-text-muted`, `--ui-tooltip`
|
|
1999
|
+
CSS custom properties: `--ui-border`, `--ui-font`, `--ui-on-accent`, `--ui-primary`, `--ui-text-muted`, `--ui-tooltip`, `--ui-tooltip-text`
|
|
1923
2000
|
|
|
1924
2001
|
Example:
|
|
1925
2002
|
```html
|
|
@@ -2020,7 +2097,7 @@ Import: `import "@f-ewald/components/radio-pills.js";`
|
|
|
2020
2097
|
|
|
2021
2098
|
Properties: `options` (JS property only) : RadioPillOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
|
|
2022
2099
|
Events: `change`
|
|
2023
|
-
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-pill`, `--ui-surface-muted`, `--ui-text`
|
|
2100
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-pill`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`
|
|
2024
2101
|
|
|
2025
2102
|
Example:
|
|
2026
2103
|
```html
|
|
@@ -2259,8 +2336,8 @@ Example:
|
|
|
2259
2336
|
|
|
2260
2337
|
## <slide-panel>
|
|
2261
2338
|
|
|
2262
|
-
Generic sliding panel shell
|
|
2263
|
-
header chrome, and a close button. Body content is provided via the
|
|
2339
|
+
Generic sliding panel shell: a non-modal native `<dialog>` (`show()`). Handles
|
|
2340
|
+
positioning, open/close animation, header chrome, and a close button. Body content is provided via the
|
|
2264
2341
|
default slot; the consumer controls its own padding and overflow.
|
|
2265
2342
|
|
|
2266
2343
|
Desktop: fixed right-side panel that slides from the right.
|
|
@@ -2371,6 +2448,33 @@ Example:
|
|
|
2371
2448
|
<stat-meter label="GPU" percent="88" color="#dc2626"></stat-meter>
|
|
2372
2449
|
```
|
|
2373
2450
|
|
|
2451
|
+
## <stat-strip>
|
|
2452
|
+
|
|
2453
|
+
A headless, presentational strip of headline stats — one large figure plus
|
|
2454
|
+
one muted caption per `items` entry, wrapping across lines on narrow
|
|
2455
|
+
viewports. Unlike `stat-meter`, this component does not compute percentages
|
|
2456
|
+
or render a fill bar: callers pass preformatted figure strings as-is and
|
|
2457
|
+
`stat-strip` only lays them out for marketing, benchmark, or dashboard
|
|
2458
|
+
summary rows.
|
|
2459
|
+
|
|
2460
|
+
Import: `import "@f-ewald/components/stat-strip.js";`
|
|
2461
|
+
|
|
2462
|
+
Properties: `items` (attribute `items`) : StatStripItem[], default []
|
|
2463
|
+
Events: none
|
|
2464
|
+
CSS custom properties: `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-bold`, `--ui-font-weight-medium`, `--ui-label-transform`, `--ui-line-height-tight`, `--ui-numeric`, `--ui-primary`, `--ui-text-muted`, `--ui-tracking-wide`
|
|
2465
|
+
|
|
2466
|
+
Example:
|
|
2467
|
+
```html
|
|
2468
|
+
<stat-strip></stat-strip>
|
|
2469
|
+
<script type="module">
|
|
2470
|
+
document.querySelector("stat-strip").items = [
|
|
2471
|
+
{ value: "54%", label: "less code" },
|
|
2472
|
+
{ value: "22%", label: "fewer tokens" },
|
|
2473
|
+
{ value: "100%", label: "safety kept" },
|
|
2474
|
+
];
|
|
2475
|
+
</script>
|
|
2476
|
+
```
|
|
2477
|
+
|
|
2374
2478
|
## <status-banner>
|
|
2375
2479
|
|
|
2376
2480
|
Full-width, app-level status bar for a persistent condition — "Reconnecting…",
|
|
@@ -2415,6 +2519,38 @@ Example:
|
|
|
2415
2519
|
<status-pill label="Blocked" color="danger"></status-pill>
|
|
2416
2520
|
```
|
|
2417
2521
|
|
|
2522
|
+
## <step-ladder>
|
|
2523
|
+
|
|
2524
|
+
A flat ordered ladder of fallback steps — an escalating "try this first,
|
|
2525
|
+
then move to the next rung only if it does not solve it" list. Each rung
|
|
2526
|
+
shows a zero-padded ordinal, a bold title, and a muted description, with a
|
|
2527
|
+
hairline rule between rows.
|
|
2528
|
+
|
|
2529
|
+
Feed it the `items` array for the plain data path, where each
|
|
2530
|
+
StepLadderItem supplies a `title` and `description`, or slot bare
|
|
2531
|
+
`<li>` steps when a rung needs links, emphasis, or other richer markup.
|
|
2532
|
+
Slotted content takes precedence over `items`; with neither, nothing is
|
|
2533
|
+
rendered. As with `spec-list`, richer wrapper elements are accepted too, but
|
|
2534
|
+
those own their own inner markup.
|
|
2535
|
+
|
|
2536
|
+
Import: `import "@f-ewald/components/step-ladder.js";`
|
|
2537
|
+
|
|
2538
|
+
Properties: `items` (attribute `items`) : StepLadderItem[], default []
|
|
2539
|
+
Events: none
|
|
2540
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-weight-bold`, `--ui-font-weight-regular`, `--ui-line-height-normal`, `--ui-numeric`, `--ui-primary`, `--ui-text`, `--ui-text-muted`
|
|
2541
|
+
|
|
2542
|
+
Example:
|
|
2543
|
+
```html
|
|
2544
|
+
<step-ladder></step-ladder>
|
|
2545
|
+
<script type="module">
|
|
2546
|
+
document.querySelector("step-ladder").items = [
|
|
2547
|
+
{ title: "Does this need to exist?", description: "Speculative need = skip it." },
|
|
2548
|
+
{ title: "Already in this codebase?", description: "Reuse the helper that already lives here." },
|
|
2549
|
+
{ title: "Does the standard library do it?", description: "Use it." },
|
|
2550
|
+
];
|
|
2551
|
+
</script>
|
|
2552
|
+
```
|
|
2553
|
+
|
|
2418
2554
|
## <tab-bar>
|
|
2419
2555
|
|
|
2420
2556
|
WAI-ARIA tabs pattern (automatic activation, roving tabindex) driving a
|
|
@@ -2463,6 +2599,45 @@ Example:
|
|
|
2463
2599
|
<tab-item></tab-item>
|
|
2464
2600
|
```
|
|
2465
2601
|
|
|
2602
|
+
## <terminal-block>
|
|
2603
|
+
|
|
2604
|
+
A headless, data-driven terminal transcript shell for short install or usage
|
|
2605
|
+
instructions. Callers provide a flat ordered `lines` array of
|
|
2606
|
+
`TerminalLine` objects, and the component renders each line exactly in that
|
|
2607
|
+
order with a type-driven visual treatment: `"prompt"` lines get a fixed
|
|
2608
|
+
leading `❯` marker in `--ui-primary`, `"comment"` lines render as dim italic
|
|
2609
|
+
guidance, and `"output"` lines render as plain terminal text.
|
|
2610
|
+
|
|
2611
|
+
The panel deliberately stays dark regardless of the surrounding page theme:
|
|
2612
|
+
it reuses `--ui-tooltip` for the surface and `--ui-tooltip-text` for the
|
|
2613
|
+
main foreground (not `--ui-on-accent` — that token means "text on a solid
|
|
2614
|
+
*semantic* fill" and a theme is free to darken it for a light accent color,
|
|
2615
|
+
whereas `--ui-tooltip`'s own fill stays dark unconditionally), because this
|
|
2616
|
+
is meant to read as "the terminal" rather than as a normal page card that
|
|
2617
|
+
follows the ambient surface palette.
|
|
2618
|
+
|
|
2619
|
+
An empty `lines` array still renders the bordered, padded shell so consumers
|
|
2620
|
+
can see that an instruction block is present but currently has no transcript
|
|
2621
|
+
content, rather than having the component silently disappear.
|
|
2622
|
+
|
|
2623
|
+
Import: `import "@f-ewald/components/terminal-block.js";`
|
|
2624
|
+
|
|
2625
|
+
Properties: `lines` (attribute `lines`) : TerminalLine[], default []
|
|
2626
|
+
Events: none
|
|
2627
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-font-mono`, `--ui-font-size`, `--ui-font-weight-semibold`, `--ui-line-height-normal`, `--ui-on-accent`, `--ui-primary`, `--ui-radius`, `--ui-tooltip`, `--ui-tooltip-text`
|
|
2628
|
+
|
|
2629
|
+
Example:
|
|
2630
|
+
```html
|
|
2631
|
+
<terminal-block></terminal-block>
|
|
2632
|
+
<script type="module">
|
|
2633
|
+
document.querySelector("terminal-block").lines = [
|
|
2634
|
+
{ type: "comment", text: "# Claude Code" },
|
|
2635
|
+
{ type: "prompt", text: "/plugin marketplace add example/example" },
|
|
2636
|
+
{ type: "prompt", text: "/plugin install example@example" },
|
|
2637
|
+
];
|
|
2638
|
+
</script>
|
|
2639
|
+
```
|
|
2640
|
+
|
|
2466
2641
|
## <text-area>
|
|
2467
2642
|
|
|
2468
2643
|
Plain multi-line text field — a thin, tokenized wrapper around a native
|
|
@@ -2507,7 +2682,7 @@ Import: `import "@f-ewald/components/tile-grid.js";`
|
|
|
2507
2682
|
|
|
2508
2683
|
Properties: `items` (JS property only) : unknown[], default []; `itemKey` (JS property only) : (item: unknown, index: number) => string | number, default —; `renderTile` (JS property only) : (item: unknown) => unknown, default —; `itemHref` (JS property only) : ((item: unknown) => string | null) | null, default null; `fileIcon` (attribute `file-icon`) : boolean, default false
|
|
2509
2684
|
Events: none
|
|
2510
|
-
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
2685
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
2511
2686
|
|
|
2512
2687
|
Example:
|
|
2513
2688
|
```html
|
|
@@ -2807,7 +2982,7 @@ Import: `import "@f-ewald/components/ui-button.js";`
|
|
|
2807
2982
|
|
|
2808
2983
|
Properties: `variant` (attribute `variant`) : ButtonVariant, default "primary"; `size` (attribute `size`) : "sm" | "md", default "md"; `pill` (attribute `pill`) : boolean, default false; `ai` (attribute `ai`) : boolean, default false; `href` (attribute `href`) : string | null, default null; `type` (attribute `type`) : "button" | "submit" | "reset", default "button"; `disabled` (attribute `disabled`) : boolean, default false; `busy` (attribute `busy`) : boolean, default false
|
|
2809
2984
|
Events: none
|
|
2810
|
-
CSS custom properties: `--ui-ai-1`, `--ui-ai-2`, `--ui-ai-3`, `--ui-ai-4`, `--ui-border`, `--ui-border-width`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-pill`, `--ui-radius-sm`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
2985
|
+
CSS custom properties: `--ui-ai-1`, `--ui-ai-2`, `--ui-ai-3`, `--ui-ai-4`, `--ui-border`, `--ui-border-width`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-danger-text`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-pill`, `--ui-radius-sm`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
2811
2986
|
|
|
2812
2987
|
Example:
|
|
2813
2988
|
```html
|
|
@@ -2953,3 +3128,35 @@ Example:
|
|
|
2953
3128
|
];
|
|
2954
3129
|
</script>
|
|
2955
3130
|
```
|
|
3131
|
+
|
|
3132
|
+
## <window-chrome>
|
|
3133
|
+
|
|
3134
|
+
Sticky editor/terminal-style chrome bar for the top edge of a page or panel:
|
|
3135
|
+
three decorative traffic-light dots, a filename-style label, and a
|
|
3136
|
+
right-aligned actions slot for controls such as a theme toggle.
|
|
3137
|
+
|
|
3138
|
+
The text property is named `label` rather than `title`, matching
|
|
3139
|
+
`page-header`'s text-property precedent and avoiding confusion with the
|
|
3140
|
+
global HTML `title` tooltip attribute. The dots are purely decorative, are
|
|
3141
|
+
hidden from assistive technology, and reuse the semantic `--ui-danger`,
|
|
3142
|
+
`--ui-warning`, and `--ui-success` tokens rather than introducing
|
|
3143
|
+
chrome-only colors.
|
|
3144
|
+
|
|
3145
|
+
It sticks with `position: sticky; top: 0`, so callers must place it at the
|
|
3146
|
+
top of the element that actually scrolls. Its `z-index: 1` is a deliberate
|
|
3147
|
+
plain literal: just enough to keep the bar above in-flow content as it
|
|
3148
|
+
sticks, while staying far below the shared overlay stack (dialogs/popovers
|
|
3149
|
+
start at 100), so it does not participate in `utils/layer-stack.ts`.
|
|
3150
|
+
|
|
3151
|
+
Import: `import "@f-ewald/components/window-chrome.js";`
|
|
3152
|
+
|
|
3153
|
+
Properties: `label` (attribute `label`) : string, default ""
|
|
3154
|
+
Events: none
|
|
3155
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-danger`, `--ui-font`, `--ui-font-mono`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-line-height-tight`, `--ui-radius-circle`, `--ui-success`, `--ui-surface-muted`, `--ui-text-muted`, `--ui-warning`
|
|
3156
|
+
|
|
3157
|
+
Example:
|
|
3158
|
+
```html
|
|
3159
|
+
<window-chrome label="~/product — README.md">
|
|
3160
|
+
<icon-button slot="actions" label="Toggle theme"></icon-button>
|
|
3161
|
+
</window-chrome>
|
|
3162
|
+
```
|