@f-ewald/components 1.32.1 → 1.34.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
@@ -161,29 +161,50 @@ Example:
161
161
  ## <app-shell>
162
162
 
163
163
  The dashboard page shell: a slot-based CSS-grid backbone that arranges a
164
- full-height sidebar, a top bar, the main content, an optional right-hand
165
- detail column, and an optional footer. It owns the responsive behavior so
166
- consumers don't re-implement it — above the shared 48rem breakpoint the
167
- sidebar collapses to an icon rail and the detail region is an inline column;
168
- at or below it the sidebar becomes an off-canvas drawer and the detail region
169
- an overlay, both dismissed by a scrim or Escape.
164
+ top bar, the main content, an optional right-hand detail column, an
165
+ optional footer, and a sidebar. The top bar always spans the shell's full
166
+ width, in every sidebar state.
167
+
168
+ The sidebar's visibility, width, and layout mode are three independent
169
+ properties:
170
+ - `sidebar-open` (default closed) — whether it's shown at all.
171
+ - `sidebar-width`: `"full"` (16rem, icons + labels, the default) or
172
+ `"icon"` (3.5rem rail, icons only — drives the slotted `app-sidebar`'s
173
+ own `collapsed` attribute).
174
+ - `sidebar-mode`: `"overlay"` (the default) floats the sidebar above the
175
+ shell's own content with a higher z-index, covering part of the top
176
+ bar's corner and whatever content sits beneath it, without ever
177
+ resizing or reflowing `main`/`footer`. `"push"` instead reserves a real
178
+ grid column beside `main`/`footer` (which resize to make room) — the
179
+ top bar still spans full width above it either way.
180
+
181
+ Below the shared 48rem breakpoint the sidebar always behaves as a
182
+ full-width, modal, scrim/Escape-dismissible drawer regardless of
183
+ `sidebar-mode`/`sidebar-width` — those two properties only affect the
184
+ desktop presentation. Above 48rem, an `overlay`-mode sidebar is a
185
+ non-modal panel (no dimming scrim, no Escape-dismiss, since it reads as
186
+ an ordinary always-interactive panel rather than a blocking dialog); a
187
+ `push`-mode sidebar is even more clearly non-modal, since it never
188
+ covers anything.
189
+
190
+ The right-hand detail column is unaffected by any of the above: it still
191
+ reserves an inline grid column on desktop and becomes a dismissible
192
+ overlay (scrim/Escape) on mobile.
170
193
 
171
194
  Widths are tunable per instance via `--component-sidebar-width` (16rem),
172
195
  `--component-sidebar-rail-width` (3.5rem), and `--component-topbar-height`
173
196
  (3rem); the detail column reuses the 20rem/25rem panel widths. The main
174
197
  content area is white by default — override it with
175
- `--component-main-background`. Give the shell a height (e.g. `height: 100vh`)
176
- so the sidebar and main can size and scroll.
198
+ `--component-main-background`. Give the shell a height (e.g. `height:
199
+ 100vh`) so the sidebar and main can size and scroll.
177
200
 
178
- The built-in top-bar button toggles the sidebar, and so does pressing `[`
179
- anywhere on the page (ignored while typing in a text field or with a
180
- modifier held). Hovering or keyboard-focusing the toggle reveals a tooltip
181
- naming the action and its `[` shortcut — the shortcut is not shown as
182
- permanent chrome.
201
+ Hovering or keyboard-focusing the toggle reveals a tooltip naming the
202
+ action and its `[` shortcut — the shortcut is not shown as permanent
203
+ chrome.
183
204
 
184
205
  Import: `import "@f-ewald/components/app-shell.js";`
185
206
 
186
- Properties: `sidebarCollapsed` (attribute `sidebar-collapsed`) : boolean, default false; `detailOpen` (attribute `detail-open`) : boolean, default false; `detailWidth` (attribute `detail-width`) : "compact" | "comfortable", default "compact"
207
+ 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"
187
208
  Events: `sidebar-toggle`, `detail-close`
188
209
  CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-overlay`, `--ui-radius-sm`, `--ui-shadow`, `--ui-shadow-lg`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`, `--ui-tooltip`
189
210
 
@@ -215,9 +236,10 @@ label), optional `<p>` group headings, and marks the active item with
215
236
  `aria-current="page"`. The sidebar styles them, tracks hover/active/focus,
216
237
  and — in collapsed "rail" mode — centers the icons and hides the labels.
217
238
 
218
- Rail mode is driven by the `collapsed` attribute (the parent `app-shell`
219
- toggles it). Labels are hidden by the inherited `--app-sidebar-label` custom
220
- property, so each label element should read it, e.g.
239
+ Rail mode is driven by the `collapsed` attribute, which callers set
240
+ directly — `app-shell` no longer auto-manages it (its own sidebar is a
241
+ pure overlay, not a rail). Labels are hidden by the inherited
242
+ `--app-sidebar-label` custom property, so each label element should read it, e.g.
221
243
  `<span style="display: var(--app-sidebar-label, inline)">Reports</span>`;
222
244
  keep an `aria-label` on the item so its accessible name survives collapse.
223
245
  The sidebar fills the width and height of its container — `app-shell` owns
@@ -601,6 +623,33 @@ Example:
601
623
  </chat-message>
602
624
  ```
603
625
 
626
+ ## <chevron-panel>
627
+
628
+ A generic disclosure: a clickable header that expands/collapses a body,
629
+ with a chevron that rotates to reflect state. Headline and body are both
630
+ slotted, so any markup can go in either — unlike `chat-message`'s
631
+ built-in collapsible mode, which only slots the body and builds its
632
+ header from discrete properties (author/timestamp/summary).
633
+
634
+ Import: `import "@f-ewald/components/chevron-panel.js";`
635
+
636
+ Properties: `open` (attribute `open`) : boolean, default false
637
+ Events: `toggle`
638
+ CSS custom properties: `--ui-focus-ring`, `--ui-font`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
639
+
640
+ Example:
641
+ ```html
642
+ <chevron-panel>
643
+ <strong slot="headline">Why these scores?</strong>
644
+ <p>Each category blends several weighted inputs.</p>
645
+ </chevron-panel>
646
+ <script type="module">
647
+ document.querySelector("chevron-panel").addEventListener("toggle", (e) => {
648
+ console.log(e.detail.open);
649
+ });
650
+ </script>
651
+ ```
652
+
604
653
  ## <comment-composer>
605
654
 
606
655
  GitHub/Slack-style comment composer: a one-line text field that expands
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.32.1",
4
+ "version": "1.34.0",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",