impact-nova 2.5.22 → 2.6.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 (37) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +2 -0
  2. package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +9 -3
  3. package/dist/components/data/ag-grid-react/headers/components/header-info.js +69 -61
  4. package/dist/components/data/ag-grid-react/headers/components/info-modal.js +8 -8
  5. package/dist/components/flows/guidance/guidance-layer.js +34 -31
  6. package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.js +29 -20
  7. package/dist/components/flows/guidance/renderers/announcement-renderer.d.ts +1 -1
  8. package/dist/components/flows/guidance/renderers/announcement-renderer.js +74 -28
  9. package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.d.ts +5 -0
  10. package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.js +68 -0
  11. package/dist/components/flows/guidance/renderers/guidance-announcement-surface.d.ts +5 -0
  12. package/dist/components/flows/guidance/renderers/guidance-announcement-surface.js +76 -0
  13. package/dist/components/flows/guidance/renderers/guidance-card-shared.d.ts +43 -2
  14. package/dist/components/flows/guidance/renderers/guidance-card-shared.js +322 -99
  15. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +3 -0
  16. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +189 -148
  17. package/dist/components/flows/guidance/renderers/guidance-shortcut-display.d.ts +9 -0
  18. package/dist/components/flows/guidance/renderers/guidance-shortcut-display.js +36 -0
  19. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.d.ts +2 -1
  20. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +152 -89
  21. package/dist/i18n/defaultMessages.d.ts +6 -0
  22. package/dist/i18n/defaultMessages.js +13 -9
  23. package/dist/i18n/locales/de.js +4 -0
  24. package/dist/i18n/locales/es.js +4 -0
  25. package/dist/i18n/locales/hi.js +4 -0
  26. package/dist/i18n/locales/kn.js +4 -0
  27. package/dist/impact-nova-tokens.scss +22 -0
  28. package/dist/impact-nova.css +1 -1
  29. package/dist/lib/guidance/engine/guidance-engine.d.ts +9 -0
  30. package/dist/lib/guidance/engine/guidance-engine.js +127 -65
  31. package/dist/lib/guidance/engine/manifest-validator.js +37 -30
  32. package/dist/lib/guidance/targets/target-resolver.d.ts +1 -1
  33. package/dist/lib/guidance/targets/target-resolver.js +32 -30
  34. package/dist/lib/guidance/types/guidance.types.d.ts +41 -0
  35. package/dist/llms/rules/installation.js +1 -1
  36. package/dist/llms/rules/requirements.js +1 -1
  37. package/package.json +2 -1
@@ -57,6 +57,8 @@ export interface ExtendedHeaderComponentParams extends Partial<IHeaderParams> {
57
57
  infoData?: InfoContent;
58
58
  /** How to display the information (tooltip or modal) */
59
59
  displayMode?: 'tooltip' | 'modal';
60
+ /** Guidance target ID for the info icon (for guided tours) */
61
+ infoIconGuidanceTargetId?: string;
60
62
  }
61
63
  export type SectionType = 'TEXT' | 'KEY_VALUE' | 'BADGES' | 'LINK';
