eidotter 0.45.0 → 0.46.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.
Files changed (53) hide show
  1. package/README.md +4 -4
  2. package/dist/components/Alert/components/Alert.js +1 -1
  3. package/dist/components/Badge/components/Badge.js +5 -5
  4. package/dist/components/Button/components/Button.js +8 -8
  5. package/dist/components/Chat/components/ChatHistory.js +1 -1
  6. package/dist/components/Chat/components/ChatInput.js +1 -1
  7. package/dist/components/Chat/components/ChatMessage.js +1 -1
  8. package/dist/components/Checkbox/components/Checkbox.js +1 -1
  9. package/dist/components/ChecklistRow/components/ChecklistRow.js +1 -1
  10. package/dist/components/CopyButton/components/CopyButton.js +1 -1
  11. package/dist/components/DecayStrip/components/DecayStrip.js +3 -3
  12. package/dist/components/DisplayMenu/components/DisplayMenu.d.ts +4 -3
  13. package/dist/components/DisplayMenu/components/DisplayMenu.js +11 -7
  14. package/dist/components/EmptyState/components/EmptyState.js +1 -1
  15. package/dist/components/Gauge/components/Gauge.js +4 -4
  16. package/dist/components/Header/components/Header.d.ts +8 -4
  17. package/dist/components/Header/components/Header.js +1 -1
  18. package/dist/components/Header/components/HeaderContextRow.js +1 -1
  19. package/dist/components/HeaderButton/components/HeaderButton.d.ts +38 -0
  20. package/dist/components/HeaderButton/components/HeaderButton.js +25 -0
  21. package/dist/components/HeaderButton/components/index.d.ts +2 -0
  22. package/dist/components/HeaderButton/components/index.js +1 -0
  23. package/dist/components/HeaderButton/index.d.ts +2 -0
  24. package/dist/components/HeaderButton/index.js +1 -0
  25. package/dist/components/LabeledProgress/components/LabeledProgress.js +1 -1
  26. package/dist/components/LedgerRow/components/LedgerRow.js +1 -1
  27. package/dist/components/Meter/components/Meter.js +3 -3
  28. package/dist/components/Notification/components/Notification.js +1 -1
  29. package/dist/components/PageShell/components/PageShell.d.ts +12 -6
  30. package/dist/components/PageShell/components/PageShell.js +7 -4
  31. package/dist/components/Progress/components/Progress.js +6 -5
  32. package/dist/components/RangeBar/components/RangeBar.js +3 -3
  33. package/dist/components/Select/components/Select.js +6 -6
  34. package/dist/components/SeriesBars/components/SeriesBars.js +3 -3
  35. package/dist/components/Stat/components/Stat.js +6 -6
  36. package/dist/components/Switch/components/Switch.d.ts +2 -0
  37. package/dist/components/Tag/components/Tag.js +5 -5
  38. package/dist/components/VitalsStrip/components/VitalsStrip.js +4 -4
  39. package/dist/components/registry.js +18 -0
  40. package/dist/eidotter.css +2 -2
  41. package/dist/index.d.ts +5 -1
  42. package/dist/index.es.js +422 -300
  43. package/dist/index.umd.js +1 -1
  44. package/dist/utils/displayTheme.d.ts +53 -0
  45. package/dist/utils/displayTheme.js +76 -0
  46. package/guidelines/README.md +8 -0
  47. package/llms.txt +3 -3
  48. package/migrations/0.45.0.md +9 -5
  49. package/migrations/0.46.0.md +120 -0
  50. package/migrations/README.md +2 -0
  51. package/package.json +1 -1
  52. package/src/styles/shadcn.css +1 -1
  53. package/src/styles/theme.amber-paper.css +3 -3
@@ -3,9 +3,9 @@ import { forwardRef } from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { formatValue, isKnown, resolveLabels, PLACEHOLDER } from '../../../utils/health/index.js';
5
5
  const sizeClasses = {
6
- sm: 'eidotter-series-bars--sm text-dos-text-xs',
7
- md: 'eidotter-series-bars--md text-dos-text-sm',
8
- lg: 'eidotter-series-bars--lg text-dos-text-md',
6
+ sm: 'eidotter-series-bars--sm text-dos-text-base',
7
+ md: 'eidotter-series-bars--md text-dos-text-base',
8
+ lg: 'eidotter-series-bars--lg text-dos-text-base',
9
9
  };
