@estiva-app/ui 0.92.0 → 0.93.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/Button.d.ts CHANGED
@@ -49,7 +49,17 @@ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
49
49
  /** Why the action cannot succeed right now. Disables the button, keeps it
50
50
  * reachable by keyboard, and shows the reason as a tooltip on hover. */
51
51
  disabledReason?: string;
52
+ /**
53
+ * A link that looks like a button: an anchor, so the address stays real for a
54
+ * modified click, a new tab or "copy link address", as `IconButton` and `Link`
55
+ * keep it. A router app's `navigate` (AppProvider) moves in place. A link
56
+ * cannot be disabled, so while it would be (`disabled`, `disabledReason`, a
57
+ * busy Form) it is the button (Katerina, 30 October).
58
+ */
59
+ href?: string;
60
+ /** With `href`: another site, or another app. Opens in a new tab, with `noopener noreferrer`, as `Link`'s does. */
61
+ external?: boolean;
52
62
  children: ReactNode;
53
63
  }
54
- export declare function Button({ variant, size, leadingIcon, className, children, disabled, disabledReason, type, ...props }: ButtonProps): import("react").JSX.Element;
64
+ export declare function Button({ variant, size, leadingIcon, className, children, disabled, disabledReason, type, href, external, ...props }: ButtonProps): import("react").JSX.Element;
55
65
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAA;AACxF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAA;AAE5C,+FAA+F;AAC/F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,C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AQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAiB,EACjB,IAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,IAAe,EACf,IAAI,EACJ,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,WAAW,+BAyDb"}
package/dist/NavItem.d.ts CHANGED
@@ -59,7 +59,9 @@ export interface NavItemProps extends Omit<ComponentPropsWithoutRef<'a'>, 'href'
59
59
  /** The ⋮'s accessible name and tooltip. Default "More options for {label}". */
60
60
  menuLabel?: string;
61
61
  /** One button beside the ⋮, shown with it: any 16px icon, its tooltip and its handler — a `SectionHeader` action's shape. With a menu too, it sits before the ⋮. */
62
- action?: SectionAction;
62
+ action?: SectionAction & {
63
+ onClick: () => void;
64
+ };
63
65
  /** Shown only while the row is pointed at or focused, left of the count: a neutral `Chip`, typically. */
64
66
  hint?: ReactNode;
65
67
  /** A sentence about the item, in the package's tooltip while the label is pointed at; the row stays one line. Absent or blank, no tooltip. */
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IAC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,EACd,QAAQ,EACR,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,YAAY,+BAgLd"}
@@ -28,12 +28,22 @@ import { useRender } from '@base-ui/react/use-render';
28
28
  * old shape yet: the two hard-wired action slots (add, sort) became
29
29
  * `actions` — the caller brings the icon, the tooltip and the handler.
30
30
  */
