@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
package/llms.txt
CHANGED
|
@@ -33,6 +33,8 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
33
33
|
| --- | --- | --- |
|
|
34
34
|
| `iconAcademicCap` | 18px | Education, learning, or certification-related content. |
|
|
35
35
|
| `iconArrowDownTray` | 16px | Download or export actions. |
|
|
36
|
+
| `iconArrowLongDown` | 18px | A top-to-bottom flow or layout direction. |
|
|
37
|
+
| `iconArrowLongRight` | 18px | A left-to-right flow or layout direction. |
|
|
36
38
|
| `iconArrowPath` | 12px | Refresh actions, or an animated busy/loading spinner. |
|
|
37
39
|
| `iconArrowRight` | 12px | "Continue" or forward-progressing actions, e.g. a compact next-step arrow. |
|
|
38
40
|
| `iconArrowRightOnRectangle` | 16px | Logout/sign-out actions. |
|
|
@@ -41,6 +43,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
41
43
|
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
42
44
|
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
43
45
|
| `iconBars3` | 18px | A hamburger menu toggle, e.g. collapsing or opening a sidebar/nav drawer. |
|
|
46
|
+
| `iconBookOpen` | 20px | A library, documentation, or reading content, e.g. a library node in dag-graph. |
|
|
44
47
|
| `iconCalendar` | 16px | Dates, due dates, or calendar-related metadata. |
|
|
45
48
|
| `iconChatBubbleLeftRight` | 18px | Messaging, comments, or conversation-related content. |
|
|
46
49
|
| `iconCheckCircle` | 16px | Success states, confirmations, or a selected-item checkmark. |
|
|
@@ -55,6 +58,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
55
58
|
| `iconCog` | 20px | Settings, preferences, or configuration entry points. |
|
|
56
59
|
| `iconComputerDesktop` | 16px | A "system/auto" theme option, or to represent a desktop device. |
|
|
57
60
|
| `iconCpuChip` | 18px | System, hardware, or technical/processing content. |
|
|
61
|
+
| `iconCube` | 20px | A package or self-contained artifact, e.g. an external package node in dag-graph. |
|
|
58
62
|
| `iconCurrencyDollar` | 16px | Monetary values, pricing, or billing-related content. |
|
|
59
63
|
| `iconDocument` | 18px | A generic file/document icon, e.g. tile-grid's default file icon. |
|
|
60
64
|
| `iconEllipsisHorizontal` | 16px | Collapsed items in an inline sequence, e.g. breadcrumb-nav's truncated middle. |
|
|
@@ -73,6 +77,8 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
73
77
|
| `iconLink` | 16px | Hyperlink-related actions or a linked/associated-item indicator. |
|
|
74
78
|
| `iconListBullet` | 18px | A list-view toggle, or to represent list-type content. |
|
|
75
79
|
| `iconMagnifyingGlass` | 16px | Search inputs or search-triggering actions. |
|
|
80
|
+
| `iconMagnifyingGlassMinus` | 18px | Zoom out, e.g. dag-graph's toolbar. |
|
|
81
|
+
| `iconMagnifyingGlassPlus` | 18px | Zoom in, e.g. dag-graph's toolbar. |
|
|
76
82
|
| `iconMap` | 16px | A map-view toggle, or to represent map/geographic content. |
|
|
77
83
|
| `iconMapPin` | 16px | A location, address, or map marker. |
|
|
78
84
|
| `iconMoon` | 16px | A dark-theme toggle, or to represent night/dark mode. |
|
|
@@ -83,6 +89,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
83
89
|
| `iconPuzzlePiece` | 18px | Plugins, integrations, or extensible/add-on features. |
|
|
84
90
|
| `iconQuestionMarkCircle` | 20px | Help, tooltips, or "learn more" affordances. |
|
|
85
91
|
| `iconQueueList` | 16px | Queues, backlogs, or ordered work-item lists. |
|
|
92
|
+
| `iconServer` | 20px | A running service or deployable, e.g. a service node in dag-graph. |
|
|
86
93
|
| `iconShieldCheck` | 16px | Verified, secure, or trusted states. |
|
|
87
94
|
| `iconShieldExclamation` | 16px | Security warnings, or at-risk/compromised states. |
|
|
88
95
|
| `iconSignal` | 16px | Live/real-time data, connectivity strength, or a traffic-conditions toggle. |
|
|
@@ -95,6 +102,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
95
102
|
| `iconTrash` | 16px | Delete/remove actions, typically paired with a destructive/danger style. |
|
|
96
103
|
| `iconUserCircle` | 20px | A generic user/person fallback, e.g. user-avatar's icon fallback. |
|
|
97
104
|
| `iconUsers` | 18px | Teams, groups, or multi-user/collaboration content. |
|
|
105
|
+
| `iconViewfinderCircle` | 18px | Center or focus the view on the current selection, e.g. dag-graph's toolbar. |
|
|
98
106
|
| `iconWrenchScrewdriver` | 18px | Tools, maintenance, or build/configuration actions. |
|
|
99
107
|
| `iconX` | 18px | Close, dismiss, or clear (e.g. a modal, toast, or clearable input). |
|
|
100
108
|
|
|
@@ -226,7 +234,7 @@ Import: `import "@f-ewald/components/app-shell.js";`
|
|
|
226
234
|
|
|
227
235
|
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
236
|
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-
|
|
237
|
+
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
238
|
|
|
231
239
|
Example:
|
|
232
240
|
```html
|
|
@@ -387,6 +395,30 @@ Example:
|
|
|
387
395
|
</script>
|
|
388
396
|
```
|
|
389
397
|
|
|
398
|
+
## <blink-cursor>
|
|
399
|
+
|
|
400
|
+
A small inline blinking cursor glyph for terminal- or editor-styled
|
|
401
|
+
headings, prompts, and status lines. It renders its own decorative
|
|
402
|
+
character so consumers can append it directly to adjacent text while
|
|
403
|
+
inheriting the surrounding typography.
|
|
404
|
+
|
|
405
|
+
The cursor uses the shared `--ui-primary` accent color so it reads as an
|
|
406
|
+
active insertion point across themes. Change `char` to swap the glyph (for
|
|
407
|
+
example `|` or `▋`). Under `prefers-reduced-motion` the blink stops and the
|
|
408
|
+
cursor remains visible.
|
|
409
|
+
|
|
410
|
+
Import: `import "@f-ewald/components/blink-cursor.js";`
|
|
411
|
+
|
|
412
|
+
Properties: `char` (attribute `char`) : string, default "▋"
|
|
413
|
+
Events: none
|
|
414
|
+
CSS custom properties: `--ui-line-height-glyph`, `--ui-primary`
|
|
415
|
+
|
|
416
|
+
Example:
|
|
417
|
+
```html
|
|
418
|
+
<h1>ponytail<blink-cursor></blink-cursor></h1>
|
|
419
|
+
<p>~/ponytail ❯ <blink-cursor char="|"></blink-cursor></p>
|
|
420
|
+
```
|
|
421
|
+
|
|
390
422
|
## <breadcrumb-nav>
|
|
391
423
|
|
|
392
424
|
A breadcrumb trail: a `<nav aria-label="Breadcrumb">` wrapping an ordered
|
|
@@ -707,6 +739,37 @@ Example:
|
|
|
707
739
|
</script>
|
|
708
740
|
```
|
|
709
741
|
|
|
742
|
+
## <code-diff>
|
|
743
|
+
|
|
744
|
+
A compact, read-only code diff viewer: a bordered panel with a header bar
|
|
745
|
+
for `filename` and `stat`, followed by a numbered `<pre>` listing of
|
|
746
|
+
`lines`. Each CodeDiffLine renders as `"add"`, `"del"`, or
|
|
747
|
+
`"context"` with fixed `"+ "` / `"- "` / `" "` prefixes so the diff
|
|
748
|
+
remains understandable even when color is unavailable.
|
|
749
|
+
|
|
750
|
+
Added and removed rows reuse `--ui-success` / `--ui-danger` for their text
|
|
751
|
+
and low-alpha background washes, while the shell itself reuses
|
|
752
|
+
`--ui-font-mono`, `--ui-border`, and `--ui-surface`. The caller owns the
|
|
753
|
+
data shape entirely: `filename` and `stat` are passed through verbatim, and
|
|
754
|
+
`lines` is a flat ordered array of `{ type, text }` objects.
|
|
755
|
+
|
|
756
|
+
Import: `import "@f-ewald/components/code-diff.js";`
|
|
757
|
+
|
|
758
|
+
Properties: `filename` (attribute `filename`) : string, default ""; `stat` (attribute `stat`) : string, default ""; `lines` (attribute `lines`) : CodeDiffLine[], default []
|
|
759
|
+
Events: none
|
|
760
|
+
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`
|
|
761
|
+
|
|
762
|
+
Example:
|
|
763
|
+
```html
|
|
764
|
+
<code-diff filename="cache.py" stat="−48 +1"></code-diff>
|
|
765
|
+
<script type="module">
|
|
766
|
+
document.querySelector("code-diff").lines = [
|
|
767
|
+
{ type: "del", text: "class CacheManager:" },
|
|
768
|
+
{ type: "add", text: "@lru_cache(maxsize=1000)" },
|
|
769
|
+
];
|
|
770
|
+
</script>
|
|
771
|
+
```
|
|
772
|
+
|
|
710
773
|
## <comment-composer>
|
|
711
774
|
|
|
712
775
|
GitHub/Slack-style comment composer: a one-line text field that expands
|
|
@@ -742,11 +805,33 @@ Example:
|
|
|
742
805
|
</script>
|
|
743
806
|
```
|
|
744
807
|
|
|
808
|
+
## <comment-label>
|
|
809
|
+
|
|
810
|
+
A code-comment-style eyebrow line for section chrome in terminal- or
|
|
811
|
+
editor-themed pages. It renders a colored comment marker (`##` by default)
|
|
812
|
+
before muted slotted text, so `<comment-label>the_whole_idea</comment-label>`
|
|
813
|
+
reads like a short section kicker. Set `prefix="//"` and `italic` for a
|
|
814
|
+
closing or footer quote line that keeps the marker upright while the message
|
|
815
|
+
itself turns italic.
|
|
816
|
+
|
|
817
|
+
Import: `import "@f-ewald/components/comment-label.js";`
|
|
818
|
+
|
|
819
|
+
Properties: `prefix` (attribute `prefix`) : string, default "##"; `italic` (attribute `italic`) : boolean, default false
|
|
820
|
+
Events: none
|
|
821
|
+
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`
|
|
822
|
+
|
|
823
|
+
Example:
|
|
824
|
+
```html
|
|
825
|
+
<comment-label>the_whole_idea</comment-label>
|
|
826
|
+
<comment-label prefix="//" italic>the best code is the code never written.</comment-label>
|
|
827
|
+
```
|
|
828
|
+
|
|
745
829
|
## <confirm-dialog>
|
|
746
830
|
|
|
747
|
-
Reusable confirmation dialog:
|
|
748
|
-
|
|
749
|
-
|
|
831
|
+
Reusable confirmation dialog: a native modal `<dialog>` (top layer, inert
|
|
832
|
+
page behind it, built-in focus containment) with a slotted body, an
|
|
833
|
+
optional error line, and Cancel/Confirm actions. Instant open/close (no
|
|
834
|
+
transitions). Fires `confirm`/`cancel`
|
|
750
835
|
(bubbling, composed) instead of owning any deletion logic itself —
|
|
751
836
|
callers stay in charge of the request. Set `size="sm"` for compact
|
|
752
837
|
actions one step below the default, matching `ui-button`'s `sm` size.
|
|
@@ -869,6 +954,55 @@ Example:
|
|
|
869
954
|
</script>
|
|
870
955
|
```
|
|
871
956
|
|
|
957
|
+
## <dag-graph>
|
|
958
|
+
|
|
959
|
+
Interactive layered drawing of a directed graph — dependencies, pipelines, or any node-link data.
|
|
960
|
+
|
|
961
|
+
Nodes are placed in layers (via dagre) so edges flow left to right (or top to bottom with
|
|
962
|
+
`direction="TB"`); cycles are allowed, and the edges closing them are drawn dashed and point backward.
|
|
963
|
+
Each node is a compact card sized to its label, with an optional icon, color, and border style from
|
|
964
|
+
`kinds`. The whole graph is shown when it fits at a readable zoom; otherwise the selected node is centered at
|
|
965
|
+
100%. Drag to pan; pinch or Ctrl/⌘ + wheel to zoom (a plain wheel scrolls the page). With keyboard
|
|
966
|
+
focus on the graph, arrow keys pan, `+`/`-` zoom, and `0` fits the graph. Clicking a node, or pressing
|
|
967
|
+
Enter/Space on it, selects it. A toolbar in the top-right corner offers the `controls` you enable.
|
|
968
|
+
|
|
969
|
+
Set `static` to present a fixed picture: the graph is always fitted into view, panning and zooming
|
|
970
|
+
are off, and the toolbar is hidden; nodes can still be selected.
|
|
971
|
+
|
|
972
|
+
Colors can be changed with these custom properties: `--dag-node-background`, `--dag-node-text`,
|
|
973
|
+
`--dag-edge-color`, `--dag-selected-color`, and `--dag-highlight-color`; `--dag-graph-height` sets the
|
|
974
|
+
height (default `24rem`).
|
|
975
|
+
|
|
976
|
+
Import: `import "@f-ewald/components/dag-graph.js";`
|
|
977
|
+
|
|
978
|
+
Properties: `nodes` (attribute `nodes`) : DagNode[], default []; `edges` (attribute `edges`) : DagEdge[], default []; `kinds` (JS property only) : Record<string, DagNodeKind>, default {}; `selected` (attribute `selected`) : string | null, default null; `direction` (attribute `direction`) : DagDirection, default "LR"; `label` (attribute `label`) : string, default "Directed graph"; `legend` (attribute `legend`) : boolean, default false; `controls` (attribute `controls`) : string, default "zoom fit center"; `isStatic` (attribute `static`) : boolean, default false
|
|
979
|
+
Events: `direction-change`, `node-select`
|
|
980
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-button-highlight`, `--ui-button-secondary-background`, `--ui-button-secondary-border`, `--ui-button-secondary-gloss-end`, `--ui-button-secondary-gloss-start`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-primary`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
|
|
981
|
+
|
|
982
|
+
Example:
|
|
983
|
+
```html
|
|
984
|
+
<dag-graph legend selected="web"></dag-graph>
|
|
985
|
+
<script type="module">
|
|
986
|
+
import { iconBookOpen, iconCube, iconServer } from "@f-ewald/components/icons.js";
|
|
987
|
+
const graph = document.querySelector("dag-graph");
|
|
988
|
+
graph.kinds = {
|
|
989
|
+
service: { label: "Service", icon: iconServer, color: "#4269d0" },
|
|
990
|
+
library: { label: "Library", icon: iconBookOpen, color: "#3ca951" },
|
|
991
|
+
package: { label: "External package", icon: iconCube, color: "#9498a0", dashed: true },
|
|
992
|
+
};
|
|
993
|
+
graph.nodes = [
|
|
994
|
+
{ id: "web", label: "web", kind: "service" },
|
|
995
|
+
{ id: "auth", label: "auth-lib", kind: "library" },
|
|
996
|
+
{ id: "requests", label: "requests", kind: "package" },
|
|
997
|
+
];
|
|
998
|
+
graph.edges = [
|
|
999
|
+
{ source: "web", target: "auth" },
|
|
1000
|
+
{ source: "auth", target: "requests" },
|
|
1001
|
+
];
|
|
1002
|
+
graph.addEventListener("node-select", (e) => console.log(e.detail.id));
|
|
1003
|
+
</script>
|
|
1004
|
+
```
|
|
1005
|
+
|
|
872
1006
|
## <data-table>
|
|
873
1007
|
|
|
874
1008
|
A generic, presentational table shell: renders a `<thead>` from `columns`
|
|
@@ -1658,15 +1792,15 @@ See the [changelog](#markdown-view) for details.`;
|
|
|
1658
1792
|
|
|
1659
1793
|
## <modal-dialog>
|
|
1660
1794
|
|
|
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
|
-
`
|
|
1795
|
+
Generic centered modal-dialog shell: a native modal `<dialog>` card with
|
|
1796
|
+
header chrome, a close button, and an arbitrary slotted body — the modal
|
|
1797
|
+
sibling to `slide-panel` (fixed-edge) and `popover-panel` (anchored).
|
|
1798
|
+
Unlike `confirm-dialog`, it has no baked-in actions; the consumer supplies
|
|
1799
|
+
the body content (a form, a read-only viewer, a table) and any footer
|
|
1800
|
+
buttons itself. Instant open/close, no transition. Because it uses
|
|
1801
|
+
`showModal()`, it renders in the browser's top layer, makes the rest of the
|
|
1802
|
+
page inert, contains focus, and restores focus to the trigger on close;
|
|
1803
|
+
Escape is routed to the topmost layer only (see `utils/layer-stack`).
|
|
1670
1804
|
|
|
1671
1805
|
Import: `import "@f-ewald/components/modal-dialog.js";`
|
|
1672
1806
|
|
|
@@ -1851,7 +1985,7 @@ Import: `import "@f-ewald/components/photo-gallery.js";`
|
|
|
1851
1985
|
|
|
1852
1986
|
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
1987
|
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-
|
|
1988
|
+
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
1989
|
|
|
1856
1990
|
Example:
|
|
1857
1991
|
```html
|
|
@@ -1919,7 +2053,7 @@ Import: `import "@f-ewald/components/price-history-chart.js";`
|
|
|
1919
2053
|
|
|
1920
2054
|
Properties: `history` (attribute `history`) : PricePoint[], default []; `yLabels` (attribute `y-labels`) : "auto" | "always" | "never", default "auto"; `maxXLabels` (attribute `max-x-labels`) : number, default 3
|
|
1921
2055
|
Events: none
|
|
1922
|
-
CSS custom properties: `--ui-border`, `--ui-font`, `--ui-on-accent`, `--ui-primary`, `--ui-text-muted`, `--ui-tooltip`
|
|
2056
|
+
CSS custom properties: `--ui-border`, `--ui-font`, `--ui-on-accent`, `--ui-primary`, `--ui-text-muted`, `--ui-tooltip`, `--ui-tooltip-text`
|
|
1923
2057
|
|
|
1924
2058
|
Example:
|
|
1925
2059
|
```html
|
|
@@ -2259,8 +2393,8 @@ Example:
|
|
|
2259
2393
|
|
|
2260
2394
|
## <slide-panel>
|
|
2261
2395
|
|
|
2262
|
-
Generic sliding panel shell
|
|
2263
|
-
header chrome, and a close button. Body content is provided via the
|
|
2396
|
+
Generic sliding panel shell: a non-modal native `<dialog>` (`show()`). Handles
|
|
2397
|
+
positioning, open/close animation, header chrome, and a close button. Body content is provided via the
|
|
2264
2398
|
default slot; the consumer controls its own padding and overflow.
|
|
2265
2399
|
|
|
2266
2400
|
Desktop: fixed right-side panel that slides from the right.
|
|
@@ -2371,6 +2505,33 @@ Example:
|
|
|
2371
2505
|
<stat-meter label="GPU" percent="88" color="#dc2626"></stat-meter>
|
|
2372
2506
|
```
|
|
2373
2507
|
|
|
2508
|
+
## <stat-strip>
|
|
2509
|
+
|
|
2510
|
+
A headless, presentational strip of headline stats — one large figure plus
|
|
2511
|
+
one muted caption per `items` entry, wrapping across lines on narrow
|
|
2512
|
+
viewports. Unlike `stat-meter`, this component does not compute percentages
|
|
2513
|
+
or render a fill bar: callers pass preformatted figure strings as-is and
|
|
2514
|
+
`stat-strip` only lays them out for marketing, benchmark, or dashboard
|
|
2515
|
+
summary rows.
|
|
2516
|
+
|
|
2517
|
+
Import: `import "@f-ewald/components/stat-strip.js";`
|
|
2518
|
+
|
|
2519
|
+
Properties: `items` (attribute `items`) : StatStripItem[], default []
|
|
2520
|
+
Events: none
|
|
2521
|
+
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`
|
|
2522
|
+
|
|
2523
|
+
Example:
|
|
2524
|
+
```html
|
|
2525
|
+
<stat-strip></stat-strip>
|
|
2526
|
+
<script type="module">
|
|
2527
|
+
document.querySelector("stat-strip").items = [
|
|
2528
|
+
{ value: "54%", label: "less code" },
|
|
2529
|
+
{ value: "22%", label: "fewer tokens" },
|
|
2530
|
+
{ value: "100%", label: "safety kept" },
|
|
2531
|
+
];
|
|
2532
|
+
</script>
|
|
2533
|
+
```
|
|
2534
|
+
|
|
2374
2535
|
## <status-banner>
|
|
2375
2536
|
|
|
2376
2537
|
Full-width, app-level status bar for a persistent condition — "Reconnecting…",
|
|
@@ -2415,6 +2576,38 @@ Example:
|
|
|
2415
2576
|
<status-pill label="Blocked" color="danger"></status-pill>
|
|
2416
2577
|
```
|
|
2417
2578
|
|
|
2579
|
+
## <step-ladder>
|
|
2580
|
+
|
|
2581
|
+
A flat ordered ladder of fallback steps — an escalating "try this first,
|
|
2582
|
+
then move to the next rung only if it does not solve it" list. Each rung
|
|
2583
|
+
shows a zero-padded ordinal, a bold title, and a muted description, with a
|
|
2584
|
+
hairline rule between rows.
|
|
2585
|
+
|
|
2586
|
+
Feed it the `items` array for the plain data path, where each
|
|
2587
|
+
StepLadderItem supplies a `title` and `description`, or slot bare
|
|
2588
|
+
`<li>` steps when a rung needs links, emphasis, or other richer markup.
|
|
2589
|
+
Slotted content takes precedence over `items`; with neither, nothing is
|
|
2590
|
+
rendered. As with `spec-list`, richer wrapper elements are accepted too, but
|
|
2591
|
+
those own their own inner markup.
|
|
2592
|
+
|
|
2593
|
+
Import: `import "@f-ewald/components/step-ladder.js";`
|
|
2594
|
+
|
|
2595
|
+
Properties: `items` (attribute `items`) : StepLadderItem[], default []
|
|
2596
|
+
Events: none
|
|
2597
|
+
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`
|
|
2598
|
+
|
|
2599
|
+
Example:
|
|
2600
|
+
```html
|
|
2601
|
+
<step-ladder></step-ladder>
|
|
2602
|
+
<script type="module">
|
|
2603
|
+
document.querySelector("step-ladder").items = [
|
|
2604
|
+
{ title: "Does this need to exist?", description: "Speculative need = skip it." },
|
|
2605
|
+
{ title: "Already in this codebase?", description: "Reuse the helper that already lives here." },
|
|
2606
|
+
{ title: "Does the standard library do it?", description: "Use it." },
|
|
2607
|
+
];
|
|
2608
|
+
</script>
|
|
2609
|
+
```
|
|
2610
|
+
|
|
2418
2611
|
## <tab-bar>
|
|
2419
2612
|
|
|
2420
2613
|
WAI-ARIA tabs pattern (automatic activation, roving tabindex) driving a
|
|
@@ -2463,6 +2656,45 @@ Example:
|
|
|
2463
2656
|
<tab-item></tab-item>
|
|
2464
2657
|
```
|
|
2465
2658
|
|
|
2659
|
+
## <terminal-block>
|
|
2660
|
+
|
|
2661
|
+
A headless, data-driven terminal transcript shell for short install or usage
|
|
2662
|
+
instructions. Callers provide a flat ordered `lines` array of
|
|
2663
|
+
`TerminalLine` objects, and the component renders each line exactly in that
|
|
2664
|
+
order with a type-driven visual treatment: `"prompt"` lines get a fixed
|
|
2665
|
+
leading `❯` marker in `--ui-primary`, `"comment"` lines render as dim italic
|
|
2666
|
+
guidance, and `"output"` lines render as plain terminal text.
|
|
2667
|
+
|
|
2668
|
+
The panel deliberately stays dark regardless of the surrounding page theme:
|
|
2669
|
+
it reuses `--ui-tooltip` for the surface and `--ui-tooltip-text` for the
|
|
2670
|
+
main foreground (not `--ui-on-accent` — that token means "text on a solid
|
|
2671
|
+
*semantic* fill" and a theme is free to darken it for a light accent color,
|
|
2672
|
+
whereas `--ui-tooltip`'s own fill stays dark unconditionally), because this
|
|
2673
|
+
is meant to read as "the terminal" rather than as a normal page card that
|
|
2674
|
+
follows the ambient surface palette.
|
|
2675
|
+
|
|
2676
|
+
An empty `lines` array still renders the bordered, padded shell so consumers
|
|
2677
|
+
can see that an instruction block is present but currently has no transcript
|
|
2678
|
+
content, rather than having the component silently disappear.
|
|
2679
|
+
|
|
2680
|
+
Import: `import "@f-ewald/components/terminal-block.js";`
|
|
2681
|
+
|
|
2682
|
+
Properties: `lines` (attribute `lines`) : TerminalLine[], default []
|
|
2683
|
+
Events: none
|
|
2684
|
+
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`
|
|
2685
|
+
|
|
2686
|
+
Example:
|
|
2687
|
+
```html
|
|
2688
|
+
<terminal-block></terminal-block>
|
|
2689
|
+
<script type="module">
|
|
2690
|
+
document.querySelector("terminal-block").lines = [
|
|
2691
|
+
{ type: "comment", text: "# Claude Code" },
|
|
2692
|
+
{ type: "prompt", text: "/plugin marketplace add example/example" },
|
|
2693
|
+
{ type: "prompt", text: "/plugin install example@example" },
|
|
2694
|
+
];
|
|
2695
|
+
</script>
|
|
2696
|
+
```
|
|
2697
|
+
|
|
2466
2698
|
## <text-area>
|
|
2467
2699
|
|
|
2468
2700
|
Plain multi-line text field — a thin, tokenized wrapper around a native
|
|
@@ -2807,7 +3039,7 @@ Import: `import "@f-ewald/components/ui-button.js";`
|
|
|
2807
3039
|
|
|
2808
3040
|
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
3041
|
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`
|
|
3042
|
+
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
3043
|
|
|
2812
3044
|
Example:
|
|
2813
3045
|
```html
|
|
@@ -2953,3 +3185,35 @@ Example:
|
|
|
2953
3185
|
];
|
|
2954
3186
|
</script>
|
|
2955
3187
|
```
|
|
3188
|
+
|
|
3189
|
+
## <window-chrome>
|
|
3190
|
+
|
|
3191
|
+
Sticky editor/terminal-style chrome bar for the top edge of a page or panel:
|
|
3192
|
+
three decorative traffic-light dots, a filename-style label, and a
|
|
3193
|
+
right-aligned actions slot for controls such as a theme toggle.
|
|
3194
|
+
|
|
3195
|
+
The text property is named `label` rather than `title`, matching
|
|
3196
|
+
`page-header`'s text-property precedent and avoiding confusion with the
|
|
3197
|
+
global HTML `title` tooltip attribute. The dots are purely decorative, are
|
|
3198
|
+
hidden from assistive technology, and reuse the semantic `--ui-danger`,
|
|
3199
|
+
`--ui-warning`, and `--ui-success` tokens rather than introducing
|
|
3200
|
+
chrome-only colors.
|
|
3201
|
+
|
|
3202
|
+
It sticks with `position: sticky; top: 0`, so callers must place it at the
|
|
3203
|
+
top of the element that actually scrolls. Its `z-index: 1` is a deliberate
|
|
3204
|
+
plain literal: just enough to keep the bar above in-flow content as it
|
|
3205
|
+
sticks, while staying far below the shared overlay stack (dialogs/popovers
|
|
3206
|
+
start at 100), so it does not participate in `utils/layer-stack.ts`.
|
|
3207
|
+
|
|
3208
|
+
Import: `import "@f-ewald/components/window-chrome.js";`
|
|
3209
|
+
|
|
3210
|
+
Properties: `label` (attribute `label`) : string, default ""
|
|
3211
|
+
Events: none
|
|
3212
|
+
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`
|
|
3213
|
+
|
|
3214
|
+
Example:
|
|
3215
|
+
```html
|
|
3216
|
+
<window-chrome label="~/product — README.md">
|
|
3217
|
+
<icon-button slot="actions" label="Toggle theme"></icon-button>
|
|
3218
|
+
</window-chrome>
|
|
3219
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f-ewald/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.42.2",
|
|
5
5
|
"description": "A collection of universally usable web components for various tasks.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"url": "git+https://github.com/f-ewald/components.git"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
+
"@dagrejs/dagre": "^3.1.3",
|
|
62
63
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
63
64
|
"d3-array": "^3.2.4",
|
|
64
65
|
"d3-scale": "^4.0.2",
|