eidotter 0.43.0 → 0.45.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 CHANGED
@@ -15,7 +15,7 @@
15
15
  [![license](https://img.shields.io/badge/license-CC--BY--NC--4.0-ffb000?labelColor=020003)](./LICENSE.md)
16
16
  [![React](https://img.shields.io/badge/React-18%20%7C%2019-ffb000?labelColor=020003)](https://react.dev/)
17
17
 
18
- **eiDotter** is a React component library that takes the DOS/CGA terminal aesthetic seriously: authentic 16-color palette, bitmap-accurate typography, phosphor glow physics, keyboard-first interactions. 61 components across forms, navigation, windowing, timelines, health displays, and terminal chrome — shipped as ES modules with a prebuilt stylesheet so consumers don't need Tailwind to use it.
18
+ **eiDotter** is a React component library that takes the DOS/CGA terminal aesthetic seriously: authentic 16-color palette, bitmap-accurate typography, phosphor glow physics, keyboard-first interactions. 62 components across forms, navigation, windowing, timelines, health displays, and terminal chrome — shipped as ES modules with a prebuilt stylesheet so consumers don't need Tailwind to use it.
19
19
 
20
20
  → **[Storybook](https://cinimody.github.io/eiDotter/)**  ·  **[CHANGELOG](./CHANGELOG.md)**  ·  **[Accessibility](./ACCESSIBILITY.md)**  ·  **[Issues](https://github.com/CinimoDY/eiDotter/issues)**  ·  **[npm](https://www.npmjs.com/package/eidotter)**
21
21
 
@@ -116,9 +116,9 @@ for client apps and `'use client'` files.
116
116
 
117
117
  ## Upgrading
118
118
 
119
- Every minor with breaking or visible changes ships an upgrade guide in the package, at `node_modules/eidotter/migrations/<version>.md` (source: [`migrations/`](./migrations/)). Read every guide between your installed version and the target, oldest first. Start with [0.41.0](./migrations/0.41.0.md), then [0.43.0](./migrations/0.43.0.md).
119
+ Every minor with breaking or visible changes ships an upgrade guide in the package, at `node_modules/eidotter/migrations/<version>.md` (source: [`migrations/`](./migrations/)). Read every guide between your installed version and the target, oldest first. Start with [0.41.0](./migrations/0.41.0.md), then [0.43.0](./migrations/0.43.0.md), [0.44.0](./migrations/0.44.0.md) and [0.45.0](./migrations/0.45.0.md).
120
120
 
121
- 0.x caret ranges stop at the next minor (`^0.40.2` never resolves to 0.41.0), so bump the range explicitly: `npm install eidotter@^0.43.0`.
121
+ 0.x caret ranges stop at the next minor (`^0.40.2` never resolves to 0.41.0), so bump the range explicitly: `npm install eidotter@^0.45.0`.
122
122
 
123
123
  ## Documentation
124
124
 
@@ -133,7 +133,7 @@ Every minor with breaking or visible changes ships an upgrade guide in the packa
133
133
 
134
134
  ## Components
135
135
 
136
- 61 components across six families — [complete catalog in Storybook](https://cinimody.github.io/eiDotter/). Also exported but not tabled below: Bench, CalendarHeatmap, Connector, CopyButton, ChecklistRow, EmptyState, HoldToComplete, LabeledProgress, LedgerRow, PageShell (with PageSection), ProgressRing, SectionHeading, Select, TimelineFeed, TimelinePage and the `Mark` brand component.
136
+ 62 components across six families — [complete catalog in Storybook](https://cinimody.github.io/eiDotter/). Also exported but not tabled below: Bench, CalendarHeatmap, Connector, CopyButton, ChecklistRow, DisplayMenu, EmptyState, HoldToComplete, LabeledProgress, LedgerRow, PageShell (with PageSection), ProgressRing, SectionHeading, Select, TimelineFeed, TimelinePage and the `Mark` brand component.
137
137
 
138
138
  <details>
139
139
  <summary><strong>Windowing &amp; shell</strong> — Terminal, DosDialog, DosWindow, IconButton, Modal, Lightbox, CommandPrompt, CmdPalette, Header, Footer, Nav, Brand</summary>
@@ -98,7 +98,12 @@ export const CmdPalette = forwardRef(({ open, onOpenChange, items, placeholder =
98
98
  useEffect(() => {
99
99
  setSelected(s => Math.min(s, Math.max(0, results.length - 1)));
100
100
  }, [results.length]);
101
- // Focus input when open (React Aria handles focus trap; we steer to input)
101
+ // Focus the input when the palette opens. `autoFocus` on the input focuses
102
+ // it during the commit of the opening click or keypress, which is what
103
+ // mobile Safari needs to raise the on-screen keyboard (a focus() call in a
104
+ // later timer is outside the user gesture, so iOS focuses without a
105
+ // keyboard). This timer is the fallback for environments where the dialog's
106
+ // own focus management lands after the mount.
102
107
  useEffect(() => {
103
108
  if (open) {
104
109
  const id = window.setTimeout(() => inputRef.current?.focus(), 10);
@@ -162,9 +167,8 @@ export const CmdPalette = forwardRef(({ open, onOpenChange, items, placeholder =
162
167
  };
163
168
  return (_jsxs(DosDialog, { ref: ref, open: open, onOpenChange: onOpenChange, placement: "top", size: "lg", "aria-label": ariaLabel, className: cn('eidotter-cmdpal__container', className), head: {
164
169
  title: 'JUMP TO',
165
- end: _jsx("span", { className: "eidotter-cmdpal__blink", children: "_" }),
166
170
  decorative: true,
167
- }, footer: footerHint ? (_jsx("div", { className: "eidotter-cmdpal__footer", "aria-hidden": "true", children: footerHint })) : undefined, children: [_jsx("input", { ref: inputRef, type: "text", role: "combobox", "aria-controls": listboxId, "aria-expanded": true, "aria-autocomplete": "list", "aria-activedescendant": results[selected] ? `${baseId}-item-${results[selected].id}` : undefined, className: "eidotter-cmdpal__input", value: query, placeholder: placeholder, onChange: e => setQuery(e.target.value), onKeyDown: handleKeyDown }), _jsxs("ul", { ref: listRef, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "eidotter-cmdpal__results", children: [results.length === 0 && (_jsx("li", { className: "eidotter-cmdpal__empty", role: "presentation", children: emptyMessage })), results.map((item, i) => {
171
+ }, footer: footerHint ? (_jsx("div", { className: "eidotter-cmdpal__footer", "aria-hidden": "true", children: footerHint })) : undefined, children: [_jsx("input", { ref: inputRef, autoFocus: true, type: "text", enterKeyHint: "go", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, role: "combobox", "aria-controls": listboxId, "aria-expanded": true, "aria-autocomplete": "list", "aria-activedescendant": results[selected] ? `${baseId}-item-${results[selected].id}` : undefined, className: "eidotter-cmdpal__input", value: query, placeholder: placeholder, onChange: e => setQuery(e.target.value), onKeyDown: handleKeyDown }), _jsxs("ul", { ref: listRef, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "eidotter-cmdpal__results", children: [results.length === 0 && (_jsx("li", { className: "eidotter-cmdpal__empty", role: "presentation", children: emptyMessage })), results.map((item, i) => {
168
172
  const isSelected = i === selected;
169
173
  return (_jsx("li", { id: `${baseId}-item-${item.id}`, role: "option", "aria-selected": isSelected, "data-index": i, className: cn('eidotter-cmdpal__item', isSelected && 'eidotter-cmdpal__item--selected'), onMouseMove: () => {
170
174
  if (suppressHoverRef.current)
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ export interface DisplayMenuItem {
3
+ /** Stable id, used for keys and the hint's id. */
4
+ id: string;
5
+ /** Row label, also the switch's accessible name (e.g. `'DOS'`, `'PAPER'`). */
6
+ label: string;
7
+ /** Whether the option is on. The consumer owns the state. */
8
+ checked: boolean;
9
+ /** Called with the new value when the switch is toggled. */
10
+ onChange: (checked: boolean) => void;
11
+ /** Disable the row (e.g. PAPER while DOS is off). */
12
+ disabled?: boolean;
13
+ /** Short muted line under the row, linked as the switch's description. */
14
+ hint?: string;
15
+ }
16
+ export interface DisplayMenuProps {
17
+ /** One row per display option: a label and a Switch. */
18
+ items: DisplayMenuItem[];
19
+ /**
20
+ * Trigger label and the panel's accessible name. Default `'Display'`.
21
+ * Below 640px the trigger shows only the icon; the label stays its
22
+ * accessible name.
23
+ */
24
+ label?: string;
25
+ /**
26
+ * `'responsive'` (default): icon only below 640px, icon + label above.
27
+ * `'icon'`: always icon only. `'label'`: always icon + label.
28
+ */
29
+ labelDisplay?: 'responsive' | 'icon' | 'label';
30
+ /** Panel placement relative to the trigger. Default `'bottom end'`. */
31
+ placement?: 'bottom end' | 'bottom start' | 'bottom';
32
+ /** Render with the panel open (uncontrolled), e.g. for docs and stories. */
33
+ defaultOpen?: boolean;
34
+ /** Extra class on the trigger button. */
35
+ className?: string;
36
+ }
37
+ /**
38
+ * DisplayMenu: one header control for display options (DMNC-1619).
39
+ *
40
+ * A trigger button (pixel monitor glyph, label, ▾) opens a small panel of
41
+ * rows, each a label and an eidotter `Switch`, for options such as DOS mode
42
+ * or the amber-paper theme. Built for Header's `end` slot so every site has
43
+ * one theme control instead of switches side by side.
44
+ *
45
+ * The panel is a React Aria popover dialog: it portals out of the header (so
46
+ * the end slot's clip never cuts it), Escape and a click outside close it
47
+ * and focus returns to the trigger, and Tab moves between the switches.
48
+ * Consumers own the state; DisplayMenu only renders it.
49
+ */
50
+ export declare const DisplayMenu: React.ForwardRefExoticComponent<DisplayMenuProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { forwardRef, useId } from 'react';
4
+ import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Popover as AriaPopover, } from 'react-aria-components';
5
+ import { Monitor } from 'pixelarticons/react/Monitor.js';
6
+ import { ChevronDown } from 'pixelarticons/react/ChevronDown.js';
7
+ import { Switch } from '../../Switch/index.js';
8
+ import { cn } from '../../../utils/cn.js';
9
+ /**
10
+ * DisplayMenu: one header control for display options (DMNC-1619).
11
+ *
12
+ * A trigger button (pixel monitor glyph, label, ▾) opens a small panel of
13
+ * rows, each a label and an eidotter `Switch`, for options such as DOS mode
14
+ * or the amber-paper theme. Built for Header's `end` slot so every site has
15
+ * one theme control instead of switches side by side.
16
+ *
17
+ * The panel is a React Aria popover dialog: it portals out of the header (so
18
+ * the end slot's clip never cuts it), Escape and a click outside close it
19
+ * and focus returns to the trigger, and Tab moves between the switches.
20
+ * Consumers own the state; DisplayMenu only renders it.
21
+ */
22
+ export const DisplayMenu = forwardRef(({ items, label = 'Display', labelDisplay = 'responsive', placement = 'bottom end', defaultOpen, className, }, ref) => {
23
+ const baseId = useId();
24
+ return (_jsxs(AriaDialogTrigger, { defaultOpen: defaultOpen, children: [_jsxs(AriaButton, { ref: ref, "aria-label": label, className: cn('eidotter-display-menu', `eidotter-display-menu--${labelDisplay}`, className), children: [_jsx(Monitor, { className: "eidotter-display-menu__icon", "aria-hidden": "true", focusable: "false" }), _jsx("span", { className: "eidotter-display-menu__label", "aria-hidden": "true", children: label }), _jsx(ChevronDown, { className: "eidotter-display-menu__chevron", "aria-hidden": "true", focusable: "false" })] }), _jsx(AriaPopover, { placement: placement, offset: 6, className: "eidotter-display-menu__popover", children: _jsx(AriaDialog, { "aria-label": label, className: "eidotter-display-menu__panel", children: _jsx("ul", { className: "eidotter-display-menu__list", children: items.map((item) => {
25
+ const hintId = item.hint ? `${baseId}-${item.id}-hint` : undefined;
26
+ return (_jsxs("li", { className: "eidotter-display-menu__row", children: [_jsx(Switch, { label: item.label, checked: item.checked, onChange: item.onChange, disabled: item.disabled, "aria-describedby": hintId, className: "eidotter-display-menu__switch" }), item.hint && (_jsx("span", { id: hintId, className: "eidotter-display-menu__hint", children: item.hint }))] }, item.id));
27
+ }) }) }) })] }));
28
+ });
29
+ DisplayMenu.displayName = 'DisplayMenu';
@@ -0,0 +1,2 @@
1
+ export { DisplayMenu } from './DisplayMenu.js';
2
+ export type { DisplayMenuProps, DisplayMenuItem } from './DisplayMenu.js';
@@ -0,0 +1 @@
1
+ export { DisplayMenu } from './DisplayMenu.js';
@@ -0,0 +1,2 @@
1
+ export { DisplayMenu } from './components/index.js';
2
+ export type { DisplayMenuProps, DisplayMenuItem } from './components/index.js';
@@ -0,0 +1 @@
1
+ export { DisplayMenu } from './components/index.js';
@@ -26,9 +26,12 @@ export const Header = forwardRef(({ brandName, brandHref = '/', items, activeHre
26
26
  // contained: true → CSS default width; a non-blank string → that CSS length.
27
27
  const containedWidth = typeof contained === 'string' ? contained.trim() : '';
28
28
  const isContained = contained === true || containedWidth !== '';
29
- const brandContent = children || (iconBrand ? (_jsxs(_Fragment, { children: [brand === 'mark'
29
+ // Name before icon in the DOM: the link lays them out row-reverse (icon on
30
+ // the left) and wraps, so on a row too narrow for both it is the icon that
31
+ // moves to the clipped second line and the name stays (CSS, 0.45).
32
+ const brandContent = children || (iconBrand ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "eidotter-header__brand-name uppercase tracking-[0.3em]", children: brandName }), brand === 'mark'
30
33
  ? _jsx(Mark, { size: 28, label: "", className: "eidotter-header__brand-icon" })
31
- : _jsx(Logo, { size: 28, glow: true, title: "", className: "eidotter-header__brand-icon" }), _jsx("span", { className: "eidotter-header__brand-name uppercase tracking-[0.3em]", children: brandName })] })) : brandName);
34
+ : _jsx(Logo, { size: 28, glow: true, title: "", className: "eidotter-header__brand-icon" })] })) : brandName);
32
35
  // `end` is rendered once: DesktopNav is hidden <768px and the MENU trigger
33
36
  // ≥768px, so this DOM order gives "nav · end" on desktop and "end · MENU" on
34
37
  // mobile. The right-hand group wrapper only exists when `end` is passed, so
@@ -1,20 +1,20 @@
1
1
  import React, { FC } from 'react';
2
2
  type PixelIcon = FC<React.SVGProps<SVGSVGElement>>;
3
3
  declare const ICON_MAP: {
4
- Info: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
5
- Warning: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
6
- Error: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
7
- Done: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
8
- Check: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
4
+ Info: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
5
+ Warning: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
6
+ Error: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
7
+ Done: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
8
+ Check: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
9
9
  Close: PixelIcon;
10
- 'Chevron Up': (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
11
- 'Chevron Down': (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
12
- 'Chevron Left': (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
13
- 'Chevron Right': (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
14
- App: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
15
- Cancel: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
16
- Fullscreen: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
17
- Add: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
10
+ 'Chevron Up': (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
11
+ 'Chevron Down': (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
12
+ 'Chevron Left': (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
13
+ 'Chevron Right': (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
14
+ App: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
15
+ Cancel: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
16
+ Fullscreen: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
17
+ Add: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
18
18
  };
19
19
  export type IconName = keyof typeof ICON_MAP;
20
20
  /**
@@ -1,17 +1,17 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { InfoBox } from 'pixelarticons/react/InfoBox';
4
- import { WarningDiamond } from 'pixelarticons/react/WarningDiamond';
5
- import { SquareAlert } from 'pixelarticons/react/SquareAlert';
6
- import { Check } from 'pixelarticons/react/Check';
7
- import { ChevronUp } from 'pixelarticons/react/ChevronUp';
8
- import { ChevronDown } from 'pixelarticons/react/ChevronDown';
9
- import { ChevronLeft } from 'pixelarticons/react/ChevronLeft';
10
- import { ChevronRight } from 'pixelarticons/react/ChevronRight';
11
- import { WindowFrame } from 'pixelarticons/react/WindowFrame';
12
- import { Minus } from 'pixelarticons/react/Minus';
13
- import { Expand } from 'pixelarticons/react/Expand';
14
- import { Plus } from 'pixelarticons/react/Plus';
3
+ import { InfoBox } from 'pixelarticons/react/InfoBox.js';
4
+ import { WarningDiamond } from 'pixelarticons/react/WarningDiamond.js';
5
+ import { SquareAlert } from 'pixelarticons/react/SquareAlert.js';
6
+ import { Check } from 'pixelarticons/react/Check.js';
7
+ import { ChevronUp } from 'pixelarticons/react/ChevronUp.js';
8
+ import { ChevronDown } from 'pixelarticons/react/ChevronDown.js';
9
+ import { ChevronLeft } from 'pixelarticons/react/ChevronLeft.js';
10
+ import { ChevronRight } from 'pixelarticons/react/ChevronRight.js';
11
+ import { WindowFrame } from 'pixelarticons/react/WindowFrame.js';
12
+ import { Minus } from 'pixelarticons/react/Minus.js';
13
+ import { Expand } from 'pixelarticons/react/Expand.js';
14
+ import { Plus } from 'pixelarticons/react/Plus.js';
15
15
  import { cn } from '../../../utils/cn.js';
16
16
  /**
17
17
  * Custom pixel-art X mark — pixelarticons v2 has no standalone close/X glyph.
@@ -16,6 +16,13 @@ export interface LegalPageProps {
16
16
  home?: React.ReactNode;
17
17
  /** Body content — `<h2>`, `<p>`, `<ul>`, `<address>` children styled by the wrapper. */
18
18
  children: React.ReactNode;
19
+ /**
20
+ * Render inside the site's own page column (e.g. `PageShell`) instead of
21
+ * as a standalone page: no own 720px column, centring, padding, background
22
+ * or font, and a start-aligned hero without the rule under it. The type
23
+ * scale and body styles stay. Default `false`.
24
+ */
25
+ embedded?: boolean;
19
26
  /** Extra class on the outer wrapper */
20
27
  className?: string;
21
28
  }
@@ -8,4 +8,4 @@ import { cn } from '../../../utils/cn.js';
8
8
  * `<h2>`/`<p>`/`<ul>` body content (or pre-built clauses from this module)
9
9
  * and the wrapper handles spacing, type scale, and the `>` list bullet.
10
10
  */
11
- export const LegalPage = ({ title, date, intro, home, children, className, ...props }) => (_jsxs("div", { className: cn('eidotter-legal-page', className), ...props, children: [home && _jsx("div", { className: "eidotter-legal-page__home", children: home }), _jsxs("article", { children: [_jsxs("header", { className: "eidotter-legal-page__hero", children: [_jsx("p", { className: "eidotter-legal-page__date", children: date }), _jsx("h1", { children: title }), intro && _jsx("div", { className: "eidotter-legal-page__intro", children: intro })] }), _jsx("div", { className: "eidotter-legal-page__body", children: children })] })] }));
11
+ export const LegalPage = ({ title, date, intro, home, embedded = false, children, className, ...props }) => (_jsxs("div", { className: cn('eidotter-legal-page', embedded && 'eidotter-legal-page--embedded', className), ...props, children: [home && _jsx("div", { className: "eidotter-legal-page__home", children: home }), _jsxs("article", { children: [_jsxs("header", { className: "eidotter-legal-page__hero", children: [_jsx("p", { className: "eidotter-legal-page__date", children: date }), _jsx("h1", { children: title }), intro && _jsx("div", { className: "eidotter-legal-page__intro", children: intro })] }), _jsx("div", { className: "eidotter-legal-page__body", children: children })] })] }));
@@ -38,7 +38,10 @@ export interface PageShellProps extends React.HTMLAttributes<HTMLDivElement> {
38
38
  * `<main>`.
39
39
  */
40
40
  contentAs?: 'main' | 'div';
41
- /** `id` for the content element, e.g. a Header `skipLinkTarget` (`#content`). */
41
+ /**
42
+ * `id` for the content element, e.g. a Header `skipLinkTarget` (`#content`).
43
+ * Also sets `tabIndex={-1}`, so following the skip link moves focus there.
44
+ */
42
45
  contentId?: string;
43
46
  /** Page sections (`PageSection`, Bench, …), stacked with a 40px gap. */
44
47
  children?: React.ReactNode;
@@ -53,6 +56,10 @@ export interface PageShellProps extends React.HTMLAttributes<HTMLDivElement> {
53
56
  * with a 40px gap. No dividers: the only lines on the page are the ones its
54
57
  * children draw (window frames, pane gaps).
55
58
  *
59
+ * Paints no background and sets no font: the page's own ground (a CRT tint,
60
+ * RetroEffects) and body font show through. Pass a `className` to paint
61
+ * an opaque ground.
62
+ *
56
63
  * Server-safe and presentational. Ref forwards to the root `<div>`.
57
64
  */
58
65
  export declare const PageShell: React.ForwardRefExoticComponent<PageShellProps & React.RefAttributes<HTMLDivElement>>;
@@ -16,6 +16,10 @@ function PageIntro({ intro }) {
16
16
  * with a 40px gap. No dividers: the only lines on the page are the ones its
17
17
  * children draw (window frames, pane gaps).
18
18
  *
19
+ * Paints no background and sets no font: the page's own ground (a CRT tint,
20
+ * RetroEffects) and body font show through. Pass a `className` to paint
21
+ * an opaque ground.
22
+ *
19
23
  * Server-safe and presentational. Ref forwards to the root `<div>`.
20
24
  */
21
25
  export const PageShell = forwardRef(({ header, intro, footer, maxWidth, contentAs = 'main', contentId, children, className, style, ...rest }, ref) => {
@@ -24,6 +28,6 @@ export const PageShell = forwardRef(({ header, intro, footer, maxWidth, contentA
24
28
  const mergedStyle = width
25
29
  ? { ...style, '--eidotter-page-shell-max': width }
26
30
  : style;
27
- return (_jsx("div", { ref: ref, className: cn('eidotter-page-shell', className), style: mergedStyle, ...rest, children: _jsxs("div", { className: "eidotter-page-shell__column", children: [header != null && header !== false && (_jsx("div", { className: "eidotter-page-shell__header", children: header })), _jsxs(Content, { id: contentId, className: "eidotter-page-shell__content", children: [intro && _jsx(PageIntro, { intro: intro }), children] }), footer != null && footer !== false && (_jsx("div", { className: "eidotter-page-shell__footer", children: footer }))] }) }));
31
+ return (_jsx("div", { ref: ref, className: cn('eidotter-page-shell', className), style: mergedStyle, ...rest, children: _jsxs("div", { className: "eidotter-page-shell__column", children: [header != null && header !== false && (_jsx("div", { className: "eidotter-page-shell__header", children: header })), _jsxs(Content, { id: contentId, tabIndex: contentId ? -1 : undefined, className: "eidotter-page-shell__content", children: [intro && _jsx(PageIntro, { intro: intro }), children] }), footer != null && footer !== false && (_jsx("div", { className: "eidotter-page-shell__footer", children: footer }))] }) }));
28
32
  });
29
33
  PageShell.displayName = 'PageShell';
@@ -24,6 +24,8 @@ export interface SwitchProps {
24
24
  className?: string;
25
25
  /** Accessible label */
26
26
  'aria-label'?: string;
27
+ /** Id of an element that describes the switch (a hint line) */
28
+ 'aria-describedby'?: string;
27
29
  }
28
30
  /**
29
31
  * DOS-styled Switch with phosphor glow toggle effect.
@@ -7,5 +7,5 @@ import { cn } from '../../../utils/cn.js';
7
7
  * DOS-styled Switch with phosphor glow toggle effect.
8
8
  * Built on React Aria for accessible toggle behavior.
9
9
  */
10
- export const Switch = forwardRef(({ checked, defaultChecked = false, onChange, onCheckedChange, disabled = false, size = 'md', type = 'default', label, name, value, className, ...props }, ref) => (_jsx(AriaSwitch, { ref: ref, isSelected: checked, defaultSelected: defaultChecked, onChange: onChange ?? onCheckedChange, isDisabled: disabled, name: name, value: value, className: cn('inline-flex items-center gap-2 cursor-pointer outline-none font-dos group', 'eidotter-switch', disabled && 'opacity-50 cursor-not-allowed', className), "data-size": size, "data-type": type, ...props, children: ({ isSelected }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: cn('eidotter-switch__track', isSelected && 'eidotter-switch__track--checked', type === 'slim' && 'eidotter-switch__track--slim', size === 'sm' && 'eidotter-switch__track--sm'), children: _jsx("span", { className: "eidotter-switch__thumb" }) }), label && _jsx("span", { className: "text-[var(--color-cga-amber)]", children: label })] })) })));
10
+ export const Switch = forwardRef(({ checked, defaultChecked = false, onChange, onCheckedChange, disabled = false, size = 'md', type = 'default', label, name, value, className, ...props }, ref) => (_jsx(AriaSwitch, { ref: ref, isSelected: checked, defaultSelected: defaultChecked, onChange: onChange ?? onCheckedChange, isDisabled: disabled, name: name, value: value, className: cn('inline-flex items-center gap-2 cursor-pointer outline-none font-dos group', 'eidotter-switch', disabled && 'opacity-50 cursor-not-allowed', className), "data-size": size, "data-type": type, ...props, children: ({ isSelected }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: cn('eidotter-switch__track', isSelected && 'eidotter-switch__track--checked', type === 'slim' && 'eidotter-switch__track--slim', size === 'sm' && 'eidotter-switch__track--sm'), children: _jsx("span", { className: "eidotter-switch__thumb" }) }), label && _jsx("span", { className: "eidotter-switch__label", children: label })] })) })));
11
11
  Switch.displayName = 'Switch';
@@ -454,6 +454,7 @@ export const componentRegistry = {
454
454
  swiftui: { status: 'planned' },
455
455
  },
456
456
  changelog: [
457
+ { version: '0.45.0', type: 'added', description: 'aria-describedby prop (DisplayMenu links row hints with it); label colour is the semantic text-brand role (class eidotter-switch__label), so it re-themes on light and amber-paper (DMNC-1620)' },
457
458
  { version: '0.16.0', type: 'changed', description: 'Migrate to React Aria + Tailwind-first (Wave 1); add size:sm variant' },
458
459
  { version: '0.9.0', type: 'changed', description: 'Replace text-primary with cga-amber' },
459
460
  { version: '0.8.0', type: 'changed', description: 'Design-craft animation polish — toggle glow transition' },
@@ -694,6 +695,7 @@ export const componentRegistry = {
694
695
  'brandCollapse:mark': { description: 'Below 480px of header width (container query) only the icon shows; the name stays the accessible name', since: '0.43.0' },
695
696
  },
696
697
  changelog: [
698
+ { version: '0.45.0', type: 'changed', description: 'Brand title never wraps or ellipsizes; on a tight row a lockup/mark brand drops its icon first (name first in the DOM, row-reverse wrap onto a clipped second row), then the end slot clips. Phone gaps (below 480px) 8px with an end slot (DMNC-1619)' },
697
699
  { version: '0.43.0', type: 'added', description: '`layout` (inline | stacked), `rule` (false drops the bottom line and its glow), `contained` (true = 1240px column, or a CSS length, with the PageShell gutter, so the brand lines up with a page column) and `brandCollapse` (none | mark) props; all default to the previous rendering' },
698
700
  { version: '0.43.0', type: 'changed', description: 'The brand name wraps instead of ellipsizing: the brand link shrinks first (the end slot clips only after the brand reaches its floor of icon + about 8 tracked characters), words break at spaces, a single over-long word breaks mid-word as a last resort; the icon top-aligns beside a two-line name' },
699
701
  { version: '0.41.3', type: 'changed', description: 'end slot clips the inline axis only (overflow-x: clip) with a 12px inline bleed, so focus rings and phosphor glows of controls in it are no longer cut; overflow: hidden fallback without clip support (DMNC-1611)' },
@@ -791,6 +793,21 @@ export const componentRegistry = {
791
793
  { version: '0.41.0', type: 'added', description: 'Initial IconButton: icon, required label (aria-label), size md/window, variant outline/bare, isDisabled, onPress, excludeFromTabOrder; adopted by Modal, Lightbox, Notification, Alert, Tag and Nav (DMNC-1592)' },
792
794
  ],
793
795
  },
796
+ DisplayMenu: {
797
+ origin: 'eidotter',
798
+ consumers: [],
799
+ since: '0.45.0',
800
+ originNote: 'One header control for display options (DMNC-1619): a trigger (pixel monitor glyph, label, chevron; icon only below 640px) opens a React Aria popover dialog with one row per option, each an eidotter Switch. Replaces switches side by side in Header end slots; consumers own the state.',
801
+ variants: {
802
+ 'labelDisplay:responsive': { description: 'Icon only below 640px, icon + label above (default)', since: '0.45.0' },
803
+ 'labelDisplay:icon': { description: 'Always icon only (36px square)', since: '0.45.0' },
804
+ 'labelDisplay:label': { description: 'Always icon + label + chevron', since: '0.45.0' },
805
+ },
806
+ platforms: { react: { path: 'src/components/DisplayMenu', status: 'canonical' } },
807
+ changelog: [
808
+ { version: '0.45.0', type: 'added', description: 'Initial DisplayMenu: items ({ id, label, checked, onChange, disabled, hint }), label, labelDisplay, placement, className; stable classes eidotter-display-menu, __popover, __panel, __row, __switch, __hint (DMNC-1619)' },
809
+ ],
810
+ },
794
811
  DosWindow: {
795
812
  origin: 'eidotter',
796
813
  consumers: [],