10
10
  const plotClasses = {
11
11
  sm: 'h-[6rem]',
@@ -4,12 +4,12 @@ import { forwardRef } from 'react';
4
4
  import { useTextScramble } from '../../../hooks/useTextScramble.js';
5
5
  import { cn } from '../../../utils/cn.js';
6
6
  const sizeClasses = {
7
- sm: { root: 'gap-0.5', label: 'text-dos-text-xs', value: 'text-dos-display-xs', trend: 'text-dos-text-xs' },
8
- md: { root: 'gap-1', label: 'text-dos-text-sm', value: 'text-dos-display-sm', trend: 'text-dos-text-sm' },
9
- lg: { root: 'gap-1.5', label: 'text-dos-text-md', value: 'text-dos-display-md', trend: 'text-dos-text-md' },
10
- small: { root: 'gap-0.5', label: 'text-dos-text-xs', value: 'text-dos-display-xs', trend: 'text-dos-text-xs' },
11
- medium: { root: 'gap-1', label: 'text-dos-text-sm', value: 'text-dos-display-sm', trend: 'text-dos-text-sm' },
12
- large: { root: 'gap-1.5', label: 'text-dos-text-md', value: 'text-dos-display-md', trend: 'text-dos-text-md' },
7
+ sm: { root: 'gap-0.5', label: 'text-dos-text-base', value: 'text-dos-display-xs', trend: 'text-dos-text-base' },
8
+ md: { root: 'gap-1', label: 'text-dos-text-base', value: 'text-dos-display-sm', trend: 'text-dos-text-base' },
9
+ lg: { root: 'gap-1.5', label: 'text-dos-text-base', value: 'text-dos-display-md', trend: 'text-dos-text-base' },
10
+ small: { root: 'gap-0.5', label: 'text-dos-text-base', value: 'text-dos-display-xs', trend: 'text-dos-text-base' },
11
+ medium: { root: 'gap-1', label: 'text-dos-text-base', value: 'text-dos-display-sm', trend: 'text-dos-text-base' },
12
+ large: { root: 'gap-1.5', label: 'text-dos-text-base', value: 'text-dos-display-md', trend: 'text-dos-text-base' },
13
13
  };
14
14
  const trendColorClasses = {
15
15
  up: 'text-dos-text-success',
@@ -26,6 +26,8 @@ export interface SwitchProps {
26
26
  'aria-label'?: string;
27
27
  /** Id of an element that describes the switch (a hint line) */
28
28
  'aria-describedby'?: string;
29
+ /** Focus the switch when it mounts (DisplayMenu focuses its first row) */
30
+ autoFocus?: boolean;
29
31
  }
30
32
  /**
31
33
  * DOS-styled Switch with phosphor glow toggle effect.
@@ -4,11 +4,11 @@ import { IconButton } from '../../IconButton/components/IconButton.js';
4
4
  import { cn } from '../../../utils/cn.js';
5
5
  import { useAnimatedDismiss } from '../../../hooks/useAnimatedDismiss.js';
6
6
  const sizeClasses = {
7
- sm: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
8
- md: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
9
- lg: 'text-dos-text-md px-3 py-1.5 min-h-8 gap-1.5',
10
- small: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
11
- medium: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
7
+ sm: 'text-dos-text-base px-2 py-0.5 min-h-6 gap-1',
8
+ md: 'text-dos-text-base px-2.5 py-1 min-h-7 gap-1.5',
9
+ lg: 'text-dos-text-base px-3 py-1.5 min-h-8 gap-1.5',
10
+ small: 'text-dos-text-base px-2 py-0.5 min-h-6 gap-1',
11
+ medium: 'text-dos-text-base px-2.5 py-1 min-h-7 gap-1.5',
12
12
  };
13
13
  /**
14
14
  * DOS-styled Tag for interactive labels with click, close, and selection.
@@ -4,9 +4,9 @@ import { cn } from '../../../utils/cn.js';
4
4
  import { Skeleton } from '../../Skeleton/index.js';
5
5
  import { formatValue, isKnown, resolveBand, resolveLabels } from '../../../utils/health/index.js';
6
6
  const sizeClasses = {
7
- sm: 'eidotter-vitals-strip--sm gap-1 text-dos-text-xs',
8
- md: 'eidotter-vitals-strip--md gap-2 text-dos-text-sm',
9
- lg: 'eidotter-vitals-strip--lg gap-2 text-dos-text-md',
7
+ sm: 'eidotter-vitals-strip--sm gap-1 text-dos-text-base',
8
+ md: 'eidotter-vitals-strip--md gap-2 text-dos-text-base',
9
+ lg: 'eidotter-vitals-strip--lg gap-2 text-dos-text-base',
10
10
  };
11
11
  const toneClasses = {
12
12
  neutral: 'eidotter-tone--neutral',
@@ -69,7 +69,7 @@ export const VitalsStrip = forwardRef(({ tiles, size = 'md', locale = 'en', labe
69
69
  moves under it when both do not fit on one line (DMNC-1573). */
70
70
  _jsxs("span", { className: "eidotter-vitals-strip__value text-dos-text-accent leading-none tabular-nums flex flex-wrap items-baseline gap-x-1 min-w-0", children: [_jsx("span", { className: "eidotter-vitals-strip__reading min-w-0 max-w-full whitespace-nowrap overflow-hidden text-ellipsis", children: stale ? (_jsx("span", { className: "opacity-60", children: valueText })) : stateText !== null ? (
71
71
  // State words are prose, not a reading: body size, not display size.
72
- _jsx("span", { className: "eidotter-vitals-strip__state text-dos-text-sm", children: stateText })) : (valueText) }), valueText && t.unit && (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "eidotter-vitals-strip__unit whitespace-nowrap text-[0.5em] text-dos-text-brand", children: t.unit })] }))] })), stale && _jsx("span", { className: "eidotter-vitals-strip__stale", children: labels.stale }), t.secondary && !unknown && (_jsx("span", { className: "eidotter-vitals-strip__secondary text-dos-text-muted leading-tight", children: t.secondary })), resolved.label && (_jsx("span", { className: "eidotter-vitals-strip__band text-dos-text-brand leading-tight", children: resolved.label }))] }, t.id));
72
+ _jsx("span", { className: "eidotter-vitals-strip__state text-dos-text-base", children: stateText })) : (valueText) }), valueText && t.unit && (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "eidotter-vitals-strip__unit whitespace-nowrap text-[0.5em] text-dos-text-brand", children: t.unit })] }))] })), stale && _jsx("span", { className: "eidotter-vitals-strip__stale", children: labels.stale }), t.secondary && !unknown && (_jsx("span", { className: "eidotter-vitals-strip__secondary text-dos-text-muted leading-tight", children: t.secondary })), resolved.label && (_jsx("span", { className: "eidotter-vitals-strip__band text-dos-text-brand leading-tight", children: resolved.label }))] }, t.id));
73
73
  }) }));