62
64
  export interface UISectionBase {
@@ -4,30 +4,36 @@ import { ExtendedHeaderComponentParams, InfoContent } from '../../ag-grid.types'
4
4
  /**
5
5
  * Info Icon Trigger - native button for grid header info actions.
6
6
  */
7
- export declare const InfoIconTrigger: ({ onClick, className, label, }: {
7
+ export declare const InfoIconTrigger: ({ onClick, className, label, guidanceTargetId, }: {
8
8
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
9
  className?: string;
10
10
  label: string;
11
+ /** Guidance target ID for guided tours (renders as data-guidance-target) */
12
+ guidanceTargetId?: string;
11
13
  }) => import("react/jsx-runtime").JSX.Element;
12
14
  /**
13
15
  * Tooltip-only Info Trigger
14
16
  */
15
- export declare const TooltipInfoTrigger: ({ content, className, onInfoClick, label, }: {
17
+ export declare const TooltipInfoTrigger: ({ content, className, onInfoClick, label, guidanceTargetId, }: {
16
18
  content: string;
17
19
  className?: string;
18
20
  onInfoClick?: (e: React.MouseEvent) => void;
19
21
  label: string;
22
+ /** Guidance target ID for guided tours */
23
+ guidanceTargetId?: string;
20
24
  }) => import("react/jsx-runtime").JSX.Element;
21
25
  /**
22
26
  * Modal-enabled Info Trigger
23
27
  * Only this component allocates a useState hook.
24
28
  */
25
- export declare const ModalInfoTrigger: ({ infoData, displayName, className, onInfoClick, label, }: {
29
+ export declare const ModalInfoTrigger: ({ infoData, displayName, className, onInfoClick, label, guidanceTargetId, }: {
26
30
  infoData?: InfoContent;
27
31
  displayName?: string;
28
32
  className?: string;
29
33
  onInfoClick?: (e: React.MouseEvent) => void;
30
34
  label: string;
35
+ /** Guidance target ID for guided tours */
36
+ guidanceTargetId?: string;
31
37
  }) => import("react/jsx-runtime").JSX.Element;
32
38
  type HeaderInfoProps = (CustomHeaderProps | IHeaderGroupParams) & ExtendedHeaderComponentParams & {
33
39
  className?: string;
@@ -1,112 +1,120 @@
1
- import { jsx as r, jsxs as I, Fragment as g } from "react/jsx-runtime";
2
- import { useState as v } from "react";
3
- import { cn as m } from "../../../../../lib/utils.js";
4
- import { Info as k } from "impact-nova-icons";
5
- import { useImpactNovaI18n as u } from "../../../../../i18n/use-impact-nova-i18n.js";
6
- import { LazyTooltip as p } from "./lazy-tooltip.js";
7
- import { InfoModal as b } from "./info-modal.js";
8
- import { resolveHeaderInfoParams as C } from "../resolve-header-info-params.js";
9
- const h = ({
1
+ import { jsx as r, jsxs as h, Fragment as v } from "react/jsx-runtime";
2
+ import { useState as k } from "react";
3
+ import { cn as u } from "../../../../../lib/utils.js";
4
+ import { Info as b } from "impact-nova-icons";
5
+ import { useImpactNovaI18n as p } from "../../../../../i18n/use-impact-nova-i18n.js";
6
+ import { LazyTooltip as I } from "./lazy-tooltip.js";
7
+ import { InfoModal as C } from "./info-modal.js";
8
+ import { resolveHeaderInfoParams as y } from "../resolve-header-info-params.js";
9
+ const g = ({
10
10
  onClick: o,
11
- className: n,
12
- label: t
11
+ className: e,
12
+ label: t,
13
+ guidanceTargetId: n
13
14
  }) => {
14
- const e = (a) => {
15
- a.stopPropagation(), o?.(a);
15
+ const a = (i) => {
16
+ i.stopPropagation(), o?.(i);
16
17
  };
17
18
  return /* @__PURE__ */ r(
18
19
  "button",
19
20
  {
20
21
  type: "button",
21
22
  "aria-label": t,
22
- className: m(
23
+ className: u(
23
24
  "cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-canvas-muted active:bg-stroke-hairline",
24
- n
25
+ e
25
26
  ),
26
- onClick: e,
27
- children: /* @__PURE__ */ r(k, { size: 16, "aria-hidden": !0 })
27
+ onClick: a,
28
+ ...n && { "data-guidance-target": n },
29
+ children: /* @__PURE__ */ r(b, { size: 16, "aria-hidden": !0 })
28
30
  }
29
31
  );
30
- }, y = ({
32
+ }, T = ({
31
33
  content: o,
32
- className: n,
34
+ className: e,
33
35
  onInfoClick: t,
34
- label: e
35
- }) => /* @__PURE__ */ r(p, { content: o, children: /* @__PURE__ */ r(h, { onClick: t, className: n, label: e }) }), x = ({
36
+ label: n,
37
+ guidanceTargetId: a
38
+ }) => /* @__PURE__ */ r(I, { content: o, children: /* @__PURE__ */ r(g, { onClick: t, className: e, label: n, guidanceTargetId: a }) }), x = ({
36
39
  infoData: o,
37
- displayName: n,
40
+ displayName: e,
38
41
  className: t,
39
- onInfoClick: e,
40
- label: a
42
+ onInfoClick: n,
43
+ label: a,
44
+ guidanceTargetId: i
41
45
  }) => {
42
- const { t: f } = u(), [s, c] = v(!1), i = o ?? (n ? { title: n, sections: [] } : void 0), d = (l) => {
43
- l.stopPropagation(), i && c(!0);
46
+ const { t: f } = p(), [s, d] = k(!1), c = o ?? (e ? { title: e, sections: [] } : void 0), m = (l) => {
47
+ l.stopPropagation(), c && d(!0);
44
48
  };
45
- return /* @__PURE__ */ I(g, { children: [
46
- /* @__PURE__ */ r(p, { content: f("gridHeader.clickForDetails"), children: /* @__PURE__ */ r(
47
- h,
49
+ return /* @__PURE__ */ h(v, { children: [
50
+ /* @__PURE__ */ r(I, { content: f("gridHeader.clickForDetails"), children: /* @__PURE__ */ r(
51
+ g,
48
52
  {
49
53
  label: a,
50
54
  onClick: (l) => {
51
- d(l), e && e(l);
55
+ m(l), n && n(l);
52
56
  },
53
- className: m(
57
+ className: u(
54
58
  "hover:bg-canvas-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
55
59
  t
56
- )
60
+ ),
61
+ guidanceTargetId: i
57
62
  }
58
63
  ) }),
59
- s && i && // Stop propagation to prevent the click from bubbling to the header group
64
+ s && c && // Stop propagation to prevent the click from bubbling to the header group
60
65
  // regardless of whether the modal is portaled or not.
61
66
  /* @__PURE__ */ r("div", { onClick: (l) => l.stopPropagation(), children: /* @__PURE__ */ r(
62
- b,
67
+ C,
63
68
  {
64
69
  open: s,
65
- onClose: () => c(!1),
66
- data: i
70
+ onClose: () => d(!1),
71
+ data: c
67
72
  }
68
73
  ) })
69
74
  ] });
70
- }, z = (o) => {
71
- const n = C(o, o.displayName), {
75
+ }, F = (o) => {
76
+ const e = y(o, o.displayName), {
72
77
  showInfoIcon: t,
73
- displayName: e
74
- } = n;
75
- return !t || !e || e.trim() === "" ? null : /* @__PURE__ */ r(N, { ...o, ...n });
78
+ displayName: n
79
+ } = e;
80
+ return !t || !n || n.trim() === "" ? null : /* @__PURE__ */ r(N, { ...o, ...e });
76
81
  };
77
82
  function N(o) {
78
- const { t: n } = u(), {
83
+ const { t: e } = p(), {
79
84
  displayName: t,
80
- displayMode: e = "tooltip",
85
+ displayMode: n = "tooltip",
81
86
  infoTooltip: a,
82
- infoData: f,
83
- className: s,
84
- onInfoClick: c
85
- } = o, i = () => {
86
- c && c(o);
87
- }, d = a ? `${t}: ${a}` : `${t} ${n("gridHeader.information")}`;
88
- return e === "modal" ? /* @__PURE__ */ r(
87
+ infoData: i,
88
+ className: f,
89
+ onInfoClick: s,
90
+ infoIconGuidanceTargetId: d
91
+ } = o, c = () => {
92
+ s && s(o);
93
+ }, m = a ? `${t}: ${a}` : `${t} ${e("gridHeader.information")}`;
94
+ return n === "modal" ? /* @__PURE__ */ r(
89
95
  x,
90
96
  {
91
- infoData: f,
97
+ infoData: i,
92
98
  displayName: t,
93
- className: s,
94
- onInfoClick: i,
95
- label: d
99
+ className: f,
100
+ onInfoClick: c,
101
+ label: m,
102
+ guidanceTargetId: d
96
103
  }
97
104
  ) : /* @__PURE__ */ r(
98
- y,
105
+ T,
99
106
  {
100
107
  content: a || `Info about ${t}`,
101
- className: s,
102
- onInfoClick: i,
103
- label: d
108
+ className: f,
109
+ onInfoClick: c,
110
+ label: m,
111
+ guidanceTargetId: d
104
112
  }
105
113
  );
106
114
  }
107
115
  export {
108
- z as HeaderInfo,
109
- h as InfoIconTrigger,
116
+ F as HeaderInfo,
117
+ g as InfoIconTrigger,
110
118
  x as ModalInfoTrigger,
111
- y as TooltipInfoTrigger
119
+ T as TooltipInfoTrigger
112
120
  };
@@ -1,16 +1,16 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Dialog as s, DialogContent as d, DialogHeader as p, DialogTitle as g, DialogBody as f } from "../../../../feedback/dialog/dialog.js";
3
+ import { Dialog as m, DialogContent as s, DialogHeader as p, DialogTitle as g, DialogBody as f } from "../../../../feedback/dialog/dialog.js";
4
4
  import { useImpactNovaI18n as h } from "../../../../../i18n/use-impact-nova-i18n.js";
5
5
  import { SectionRenderer as x } from "./section-renderers.js";
6
- const H = ({ open: a, onClose: l, data: r }) => {
6
+ const H = ({ open: i, onClose: l, data: r }) => {
7
7
  const { t: n } = h();
8
8
  if (!r) return null;
9
- const { title: m, sections: t = [] } = r;
10
- return /* @__PURE__ */ e(s, { open: a, onOpenChange: (o) => !o && l(), children: /* @__PURE__ */ i(d, { className: "max-w-2xl", children: [
11
- /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(g, { children: m || n("gridHeader.information") }) }),
12
- /* @__PURE__ */ i(f, { className: "space-y-6 py-8", children: [
13
- t.map((o, c) => /* @__PURE__ */ e(x, { section: o }, `${o.type}-${c}`)),
9
+ const { title: c, sections: t = [] } = r;
10
+ return /* @__PURE__ */ e(m, { open: i, onOpenChange: (o) => !o && l(), children: /* @__PURE__ */ a(s, { className: "max-w-2xl", "data-guidance-target": "guidance.info-modal", children: [
11
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(g, { children: c || n("gridHeader.information") }) }),
12
+ /* @__PURE__ */ a(f, { className: "space-y-6 py-8", children: [
13
+ t.map((o, d) => /* @__PURE__ */ e(x, { section: o }, `${o.type}-${d}`)),
14
14
  t.length === 0 && /* @__PURE__ */ e("p", { className: "text-sm text-secondary-foreground text-center py-4", children: n("gridHeader.noInformationAvailable") })
15
15
  ] })
16
16
  ] }) });
@@ -1,71 +1,74 @@
1
- import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
- import * as t from "react";
1
+ import { jsxs as a, jsx as n } from "react/jsx-runtime";
2
+ import * as r from "react";
3
3
  import { useSyncExternalStore as c } from "react";
4
- import { useGuidanceContext as p } from "./guidance-context.js";
5
- import { SpotlightRenderer as f } from "./renderers/spotlight-renderer.js";
4
+ import { useGuidanceContext as f } from "./guidance-context.js";
5
+ import { SpotlightRenderer as k } from "./renderers/spotlight-renderer.js";
6
6
  import { CoachMarkRenderer as b } from "./renderers/coach-mark-renderer.js";
7
7
  import { AnnouncementRenderer as h } from "./renderers/announcement-renderer.js";
8
- import { endTourScrollSnapshot as k } from "./renderers/guidance-renderer-shared.js";
8
+ import { endTourScrollSnapshot as x } from "./renderers/guidance-renderer-shared.js";
9
9
  import { Button as d } from "../../primitives/button/button.js";
10
- function x(e, s) {
11
- const r = {
10
+ function S(e, o) {
11
+ const t = {
12
12
  instruction: e,
13
- ...s
13
+ ...o
14
14
  };
15
15
  switch (e.renderer) {
16
16
  case "spotlight":
17
- return /* @__PURE__ */ n(f, { ...r });
17
+ return /* @__PURE__ */ n(k, { ...t });
18
18
  case "coach-mark":
19
- return /* @__PURE__ */ n(b, { ...r });
19
+ return /* @__PURE__ */ n(b, { ...t });
20
20
  case "announcement":
21
- return /* @__PURE__ */ n(h, { ...r });
21
+ return /* @__PURE__ */ n(h, { ...t });
22
22
  default:
23
23
  return null;
24
24
  }
25
25
  }
26
26
  function z() {
27
- const { engine: e } = p();
28
- t.useEffect(() => e.on("guideEnd", () => {
29
- k();
27
+ const { engine: e } = f();
28
+ r.useEffect(() => e.on("guideEnd", () => {
29
+ x();
30
30
  }), [e]);
31
- const s = c(
32
- (o) => e.subscribe(o),
31
+ const o = c(
32
+ (s) => e.subscribe(s),
33
33
  () => e.state,
34
34
  () => ({ status: "idle" })
35
- ), r = c(
36
- (o) => e.subscribe(o),
35
+ ), t = c(
36
+ (s) => e.subscribe(s),
37
37
  () => e.getRenderInstruction(),
38
38
  () => null
39
- ), l = t.useCallback(() => {
39
+ ), l = r.useCallback(() => {
40
40
  e.advanceStep();
41
- }, [e]), u = t.useCallback(() => {
41
+ }, [e]), u = r.useCallback(() => {
42
+ e.skipStep();
43
+ }, [e]), i = r.useCallback(() => {
42
44
  e.dismiss("session");
43
- }, [e]), a = t.useCallback(() => {
44
- e.dismiss("session");
45
- }, [e]), m = t.useCallback(() => {
45
+ }, [e]), m = r.useCallback(() => {
46
+ e.goToPreviousStep();
47
+ }, [e]), p = r.useCallback(() => {
46
48
  e.retryCurrentStep();
47
49
  }, [e]);
48
- return s.status === "blocked" ? /* @__PURE__ */ i(
50
+ return o.status === "blocked" ? /* @__PURE__ */ a(
49
51
  "div",
50
52
  {
51
53
  "data-component": "guidance-blocked",
52
54
  className: "fixed bottom-4 left-1/2 z-50 -translate-x-1/2 rounded-md border border-border-default bg-surface-elevated px-4 py-3 shadow-lg",
53
55
  role: "status",
54
56
  children: [
55
- /* @__PURE__ */ i("p", { className: "text-sm text-content-secondary", children: [
57
+ /* @__PURE__ */ a("p", { className: "text-sm text-content-secondary", children: [
56
58
  "Guide step is blocked: ",
57
- s.reason
59
+ o.reason
58
60
  ] }),
59
- /* @__PURE__ */ i("div", { className: "mt-2 flex gap-2", children: [
60
- /* @__PURE__ */ n(d, { size: "sm", onClick: m, children: "Retry" }),
61
- /* @__PURE__ */ n(d, { variant: "secondary", size: "sm", onClick: a, children: "Dismiss" })
61
+ /* @__PURE__ */ a("div", { className: "mt-2 flex gap-2", children: [
62
+ /* @__PURE__ */ n(d, { size: "sm", onClick: p, children: "Retry" }),
63
+ /* @__PURE__ */ n(d, { variant: "secondary", size: "sm", onClick: i, children: "Dismiss" })
62
64
  ] })
63
65
  ]
64
66
  }
65
- ) : r ? x(r, {
67
+ ) : t ? S(t, {
66
68
  onNext: l,
67
69
  onSkip: u,
68
- onDismiss: a
70
+ onDismiss: i,
71
+ onBack: m
69
72
  }) : null;
70
73
  }
71
74
  export {
@@ -1,32 +1,41 @@
1
- import * as u from "react";
2
- import { beginTourScrollSnapshot as l, needsGuidanceTargetScroll as f, scrollGuidanceTargetIntoView as s, getVisibleTargetRect as v } from "../renderers/guidance-renderer-shared.js";
3
- import { hasRunningAnimations as p } from "../utils/motion-settle.js";
4
- function T(e, d) {
5
- const [m, t] = u.useState(null);
6
- return u.useEffect(() => {
1
+ import * as d from "react";
2
+ import { beginTourScrollSnapshot as v, needsGuidanceTargetScroll as R, scrollGuidanceTargetIntoView as r, getVisibleTargetRect as p } from "../renderers/guidance-renderer-shared.js";
3
+ import { hasRunningAnimations as w } from "../utils/motion-settle.js";
4
+ function S(e, n) {
5
+ return e instanceof HTMLElement ? !!(e === n || e.contains(n) || n.contains(e)) : !1;
6
+ }
7
+ function z(e, n) {
8
+ const [m, t] = d.useState(null);
9
+ return d.useEffect(() => {
7
10
  if (!e) {
8
11
  t(null);
9
12
  return;
10
13
  }
11
- let n = !1, o = 0;
12
- const r = () => {
13
- n || t(v(e));
14
+ let s = !1, o = 0;
15
+ const i = () => {
16
+ s || t(p(e));
14
17
  }, c = () => {
15
- r(), !n && p(e) && (o = requestAnimationFrame(c));
18
+ i(), !s && w(e) && (o = requestAnimationFrame(c));
16
19
  };
17
- l(e), f(e) && s(e), r(), o = requestAnimationFrame(c);
18
- const a = new ResizeObserver(() => {
19
- s(e), r();
20
+ v(e), R(e) && r(e), i(), o = requestAnimationFrame(c);
21
+ const u = new ResizeObserver(() => {
22
+ r(e), i();
20
23
  });
21
- a.observe(e);
22
- const i = () => {
23
- s(e), r();
24
+ u.observe(e);
25
+ const a = () => {
26
+ r(e), i();
27
+ }, f = (l) => {
28
+ if (S(l.target, e)) {
29
+ i();
30
+ return;
31
+ }
32
+ r(e), i();
24
33
  };
25
- return window.addEventListener("resize", i), document.addEventListener("scroll", i, !0), () => {
26
- n = !0, cancelAnimationFrame(o), a.disconnect(), window.removeEventListener("resize", i), document.removeEventListener("scroll", i, !0);
34
+ return window.addEventListener("resize", a), document.addEventListener("scroll", f, !0), () => {
35
+ s = !0, cancelAnimationFrame(o), u.disconnect(), window.removeEventListener("resize", a), document.removeEventListener("scroll", f, !0);
27
36
  };
28
- }, [d, e]), m;
37
+ }, [n, e]), m;
29
38
  }
30
39
  export {
31
- T as useGuidanceOverlayGeometry
40
+ z as useGuidanceOverlayGeometry
32
41
  };
@@ -1,3 +1,3 @@
1
1
  import { RendererProps } from '../../../../lib/guidance';
2
2
  import * as React from 'react';
3
- export declare function AnnouncementRenderer({ instruction, onNext, onSkip, }: RendererProps): React.ReactElement;
3
+ export declare function AnnouncementRenderer({ instruction, onNext, onSkip, onDismiss, onBack, }: RendererProps): React.ReactElement;
@@ -1,20 +1,26 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Dialog as r, DialogContent as l } from "../../../feedback/dialog/dialog.js";
4
- import { GuidanceStepPanel as d } from "./guidance-card-shared.js";
5
- function f({
3
+ import { Badge as m } from "../../../data-display/badge/badge.js";
4
+ import { Dialog as i, DialogContent as x } from "../../../feedback/dialog/dialog.js";
5
+ import { GuidanceStepProgressBar as b, GuidanceTourActionFooter as g, GuidanceTourProgressAndNav as h } from "./guidance-card-shared.js";
6
+ import { GuidanceAnnouncementSurface as v } from "./guidance-announcement-surface.js";
7
+ function k({
6
8
  instruction: e,
7
- onNext: a,
8
- onSkip: n
9
+ onNext: r,
10
+ onSkip: c,
11
+ onDismiss: p,
12
+ onBack: o
9
13
  }) {
10
- const p = e.stepIndex + 1 >= e.totalSteps;
11
- return /* @__PURE__ */ o(r, { open: !0, children: /* @__PURE__ */ o(
12
- l,
14
+ const s = e.stepIndex + 1 >= e.totalSteps, d = e.content.badge?.trim(), l = e.interactionFooter === "keybinding";
15
+ return /* @__PURE__ */ a(i, { open: !0, children: /* @__PURE__ */ a(
16
+ x,
13
17
  {
14
18
  "data-component": "guidance-announcement",
19
+ "data-guidance-modal-behavior": e.modalBehavior,
15
20
  hideClose: !0,
16
- className: "max-w-[400px] gap-0 overflow-hidden p-0 sm:rounded-2xl sm:shadow-elevation-floating",
17
- "aria-describedby": void 0,
21
+ className: "max-w-[400px] gap-0 overflow-hidden border-0 bg-canvas p-0 sm:rounded-2xl sm:shadow-elevation-floating",
22
+ "aria-labelledby": `guidance-announcement-title-${e.stepId}`,
23
+ "aria-describedby": e.content.body ? `guidance-announcement-body-${e.stepId}` : void 0,
18
24
  onPointerDownOutside: (t) => {
19
25
  t.preventDefault();
20
26
  },
@@ -24,25 +30,65 @@ function f({
24
30
  onEscapeKeyDown: (t) => {
25
31
  t.preventDefault();
26
32
  },
27
- children: /* @__PURE__ */ o(
28
- d,
29
- {
30
- title: e.content.title,
31
- body: e.content.body,
32
- optionalFooter: e.content.footer,
33
- stepIndex: e.stepIndex,
34
- totalSteps: e.totalSteps,
35
- skippable: e.skippable,
36
- primaryActionLabel: p ? "Done" : "Next",
37
- onSkip: n,
38
- onDismiss: n,
39
- onPrimaryAction: a,
40
- showPrimaryAction: !0
41
- }
42
- )
33
+ children: /* @__PURE__ */ n("div", { className: "relative overflow-hidden rounded-2xl", children: [
34
+ /* @__PURE__ */ a(v, {}),
35
+ /* @__PURE__ */ n("div", { className: "relative z-10 flex flex-col items-center px-8 pb-0 pt-10 text-center", children: [
36
+ d ? /* @__PURE__ */ a(m, { variant: "subtle", color: "primary", shape: "circle", size: "sm", children: d }) : null,
37
+ /* @__PURE__ */ a(
38
+ "h2",
39
+ {
40
+ id: `guidance-announcement-title-${e.stepId}`,
41
+ className: "mt-3 text-2xl font-bold leading-8 text-content",
42
+ children: e.content.title
43
+ }
44
+ ),
45
+ e.content.body ? /* @__PURE__ */ a(
46
+ "p",
47
+ {
48
+ id: `guidance-announcement-body-${e.stepId}`,
49
+ className: "mt-2 max-w-[22rem] text-sm leading-snug text-content-secondary",
50
+ children: e.content.body
51
+ }
52
+ ) : null
53
+ ] }),
54
+ /* @__PURE__ */ a("div", { className: "relative z-10 px-8 pb-8 pt-6", children: l ? /* @__PURE__ */ n("div", { className: "flex w-full flex-col gap-3", children: [
55
+ /* @__PURE__ */ a(
56
+ b,
57
+ {
58
+ activeStepIndex: e.stepIndex,
59
+ totalSteps: e.totalSteps
60
+ }
61
+ ),
62
+ /* @__PURE__ */ a(
63
+ g,
64
+ {
65
+ hint: e.content.footer ?? "Press the shortcut to continue.",
66
+ keybinding: e.content.keybinding,
67
+ activeStepIndex: e.stepIndex,
68
+ showBack: e.canGoBack,
69
+ onBack: o
70
+ }
71
+ )
72
+ ] }) : /* @__PURE__ */ a(
73
+ h,
74
+ {
75
+ activeStepIndex: e.stepIndex,
76
+ totalSteps: e.totalSteps,
77
+ skippable: e.skippable,
78
+ showSkip: !1,
79
+ showBack: e.canGoBack,
80
+ onBack: o,
81
+ primaryActionLabel: s ? "Done" : "Next",
82
+ onSkip: c,
83
+ onPrimaryAction: r,
84
+ onEndTour: p,
85
+ showPrimaryAction: !l && e.advanceOn !== "auto"
86
+ }
87
+ ) })
88
+ ] })
43
89
  }
44
90
  ) });
45
91
  }
46
92
  export {
47
- f as AnnouncementRenderer
93
+ k as AnnouncementRenderer
48
94
  };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ /** Hand-tap glyph for click-target tour steps (Figma action affordance). */
3
+ export declare function GuidanceActionTapIcon({ className, }: {
4
+ className?: string;
5
+ }): React.ReactElement;
@@ -0,0 +1,68 @@
1
+ import { jsx as c, jsxs as h } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as r } from "../../../../lib/utils.js";
4
+ function s({
5
+ className: l
6
+ }) {
7
+ return /* @__PURE__ */ c(
8
+ "svg",
9
+ {
10
+ "aria-hidden": "true",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ viewBox: "0 0 256 256",
13
+ className: r(
14
+ "size-4 min-h-4 min-w-4 max-h-4 max-w-4 shrink-0",
15
+ l
16
+ ),
17
+ children: /* @__PURE__ */ h(
18
+ "g",
19
+ {
20
+ fill: "currentColor",
21
+ fillRule: "nonzero",
22
+ transform: "translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)",
23
+ children: [
24
+ /* @__PURE__ */ c(
25
+ "path",
26
+ {
27
+ d: "M 69.416 43.298 H 68.97 c -0.983 0 -1.917 0.216 -2.756 0.603 c -0.644 -2.975 -3.295 -5.21 -6.459 -5.21 h -0.447 c -1.128 0 -2.19 0.284 -3.12 0.784 c -1 -2.379 -3.355 -4.054 -6.094 -4.054 h -0.447 c -0.925 0 -1.807 0.191 -2.606 0.536 v -9.458 c 0 -3.644 -2.964 -6.607 -6.608 -6.607 h -0.447 c -3.643 0 -6.607 2.964 -6.607 6.607 v 24.261 l -3.005 2.281 c -2.394 1.817 -3.911 4.461 -4.273 7.444 c -0.362 2.984 0.479 5.914 2.37 8.251 l 9.378 11.594 v 4.608 c 0 2.791 2.271 5.063 5.062 5.063 h 23.411 c 2.791 0 5.063 -2.271 5.063 -5.063 l 0.001 -4.375 c 2.996 -3.766 4.639 -8.438 4.639 -13.242 V 49.905 C 76.023 46.262 73.06 43.298 69.416 43.298 z M 72.023 67.32 c 0 4.102 -1.478 8.088 -4.159 11.224 c -0.311 0.362 -0.48 0.823 -0.48 1.3 v 5.094 c 0 0.586 -0.477 1.063 -1.063 1.063 H 42.911 c -0.585 0 -1.062 -0.477 -1.062 -1.063 v -5.316 c 0 -0.458 -0.157 -0.902 -0.445 -1.258 L 31.581 66.22 c -1.204 -1.488 -1.74 -3.354 -1.509 -5.254 c 0.23 -1.899 1.197 -3.583 2.721 -4.74 l 0.586 -0.444 v 5.495 c 0 1.104 0.896 2 2 2 s 2 -0.896 2 -2 v -9.506 c 0 -0.014 0 -0.026 0 -0.04 V 26.498 c 0 -1.438 1.169 -2.607 2.607 -2.607 h 0.447 c 1.438 0 2.607 1.17 2.607 2.607 v 15.53 c 0 0 0 0 0 0.001 s 0 0 0 0.001 l 0.01 12.917 c 0.001 1.104 0.896 1.998 2 1.998 c 0 0 0.001 0 0.001 0 c 1.104 -0.001 1.999 -0.896 1.998 -2.002 L 47.04 42.028 c 0 -1.438 1.169 -2.607 2.606 -2.607 h 0.447 c 1.438 0 2.607 1.17 2.607 2.607 v 3.27 c 0 0 0 0.001 0 0.001 c 0 0 0 0.001 0 0.001 l 0.009 9.647 c 0.001 1.104 0.896 1.998 2 1.998 c 0.001 0 0.001 0 0.002 0 c 1.104 -0.001 1.999 -0.897 1.998 -2.002 l -0.009 -9.646 c 0 -1.438 1.169 -2.607 2.606 -2.607 h 0.447 c 1.438 0 2.607 1.17 2.607 2.607 v 4.088 c -0.006 0.066 -0.02 0.13 -0.02 0.197 l 0.01 5.366 c 0.002 1.104 0.897 1.996 2 1.996 c 0.001 0 0.002 0 0.004 0 c 1.104 -0.002 1.998 -0.899 1.996 -2.004 l -0.009 -4.852 c 0.006 -0.062 0.019 -0.121 0.019 -0.184 c 0 -1.438 1.17 -2.607 2.607 -2.607 h 0.446 c 1.438 0 2.607 1.17 2.607 2.607 V 67.32 z"
28
+ }
29
+ ),
30
+ /* @__PURE__ */ c(
31
+ "path",
32
+ {
33
+ d: "M 63.994 25.511 H 51.79 c -1.104 0 -2 -0.896 -2 -2 s 0.896 -2 2 -2 h 12.204 c 1.104 0 2 0.896 2 2 S 65.099 25.511 63.994 25.511 z"
34
+ }
35
+ ),
36
+ /* @__PURE__ */ c(
37
+ "path",
38
+ {
39
+ d: "M 39.985 16.204 c -1.104 0 -2 -0.896 -2 -2 V 2 c 0 -1.104 0.896 -2 2 -2 s 2 0.896 2 2 v 12.204 C 41.985 15.309 41.09 16.204 39.985 16.204 z"
40
+ }
41
+ ),
42
+ /* @__PURE__ */ c(
43
+ "path",
44
+ {
45
+ d: "M 48.558 18.441 c -0.512 0 -1.023 -0.195 -1.414 -0.586 c -0.781 -0.781 -0.781 -2.047 0 -2.828 l 8.63 -8.629 c 0.781 -0.781 2.047 -0.781 2.828 0 c 0.781 0.781 0.781 2.047 0 2.828 l -8.63 8.629 C 49.581 18.246 49.069 18.441 48.558 18.441 z"
46
+ }
47
+ ),
48
+ /* @__PURE__ */ c(
49
+ "path",
50
+ {
51
+ d: "M 28.181 25.511 H 15.977 c -1.104 0 -2 -0.896 -2 -2 s 0.896 -2 2 -2 h 12.204 c 1.104 0 2 0.896 2 2 S 29.285 25.511 28.181 25.511 z"
52
+ }
53
+ ),
54
+ /* @__PURE__ */ c(
55
+ "path",
56
+ {
57
+ d: "M 31.413 18.441 c -0.512 0 -1.024 -0.195 -1.414 -0.586 L 21.37 9.226 c -0.781 -0.781 -0.781 -2.047 0 -2.828 c 0.78 -0.781 2.048 -0.781 2.828 0 l 8.629 8.629 c 0.781 0.781 0.781 2.047 0 2.828 C 32.437 18.246 31.925 18.441 31.413 18.441 z"
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ )
63
+ }
64
+ );
65
+ }
66
+ export {
67
+ s as GuidanceActionTapIcon
68
+ };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Figma-aligned announcement backdrop: 12px dot grid + soft hero wash (no hero image).
4
+ */
5
+ export declare function GuidanceAnnouncementSurface(): React.ReactElement;