@f-ewald/components 1.40.3 → 1.42.2
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 +14 -4
- package/custom-elements.json +2017 -131
- 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/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/dag-graph.d.ts +161 -0
- package/dist/dag-graph.d.ts.map +1 -0
- package/dist/dag-graph.js +724 -0
- package/dist/dag-graph.js.map +1 -0
- package/dist/icons.d.ts +16 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +16 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -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/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/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 +64 -1
- package/dist/tokens.d.ts +58 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +145 -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/utils/dag-layout.d.ts +60 -0
- package/dist/utils/dag-layout.d.ts.map +1 -0
- package/dist/utils/dag-layout.js +80 -0
- package/dist/utils/dag-layout.js.map +1 -0
- 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/dag-graph.md +101 -0
- package/docs/design-language.md +43 -21
- package/docs/icons.md +8 -0
- 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/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/ui-button.md +2 -0
- package/docs/window-chrome.md +64 -0
- package/llms.txt +282 -18
- package/package.json +2 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Marketing landing page
|
|
2
|
+
|
|
3
|
+
A monospace, editor/terminal-chrome marketing/landing page — no `app-shell`,
|
|
4
|
+
no sidebar: a sticky `window-chrome` bar, a hero, and a stack of section
|
|
5
|
+
components, set in the `developer-dark` theme by default with a working
|
|
6
|
+
toggle to `developer-light`.
|
|
7
|
+
|
|
8
|
+
**When to use:** a public-facing marketing/landing page for a developer
|
|
9
|
+
tool or product, in the terminal-styled `developer-dark`/`developer-light`
|
|
10
|
+
themes — not an authenticated dashboard view (use one of the other recipes
|
|
11
|
+
for that; this is the one shell-less exception in this set).
|
|
12
|
+
|
|
13
|
+
## Page structure
|
|
14
|
+
|
|
15
|
+
- `window-chrome` — sticky top bar; its `actions` slot holds a real
|
|
16
|
+
`icon-button` (sun/moon) that toggles `data-theme` between
|
|
17
|
+
`developer-dark`/`developer-light` — and actually reapplies the token
|
|
18
|
+
values, unlike a real consumer that only needs to flip the attribute once
|
|
19
|
+
`dist/tokens.css` is loaded (see the Notes below).
|
|
20
|
+
- Hero — a heading with a trailing `blink-cursor`, tagline, `ui-button` CTAs
|
|
21
|
+
(bracket styling is literal slot text, e.g. `[ view on github ]` — not a
|
|
22
|
+
component feature), and a `ui-admonition` callout.
|
|
23
|
+
- `comment-label` above each section heading (the `## section_name` eyebrow).
|
|
24
|
+
- `code-diff` — the "why" section's before/after snippet.
|
|
25
|
+
- `step-ladder` — the prioritized fallback list.
|
|
26
|
+
- `stat-strip` — the benchmark numbers row.
|
|
27
|
+
- `terminal-block` — install instructions, plus a `tile-grid` for other
|
|
28
|
+
agents' install commands.
|
|
29
|
+
- `data-table` — the commands reference table.
|
|
30
|
+
- `frame-box` cards in a plain grid (each with a `status-pill` "default"
|
|
31
|
+
badge on one) — the intensity/mode cards.
|
|
32
|
+
- Footer — `comment-label` (`prefix="//"` `italic`) quote line, plus a
|
|
33
|
+
second `blink-cursor` after a prompt string.
|
|
34
|
+
|
|
35
|
+
## Markup
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<html data-theme="developer-dark">
|
|
39
|
+
<body>
|
|
40
|
+
<window-chrome label="~/product — README.md">
|
|
41
|
+
<icon-button id="theme-toggle" slot="actions" label="Toggle light/dark"></icon-button>
|
|
42
|
+
</window-chrome>
|
|
43
|
+
|
|
44
|
+
<main class="wrap">
|
|
45
|
+
<header class="hero">
|
|
46
|
+
<h1>product<blink-cursor></blink-cursor></h1>
|
|
47
|
+
<p class="tag">One line. It works.</p>
|
|
48
|
+
<div class="cta">
|
|
49
|
+
<ui-button variant="primary">[ view on github ]</ui-button>
|
|
50
|
+
<ui-button variant="secondary">[ install ]</ui-button>
|
|
51
|
+
</div>
|
|
52
|
+
<ui-admonition variant="warning">
|
|
53
|
+
Something's coming. Be the first to know.
|
|
54
|
+
<ui-button slot="actions" size="sm" variant="secondary">Notify me</ui-button>
|
|
55
|
+
</ui-admonition>
|
|
56
|
+
</header>
|
|
57
|
+
|
|
58
|
+
<section>
|
|
59
|
+
<comment-label>the_whole_idea</comment-label>
|
|
60
|
+
<h2>Your agent reaches for fifty lines. The job needs one.</h2>
|
|
61
|
+
<code-diff id="landing-diff" filename="cache.py" stat="−48 +1"></code-diff>
|
|
62
|
+
</section>
|
|
63
|
+
|
|
64
|
+
<section>
|
|
65
|
+
<comment-label>the_ladder</comment-label>
|
|
66
|
+
<h2>Stop at the first rung that holds.</h2>
|
|
67
|
+
<step-ladder id="landing-ladder"></step-ladder>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<footer>
|
|
71
|
+
<comment-label prefix="//" italic>the best code is the code never written.</comment-label>
|
|
72
|
+
<p class="prompt">~/product ❯ <blink-cursor></blink-cursor></p>
|
|
73
|
+
</footer>
|
|
74
|
+
</main>
|
|
75
|
+
</body>
|
|
76
|
+
</html>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Notes
|
|
80
|
+
|
|
81
|
+
- This recipe has no `app-shell` slots to fill — it's a plain document, styled
|
|
82
|
+
by the page's own `<style>` block (`max-width`/section rhythm/hero type),
|
|
83
|
+
the same way a component's own playground section owns its layout chrome.
|
|
84
|
+
- `data-diff`/`step-ladder`/`stat-strip`/`terminal-block`/`data-table`/
|
|
85
|
+
`tile-grid` are all headless: seed their `items`/`lines`/`columns`/`rows`
|
|
86
|
+
properties from a script, the same pattern `data-table` already uses in
|
|
87
|
+
every other recipe.
|
|
88
|
+
- The theme toggle icon (`iconSun`/`iconMoon` from `icons.js`) is swapped by
|
|
89
|
+
hand on click — `icon-button`'s `icon` property takes a pre-rendered
|
|
90
|
+
template, it does not know about themes.
|
|
91
|
+
- A real consumer that has loaded `dist/tokens.css` only needs to flip
|
|
92
|
+
`data-theme` between `"developer-dark"`/`"developer-light"` on `<html>` —
|
|
93
|
+
the demo additionally re-applies the token values as inline custom
|
|
94
|
+
properties because, like every demo/playground page, it imports component
|
|
95
|
+
*sources* and never loads the built `dist/tokens.css` (see `CLAUDE.md`).
|
|
96
|
+
- Bracket CTAs (`[ view on github ]`) are literal text passed to `ui-button`'s
|
|
97
|
+
default slot, not a component variant — `ui-button` itself is unchanged by
|
|
98
|
+
this theme.
|
|
99
|
+
|
|
100
|
+
**Live demo:** `demo/layouts/marketing-landing.html`
|
|
101
|
+
|
|
102
|
+
**Components:** window-chrome, blink-cursor, comment-label, ui-button, ui-admonition, code-diff, step-ladder, stat-strip, terminal-block, tile-grid, data-table, frame-box, status-pill, icon-button
|
package/docs/modal-dialog.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# `<modal-dialog>`
|
|
2
2
|
|
|
3
|
-
Generic centered modal-dialog shell:
|
|
4
|
-
close button, and an arbitrary slotted body — the modal
|
|
5
|
-
`slide-panel` (fixed-edge) and `popover-panel` (anchored).
|
|
6
|
-
`confirm-dialog`, it has no baked-in actions; the consumer supplies
|
|
7
|
-
body content (a form, a read-only viewer, a table) and any footer
|
|
8
|
-
itself. Instant
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`
|
|
3
|
+
Generic centered modal-dialog shell: a native modal `<dialog>` card with
|
|
4
|
+
header chrome, a close button, and an arbitrary slotted body — the modal
|
|
5
|
+
sibling to `slide-panel` (fixed-edge) and `popover-panel` (anchored).
|
|
6
|
+
Unlike `confirm-dialog`, it has no baked-in actions; the consumer supplies
|
|
7
|
+
the body content (a form, a read-only viewer, a table) and any footer
|
|
8
|
+
buttons itself. Instant open/close, no transition. Because it uses
|
|
9
|
+
`showModal()`, it renders in the browser's top layer, makes the rest of the
|
|
10
|
+
page inert, contains focus, and restores focus to the trigger on close;
|
|
11
|
+
Escape is routed to the topmost layer only (see `utils/layer-stack`).
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
package/docs/photo-gallery.md
CHANGED
|
@@ -74,8 +74,8 @@ import "@f-ewald/components/photo-gallery.js";
|
|
|
74
74
|
| `--ui-font-size-sm` |
|
|
75
75
|
| `--ui-line-height-normal` |
|
|
76
76
|
| `--ui-line-height-tight` |
|
|
77
|
-
| `--ui-on-accent` |
|
|
78
77
|
| `--ui-overlay` |
|
|
78
|
+
| `--ui-overlay-text` |
|
|
79
79
|
| `--ui-primary` |
|
|
80
80
|
| `--ui-radius` |
|
|
81
81
|
| `--ui-radius-pill` |
|
package/docs/slide-panel.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# `<slide-panel>`
|
|
2
2
|
|
|
3
|
-
Generic sliding panel shell
|
|
4
|
-
header chrome, and a close button. Body content is provided via the
|
|
3
|
+
Generic sliding panel shell: a non-modal native `<dialog>` (`show()`). Handles
|
|
4
|
+
positioning, open/close animation, header chrome, and a close button. Body content is provided via the
|
|
5
5
|
default slot; the consumer controls its own padding and overflow.
|
|
6
6
|
|
|
7
7
|
Desktop: fixed right-side panel that slides from the right.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# `<stat-strip>`
|
|
2
|
+
|
|
3
|
+
A headless, presentational strip of headline stats — one large figure plus
|
|
4
|
+
one muted caption per `items` entry, wrapping across lines on narrow
|
|
5
|
+
viewports. Unlike `stat-meter`, this component does not compute percentages
|
|
6
|
+
or render a fill bar: callers pass preformatted figure strings as-is and
|
|
7
|
+
`stat-strip` only lays them out for marketing, benchmark, or dashboard
|
|
8
|
+
summary rows.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import "@f-ewald/components/stat-strip.js";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<stat-strip></stat-strip>
|
|
20
|
+
<script type="module">
|
|
21
|
+
document.querySelector("stat-strip").items = [
|
|
22
|
+
{ value: "54%", label: "less code" },
|
|
23
|
+
{ value: "22%", label: "fewer tokens" },
|
|
24
|
+
{ value: "100%", label: "safety kept" },
|
|
25
|
+
];
|
|
26
|
+
</script>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Attributes / properties
|
|
30
|
+
|
|
31
|
+
| Property | Attribute | Type | Default | Description |
|
|
32
|
+
| --- | --- | --- | --- | --- |
|
|
33
|
+
| `items` | `items` | `StatStripItem[]` | `[]` | Stats rendered in display order; each item is shown as a large figure with a caption beneath it. |
|
|
34
|
+
|
|
35
|
+
## Events
|
|
36
|
+
|
|
37
|
+
_None._
|
|
38
|
+
|
|
39
|
+
## Slots
|
|
40
|
+
|
|
41
|
+
_None._
|
|
42
|
+
|
|
43
|
+
## CSS custom properties
|
|
44
|
+
|
|
45
|
+
| Custom property |
|
|
46
|
+
| --- |
|
|
47
|
+
| `--ui-font` |
|
|
48
|
+
| `--ui-font-size-lg` |
|
|
49
|
+
| `--ui-font-size-sm` |
|
|
50
|
+
| `--ui-font-weight-bold` |
|
|
51
|
+
| `--ui-font-weight-medium` |
|
|
52
|
+
| `--ui-label-transform` |
|
|
53
|
+
| `--ui-line-height-tight` |
|
|
54
|
+
| `--ui-numeric` |
|
|
55
|
+
| `--ui-primary` |
|
|
56
|
+
| `--ui-text-muted` |
|
|
57
|
+
| `--ui-tracking-wide` |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# `<step-ladder>`
|
|
2
|
+
|
|
3
|
+
A flat ordered ladder of fallback steps — an escalating "try this first,
|
|
4
|
+
then move to the next rung only if it does not solve it" list. Each rung
|
|
5
|
+
shows a zero-padded ordinal, a bold title, and a muted description, with a
|
|
6
|
+
hairline rule between rows.
|
|
7
|
+
|
|
8
|
+
Feed it the `items` array for the plain data path, where each
|
|
9
|
+
StepLadderItem supplies a `title` and `description`, or slot bare
|
|
10
|
+
`<li>` steps when a rung needs links, emphasis, or other richer markup.
|
|
11
|
+
Slotted content takes precedence over `items`; with neither, nothing is
|
|
12
|
+
rendered. As with `spec-list`, richer wrapper elements are accepted too, but
|
|
13
|
+
those own their own inner markup.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import "@f-ewald/components/step-ladder.js";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<step-ladder></step-ladder>
|
|
25
|
+
<script type="module">
|
|
26
|
+
document.querySelector("step-ladder").items = [
|
|
27
|
+
{ title: "Does this need to exist?", description: "Speculative need = skip it." },
|
|
28
|
+
{ title: "Already in this codebase?", description: "Reuse the helper that already lives here." },
|
|
29
|
+
{ title: "Does the standard library do it?", description: "Use it." },
|
|
30
|
+
];
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Attributes / properties
|
|
35
|
+
|
|
36
|
+
| Property | Attribute | Type | Default | Description |
|
|
37
|
+
| --- | --- | --- | --- | --- |
|
|
38
|
+
| `items` | `items` | `StepLadderItem[]` | `[]` | The rungs for the data-driven path. Ignored when the default slot has content. |
|
|
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-font` |
|
|
55
|
+
| `--ui-font-size` |
|
|
56
|
+
| `--ui-font-size-sm` |
|
|
57
|
+
| `--ui-font-weight-bold` |
|
|
58
|
+
| `--ui-font-weight-regular` |
|
|
59
|
+
| `--ui-line-height-normal` |
|
|
60
|
+
| `--ui-numeric` |
|
|
61
|
+
| `--ui-primary` |
|
|
62
|
+
| `--ui-text` |
|
|
63
|
+
| `--ui-text-muted` |
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `<terminal-block>`
|
|
2
|
+
|
|
3
|
+
A headless, data-driven terminal transcript shell for short install or usage
|
|
4
|
+
instructions. Callers provide a flat ordered `lines` array of
|
|
5
|
+
`TerminalLine` objects, and the component renders each line exactly in that
|
|
6
|
+
order with a type-driven visual treatment: `"prompt"` lines get a fixed
|
|
7
|
+
leading `❯` marker in `--ui-primary`, `"comment"` lines render as dim italic
|
|
8
|
+
guidance, and `"output"` lines render as plain terminal text.
|
|
9
|
+
|
|
10
|
+
The panel deliberately stays dark regardless of the surrounding page theme:
|
|
11
|
+
it reuses `--ui-tooltip` for the surface and `--ui-tooltip-text` for the
|
|
12
|
+
main foreground (not `--ui-on-accent` — that token means "text on a solid
|
|
13
|
+
*semantic* fill" and a theme is free to darken it for a light accent color,
|
|
14
|
+
whereas `--ui-tooltip`'s own fill stays dark unconditionally), because this
|
|
15
|
+
is meant to read as "the terminal" rather than as a normal page card that
|
|
16
|
+
follows the ambient surface palette.
|
|
17
|
+
|
|
18
|
+
An empty `lines` array still renders the bordered, padded shell so consumers
|
|
19
|
+
can see that an instruction block is present but currently has no transcript
|
|
20
|
+
content, rather than having the component silently disappear.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import "@f-ewald/components/terminal-block.js";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<terminal-block></terminal-block>
|
|
32
|
+
<script type="module">
|
|
33
|
+
document.querySelector("terminal-block").lines = [
|
|
34
|
+
{ type: "comment", text: "# Claude Code" },
|
|
35
|
+
{ type: "prompt", text: "/plugin marketplace add example/example" },
|
|
36
|
+
{ type: "prompt", text: "/plugin install example@example" },
|
|
37
|
+
];
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Attributes / properties
|
|
42
|
+
|
|
43
|
+
| Property | Attribute | Type | Default | Description |
|
|
44
|
+
| --- | --- | --- | --- | --- |
|
|
45
|
+
| `lines` | `lines` | `TerminalLine[]` | `[]` | Ordered terminal transcript lines. Each entry is a `{ type, text }` object, and an empty array still renders the visible terminal shell. |
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
_None._
|
|
50
|
+
|
|
51
|
+
## Slots
|
|
52
|
+
|
|
53
|
+
_None._
|
|
54
|
+
|
|
55
|
+
## CSS custom properties
|
|
56
|
+
|
|
57
|
+
| Custom property |
|
|
58
|
+
| --- |
|
|
59
|
+
| `--ui-border` |
|
|
60
|
+
| `--ui-border-width` |
|
|
61
|
+
| `--ui-font-mono` |
|
|
62
|
+
| `--ui-font-size` |
|
|
63
|
+
| `--ui-font-weight-semibold` |
|
|
64
|
+
| `--ui-line-height-normal` |
|
|
65
|
+
| `--ui-on-accent` |
|
|
66
|
+
| `--ui-primary` |
|
|
67
|
+
| `--ui-radius` |
|
|
68
|
+
| `--ui-tooltip` |
|
|
69
|
+
| `--ui-tooltip-text` |
|
package/docs/ui-button.md
CHANGED
|
@@ -113,6 +113,7 @@ _None._
|
|
|
113
113
|
| `--ui-button-danger-background-active` |
|
|
114
114
|
| `--ui-button-danger-background-hover` |
|
|
115
115
|
| `--ui-button-danger-border` |
|
|
116
|
+
| `--ui-button-danger-text` |
|
|
116
117
|
| `--ui-button-highlight` |
|
|
117
118
|
| `--ui-button-secondary-` |
|
|
118
119
|
| `--ui-button-secondary-background` |
|
|
@@ -120,6 +121,7 @@ _None._
|
|
|
120
121
|
| `--ui-button-secondary-background-hover` |
|
|
121
122
|
| `--ui-button-secondary-border` |
|
|
122
123
|
| `--ui-button-secondary-border-hover` |
|
|
124
|
+
| `--ui-button-text` |
|
|
123
125
|
| `--ui-button-text-shadow` |
|
|
124
126
|
| `--ui-danger` |
|
|
125
127
|
| `--ui-danger-hover` |
|
|
@@ -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` |
|