@estiva-app/ui 0.50.4 → 0.51.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.
@@ -39,6 +39,12 @@ export interface CollapsibleSectionProps {
39
39
  * its title, past the chevron (`SectionHeader`'s `look`).
40
40
  */
41
41
  look?: 'heading' | 'row';
42
+ /**
43
+ * With the `heading` look: the rows start under the title, past the
44
+ * chevron — a folder in a sidebar, its files lightly indented under its
45
+ * name (Katerina, 2 October). The `row` look always indents.
46
+ */
47
+ indent?: boolean;
42
48
  /** The rows. */
43
49
  children: ReactNode;
44
50
  /** On the section's box: `mt-2` between groups, `shrink-0` in a scrolling column. */
@@ -46,5 +52,5 @@ export interface CollapsibleSectionProps {
46
52
  /** On the box the rows sit in: the gap between them. */
47
53
  contentClassName?: string;
48
54
  }
49
- export declare function CollapsibleSection({ title, defaultOpen, open: openProp, onOpenChange, storageKey, trailing, actions, showActions, look, children, className, contentClassName }: CollapsibleSectionProps): import("react").JSX.Element;
55
+ export declare function CollapsibleSection({ title, defaultOpen, open: openProp, onOpenChange, storageKey, trailing, actions, showActions, look, indent, children, className, contentClassName }: CollapsibleSectionProps): import("react").JSX.Element;
50
56
  //# sourceMappingURL=CollapsibleSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleSection.d.ts","sourceRoot":"","sources":["../src/CollapsibleSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGhD,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,iCAAiC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,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B,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,EAAE,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gBAAgB;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAwBD,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,WAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,IAAgB,EAAE,MAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,uBAAuB,+BA2B3O"}
package/dist/NavItem.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
2
  /**
3
3
  * One row of a sidebar: a label, an optional count, an active state
4
4
  * (Ship's NavItem, 2026-09-02, verbatim).
@@ -15,8 +15,19 @@ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
15
15
  * menu is open, in the count's place — the count steps aside rather than
16
16
  * sitting under it. The ⋮ is beside the link, not inside it (a button inside
17
17
  * an anchor is not a button), and follows it in the Tab order.
18
+ *
19
+ * `children` are rows under this one (Katerina, 2 October: Leaf's folder
20
+ * tree). The row stays a link; while it is pointed at or focused its icon
21
+ * gives way to an arrow that folds the rows, in the icon's own place — so a
22
+ * row with rows under it is as wide as one without. The arrow is beside the
23
+ * link, like the ⋮. The rows slide as `CollapsibleSection`'s do, indented
24
+ * past the icon so their icons start under this row's label.
25
+ *
26
+ * `hint` is shown only while the row is pointed at or focused, left of the
27
+ * count — a neutral `Chip`, typically. It takes its own room while it shows,
28
+ * so the label ends with "…" before it instead of running under it.
18
29
  */
19
- export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'> {
30
+ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href' | 'children'> {
20
31
  label: string;
21
32
  href: string;
22
33
  /** `0` or absent renders no counter. */
@@ -30,7 +41,16 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
30
41
  menu?: ReactNode;
31
42
  /** The ⋮'s accessible name and tooltip. Default "More options for {label}". */
32
43
  menuLabel?: string;
44
+ /** Shown only while the row is pointed at or focused, left of the count: a neutral `Chip`, typically. */
45
+ hint?: ReactNode;
46
+ /** Rows under this one, folding under it: `NavItem`s. While the row is pointed at or focused, its icon becomes the arrow. */
47
+ children?: ReactNode;
48
+ /** With `children`: open unless told otherwise. */
49
+ defaultOpen?: boolean;
50
+ /** With `children`: the caller owns the state. */
51
+ open?: boolean;
52
+ onOpenChange?: (open: boolean) => void;
33
53
  className?: string;
34
54
  }
35
- export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, className, ...props }: NavItemProps): import("react").JSX.Element;
55
+ export declare function NavItem({ label, href, count, countLabel, active, icon, menu, menuLabel, hint, children, defaultOpen, open: openProp, onOpenChange, className, ...props }: NavItemProps): import("react").JSX.Element;
36
56
  //# sourceMappingURL=NavItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQhE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,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AC,EAAE,SAAS,CAAA;IACpB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,MAAc,EACd,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,+BA8Hd"}
