@aiquants/menu-bar 1.21.0 → 1.22.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/CHANGELOG.md CHANGED
@@ -4,6 +4,53 @@
4
4
 
5
5
  ### Changed
6
6
 
7
+ - **The drawer's controls and list rows draw their text at the `body` step (13px).** The footer's pin, theme and
8
+ sign-out buttons (11px), the theme button's icon (12px), the two links of `SessionInfo` (11px), the list's top-level
9
+ links and group headings (12px below a 40rem viewport) and the links inside a group (12px) now draw
10
+ `var(--aqmb-font-size-body, 0.8125rem)` (13px at the default root font size) on a
11
+ `var(--aqmb-line-height-body, 1.25rem)` (20px) line. From a 40rem viewport up, the top-level links and group headings
12
+ keep `text-sm` (14px).
13
+ - **The "Google Account" label of `SessionInfo` is at the `caption` step (11px).** It draws
14
+ `var(--aqmb-font-size-caption, 0.6875rem)` on a `var(--aqmb-line-height-caption, 1.25rem)` line instead of 10px, so
15
+ its line grows from 12.5px to 20px and the avatar row from 32px to 38px.
16
+ - **The two links of `SessionInfo` are stacked.** At 13px, 「プロフィール」 (about 78 to 80px) no longer fits the 71px
17
+ that a 96px link beside the other one leaves for its label, so each link is a row as wide as the card (198px in the
18
+ drawer's header) and at least 2.75rem (44px) tall. The card grows from 113px to 169px, and the drawer's list area
19
+ shrinks by as much.
20
+ - **Text sizes and line heights are in rem and follow page zoom and the root font-size setting.** The hand-written px
21
+ sizes (`text-[11px]`, `text-[10px]`) are gone. The package reads `--aqmb-font-size-body`, `--aqmb-line-height-body`,
22
+ `--aqmb-font-size-caption` and `--aqmb-line-height-caption` without declaring them, so a host can bind them on
23
+ `:root` to its own type scale (README, "Text Size").
24
+ - **On a short viewport the whole drawer scrolls as one.** The drawer is never taller than the viewport. Below a
25
+ viewport height of 20.9375rem (335px at the default font size: the signed-in `SessionInfo` header, the footer and two
26
+ rows of the list), the header, the list and the footer scroll together, so the footer stays reachable at high zoom
27
+ (360 × 225 CSS px, a 1440 × 900 window at 400 %). On taller viewports the header and the footer stay in place and only
28
+ the list scrolls, as before. The list's region and scroll container take their layout from the new component
29
+ classes `.aiquants-menu-list-region` and `.aiquants-menu-list-scroller` instead of utilities.
30
+ - **Long labels wrap instead of being cut off.** A label of the list longer than its row (a top-level link, a group
31
+ heading or a link inside a group) wraps onto more lines, even inside an unbreakable word, and its row grows past
32
+ 2.75rem; the wrapper of a group's links no longer clips them (its `contain: content` and `white-space: nowrap` are
33
+ removed). The sign-out label wraps inside its button, which grows taller, when a root font size above the default
34
+ leaves it too little width; the footer's buttons have a minimum height of 2.75rem instead of a fixed one.
35
+ - **`SessionInfo` cuts no text to an ellipsis.** The user's name and the labels of the two links wrap onto more lines,
36
+ even inside an unbreakable word (`overflow-wrap: anywhere` on `.aiquants-session-card`), instead of being truncated,
37
+ and the card grows taller. The name loses its `title`, which only revealed a truncated name. At the default 16px root
38
+ every text stays on one line.
39
+ - **The footer row wraps.** When a large root font size no longer fits the pin, theme and sign-out buttons beside one
40
+ another in the 240px drawer (above a root of about 23px; at the 200 % text-size setting, a 32px root, the pin and
41
+ theme buttons share the first line and the sign-out button takes the second), the row wraps, with its gap as the row
42
+ gap, instead of overflowing sideways, and every button keeps at least 2.75rem. The sign-out button no longer shrinks
43
+ below its content (`min-width: 0` is removed). At the default root the row stays one line.
44
+ - **Transitions animate colours only, never the layout.** The theme button, the `SessionInfo` card and its links, and
45
+ the submenu pin buttons transitioned every property (`transition-all`, `transition: all`), so right after a change of
46
+ the root font size their rem padding and minimum sizes moved for 0.15–0.3 s before settling. The theme button, the card
47
+ and the pin buttons now transition their colours only, and the links their colours and their press scale
48
+ (`transition`).
49
+
50
+ ## 1.21.0 (2026-10-25)
51
+
52
+ ### Changed
53
+
7
54
  - **The drawer's controls are 44px targets under every pointer.** With a mouse, a pen or a finger alike, the footer's
8
55
  pin, theme and sign-out buttons, every link of the menu list (which fills its row), the group headings and their pin