31
- export interface SectionAction {
31
+ export type SectionAction = {
32
32
  /** 16px, stroke 1.5. */
33
33
  icon: ReactNode;
34
34
  tooltip: string;
35
+ } & ({
35
36
  onClick: () => void;
37
+ menu?: undefined;
36
38
  }
39
+ /**
40
+ * The button opens a menu of these items instead: a choice that is the
41
+ * action, a sort or a filter (Katerina, 30 October: Open work's Sort).
42
+ */
43
+ | {
44
+ menu: ReactNode;
45
+ onClick?: undefined;
46
+ });
37
47
  export interface SectionHeaderProps {
38
48
  title: string;
39
49
  /** Collapsible: draws the chevron and makes the title a button that toggles. */
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../src/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAOrD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB;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ingIcon?: boolean;
57
57
  /** Auto-dismiss after this many ms. Defaults to 5000. Pass 0 to disable. */
58
58
  durationMs?: number;
59
+ /**
60
+ * Told once when the toast closes, however it closes: its own timer, its
61
+ * action, a swipe, Escape or `dismissToast`. For an action whose Undo is a
62
+ * wait — the write happens here, unless the Undo was pressed first.
63
+ */
64
+ onClose?: () => void;
59
65
  }
60
66
  interface ToastValue {
61
67
  /** Shows a toast and returns its id, for `dismissToast`. */
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../src/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM1E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAE7E,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwDD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,IAAgB,EAAE,WAAkB,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,UAAU,+BAelH;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,sGAAsG;IACtG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,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MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,UAAU,UAAU;IAClB,4DAA4D;IAC5D,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,MAAM,CAAA;IACzC,+EAA+E;IAC/E,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAcD;;6DAE6D;AAC7D,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAiClE;AA0CD;4DAC4D;AAC5D,wBAAgB,QAAQ,IAAI,UAAU,CAIrC"}
package/dist/index.js CHANGED
@@ -994,58 +994,57 @@ function Button({
994
994
  disabled,
995
995
  disabledReason,
996
996
  type = "button",
997
+ href,
998
+ external = false,
997
999
  ...props
998
1000
  }) {
999
1001
  const hasLeadingIcon = !!leadingIcon;
1000
1002
  const formBusy = useFormBusy();
1001
- const button = /* @__PURE__ */ jsxs8(
1002
- BaseButton4,
1003
- {
1004
- type,
1005
- disabled: disabled || !!disabledReason || formBusy,
1006
- focusableWhenDisabled: !!disabledReason,
1007
- className: (state) => cn(
1008
- // No `self-center` here, deliberately — `IconButton` needs it and this
1009
- // does not, and the difference is the `h-8` / `h-6` on the next two
1010
- // lines. `align-items: stretch` only stretches a child whose cross
1011
- // size is `auto`; a Button always states its height, so a stretching
1012
- // parent cannot change it. Measured in Chrome on 2026-09-12, in the
1013
- // 260px row of Finding 49: 32px with `self-center` and 32px without.
1014
- // What the class DID do was override the caller on the other axis —
1015
- // in a column it beats the parent's `items-start`, which centred the
1016
- // four actions in Ship's `ProjectRail` and the trigger in five of
1017
- // this package's own story frames, each of which asks for the top.
1018
- // A control does not get to decide where its caller puts it.
1019
- "inline-flex items-center justify-center gap-1 rounded-md transition-colors font-sans font-medium",
1020
- size === "default" && "h-8 min-h-8 text-btn-default",
1021
- size === "small" && "h-6 min-h-6 text-btn-small",
1022
- // Extra right padding beside a leading icon, for optical balance.
1023
- size === "default" && (hasLeadingIcon ? "pl-2 pr-3" : "px-2"),
1024
- size === "small" && (hasLeadingIcon ? "pl-1.5 pr-2" : "px-1.5"),
1025
- !state.disabled && (variant === "primary" || variant === "resolve") && "bg-accent-primary hover:bg-accent-hover text-text-inverse cursor-pointer signal:font-semibold",
1026
- // @estiva-escape(no-copied-look): W2 (Katerina, 24 September: leave alone): an outlined button shares four words with Reaction's pill by coincidence
1027
- !state.disabled && variant === "outlined" && "border border-border-default hover:bg-bg-hover text-text-primary cursor-pointer",
1028
- !state.disabled && variant === "muted" && "hover:bg-bg-hover text-text-primary cursor-pointer",
1029
- !state.disabled && variant === "destructive" && "hover:bg-error-muted text-error-default cursor-pointer",
1030
- state.disabled && "bg-bg-disabled text-text-disabled",
1031
- // `pointer-events-none` only where the button is truly out of reach.
1032
- // With a `disabledReason` the button IS the tooltip's trigger, and a
1033
- // trigger the pointer cannot land on never opens one — Base UI already
1034
- // swallows the click (`focusableWhenDisabled` gives `aria-disabled`
1035
- // and a prevented `onClick`), so nothing else needs it.
1036
- state.disabled && !disabledReason && "pointer-events-none",
1037
- state.disabled && variant === "outlined" && "border border-border-default",
1038
- // Disabled too, as it always drew.
1039
- variant === "resolve" && "signal:bg-transparent signal:border signal:border-border-default signal:text-text-primary signal:shadow-none signal:hover:bg-success-muted signal:hover:border-success-outline signal:hover:text-success-default signal:transition-colors",
1040
- className
1041
- ),
1042
- ...props,
1043
- children: [
1044
- leadingIcon,
1045
- children
1046
- ]
1047
- }
1003
+ const unusable = disabled || !!disabledReason || formBusy;
1004
+ const anchor = props;
1005
+ const inApp = useInAppClick(href, anchor.onClick);
1006
+ const look = (off) => cn(
1007
+ // No `self-center` here, deliberately — `IconButton` needs it and this
1008
+ // does not, and the difference is the `h-8` / `h-6` on the next two
1009
+ // lines. `align-items: stretch` only stretches a child whose cross
1010
+ // size is `auto`; a Button always states its height, so a stretching
1011
+ // parent cannot change it. Measured in Chrome on 2026-09-12, in the
1012
+ // 260px row of Finding 49: 32px with `self-center` and 32px without.
1013
+ // What the class DID do was override the caller on the other axis —
1014
+ // in a column it beats the parent's `items-start`, which centred the
1015
+ // four actions in Ship's `ProjectRail` and the trigger in five of
1016
+ // this package's own story frames, each of which asks for the top.
1017
+ // A control does not get to decide where its caller puts it.
1018
+ "inline-flex items-center justify-center gap-1 rounded-md transition-colors font-sans font-medium",
1019
+ size === "default" && "h-8 min-h-8 text-btn-default",
1020
+ size === "small" && "h-6 min-h-6 text-btn-small",
1021
+ // Extra right padding beside a leading icon, for optical balance.
1022
+ size === "default" && (hasLeadingIcon ? "pl-2 pr-3" : "px-2"),
1023
+ size === "small" && (hasLeadingIcon ? "pl-1.5 pr-2" : "px-1.5"),
1024
+ !off && (variant === "primary" || variant === "resolve") && "bg-accent-primary hover:bg-accent-hover text-text-inverse cursor-pointer signal:font-semibold",
1025
+ // @estiva-escape(no-copied-look): W2 (Katerina, 24 September: leave alone): an outlined button shares four words with Reaction's pill by coincidence
1026
+ !off && variant === "outlined" && "border border-border-default hover:bg-bg-hover text-text-primary cursor-pointer",
1027
+ !off && variant === "muted" && "hover:bg-bg-hover text-text-primary cursor-pointer",
1028
+ !off && variant === "destructive" && "hover:bg-error-muted text-error-default cursor-pointer",
1029
+ off && "bg-bg-disabled text-text-disabled",
1030
+ // `pointer-events-none` only where the button is truly out of reach.
1031
+ // With a `disabledReason` the button IS the tooltip's trigger, and a
1032
+ // trigger the pointer cannot land on never opens one — Base UI already
1033
+ // swallows the click (`focusableWhenDisabled` gives `aria-disabled`
1034
+ // and a prevented `onClick`), so nothing else needs it.
1035
+ off && !disabledReason && "pointer-events-none",
1036
+ off && variant === "outlined" && "border border-border-default",
1037
+ // Disabled too, as it always drew.
1038
+ variant === "resolve" && "signal:bg-transparent signal:border signal:border-border-default signal:text-text-primary signal:shadow-none signal:hover:bg-success-muted signal:hover:border-success-outline signal:hover:text-success-default signal:transition-colors",
1039
+ className
1048
1040
  );
1041
+ const button = href && !unusable ? /* @__PURE__ */ jsxs8("a", { href, ...external ? { target: "_blank", rel: "noopener noreferrer" } : {}, className: look(false), ...anchor, onClick: inApp, children: [
1042
+ leadingIcon,
1043
+ children
1044
+ ] }) : /* @__PURE__ */ jsxs8(BaseButton4, { type, disabled: unusable, focusableWhenDisabled: !!disabledReason, className: (state) => look(state.disabled), ...props, children: [
1045
+ leadingIcon,
1046
+ children
1047
+ ] });
1049
1048
  return disabledReason ? /* @__PURE__ */ jsx15(TooltipTrigger, { label: disabledReason, children: button }) : button;
1050
1049
  }
1051
1050
 
@@ -3611,7 +3610,19 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
3611
3610
  {
3612
3611
  className: "-mr-1 flex shrink-0 items-center",
3613
3612
  children: /* @__PURE__ */ jsxs34("div", { className: cn("flex items-center gap-1", reveal), children: [
3614
- actions?.map((action) => /* @__PURE__ */ jsx51(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip)),
3613
+ actions?.map(
3614
+ (action) => action.menu != null ? (
3615
+ // `data-section-menu`, as the ⋮ has: the row stays lit while its menu is open.
3616
+ /* @__PURE__ */ jsx51("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx51(
3617
+ Menu,
3618
+ {
3619
+ align: "right",
3620
+ trigger: /* @__PURE__ */ jsx51(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, children: action.icon }),
3621
+ children: action.menu
3622
+ }
3623
+ ) }, action.tooltip)
3624
+ ) : /* @__PURE__ */ jsx51(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip)
3625
+ ),
3615
3626
  menu != null && /* @__PURE__ */ jsx51("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx51(
3616
3627
  Menu,
3617
3628
  {
@@ -5211,10 +5222,11 @@ function ToastProvider({ children }) {
5211
5222
  const manager = useMemo6(() => BaseToast.createToastManager(), []);
5212
5223
  const value = useMemo6(
5213
5224
  () => ({
5214
- showToast: ({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, durationMs = 5e3 }) => manager.add({
5225
+ showToast: ({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, durationMs = 5e3, onClose }) => manager.add({
5215
5226
  title: label,
5216
5227
  type,
5217
5228
  timeout: durationMs,
5229
+ onClose,
5218
5230
  // A failure interrupts; everything else waits for a pause.
5219
5231
  priority: type === "error" ? "high" : "low",
5220
5232
  data: { leadingIcon, actionLabel, onAction }