74
74
  });
75
75
  VitalsStrip.displayName = 'VitalsStrip';
@@ -695,6 +695,7 @@ export const componentRegistry = {
695
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' },
696
696
  },
697
697
  changelog: [
698
+ { version: '0.46.0', type: 'changed', description: 'sticky={false} paints no ground (transparent, class eidotter-header--static), so the page ground shows through; sticky headers keep the opaque ground' },
698
699
  { 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)' },
699
700
  { 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' },
700
701
  { 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' },
@@ -793,6 +794,21 @@ export const componentRegistry = {
793
794
  { 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)' },
794
795
  ],
795
796
  },
797
+ HeaderButton: {
798
+ origin: 'eidotter',
799
+ consumers: [],
800
+ since: '0.46.0',
801
+ originNote: 'The one control shape for the Header end slot: a 36px outlined box (32px on phones) with an optional pixel glyph, text and chevron; hover and an open panel invert to the brand fill. DisplayMenu\'s trigger and a ⌘K launcher are both HeaderButtons, so header controls always match. React Aria Button.',
802
+ variants: {
803
+ 'labelDisplay:label': { description: 'Glyph and text always (default)', since: '0.46.0' },
804
+ 'labelDisplay:responsive': { description: 'Glyph only below 640px (a text-only button keeps its text)', since: '0.46.0' },
805
+ 'labelDisplay:icon': { description: 'Always glyph only, square', since: '0.46.0' },
806
+ },
807
+ platforms: { react: { path: 'src/components/HeaderButton', status: 'canonical' } },
808
+ changelog: [
809
+ { version: '0.46.0', type: 'added', description: 'Initial HeaderButton: icon, children, aria-label (defaults to string text), labelDisplay, chevron, className, plus React Aria Button props (onPress, isDisabled); stable classes eidotter-header-button, __icon, __label, __chevron' },
810
+ ],
811
+ },
796
812
  DisplayMenu: {
797
813
  origin: 'eidotter',
798
814
  consumers: [],
@@ -805,6 +821,8 @@ export const componentRegistry = {
805
821
  },
806
822
  platforms: { react: { path: 'src/components/DisplayMenu', status: 'canonical' } },
807
823
  changelog: [
824
+ { version: '0.46.0', type: 'changed', description: 'Trigger is a HeaderButton (same geometry, states and phone size as every header control); trigger styles moved to HeaderButton.css, the eidotter-display-menu class stays on the trigger' },
825
+ { version: '0.45.1', type: 'changed', description: 'Opening the panel focuses the first enabled switch, so Space toggles it without a Tab' },
808
826
  { 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
827
  ],
810
828
  },