9
56
  buttons, and the links of `SessionInfo` are at least 2.75rem × 2.75rem (44 × 44px at the default root font size,
package/README.md CHANGED
@@ -277,6 +277,34 @@ The drawing stays 24px and the box becomes 48 × 48 with 12px of inline padding,
277
277
 
278
278
  Under every pointer (a mouse, a pen or a finger) the drawer's own controls are at least 2.75rem × 2.75rem (44 × 44 px at the default root font size): the footer's pin, theme and sign-out buttons, every link of the list (it fills its row, and the rows have no block padding of their own), the group headings and their pin buttons, and the links of `SessionInfo`.
279
279
 
280
+ The drawer is never taller than the viewport. On a viewport shorter than 20.9375rem (335px at the default font size: the signed-in `SessionInfo` header, the footer and two rows of the list), the header, the list and the footer scroll together as one, so nothing is cut off or out of reach at high zoom (for example 360 × 225 CSS px, a 1440 × 900 window at 400 %); on taller viewports the header and the footer stay in place and only the list scrolls.
281
+ The threshold is in rem, so it rises with the browser's default font-size setting as the drawer's parts do. With a header of your own that is taller than `SessionInfo`, the drawer still scrolls as a whole once the header and the footer alone no longer fit.
282
+
283
+ ## Text Size
284
+
285
+ The drawer's controls and list rows draw their text on two steps of a type scale, each read from a custom property with the step's default as its fallback. The defaults are in rem, so the text follows page zoom and the browser's root font-size setting.
286
+
287
+ | Custom property | Default | Text |
288
+ | --- | --- | --- |
289
+ | `--aqmb-font-size-body` | `0.8125rem` (13px at the default root font size) | The primary text of every control and row: the footer's pin, theme and sign-out buttons, the list's links and group headings, the links inside a group, and the links of `SessionInfo`. From a viewport 40rem wide up, the list's top-level links and group headings use `text-sm` (0.875rem, 14px) instead |
290
+ | `--aqmb-line-height-body` | `1.25rem` (20px) | The line of that text |
291
+ | `--aqmb-font-size-caption` | `0.6875rem` (11px) | The supplementary "Google Account" label of `SessionInfo` |
292
+ | `--aqmb-line-height-caption` | `1.25rem` (20px) | The line of that label |
293
+
294
+ The package only reads these properties and never declares them, so a host can bind them on `:root`, for example to its own type scale:
295
+
296
+ ```css
297
+ :root {
298
+ --aqmb-font-size-body: var(--host-font-size-body);
299
+ --aqmb-line-height-body: var(--host-line-height-body);
300
+ --aqmb-font-size-caption: var(--host-font-size-caption);
301
+ --aqmb-line-height-caption: var(--host-line-height-caption);
302
+ }
303
+ ```
304
+
305
+ The drawer stays 240px wide. At the default sizes the sign-out label (about 78px) fits on one line beside the two 44px buttons with about 5px to spare; with a larger body size, or a root font size above 16px, it wraps inside its button, which grows taller, and above a root of about 23px the footer row wraps and the button takes a line of its own.
306
+ A label of the list longer than its row wraps the same way, even inside an unbreakable word, and its row grows past 2.75rem; the name and the links of `SessionInfo` wrap too, so no label is cut off.
307
+
280
308
  ## Theming
281
309
 
282
310
  The menu bar supports both light and dark themes. The hand-written styles are scoped with the `.aiquants-menu-bar` class; the utility classes and Tailwind theme variables of the standalone build are global (see "Styling (CSS)"). The root element carries the theme as a class: `.aiquants-menu-bar.light` or `.aiquants-menu-bar.dark`.
@@ -472,8 +500,8 @@ The main menu bar component that includes:
472
500
 
473
501
  A standalone session information component that displays:
474
502
 
475
- - The user's avatar (a default icon when `photo` is empty), display name and a "Google Account" label
476
- - Two links rendered through the customizable `LinkComponent` (default: `DefaultLink`, a plain `<a>`): a profile link to `/` and a link to `https://myaccount.google.com/`
503
+ - The user's avatar (a default icon when `photo` is empty), display name and a "Google Account" label (at the caption step, see "Text Size"). The name and the label wrap, even inside an unbreakable word, rather than being cut to an ellipsis
504
+ - Two links rendered through the customizable `LinkComponent` (default: `DefaultLink`, a plain `<a>`): a profile link to `/` and a link to `https://myaccount.google.com/`. They are stacked, each a row as wide as the card and at least 2.75rem tall (44px at the default root font size), its label at the body step, wrapping onto more lines (the link growing taller) when a large root font size leaves it too little width
477
505
  - A "please sign in" card ("ログインしてください") when `user` is `null`
478
506
 
479
507
  The card carries `data-aqmb-session-card` in both states. Sign-out is not part of `SessionInfo`: it is the drawer's sign-out button, which calls `onClickSignout`.
@@ -506,7 +534,9 @@ Hand-written component classes use the `.aiquants-` prefix (the modifiers are th
506
534
 
507
535
  - `.aiquants-menu-bar` - Main container (with the theme class `light` or `dark`)
508
536
  - `.aiquants-menu-switch` - Open/close switch (`.aiquants-menu-switch-bars`, `.aiquants-menu-switch-bar`, `.aiquants-menu-switch-caption`)
509
- - `.aiquants-menu-content` - Drawer
537
+ - `.aiquants-menu-content` - Drawer (never taller than the viewport; it scrolls as a whole on a short one)
538
+ - `.aiquants-menu-list-region` - The list's region between the drawer's header and footer
539
+ - `.aiquants-menu-list-scroller` - The list's scroll container (`data-aqmb-menu-list`) on a tall viewport
510
540
  - `.aiquants-menu-list-item` - Menu item and group summary
511
541
  - `.aiquants-session-card` - Session information card
512
542