@@ -0,0 +1,49 @@
1
+ import type { MouseEvent, ReactNode } from 'react';
2
+ /** One row of the tree, and the rows under it. */
3
+ export interface NavTreeNode {
4
+ id: string;
5
+ label: string;
6
+ href: string;
7
+ /** 16px, stroke 1.5. */
8
+ icon?: ReactNode;
9
+ /** `0` or absent renders no counter. */
10
+ count?: number;
11
+ /** What the count counts, for the tooltip. */
12
+ countLabel?: string;
13
+ /** Shown only while the row is pointed at or focused, left of the count: a neutral `Chip`, typically. */
14
+ hint?: ReactNode;
15
+ /** The row's "More options" menu: `MenuItem`s. */
16
+ menu?: ReactNode;
17
+ /** Rows under this one. Their row folds them; open unless `defaultOpen` says otherwise. */
18
+ children?: NavTreeNode[];
19
+ defaultOpen?: boolean;
20
+ }
21
+ /** A group heading over its rows: the top of the tree. */
22
+ export interface NavTreeGroup {
23
+ id: string;
24
+ title: string;
25
+ nodes: NavTreeNode[];
26
+ }
27
+ export interface NavTreeProps {
28
+ /** The quiet label over the groups. Absent, none is drawn. */
29
+ title?: string;
30
+ /** `null` while the first read is on its way: a skeleton in the rows' place. */
31
+ groups: NavTreeGroup[] | null;
32
+ /** The row that is current: `active`, and its group starts open. */
33
+ selected?: string;
34
+ /** A row was clicked. A router app prevents the default and navigates. */
35
+ onSelect?: (node: NavTreeNode, event: MouseEvent<HTMLAnchorElement>) => void;
36
+ /** What to say when there are no groups. The words are the caller's. */
37
+ emptyMessage: string;
38
+ /** Remember each group open or closed in this browser, under this key and the group's id. The app prefixes it. */
39
+ storageKey?: string;
40
+ }
41
+ /**
42
+ * A sidebar's tree, from one nested list (Katerina, 2 October: Leaf's folder
43
+ * tree): a quiet label, then each group as the standard heading folding its
44
+ * rows, lightly indented under its title; rows under rows to any depth, each
45
+ * row a link whose icon becomes the arrow that folds what is under it. Only
46
+ * the group that holds the current row starts open.
47
+ */
48
+ export declare function NavTree({ title, groups, selected, onSelect, emptyMessage, storageKey }: NavTreeProps): import("react").JSX.Element;
49
+ //# sourceMappingURL=NavTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../src/NavTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOlD,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wBAAwB;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yGAAyG;IACzG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gFAAgF;IAChF,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAC5E,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB,kHAAkH;IAClH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AA2BD;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,YAAY,+BA8BpG"}
@@ -16,16 +16,22 @@ import type { ReactNode } from 'react';
16
16
  * long label short with an ellipsis where its row has no room, as a date line in
17
17
  * a narrow panel must.
18
18
  *
19
+ * `folds` is the title of a group that opens and closes: in Leaf it keeps
20
+ * Ship's type rather than taking Signal's micro-label, so a folder reads as
21
+ * a name (Katerina, 2 October). Every other Leaf label keeps Signal's.
22
+ *
19
23
  * Deliberately NOT the same thing as Property's stacked field label (the
20
24
  * 9px `menu`-token one): they were merged for a day and unmerged by
21
25
  * Katerina's ruling (2026-09-01) — a section title and a field label are
22
26
  * different voices, at different sizes, on purpose.
23
27
  */
24
- export declare function SectionLabel({ children, tone, truncate, className, }: {
28
+ export declare function SectionLabel({ children, tone, truncate, folds, className, }: {
25
29
  children: ReactNode;
26
30
  tone?: 'primary' | 'secondary' | 'muted';
27
31
  /** Cut a long label short with an ellipsis instead of letting it wrap or spill. */
28
32
  truncate?: boolean;
33
+ /** The title of a group that opens and closes. In Leaf, Ship's type instead of the micro-label. */
34
+ folds?: boolean;
29
35
  className?: string;
30
36
  }): import("react").JSX.Element;
31
37
  //# sourceMappingURL=SectionLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionLabel.d.ts","sourceRoot":"","sources":["../src/SectionLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAgB,EAChB,QAAgB,EAChB,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;IACxC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,+BAeA"}
1
+ {"version":3,"file":"SectionLabel.d.ts","sourceRoot":"","sources":["../src/SectionLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAgB,EAChB,QAAgB,EAChB,KAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAA;IACxC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mGAAmG;IACnG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,+BAgBA"}
@@ -1521,7 +1521,7 @@ var noFieldOutsideAForm = {
1521
1521
  };
1522
1522
 
1523
1523
  // src/eslint/no-native-title.ts
1524
- var PARTS_WITH_A_TITLE = ["CollapsibleSection", "ConfirmDialog", "ContainerHeader", "DialogShell", "ListColumn", "Panel", "SectionHeader"];
1524
+ var PARTS_WITH_A_TITLE = ["CollapsibleSection", "ConfirmDialog", "ContainerHeader", "DialogShell", "ListColumn", "NavTree", "Panel", "SectionHeader"];
1525
1525
  var child4 = (node, key) => node[key];
1526
1526
  var nameOf5 = (node) => node?.type === "JSXIdentifier" || node?.type === "Identifier" ? node.name : void 0;
1527
1527
  var noNativeTitle = {