@estiva-app/ui 0.115.1 → 0.116.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/dist/NavItem.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type ComponentPropsWithoutRef, type MouseEvent, type ReactNode } from 'react';
2
2
  import type { SectionAction } from './SectionHeader';
3
+ import { type UnreadDotTone } from './UnreadDot';
3
4
  /**
4
5
  * One row of a sidebar: a label, an optional count, an active state
5
6
  * (Ship's NavItem, 2026-09-02, verbatim).
@@ -37,7 +38,8 @@ import type { SectionAction } from './SectionHeader';
37
38
  *
38
39
  * `unread` brightens the row's words and icon, sets the label in medium, and
39
40
  * draws the `UnreadDot` at the right; `urgent` with it draws the warning badge
40
- * in the dot's place (Katerina, 2 October: Peek's row, moved in). The ⋮ lands
41
+ * in the dot's place (Katerina, 2 October: Peek's row, moved in); `unreadTone`
42
+ * says which kind of new the dot is, `reaction` for a reaction to you (ACT-7). The ⋮ lands
41
43
  * on whatever is in that place, and with nothing there it takes no room until
42
44
  * the row is pointed at, so a label at rest keeps the row's whole width.
43
45
  *
@@ -70,6 +72,8 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
70
72
  unread?: boolean;
71
73
  /** With `unread`: the warning badge in the dot's place. */
72
74
  urgent?: boolean;
75
+ /** With `unread`: which kind of new the dot is, `UnreadDot`'s `tone`. Default blue; `urgent` still draws the badge instead. */
76
+ unreadTone?: UnreadDotTone;
73
77
  /**
74
78
  * More about the row, in the package's `PreviewCard` while the row itself is pointed at — never the rows under it —
75
79
  * such as a short list of what is new there. Unlike `tooltip`, it holds content the pointer can move into. The card
@@ -77,6 +81,12 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
77
81
  * preview the label draws no `tooltip`: one surface per hover. Absent, no card.
78
82
  */
79
83
  preview?: ReactNode;
84
+ /**
85
+ * With `preview`: told each time the card opens (`true`) and closes (`false`), once each — `PreviewCard`'s
86
+ * `onOpenChange`. The moment the card's content counts as seen is the `false` that follows a `true`: leaving the
87
+ * card after it was open, never the `true`.
88
+ */
89
+ onPreviewOpenChange?: (open: boolean) => void;
80
90
  /** Rows under this one, folding under it: `NavItem`s. While the row is pointed at or focused, its icon becomes the arrow. */
81
91
  children?: ReactNode;
82
92
  /** With `children`: open unless told otherwise. */
@@ -99,5 +109,5 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
99
109
  onPlainClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
100
110
  className?: string;
101
111
  }
102
- export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, tooltip, unread, urgent, preview, children, defaultOpen, open: openProp, onOpenChange, openFor, onPlainClick, className, onClick, ...props }: NavItemProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
112
+ export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, action, hint, tooltip, unread, urgent, unreadTone, preview, onPreviewOpenChange, children, defaultOpen, open: openProp, onOpenChange, openFor, onPlainClick, className, onClick, ...props }: NavItemProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
103
113
  //# sourceMappingURL=NavItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAWvG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIpD;;;;;;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viewCardProps {
48
48
  * hover-only, because a tap on a row opens the row.
49
49
  */
50
50
  openOnTap?: boolean;
51
+ /**
52
+ * Called once each time the card opens (`true`) and once each time it closes (`false`), however it got there: a
53
+ * pointer resting, keyboard focus, a tap with `openOnTap`, Escape, a press outside, or the card unmounted while
54
+ * open. Never twice in a row with the same value, and never on a render. For a caller that counts what the card
55
+ * held as seen, the seen moment is the `false` that follows a `true` — leaving the card after it was open — never
56
+ * the `true`.
57
+ */
58
+ onOpenChange?: (open: boolean) => void;
51
59
  }
52
- export declare function PreviewCard({ content, children, side, delay, closeDelay, className, contentClassName, wrapperClassName, openOnTap }: PreviewCardProps): import("react").JSX.Element;
60
+ export declare function PreviewCard({ content, children, side, delay, closeDelay, className, contentClassName, wrapperClassName, openOnTap, onOpenChange: onOpenChangeProp }: PreviewCardProps): import("react").JSX.Element;
53
61
  //# sourceMappingURL=PreviewCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewCard.d.ts","sourceRoot":"","sources":["../src/PreviewCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM3E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,OAAO,EAAE,SAAS,CAAA;IAClB,iDAAiD;IACjD,QAAQ,EAAE,SAAS,CAAA;IACnB,+FAA+F;IAC/F,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IAC1C,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;I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* What kind of new a dot says, named for what it is, not its colour: `blue`, the accent, for something new;
3
+ * `reaction` for a reaction to you.
4
+ */
5
+ export type UnreadDotTone = 'blue' | 'reaction';
1
6
  /**
2
7
  * The accent dot that says "something new here": a 6px disc centred in a
3
8
  * 24px slot, so it sits where a control would and the row does not shift when
@@ -10,9 +15,15 @@
10
15
  * page's title, which is always there because it opens the page's list
11
16
  * (ACT-4; the activity indicator prototype Miky approved, 10 November). A
12
17
  * quiet dot is not marked `data-unread`.
18
+ *
19
+ * `tone="reaction"` draws a reaction to you, in the warning colour (ACT-7; the
20
+ * same prototype). A dot that is not quiet says its tone in `data-tone`,
21
+ * `blue` or `reaction`, beside `data-unread`. Which tone a row shows is the
22
+ * caller's: a row with both kinds of new draws one blue dot.
13
23
  */
14
- export declare function UnreadDot({ className, quiet }: {
24
+ export declare function UnreadDot({ className, quiet, tone }: {
15
25
  className?: string;
16
26
  quiet?: boolean;
27
+ tone?: UnreadDotTone;
17
28
  }): import("react").JSX.Element;
18
29
  //# sourceMappingURL=UnreadDot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnreadDot.d.ts","sourceRoot":"","sources":["../src/UnreadDot.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,KAAa,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,+BAM9F"}
1
+ {"version":3,"file":"UnreadDot.d.ts","sourceRoot":"","sources":["../src/UnreadDot.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAA;AAW/C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,KAAa,EAAE,IAAa,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,+BAMnI"}
@@ -135,7 +135,7 @@ var PART_LOOK_PROPS = {
135
135
  MenuItem: ["size", "selected", "destructive"],
136
136
  MenuSub: ["selected"],
137
137
  MetaText: ["size"],
138
- NavItem: ["active"],
138
+ NavItem: ["active", "unreadTone"],
139
139
  Person: ["size"],
140
140
  ProgressBar: ["variant"],
141
141
  Property: ["layout"],
@@ -152,7 +152,8 @@ var PART_LOOK_PROPS = {
152
152
  Toast: ["type"],
153
153
  Toolbar: ["surface"],
154
154
  ToolbarButton: ["variant", "pressed", "glow"],
155
- TopBar: ["variant"]
155
+ TopBar: ["variant"],
156
+ UnreadDot: ["tone"]
156
157
  };
157
158
  var CLASS_PROP = /^(?:className|[a-z][A-Za-z]*ClassName)$/;
158
159
  var child = (node, key) => node[key];